@qlzt/dsh-subagent-spawn-in-process 0.2.1-alpha.2 → 0.2.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
@@ -24,14 +24,14 @@
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: eabf1d0e66fde8fa
28
- zh: d6de66797060bac5
27
+ en: 0c90404ed53cf451
28
+ zh: 161e38b7d7c10182
29
29
  /deepseek-ai-dsh-subagent-spawn-in-process/understand-the-implementation:
30
30
  en: 7f34637751939818
31
31
  zh: 2937553168e1aee5
32
32
  /deepseek-ai-dsh-subagent-spawn-in-process/understand-the-implementation/design-concept:
33
- en: 67b871bbb7dcc803
34
- zh: 79a8fec9117ef52a
33
+ en: a5b418fb260e2b9f
34
+ zh: 06dd949e350e9585
35
35
  /deepseek-ai-dsh-subagent-spawn-in-process/understand-the-implementation/source-map:
36
36
  en: b7c55a4bff3ae1f0
37
37
  zh: 9d0f514f433250c6
@@ -39,8 +39,8 @@
39
39
  en: 5f07f1044bf7c370
40
40
  zh: d31a485a3e333500
41
41
  /deepseek-ai-dsh-subagent-spawn-in-process/understand-the-implementation/ownership-and-scope:
42
- en: 8af949dc29cb4a5c
43
- zh: f4e4f9f9f4a4b7c9
42
+ en: 1288272d1eabfdc1
43
+ zh: 6efde7517f434179
44
44
  /deepseek-ai-dsh-subagent-spawn-in-process/further-exploration:
45
45
  en: c247efa590d8b78a
46
46
  zh: 999f8281df521384
@@ -51,14 +51,14 @@
51
51
  en: 05e6180f1498fdf9
52
52
  zh: 2b05d2b97bfa67da
53
53
  /deepseek-ai-dsh-subagent-spawn-in-process/model-experience/child-agent-request/what-the-model-sees:
54
- en: 2035bdd8640e5a8a
55
- zh: 5afa645d7dbe31a5
54
+ en: c9dfab9a4d363fed
55
+ zh: 6cb3b0914ccb73e2
56
56
  /deepseek-ai-dsh-subagent-spawn-in-process/model-experience/child-agent-request/token-effect:
57
- en: e74d21e38e4a53a9
58
- zh: 6a5e3ef5fe0f4f14
57
+ en: eb373a4b35a4b548
58
+ zh: 9537d0e466e8bcd9
59
59
  /deepseek-ai-dsh-subagent-spawn-in-process/model-experience/child-agent-request/kv-cache-effect:
60
- en: 78d800b26fb3b0af
61
- zh: 313169b62c29af1d
60
+ en: 6da85bad412c741e
61
+ zh: c9af9fd1b4e7eed2
62
62
  /deepseek-ai-dsh-subagent-spawn-in-process/model-experience/parent-tool-result-indirectly:
63
63
  en: 75d061c2151624a7
64
64
  zh: 71e58e020b60ff90
@@ -72,8 +72,8 @@
72
72
  en: f5d5f97a153f7c70
73
73
  zh: 3d6bc05b9eadfbc2
74
74
  /deepseek-ai-dsh-subagent-spawn-in-process/known-limitations-and-deferred-work:
75
- en: 68720f2a663a4aad
76
- zh: a472436c5cc2b801
75
+ en: 0c0b19dc1ccec027
76
+ zh: a7799c516dc3b034
77
77
  /deepseek-ai-dsh-subagent-spawn-in-process/known-limitations-and-deferred-work/dev-note:
78
78
  en: e67f633dc6fe7773
79
79
  zh: 3bb0c20c93f16f98
package/README.md CHANGED
@@ -53,6 +53,8 @@ The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-a
53
53
 
54
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
+ An explicit `agentPreset` selects the currently registered preset independently; omission joins the parent's active revision. Only spawn supports this choice. Persona and tools belong in the [preset definition](../../preset/agent-preset-registry/README.md). Cold resume follows the shared [child composition rules](../subagent/README.md#restoring-child-composition).
57
+
56
58
  -----
57
59
 
58
60
  <a id="understand-the-implementation"></a>
@@ -65,7 +67,7 @@ This section explains provider preparation and the activation lifecycle owned by
65
67
 
66
68
  ### Design concept
67
69
 
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()`.
70
+ This backend registers the provider and prepares a fresh child session. `dsh-subagent` owns activation depth checks, child creation, preset composition, structured output, result collection, and disposal. The caller signal cancels unpublished creation; the published handle cancels and reaches quiescence through `dispose()`.
69
71
 
70
72
  ### Source map
71
73
 
@@ -79,7 +81,7 @@ This backend registers the provider and prepares a fresh child session. `dsh-sub
79
81
 
80
82
  ### Ownership and scope
81
83
 
82
- The child gets a fresh flat registration scope: parent tool restrictions and authority are never imported, and the filter the tool applies is composition, not a parent-derived grant. The backend advertises all five start-time capabilities, including `agentOptions`, because it controls the child's creation window and can enforce each one.
84
+ The child has its own registration scope below the inherited or independently selected preset. The parent's agent-local tool restrictions are not imported. The backend advertises `agentPreset` and `agentOptions` alongside its other start-time capabilities; the subagent manager applies them during child creation.
83
85
 
84
86
  </details>
85
87
 
@@ -104,15 +106,15 @@ Read these pages when the package-level contract is not enough; they move from t
104
106
 
105
107
  #### What the model sees
106
108
 
107
- The fresh child receives the task content verbatim as its only user message in a new empty conversation, with the parent provider, model, reasoning effort, output-token limit, and working directory by default. A configured persona shadows global prompt text in the child's scope; a tool filter removes named global tools from its schemas, executable lookup, and PTC mode SDK bindings while leaving independently registered guidance. No parent conversation message is included; the filter is composition, not an inherited authority grant.
109
+ The fresh child receives the task content verbatim as its only user message in a new empty conversation, with the parent provider, model, reasoning effort, output-token limit, and working directory by default. The inherited or selected preset supplies tools and prompt sections. No parent conversation message is included.
108
110
 
109
111
  #### Token effect
110
112
 
111
- The child pays for a new independent context and history, and no parent-history token is duplicated. A persona changes the child's repeated prompt cost; a tool filter changes its schema or generated SDK cost.
113
+ The child pays for a new independent context and history, and no parent-history token is duplicated. The preset's prompt and tools determine repeated prompt, schema, and generated SDK costs.
112
114
 
113
115
  #### KV Cache effect
114
116
 
115
- The child's request cache is independent of the parent's. Child history grows append-only, while persona, tool-filter, generated-SDK, provider, or model changes establish a different child prefix.
117
+ The child's request cache is independent of the parent's. Child history grows append-only, while preset, generated-SDK, provider, or model changes establish a different child prefix.
116
118
 
117
119
  ### Parent tool result, indirectly
118
120
 
@@ -135,7 +137,7 @@ Append-only; newly visible content follows the reusable request prefix and does
135
137
 
136
138
  These limits define when the backend is the wrong choice; they are current package constraints.
137
139
 
138
- - **Fresh means no parent transcript** — the child inherits cwd, lineage, provider, model, reasoning effort, output-token limit, and explicitly configured persona or tool restrictions, but none of the parent's conversation; use the fork backend when completed-turn context is required.
140
+ - **Fresh means no parent transcript** — the child inherits cwd, lineage, provider, model, reasoning effort, and output-token limit, but none of the parent's conversation; use the fork backend when completed-turn context is required.
139
141
 
140
142
  <a id="dev-note"></a>
141
143
  ### Dev Note
package/README.zh.md CHANGED
@@ -53,6 +53,8 @@ kind: "package-reference"
53
53
 
54
54
  一次工具调用创建后台子 agent 并立即返回子会话 ID。子级在自己的会话中工作,父级通过完成通知收到其最终答案。子级也可以通过 `send_message` 发送消息。被拒绝的启动不会留下已发布的子 agent;工作流等程序调用方可以直接等待 activation 的结果。
55
55
 
56
+ 显式 `agentPreset` 独立选择当前注册的 preset;省略时加入父方的活跃代际。只有 spawn 支持此选择。persona 与工具放在 [preset 定义](../../preset/agent-preset-registry/README.zh.md)中。冷恢复遵守共享的[子级组装规则](../subagent/README.zh.md#restoring-child-composition)。
57
+
56
58
  -----
57
59
 
58
60
  <a id="understand-the-implementation"></a>
@@ -65,7 +67,7 @@ kind: "package-reference"
65
67
 
66
68
  ### 设计理念
67
69
 
68
- 本后端注册提供方并准备全新子会话。`dsh-subagent` 拥有 activation 的深度检查、子 agent 创建、工具和 persona 设置、结构化输出、结果收集及资源释放;发布前的调用方信号取消创建,发布后的句柄通过 `dispose()` 取消并等待完全停稳。
70
+ 本后端注册提供方并准备全新子会话。`dsh-subagent` 拥有 activation 的深度检查、子 agent 创建、preset 组装、结构化输出、结果收集及资源释放;发布前的调用方信号取消创建,发布后的句柄通过 `dispose()` 取消并等待完全停稳。
69
71
 
70
72
  ### 源码地图
71
73
 
@@ -79,7 +81,7 @@ kind: "package-reference"
79
81
 
80
82
  ### 所有权与作用域
81
83
 
82
- 子 agent 获得全新的扁平注册作用域:父级工具限制与权限绝不会被导入,工具所施加的过滤属于组合而非父级派生授权。后端声明包括 `agentOptions` 在内的全部五项启动时能力,因为它控制子 agent 的创建窗口,可以逐一强制执行。
84
+ 子级在继承或独立选择的 preset 之下拥有自身注册作用域,不导入父方的 Agent 局部工具限制。后端在其他启动时能力之外声明 `agentPreset` 和 `agentOptions`,由 subagent manager 在创建子级时应用。
83
85
 
84
86
  </details>
85
87
 
@@ -104,15 +106,15 @@ kind: "package-reference"
104
106
 
105
107
  #### 模型看到什么
106
108
 
107
- 全新子 agent 逐字接收任务内容,作为新空对话中的唯一用户消息,默认使用父级提供方、模型、推理强度、输出 token 上限与工作目录。配置的 persona 会在子 agent 作用域中遮蔽全局提示词文本;工具过滤器会从其 schema、可执行工具查找与 PTC mode SDK 绑定中移除指定的全局工具,但保留独立注册的指导内容。不包含任何父级对话消息;过滤属于组合,而非继承的权限授予。
109
+ 全新子 agent 逐字接收任务内容,作为新空对话中的唯一用户消息,默认使用父级提供方、模型、推理强度、输出 token 上限与工作目录。继承或选定的 preset 提供工具和提示词片段。不包含任何父级对话消息。
108
110
 
109
111
  #### Token 影响
110
112
 
111
- 子 agent 会为全新的独立上下文与历史消耗 token,不复制任何父级历史 token。persona 会改变该子 agent 反复使用的提示词成本;工具过滤器会改变其 schema 或生成 SDK 的成本。
113
+ 子 agent 会为全新的独立上下文与历史消耗 token,不复制任何父级历史 token。preset 的提示词和工具决定重复提示词、schema 和生成 SDK 的成本。
112
114
 
113
115
  #### KV Cache 影响
114
116
 
115
- 子 agent 的请求缓存与父级相互独立。子 agent 历史仅追加;persona、工具过滤、生成 SDK、提供方或模型变化会建立不同的子 agent 前缀。
117
+ 子 agent 的请求缓存与父级相互独立。子 agent 历史仅追加;preset、生成 SDK、提供方或模型变化会建立不同的子 agent 前缀。
116
118
 
117
119
  ### 父级工具结果(间接)
118
120
 
@@ -135,7 +137,7 @@ kind: "package-reference"
135
137
 
136
138
  这些限制说明何时选择该后端是错误的;它们是当前包约束。
137
139
 
138
- - **全新表示不含父级 transcript(文本记录)**——子 agent 继承 cwd、谱系、提供方、模型、推理强度、输出 token 上限及显式配置的 persona/工具限制,但不继承父级的任何对话;需要已完成轮次上下文时,请使用 fork 后端。
140
+ - **全新表示不含父级 transcript(文本记录)**——子 agent 继承 cwd、谱系、提供方、模型、推理强度及输出 token 上限,但不继承父级的任何对话;需要已完成轮次上下文时,请使用 fork 后端。
139
141
 
140
142
  <a id="dev-note"></a>
141
143
  ### 开发备注
package/lib/index.js CHANGED
@@ -14,17 +14,15 @@ const Config = z.object({ providerName: z.string().default("spawn") });
14
14
  * The spawn provider. Supports every start-time capability: `depthLimit` (it
15
15
  * constructs the child, so it can enforce a recursion cap), `outputSchema`
16
16
  * (the scoped structured runtime), `agentOptions` (merged over the parent
17
- * route), and `toolFilter`/`persona` (scoped `restrict()` and a scoped
18
- * shadowing persona section, applied in the child's creation window).
17
+ * route). The selected preset owns persona and tool composition.
19
18
  */
20
19
  var SpawnInProcessProvider = class {
21
20
  name;
22
21
  capabilities = {
23
22
  agentOptions: true,
23
+ agentPreset: true,
24
24
  outputSchema: true,
25
- depthLimit: true,
26
- toolFilter: true,
27
- persona: true
25
+ depthLimit: true
28
26
  };
29
27
  inheritsParentContext = false;
30
28
  constructor(name) {
package/locale/en.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "meta": {
3
+ "title": "subagent-spawn-in-process"
4
+ }
5
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "新建子智能体后端",
4
+ "description": "在当前进程中新建子智能体,执行独立任务。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qlzt/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.2",
4
+ "version": "0.2.1-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -19,37 +19,39 @@
19
19
  "default": "./lib/index.js"
20
20
  },
21
21
  "./src/*": "./src/*",
22
- "./package.json": "./package.json"
22
+ "./package.json": "./package.json",
23
+ "./locale/*.json": "./locale/*.json"
23
24
  },
24
25
  "files": [
26
+ "locale/*.json",
25
27
  "lib/index.js",
26
28
  "lib/types/**/*.d.ts"
27
29
  ],
28
30
  "license": "MIT",
29
31
  "peerDependencies": {
30
- "@qlzt/dsh-subagent": "0.2.1-alpha.2",
31
- "@deepseek-ai/cordis": "~4.0.5-alpha.1"
32
+ "@qlzt/dsh-subagent": "0.2.1-rc.2",
33
+ "@deepseek-ai/cordis": "~4.0.5"
32
34
  },
33
35
  "dependencies": {
34
- "@deepseek-ai/schemastery": "~3.18.5-alpha.1"
36
+ "@deepseek-ai/schemastery": "~3.18.5"
35
37
  },
36
38
  "devDependencies": {
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"
39
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.6",
40
+ "@deepseek-ai/dsh-agent": "0.2.1-rc.2",
41
+ "@deepseek-ai/dsh-agent-loop": "0.2.1-rc.2",
42
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-rc.2",
43
+ "@deepseek-ai/dsh-bash-local": "0.2.1-rc.2",
44
+ "@deepseek-ai/dsh-subprocess-local": "0.2.1-rc.2",
45
+ "@deepseek-ai/dsh-llm": "0.2.1-rc.2",
46
+ "@deepseek-ai/dsh-llm-deepseek": "0.2.1-rc.2",
47
+ "@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.1-rc.2",
48
+ "@deepseek-ai/dsh-session": "0.2.1-rc.2",
49
+ "@deepseek-ai/dsh-subagent": "0.2.1-rc.2",
50
+ "@deepseek-ai/dsh-tool-bash": "0.2.1-rc.2",
51
+ "@deepseek-ai/dsh-tool-subagent": "0.2.1-rc.2",
52
+ "@deepseek-ai/cordis": "~4.0.5",
53
+ "@deepseek-ai/dsh-session-projection": "0.2.1-rc.2",
54
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-rc.2"
53
55
  },
54
56
  "dsh": {}
55
57
  }