rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:ycegg/dsh-a2a-doorbell
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A small bridge that lets two separately running DeepSeek Harness (DSH) instances hand a note to each other — so you don't have to copy-paste between machines anymore.
It does one thing: exposes a local HTTP endpoint on a DSH host. Anything that can send a POST request (a cron job, a script, another DSH instance) can drop a line into one of its sessions, and the agent starts working on it.
It is not an A2A protocol implementation, not an official feature, and not "AIs talking to each other on their own". It is a minimal, local, token-guarded note-passer.
DSH officially supports one host, many clients — serve the Web UI over a reverse proxy and several machines share a single DSH (public deployments, API Gateway).
Agent-to-agent messaging inside DSH requires the same runtime and the same subagent tree — subagent providers are "trusted same-process implementations" (subagent reference).
So if you run two independent DSH instances (say a Mac and a Windows box), there is no ready-made channel between them. The usual workaround is a human relaying text between the two windows.
This plugin patches that one hop.
There is an official remote API (@Remote({ name: 'prompt' })) that lets a client send a message to a session over the Gateway. Using it means running the Gateway, configuring peer permissions and writing your own caller. This plugin is the smallest possible version of that path — one local endpoint and one token — at the cost of authentication and delivery guarantees.
dsh plugin --profile web add github:ycegg/dsh-a2a-doorbell
Restart DSH (or wait for hot reload). The endpoint listens on 127.0.0.1:8911. Install it on both machines.
# health
curl http://127.0.0.1:8911/ping
# {"ok":true,"ready":true,"liveCount":1,"defaultTarget":"session-xxxx"}
# ring
curl -X POST http://127.0.0.1:8911/ring \
-H "X-A2A-Token: <your-token>" \
-H "Content-Type: application/json" \
-d '{"text":"Mac finished the analysis; conclusion is plan A, continue with it"}'
# target a specific session
curl -X POST http://127.0.0.1:8911/ring \
-H "X-A2A-Token: <your-token>" \
-d '{"text":"...","sessionId":"session-abcdef"}'
Delivery is immediate (the message is in the session when the call returns); how long the agent takes is up to the model and the task.
| Side | Config |
|---|---|
| Receiver | host: "0.0.0.0" and a strong token |
| Sender | POST to http://<receiver-ip>:8911/ring |
0.0.0.0exposes the port to your LAN. Set a token. Do not expose it to the internet.
| Limitation | Detail |
|---|---|
| Plain HTTP | Not encrypted on the LAN. Use TLS or an SSH tunnel over untrusted networks |
| Token only | No signing, no expiry, no rate limiting |
| No retry, no persistence | If the receiver is down, the message is lost |
| Unicast only | Point-to-point; no broadcast |
| Long messages get truncated | DSH truncates injected messages at roughly 1300–1500 characters; a chunking convention is included |
| Not model-driven | Your script decides who rings whom |
For content above the truncation limit, PROTOCOL.md defines a small convention: an [A2A 分片头] header (id / n / total_bytes / md5), then n chunks of ≤900 characters, then an md5-verified acknowledgement.
It is our own convention, not a standard — the receiving side must implement the same convention.
MIT
为了避免误会,先划掉几个帽子:
| 不是 | 说明 |
|---|---|
| ❌ 不是 A2A 协议实现 | 只是本地 HTTP 接口 + token,没有遵循任何规范 |
| ❌ 不是让"AI 之间自由对话" | 它只负责把一段文字递进对方会话,剩下全靠对方的 AI |
| ❌ 不是官方功能 | 社区插件,与 DeepSeek 官方无关 |
| ❌ 不解决认证与重试 | 只有 token;没有队列、没有断线重连、没有持久化 |
| ❌ 单机用户不需要 | 一台机器、一个人用,装它没有意义 |
结论先说:官方支持「一个 DSH,多个客户端」;但没有「两个独立 DSH 互相发消息」的通道。
按官方文档:
sendMessage 要求 同一 runtime、同一棵 subagent 树,且 provider 是"same-process implementations"。跨进程 / 跨机器不在其范围内。一个需要说明的例外:官方确实有「客户端给会话发消息」的远程 API(子代理文档里的 @Remote({ name: 'prompt' }))。也就是说,理论上你可以写一个客户端,通过 Gateway 给远端 Host 的某个 session 发消息。
但那属于 API 层:要起 Gateway、配 peer 权限、自己写调用方。对"我就是想让两台机器互相递句话"来说,成本明显偏高——这个插件是把这条链路压到最简的一版(一个本地接口 + 一个 token),代价是没有认证体系和可靠性保证。
于是真实场景是这样的:
Mac 上的 DSH 跑完一段分析 → 结论要交给 Windows 上的 DSH 继续做
↓
官方没有现成通道
↓
只能:你复制 → 切窗口 → 粘贴
↓
你成了两台机器之间的消息总线
人当总线的问题不在于慢,而在于:
这个插件就是把这一跳补上:
┌────────────────┐ POST /ring ┌────────────────┐
│ Mac · DSH Host │ ──────────────▶ │ Win · DSH Host │
└────────────────┘ └────────────────┘
▲ │
└──────── 回传也是同一个接口 ─────────┘
在 DSH 里起一个本地 HTTP 接口,收到请求就把这段文字当成一条用户消息注入到某个会话里。
curl -X POST http://127.0.0.1:8911/ring \
-H "X-A2A-Token: <你的 token>" \
-H "Content-Type: application/json" \
-d '{"text":"Mac 那边算完了,结论是 A 方案,你按这个继续"}'
对面 DSH 的 AI 会像收到你打的字一样,开始处理。
注入是即时的(HTTP 返回 200 时消息已经进会话),之后 AI 怎么处理取决于模型和任务。
dsh plugin --profile web add github:ycegg/dsh-a2a-doorbell
装完重启 DSH(或等热加载),127.0.0.1:8911 会起来。两台机器各装一次。
curl http://127.0.0.1:8911/ping
{"ok":true,"name":"a2a-doorbell","port":8911,"ready":true,
"liveCount":1,"liveIds":["session-xxxx"],"defaultTarget":"session-xxxx"}
liveCount = 对面有几个活跃会话,defaultTarget = 不指定时会注入到哪个。
curl -X POST http://127.0.0.1:8911/ring \
-H "X-A2A-Token: <token>" \
-H "Content-Type: application/json" \
-d '{"text":"昨天那个报表我算完了,数据在共享盘的 report.csv"}'
curl -X POST http://127.0.0.1:8911/ring \
-H "X-A2A-Token: <token>" \
-d '{"text":"...","sessionId":"session-abcdef"}'
| 机器 | 配置 |
|---|---|
| 被叫方 | host: "0.0.0.0",必须配一个强 token |
| 发起方 | 请求发到 http://<被叫方 IP>:8911/ring |
⚠️
0.0.0.0意味着同网段都能访问;一定要配 token,不要暴露到公网。
用之前请确认你能接受这些:
| 限制 | 说明 |
|---|---|
| 明文 HTTP | 局域网内不加密。跨不可信网络请自己套 TLS 或 SSH 隧道 |
| 只有 token 认证 | 没有签名、没有过期、没有限流 |
| 无重试 / 无持久化 | 对方没开,这条就丢了;HTTP 失败自己重发 |
| 单播 | 只能点对点,不能广播给多台 |
| 长消息会截断 | DSH 注入层实测在约 1300~1500 字处截断,见下面的分片协议 |
| 不是模型自己决策 | 谁给谁递话,由你的脚本决定,不是 AI 自己找对方 |
为了让超过截断线的长内容也能递过去,仓库里附带一套很朴素的分片约定(见 PROTOCOL.md):
先发「分片头」:id / n / total_bytes / md5 / ts
再发 n 条「分片 k/n」:每片 ≤900 字
接收方收满 → 校验 md5 → 回一条回执
它解决两件事:长度,以及多条消息之间被别的消息插队。
但要说清楚:这是我们自己定的约定,不是标准;接收端得也按这个约定实现才有效。
插件目录里常常解析不到 @deepseek-ai/dsh-llm,直接 import 会让插件 ready:false。
所以本插件优先用宿主的 createUserMessage,拿不到就用本地等价实现:
deepFreeze(structuredClone({ ...input, role: "user", id: randomUUID() }))
插件进程里没有 DSH_SESSION_ID,所以按顺序找:
请求里的 sessionId → 配置里的 → 环境变量 → 活跃会话里最近使用的 "session-" 主会话
host 默认 127.0.0.1。要跨机器必须你手动改,并且自己负责 token。
{
"port": 8911,
"host": "127.0.0.1",
"token": "换成你自己的随机串",
"sessionId": "(可选)默认注入到哪个会话"
}
| 字段 | 默认 | 说明 |
|---|---|---|
port |
8911 |
监听端口 |
host |
127.0.0.1 |
只本机;跨机器改 0.0.0.0 |
token |
随机生成 | 请求头 X-A2A-Token;不配就每次启动随机,日志会打印 |
sessionId |
自动挑选 | 不配就选最近活跃的主会话 |
适合:
不适合:
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek。