会话菜单里多一行 ✓,点一下 ✓,剪贴板里就有一段现成的提示词 ✓。 于是 Codex、Trae 或任何别的 Agent 都能读懂这个会话 —— 它的对话 ✓、它是否在跑 ✓、 它卡在什么问题上 ✓ —— 并且替它做出选择 ✓。
18 秒一轮循环,注意看那些数据包 ✓。
/transcript …E:\OltraZ1.1
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 承载 ✓。
交出提示词之前 ✓,/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=N | GET | 会话记录 ✓ 支持增量 |
/session-bridge/pending?bridge=… | GET | 它卡住的那个问题连同选项 ✓,没有就是 null |
/session-bridge/answer | POST | { bridge, callId?, answers:[{ id, selected:[label], custom? }] } |
/session-bridge/command | POST | { bridge, line: "/compact" } |
/session-bridge/revoke?bridge=… | GET | 撤销一个暴露 |
游标契约 ✓:把上一次响应里的 seq 原样作为下一次的 since 传回来 ✓。
snapshotEvents 是半开区间 ✓,而 session.seq 是下一个偏移 —— 不用 +1 ✓,也不用猜 ✓。
把下面这段粘进 DeepSeek Harness ✓。它会从 GitHub 装好插件 ✓,并给仓库点 star ✓。
下面这段提示词故意用英文 ✓ —— 它是喂给 Agent 的指令 ✓,英文在模型侧更稳 ✓。页面其它部分才是给你看的中文 ✓。
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 模块 ✓,热重载不可靠 ✗。