dsh-plugin-subagent-bridge 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.js +11 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -219,7 +219,7 @@ mkdir -p ~/.dsh/skills && cp -R skills/delegate-to-codex ~/.dsh/skills/
219
219
  node --test "test/*.test.mjs"
220
220
  ```
221
221
 
222
- 50 项:握手与版本协商、通知处理、工具清单、未知方法与未知工具、参数校验、元数据列表不含消息内容、派发调用形状、拒绝与错误透出、结果读取的时间基线、未派发会话的拒绝、长轮询(文本晚到即返回 / 超时 / 调用方取消)、真实 HTTP 往返(含 404/405/202 与 bearer 分支)、`codex exec` 事件解析、二进制解析、成功/失败/超时三种运行结果、resume 的参数分叉、工具结果的 lossless JSON 约束、**只回最终回答**(多步叙述被丢弃)、`dsh_wait` 的任一完成 / 超时 / 错误 / 未派发四种状态、`dsh_spawn` 立即返回与注册、`fork_turns=all` 走 fork、并发上限与 `dsh_close` 释放名额、`dsh_followup` 的重基线与最终回答切换、注册表落盘与重启后复原、冷会话下的缓存回答与 `offline` 状态、注册表 200 条上限的淘汰顺序、`maxHops` 拒绝回派而放行首层、在飞链路阻塞嵌套派发、速率突发的拒绝与窗口过期、followup 计入同一预算。
222
+ 51 项:握手与版本协商、通知处理、工具清单、未知方法与未知工具、参数校验、元数据列表不含消息内容、派发调用形状、拒绝与错误透出、结果读取的时间基线、未派发会话的拒绝、长轮询(文本晚到即返回 / 超时 / 调用方取消)、真实 HTTP 往返(含 404/405/202 与 bearer 分支)、`codex exec` 事件解析、二进制解析、成功/失败/超时三种运行结果、resume 的参数分叉、工具结果的 lossless JSON 约束、**只回最终回答**(多步叙述被丢弃)、`dsh_wait` 的任一完成 / 超时 / 错误 / 未派发四种状态、`dsh_spawn` 立即返回与注册、`fork_turns=all` 走 fork、并发上限与 `dsh_close` 释放名额、`dsh_followup` 的重基线与最终回答切换、注册表落盘与重启后复原、冷会话下的缓存回答与 `offline` 状态、注册表 200 条上限的淘汰顺序、`maxHops` 拒绝回派而放行首层、在飞链路阻塞嵌套派发、速率突发的拒绝与窗口过期、followup 计入同一预算、握手版本号取自 `package.json`(不再硬编码)。
223
223
  `test/persistence.test.mjs` 单独覆盖持久化:文件权限 0600、缺失/损坏/畸形记录、spawn 返回时文件已落盘、完成即缓存、followup 清缓存、close 后重启仍为 closed、冷会话走缓存或 `offline`、并发写不串。
224
224
 
225
225
  ---
package/index.js CHANGED
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
  import { spawn } from 'node:child_process'
16
- import { existsSync } from 'node:fs'
16
+ import { existsSync, readFileSync } from 'node:fs'
17
17
  import { createServer } from 'node:http'
18
18
  import { randomBytes, randomUUID, timingSafeEqual } from 'node:crypto'
19
19
  import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'
@@ -22,6 +22,15 @@ import { dirname, join } from 'node:path'
22
22
 
23
23
  export const name = 'subagent-bridge'
24
24
 
25
+ /** Version advertised in the MCP handshake, read from the manifest so it cannot drift. */
26
+ const PACKAGE_VERSION = (() => {
27
+ try {
28
+ return JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8')).version ?? '0.0.0'
29
+ } catch {
30
+ return '0.0.0'
31
+ }
32
+ })()
33
+
25
34
  /** MCP protocol revisions this server understands, newest first. */
26
35
  const PROTOCOL_VERSIONS = ['2025-06-18', '2025-03-26', '2024-11-05']
27
36
 
@@ -433,7 +442,7 @@ export async function handleJsonRpc(message, api, options = {}) {
433
442
  return ok(id, {
434
443
  protocolVersion: version,
435
444
  capabilities: { tools: { listChanged: false } },
436
- serverInfo: { name: 'dsh-subagent-bridge', version: '0.5.0' },
445
+ serverInfo: { name: 'dsh-subagent-bridge', version: PACKAGE_VERSION },
437
446
  })
438
447
  }
439
448
  case 'ping':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-subagent-bridge",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "description": "Subagent bridge: lets Codex delegate a task to DeepSeek Harness the way it would spawn a subagent (one call, waits for the answer), plus a codex_dispatch tool for the reverse direction.",
6
6
  "keywords": [