# @agfpd/telegram-runtime 中文文档

规范地址：https://npmcn.com/package/%40agfpd/telegram-runtime/

版本：0\.28\.14
npm 元数据更新时间：2026-11-05T21:27:31.599Z
中文译文更新时间：2026-11-07T07:58:55.688Z
软件包许可：Apache-2\.0

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40agfpd/telegram-runtime
原文对照：https://npmcn.com/package/%40agfpd/telegram-runtime/?lang=original
项目主页：https://github.com/agfpd/telegram-runtime#readme
源码仓库：https://github.com/agfpd/telegram-runtime

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：3.2 MB，173 个文件
- 模块格式：ES Module
- TypeScript 类型：未声明
- 运行依赖：1 个
- 首次发布：2026-06-08T14:12:42.642Z
- 最新版本发布：2026-11-05T21:27:31.076Z
- 近 30 天下载量：2000（2026-10-05 至 2026-11-03，npm 官方下载统计）
- 已发布版本数：46（近 12 个月 46 个）

## 中文简介

为 IAP 同行提供的Telegram 运行时间路由器 .

## 安装

```sh
npm install @agfpd/telegram-runtime
```

也可以使用：`pnpm add @agfpd/telegram-runtime`、`yarn add @agfpd/telegram-runtime`、`bun add @agfpd/telegram-runtime`

## README

# 电报运行时间

**人工智能人员团队的Telegram桥——人类存在部分 [动物](https://github.com/agfpd/iapeer)。 。 。 .**

[![CI](https://github.com/agfpd/telegram-runtime/actions/workflows/ci.yml/badge.svg)](https://github.com/agfpd/telegram-runtime/actions/workflows/ci.yml) [![npm](https://img.shields.io/npm/v/@agfpd/telegram-runtime)](https://www.npmjs.com/package/@agfpd/telegram-runtime) [![license](https://img.shields.io/npm/l/@agfpd/telegram-runtime)](https://npmcn.com/package/%40agfpd/telegram-runtime/LICENSE) [![platform](https://img.shields.io/badge/platform-macOS-lightgrey)](https://npmcn.com/package/%40agfpd/telegram-runtime/#readme-quick-start)

电报运行时间让一个人出现在 [动物](https://github.com/agfpd/iapeer) 通过Telegram的代理团队:所有者消息是信使的代理,在同一聊天中得到回复. 对特工来说,这个人是普通的同伴,它的信息 `send_to_peer` ——桥会将它转换成正确的聊天中的Telegram消息,并将人物的回覆变成普通的入行消息. 它带有语音,附件,一个打字指示器,一个活动流,以及控制命令.

> **建为相.** 这不是一个独立的机器人框架,它只在内部运行 [动物](https://github.com/agfpd/iapeer),同时 `iapeer-memory` 财务报告和审定财务报表 `notifier-runtime`是一个iapeer运行时间, 与克洛德, Codex 和 OpenCode 代理运行时间的对等者, iapeer 提供和发射, 并且其信息通过 iapeer 自己的路由.

## 如何运作

```text
   person in Telegram                          agent (Claude/Codex/OpenCode)
        │  messages the bot                         │  send_to_peer(arthur, "…")
        ▼                                            ▼
   ┌──────────────────────────────────────────────────────────┐
   │  telegram-runtime — the bridge                             │
   │  inbound:  Telegram → recipient peer (voice → text)        │
   │  outbound: peer → Telegram chat (text, files, voice)       │
   │  typing indicator · activity stream · chat commands        │
   └──────────────────────────────────────────────────────────┘
```

## 快开始

需要安装一个工作状态的ipeer 和一个 Telegram bot 代号 `@BotFather`。 。 。 .

```bash
npx @agfpd/telegram-runtime                       # install: binary + manifest
iapeer connect telegram <agent> --token <token>   # bind a bot to the agent
# then send the bot its first message from Telegram (a bot can't start a chat)
```

检查链条 :

```bash
telegram-runtime doctor
```

运行 `doctor` 从 **人类同行的工作目录**,而不是这个源树. 它检查配置,而不是进入现场。 仅读投票证据:

```bash
telegram-runtime polling --log ~/.iapeer/logs/arthur/telegram-arthur.log --json
```

使用您的人类同行运行时间日志路径 。 这不会联系Telegram或重新启动桥.

## 是什么让它不同

-   **透明频道.** 特工们没有Telegram工具——对于一个特工来说,这个人只是一个被命名的同龄人. 一样 `send_to_peer` 达到人类和人工智能.
-   **从护照上绑起 没有单独的数据库.** 一个人携带他们的Telegram id,一个代理人携带它的bot 绑定——在他们的同龄人简介中都有. 大桥读取了它们并建造了路线.
-   **双向出声.** 语音被转录到文本中(带有本地倒计时);语音输出作为Telegram语音信息发送.
-   **现场直播.** 代理工作时的打字指示器,以及可选的活动流,显示它现在使用的是什么工具.
-   **从聊天控制.** `/stop`, (中文(简体) ), `/new`, (中文(简体) ), `/compact`,和操作员定义的别名快捷键——截取并运行于iapeer,从未作为文本交付代理.
-   **一个过程.** 每个特工都有自己的机器人;桥梁通过一个单一的过程,每个机器人一个锁,来进行投票.

## 文档

[`docs/`](https://npmcn.com/package/%40agfpd/telegram-runtime/docs/README.md) ——是什么以及如何使用(英语;俄语: [`docs/ru/`](https://npmcn.com/package/%40agfpd/telegram-runtime/docs/ru/README.md)) (中文(简体) ). 此寄存器即为执行.

## 许可证

Apache–2.0. 平台: macOS. 电报运行时间是人类存在的运行时间 [动物](https://github.com/agfpd/iapeer) 生态系统——iapeer的一个组成部分,而不是独立的系统.

## 常见问题

### @agfpd/telegram-runtime 是什么？

为 IAP 同行提供的Telegram 运行时间路由器 \.

### 如何安装 @agfpd/telegram-runtime？

在项目目录运行 npm install @agfpd/telegram-runtime，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 telegram-runtime，可以用 npx telegram-runtime 直接运行。

### @agfpd/telegram-runtime 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/agfpd\_\_telegram-runtime 是否存在。

### @agfpd/telegram-runtime 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @agfpd/telegram-runtime 可以商用吗？

@agfpd/telegram-runtime 使用 Apache-2\.0 许可。宽松许可：允许商业使用、修改和再分发，并附带明确的专利授权；分发时需保留许可与 NOTICE 文件，修改过的文件要注明改动。以上为概括，不构成法律意见，请以许可原文为准。

### @agfpd/telegram-runtime 的下载量有多少？

根据 npm 官方下载统计，@agfpd/telegram-runtime 在 2026/10/05 – 2026/11/03 这 30 天内被下载 2,000 次，日均约 67 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @agfpd/telegram-runtime 还在维护吗？

最新版本 0\.28\.14 发布于 2026/11/06（1 天前）；至今共发布 46 个版本，其中过去 12 个月发布了 46 个；首次发布于 2026/06/08。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

