@deepseek-ai/dsh-subagent-spawn-in-process 0.2.1-alpha.1 → 0.2.1-alpha.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
@@ -24,26 +24,26 @@
24
24
  en: 3f53b0d5f4037171
25
25
  zh: e0f2ac931cfbef95
26
26
  /deepseek-ai-dsh-subagent-spawn-in-process/use-this-package/what-a-delegation-does:
27
- en: 9f4e6f31ad4d86d1
28
- zh: 4ad77e0b80c6efcc
27
+ en: eabf1d0e66fde8fa
28
+ zh: d6de66797060bac5
29
29
  /deepseek-ai-dsh-subagent-spawn-in-process/understand-the-implementation:
30
- en: 9e00b9dc2f9cf38c
31
- zh: 60ce00ce6c3b5564
30
+ en: 7f34637751939818
31
+ zh: 2937553168e1aee5
32
32
  /deepseek-ai-dsh-subagent-spawn-in-process/understand-the-implementation/design-concept:
33
- en: 80716c24d7a0ee78
34
- zh: 9bead3317f5a357e
33
+ en: 67b871bbb7dcc803
34
+ zh: 79a8fec9117ef52a
35
35
  /deepseek-ai-dsh-subagent-spawn-in-process/understand-the-implementation/source-map:
36
- en: f23771c3d213ffb1
37
- zh: c0b16b102dc26345
36
+ en: b7c55a4bff3ae1f0
37
+ zh: 9d0f514f433250c6
38
38
  /deepseek-ai-dsh-subagent-spawn-in-process/understand-the-implementation/run-flow:
39
- en: 7b55a5649bc38155
40
- zh: 51fe220c84ca759a
39
+ en: 5f07f1044bf7c370
40
+ zh: d31a485a3e333500
41
41
  /deepseek-ai-dsh-subagent-spawn-in-process/understand-the-implementation/ownership-and-scope:
42
42
  en: 8af949dc29cb4a5c
43
43
  zh: f4e4f9f9f4a4b7c9
44
44
  /deepseek-ai-dsh-subagent-spawn-in-process/further-exploration:
45
- en: 742e34ea6c31adf9
46
- zh: 599d993ba5a3c8f1
45
+ en: c247efa590d8b78a
46
+ zh: 999f8281df521384
47
47
  /deepseek-ai-dsh-subagent-spawn-in-process/model-experience:
48
48
  en: 215e7ba838619b7b
49
49
  zh: a311da3843709f90
@@ -63,8 +63,8 @@
63
63
  en: 75d061c2151624a7
64
64
  zh: 71e58e020b60ff90
65
65
  /deepseek-ai-dsh-subagent-spawn-in-process/model-experience/parent-tool-result-indirectly/what-the-model-sees:
66
- en: 93ae79a8f38c984b
67
- zh: 6ede5c4312685ff0
66
+ en: caf11edef2516b8c
67
+ zh: 25bcb16cceaad06d
68
68
  /deepseek-ai-dsh-subagent-spawn-in-process/model-experience/parent-tool-result-indirectly/token-effect:
69
69
  en: ff8045aa0f466c2a
70
70
  zh: e38fc5c6af2ce076
package/README.md CHANGED
@@ -51,7 +51,7 @@ The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-a
51
51
 
52
52
  ### What a delegation does
53
53
 
54
- One tool call starts one child and waits for its result: the child works in its own session and the parent receives only its final output, or an errored tool result when the run is cancelled, refused, truncated by its token limit, or rejected at startup. A rejected start leaves no published child; a completed run is disposed after its result is collected.
54
+ One tool call creates a background child and returns its session id immediately. The child works in its own session; the parent receives its final answer in a completion notice. The child can also send messages through `send_message`. A rejected start leaves no published child. Programmatic callers such as workflows can await the activation result directly.
55
55
 
56
56
  -----
57
57
 
@@ -61,21 +61,21 @@ One tool call starts one child and waits for its result: the child works in its
61
61
  <details>
62
62
  <summary>Implementation internals — click to expand</summary>
63
63
 
64
- This section explains how the backend is built and where the behavior in [Use this package](#use-this-package) comes from; the shared mechanics belong to the in-process driver.
64
+ This section explains provider preparation and the activation lifecycle owned by the subagent service.
65
65
 
66
66
  ### Design concept
67
67
 
68
- One separation: this backend contributes only the provider registration and the decision to start fresh, while every run mechanic — depth checking, child creation, per-child customization, structured output, cancellation, result reading, and disposal — lives in `dsh-subagent-in-process-driver`. The agent factory's creation transaction owns the unpublished setup window and its rollback; after publication the caller owns the run.
68
+ This backend registers the provider and prepares a fresh child session. `dsh-subagent` owns activation depth checks, child creation, tool and persona setup, structured output, result collection, and disposal. The caller signal cancels unpublished creation; the published handle cancels and reaches quiescence through `dispose()`.
69
69
 
70
70
  ### Source map
71
71
 
72
72
  | File | Role |
73
73
  |---|---|
74
- | [`src/index.ts`](src/index.ts) | Provider registration: `Config` schema, capability declaration, `start()` |
74
+ | [`src/index.ts`](src/index.ts) | Provider registration: `Config` schema, capability declaration, `prepareContinuable()` |
75
75
 
76
76
  ### Run flow
77
77
 
78
- A start request resolves through the subagent service, then the shared driver validates depth, mints a child session id, creates the child through the host agent factory with the caller's signal, applies persona, tool filter, and structured output inside the creation window, publishes the child, drives one task, reads the child's own final output, and disposes the handle quiescently.
78
+ `startActivation()` resolves the provider and calls `prepareContinuable()`, then creates and publishes the child. Structured output is attached separately for each activation. Callers can await `result` and use `dispose()` to wait for the entire child subtree to reach quiescence.
79
79
 
80
80
  ### Ownership and scope
81
81
 
@@ -91,7 +91,6 @@ The child gets a fresh flat registration scope: parent tool restrictions and aut
91
91
  Read these pages when the package-level contract is not enough; they move from the shared subagent model to the sibling backends and exhaustive configuration.
92
92
 
93
93
  - [Subagent subsystem](../../../docs/subsystems/subagent.md) — start requests, results, live runs, and the provider contract.
94
- - [dsh-subagent-in-process-driver](../subagent-in-process-driver/README.md) — the shared run driver this backend calls.
95
94
  - [dsh-subagent-fork-in-process](../subagent-fork-in-process/README.md) — the sibling backend that seeds completed parent turns.
96
95
  - [dsh-tool-subagent](../tool-subagent/README.md) — the model-facing delegation tool that reaches this provider.
97
96
  - [Generated configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-subagent-spawn-in-process) — every accepted config field and its source declaration.
@@ -119,7 +118,7 @@ The child's request cache is independent of the parent's. Child history grows ap
119
118
 
120
119
  #### What the model sees
121
120
 
122
- Through `dsh-tool-subagent`, the parent receives only the child's final output or an errored result for a non-completed stop reason; intermediate child work never reaches it.
121
+ Through `dsh-tool-subagent`, the parent first receives the child session id, then a completion notice with its final answer. Child-authored messages arrive through `send_message`. Internal child tool calls remain in the child session.
123
122
 
124
123
  #### Token effect
125
124
 
package/README.zh.md CHANGED
@@ -51,7 +51,7 @@ kind: "package-reference"
51
51
 
52
52
  ### 一次委派会做什么
53
53
 
54
- 一次工具调用启动一个子 agent 并等待其结果:子 agent 在自有会话中工作,父级只接收其最终输出;若运行被取消、拒绝、被 token 上限截断或在启动时被拒,则收到出错的工具结果。被拒绝的启动不会留下已发布的子 agent;完成的运行在结果收集后即被 dispose(资源释放)。
54
+ 一次工具调用创建后台子 agent 并立即返回子会话 ID。子级在自己的会话中工作,父级通过完成通知收到其最终答案。子级也可以通过 `send_message` 发送消息。被拒绝的启动不会留下已发布的子 agent;工作流等程序调用方可以直接等待 activation 的结果。
55
55
 
56
56
  -----
57
57
 
@@ -61,21 +61,21 @@ kind: "package-reference"
61
61
  <details>
62
62
  <summary>实现细节——点击展开</summary>
63
63
 
64
- 本节解释后端的构建方式以及[使用本包](#use-this-package)中行为的来源;共享机制属于进程内驱动器。
64
+ 本节说明提供方准备工作,以及由 subagent 服务拥有的 activation 生命周期。
65
65
 
66
66
  ### 设计理念
67
67
 
68
- 职责划分如下:本后端只贡献提供方注册与「全新开始」的决定,其余全部运行机制——深度检查、子 agent 创建、按子 agent 定制、结构化输出、取消、结果读取与 dispose——都在 `dsh-subagent-in-process-driver` 中。agent 工厂的创建事务拥有未发布设置窗口及其回滚;发布之后,调用方拥有该运行。
68
+ 本后端注册提供方并准备全新子会话。`dsh-subagent` 拥有 activation 的深度检查、子 agent 创建、工具和 persona 设置、结构化输出、结果收集及资源释放;发布前的调用方信号取消创建,发布后的句柄通过 `dispose()` 取消并等待完全停稳。
69
69
 
70
70
  ### 源码地图
71
71
 
72
72
  | 文件 | 职责 |
73
73
  |---|---|
74
- | [`src/index.ts`](src/index.ts) | 提供方注册:`Config` schema、能力声明、`start()` |
74
+ | [`src/index.ts`](src/index.ts) | 提供方注册:`Config` schema、能力声明、`prepareContinuable()` |
75
75
 
76
76
  ### 运行流程
77
77
 
78
- 启动请求先由 subagent 服务解析,然后共享驱动器校验深度、生成子会话 id、通过宿主 agent 工厂以调用方信号创建子 agent、在创建窗口内应用 persona、工具过滤器与结构化输出、发布子 agent、驱动一项任务、读取子 agent 自身的最终输出,最后完全停稳地 dispose 句柄。
78
+ `startActivation()` 解析提供方并调用 `prepareContinuable()`,随后创建并发布子 agent。每次 activation 单独安装结构化输出。调用方可以等待 `result`,并通过 `dispose()` 等待整个子树完全停稳。
79
79
 
80
80
  ### 所有权与作用域
81
81
 
@@ -91,7 +91,6 @@ kind: "package-reference"
91
91
  当包级约定不够用时阅读以下页面;它们从共享 subagent 模型进入兄弟后端与穷尽式配置。
92
92
 
93
93
  - [Subagent 子系统](../../../docs/subsystems/subagent.zh.md)——启动请求、结果、实时运行与提供方约定。
94
- - [dsh-subagent-in-process-driver](../subagent-in-process-driver/README.zh.md)——本后端调用的共享运行驱动器。
95
94
  - [dsh-subagent-fork-in-process](../subagent-fork-in-process/README.zh.md)——以已完成父级轮次作初始内容的兄弟后端。
96
95
  - [dsh-tool-subagent](../tool-subagent/README.zh.md)——指向该提供方的面向模型委派工具。
97
96
  - [生成配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-subagent-spawn-in-process)——每个受支持配置字段及其源声明。
@@ -119,7 +118,7 @@ kind: "package-reference"
119
118
 
120
119
  #### 模型看到什么
121
120
 
122
- 通过 `dsh-tool-subagent`,父级只接收子 agent 的最终输出,或非完成终止原因对应的出错结果;子 agent 的中间工作绝不会到达父级。
121
+ 通过 `dsh-tool-subagent`,父级先收到子会话 ID,随后收到包含最终答案的完成通知。子级自行编写的消息通过 `send_message` 到达。子级内部工具调用保留在子会话中。
123
122
 
124
123
  #### Token 影响
125
124
 
package/lib/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import z from "@deepseek-ai/schemastery";
2
- import { startInProcessRun } from "@deepseek-ai/dsh-subagent-in-process-driver";
3
2
  //#region lib/types/index.js
4
3
  /**
5
4
  * The in-process SPAWN subagent backend: registers a {@link SubagentProvider} on
@@ -31,9 +30,6 @@ var SpawnInProcessProvider = class {
31
30
  constructor(name) {
32
31
  this.name = name;
33
32
  }
34
- start(request) {
35
- return startInProcessRun(request, {});
36
- }
37
33
  prepareContinuable() {
38
34
  return Promise.resolve({});
39
35
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-subagent-spawn-in-process",
3
3
  "description": "In-process spawn subagent backend: runs a fresh child agent on ctx.agents",
4
- "version": "0.2.1-alpha.1",
4
+ "version": "0.2.1-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,8 +27,7 @@
27
27
  ],
28
28
  "license": "MIT",
29
29
  "peerDependencies": {
30
- "@deepseek-ai/dsh-subagent-in-process-driver": "0.2.1-alpha.1",
31
- "@deepseek-ai/dsh-subagent": "0.2.1-alpha.1",
30
+ "@deepseek-ai/dsh-subagent": "0.2.1-alpha.2",
32
31
  "@deepseek-ai/cordis": "~4.0.5-alpha.1"
33
32
  },
34
33
  "dependencies": {
@@ -36,20 +35,20 @@
36
35
  },
37
36
  "devDependencies": {
38
37
  "@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.1",
39
- "@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
40
- "@deepseek-ai/dsh-agent-loop": "0.2.1-alpha.1",
41
- "@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-alpha.1",
42
- "@deepseek-ai/dsh-bash-local": "0.2.1-alpha.1",
43
- "@deepseek-ai/dsh-subprocess-local": "0.2.1-alpha.1",
44
- "@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
45
- "@deepseek-ai/dsh-llm-deepseek": "0.2.1-alpha.1",
46
- "@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.1-alpha.1",
47
- "@deepseek-ai/dsh-session": "0.2.1-alpha.1",
48
- "@deepseek-ai/dsh-subagent": "0.2.1-alpha.1",
49
- "@deepseek-ai/dsh-subagent-in-process-driver": "0.2.1-alpha.1",
50
- "@deepseek-ai/dsh-tool-bash": "0.2.1-alpha.1",
51
- "@deepseek-ai/dsh-tool-subagent": "0.2.1-alpha.1",
38
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.2",
39
+ "@deepseek-ai/dsh-agent-loop": "0.2.1-alpha.2",
40
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-alpha.2",
41
+ "@deepseek-ai/dsh-bash-local": "0.2.1-alpha.2",
42
+ "@deepseek-ai/dsh-subprocess-local": "0.2.1-alpha.2",
43
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.2",
44
+ "@deepseek-ai/dsh-llm-deepseek": "0.2.1-alpha.2",
45
+ "@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.1-alpha.2",
46
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.2",
47
+ "@deepseek-ai/dsh-subagent": "0.2.1-alpha.2",
48
+ "@deepseek-ai/dsh-tool-bash": "0.2.1-alpha.2",
49
+ "@deepseek-ai/dsh-tool-subagent": "0.2.1-alpha.2",
52
50
  "@deepseek-ai/cordis": "~4.0.5-alpha.1",
53
- "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.1"
51
+ "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.2",
52
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-alpha.2"
54
53
  }
55
54
  }