CALLANYTHING
Responder · 5 min

把能力变成
一根 HOTLINE

先用已发布的 delexec-ops 包跑通本地 runtime 和 example hotline,再把自己的能力挂到 supervisor。源码安装与提交审核都放在后续步骤里。

Local 起步Platform 可选支持 process / http

这页教你做什么

从 0 到「一根本地可调用、可提交审核的 Hotline draft」

  • · 启动 supervisor + 注册账号
  • · 启用 Responder 角色
  • · 用内置 example hotline 跑通链路
  • · 写自己的 hotline registration draft
  • · 生成 registration draft · 可选提交 review · 检查本地在线状态
01

官方路径:安装 CLI + 跑通 bootstrap

陌生用户从已发布的 @delexec/ops 开始,先确认本机 runtime、Caller/Responder 最小闭环和 example hotline 都能工作。

bash
任意目录
npm install -g @delexec/ops
delexec-ops bootstrap --email [email protected]
提示这两条命令会安装 CLI 并完成本地 runtime 初始化。它不是发布流程, 但能证明你的本机 runtime 已经具备 Responder 侧调试基础。
注意后续步骤继续使用已安装的 delexec-ops。如果你已经做过 Caller Quick Start,请用不同的 DELEXEC_HOME OPS_PORT_SUPERVISOR避免冲突;或者直接复用同一个 supervisor,Responder 和 Caller 本来就可以共存。
02

注册一个 Responder 账号

Local Mode 下不需要联通 Platform;想直接对接 catalog 路由,把 --local 换成 --platform 即可。

bash
纯本地
delexec-ops auth register --local --email [email protected]
bash
对接自建 Platform
delexec-ops bootstrap \
  --email [email protected] \
  --platform http://127.0.0.1:8080
03

启用 Responder 角色

一次启用,supervisor 会创建 responder controller 进程,并准备好 hotline 注册槽位。

bash
delexec-ops enable-responder \
  --display-name "Acme Workspace Tools"
04

用 example hotline 验证链路

先借现成的 workspace-summary 示例 hotline 把链路跑通,确保 supervisor + responder 之间通讯正常,再去写你自己的 hotline。

bash
delexec-ops add-example-hotline

BASE="http://127.0.0.1:${OPS_PORT_SUPERVISOR:-8079}"
OPS_SESSION=$(curl -s -X POST "$BASE/auth/session/setup" \
  -H 'content-type: application/json' \
  -d '{"passphrase":"client-localtest-123"}' | jq -r '.token')
export OPS_SESSION

curl -s -X POST "$BASE/requests/example" \
  -H 'content-type: application/json' \
  -H "X-Ops-Session: $OPS_SESSION" \
  -d '{}'
提示这一步等价于「Caller 调你」。看到 status: SUCCEEDED 说明 caller↔supervisor↔responder 三段链路全通。
05

写一份自己的 hotline registration

hotline 的真实部署形态是:一份 process 或 http 适配器 + input_schema / output_schema。supervisor 会把它存到 DELEXEC_HOME。

bash
本地 process 适配器(最快)
delexec-ops add-hotline \
  --type process \
  --hotline-id your.namespace.tool-name.v1 \
  --display-name "工作区摘要器" \
  --cmd "node ./my-tool/index.js" \
  --cwd "$PWD"
bash
HTTP 适配器(已有 web service)
delexec-ops add-hotline \
  --type http \
  --hotline-id your.namespace.tool-name.v1 \
  --display-name "工作区摘要器" \
  --url http://127.0.0.1:9000/run
提示生成的 registration draft 落在 $DELEXEC_HOME/hotline-registration-drafts/*.registration.json , 可以手动改 input_schema / output_schema / summary / examples 等字段。 如果 --cmd 使用相对路径,请同时传 --cwd 固定执行目录,避免 Responder 从别的目录重启后找不到脚本。
06

可选高级步骤:登记到自建 Platform · 提交审核

本地 OK 之后,只有在已经接入自建 Platform 或托管 Platform 时,才把 hotline 提交审核。Platform 会做 schema 校验和 review_test,确认合规后可被 Caller 发现。

bash
delexec-ops submit-review \
  --hotline-id your.namespace.tool-name.v1
json
幕后真实 POST body 形状(节选)
{
  "responder_id": "responder_xxx",
  "hotline_id": "your.namespace.tool-name.v1",
  "template_ref": "local.delegated-execution.workspace-summary.v1",
  "title": "工作区摘要器",
  "summary": "把指定目录的代码状态摘要成一段话,给 Agent 用",
  "input_schema": {
    "type": "object",
    "required": ["text"],
    "properties": {
      "text": { "type": "string", "description": "用户提示" }
    }
  },
  "output_schema": {
    "type": "object",
    "required": ["summary"],
    "properties": {
      "summary": { "type": "string", "description": "工作区摘要" }
    }
  }
}
注意没有自建 Platform?也行。你的 hotline 仍然可以在本机或企业内 Selfhost 模式下被 Caller 调用, 此时它走的是 supervisor 的私有 catalog,不需要公网连接。
07

OPC #0 生产演练:提交到 callanything.xyz

如果你正在参加公开生产演练,使用线上 Platform endpoint,把 hotline_id 和 responder_id 交给 operator 审核;不要在聊天、issue 或文档里粘贴 API key。

bash
生产 Platform 提交审核
PLATFORM="https://callanything.xyz/platform"
RESPONDER_EMAIL="me"@"example.com"

delexec-ops auth register \
  --platform "$PLATFORM" \
  --email "$RESPONDER_EMAIL"

delexec-ops enable-responder \
  --display-name "Acme Workspace Tools"

delexec-ops add-hotline \
  --type process \
  --hotline-id your.namespace.tool-name.v1 \
  --display-name "工作区摘要器" \
  --cmd "node ./my-tool/index.js" \
  --cwd "$PWD" \
  --fixed-price-cents 50 \
  --currency PTS \
  --billing-disclosure-url "https://callanything.xyz/marketplace/responders/your-namespace"

delexec-ops submit-review \
  --hotline-id your.namespace.tool-name.v1

delexec-ops status
bash
审核通过后:用公网 Relay 保持 Responder 在线
RELAY="https://callanything.xyz/relay"
export TRANSPORT_TYPE="relay_http"
export TRANSPORT_BASE_URL="$RELAY"

# 前台运行:适合第一次看日志
delexec-ops start

# 或长运行:适合 SSH / 临时 shell 退出后继续接任务
mkdir -p "$DELEXEC_HOME/logs"
nohup env \
  TRANSPORT_TYPE="relay_http" \
  TRANSPORT_BASE_URL="$RELAY" \
  delexec-ops start \
  > "$DELEXEC_HOME/logs/public-relay-responder.log" 2>&1 &
bash
公开可见性检查
curl -s "https://callanything.xyz/marketplace/hotlines" | jq
curl -s "$PLATFORM/v1/catalog/hotlines/your.namespace.tool-name.v1" | jq
提示operator handoff:提交后把 responder_id hotline_id、draft 里的 pricing_hint 和联系方式交给 operator。 operator 需要完成审批、启用和 Caller 充值;如果公开 /console/还没有开放完整运营面,就走 operator 提供的人工通道。审核通过后,Responder 必须用 relay_http 指向 https://callanything.xyz/relay 保持本机适配器在线。
08

检查在线状态

供给方关心的另一件事:你这根 hotline 是不是真的在响应。supervisor 提供整体状态视图,Console 里有更细的健康灯。

bash
delexec-ops status

# 或 HTTP 直查
curl -s "$BASE/responder" -H "X-Ops-Session: $OPS_SESSION" | jq

下一步

你已经有一根本地可调用的 hotline draft。从这里推荐两条路:

把 hotline 设计好

input_schema / output_schema / examples / 风险标签 决定了 Caller 能不能把你的能力用得稳。

体验 Caller 视角

做能力的人也该自己当一次 Caller。换条路 5 分钟看看协议从 Agent 那一端长什么样。

Responder FAQ

Responder Quick Start 常见问题

这些问题覆盖了发布第一根 Hotline 时最常见的决策点:要不要接 Platform、什么时候提交审核、哪些字段最关键。

Responder Quick Start 会教什么?

它会带你从安装 client、启用 responder 角色、跑通 example hotline,到新增自己的 hotline draft 并提交 Marketplace 审核,完成供给方最小闭环。

没有 Platform 也能发布 Hotline 吗?

可以。没有 Platform 时,你仍然可以在本机或自托管环境中通过 supervisor 私有 catalog 暴露热线能力,只是不会进入公网 Marketplace。

写 Hotline 时最关键的字段是什么?

最关键的是 summary、input_schema、output_schema、示例和风险说明。它们直接决定 Caller 是否理解你的能力、能否稳定调用,以及 Marketplace 审核是否容易通过。