返回顶部
a

arbiter推送至仲裁者

Push decisions to Arbiter Zebu for async human review. Use when you need human input on plans, architectural choices, or approval before proceeding.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
2,013
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

arbiter

Arbiter 技能

将决策推送给 Arbiter Zebu 进行异步人工审核。当你需要人工对计划、架构选择或审批提供意见时使用。

安装

通过 ClawHub 快速安装:
bash
clawhub install arbiter

或通过 bun(使 CLI 命令全局可用):
bash
bun add -g arbiter-skill

或手动安装:
bash
git clone https://github.com/5hanth/arbiter-skill.git
cd arbiter-skill && npm install && npm run build
ln -s $(pwd) ~/.clawdbot/skills/arbiter

前提条件

  • - Arbiter Zebu 机器人正在运行(或直接运行 bunx arbiter-zebu)
  • ~/.arbiter/queue/ 目录(由机器人自动创建)

环境变量

在代理环境中设置以下变量以实现自动代理/会话检测:

变量描述示例
CLAWDBOTAGENT代理 IDceo, swe1
CLAWDBOTSESSION
会话密钥 | agent:ceo:main |

使用时机

  • - 实施前的计划审查
  • 需要权衡的架构决策
  • 任何需要人工判断的阻塞事项
  • 多个相关决策批量处理

不要用于:

  • - 无需解释的简单是/否问题
  • 紧急的实时决策(请使用直接消息)
  • 可以自行研究的技术问题

工具

arbiter_push

创建供人工审核的决策计划。

CLI: arbiter-push — 接受包含所有字段的单个 JSON 参数。

bash
arbiter-push {
title: API 设计决策,
tag: nft-marketplace,
context: SWE2 需要在 API 工作开始前确定这些事项,
priority: normal,
notify: agent:swe2:main,
decisions: [
{
id: auth-strategy,
title: 认证策略,
context: 如何认证管理员用户,
options: [
{key: jwt, label: JWT 令牌, note: 无状态},
{key: session, label: 会话, note: 更多控制},
{key: oauth, label: OAuth, note: 外部提供商}
]
},
{
id: database,
title: 数据库选择,
context: 主数据存储,
options: [
{key: postgresql, label: PostgreSQL + JSONB},
{key: mongodb, label: MongoDB}
],
allowCustom: true
}
]
}

JSON 字段:

字段必需描述
title计划标题
tag
否 | 用于过滤的标签(例如项目名称) |
| context | 否 | 给审核者的背景信息 |
| priority | 否 | low、normal、high、urgent(默认:normal) |
| notify | 否 | 完成时通知的会话 |
| agent | 否 | 代理 ID(从 CLAWDBOT_AGENT 环境变量自动检测) |
| session | 否 | 会话密钥(从 CLAWDBOT_SESSION 环境变量自动检测) |
| decisions | 是 | 决策数组 |

决策对象:

字段必需描述
id计划内的唯一 ID
title
是 | 决策标题 |
| context | 否 | 给审核者的解释 |
| options | 是 | {key, label, note?} 数组 |
| allowCustom | 否 | 允许自由文本回答(默认:false) |
| default | 否 | 建议的选项键 |

返回:

json
{
planId: abc123,
file: ~/.arbiter/queue/pending/ceo-api-design-abc123.md,
total: 2,
status: pending
}

arbiter_status

检查决策计划的状态。

CLI: arbiter-status 或 arbiter-status --tag

bash
arbiter-status abc12345


arbiter-status --tag nft-marketplace

返回:

json
{
planId: abc123,
title: API 设计决策,
status: in_progress,
total: 3,
answered: 1,
remaining: 2,
decisions: {
auth-strategy: {status: answered, answer: jwt},
database: {status: pending, answer: null},
caching: {status: pending, answer: null}
}
}

arbiter_get

从已完成的计划中获取答案。

CLI: arbiter-get 或 arbiter-get --tag

bash
arbiter-get abc12345


arbiter-get --tag nft-marketplace

返回:

json
{
planId: abc123,
status: completed,
completedAt: 2026-01-30T01:45:00Z,
answers: {
auth-strategy: jwt,
database: postgresql,
caching: redis
}
}

未完成时的错误:

json
{
error: 计划未完成,
status: in_progress,
remaining: 2
}

arbiter_await

阻塞直到计划完成(带超时)。

bash
arbiter-await abc12345 --timeout 3600

每 30 秒轮询一次,直到完成或超时。

返回: 完成时与 arbiter_get 相同。

使用示例

示例 1:计划审查

bash

推送计划决策(单个 JSON 参数)


RESULT=$(arbiter-push {title:Clean IT i18n 计划,tag:clean-it,priority:high,notify:agent:swe3:main,decisions:[{id:library,title:i18n 库,options:[{key:i18next,label:i18next},{key:formatjs,label:FormatJS}]},{id:keys,title:键结构,options:[{key:flat,label:扁平 (login.button)},{key:nested,label:嵌套 ({login:{button}})}]}]})

PLAN_ID=$(echo $RESULT | jq -r .planId)
echo 已推送计划 $PLAN_ID — 等待人工审核

示例 2:检查并继续

bash

检查决策是否就绪


STATUS=$(arbiter-status --tag nft-marketplace)

if [ $(echo $STATUS | jq -r .status) == completed ]; then
ANSWERS=$(arbiter-get --tag nft-marketplace)
AUTH=$(echo $ANSWERS | jq -r .answers[auth-strategy])
echo 使用认证策略:$AUTH
# 继续实施
else
echo 仍在等待 $(echo $STATUS | jq -r .remaining) 个决策
fi

示例 3:阻塞等待

bash

最多等待 1 小时获取决策


ANSWERS=$(arbiter-await abc12345 --timeout 3600)

if [ $? -eq 0 ]; then
# 获取到答案,继续
echo 决策已就绪:$ANSWERS
else
echo 等待决策超时
fi

最佳实践

  1. 1. 批量处理相关决策 — 不要一次只推送一个
  2. 提供背景信息 — 人工需要理解权衡因素
  3. 使用标签 — 便于过滤(--tag project-name)
  4. 设置通知 — 以便被阻塞的代理被唤醒
  5. 谨慎使用优先级 — 将 urgent 保留给真正的阻塞项

文件位置

路径用途
~/.arbiter/queue/pending/等待审核的计划
~/.arbiter/queue/completed/
已回答的计划(存档

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 arbiter-1776367584 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 arbiter-1776367584 技能

通过命令行安装

skillhub install arbiter-1776367584

下载

⬇ 下载 arbiter v0.1.0(免费)

文件大小: 12.96 KB | 发布时间: 2026-4-17 15:29

v0.1.0 最新 2026-4-17 15:29
Initial release

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部