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.5 KiB
2.5 KiB
read_when, summary, title, x-i18n
| read_when | summary | title | x-i18n | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
直接 `hanzo-bot agent` CLI 运行(带可选投递) | Agent Send |
|
hanzo-bot agent(直接智能体运行)
hanzo-bot agent 运行单个智能体回合,无需入站聊天消息。
默认情况下它通过 Gateway 网关运行;添加 --local 以强制在当前机器上使用嵌入式运行时。
行为
- 必需:
--message <text> - 会话选择:
--to <dest>派生会话键(群组/频道目标保持隔离;直接聊天折叠到main),或--session-id <id>通过 ID 重用现有会话,或--agent <id>直接定位已配置的智能体(使用该智能体的main会话键)
- 运行与正常入站回复相同的嵌入式智能体运行时。
- 思考/详细标志持久化到会话存储中。
- 输出:
- 默认:打印回复文本(加上
MEDIA:<url>行) --json:打印结构化负载 + 元数据
- 默认:打印回复文本(加上
- 可选使用
--deliver+--channel将回复投递回渠道(目标格式与hanzo-bot message --target匹配)。 - 使用
--reply-channel/--reply-to/--reply-account覆盖投递而不更改会话。
如果 Gateway 网关不可达,CLI 会回退到嵌入式本地运行。
示例
hanzo-bot agent --to +15555550123 --message "status update"
hanzo-bot agent --agent ops --message "Summarize logs"
hanzo-bot agent --session-id 1234 --message "Summarize inbox" --thinking medium
hanzo-bot agent --to +15555550123 --message "Trace logs" --verbose on --json
hanzo-bot agent --to +15555550123 --message "Summon reply" --deliver
hanzo-bot agent --agent ops --message "Generate report" --deliver --reply-channel slack --reply-to "#reports"
标志
--local:本地运行(需要你的 shell 中有模型提供商 API 密钥)--deliver:将回复发送到所选渠道--channel:投递渠道(whatsapp|telegram|discord|googlechat|slack|signal|imessage,默认:whatsapp)--reply-to:投递目标覆盖--reply-channel:投递渠道覆盖--reply-account:投递账户 ID 覆盖--thinking <off|minimal|low|medium|high|xhigh>:持久化思考级别(仅限 GPT-5.2 + Codex 模型)--verbose <on|full|off>:持久化详细级别--timeout <seconds>:覆盖智能体超时--json:输出结构化 JSON