mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
- Rename lobster extension → flow (dir, types, env vars, docs) - LOBSTER_* env vars → BOT_FLOW_* / BOT_* - 🦞 → 🤖 everywhere (src, docs, skills, zh-CN) - docs.bot.ai → docs.hanzo.bot - github.com/bot/bot → github.com/hanzoai/bot - @bot/* → @hanzo/bot-* (npm scope) - ~/.bot/ → ~/.hanzo/bot/ (config paths) - discord.gg/hanzo → discord.gg/XthHQQj (real Hanzo Discord) - clawhub.com → skills.hanzo.bot - ClawDock → BotDock in shell helpers - EXFOLIATE lore → Hanzo Bot branding in all locales - LOBSTER_PALETTE → BOT_PALETTE, LOBSTER_ASCII → BOT_ASCII
2.8 KiB
2.8 KiB
read_when, summary, title, x-i18n
| read_when | summary | title | x-i18n | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
配对概述:批准谁可以向你发送私信 + 哪些节点可以加入 | 配对 |
|
配对
"配对"是 Hanzo Bot 的显式所有者批准步骤。它用于两个地方:
- 私信配对(谁被允许与机器人对话)
- 节点配对(哪些设备/节点被允许加入 Gateway 网关网络)
安全上下文:安全
1)私信配对(入站聊天访问)
当渠道配置为私信策略 pairing 时,未知发送者会收到一个短代码,他们的消息不会被处理,直到你批准。
默认私信策略记录在:安全
配对代码:
- 8 个字符,大写,无歧义字符(
0O1I)。 - 1 小时后过期。机器人仅在创建新请求时发送配对消息(大约每个发送者每小时一次)。
- 待处理的私信配对请求默认上限为每个渠道 3 个;在一个过期或被批准之前,额外的请求将被忽略。
批准发送者
hanzo-bot pairing list telegram
hanzo-bot pairing approve telegram <CODE>
支持的渠道:telegram、whatsapp、signal、imessage、discord、slack。
状态存储位置
存储在 ~/.hanzo/bot/credentials/ 下:
- 待处理请求:
<channel>-pairing.json - 已批准允许列表存储:
<channel>-allowFrom.json
将这些视为敏感信息(它们控制对你助手的访问)。
2)节点设备配对(iOS/Android/macOS/无头节点)
节点作为 role: node 的设备连接到 Gateway 网关。Gateway 网关创建一个必须被批准的设备配对请求。
批准节点设备
hanzo-bot devices list
hanzo-bot devices approve <requestId>
hanzo-bot devices reject <requestId>
状态存储位置
存储在 ~/.hanzo/bot/devices/ 下:
pending.json(短期;待处理请求会过期)paired.json(已配对设备 + 令牌)
说明
- 旧版
node.pair.*API(CLI:hanzo-bot nodes pending/approve)是一个单独的 Gateway 网关拥有的配对存储。WS 节点仍然需要设备配对。