@deepseek-ai/dsh-subagent-spawn-in-process 0.2.0-rc.2 → 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 +14 -14
- package/README.md +6 -8
- package/README.zh.md +6 -8
- package/lib/index.js +0 -4
- package/package.json +20 -22
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:
|
|
28
|
-
zh:
|
|
27
|
+
en: eabf1d0e66fde8fa
|
|
28
|
+
zh: d6de66797060bac5
|
|
29
29
|
/deepseek-ai-dsh-subagent-spawn-in-process/understand-the-implementation:
|
|
30
|
-
en:
|
|
31
|
-
zh:
|
|
30
|
+
en: 7f34637751939818
|
|
31
|
+
zh: 2937553168e1aee5
|
|
32
32
|
/deepseek-ai-dsh-subagent-spawn-in-process/understand-the-implementation/design-concept:
|
|
33
|
-
en:
|
|
34
|
-
zh:
|
|
33
|
+
en: 67b871bbb7dcc803
|
|
34
|
+
zh: 79a8fec9117ef52a
|
|
35
35
|
/deepseek-ai-dsh-subagent-spawn-in-process/understand-the-implementation/source-map:
|
|
36
|
-
en:
|
|
37
|
-
zh:
|
|
36
|
+
en: b7c55a4bff3ae1f0
|
|
37
|
+
zh: 9d0f514f433250c6
|
|
38
38
|
/deepseek-ai-dsh-subagent-spawn-in-process/understand-the-implementation/run-flow:
|
|
39
|
-
en:
|
|
40
|
-
zh:
|
|
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:
|
|
46
|
-
zh:
|
|
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:
|
|
67
|
-
zh:
|
|
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
|
|
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,22 +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
|
|
64
|
+
This section explains provider preparation and the activation lifecycle owned by the subagent service.
|
|
65
65
|
|
|
66
66
|
### Design concept
|
|
67
67
|
|
|
68
|
-
|
|
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, `
|
|
75
|
-
| — | No runtime invariant companion is published; this package exposes no independent event sequence or mutable data relation beyond contracts enforced at its owning seam. |
|
|
74
|
+
| [`src/index.ts`](src/index.ts) | Provider registration: `Config` schema, capability declaration, `prepareContinuable()` |
|
|
76
75
|
|
|
77
76
|
### Run flow
|
|
78
77
|
|
|
79
|
-
|
|
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.
|
|
80
79
|
|
|
81
80
|
### Ownership and scope
|
|
82
81
|
|
|
@@ -92,7 +91,6 @@ The child gets a fresh flat registration scope: parent tool restrictions and aut
|
|
|
92
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.
|
|
93
92
|
|
|
94
93
|
- [Subagent subsystem](../../../docs/subsystems/subagent.md) — start requests, results, live runs, and the provider contract.
|
|
95
|
-
- [dsh-subagent-in-process-driver](../subagent-in-process-driver/README.md) — the shared run driver this backend calls.
|
|
96
94
|
- [dsh-subagent-fork-in-process](../subagent-fork-in-process/README.md) — the sibling backend that seeds completed parent turns.
|
|
97
95
|
- [dsh-tool-subagent](../tool-subagent/README.md) — the model-facing delegation tool that reaches this provider.
|
|
98
96
|
- [Generated configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-subagent-spawn-in-process) — every accepted config field and its source declaration.
|
|
@@ -120,7 +118,7 @@ The child's request cache is independent of the parent's. Child history grows ap
|
|
|
120
118
|
|
|
121
119
|
#### What the model sees
|
|
122
120
|
|
|
123
|
-
Through `dsh-tool-subagent`, the parent receives
|
|
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.
|
|
124
122
|
|
|
125
123
|
#### Token effect
|
|
126
124
|
|
package/README.zh.md
CHANGED
|
@@ -51,7 +51,7 @@ kind: "package-reference"
|
|
|
51
51
|
|
|
52
52
|
### 一次委派会做什么
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
一次工具调用创建后台子 agent 并立即返回子会话 ID。子级在自己的会话中工作,父级通过完成通知收到其最终答案。子级也可以通过 `send_message` 发送消息。被拒绝的启动不会留下已发布的子 agent;工作流等程序调用方可以直接等待 activation 的结果。
|
|
55
55
|
|
|
56
56
|
-----
|
|
57
57
|
|
|
@@ -61,22 +61,21 @@ kind: "package-reference"
|
|
|
61
61
|
<details>
|
|
62
62
|
<summary>实现细节——点击展开</summary>
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
本节说明提供方准备工作,以及由 subagent 服务拥有的 activation 生命周期。
|
|
65
65
|
|
|
66
66
|
### 设计理念
|
|
67
67
|
|
|
68
|
-
|
|
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、能力声明、`
|
|
75
|
-
| — | 不发布运行时不变式伴生入口;本包没有独立事件序列或可变数据关系,相关约定在所属 seam 强制执行。 |
|
|
74
|
+
| [`src/index.ts`](src/index.ts) | 提供方注册:`Config` schema、能力声明、`prepareContinuable()` |
|
|
76
75
|
|
|
77
76
|
### 运行流程
|
|
78
77
|
|
|
79
|
-
|
|
78
|
+
`startActivation()` 解析提供方并调用 `prepareContinuable()`,随后创建并发布子 agent。每次 activation 单独安装结构化输出。调用方可以等待 `result`,并通过 `dispose()` 等待整个子树完全停稳。
|
|
80
79
|
|
|
81
80
|
### 所有权与作用域
|
|
82
81
|
|
|
@@ -92,7 +91,6 @@ kind: "package-reference"
|
|
|
92
91
|
当包级约定不够用时阅读以下页面;它们从共享 subagent 模型进入兄弟后端与穷尽式配置。
|
|
93
92
|
|
|
94
93
|
- [Subagent 子系统](../../../docs/subsystems/subagent.zh.md)——启动请求、结果、实时运行与提供方约定。
|
|
95
|
-
- [dsh-subagent-in-process-driver](../subagent-in-process-driver/README.zh.md)——本后端调用的共享运行驱动器。
|
|
96
94
|
- [dsh-subagent-fork-in-process](../subagent-fork-in-process/README.zh.md)——以已完成父级轮次作初始内容的兄弟后端。
|
|
97
95
|
- [dsh-tool-subagent](../tool-subagent/README.zh.md)——指向该提供方的面向模型委派工具。
|
|
98
96
|
- [生成配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-subagent-spawn-in-process)——每个受支持配置字段及其源声明。
|
|
@@ -120,7 +118,7 @@ kind: "package-reference"
|
|
|
120
118
|
|
|
121
119
|
#### 模型看到什么
|
|
122
120
|
|
|
123
|
-
通过 `dsh-tool-subagent
|
|
121
|
+
通过 `dsh-tool-subagent`,父级先收到子会话 ID,随后收到包含最终答案的完成通知。子级自行编写的消息通过 `send_message` 到达。子级内部工具调用保留在子会话中。
|
|
124
122
|
|
|
125
123
|
#### Token 影响
|
|
126
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.
|
|
4
|
+
"version": "0.2.1-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,30 +27,28 @@
|
|
|
27
27
|
],
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@deepseek-ai/dsh-subagent": "0.2.
|
|
31
|
-
"@deepseek-ai/cordis": "~4.0.
|
|
32
|
-
"@deepseek-ai/dsh-subagent-in-process-driver": "0.2.0-rc.2"
|
|
30
|
+
"@deepseek-ai/dsh-subagent": "0.2.1-alpha.2",
|
|
31
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.1"
|
|
33
32
|
},
|
|
34
33
|
"dependencies": {
|
|
35
|
-
"@deepseek-ai/schemastery": "~3.18.
|
|
34
|
+
"@deepseek-ai/schemastery": "~3.18.5-alpha.1"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
|
-
"@deepseek-ai/cordis-plugin-loader": "~1.0.
|
|
39
|
-
"@deepseek-ai/dsh-agent": "0.2.
|
|
40
|
-
"@deepseek-ai/dsh-agent-loop": "0.2.
|
|
41
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.
|
|
42
|
-
"@deepseek-ai/dsh-bash-local": "0.2.
|
|
43
|
-
"@deepseek-ai/dsh-subprocess-local": "0.2.
|
|
44
|
-
"@deepseek-ai/dsh-
|
|
45
|
-
"@deepseek-ai/dsh-llm": "0.2.
|
|
46
|
-
"@deepseek-ai/dsh-llm-deepseek": "0.2.
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"@deepseek-ai/dsh-subagent": "0.2.
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-tool-
|
|
51
|
-
"@deepseek-ai/
|
|
52
|
-
"@deepseek-ai/
|
|
53
|
-
"@deepseek-ai/dsh-session-
|
|
54
|
-
"@deepseek-ai/dsh-session": "0.2.0-rc.2"
|
|
37
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.6-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",
|
|
50
|
+
"@deepseek-ai/cordis": "~4.0.5-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"
|
|
55
53
|
}
|
|
56
54
|
}
|