CALLANYTHING
Responder · 5 min

把能力变成
一根 HOTLINE

核心代码不出本地,对外只暴露 input / output schema,结果由 Responder 签名返回。下面这套命令把你的能力挂到本机 supervisor,再决定是否提交到 Marketplace 审核。

Local 起步Platform 可选支持 process / http

这页教你做什么

从 0 到「Marketplace 上有一根真正可被 Agent 调起的 hotline」

  • · 启动 supervisor + 注册账号
  • · 启用 Responder 角色
  • · 用内置 example hotline 跑通链路
  • · 写自己的 hotline registration draft
  • · submit-review 上 Marketplace · 看在线状态
01

安装 + 启动 supervisor

Responder 端的所有命令都跑在 client 子仓里。supervisor 会同时托管 caller、responder、ops console 三段进程。

bash
git clone --recursive https://github.com/hejiajiudeeyu/delegated-execution-dev.git
cd delegated-execution-dev/repos/client
npm install

export DELEXEC_HOME="$HOME/.delexec-responder"
export OPS_PORT_SUPERVISOR=8189
DELEXEC_HOME="$DELEXEC_HOME" \
OPS_PORT_SUPERVISOR="$OPS_PORT_SUPERVISOR" \
npm run ops -- start
注意如果你已经做过 Caller Quick Start,请用不同的 DELEXEC_HOME OPS_PORT_SUPERVISOR避免冲突;或者直接复用同一个 supervisor,Responder 和 Caller 本来就可以共存。
02

注册一个 Responder 账号

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

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

启用 Responder 角色

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

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

用 example hotline 验证链路

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

bash
npm run ops -- add-example-hotline

BASE="http://127.0.0.1:${OPS_PORT_SUPERVISOR:-8079}"
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 适配器(最快)
npm run ops -- add-hotline \
  --type process \
  --hotline-id your.namespace.tool-name.v1 \
  --display-name "工作区摘要器" \
  --command "node ./my-tool/index.js"
bash
HTTP 适配器(已有 web service)
npm run ops -- add-hotline \
  --type http \
  --hotline-id your.namespace.tool-name.v1 \
  --display-name "工作区摘要器" \
  --endpoint http://127.0.0.1:9000/run
提示生成的 registration draft 落在 $DELEXEC_HOME/hotline-registration-drafts/*.registration.json , 可以手动改 input_schema / output_schema / summary / examples 等字段。
06

登记到 Platform · 提交 Marketplace 审核

本地 OK 之后,把 hotline 提交到 Platform。Platform 会做 schema 校验和 review_test,确认合规后上 Marketplace。

bash
npm run 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,不进公网 Marketplace。
07

检查在线状态

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

bash
npm run ops -- status

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

下一步

你已经有一根能被 Agent 调用的 hotline。从这里推荐两条路:

把 hotline 设计好

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

体验 Caller 视角

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

Responder FAQ

Responder Quick Start 常见问题

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

Responder Quick Start 会教什么?

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

没有 Platform 也能发布 Hotline 吗?

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

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

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