@deepseek-ai/dsh-subagent-spawn-in-process 0.1.5-rc.2 → 0.1.6-alpha.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.
- package/README.i18n.yaml +1 -1
- package/README.zh.md +7 -7
- package/package.json +17 -17
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/subagent-spawn-in-process/README.md
|
|
5
5
|
README.md: ce3909934efa1b2f5cc57ff046b892e3ec129444
|
|
6
|
-
README.zh.md:
|
|
6
|
+
README.zh.md: 998b90ff0827e3cccc3be787e1941ca49aaeec0e
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
`dsh-subagent-spawn-in-process` 是一个进程内 subagent 后端:它在当前进程中运行每个委派任务,子 agent(智能体)是一个全新子 `Agent`,复用宿主的 agent 工厂及 LLM(大语言模型)/工具服务。子 agent 以空对话开始,因此任务提示词必须自足;除非 `request.agentOptions` 覆盖,否则它继承父 agent
|
|
12
|
+
`dsh-subagent-spawn-in-process` 是一个进程内 subagent 后端:它在当前进程中运行每个委派任务,子 agent(智能体)是一个全新子 `Agent`,复用宿主的 agent 工厂及 LLM(大语言模型)/工具服务。子 agent 以空对话开始,因此任务提示词必须自足;除非 `request.agentOptions` 覆盖,否则它继承父 agent 的工作目录、会话谱系、提供方、模型、推理强度与输出 token 上限。委派工具或 API 调用以 `spawn` 提供方名称找到它。需要成本最低的委派传输时选择它;需要子 agent 建立在父级已完成对话轮次之上时,请选择 fork 后端。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -25,7 +25,7 @@ kind: "package-reference"
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## 使用本包
|
|
27
27
|
|
|
28
|
-
在需要把工作委派给全新进程内子 agent
|
|
28
|
+
在需要把工作委派给全新进程内子 agent 的组合中挂载此后端。常用配置路径很明确:加载 subagent 服务与本后端,再把 `dsh-tool-subagent` 之类的委派工具指向 `spawn` 提供方。
|
|
29
29
|
|
|
30
30
|
### 何时选择
|
|
31
31
|
|
|
@@ -65,7 +65,7 @@ kind: "package-reference"
|
|
|
65
65
|
|
|
66
66
|
### 设计理念
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
职责划分如下:本后端只贡献提供方注册与「全新开始」的决定,其余全部运行机制——深度检查、子 agent 创建、按子 agent 定制、结构化输出、取消、结果读取与 dispose——都在 `dsh-subagent-in-process-driver` 中。agent 工厂的创建事务拥有未发布设置窗口及其回滚;发布之后,调用方拥有该运行。
|
|
69
69
|
|
|
70
70
|
### 源码地图
|
|
71
71
|
|
|
@@ -76,7 +76,7 @@ kind: "package-reference"
|
|
|
76
76
|
|
|
77
77
|
### 运行流程
|
|
78
78
|
|
|
79
|
-
启动请求先由 subagent
|
|
79
|
+
启动请求先由 subagent 服务解析,然后共享驱动器校验深度、生成子会话 id、通过宿主 agent 工厂以调用方信号创建子 agent、在创建窗口内应用 persona、工具过滤器与结构化输出、发布子 agent、驱动一项任务、读取子 agent 自身的最终输出,最后完全停稳地 dispose 句柄。
|
|
80
80
|
|
|
81
81
|
### 所有权与作用域
|
|
82
82
|
|
|
@@ -106,11 +106,11 @@ kind: "package-reference"
|
|
|
106
106
|
|
|
107
107
|
#### 模型看到什么
|
|
108
108
|
|
|
109
|
-
全新子 agent
|
|
109
|
+
全新子 agent 逐字接收任务内容,作为新空对话中的唯一用户消息,默认使用父级提供方、模型、推理强度、输出 token 上限与工作目录。配置的 persona 会在子 agent 作用域中遮蔽全局提示词文本;工具过滤器会从其 schema、可执行工具查找与 PTC mode SDK 绑定中移除指定的全局工具,但保留独立注册的指导内容。不包含任何父级对话消息;过滤属于组合,而非继承的权限授予。
|
|
110
110
|
|
|
111
111
|
#### Token 影响
|
|
112
112
|
|
|
113
|
-
子 agent
|
|
113
|
+
子 agent 会为全新的独立上下文与历史消耗 token,不复制任何父级历史 token。persona 会改变该子 agent 反复使用的提示词成本;工具过滤器会改变其 schema 或生成 SDK 的成本。
|
|
114
114
|
|
|
115
115
|
#### KV Cache 影响
|
|
116
116
|
|
|
@@ -137,7 +137,7 @@ kind: "package-reference"
|
|
|
137
137
|
|
|
138
138
|
这些限制说明何时选择该后端是错误的;它们是当前包约束。
|
|
139
139
|
|
|
140
|
-
- **全新表示不含父级 transcript(文本记录)**——子 agent 继承 cwd
|
|
140
|
+
- **全新表示不含父级 transcript(文本记录)**——子 agent 继承 cwd、谱系、提供方、模型、推理强度、输出 token 上限及显式配置的 persona/工具限制,但不继承父级的任何对话;需要已完成轮次上下文时,请使用 fork 后端。
|
|
141
141
|
|
|
142
142
|
<a id="dev-note"></a>
|
|
143
143
|
### 开发备注
|
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.1.
|
|
4
|
+
"version": "0.1.6-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
],
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@deepseek-ai/dsh-subagent": "^0.1.
|
|
31
|
-
"@deepseek-ai/dsh-subagent-in-process-driver": "^0.1.
|
|
30
|
+
"@deepseek-ai/dsh-subagent": "^0.1.6-alpha.1",
|
|
31
|
+
"@deepseek-ai/dsh-subagent-in-process-driver": "^0.1.6-alpha.1",
|
|
32
32
|
"@deepseek-ai/cordis": "^4.0.2"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@deepseek-ai/cordis-plugin-loader": "^1.0.3",
|
|
39
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
40
|
-
"@deepseek-ai/dsh-agent-loop": "^0.1.
|
|
41
|
-
"@deepseek-ai/dsh-
|
|
42
|
-
"@deepseek-ai/dsh-
|
|
43
|
-
"@deepseek-ai/dsh-
|
|
44
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
45
|
-
"@deepseek-ai/dsh-llm-deepseek": "^0.1.
|
|
46
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"@deepseek-ai/dsh-subagent": "^0.1.
|
|
49
|
-
"@deepseek-ai/dsh-tool-
|
|
39
|
+
"@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
|
|
40
|
+
"@deepseek-ai/dsh-agent-loop": "^0.1.6-alpha.1",
|
|
41
|
+
"@deepseek-ai/dsh-bash-local": "^0.1.6-alpha.1",
|
|
42
|
+
"@deepseek-ai/dsh-subprocess-local": "^0.1.6-alpha.1",
|
|
43
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.6-alpha.1",
|
|
44
|
+
"@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
|
|
45
|
+
"@deepseek-ai/dsh-llm-deepseek": "^0.1.6-alpha.1",
|
|
46
|
+
"@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
|
|
47
|
+
"@deepseek-ai/dsh-subagent": "^0.1.6-alpha.1",
|
|
48
|
+
"@deepseek-ai/dsh-subagent-in-process-driver": "^0.1.6-alpha.1",
|
|
49
|
+
"@deepseek-ai/dsh-tool-bash": "^0.1.6-alpha.1",
|
|
50
|
+
"@deepseek-ai/dsh-tool-subagent": "^0.1.6-alpha.1",
|
|
50
51
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
51
|
-
"@deepseek-ai/dsh-session-projection": "^0.1.
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-tool-bash": "^0.1.5-rc.2"
|
|
52
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.1",
|
|
53
|
+
"@deepseek-ai/dsh-invariants": "^0.1.6-alpha.1"
|
|
54
54
|
}
|
|
55
55
|
}
|