mirror of
https://github.com/hanzoai/bot.git
synced 2026-11-01 07:38:30 +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.9 KiB
3.9 KiB
read_when, summary, title, x-i18n
| read_when | summary | title | x-i18n | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Windows(WSL2)支持 + 配套应用状态 | Windows (WSL2) |
|
Windows (WSL2)
Windows 上的 HanzoBot 推荐通过 WSL2(推荐 Ubuntu)。CLI + Gateway 网关在 Linux 内运行,这保持了运行时的一致性并使工具兼容性大大提高(Node/Bun/pnpm、Linux 二进制文件、Skills)。原生 Windows 可能更棘手。WSL2 给你完整的 Linux 体验——一条命令安装:wsl --install。
原生 Windows 配套应用已在计划中。
安装(WSL2)
- 入门指南(在 WSL 内使用)
- 安装和更新
- 官方 WSL2 指南(Microsoft):https://learn.microsoft.com/windows/wsl/install
Gateway 网关
Gateway 网关服务安装(CLI)
在 WSL2 内:
hanzo-bot onboard --install-daemon
或:
hanzo-bot gateway install
或:
hanzo-bot configure
出现提示时选择 Gateway service。
修复/迁移:
hanzo-bot doctor
高级:通过 LAN 暴露 WSL 服务(portproxy)
WSL 有自己的虚拟网络。如果另一台机器需要访问在 WSL 内运行的服务(SSH、本地 TTS 服务器或 Gateway 网关),你必须将 Windows 端口转发到当前的 WSL IP。WSL IP 在重启后会改变,因此你可能需要刷新转发规则。
示例(以管理员身份运行 PowerShell):
$Distro = "Ubuntu-24.04"
$ListenPort = 2222
$TargetPort = 22
$WslIp = (wsl -d $Distro -- hostname -I).Trim().Split(" ")[0]
if (-not $WslIp) { throw "WSL IP not found." }
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=$ListenPort `
connectaddress=$WslIp connectport=$TargetPort
允许端口通过 Windows 防火墙(一次性):
New-NetFirewallRule -DisplayName "WSL SSH $ListenPort" -Direction Inbound `
-Protocol TCP -LocalPort $ListenPort -Action Allow
在 WSL 重启后刷新 portproxy:
netsh interface portproxy delete v4tov4 listenport=$ListenPort listenaddress=0.0.0.0 | Out-Null
netsh interface portproxy add v4tov4 listenport=$ListenPort listenaddress=0.0.0.0 `
connectaddress=$WslIp connectport=$TargetPort | Out-Null
注意事项:
- 从另一台机器 SSH 目标是 Windows 主机 IP(示例:
ssh user@windows-host -p 2222)。 - 远程节点必须指向可访问的 Gateway 网关 URL(不是
127.0.0.1);使用hanzo-bot status --all确认。 - 使用
listenaddress=0.0.0.0进行 LAN 访问;127.0.0.1仅保持本地访问。 - 如果你想自动化,注册一个计划任务在登录时运行刷新步骤。
WSL2 分步安装
1)安装 WSL2 + Ubuntu
打开 PowerShell(管理员):
wsl --install
# Or pick a distro explicitly:
wsl --list --online
wsl --install -d Ubuntu-24.04
如果 Windows 要求则重启。
2)启用 systemd(Gateway 网关安装所需)
在你的 WSL 终端中:
sudo tee /etc/wsl.conf >/dev/null <<'EOF'
[boot]
systemd=true
EOF
然后从 PowerShell:
wsl --shutdown
重新打开 Ubuntu,然后验证:
systemctl --user status
3)安装 HanzoBot(在 WSL 内)
在 WSL 内按照 Linux 入门指南流程:
git clone https://github.com/hanzo-bot/hanzo-bot.git
cd hanzo-bot
pnpm install
pnpm ui:build # auto-installs UI deps on first run
pnpm build
hanzo-bot onboard
完整指南:入门指南
Windows 配套应用
我们还没有 Windows 配套应用。如果你想让它实现,欢迎贡献。