@deepseek-ai/dsh-tool-subagent 0.2.3-alpha.2 → 0.2.3-alpha.3

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
@@ -27,8 +27,8 @@
27
27
  en: e28a206c65151ec0
28
28
  zh: 1372242076549ca4
29
29
  /deepseek-ai-dsh-tool-subagent/use-this-package/selecting-a-child-llm:
30
- en: c8b91471fb12f907
31
- zh: 5086e6c62df65b3b
30
+ en: f48d45f009a274e8
31
+ zh: a008f6d5d528b957
32
32
  /deepseek-ai-dsh-tool-subagent/understand-the-implementation:
33
33
  en: 6ce5f749256a7e6c
34
34
  zh: a4f2adb04a70d9cf
@@ -36,8 +36,8 @@
36
36
  en: 6b531756ba1c2c7c
37
37
  zh: 4e3f7500c83cf02d
38
38
  /deepseek-ai-dsh-tool-subagent/understand-the-implementation/activation-ownership:
39
- en: 4a65fd2ecf132237
40
- zh: eb009d94a0b2501a
39
+ en: 346f42d528fe720c
40
+ zh: 3e38b1c9caa14c9e
41
41
  /deepseek-ai-dsh-tool-subagent/understand-the-implementation/result-acknowledgement:
42
42
  en: 3c2d70d479be8e38
43
43
  zh: 9aebdb72223a086e
@@ -57,11 +57,11 @@
57
57
  en: e4c7376d4f29dbd5
58
58
  zh: 6b7a9eaf69c9ea53
59
59
  /deepseek-ai-dsh-tool-subagent/model-experience/tool-schema/what-the-model-sees:
60
- en: 68befd517e6874fb
61
- zh: 823c6fc65eadd9a2
60
+ en: 6f028af15e84649b
61
+ zh: 70e3790e0247e916
62
62
  /deepseek-ai-dsh-tool-subagent/model-experience/tool-schema/token-effect:
63
- en: b36081ab5c06241f
64
- zh: 1e784317ee1fb381
63
+ en: 9724e1e5748d7017
64
+ zh: 278fcff804c58d30
65
65
  /deepseek-ai-dsh-tool-subagent/model-experience/tool-schema/kv-cache-effect:
66
66
  en: 5697c49cb84fb2a4
67
67
  zh: b2b8464d3cbabfa5
@@ -81,14 +81,14 @@
81
81
  en: cf78b9dd5596495f
82
82
  zh: bd44560f8c2435e8
83
83
  /deepseek-ai-dsh-tool-subagent/model-experience/system-prompt/what-the-model-sees:
84
- en: c2f02a2a3b4232a3
85
- zh: 7f7ca71413ef1abb
84
+ en: fe6b91ae48a92128
85
+ zh: 531d3ab1fa59dde7
86
86
  /deepseek-ai-dsh-tool-subagent/model-experience/system-prompt/what-the-model-sees/tool-guidance-section:
87
87
  en: 82b3cd08b3961c98
88
88
  zh: bdc2a34bcea16cac
89
89
  /deepseek-ai-dsh-tool-subagent/model-experience/system-prompt/token-effect:
90
- en: 1dac7ae068a09dab
91
- zh: 408c273c0bdf88d3
90
+ en: ff54caf34d5bbf85
91
+ zh: 40fb686fd84e308a
92
92
  /deepseek-ai-dsh-tool-subagent/model-experience/system-prompt/kv-cache-effect:
93
93
  en: f2224ea48e463d1a
94
94
  zh: 1c69cb360d9271e5
@@ -132,8 +132,8 @@
132
132
  en: f5d5f97a153f7c70
133
133
  zh: 3d6bc05b9eadfbc2
134
134
  /deepseek-ai-dsh-tool-subagent/known-limitations-and-deferred-work:
135
- en: 5e62d35a22719e99
136
- zh: a2bdcf6ef7e40fa4
135
+ en: ad15094a05b17233
136
+ zh: f49b836d73457726
137
137
  /deepseek-ai-dsh-tool-subagent/known-limitations-and-deferred-work/dev-note:
138
138
  en: e67f633dc6fe7773
139
139
  zh: 3bb0c20c93f16f98
package/README.md CHANGED
@@ -76,7 +76,9 @@ Compose persona and tools in the [preset plugin list](../../preset/agent-preset-
76
76
 
77
77
  Set `modelSelection: true` to expose optional `provider`, `model`, and `reasoning_effort` fields; instances without it reject selection fields. Set `modelDiscovery: true` on one instance per tool scope to register `list_subagent_models`; it defaults off independently of `modelSelection`. A second discovery owner in the same scope fails to register. Discovery follows its owning plugin instance, remains available when its delegation provider is absent, and is removed when that instance unloads. Web and Desktop presets enable discovery and route fields on spawn and leave both disabled on fork. Explicit selection by a model-selectable delegation tool and each discovery call read the Host’s `/model-selection-settings` service, so a settings edit applies to the next call in every running, restored, and child Session. When enabled, discovery and explicit selection permit its exact route list. When it is disabled or not mounted, they permit only the parent Agent’s current effective provider/model and its supported efforts. An enabled setting with an empty, malformed, or repeated route list rejects each call that reads it with `SubagentError` code `INVALID_MODEL_SELECTION_SETTINGS`. Ordinary delegation and tools with model selection disabled do not read the route list; a disabled Host setting also leaves the list unread. Sessions record no authorization; earlier `subagent/model-selection-policy` events are ignored. Route fields require a backend that advertises `agentOptions`; in-process Spawn and Fork and DSH SDK qualify, while ACP, Codex, and Claude Code fail the mount.
78
78
 
79
- A call supplies `provider` and `model` together; `reasoning_effort` requires both fields in the same call. An effort-only call rejects before route lookup or child creation. Omitting all three fields preserves configured child defaults and their existing fallback behavior. Static `provider.agentRouteDefaults`, when present, form the provider/model baseline; tool configuration and model fields overlay it before route-aware effort merging and exact-route preflight. Providers without these defaults use compatible values from the parent's latest logged request, then the parent's creation options before its first request, while retaining the configured `maxTokens`. An explicit provider/model pair without an effort clears configured and inherited effort, even when the route is unchanged, so the selected model resolves its default. The live LLM adapter validates the effective route before child creation. Catalog membership remains advisory, so a model can use an unlisted id when its adapter accepts it.
79
+ The same Host setting's optional `defaultModel` route replaces parent inheritance for a call without route fields on a model-selectable delegation tool, whether or not explicit selection is enabled; tool-configured or provider-owned route defaults take precedence over it, and tools without `modelSelection` ignore it. Like an explicit pair without an effort, it uses the selected model's default effort. The route is read at each call, so an edit applies to the next delegation; the model is not told which route is the default, and the `provider` parameter description keeps its omitted-field wording. Clearing the user value restores the deployment's `defaultModel`, if the composition sets one.
80
+
81
+ A call supplies `provider` and `model` together; `reasoning_effort` requires both fields in the same call. An effort-only call rejects before route lookup or child creation. Omitting all three fields preserves configured child defaults and their existing fallback behavior. Static `provider.agentRouteDefaults`, when present, form the provider/model baseline; tool configuration and model fields overlay it before route-aware effort merging and exact-route preflight. Providers without these defaults capture the parent's `agent.model.current()` selection, including a choice the parent has yet to use, and retain the configured `maxTokens`. Local creation keeps that choice through validation and startup. Later choices use the [subagent control API](../subagent/README.md#child-model-choices). An explicit provider/model pair without an effort clears configured and inherited effort, even when the route is unchanged, so the selected model resolves its default. The live LLM adapter validates the effective route before child creation. Catalog membership remains advisory, so a model can use an unlisted id when its adapter accepts it.
80
82
 
81
83
  -----
82
84
 
@@ -94,7 +96,7 @@ One instance is one provider plus one tool name. The plugin registers its defini
94
96
 
95
97
  ### Activation ownership
96
98
 
97
- The tool calls `ctx.subagents.startActivation()` with parent delivery selected. The runtime owns startup cancellation, execution, outcome reporting, and cleanup. A startup failure is an errored tool result. Rejections before startup are coded: a missing calling Agent, `llm` service, or effective parent route throws `ToolContextUnavailableError`; an unpaired route field throws `ToolArgsError`, and an empty route field counts as omitted; and `SubagentError` reports a disabled selection (`MODEL_SELECTION_DISABLED`, `PRESET_SELECTION_DISABLED`), a preset outside the allowlist (`PRESET_NOT_ALLOWED`), a route the current Host setting does not authorize (`MODEL_ROUTE_NOT_ALLOWED`), invalid enabled model-selection settings (`INVALID_MODEL_SELECTION_SETTINGS`), an LLM provider unknown to discovery (`LLM_PROVIDER_NOT_FOUND`), or a provider replaced during route preflight (`PROVIDER_CHANGED`). When the caller can call `list_subagent_models`, unpaired-field and unauthorized-route rejections tell the model to call it. Failures after publication arrive through the completion notice, with diagnostics and partial output preserved by the runtime.
99
+ The tool calls `ctx.subagents.startActivation()` with parent delivery selected. The runtime owns startup cancellation, execution, outcome reporting, and cleanup. A startup failure is an errored tool result. Rejections before startup are coded: a missing calling Agent, `llm` service, or effective parent route throws `ToolContextUnavailableError`; an unpaired route field throws `ToolArgsError`, and an empty route field counts as omitted; and `SubagentError` reports a disabled selection (`MODEL_SELECTION_DISABLED`, `PRESET_SELECTION_DISABLED`), a preset outside the allowlist (`PRESET_NOT_ALLOWED`), a route the current Host setting does not authorize (`MODEL_ROUTE_NOT_ALLOWED`), invalid enabled model-selection settings (`INVALID_MODEL_SELECTION_SETTINGS`), an LLM provider unknown to discovery (`LLM_PROVIDER_NOT_FOUND`), or a provider replaced during route preflight (`PROVIDER_CHANGED`). Unpaired-field and unauthorized-route rejections tell the model to call `list_subagent_models` if it is available. Failures after publication arrive through the completion notice, with diagnostics and partial output preserved by the runtime.
98
100
 
99
101
  ### Result acknowledgement
100
102
 
@@ -139,11 +141,11 @@ Read these pages when the package-level contract is not enough; they move from t
139
141
 
140
142
  #### What the model sees
141
143
 
142
- The generated default [`subagent` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-subagent) appears under the configured tool name while its provider exists. An instance with `modelSelection` adds `provider`, `model`, and `reasoning_effort` in every Session. The `provider` description tells the model to set the fields only when the task needs a different model and names the omitted-field route: the parent's current model and effort, or the default configured for the tool or backend. It names `list_subagent_models` as the source of provider ids when the same instance enables `modelDiscovery`. `allowedAgentPresets` adds the `agent_preset` enum and guidance for the default or inherited selection. Context inheritance and continuation support determine task and follow-up descriptions. Agent restrictions apply to inherited preset delegation tools in schemas, execution, and guidance, including when historical `toolFilter` overrides are restored; sibling Agents remain unaffected. Preset-selection guidance depends only on the tool configuration, so it does not depend on other presets’ declaration order.
144
+ The generated default [`subagent` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-subagent) appears under the configured tool name while its provider exists. An instance with `modelSelection` adds `provider`, `model`, and `reasoning_effort` in every Session. The `provider` description asks for `provider` and `model` together only when the task requires a specific model. It names `list_subagent_models` as the source of provider ids when the same instance enables `modelDiscovery`. `allowedAgentPresets` adds the `agent_preset` enum and guidance for the default or inherited selection. Context inheritance and continuation support determine task and follow-up descriptions. Agent restrictions apply to inherited preset delegation tools in schemas, guidance, and execution, including when historical `toolFilter` overrides are restored; sibling Agents remain unaffected. Preset-selection guidance depends only on the tool configuration, so it does not depend on other presets’ declaration order.
143
145
 
144
146
  #### Token effect
145
147
 
146
- Fixed schema cost per parent request, including the optional `name` field; `modelSelection` adds three optional route fields, while preset selection adds one enum parameter and default guidance. Each tool instance adds one schema; visible delegation tools share one short system-prompt section.
148
+ Fixed schema cost per parent request, including the optional `name` field; `modelSelection` adds three optional route fields, while preset selection adds one enum parameter and default guidance. Each tool instance adds one schema; the delegation tools share one short system-prompt section.
147
149
 
148
150
  #### KV Cache effect
149
151
 
@@ -167,7 +169,7 @@ The schema is prefix-stable across adapter registration and catalog changes. Eac
167
169
 
168
170
  #### What the model sees
169
171
 
170
- Visible delegation tools share delegation and collaboration guidance, listing tools in name order and instructing the model to start independent delegations together and keep working while they run, and to end its turn instead of sleeping or polling when only waiting for their results remains. Ending the turn works because a settled child notifies its parent and a notice that reaches an idle parent starts one independent model request; hosts that keep children progressing alternate `agent.whenIdle()` and `waitForChildren(agent)` ([`dsh-subagent`](../subagent/README.md), [`session.ts`](../../acp/acp/src/session.ts)). Hidden or unavailable tools are omitted; no guidance appears when none are visible. With both `subagent` and `subagent_fork` visible and the default concurrency limit of `8`, the text is:
172
+ Every delegation tool carries `tool:subagent` as its `guidance`, so the delegation tools of one composition share one delegation and collaboration section, which lists, in name order, the delegation tools the Agent can call and instructs the model to start independent delegations together and keep working while they run, and to end its turn instead of sleeping or polling when only waiting for their results remains. Ending the turn works because a settled child notifies its parent and a notice that reaches an idle parent starts one independent model request; hosts that keep children progressing alternate `agent.whenIdle()` and `waitForChildren(agent)` ([`dsh-subagent`](../subagent/README.md), [`session.ts`](../../acp/acp/src/session.ts)). A tool whose provider is unavailable or that the Agent's scope restricts is omitted, and no guidance appears when the Agent can call none. With both `subagent` and `subagent_fork` mounted and the default concurrency limit of `8`, the text is:
171
173
 
172
174
  ##### Tool-guidance section
173
175
 
@@ -179,7 +181,7 @@ Bash, formatters, code generators, and scripts can overwrite concurrent edits wi
179
181
 
180
182
  #### Token effect
181
183
 
182
- Two guidance paragraphs per parent request with visible delegation tools, listing their names and shared-file coordination rules.
184
+ Two guidance paragraphs per parent request whose Agent can call a delegation tool, listing the callable delegation tools and the shared-file coordination rules; a restricted delegation tool is left out, and no section is sent when the Agent can call none.
183
185
 
184
186
  #### KV Cache effect
185
187
 
@@ -244,6 +246,8 @@ These limits define what this tool does not return or enforce; they are current
244
246
  - **Preset choices omit descriptions** — `agent_preset` exposes ids and default or inheritance guidance only. The schema does not read candidate preset documents, so registration is independent of their declaration order. Use ids that convey each candidate's purpose.
245
247
  - **Preset references are checked on delegation** — Host-mounted and preset-mounted tools both resolve the target when starting a child. A target can be declared or replaced after tool registration, so loading the tool cannot establish its availability for a later call. Misspelled or unavailable ids remain undetected until selected; that call returns an error.
246
248
  - **Shipped fork tools omit model selection** — their configuration leaves `modelSelection` disabled to preserve inherited-prefix reuse. Custom fork tools may enable it under the same Host authorization and adapter validation as other delegation tools.
249
+ - **Delegation guidance can outlive its tools across restarts** — a retirement is detected only for a source this process saw, so a Session resumed in a process without a delegation tool keeps the `tool:subagent` section it saw without a notice ([source lifecycle](../../core/system-prompt/README.md#known-limitations-and-deferred-work)).
250
+ - **Sessions from earlier releases can repeat the delegation guidance** — earlier releases named the shared section after the first callable delegation tool in name order. A resumed Session whose first such tool was not `subagent` keeps that `tool:<name>` section and also receives `tool:subagent` with the same text.
247
251
  - **Depth caps are fixed per instance** — another cap requires another distinctly named tool. Child personas and tools belong to the selected Agent Preset. Explicit LLM selection requires `modelSelection` and is restricted to the routes the Host setting authorizes at call time, or the current parent route when it is disabled.
248
252
 
249
253
  <a id="dev-note"></a>
package/README.zh.md CHANGED
@@ -76,7 +76,9 @@ kind: "package-reference"
76
76
 
77
77
  设置 `modelSelection: true` 后,该实例公开可选的 `provider`、`model` 和 `reasoning_effort` 字段;未设置的实例拒绝选择字段。在每个工具作用域的一个实例上设置 `modelDiscovery: true`,以注册 `list_subagent_models`;该选项独立于 `modelSelection`,默认关闭。同一作用域的第二个发现工具所有者会注册失败。发现工具随其所属插件实例存续,在委派提供方缺席时仍然可用,并在该实例卸载时移除。Web 与 Desktop preset 为 spawn 启用发现和路由字段,为 fork 保持两者关闭。允许模型选择的委派工具在显式选择路由时、发现工具在每次调用时读取 Host 的 `/model-selection-settings` 服务,因此设置编辑会对所有运行中、已恢复和子 Session 的下一次调用生效。启用时,发现和显式选择允许其精确路由列表。设置关闭或未挂载时,只允许父 Agent 当前生效的 provider/model 及其支持的强度。启用但路由列表为空、格式无效或重复时,读取该设置的每次调用都会抛出错误码为 `INVALID_MODEL_SELECTION_SETTINGS` 的 `SubagentError`。普通委派和关闭模型选择的工具不读取路由列表;Host 设置关闭时也不读取该列表。Session 不记录授权;忽略早期的 `subagent/model-selection-policy` 事件。路由字段要求后端公布 `agentOptions`;进程内 Spawn、Fork 和 DSH SDK 满足条件,ACP、Codex 和 Claude Code 会使挂载失败。
78
78
 
79
- 一次调用需同时提供 `provider` 与 `model`;`reasoning_effort` 要求同一次调用包含这两个字段。仅指定强度的调用会在查询路由或创建子级之前被拒绝。省略全部三个字段时,保留配置的子级默认值与现有回退行为。静态的 `provider.agentRouteDefaults` 在存在时构成提供方/模型基线;工具配置与模型字段会在路由相关强度合并和确切路由预检前覆盖它。没有这些默认值的提供方会使用父 agent 最新已记录请求中的兼容值,再使用父级首次请求前的创建选项,并保留配置的 `maxTokens`。显式提供提供方/模型组合但省略强度时,会清除配置及继承的强度,即使路由未变,也由所选模型解析自己的默认值。实时 LLM 适配器在创建子 agent 前校验有效路由。目录成员资格只提供建议,因此适配器接受时,模型可以使用未列出的 id。
79
+ 同一 Host 设置中可选的 `defaultModel` 路由,会在允许模型选择的委派工具收到不含路由字段的调用时取代对父 Agent 的继承,无论显式选择是否启用;工具配置或提供方自有的路由默认值优先于它,未设置 `modelSelection` 的工具忽略它。与未指定强度的显式 provider/model 组合一样,它使用所选模型的默认强度。每次调用时都会读取该路由,因此编辑会在下一次委派时生效;模型不会被告知默认路由是哪一个,`provider` 参数描述保留其省略字段时的措辞。清除用户设置的值后,如果组合设置了部署的 `defaultModel`,则恢复为该值。
80
+
81
+ 一次调用需同时提供 `provider` 与 `model`;`reasoning_effort` 要求同一次调用包含这两个字段。仅指定强度的调用会在查询路由或创建子级之前被拒绝。省略全部三个字段时,保留配置的子级默认值与现有回退行为。静态的 `provider.agentRouteDefaults` 在存在时构成提供方/模型基线;工具配置与模型字段会在路由相关强度合并和确切路由预检前覆盖它。没有这些默认值的提供方捕获父代理的 `agent.model.current()`,包括刚选中、尚未使用的模型,并保留配置的 `maxTokens`。本地子级在校验和启动期间使用该选择。创建后可通过[子代理控制 API](../subagent/README.zh.md#child-model-choices)切换模型。显式提供提供方/模型组合但省略强度时,会清除配置及继承的强度,即使路由未变,也由所选模型解析自己的默认值。实时 LLM 适配器在创建子 agent 前校验有效路由。目录成员资格只提供建议,因此适配器接受时,模型可以使用未列出的 id。
80
82
 
81
83
  -----
82
84
 
@@ -94,7 +96,7 @@ kind: "package-reference"
94
96
 
95
97
  ### Activation 所有权
96
98
 
97
- 工具调用 `ctx.subagents.startActivation()`,并选择向父任务交付。运行时拥有启动取消、执行、结果汇报与清理。启动失败产生出错的工具结果。启动前的拒绝都带 code:缺少调用方 Agent、`llm` 服务或有效的父级路由时抛出 `ToolContextUnavailableError`;路由字段未成对提供时抛出 `ToolArgsError`,空字符串路由字段视为未提供;`SubagentError` 报告选择被禁用(`MODEL_SELECTION_DISABLED`、`PRESET_SELECTION_DISABLED`)、preset 不在允许列表中(`PRESET_NOT_ALLOWED`)、当前 Host 设置未授权该路由(`MODEL_ROUTE_NOT_ALLOWED`)、已启用的模型选择设置无效(`INVALID_MODEL_SELECTION_SETTINGS`)、发现查询的 LLM 提供方未注册(`LLM_PROVIDER_NOT_FOUND`),或路由预检期间提供方被替换(`PROVIDER_CHANGED`)。调用方可以调用 `list_subagent_models` 时,未成对字段和未授权路由的拒绝会提示模型调用它。发布后的失败通过完成通知到达,运行时保留诊断和部分输出。
99
+ 工具调用 `ctx.subagents.startActivation()`,并选择向父任务交付。运行时拥有启动取消、执行、结果汇报与清理。启动失败产生出错的工具结果。启动前的拒绝都带 code:缺少调用方 Agent、`llm` 服务或有效的父级路由时抛出 `ToolContextUnavailableError`;路由字段未成对提供时抛出 `ToolArgsError`,空字符串路由字段视为未提供;`SubagentError` 报告选择被禁用(`MODEL_SELECTION_DISABLED`、`PRESET_SELECTION_DISABLED`)、preset 不在允许列表中(`PRESET_NOT_ALLOWED`)、当前 Host 设置未授权该路由(`MODEL_ROUTE_NOT_ALLOWED`)、已启用的模型选择设置无效(`INVALID_MODEL_SELECTION_SETTINGS`)、发现查询的 LLM 提供方未注册(`LLM_PROVIDER_NOT_FOUND`),或路由预检期间提供方被替换(`PROVIDER_CHANGED`)。未成对字段和未授权路由的拒绝会在 `list_subagent_models` 可用时提示模型调用它。发布后的失败通过完成通知到达,运行时保留诊断和部分输出。
98
100
 
99
101
  ### 结果确认
100
102
 
@@ -139,11 +141,11 @@ kind: "package-reference"
139
141
 
140
142
  #### 模型看到什么
141
143
 
142
- 生成的默认 [`subagent` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-subagent) 在提供方存在时以配置的工具名公开。设置了 `modelSelection` 的实例在每个 Session 中都会增加 `provider`、`model`、`reasoning_effort`。`provider` 的描述告诉模型仅在任务需要其他模型时才设置这些字段,并说明省略时使用的路由:父级当前模型和推理强度,或工具或后端配置的默认值。同一实例启用 `modelDiscovery` 时,它还指明 provider id 取自 `list_subagent_models`。`allowedAgentPresets` 增加 `agent_preset` 枚举及默认或继承选择的引导。上下文继承和继续执行能力决定任务与后续工作描述。Agent 限制同时作用于继承自 preset 的委派工具的 schema、执行入口和指导文本,恢复历史 `toolFilter` 覆盖时也相同;同级 Agent 不受影响。preset 选择提示仅依赖工具配置,因此不依赖其他 preset 的声明顺序。
144
+ 生成的默认 [`subagent` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-subagent) 在提供方存在时以配置的工具名公开。设置了 `modelSelection` 的实例在每个 Session 中都会增加 `provider`、`model`、`reasoning_effort`。`provider` 的说明要求仅在任务需要指定模型时才同时填写 `provider` 和 `model`。同一实例启用 `modelDiscovery` 时,它还指明 provider id 取自 `list_subagent_models`。`allowedAgentPresets` 增加 `agent_preset` 枚举及默认或继承选择的引导。上下文继承和继续执行能力决定任务与后续工作描述。Agent 限制作用于继承自 preset 的委派工具的 schema、使用指引与执行入口,恢复历史 `toolFilter` 覆盖时也相同;同级 Agent 不受影响。preset 选择提示仅依赖工具配置,因此不依赖其他 preset 的声明顺序。
143
145
 
144
146
  #### Token 影响
145
147
 
146
- 每次父级请求承担固定 schema 成本,其中包括可选的 `name` 字段;`modelSelection` 会增加三个可选路由字段,preset 选择则增加一个枚举参数及默认值引导。每个工具实例增加一份 schema;可见委派工具共享一个简短系统提示词段。
148
+ 每次父级请求承担固定 schema 成本,其中包括可选的 `name` 字段;`modelSelection` 会增加三个可选路由字段,preset 选择则增加一个枚举参数及默认值引导。每个工具实例增加一份 schema;这些委派工具共享一个简短系统提示词段。
147
149
 
148
150
  #### KV Cache 影响
149
151
 
@@ -167,7 +169,7 @@ kind: "package-reference"
167
169
 
168
170
  #### 模型看到什么
169
171
 
170
- 可见的委派工具共享委派与协作指导,列出按名称排序的工具,指示模型一起启动相互独立的委派,并在它们运行时继续工作;当只剩等待它们的结果时,结束本轮,而不是休眠或轮询。结束本轮之所以可行,是因为子代理结束后会通知父级,而通知到达空闲父级会起一次独立的模型请求;在子代理继续推进期间,宿主交替等待 `agent.whenIdle()` 与 `waitForChildren(agent)`([`dsh-subagent`](../subagent/README.zh.md)、[`session.ts`](../../acp/acp/src/session.ts))。隐藏或不可用的工具不列入其中;没有可见工具时,不输出指导。`subagent` 和 `subagent_fork` 都可见且并发上限为默认值 `8` 时,文本为:
172
+ 每个委派工具都以 `tool:subagent` 作为其 `guidance`,因此同一组合中的委派工具共享一个委派与协作段。该段按名称顺序列出该 Agent 可以调用的委派工具,指示模型一起启动相互独立的委派,并在它们运行时继续工作;当只剩等待它们的结果时,结束本轮,而不是休眠或轮询。结束本轮之所以可行,是因为子代理结束后会通知父级,而通知到达空闲父级会起一次独立的模型请求;在子代理继续推进期间,宿主交替等待 `agent.whenIdle()` 与 `waitForChildren(agent)`([`dsh-subagent`](../subagent/README.zh.md)、[`session.ts`](../../acp/acp/src/session.ts))。提供方不可用的工具,或该 Agent 的作用域所限制的工具,都不列入其中;该 Agent 无法调用任何委派工具时不出现使用指引。`subagent` 和 `subagent_fork` 都已挂载且并发上限为默认值 `8` 时,文本为:
171
173
 
172
174
  ##### 工具指导 section
173
175
 
@@ -179,7 +181,7 @@ Bash, formatters, code generators, and scripts can overwrite concurrent edits wi
179
181
 
180
182
  #### Token 影响
181
183
 
182
- 有可见委派工具时,每个父级请求包含两段指导,列出可见工具名和共享文件协作规则。
184
+ Agent 可以调用委派工具时,每个父级请求包含两段使用指引,列出可调用的委派工具和共享文件协作规则;受限的委派工具不会列出,Agent 无法调用任何委派工具时不发送该段。
183
185
 
184
186
  #### KV Cache 影响
185
187
 
@@ -244,6 +246,8 @@ Delegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do no
244
246
  - **预设选项不含描述**——`agent_preset` 只公开 id 及默认或继承提示。schema 不读取候选预设文档,因此注册不依赖它们的声明顺序。请使用能够表达各候选用途的 id。
245
247
  - **预设引用在委派时检查**——Host 挂载和预设内挂载的工具都在启动子级时解析目标。目标可以在工具注册后声明或替换,因此加载工具无法确定后续调用时目标是否可用。拼错或不可用的 id 在被选中前不会被发现;选中它的调用会返回错误。
246
248
  - **随附 fork 工具省略模型选择**:其配置保持 `modelSelection` 关闭,以保留对继承前缀的复用。自定义 fork 工具可以启用它,并接受与其他委派工具相同的 Host 授权和适配器校验。
249
+ - **委派使用指引可能在重启后比其工具存留更久**——只有当前进程见过的来源才会被检测为退役,因此在没有委派工具的进程中恢复的会话会保留它见过的 `tool:subagent` 段,且不会收到通知([来源生命周期](../../core/system-prompt/README.zh.md#known-limitations-and-deferred-work))。
250
+ - **早期版本的会话可能重复委派使用指引**——早期版本以名称顺序中第一个可调用的委派工具命名共享段。若恢复的会话中这样的第一个工具不是 `subagent`,该会话会保留那个 `tool:<name>` 段,同时还会收到文本相同的 `tool:subagent`。
247
251
  - **深度上限按实例固定** — 更换上限需要另一个不同名称的工具。子级角色和工具由所选 Agent Preset 配置。显式 LLM 选择需要 `modelSelection`,并受调用时 Host 设置授权的路由限制,设置关闭时只允许当前父级路由。
248
252
 
249
253
  <a id="dev-note"></a>
package/lib/index.js CHANGED
@@ -36,7 +36,7 @@ function hasDelegationModelRequest(request) {
36
36
  return request.provider !== void 0 || request.model !== void 0 || request.reasoning_effort !== void 0;
37
37
  }
38
38
  /** Model-facing pointer to route discovery, appended to route-selection rejections. */
39
- const ROUTE_DISCOVERY_HINT = " Call `list_subagent_models` to see the routes you may select.";
39
+ const ROUTE_DISCOVERY_HINT = " Call `list_subagent_models`, if available, to see the routes you may select.";
40
40
  /**
41
41
  * Validate explicit selection against the current Host setting and merge it over child defaults.
42
42
  * Explicit selection requires both provider and model; an omitted effort then
@@ -46,21 +46,19 @@ const ROUTE_DISCOVERY_HINT = " Call `list_subagent_models` to see the routes you
46
46
  * @param enabled - Whether this tool instance permits model-facing selection.
47
47
  * @param policy - Current Host allowlist; omission permits only the current parent route.
48
48
  * @param parentOptions - Current parent route used when the Host setting is disabled or absent.
49
- * @param routeDiscoveryVisible - Whether the caller can call `list_subagent_models`; rejections then point to it.
50
49
  * @returns Child Agent options, preserving omission when no layer contributes one.
51
50
  * @throws {SubagentError} `MODEL_SELECTION_DISABLED` when this tool instance
52
51
  * forbids selection, or `MODEL_ROUTE_NOT_ALLOWED` when the allowlist excludes the route.
53
52
  * @throws {ToolArgsError} when `provider` and `model` are not supplied together.
54
53
  */
55
- function requestedAgentOptions(configured, request, enabled, policy, parentOptions, routeDiscoveryVisible) {
54
+ function requestedAgentOptions(configured, request, enabled, policy, parentOptions) {
56
55
  if (!hasDelegationModelRequest(request)) return configured;
57
56
  if (!enabled) throw new SubagentError("child model selection is disabled for this tool instance", "MODEL_SELECTION_DISABLED");
58
- const hint = routeDiscoveryVisible ? ROUTE_DISCOVERY_HINT : "";
59
- if (request.provider === void 0 || request.model === void 0) throw new ToolArgsError([(request.reasoning_effort === void 0 ? "child LLM `provider` and `model` must be supplied together." : "child LLM `reasoning_effort` requires both `provider` and `model`; supply both or omit all three fields.") + hint]);
57
+ if (request.provider === void 0 || request.model === void 0) throw new ToolArgsError([(request.reasoning_effort === void 0 ? "child LLM `provider` and `model` must be supplied together." : "child LLM `reasoning_effort` requires both `provider` and `model`; supply both or omit all three fields.") + ROUTE_DISCOVERY_HINT]);
60
58
  assertAllowedModelSelection(policy, parentOptions, {
61
59
  provider: request.provider,
62
60
  model: request.model
63
- }, routeDiscoveryVisible);
61
+ });
64
62
  return {
65
63
  ...configured,
66
64
  provider: request.provider,
@@ -73,13 +71,12 @@ function requestedAgentOptions(configured, request, enabled, policy, parentOptio
73
71
  * @param policy - Current Host allowlist; omission permits only the current parent route.
74
72
  * @param parentOptions - Current parent route used when the Host setting is disabled or absent.
75
73
  * @param route - Validated provider/model pair from the tool call.
76
- * @param routeDiscoveryVisible - Whether the caller can call `list_subagent_models`; the rejection then points to it.
77
74
  * @throws {SubagentError} `MODEL_ROUTE_NOT_ALLOWED` when the allowlist excludes the route.
78
75
  */
79
- function assertAllowedModelSelection(policy, parentOptions, route, routeDiscoveryVisible) {
76
+ function assertAllowedModelSelection(policy, parentOptions, route) {
80
77
  const { provider, model } = route;
81
78
  if (policy === void 0 ? provider === parentOptions.provider && model === parentOptions.model : policy.routes.some((route) => route.provider === provider && route.model === model)) return;
82
- throw new SubagentError(`child LLM route "${provider}/${model}" is not allowed by the current subagent model selection setting` + (policy === void 0 ? "; while subagent model selection is disabled, explicit selection is limited to the parent route" : "") + "." + (routeDiscoveryVisible ? ROUTE_DISCOVERY_HINT : ""), "MODEL_ROUTE_NOT_ALLOWED");
79
+ throw new SubagentError(`child LLM route "${provider}/${model}" is not allowed by the current subagent model selection setting` + (policy === void 0 ? "; while subagent model selection is disabled, explicit selection is limited to the parent route" : "") + ". Call `list_subagent_models`, if available, to see the routes you may select.", "MODEL_ROUTE_NOT_ALLOWED");
83
80
  }
84
81
  /**
85
82
  * Whether configured Agent options require route validation before delegation.
@@ -257,7 +254,12 @@ const inject = [
257
254
  "subagents",
258
255
  "systemPrompt"
259
256
  ];
260
- const delegationTools = /* @__PURE__ */ new Set();
257
+ /**
258
+ * Guidance section every delegation tool shares. Whichever registration the
259
+ * system prompt renders lists the delegation tools the viewing scope's
260
+ * registrations resolve.
261
+ */
262
+ const DELEGATION_SECTION = "tool:subagent";
261
263
  const Config = z.object({
262
264
  provider: z.string().required(),
263
265
  toolName: z.string().default("subagent"),
@@ -320,15 +322,25 @@ function apply(ctx, config) {
320
322
  const initialProvider = ctx.subagents.getProvider(config.provider);
321
323
  if (initialProvider !== void 0) assertSubagentProviderConfiguration(initialProvider);
322
324
  if (config.modelDiscovery === true) registerListSubagentModels(ctx);
325
+ /**
326
+ * Read the Host default child route for a call without route fields. It
327
+ * replaces only parent inheritance: tool or provider route defaults win.
328
+ */
329
+ const settingsDefaultRoute = (subagentProvider) => modelSelectionEnabled && subagentProvider.agentRouteDefaults === void 0 && config.agentOptions?.provider === void 0 && config.agentOptions?.model === void 0 ? ctx.get("subagentModelSelection")?.defaultRoute() : void 0;
323
330
  let mounted;
324
331
  const mount = (subagentProvider) => {
325
332
  assertSubagentProviderConfiguration(subagentProvider);
326
333
  const wording = providerWording(subagentProvider.inheritsParentContext);
327
334
  const providerRouteDefaults = subagentProvider.agentRouteDefaults;
328
- const defaultRoute = providerRouteDefaults !== void 0 || hasConfiguredLlmSelection(config.agentOptions) ? "the default model configured for this tool" : "your current model and reasoning effort";
329
335
  const providerSource = config.modelDiscovery === true ? " Use a provider id listed by `list_subagent_models`." : "";
330
336
  const definition = defineTool({
331
337
  name: toolName,
338
+ guidance: {
339
+ section: DELEGATION_SECTION,
340
+ order: "TOOL_SUBAGENT",
341
+ retirement: "The subagent delegation tools are no longer available. Their instructions no longer apply.",
342
+ text: (available) => `Start independent delegations with ${available.map((name) => `\`${name}\``).join(" or ")} together in one assistant message and continue useful work while they run. The concurrency limit of all the subagents is ${ctx.subagents.maxActiveSubagents}. When only waiting for their results remains, end your turn instead of sleeping or polling; the next result starts a new turn. Collect the subagent results required to complete the task before giving the user a final answer.\n\nBash, formatters, code generators, and scripts can overwrite concurrent edits without conflict detection; coordinate their changes explicitly. The agent integrating the work must review the final diff and run relevant tests.`
343
+ },
332
344
  description: wording.description + " This tool starts an independently managed subagent and immediately returns its name. If you are still online when it finishes, the runtime automatically delivers its completion notice. The notice includes the final answer unless the child sent you a message just before finishing." + (subagentProvider.prepareContinuable !== void 0 ? " Use `send_message` to steer it while running or continue its conversation after it finishes." : " This backend does not accept follow-up messages.") + (modelSelectionEnabled && subagentProvider.inheritsParentContext ? " Changing the route can prevent provider-side reuse of the inherited conversation prefix." : ""),
333
345
  parameters: {
334
346
  description: {
@@ -353,7 +365,7 @@ function apply(ctx, config) {
353
365
  ...modelSelectionEnabled ? {
354
366
  provider: {
355
367
  type: "string",
356
- description: `LLM provider id for the subagent; requires \`model\`. Set only when the task needs a different model; omit \`provider\`, \`model\`, and \`reasoning_effort\` to run the subagent on ${defaultRoute}.${providerSource}`
368
+ description: "LLM provider id for the subagent. Set it with `model` only when the task requires a specific model." + providerSource
357
369
  },
358
370
  model: {
359
371
  type: "string",
@@ -396,18 +408,23 @@ function apply(ctx, config) {
396
408
  if (!parent) throw new ToolContextUnavailableError("subagent tool requires a calling agent (exec.agent was undefined)");
397
409
  const agentPreset = presets.resolve(args);
398
410
  const modelRequest = delegationModelRequest(args);
411
+ const settingsRoute = hasDelegationModelRequest(modelRequest) ? void 0 : settingsDefaultRoute(subagentProvider);
399
412
  const routes = modelSelectionEnabled && hasDelegationModelRequest(modelRequest) ? ctx.get("subagentModelSelection")?.allowedRoutes() : void 0;
400
413
  const modelSelectionPolicy = routes === void 0 ? void 0 : { routes };
401
414
  const parentOptions = parentAgentOptionsForDelegation(parent);
402
- const requiresRoutePreflight = hasDelegationModelRequest(modelRequest) || hasConfiguredLlmSelection(config.agentOptions);
403
- const requestedChildAgentOptions = requestedAgentOptions(requiresRoutePreflight && providerRouteDefaults !== void 0 ? {
415
+ const requiresRoutePreflight = hasDelegationModelRequest(modelRequest) || hasConfiguredLlmSelection(config.agentOptions) || settingsRoute !== void 0;
416
+ const requestedChildAgentOptions = requestedAgentOptions(settingsRoute !== void 0 ? {
417
+ ...config.agentOptions,
418
+ ...settingsRoute,
419
+ reasoningEffort: void 0
420
+ } : requiresRoutePreflight && providerRouteDefaults !== void 0 ? {
404
421
  ...providerRouteDefaults,
405
422
  ...config.agentOptions
406
- } : config.agentOptions, modelRequest, modelSelectionEnabled, modelSelectionPolicy, parentOptions, ctx.tools.get("list_subagent_models", parent, exec.toolSet) !== void 0);
407
- if (requiresRoutePreflight) {
423
+ } : config.agentOptions, modelRequest, modelSelectionEnabled, modelSelectionPolicy, parentOptions);
424
+ if (subagentProvider.prepareContinuable === void 0 && requiresRoutePreflight) {
408
425
  const llm = ctx.get("llm");
409
426
  if (llm === void 0) throw new ToolContextUnavailableError("cannot resolve the selected child LLM route because the `llm` service is unavailable");
410
- const inheritParentReasoningEffort = providerRouteDefaults === void 0 && !hasDelegationModelRequest(modelRequest);
427
+ const inheritParentReasoningEffort = providerRouteDefaults === void 0 && !hasDelegationModelRequest(modelRequest) && settingsRoute === void 0;
411
428
  await preflightChildLlmRoute(llm, parentOptions, requestedChildAgentOptions, exec.signal, inheritParentReasoningEffort);
412
429
  if (ctx.subagents.getProvider(config.provider) !== subagentProvider) throw new SubagentError(`subagent provider "${config.provider}" changed while resolving the child LLM route; retry the delegation`, "PROVIDER_CHANGED");
413
430
  }
@@ -439,14 +456,7 @@ function apply(ctx, config) {
439
456
  mounted = {
440
457
  subagentProvider,
441
458
  definition,
442
- disposeTool: ctx.effect(() => {
443
- const unregister = ctx.tools.register(definition);
444
- delegationTools.add(definition);
445
- return () => {
446
- delegationTools.delete(definition);
447
- unregister();
448
- };
449
- })
459
+ disposeTool: ctx.effect(() => ctx.tools.register(definition))
450
460
  };
451
461
  };
452
462
  ctx.on("subagent/provider-added", (subagentProvider) => {
@@ -460,22 +470,11 @@ function apply(ctx, config) {
460
470
  const present = ctx.subagents.getProvider(config.provider);
461
471
  if (present !== void 0) mount(present);
462
472
  else ctx.logger.info(`subagent provider "${config.provider}" not registered yet; the "${config.toolName ?? "subagent"}" tool will register when it appears`);
463
- ctx.systemPrompt.section({
464
- name: `tool:${toolName}`,
465
- order: ctx.systemPrompt.getSectionOrder("TOOL_SUBAGENT"),
466
- retirement: `The ${toolName} tool is no longer available. Its instructions no longer apply.`,
467
- text: (context) => {
468
- if (mounted === void 0) return "";
469
- const visible = [...delegationTools].filter((tool) => ctx.tools.get(tool.name, context.scope) === tool).map((tool) => tool.name).sort();
470
- if (visible[0] !== toolName) return "";
471
- return `Start independent delegations with ${visible.map((name) => `\`${name}\``).join(" or ")} together in one assistant message and continue useful work while they run. The concurrency limit of all the subagents is ${ctx.subagents.maxActiveSubagents}. When only waiting for their results remains, end your turn instead of sleeping or polling; the next result starts a new turn. Collect the subagent results required to complete the task before giving the user a final answer.\n\nBash, formatters, code generators, and scripts can overwrite concurrent edits without conflict detection; coordinate their changes explicitly. The agent integrating the work must review the final diff and run relevant tests.`;
472
- }
473
- });
474
473
  ctx.systemPrompt.context({
475
474
  name: `tool:${toolName}:depth`,
476
475
  order: ctx.systemPrompt.getContextOrder("SUBAGENT_DELEGATION"),
477
476
  text: (context) => {
478
- if (context.agent === void 0 || mounted === void 0 || ctx.tools.get(toolName, context.scope) !== mounted.definition) return "";
477
+ if (context.agent === void 0 || mounted === void 0) return "";
479
478
  const maxDepth = ctx.subagents.resolveMaxDepth(config.maxDepth);
480
479
  if (maxDepth === void 0) return "";
481
480
  const depth = delegationDepthOf(context.agent);
@@ -40,12 +40,13 @@ function assertAllowedModelRoutes(routes) {
40
40
  }
41
41
  //#endregion
42
42
  //#region lib/types/model-selection-settings.js
43
- /** Host settings owner whose current value authorizes explicit child routes in every Session. */
43
+ /** Host settings owner whose current value authorizes explicit child routes and names the default child route in every Session. */
44
44
  var SubagentModelSelectionConfig = class extends Service {
45
45
  config;
46
46
  static Config = z.object({
47
47
  enabled: z.boolean().default(false).volatile(),
48
- allowedModels: z.array(AllowedModelRouteSchema).default([]).volatile()
48
+ allowedModels: z.array(AllowedModelRouteSchema).default([]).volatile(),
49
+ defaultModel: AllowedModelRouteSchema.default(void 0).volatile()
49
50
  });
50
51
  constructor(ctx, config) {
51
52
  super(ctx, "subagentModelSelection");
@@ -65,6 +66,18 @@ var SubagentModelSelectionConfig = class extends Service {
65
66
  if (allowedModels.length === 0) throw new SubagentError("enabled subagent model selection requires at least one allowed model", "INVALID_MODEL_SELECTION_SETTINGS");
66
67
  return allowedModels.map((route) => ({ ...route }));
67
68
  }
69
+ /**
70
+ * Read the route a child uses when its delegation names none. Each call
71
+ * samples the live setting, independently of `enabled` and `allowedModels`.
72
+ * @returns a detached route, or undefined when the setting names none.
73
+ */
74
+ defaultRoute() {
75
+ const route = this.config.defaultModel.get();
76
+ return route === void 0 ? void 0 : {
77
+ provider: route.provider,
78
+ model: route.model
79
+ };
80
+ }
68
81
  };
69
82
  const name = "subagent-model-selection-settings";
70
83
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAIxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAmB1D,OAAO,EAA2B,KAAK,qBAAqB,EAA+B,MAAM,uBAAuB,CAAA;AAExH,OAAO,4BAA4B,CAAA;AAGnC,eAAO,MAAM,IAAI,kBAAkB,CAAA;AACnC,eAAO,MAAM,MAAM,UAAyC,CAAA;AAM5D,qFAAqF;AACrF,MAAM,WAAW,MAAO,SAAQ,qBAAqB;IACnD,gFAAgF;IAChF,QAAQ,EAAE,MAAM,CAAA;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO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AAK,CAAC,CAAA;YAC9C,IAAI,KAAK,GAAG,QAAQ;gBAAE,OAAO,EAAE,CAAA;YAC/B,OAAO,0BAA0B,QAAQ,eAAe,KAAK,aAAa,QAAQ,uBAAuB;kBACrG,kBAAkB,QAAQ,gDAAgD,CAAA;QAChF,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
@@ -16,16 +16,20 @@ export interface Config {
16
16
  enabled: Volatile<boolean>;
17
17
  /** Initial route list inherited when the user document does not override it. */
18
18
  allowedModels: Volatile<AllowedModelRoute[]>;
19
+ /** Route that replaces parent inheritance for children started without route fields; omission inherits the parent route. */
20
+ defaultModel: Volatile<AllowedModelRoute | undefined>;
19
21
  }
20
- /** Host settings owner whose current value authorizes explicit child routes in every Session. */
22
+ /** Host settings owner whose current value authorizes explicit child routes and names the default child route in every Session. */
21
23
  export declare class SubagentModelSelectionConfig extends Service {
22
24
  private config;
23
25
  static Config: z<Schemastery.ObjectS<NoInfer<{
24
26
  enabled: z<boolean, boolean, "volatile-defined">;
25
27
  allowedModels: z<NoInfer<AllowedModelRoute[]>, NoInfer<AllowedModelRoute[]>, "volatile-defined">;
28
+ defaultModel: z<NoInfer<AllowedModelRoute | undefined>, NoInfer<AllowedModelRoute | undefined>, "volatile-defined">;
26
29
  }>>, Schemastery.ObjectT<NoInfer<{
27
30
  enabled: z<boolean, boolean, "volatile-defined">;
28
31
  allowedModels: z<NoInfer<AllowedModelRoute[]>, NoInfer<AllowedModelRoute[]>, "volatile-defined">;
32
+ defaultModel: z<NoInfer<AllowedModelRoute | undefined>, NoInfer<AllowedModelRoute | undefined>, "volatile-defined">;
29
33
  }>>, "plain">;
30
34
  constructor(ctx: Context, config: Config);
31
35
  /**
@@ -36,6 +40,12 @@ export declare class SubagentModelSelectionConfig extends Service {
36
40
  * or its routes are malformed or repeated. Disabled settings do not read or validate routes.
37
41
  */
38
42
  allowedRoutes(): AllowedModelRoute[] | undefined;
43
+ /**
44
+ * Read the route a child uses when its delegation names none. Each call
45
+ * samples the live setting, independently of `enabled` and `allowedModels`.
46
+ * @returns a detached route, or undefined when the setting names none.
47
+ */
48
+ defaultRoute(): AllowedModelRoute | undefined;
39
49
  }
40
50
  export declare const name = "subagent-model-selection-settings";
41
51
  export default SubagentModelSelectionConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"model-selection-settings.d.ts","sourceRoot":"","sources":["../../src/model-selection-settings.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAEtD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAExC,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,OAAO;QACf,mFAAmF;QACnF,sBAAsB,EAAE,4BAA4B,CAAA;KACrD;CACF;AAED,4FAA4F;AAC5F,MAAM,WAAW,MAAM;IACrB,2HAA2H;IAC3H,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAC1B,gFAAgF;IAChF,aAAa,EAAE,QAAQ,CAAC,iBAAiB,EAAE,CAAC,CAAA;CAC7C;AAED,iGAAiG;AACjG,qBAAa,4BAA6B,SAAQ,OAAO;IAM7B,OAAO,CAAC,MAAM;IALxC,MAAM,CAAC,MAAM;;;;;;kBAGX;gBAEU,GAAG,EAAE,OAAO,EAAU,MAAM,EAAE,MAAM;IAIhD;;;;;;OAMG;IACH,aAAa,IAAI,iBAAiB,EAAE,GAAG,SAAS;CASjD;AAED,eAAO,MAAM,IAAI,sCAAsC,CAAA;AACvD,eAAe,4BAA4B,CAAA"}
1
+ {"version":3,"file":"model-selection-settings.d.ts","sourceRoot":"","sources":["../../src/model-selection-settings.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,KAAK,EAA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IG;IACH,YAAY;QACV,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE,CAAA;QAC5C,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAA;IAC3F,CAAC;;AAGH,MAAM,CAAC,MAAM,IAAI,GAAG,mCAAmC,CAAA;AACvD,eAAe,4BAA4B,CAAA"}
@@ -63,22 +63,20 @@ export declare function hasDelegationModelRequest(request: DelegationModelReques
63
63
  * @param enabled - Whether this tool instance permits model-facing selection.
64
64
  * @param policy - Current Host allowlist; omission permits only the current parent route.
65
65
  * @param parentOptions - Current parent route used when the Host setting is disabled or absent.
66
- * @param routeDiscoveryVisible - Whether the caller can call `list_subagent_models`; rejections then point to it.
67
66
  * @returns Child Agent options, preserving omission when no layer contributes one.
68
67
  * @throws {SubagentError} `MODEL_SELECTION_DISABLED` when this tool instance
69
68
  * forbids selection, or `MODEL_ROUTE_NOT_ALLOWED` when the allowlist excludes the route.
70
69
  * @throws {ToolArgsError} when `provider` and `model` are not supplied together.
71
70
  */
72
- export declare function requestedAgentOptions(configured: AgentOptions | undefined, request: DelegationModelRequest, enabled: boolean, policy: ModelSelectionPolicy | undefined, parentOptions: AgentOptions, routeDiscoveryVisible: boolean): AgentOptions | undefined;
71
+ export declare function requestedAgentOptions(configured: AgentOptions | undefined, request: DelegationModelRequest, enabled: boolean, policy: ModelSelectionPolicy | undefined, parentOptions: AgentOptions): AgentOptions | undefined;
73
72
  /**
74
73
  * Enforce Host authorization for a complete, explicitly selected child route.
75
74
  * @param policy - Current Host allowlist; omission permits only the current parent route.
76
75
  * @param parentOptions - Current parent route used when the Host setting is disabled or absent.
77
76
  * @param route - Validated provider/model pair from the tool call.
78
- * @param routeDiscoveryVisible - Whether the caller can call `list_subagent_models`; the rejection then points to it.
79
77
  * @throws {SubagentError} `MODEL_ROUTE_NOT_ALLOWED` when the allowlist excludes the route.
80
78
  */
81
- export declare function assertAllowedModelSelection(policy: ModelSelectionPolicy | undefined, parentOptions: AgentOptions, route: AllowedModelRoute, routeDiscoveryVisible: boolean): void;
79
+ export declare function assertAllowedModelSelection(policy: ModelSelectionPolicy | undefined, parentOptions: AgentOptions, route: AllowedModelRoute): void;
82
80
  /**
83
81
  * Whether configured Agent options require route validation before delegation.
84
82
  * @param options - Tool-instance child defaults.
@@ -1 +1 @@
1
- {"version":3,"file":"model-selection.d.ts","sourceRoot":"","sources":["../../src/model-selection.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAIvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAG1D,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAExC,8DAA8D;AAC9D,MAAM,WAAW,iBAAiB;IAChC,kCAAkC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,qCAAqC;IACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,iEAAiE;AACjE,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,iBAAiB,CAGvD,CAAA;AAEF,0DAA0D;AAC1D,MAAM,WAAW,oBAAoB;IACnC,qEAAqE;IACrE,QAAQ,CAAC,MAAM,EAAE,SAAS,iBAAiB,EAAE,CAAA;CAC9C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAE9D;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,IAAI,SAAS,iBAAiB,EAAE,CAoBxG;AAED,2CAA2C;AAC3C,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QA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,EACnB,4BAA4B,GAAG,IAAI;IAEnC,MAAM,QAAQ,GAAG,SAAS,EAAE,QAAQ,IAAI,aAAa,CAAC,QAAQ,CAAA;IAC9D,MAAM,KAAK,GAAG,SAAS,EAAE,KAAK,IAAI,aAAa,CAAC,KAAK,CAAA;IACrD,IAAI,QAAQ,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAClD,MAAM,IAAI,2BAA2B,CAAC,wEAAwE,CAAC,CAAA;IACjH,CAAC;IACD,MAAM,YAAY,GAAG,QAAQ,KAAK,aAAa,CAAC,QAAQ,IAAI,KAAK,KAAK,aAAa,CAAC,KAAK,CAAA;IACzF,MAAM,eAAe,GAAG,SAAS,EAAE,eAAe;WAC7C,CAAC,4BAA4B,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IAChG,MAAM,GAAG,CAAC,iBAAiB,CAAC;QAC1B,QAAQ;QACR,KAAK;QACL,GAAG,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE;KAC5D,EAAE,MAAM,CAAC,CAAA;AACZ,CAAC"}
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.2.3-alpha.2",
4
+ "version": "0.2.3-alpha.3",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -39,14 +39,14 @@
39
39
  ],
40
40
  "license": "MIT",
41
41
  "peerDependencies": {
42
- "@deepseek-ai/dsh-agent": "0.2.3-alpha.2",
43
- "@deepseek-ai/dsh-agent-preset-registry": "0.2.3-alpha.2",
44
- "@deepseek-ai/dsh-llm": "0.2.3-alpha.2",
45
- "@deepseek-ai/dsh-session": "0.2.3-alpha.2",
46
- "@deepseek-ai/dsh-subagent": "0.2.3-alpha.2",
47
- "@deepseek-ai/dsh-system-prompt": "0.2.3-alpha.2",
48
- "@deepseek-ai/dsh-tools": "0.2.3-alpha.2",
49
- "@deepseek-ai/cordis": "~4.2.0-alpha.1"
42
+ "@deepseek-ai/dsh-agent": "0.2.3-alpha.3",
43
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.3-alpha.3",
44
+ "@deepseek-ai/dsh-llm": "0.2.3-alpha.3",
45
+ "@deepseek-ai/dsh-session": "0.2.3-alpha.3",
46
+ "@deepseek-ai/dsh-subagent": "0.2.3-alpha.3",
47
+ "@deepseek-ai/dsh-system-prompt": "0.2.3-alpha.3",
48
+ "@deepseek-ai/dsh-tools": "0.2.3-alpha.3",
49
+ "@deepseek-ai/cordis": "~4.2.0-alpha.2"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "@deepseek-ai/dsh-agent-preset-registry": {
@@ -54,24 +54,24 @@
54
54
  }
55
55
  },
56
56
  "dependencies": {
57
- "@deepseek-ai/dsh-brand": "0.2.3-alpha.2",
58
- "@deepseek-ai/schemastery": "~3.20.0-alpha.1"
57
+ "@deepseek-ai/dsh-brand": "0.2.3-alpha.3",
58
+ "@deepseek-ai/schemastery": "~3.20.0-alpha.2"
59
59
  },
60
60
  "devDependencies": {
61
- "@deepseek-ai/cordis-plugin-loader": "~1.2.0-alpha.1",
62
- "@deepseek-ai/dsh-agent": "0.2.3-alpha.2",
63
- "@deepseek-ai/dsh-agent-preset-registry": "0.2.3-alpha.2",
64
- "@deepseek-ai/dsh-llm": "0.2.3-alpha.2",
65
- "@deepseek-ai/dsh-session": "0.2.3-alpha.2",
66
- "@deepseek-ai/dsh-session-persistence": "0.2.3-alpha.2",
67
- "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.3-alpha.2",
68
- "@deepseek-ai/dsh-subagent": "0.2.3-alpha.2",
69
- "@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.3-alpha.2",
70
- "@deepseek-ai/dsh-system-prompt": "0.2.3-alpha.2",
71
- "@deepseek-ai/dsh-tool-executor-native": "0.2.3-alpha.2",
72
- "@deepseek-ai/dsh-tool-testkit": "0.2.3-alpha.2",
73
- "@deepseek-ai/dsh-tools": "0.2.3-alpha.2",
74
- "@deepseek-ai/cordis": "~4.2.0-alpha.1",
75
- "@deepseek-ai/dsh-session-projection": "0.2.3-alpha.2"
61
+ "@deepseek-ai/cordis-plugin-loader": "~1.2.0-alpha.2",
62
+ "@deepseek-ai/dsh-agent": "0.2.3-alpha.3",
63
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.3-alpha.3",
64
+ "@deepseek-ai/dsh-llm": "0.2.3-alpha.3",
65
+ "@deepseek-ai/dsh-session": "0.2.3-alpha.3",
66
+ "@deepseek-ai/dsh-session-persistence": "0.2.3-alpha.3",
67
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.3-alpha.3",
68
+ "@deepseek-ai/dsh-subagent": "0.2.3-alpha.3",
69
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.3-alpha.3",
70
+ "@deepseek-ai/dsh-system-prompt": "0.2.3-alpha.3",
71
+ "@deepseek-ai/dsh-tool-registry-native": "0.2.3-alpha.3",
72
+ "@deepseek-ai/dsh-tool-testkit": "0.2.3-alpha.3",
73
+ "@deepseek-ai/dsh-tools": "0.2.3-alpha.3",
74
+ "@deepseek-ai/cordis": "~4.2.0-alpha.2",
75
+ "@deepseek-ai/dsh-session-projection": "0.2.3-alpha.3"
76
76
  }
77
77
  }
package/src/index.ts CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  preflightChildLlmRoute,
29
29
  requestedAgentOptions,
30
30
  } from './model-selection.ts'
31
- import type { DelegationModelRequest } from './model-selection.ts'
31
+ import type { AllowedModelRoute, DelegationModelRequest } from './model-selection.ts'
32
32
  import { registerListSubagentModels } from './list-models.ts'
33
33
  import { SubagentPresetSelection, type PresetSelectionConfig, type PresetSelectionRequest } from './preset-selection.ts'
34
34
  // Retains the released Session event declaration in emitted declarations.
@@ -38,9 +38,12 @@ import type {} from './model-selection-settings.ts'
38
38
  export const name = 'tool-subagent'
39
39
  export const inject = ['tools', 'subagents', 'systemPrompt']
40
40
 
41
- // Definition identity keeps shared guidance scoped to the actual visible tools,
42
- // including scoped overrides and independently loaded tool registries.
43
- const delegationTools = new Set<ToolDefinition>()
41
+ /**
42
+ * Guidance section every delegation tool shares. Whichever registration the
43
+ * system prompt renders lists the delegation tools the viewing scope's
44
+ * registrations resolve.
45
+ */
46
+ const DELEGATION_SECTION = 'tool:subagent'
44
47
 
45
48
  /** Config: which registered provider this tool delegates to, plus child defaults. */
46
49
  export interface Config extends PresetSelectionConfig {
@@ -193,6 +196,17 @@ export function apply(ctx: Context, config: Config): void {
193
196
 
194
197
  if (config.modelDiscovery === true) registerListSubagentModels(ctx)
195
198
 
199
+ /**
200
+ * Read the Host default child route for a call without route fields. It
201
+ * replaces only parent inheritance: tool or provider route defaults win.
202
+ */
203
+ const settingsDefaultRoute = (subagentProvider: SubagentProvider): AllowedModelRoute | undefined => (
204
+ modelSelectionEnabled && subagentProvider.agentRouteDefaults === undefined
205
+ && config.agentOptions?.provider === undefined && config.agentOptions?.model === undefined
206
+ ? ctx.get('subagentModelSelection')?.defaultRoute()
207
+ : undefined
208
+ )
209
+
196
210
  // Load order and HMR replacement can change provider availability while
197
211
  // this fiber remains active.
198
212
  let mounted: { subagentProvider: SubagentProvider; definition: ToolDefinition; disposeTool: () => void } | undefined
@@ -200,13 +214,15 @@ export function apply(ctx: Context, config: Config): void {
200
214
  assertSubagentProviderConfiguration(subagentProvider)
201
215
  const wording = providerWording(subagentProvider.inheritsParentContext)
202
216
  const providerRouteDefaults = subagentProvider.agentRouteDefaults
203
- const defaultRoute = providerRouteDefaults !== undefined || hasConfiguredLlmSelection(config.agentOptions)
204
- ? 'the default model configured for this tool'
205
- : 'your current model and reasoning effort'
206
- // Discovery visibility is per Agent; only a same-instance owner is known to exist at mount.
207
217
  const providerSource = config.modelDiscovery === true ? ' Use a provider id listed by `list_subagent_models`.' : ''
208
218
  const definition = defineTool({
209
219
  name: toolName,
220
+ guidance: {
221
+ section: DELEGATION_SECTION,
222
+ order: 'TOOL_SUBAGENT',
223
+ retirement: 'The subagent delegation tools are no longer available. Their instructions no longer apply.',
224
+ text: available => `Start independent delegations with ${available.map(name => `\`${name}\``).join(' or ')} together in one assistant message and continue useful work while they run. The concurrency limit of all the subagents is ${ctx.subagents.maxActiveSubagents}. When only waiting for their results remains, end your turn instead of sleeping or polling; the next result starts a new turn. Collect the subagent results required to complete the task before giving the user a final answer.\n\nBash, formatters, code generators, and scripts can overwrite concurrent edits without conflict detection; coordinate their changes explicitly. The agent integrating the work must review the final diff and run relevant tests.`,
225
+ },
210
226
  description: wording.description
211
227
  + ' This tool starts an independently managed subagent and immediately returns its name. If you are still online when it finishes, the runtime automatically delivers its completion notice. The notice includes the final answer unless the child sent you a message just before finishing.'
212
228
  + (subagentProvider.prepareContinuable !== undefined
@@ -242,8 +258,8 @@ export function apply(ctx: Context, config: Config): void {
242
258
  ...modelSelectionEnabled ? {
243
259
  provider: {
244
260
  type: 'string' as const,
245
- description: 'LLM provider id for the subagent; requires `model`. Set only when the task needs a different model; '
246
- + `omit \`provider\`, \`model\`, and \`reasoning_effort\` to run the subagent on ${defaultRoute}.${providerSource}`,
261
+ description: 'LLM provider id for the subagent. Set it with `model` only when the task requires a specific model.'
262
+ + providerSource,
247
263
  },
248
264
  model: {
249
265
  type: 'string' as const,
@@ -277,6 +293,7 @@ export function apply(ctx: Context, config: Config): void {
277
293
 
278
294
  const agentPreset = presets.resolve(args as PresetSelectionRequest)
279
295
  const modelRequest = delegationModelRequest(args as DelegationModelRequest)
296
+ const settingsRoute = hasDelegationModelRequest(modelRequest) ? undefined : settingsDefaultRoute(subagentProvider)
280
297
  const routes = modelSelectionEnabled && hasDelegationModelRequest(modelRequest)
281
298
  ? ctx.get('subagentModelSelection')?.allowedRoutes()
282
299
  : undefined
@@ -284,23 +301,27 @@ export function apply(ctx: Context, config: Config): void {
284
301
  const parentOptions = parentAgentOptionsForDelegation(parent)
285
302
  const requiresRoutePreflight = hasDelegationModelRequest(modelRequest)
286
303
  || hasConfiguredLlmSelection(config.agentOptions)
287
- const configuredChildAgentOptions = requiresRoutePreflight && providerRouteDefaults !== undefined
288
- ? { ...providerRouteDefaults, ...config.agentOptions }
289
- : config.agentOptions
304
+ || settingsRoute !== undefined
305
+ // Like an explicit route, the settings route clears configured and inherited effort so the model's default applies.
306
+ const configuredChildAgentOptions = settingsRoute !== undefined
307
+ ? { ...config.agentOptions, ...settingsRoute, reasoningEffort: undefined }
308
+ : requiresRoutePreflight && providerRouteDefaults !== undefined
309
+ ? { ...providerRouteDefaults, ...config.agentOptions }
310
+ : config.agentOptions
290
311
  const requestedChildAgentOptions = requestedAgentOptions(
291
312
  configuredChildAgentOptions,
292
313
  modelRequest,
293
314
  modelSelectionEnabled,
294
315
  modelSelectionPolicy,
295
316
  parentOptions,
296
- ctx.tools.get('list_subagent_models', parent, exec.toolSet) !== undefined,
297
317
  )
298
- if (requiresRoutePreflight) {
318
+ if (subagentProvider.prepareContinuable === undefined && requiresRoutePreflight) {
299
319
  const llm = ctx.get('llm')
300
320
  if (llm === undefined) {
301
321
  throw new ToolContextUnavailableError('cannot resolve the selected child LLM route because the `llm` service is unavailable')
302
322
  }
303
323
  const inheritParentReasoningEffort = providerRouteDefaults === undefined && !hasDelegationModelRequest(modelRequest)
324
+ && settingsRoute === undefined
304
325
  await preflightChildLlmRoute(
305
326
  llm,
306
327
  parentOptions,
@@ -336,14 +357,7 @@ export function apply(ctx: Context, config: Config): void {
336
357
  return { kind: 'activation' as const, name: started.name }
337
358
  },
338
359
  })
339
- const disposeTool = ctx.effect(() => {
340
- const unregister = ctx.tools.register(definition)
341
- delegationTools.add(definition)
342
- return () => {
343
- delegationTools.delete(definition)
344
- unregister()
345
- }
346
- })
360
+ const disposeTool = ctx.effect(() => ctx.tools.register(definition))
347
361
  // oxlint-disable-next-line typescript/no-misused-promises -- Tool and guidance disposal are synchronous.
348
362
  mounted = { subagentProvider, definition, disposeTool }
349
363
  }
@@ -364,27 +378,11 @@ export function apply(ctx: Context, config: Config): void {
364
378
  // A backend fiber may activate later; a misspelled provider remains visible in this log.
365
379
  ctx.logger.info(`subagent provider "${config.provider}" not registered yet; the "${config.toolName ?? 'subagent'}" tool will register when it appears`)
366
380
  }
367
- ctx.systemPrompt.section({
368
- name: `tool:${toolName}`,
369
- order: ctx.systemPrompt.getSectionOrder('TOOL_SUBAGENT'),
370
- retirement: `The ${toolName} tool is no longer available. Its instructions no longer apply.`,
371
- text: (context) => {
372
- if (mounted === undefined) return ''
373
- const visible = [...delegationTools]
374
- .filter(tool => ctx.tools.get(tool.name, context.scope) === tool)
375
- .map(tool => tool.name)
376
- .sort()
377
- if (visible[0] !== toolName) return ''
378
- const names = visible.map(name => `\`${name}\``).join(' or ')
379
- return `Start independent delegations with ${names} together in one assistant message and continue useful work while they run. The concurrency limit of all the subagents is ${ctx.subagents.maxActiveSubagents}. When only waiting for their results remains, end your turn instead of sleeping or polling; the next result starts a new turn. Collect the subagent results required to complete the task before giving the user a final answer.\n\nBash, formatters, code generators, and scripts can overwrite concurrent edits without conflict detection; coordinate their changes explicitly. The agent integrating the work must review the final diff and run relevant tests.`
380
- },
381
- })
382
381
  ctx.systemPrompt.context({
383
382
  name: `tool:${toolName}:depth`,
384
383
  order: ctx.systemPrompt.getContextOrder('SUBAGENT_DELEGATION'),
385
384
  text: (context) => {
386
- if (context.agent === undefined || mounted === undefined
387
- || ctx.tools.get(toolName, context.scope) !== mounted.definition) return ''
385
+ if (context.agent === undefined || mounted === undefined) return ''
388
386
  const maxDepth = ctx.subagents.resolveMaxDepth(config.maxDepth)
389
387
  if (maxDepth === undefined) return ''
390
388
  const depth = delegationDepthOf(context.agent)
@@ -25,13 +25,17 @@ export interface Config {
25
25
  enabled: Volatile<boolean>
26
26
  /** Initial route list inherited when the user document does not override it. */
27
27
  allowedModels: Volatile<AllowedModelRoute[]>
28
+ /** Route that replaces parent inheritance for children started without route fields; omission inherits the parent route. */
29
+ defaultModel: Volatile<AllowedModelRoute | undefined>
28
30
  }
29
31
 
30
- /** Host settings owner whose current value authorizes explicit child routes in every Session. */
32
+ /** Host settings owner whose current value authorizes explicit child routes and names the default child route in every Session. */
31
33
  export class SubagentModelSelectionConfig extends Service {
32
34
  static Config = z.object({
33
35
  enabled: z.boolean().default(false).volatile(),
34
36
  allowedModels: z.array(AllowedModelRouteSchema).default([]).volatile(),
37
+ // Prevent Schemastery from materializing an omitted route as `{}`.
38
+ defaultModel: (AllowedModelRouteSchema as z<AllowedModelRoute | undefined>).default(undefined).volatile(),
35
39
  })
36
40
 
37
41
  constructor(ctx: Context, private config: Config) {
@@ -54,6 +58,16 @@ export class SubagentModelSelectionConfig extends Service {
54
58
  }
55
59
  return allowedModels.map(route => ({ ...route }))
56
60
  }
61
+
62
+ /**
63
+ * Read the route a child uses when its delegation names none. Each call
64
+ * samples the live setting, independently of `enabled` and `allowedModels`.
65
+ * @returns a detached route, or undefined when the setting names none.
66
+ */
67
+ defaultRoute(): AllowedModelRoute | undefined {
68
+ const route = this.config.defaultModel.get()
69
+ return route === undefined ? undefined : { provider: route.provider, model: route.model }
70
+ }
57
71
  }
58
72
 
59
73
  export const name = 'subagent-model-selection-settings'
@@ -107,7 +107,7 @@ export function hasDelegationModelRequest(request: DelegationModelRequest): bool
107
107
  }
108
108
 
109
109
  /** Model-facing pointer to route discovery, appended to route-selection rejections. */
110
- const ROUTE_DISCOVERY_HINT = ' Call `list_subagent_models` to see the routes you may select.'
110
+ const ROUTE_DISCOVERY_HINT = ' Call `list_subagent_models`, if available, to see the routes you may select.'
111
111
 
112
112
  /**
113
113
  * Validate explicit selection against the current Host setting and merge it over child defaults.
@@ -118,7 +118,6 @@ const ROUTE_DISCOVERY_HINT = ' Call `list_subagent_models` to see the routes you
118
118
  * @param enabled - Whether this tool instance permits model-facing selection.
119
119
  * @param policy - Current Host allowlist; omission permits only the current parent route.
120
120
  * @param parentOptions - Current parent route used when the Host setting is disabled or absent.
121
- * @param routeDiscoveryVisible - Whether the caller can call `list_subagent_models`; rejections then point to it.
122
121
  * @returns Child Agent options, preserving omission when no layer contributes one.
123
122
  * @throws {SubagentError} `MODEL_SELECTION_DISABLED` when this tool instance
124
123
  * forbids selection, or `MODEL_ROUTE_NOT_ALLOWED` when the allowlist excludes the route.
@@ -130,20 +129,18 @@ export function requestedAgentOptions(
130
129
  enabled: boolean,
131
130
  policy: ModelSelectionPolicy | undefined,
132
131
  parentOptions: AgentOptions,
133
- routeDiscoveryVisible: boolean,
134
132
  ): AgentOptions | undefined {
135
133
  if (!hasDelegationModelRequest(request)) return configured
136
134
  if (!enabled) {
137
135
  throw new SubagentError('child model selection is disabled for this tool instance', 'MODEL_SELECTION_DISABLED')
138
136
  }
139
- const hint = routeDiscoveryVisible ? ROUTE_DISCOVERY_HINT : ''
140
137
  if (request.provider === undefined || request.model === undefined) {
141
138
  throw new ToolArgsError([(request.reasoning_effort === undefined
142
139
  ? 'child LLM `provider` and `model` must be supplied together.'
143
- : 'child LLM `reasoning_effort` requires both `provider` and `model`; supply both or omit all three fields.') + hint])
140
+ : 'child LLM `reasoning_effort` requires both `provider` and `model`; supply both or omit all three fields.') + ROUTE_DISCOVERY_HINT])
144
141
  }
145
142
 
146
- assertAllowedModelSelection(policy, parentOptions, { provider: request.provider, model: request.model }, routeDiscoveryVisible)
143
+ assertAllowedModelSelection(policy, parentOptions, { provider: request.provider, model: request.model })
147
144
  return {
148
145
  ...configured,
149
146
  provider: request.provider,
@@ -158,14 +155,12 @@ export function requestedAgentOptions(
158
155
  * @param policy - Current Host allowlist; omission permits only the current parent route.
159
156
  * @param parentOptions - Current parent route used when the Host setting is disabled or absent.
160
157
  * @param route - Validated provider/model pair from the tool call.
161
- * @param routeDiscoveryVisible - Whether the caller can call `list_subagent_models`; the rejection then points to it.
162
158
  * @throws {SubagentError} `MODEL_ROUTE_NOT_ALLOWED` when the allowlist excludes the route.
163
159
  */
164
160
  export function assertAllowedModelSelection(
165
161
  policy: ModelSelectionPolicy | undefined,
166
162
  parentOptions: AgentOptions,
167
163
  route: AllowedModelRoute,
168
- routeDiscoveryVisible: boolean,
169
164
  ): void {
170
165
  const { provider, model } = route
171
166
  const allowed = policy === undefined
@@ -176,7 +171,7 @@ export function assertAllowedModelSelection(
176
171
  + (policy === undefined
177
172
  ? '; while subagent model selection is disabled, explicit selection is limited to the parent route'
178
173
  : '')
179
- + '.' + (routeDiscoveryVisible ? ROUTE_DISCOVERY_HINT : ''), 'MODEL_ROUTE_NOT_ALLOWED')
174
+ + '.' + ROUTE_DISCOVERY_HINT, 'MODEL_ROUTE_NOT_ALLOWED')
180
175
  }
181
176
 
182
177
  /**