mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
The docs said ~/.hanzo-bot/hanzo-bot.json (and ~/.hanzo-bot-<profile>, hanzo-bot.plugin.json), which nothing reads: src/config/paths.ts resolves ~/.bot, bot.json and ~/.bot-<profile>, and plugins ship bot.plugin.json. Every such path in docs/ now names what the code opens. Co-authored-by: Hanzo Dev <[email protected]>
1.8 KiB
1.8 KiB
read_when, summary, title, x-i18n
| read_when | summary | title | x-i18n | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
CLI 参考:`hanzo-bot approvals`(Gateway 网关或节点主机的执行审批) | approvals |
|
hanzo-bot approvals
管理本地主机、Gateway 网关主机或节点主机的执行审批。
默认情况下,命令针对磁盘上的本地审批文件。使用 --gateway 可针对 Gateway 网关,使用 --node 可针对特定节点。
相关内容:
常用命令
hanzo-bot approvals get
hanzo-bot approvals get --node <id|name|ip>
hanzo-bot approvals get --gateway
从文件替换审批
hanzo-bot approvals set --file ./exec-approvals.json
hanzo-bot approvals set --node <id|name|ip> --file ./exec-approvals.json
hanzo-bot approvals set --gateway --file ./exec-approvals.json
允许列表辅助命令
hanzo-bot approvals allowlist add "~/Projects/**/bin/rg"
hanzo-bot approvals allowlist add --agent main --node <id|name|ip> "/usr/bin/uptime"
hanzo-bot approvals allowlist add --agent "*" "/usr/bin/uname"
hanzo-bot approvals allowlist remove "~/Projects/**/bin/rg"
注意事项
--node使用与hanzo-bot nodes相同的解析器(id、name、ip 或 id 前缀)。--agent默认为"*",表示适用于所有智能体。- 节点主机必须公开
system.execApprovals.get/set(macOS 应用或无头节点主机)。 - 审批文件按主机存储在
~/.bot/exec-approvals.json。