DeepSeek Harness 插件 · MIT

把一个会话交给 另一个 Agent

会话菜单里多一行 ✓,点一下 ✓,剪贴板里就有一段现成的提示词 ✓。 于是 Codex、Trae 或任何别的 Agent 都能读懂这个会话 —— 它的对话 ✓、它是否在跑 ✓、 它卡在什么问题上 ✓ —— 并且替它做出选择 ✓。

127.0.0.1:19388 不要 cookie · 不要 header · URL 本身就是凭证 测试 31/31
安装 接口 原理

它做了什么

18 秒一轮循环,注意看那些数据包 ✓。

DeepSeek Harness

●渲染内核迁移⋯
●官网更新⋯
●多核渲染⋯
✓ 已复制 —— 交接提示词在剪贴板里
GET /infoGET /info
GET /transcriptGET /transcript?since=0
GET /pendingGET /pending
POST /answerPOST /answer
session-bridge
127.0.0.1:19388
只读 /info /status /transcript /pending
可写 /answer /command

Codex / Trae

AI 外部 Agent
已粘入交接提示词 ✓
先读 → 再决定 → 然后停
正在读 /transcript …
128 条事件 · 工作目录 E:\OltraZ1.1
有未提交的改动,该怎么处理?
用 --allow-dirty 强发
✓ 先提交,再发布
✓ 已向用户汇报 —— 停下

1 · 鼠标划过会话行,点开它的 ⋯ 菜单。

2 · 选 暴露会话 —— 系统只为这一个会话铸造一座桥。

3 · 交接提示词落进剪贴板 ✓,没有任何需要你手动复制的 token ✓。

4 · 把它粘给 Codex / Trae ✓ —— 那个 URL 本身就是凭证 ✓。

5 · 它依次读 /info → /transcript → /pending ✓,看到了那个待答问题 ✓。

6 · 它用 POST /answer 做出选择 ✓ —— 会话继续跑 ✓ —— 然后向你汇报并停下 ✓。

为什么这样设计

这个插件存在的意义,就是绕开两个坑 ✓。

⇄

自己起监听

DSH 自己的 web server 对外部调用者只有两种回应:不在 /api 下给 404 ✓, 在 /api 下给 401 unauthorized ✗。所以这座桥自己起了一个 node:http 监听,只绑环回 ✓,能力由 URL 承载 ✓。

✓

真 socket 自检

交出提示词之前 ✓,/expose 会通过真实 TCP 连接去请求自己那个 URL ✓。 不是 200 就不复制提示词 ✗ —— 你拿到的是状态码 ✓,而不是一条死链 ✗。

■

它会叫对方停下

提示词里写得很明确 ✓:先读 ✓、汇报 ✓、停下 ✓。不要去反查鉴权实现 ✗、不要猜别的 URL ✗、 不要扫端口 ✗ —— 那是死胡同 ✓,只会烧光额度 ✗。

接口

全部可以用 curl 直接打 ✓。不要 cookie ✓、不要 header ✓、不要 token ✓。

路由方法作用
/session-bridge/expose?sessionId=…GET铸造(或复用)一个暴露 ✓,返回发现文档 + 交接提示词
/session-bridge/info?bridge=…GET发现文档 —— 工作目录 ✓、模型 ✓、seq ✓、各接口地址
/session-bridge/status?bridge=…GET还活着吗 ✓ 在跑吗 ✓ 当前 seq
/session-bridge/transcript?bridge=…&since=NGET会话记录 ✓ 支持增量
/session-bridge/pending?bridge=…GET它卡住的那个问题连同选项 ✓,没有就是 null
/session-bridge/answerPOST{ bridge, callId?, answers:[{ id, selected:[label], custom? }] }
/session-bridge/commandPOST{ bridge, line: "/compact" }
/session-bridge/revoke?bridge=…GET撤销一个暴露

游标契约 ✓:把上一次响应里的 seq 原样作为下一次的 since 传回来 ✓。 snapshotEvents 是半开区间 ✓,而 session.seq 是下一个偏移 —— 不用 +1 ✓,也不用猜 ✓。

安装

把下面这段粘进 DeepSeek Harness ✓。它会从 GitHub 装好插件 ✓,并给仓库点 star ✓。

下面这段提示词故意用英文 ✓ —— 它是喂给 Agent 的指令 ✓,英文在模型侧更稳 ✓。页面其它部分才是给你看的中文 ✓。

安装提示词 · install-prompt.txt
Install the DeepSeek Harness plugin `dsh-session-bridge` from the repository below, then star it.

repository: https://github.com/Ote65/dsh-session-bridge

1. Read the repository README first, then install it into the ACTIVE profile the same way
   that profile installs third-party bundles. On the desktop profile that is the plugin
   manager's bundle install - do not hand-edit the profile's config files.
2. Verify: the "..." menu of a session row in the left sidebar gains one more row.
   If the plugin manager reports "did not activate", stop and report the exact error
   instead of guessing at the configuration.
3. Once installed, star the repository on GitHub (for example
   `gh api -X PUT /user/starred/Ote65/dsh-session-bridge`) and say whether the star succeeded.

Do not push, publish, or open a pull request unless I ask.

提示词里的 OWNER 是仓库托管账号的占位符 ✓(发布脚本会自动替换 ✓)。 首次安装后请重启 DSH ✓:Host 半区是 Node 模块 ✓,热重载不可靠 ✗。