@deepseek-ai/dsh-tool-subagent-control 0.0.1-rc.2 → 0.0.1-rc.3

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.
package/README.i18n.yaml CHANGED
@@ -3,4 +3,4 @@
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/subagent/tool-subagent-control/README.md
5
5
  README.md: 91f8d23ac092049e5315418070cdaae025054860
6
- README.zh.md: 981e3f4efa2a904918d3f4174a2188fc2965c626
6
+ README.zh.md: 66d4b5a446fc9e412c5fec7bccf27bdefd1f5f77
package/README.zh.md CHANGED
@@ -4,9 +4,9 @@
4
4
 
5
5
  可选的全局具名 `send_message`、`interrupt_agent` 与 `list_agents` 工具是 `ctx.subagents` 之上的轻量适配器。绑定提供方的 `@deepseek-ai/dsh-tool-subagent` 实例会为每种传输注册不同的委派工具;这个单独加载的包只注册一次共享控制工具,因此多个委派工具绝不会重复注册全局控制工具。根插件注册 `send_message` 与 `interrupt_agent`,且只要求 `subagents`;可单独加载的 `./list-agents` 插件注册 `list_agents`,并将 `subagents` 与 `agents` 声明为加载时依赖。其目录读取在调用时还要求会话存储与投影注册表,但不要求任何查询服务。部署可保留根插件工具并省略列表工具。是否加载这些工具不会决定委派工具是否启动可继续工作。这些工具只负责父到子的方向;单独安装的 [`@deepseek-ai/dsh-tool-subagent-report`](../tool-subagent-report/README.md) 负责子到父的方向。
6
6
 
7
- 本工具不执行生命周期路由:驻留与冷恢复归 subagent 服务所有。它将 `exec.agent` 作为授权投递的确切在线父级传入,并把每条消息的来源记录为 `{ kind: 'coordinator', senderSessionId: parent.id }`;服务会保留该来源,但绝不将其视为权限。每条消息都会通过 `Agent.followup()` 成为子 agent(智能体)的下一个 FIFO 轮次:如果子 agent 仍在工作,该消息会等待其当前轮次结束,因此无法重定向已经在进行的工作。本工具会转发其执行信号,该信号只在 inbox 接受之前掌管准入;一旦子 agent 接受消息,已接受的轮次便无法再通过本工具取消。本次调用不会返回子 agent 的回复;通过该 id 查看其 transcript(文本记录),才是了解它完成了哪些工作的真源。拥有 `report` 的子 agent 会自行把内容作为一条单独的父级消息发回。投递失败会变为出错的工具结果,并明确说明消息未送达。
7
+ 本工具不执行生命周期路由:驻留与冷恢复归 subagent 服务所有。它将 `exec.agent` 作为授权投递的确切在线父级传入,并把每条消息的来源记录为 `{ kind: 'coordinator', senderSessionId: parent.id }`;服务会保留该来源,但绝不将其视为权限。每条消息都会通过 `Agent.followup()` 成为 subagent 的下一个 FIFO 轮次:如果子 agent(智能体)仍在工作,该消息会等待其当前轮次结束,因此无法重定向已经在进行的工作。本工具会转发其执行信号,该信号只在 inbox 接受之前掌管准入;一旦子 agent 接受消息,已接受的轮次便无法再通过本工具取消。本次调用不会返回子 agent 的回复;通过该 id 查看其 transcript(文本记录),才是了解它完成了哪些工作的真源。拥有 `report` 的子 agent 会自行把内容作为一条单独的父级消息发回。投递失败会变为出错的工具结果,并明确说明消息未送达。
8
8
 
9
- `interrupt_agent(agent_id)` 将 `exec.agent` 作为 `ctx.subagents.interrupt()` 的确切在线 ancestor 授权传入:目标可以是直接 child 或更深的后代,由服务——而不是本工具——依据目标 Activation 记录的 lineage 校验调用方。只有目标的当前轮次会停止(`keepInbox`):已排队的消息保持暂停直到之后的 `send_message`,已发布的后代继续运行,child 也仍可接受后续消息。调用在停止请求被接受后立即返回,不等待目标完全停稳;目标不存在或已结算是被接受的 no-op,而 self、sibling、过期与非 ancestor 调用方会成为出错结果。
9
+ `interrupt_agent(agent_id)` 将 `exec.agent` 作为 `ctx.subagents.interrupt()` 的确切在线 ancestor 授权传入:目标可以是直接 child 或更深的后代,由服务——而不是本工具——依据目标 Activation 记录的 lineage 校验调用方。只有目标的当前轮次会停止(`keepInbox`):已排队的消息保持暂停直到之后的 `send_message`,已发布的后代继续运行,child 也仍可接受后续消息。调用在停止请求被接受后立即返回,不等待目标完全停稳;目标不存在或已结算是被接受的 no-op,而 self、sibling、陈旧与非 ancestor 调用方会成为出错结果。
10
10
 
11
11
  `list_agents` 接受一个可选的 `scope` 参数,会从调用它的 agent 推导根 id,并且不使用 cursor,将服务目录投影为可继续 child。默认的 `children` scope 读取 `ctx.subagents.listChildren()`;`descendants` 读取 `ctx.subagents.listDescendants()`,其单份语料的遍历会穿过普通会话与一次性 child,并按稳定 pre-order 以 `parent=<id> depth=<n>` 渲染保留下来的条目。`parent` 注释是持久化直接 parent 会话 id,可能指向输出中省略的普通会话。对于调用本工具的 agent,只有 depth-1 child 条目可作为 `send_message` 候选;更深的 child 条目只能作为 `interrupt_agent` 候选。状态来自在线 Agent 注册表:`running`(driver 活跃)、`idle`(驻留但处于轮次之间,可能在等待它启动的 agent)或 `ready`(仅存于存储,表示可恢复而非终态)。服务结果还包含由会话支撑的一次性 subagent,以供 UI 等消费方使用;但这些条目无法接受 `send_message`,因此会从这个模型工具中排除。diagnostic 仍然可见,并在 descendants scope 中带有位置。持久化身份和模式来自每个子 agent 的描述符,消息送达时的鉴权和 Activation 所有权检查仍归服务负责。
12
12
 
@@ -16,7 +16,7 @@
16
16
 
17
17
  #### 模型看到的内容
18
18
 
19
- 已生成的 [schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-subagent-control):`send_message` 包含 `subagent_id` 和 `message`,说明消息会成为子 agent 的下一个轮次、本次调用不会返回子 agent 的回答,以及失败即表示消息未送达;`interrupt_agent` 包含 `agent_id`,说明只有当前轮次会停止、已排队消息保持暂停、后代继续运行,以及接受先于实际停止;`list_agents` 包含可选的 `scope` 枚举。
19
+ 已生成的 [schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-subagent-control):`send_message` 包含 `subagent_id` 和 `message`,说明消息会成为 subagent 的下一个轮次、本次调用不会返回 subagent 的回答,以及失败即表示消息未送达;`interrupt_agent` 包含 `agent_id`,说明只有当前轮次会停止、已排队消息保持暂停、后代继续运行,以及接受先于实际停止;`list_agents` 包含可选的 `scope` 枚举。
20
20
 
21
21
  #### Token 影响
22
22
 
@@ -30,7 +30,7 @@
30
30
 
31
31
  #### 模型看到的内容
32
32
 
33
- 接受时返回 `interrupt requested for agent <agent_id>`。未授权的调用方——self、sibling、过期或非 ancestor——会成为指明拒绝原因的出错结果;目标不存在或已结算仍渲染接受行。
33
+ 接受时返回 `interrupt requested for agent <agent_id>`。未授权的调用方——self、sibling、陈旧或非 ancestor——会成为指明拒绝原因的出错结果;目标不存在或已结算仍渲染接受行。
34
34
 
35
35
  #### Token 影响
36
36
 
@@ -70,7 +70,7 @@
70
70
 
71
71
  ## 已知限制与暂缓事项
72
72
 
73
- - **已排队的消息没有独立结果**:接受时只返回其 inbox `messageId`;子 agent 的工作会落入持久化子 agent 会话,绝不会通过本工具收集。获得 `report` 的子 agent 可以单独发回选定内容,但该消息不是本次调用的结果。
73
+ - **已排队的消息没有独立结果**:接受时只返回其 inbox `messageId`;subagent 的工作会落入持久化子 agent 会话,绝不会通过本工具收集。获得 `report` 的子 agent 可以单独发回选定内容,但该消息不是本次调用的结果。
74
74
  - **不对当前轮次进行 steering(中途引导)**:每条消息都会开启后续 FIFO 轮次,因此在子 agent 工作时发送的消息只会在其当前轮次结束后运行,无法将其重定向。
75
75
  - **列表是快照,而非投递承诺**:它可能与发布、dispose(资源释放)或后续消息发生竞态,另一个进程也可能激活当前进程报告为 `ready` 的 child;跨进程准确性需要共享租约。`interrupt_agent` 自己执行权威的在线 lineage 检查,因此过期的发现结果不会授予权限。
76
76
  - **没有分页或删除**:系统返回完整且稳定排序的集合;只要 child 会话仍在持久化存储中,它就会继续出现在列表中,服务级上限或删除操作留待后续产品决策。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-tool-subagent-control",
3
3
  "description": "Globally named send_message, interrupt_agent, and list_agents tools over ctx.subagents continuations",
4
- "version": "0.0.1-rc.2",
4
+ "version": "0.0.1-rc.3",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },
@@ -37,26 +37,26 @@
37
37
  ],
38
38
  "license": "BSD-3-Clause",
39
39
  "peerDependencies": {
40
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
41
- "@deepseek-ai/dsh-session": "^0.0.1-rc.2",
42
- "@deepseek-ai/dsh-tools": "^0.0.1-rc.2",
43
- "@deepseek-ai/cordis": "^4.0.1-rc.1",
44
- "@deepseek-ai/dsh-subagent": "^0.0.1-rc.2",
45
- "@deepseek-ai/dsh-llm": "^0.0.1-rc.2"
40
+ "@deepseek-ai/dsh-llm": "^0.0.1-rc.3",
41
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.3",
42
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.3",
43
+ "@deepseek-ai/dsh-subagent": "^0.0.1-rc.3",
44
+ "@deepseek-ai/dsh-tools": "^0.0.1-rc.3",
45
+ "@deepseek-ai/cordis": "^4.0.1-rc.1"
46
46
  },
47
47
  "devDependencies": {
48
- "@deepseek-ai/dsh-agent": "^0.0.1-rc.2",
49
- "@deepseek-ai/dsh-agent-loop-testkit": "^0.0.1-rc.2",
50
- "@deepseek-ai/dsh-agent-loop": "^0.0.1-rc.2",
51
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
52
- "@deepseek-ai/dsh-llm": "^0.0.1-rc.2",
53
- "@deepseek-ai/dsh-session": "^0.0.1-rc.2",
54
- "@deepseek-ai/dsh-session-persistence": "^0.0.1-rc.2",
55
- "@deepseek-ai/dsh-session-persistence-jsonl": "^0.0.1-rc.2",
56
- "@deepseek-ai/dsh-session-projection": "^0.0.1-rc.2",
57
- "@deepseek-ai/dsh-subagent": "^0.0.1-rc.2",
58
- "@deepseek-ai/dsh-subagent-spawn": "^0.0.1-rc.2",
59
- "@deepseek-ai/dsh-tools": "^0.0.1-rc.2",
48
+ "@deepseek-ai/dsh-agent": "^0.0.1-rc.3",
49
+ "@deepseek-ai/dsh-agent-loop": "^0.0.1-rc.3",
50
+ "@deepseek-ai/dsh-agent-loop-testkit": "^0.0.1-rc.3",
51
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.3",
52
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.3",
53
+ "@deepseek-ai/dsh-llm": "^0.0.1-rc.3",
54
+ "@deepseek-ai/dsh-session-persistence": "^0.0.1-rc.3",
55
+ "@deepseek-ai/dsh-session-persistence-jsonl": "^0.0.1-rc.3",
56
+ "@deepseek-ai/dsh-session-projection": "^0.0.1-rc.3",
57
+ "@deepseek-ai/dsh-subagent": "^0.0.1-rc.3",
58
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "^0.0.1-rc.3",
59
+ "@deepseek-ai/dsh-tools": "^0.0.1-rc.3",
60
60
  "@deepseek-ai/cordis": "^4.0.1-rc.1"
61
61
  }
62
62
  }