mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
Three coordinated things:
1. Resolve the committed upstream/main merge conflicts. 94 files were
sitting with raw <<<<<<< HEAD ... >>>>>>> upstream/main blocks. Every
conflict had HanzoBot/Bot on HEAD and OpenClaw on upstream. Resolved
by keeping HEAD everywhere — 540 conflict blocks.
2. Rewrite remaining OpenClaw text refs.
OPENCLAW → HANZO_BOT
OpenClaw → HanzoBot (PascalCase type identifiers)
openclaw → bot (codebase convention — botToken,
botUsername etc.; avoids invalid
hyphenated JS identifiers)
openclaw[_]/openclaw[A-Z] → bot[_]/bot[A-Z] (compound)
ai.openclaw.x → ai.hanzo.bot.x (JVM package path)
3. Delete or rename openclaw-named file paths (116 of them). Dead
duplicates with a Bot-named canonical from the partial migration:
deleted. Otherwise renamed.
ai/openclaw/** → deleted (ai/hanzo/bot/** canonical)
Sources/OpenClaw*/ → deleted (Sources/Bot* canonical)
Tests/OpenClawIPCTests/ → deleted (Tests/BotIPCTests canonical)
OpenClawKit/ → deleted (BotKit canonical)
openclaw-tools.*.ts → deleted (bot-tools.*.ts canonical)
openclaw-root.ts etc. → deleted (bot-root.ts canonical)
types.openclaw.ts → deleted (types.bot.ts canonical)
extensions/*/openclaw.plugin.json → renamed hanzo-bot.plugin.json
docs/start/openclaw.md → renamed hanzo-bot.md (+ zh-CN)
docs/assets/openclaw-*.png, whatsapp-openclaw*.jpg → deleted
scripts/.../openclaw-* → deleted (bot/hanzo-bot parallels)
openclaw.mjs → deleted (hanzo-bot.mjs is package.bin)
Then patched 65 broken JS/TS import strings where hanzo-bot had ended
up inside an import path ('./types.hanzo-bot.js' → './types.bot.js'
etc., since the on-disk filename uses the brand-neutral bot- prefix).
Pre-existing lint debt cleaned up to get oxlint --type-aware to 0/0:
removed the dead i18n test that referenced a path no longer existing;
defined the missing DIDConfig and WalletConfig types in types.base.ts
(they were imported but never declared); dropped unused imports;
collapsed redundant type assertion and a tautological meta.bot lookup
that the openclaw→bot rename made redundant.
The a2ui.bundle.js generated artifact is kept at its pre-rebrand
contents — it gets regenerated by 'pnpm canvas:a2ui:bundle' from
sources I cannot rebuild in this commit; the source side is clean.
Verified: 0 occurrences of openclaw (case-insensitive) in tree source
content, 0 file or directory paths with openclaw in the name; oxlint
--type-aware src test reports 0/0.
2.9 KiB
2.9 KiB
read_when, summary, title, x-i18n
| read_when | summary | title | x-i18n | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
`hanzo-bot channels` 的 CLI 参考(账户、状态、登录/登出、日志) | channels |
|
hanzo-bot channels
管理 Gateway 网关上的聊天渠道账户及其运行时状态。
相关文档:
常用命令
hanzo-bot channels list
hanzo-bot channels status
hanzo-bot channels capabilities
hanzo-bot channels capabilities --channel discord --target channel:123
hanzo-bot channels resolve --channel slack "#general" "@jane"
hanzo-bot channels logs --channel all
添加/删除账户
hanzo-bot channels add --channel telegram --token <bot-token>
hanzo-bot channels remove --channel telegram --delete
提示:hanzo-bot channels add --help 显示每个渠道的标志(token、app token、signal-cli 路径等)。
登录/登出(交互式)
hanzo-bot channels login --channel whatsapp
hanzo-bot channels logout --channel whatsapp
故障排除
- 运行
hanzo-bot status --deep进行全面探测。 - 使用
hanzo-bot doctor获取引导式修复。 hanzo-bot channels list输出Claude: HTTP 403 ... user:profile→ 用量快照需要user:profile权限范围。使用--no-usage,或提供 claude.ai 会话密钥(CLAUDE_WEB_SESSION_KEY/CLAUDE_WEB_COOKIE),或通过 Claude Code CLI 重新授权。
能力探测
获取提供商能力提示(可用的 intents/scopes)以及静态功能支持:
hanzo-bot channels capabilities
hanzo-bot channels capabilities --channel discord --target channel:123
说明:
--channel是可选的;省略它可列出所有渠道(包括扩展)。--target接受channel:<id>或原始数字频道 id,仅适用于 Discord。- 探测是特定于提供商的:Discord intents + 可选的频道权限;Slack bot + user scopes;Telegram bot 标志 + webhook;Signal daemon 版本;MS Teams app token + Graph roles/scopes(在已知处标注)。没有探测功能的渠道报告
Probe: unavailable。
解析名称为 ID
使用提供商目录将渠道/用户名称解析为 ID:
hanzo-bot channels resolve --channel slack "#general" "@jane"
hanzo-bot channels resolve --channel discord "My Server/#support" "@someone"
hanzo-bot channels resolve --channel matrix "Project Room"
说明:
- 使用
--kind user|group|auto强制指定目标类型。 - 当多个条目共享相同名称时,解析优先选择活跃的匹配项。