docs(cases): bind Telegram to existing node — claude-code-cli walkthrough (refs #14)#24
Open
s2agi wants to merge 1 commit into
Open
docs(cases): bind Telegram to existing node — claude-code-cli walkthrough (refs #14)#24s2agi wants to merge 1 commit into
s2agi wants to merge 1 commit into
Conversation
…d walkthrough (refs #14) Refs #14 issue #14 仅 claude-code-cli 路径 — 命令 `anet channel add telegram <node>` 实际已经 在 cli.ts:2570 实现,spawn 注入在 cli.ts:1636-1648,但没有用户教程。 新增详细操作手册 docs-site/docs/cases/telegram-bind-claude-code-cli.md (ZH+EN): - 6 大步骤 + 每步预期输出 + 落盘文件内容 - step 0 plugin 安装(claude plugin install telegram@claude-plugins-official) - 错误诊断表(每种 error message → 解决) - 高级用法(多人 / 群聊 / token rotate / unbind / 工具限制) - 安全考虑(dangerouslySkipPermissions + allowFrom 强制 + 一次性 workdir 建议) - 跟 codex-telegram-squad demo 区别 - 故障排查速查表 sidebar 加链接(ZH + EN cases 列表)。 未端到端实测 — 命令路径基于 cli.ts 源码 review + 本机 claude plugin 已装确认。 Vincent 自测后如有偏差 amend。SDK 两个 runtime 状态文档明确,引到 RFC-002 P1/P2。
This was referenced May 12, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Refs #14
issue #14 要求"对已经存在的节点用 anet 命令绑定 Telegram,优先 claude-code-cli"。本 PR 只处理 claude-code-cli runtime 路径(issue #14 的 P0 子集),不涉及 SDK 两个 runtime(那部分在 PR #20 RFC-002 Phase 1 设计中,targeting v0.9+)。
调研发现命令路径已实现:
anet channel add telegram <node-id> --bot-token <tok> --allow <user-id>(agent-network/bin/cli.ts:2570)--channels plugin:telegram@claude-plugins-official+TELEGRAM_STATE_DIRenv (cli.ts:1636-1648)~/.anet/nodes/<id>/channels/telegram/{access.json, .env, inbox/}(cli.ts:989)缺的是用户教程。本 PR 仅补文档,不动代码。
What
新增详细操作手册(ZH + EN,~640 行 each):
docs-site/docs/cases/telegram-bind-claude-code-cli.mddocs-site/docs/en/cases/telegram-bind-claude-code-cli.md覆盖 6 大步骤,每步给:
.env/access.json/config.json改动 / spawn args)加章节:
claude plugin install telegram@claude-plugins-official,user-scope 一次装)anet channel add telegram+ 验证落盘dangerouslySkipPermissions取舍 + allowFrom 强制 + 一次性 workdir 建议demos/codex-telegram-squad区别表docs-site/docs/.vitepress/config.tsZH + EN sidebar案例分类下加新链接。How to verify
浏览器打开 anet.sh
/cases/telegram-bind-claude-code-cli,6 步走全部可读。用户视角端到端实测(这步留给 Vincent 自测,PR 没等到 token 不阻塞 doc review):
anet channel add telegram <你的-node> --bot-token <tok> --allow <id>Vincent 自测 / 通信牛 跟着文档跑一遍发现偏差 → 直接在 PR comment 反馈,我 amend 修文档。
Test evidence
无 dead link。EN 镜像跟 ZH 内容对齐(6 步 + 高级用法 + 安全 + cheat sheet 全镜像)。
未做端到端实测:跟 N站马 要 telegram bot token 被她合理拒绝(credential 不走 commhub channel 链式转述 — 这是 OSS 安全红线,她做得对)。文档基于 cli.ts 源码 review + 本机已装 plugin 的实际行为推导,但真 Telegram bot 发消息那一环节没真跑过 → 标 "Vincent 自测" 验收门。
Checklist
docs-site/docs/changelog.mdupdated (n/a — 不是 user-visible behavior 改动,只是新教程)/home/<user>paths in the diff(所有 path 都是<user>placeholder + 文档内 example bot token123456789:AAEhBP_XYZxyz...是 telegram docs 标准 placeholder)docs:)Co-Authored-By: Claude*footerRefs #14(不 Closes,因为 issue [feature] 节点接入 Telegram 的命令 #14 还含 SDK runtime 部分由 RFC-002 PR docs(rfc): RFC-002 node Telegram bind cli plan (closes #14) #20 跟踪)关联 PR / Issue