mirror of
https://github.com/hanzoai/bot.git
synced 2026-11-01 18:02:28 +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.
61 lines
2.3 KiB
Plaintext
61 lines
2.3 KiB
Plaintext
---
|
||
title: 在 Northflank 上部署
|
||
x-i18n:
|
||
generated_at: "2026-02-01T21:19:03Z"
|
||
model: claude-opus-4-5
|
||
provider: pi
|
||
source_hash: ad0be8dda41c51d0b6424259316db1b22be5216434f5879f21a5e8c60e0a2ee0
|
||
source_path: northflank.mdx
|
||
workflow: 15
|
||
---
|
||
|
||
通过一键模板在 Northflank 上部署 HanzoBot,然后在浏览器中完成设置。
|
||
这是最简单的"无需在服务器上使用终端"的方式:Northflank 为你运行 Gateway网关,
|
||
你通过 `/setup` 网页向导配置一切。
|
||
|
||
## 如何开始
|
||
|
||
1. 点击 [Deploy HanzoBot](https://northflank.com/stacks/deploy-hanzo-bot) 打开模板。
|
||
2. 如果你还没有账户,请创建一个 [Northflank 账户](https://app.northflank.com/signup)。
|
||
3. 点击 **Deploy HanzoBot now**。
|
||
4. 设置必需的环境变量:`SETUP_PASSWORD`。
|
||
5. 点击 **Deploy stack** 构建并运行 HanzoBot 模板。
|
||
6. 等待部署完成,然后点击 **View resources**。
|
||
7. 打开 HanzoBot 服务。
|
||
8. 打开公开的 HanzoBot URL,在 `/setup` 完成设置。
|
||
9. 在 `/hanzo-bot` 打开控制面板 UI。
|
||
|
||
## 你将获得
|
||
|
||
- 托管的 HanzoBot Gateway网关 + 控制面板 UI
|
||
- `/setup` 处的网页设置向导(无需终端命令)
|
||
- 通过 Northflank Volume(`/data`)实现持久化存储,配置/凭据/工作区在重新部署后不会丢失
|
||
|
||
## 设置流程
|
||
|
||
1. 访问 `https://<your-northflank-domain>/setup` 并输入你的 `SETUP_PASSWORD`。
|
||
2. 选择模型/认证提供商并粘贴你的密钥。
|
||
3. (可选)添加 Telegram/Discord/Slack 令牌。
|
||
4. 点击 **Run setup**。
|
||
5. 在 `https://<your-northflank-domain>/hanzo-bot` 打开控制面板 UI。
|
||
|
||
如果 Telegram 私信设置为配对模式,设置向导可以审批配对码。
|
||
|
||
## 获取聊天令牌
|
||
|
||
### Telegram 机器人令牌
|
||
|
||
1. 在 Telegram 中给 `@BotFather` 发消息
|
||
2. 运行 `/newbot`
|
||
3. 复制令牌(格式如 `123456789:AA...`)
|
||
4. 将其粘贴到 `/setup` 中
|
||
|
||
### Discord 机器人令牌
|
||
|
||
1. 前往 https://discord.com/developers/applications
|
||
2. **New Application** → 选择一个名称
|
||
3. **Bot** → **Add Bot**
|
||
4. 在 Bot → Privileged Gateway Intents 下**启用 MESSAGE CONTENT INTENT**(必需,否则机器人启动时会崩溃)
|
||
5. 复制 **Bot Token** 并粘贴到 `/setup` 中
|
||
6. 邀请机器人加入你的服务器(OAuth2 URL Generator;权限范围:`bot`、`applications.commands`)
|