@deepseek-ai/dsh-tool-subagent 0.1.0-rc.8 → 0.1.1-rc.2

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/README.md
5
5
  README.md: 28e6213b903ffffa7934e244b2a74ada519b32b2
6
- README.zh.md: deae0f0ff9e19b627a04704eccf4b8874f34068f
6
+ README.zh.md: 74e8896a152c787abd0aebf055d6e13f6158bcd3
package/README.zh.md CHANGED
@@ -10,9 +10,9 @@
10
10
 
11
11
  前台调用会让执行信号贯穿启动和执行,等待 `run.result`,并且在返回前总会等待 `run.dispose()`。只有 `completed` 会返回规范值 `{ kind: 'foreground', runId, output: JsonValue[] }`,并渲染为相同的最终文本。中止、拒绝、token 上限和其他失败都会变成出错的工具结果,其消息依次包含终止原因标题、可选的提供方 `SubagentResult.diagnostic`,以及子 agent 保留下来的部分 assistant 文本。诊断与 `SubagentResult.output` 保持分离,因此被截断的回答不会被报告为成功,也不会与基础设施说明混淆。如果结果收集与 dispose(资源释放)都 reject,出错结果会保留两项失败。
12
12
 
13
- `backgroundMode` 同时选择后台路由与省略 `run_in_background` 时的默认行为。`one-shot` 默认在前台等待;显式传入 `true` 时,它会注册一个归父级所有的普通 Task,并返回规范值 `{ kind: 'background', jobId }`,渲染为 `started background subagent job <id>`,即使提供方支持可继续子 agent 也不例外。通用 Task 工具负责其后续状态、收集、取消和通知;失败 Task 的 detail 会保留终止原因与同一份可选提供方诊断。`continuable` 在参数省略或为 `true` 时于后台运行;显式传入 `false` 时则在前台等待结果。其后台路由要求提供方具备 `prepareContinuable` 能力,调用 `ctx.subagents.startContinuable()`,并返回 `{ kind: 'continuable', subagentId }`,渲染为 `started subagent <childId>`。该路由在 inbox 接受时结算:子 agent 自此拥有自己的轮次,因此该调用既不等待也不收集结果。通过该 id 查看其 transcript(文本记录)仍是其详细输出的来源,可选的全局 `send_message` 工具则向其发送更多工作。每当子 agent 的 Activation 结束,继续执行服务都会投递一条结算通知,其中包含结束结果及可能存在的最终 assistant 消息,且这项投递不依赖 `report`。启动可继续工作不要求加载 `send_message`。见[后台 subagent Agent Note](../../../.agents/notes/implemented/feature/2026-07-08-background-subagent-tasks.md)、[可继续的 subagent Agent Note](../../../.agents/notes/implemented/feature/2026-07-28-continuable-subagent-conversations.md)和[后台优先委派 Agent Note](../../../.agents/notes/implemented/feature/2026-08-11-background-first-continuable-delegation.md)。
13
+ `backgroundMode` 同时选择后台路由与省略 `run_in_background` 时的默认行为。`one-shot` 默认在前台等待;显式传入 `true` 时,它会注册一个归父级所有的普通 Task,并返回规范值 `{ kind: 'background', jobId }`,渲染为 `started background subagent job <id>`,即使提供方支持可继续子 agent 也不例外。通用 Task 工具负责其后续状态、收集、取消和通知;失败 Task 的 detail 会保留终止原因与同一份可选提供方诊断。`continuable` 在参数省略或为 `true` 时于后台运行;显式传入 `false` 时则在前台等待结果。其后台路由要求提供方具备 `prepareContinuable` 能力,调用 `ctx.subagents.startContinuable()`,并返回 `{ kind: 'continuable', subagentId }`,渲染为 `started subagent <childId>`。该路由在 inbox 接受时结算:子 agent 自此拥有自己的轮次,因此该调用既不等待也不收集结果。通过该 id 查看其 transcript(文本记录)仍是其详细输出的来源,可选的全局 `send_message` 工具则向其发送更多工作。每当子 agent 的 Activation 结束,继续执行服务都会投递一条结算通知,其中包含结束结果及可能存在的最终 assistant 消息,且这项投递不依赖 `report`。启动可继续工作不要求加载 `send_message`。见[后台 subagent Agent Note](../../../.agents/notes/implemented/feature/2026-07-08-background-subagent-tasks.zh.md)、[可继续的 subagent Agent Note](../../../.agents/notes/implemented/feature/2026-07-28-continuable-subagent-conversations.zh.md)和[后台优先委派 Agent Note](../../../.agents/notes/implemented/feature/2026-08-11-background-first-continuable-delegation.zh.md)。
14
14
 
15
- `toolFilter` 会改变子 agent 的全局工具层,但不是从父级派生的权限上限。见 [agent 作用域的安全非目标](../../../.agents/notes/implemented/architecture/2026-07-08-agent-scope-contexts.md#security-and-authority-are-non-goals)。
15
+ `toolFilter` 会改变子 agent 的全局工具层,但不是从父级派生的权限上限。见 [agent 作用域的安全非目标](../../../.agents/notes/implemented/architecture/2026-07-08-agent-scope-contexts.zh.md#security-and-authority-are-non-goals)。
16
16
 
17
17
  ## 配置
18
18
 
@@ -29,7 +29,7 @@
29
29
 
30
30
  ## 并发
31
31
 
32
- 前台调用和后台调用均并发安全:同一条 assistant 消息中的同级委派会在循环的滚动池(`maxParallelToolCalls`)下重叠执行,结果仍按模型顺序提交。子 agent 在各自的会话中工作,一次运行绝不变更父会话;一次性后台形态对父级拥有状态的唯一写入是注册一个 Task——这是一次同步、可交换、能容忍并发分发的插入,因此重叠的后台调用按分发竞态顺序获得各自的 job id。协调同级工作区效果由模型负责,正如模型已经对后台和可继续子 agent 所承担的那样。见 [并行 subagent Agent Note](../../../.agents/notes/implemented/feature/2026-08-09-parallel-subagent-delegations.md) 和 [并行工具调用 Agent Note](../../../.agents/notes/implemented/feature/2026-07-10-parallel-tool-call-execution.md)。
32
+ 前台调用和后台调用均并发安全:同一条 assistant 消息中的同级委派会在循环的滚动池(`maxParallelToolCalls`)下重叠执行,结果仍按模型顺序提交。子 agent 在各自的会话中工作,一次运行绝不变更父会话;一次性后台形态对父级拥有状态的唯一写入是注册一个 Task——这是一次同步、可交换、能容忍并发分发的插入,因此重叠的后台调用按分发竞态顺序获得各自的 job id。协调同级工作区效果由模型负责,正如模型已经对后台和可继续子 agent 所承担的那样。见 [并行 subagent Agent Note](../../../.agents/notes/implemented/feature/2026-08-09-parallel-subagent-delegations.zh.md) 和 [并行工具调用 Agent Note](../../../.agents/notes/implemented/feature/2026-07-10-parallel-tool-call-execution.zh.md)。
33
33
 
34
34
  ## 模型体验
35
35
 
@@ -37,7 +37,7 @@
37
37
 
38
38
  #### 模型看到的内容
39
39
 
40
- 当提供方存在时,以当前实例配置的名称公开已生成的默认 [`subagent` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-subagent)。提供方是否继承上下文会改变工具描述和提示词描述。启用后台模式会添加 `run_in_background`:可继续模式会记录其默认值为 `true`、运行时结算通知与显式前台覆盖;一次性模式会记录其默认值为 `false`,以及用 `job_output` 收集或用 `job_kill` 停止的 job id。当工具在本次组装的作用域中可见时,一个 `tool:<toolName>` 系统提示词 section 会指示模型同时启动相互独立的可继续委派、在它们运行时继续工作,并且仅当下一步动作依赖结果时选择前台;工具限制会同时移除其 schema 和这段指引。
40
+ 当提供方存在时,以当前实例配置的名称公开已生成的默认 [`subagent` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-subagent)。提供方是否继承上下文会改变工具描述和提示词描述。启用后台模式会添加 `run_in_background`:可继续模式会记录其默认值为 `true`、运行时结算通知与显式前台覆盖;一次性模式会记录其默认值为 `false`,以及用 `job_output` 收集或用 `job_kill` 停止的 job id。当工具在本次组装的作用域中可见时,一个 `tool:<toolName>` 系统提示词 section 会指示模型同时启动相互独立的可继续委派、在它们运行时继续工作,并且仅当下一步动作依赖结果时选择前台;工具限制会同时移除其 schema 和这段指引。
41
41
 
42
42
  #### Token 影响
43
43
 
@@ -65,7 +65,7 @@
65
65
 
66
66
  #### 模型看到的内容
67
67
 
68
- 在配置的可继续模式下,启动时返回内容恰为 `started subagent <childId>`;在配置的一次性模式下,则返回 `started background subagent job <id>`。一次性模式下,通用 Task 接口提供后续状态、最终输出、取消响应和通知;若结果携带提供方诊断,失败状态的 detail 会包含它。可继续模式下,本工具不返回自己的结果;子 agent 的结算会以[服务负责的通知](../subagent/README.md#settlement-notice)到达父级,独立加载的 `send_message` 工具会投递后续消息,而通过其 id 查看子 agent 的 transcript 即是其详细输出来源。
68
+ 在配置的可继续模式下,启动时返回内容恰为 `started subagent <childId>`;在配置的一次性模式下,则返回 `started background subagent job <id>`。一次性模式下,通用 Task 接口提供后续状态、最终输出、取消响应和通知;若结果携带提供方诊断,失败状态的 detail 会包含它。可继续模式下,本工具不返回自己的结果;子 agent 的结算会以[服务负责的通知](../subagent/README.zh.md#settlement-notice)到达父级,独立加载的 `send_message` 工具会投递后续消息,而通过其 id 查看子 agent 的 transcript 即是其详细输出来源。
69
69
 
70
70
  #### Token 影响
71
71
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-tool-subagent",
3
3
  "description": "Model-facing subagent delegation tool over the ctx.subagents seam",
4
- "version": "0.1.0-rc.8",
4
+ "version": "0.1.1-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -32,33 +32,33 @@
32
32
  ],
33
33
  "license": "MIT",
34
34
  "peerDependencies": {
35
- "@deepseek-ai/dsh-agent": "^0.1.0-rc.8",
36
- "@deepseek-ai/dsh-llm": "^0.1.0-rc.8",
37
- "@deepseek-ai/dsh-invariants": "^0.1.0-rc.8",
38
- "@deepseek-ai/dsh-system-prompt": "^0.1.0-rc.8",
39
- "@deepseek-ai/dsh-jobs": "^0.1.0-rc.8",
40
- "@deepseek-ai/dsh-subagent": "^0.1.0-rc.8",
41
- "@deepseek-ai/dsh-tools": "^0.1.0-rc.8",
42
- "@deepseek-ai/cordis": "^4.0.1"
35
+ "@deepseek-ai/dsh-agent": "^0.1.1-rc.2",
36
+ "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
37
+ "@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
38
+ "@deepseek-ai/dsh-subagent": "^0.1.1-rc.2",
39
+ "@deepseek-ai/dsh-system-prompt": "^0.1.1-rc.2",
40
+ "@deepseek-ai/dsh-jobs": "^0.1.1-rc.2",
41
+ "@deepseek-ai/cordis": "^4.0.1",
42
+ "@deepseek-ai/dsh-tools": "^0.1.1-rc.2"
43
43
  },
44
44
  "dependencies": {
45
45
  "@deepseek-ai/schemastery": "^3.18.1"
46
46
  },
47
47
  "devDependencies": {
48
- "@deepseek-ai/dsh-agent": "^0.1.0-rc.8",
49
- "@deepseek-ai/dsh-invariants": "^0.1.0-rc.8",
50
- "@deepseek-ai/dsh-llm": "^0.1.0-rc.8",
51
- "@deepseek-ai/dsh-session": "^0.1.0-rc.8",
52
48
  "@deepseek-ai/cordis-plugin-loader": "^1.0.2",
53
- "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.0-rc.8",
54
- "@deepseek-ai/dsh-session-persistence": "^0.1.0-rc.8",
55
- "@deepseek-ai/dsh-subagent": "^0.1.0-rc.8",
56
- "@deepseek-ai/dsh-subagent-spawn-in-process": "^0.1.0-rc.8",
57
- "@deepseek-ai/dsh-system-prompt": "^0.1.0-rc.8",
58
- "@deepseek-ai/dsh-jobs": "^0.1.0-rc.8",
59
- "@deepseek-ai/dsh-jobs-local": "^0.1.0-rc.8",
60
- "@deepseek-ai/dsh-tool-jobs": "^0.1.0-rc.8",
61
- "@deepseek-ai/cordis": "^4.0.1",
62
- "@deepseek-ai/dsh-tools": "^0.1.0-rc.8"
49
+ "@deepseek-ai/dsh-agent": "^0.1.1-rc.2",
50
+ "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
51
+ "@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
52
+ "@deepseek-ai/dsh-session": "^0.1.1-rc.2",
53
+ "@deepseek-ai/dsh-session-persistence": "^0.1.1-rc.2",
54
+ "@deepseek-ai/dsh-subagent": "^0.1.1-rc.2",
55
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "^0.1.1-rc.2",
56
+ "@deepseek-ai/dsh-system-prompt": "^0.1.1-rc.2",
57
+ "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.1-rc.2",
58
+ "@deepseek-ai/dsh-jobs": "^0.1.1-rc.2",
59
+ "@deepseek-ai/dsh-jobs-local": "^0.1.1-rc.2",
60
+ "@deepseek-ai/dsh-tool-jobs": "^0.1.1-rc.2",
61
+ "@deepseek-ai/dsh-tools": "^0.1.1-rc.2",
62
+ "@deepseek-ai/cordis": "^4.0.1"
63
63
  }
64
64
  }