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.
3.5 KiB
3.5 KiB
read_when, summary, title, x-i18n
| read_when | summary | title | x-i18n | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
`hanzo-bot browser` 的 CLI 参考(配置文件、标签页、操作、扩展中继) | browser |
|
hanzo-bot browser
管理 HanzoBot 的浏览器控制服务器并运行浏览器操作(标签页、快照、截图、导航、点击、输入)。
相关:
通用标志
--url <gatewayWsUrl>:Gateway 网关 WebSocket URL(默认从配置获取)。--token <token>:Gateway 网关令牌(如果需要)。--timeout <ms>:请求超时(毫秒)。--browser-profile <name>:选择浏览器配置文件(默认从配置获取)。--json:机器可读输出(在支持的地方)。
快速开始(本地)
hanzo-bot browser --browser-profile chrome tabs
hanzo-bot browser --browser-profile hanzo-bot start
hanzo-bot browser --browser-profile hanzo-bot open https://example.com
hanzo-bot browser --browser-profile hanzo-bot snapshot
配置文件
配置文件是命名的浏览器路由配置。实际上:
hanzo-bot:启动/附加到专用的 HanzoBot 管理的 Chrome 实例(隔离的用户数据目录)。chrome:通过 Chrome 扩展中继控制你现有的 Chrome 标签页。
hanzo-bot browser profiles
hanzo-bot browser create-profile --name work --color "#FF5A36"
hanzo-bot browser delete-profile --name work
使用特定配置文件:
hanzo-bot browser --browser-profile work tabs
标签页
hanzo-bot browser tabs
hanzo-bot browser open https://docs.hanzo-bot.ai
hanzo-bot browser focus <targetId>
hanzo-bot browser close <targetId>
快照 / 截图 / 操作
快照:
hanzo-bot browser snapshot
截图:
hanzo-bot browser screenshot
导航/点击/输入(基于 ref 的 UI 自动化):
hanzo-bot browser navigate https://example.com
hanzo-bot browser click <ref>
hanzo-bot browser type <ref> "hello"
Chrome 扩展中继(通过工具栏按钮附加)
此模式让智能体控制你手动附加的现有 Chrome 标签页(不会自动附加)。
将未打包的扩展安装到稳定路径:
hanzo-bot browser extension install
hanzo-bot browser extension path
然后 Chrome → chrome://extensions → 启用"开发者模式" → "加载已解压的扩展程序" → 选择打印的文件夹。
完整指南:Chrome 扩展
远程浏览器控制(node host 代理)
如果 Gateway 网关与浏览器运行在不同的机器上,在有 Chrome/Brave/Edge/Chromium 的机器上运行 node host。Gateway 网关会将浏览器操作代理到该节点(无需单独的浏览器控制服务器)。
使用 gateway.nodes.browser.mode 控制自动路由,使用 gateway.nodes.browser.node 在连接多个节点时固定特定节点。