@deepseek-ai/dsh-tool-subagent-control 0.2.2-rc.5 → 0.2.3-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 CHANGED
@@ -30,8 +30,8 @@
30
30
  en: a7d5ecc38bd7a94b
31
31
  zh: 732c5e0ef5abc2a0
32
32
  /deepseek-ai-dsh-tool-subagent-control/use-this-package/list-agents:
33
- en: ed19a95c940c048b
34
- zh: a734ef9e4892b971
33
+ en: c6e13f3a0c501bfc
34
+ zh: 7e608fcb6ceebe65
35
35
  /deepseek-ai-dsh-tool-subagent-control/understand-the-implementation:
36
36
  en: c5cdf01a78c990f2
37
37
  zh: 53c180d726ce4502
@@ -69,8 +69,8 @@
69
69
  en: fc88c8ffb8ebc083
70
70
  zh: 0baf2e5df37d813e
71
71
  /deepseek-ai-dsh-tool-subagent-control/model-experience/identity-and-communication-context/what-the-model-sees:
72
- en: 3f59216388405b66
73
- zh: 70672463706bc5c5
72
+ en: 2398af9e6e80f928
73
+ zh: 4585ff2e63441896
74
74
  /deepseek-ai-dsh-tool-subagent-control/model-experience/identity-and-communication-context/what-the-model-sees/subagent-identity:
75
75
  en: fc2b3383d52ded16
76
76
  zh: d5074e59b79c7afd
@@ -78,8 +78,8 @@
78
78
  en: 37a7eed766856ea0
79
79
  zh: 4a564f74e08a3252
80
80
  /deepseek-ai-dsh-tool-subagent-control/model-experience/identity-and-communication-context/kv-cache-effect:
81
- en: 49dc6a07ae9640e3
82
- zh: 465fcd7cfe452ad2
81
+ en: 8879c43a533f66da
82
+ zh: 75f30ae42ea19311
83
83
  /deepseek-ai-dsh-tool-subagent-control/model-experience/interrupt-result:
84
84
  en: d64e936e83e89a2b
85
85
  zh: b9905c33af6cca45
@@ -108,11 +108,11 @@
108
108
  en: 094e55d258f2ec2e
109
109
  zh: f364bc9046530bff
110
110
  /deepseek-ai-dsh-tool-subagent-control/model-experience/listing-result/what-the-model-sees:
111
- en: 3b88f602282087f5
112
- zh: d597e4681915d25a
111
+ en: f1932817a7391691
112
+ zh: e227351a21dff1bc
113
113
  /deepseek-ai-dsh-tool-subagent-control/model-experience/listing-result/token-effect:
114
- en: 8b5491a6a5459bb3
115
- zh: 87338c341aa9aa56
114
+ en: 6e0992301b03efad
115
+ zh: 94909c954f441a35
116
116
  /deepseek-ai-dsh-tool-subagent-control/model-experience/listing-result/kv-cache-effect:
117
117
  en: 4a629edb36a17e32
118
118
  zh: 5a7539cfbf404c54
package/README.md CHANGED
@@ -57,6 +57,8 @@ Waits for the exact caller’s next-step inbox. Pending input returns immediatel
57
57
 
58
58
  ### list_agents
59
59
 
60
+ Returns `{ running, limit, agents }`. Capacity comes from the shared slot pool, including starting, idle resident, stopping, and external children; it excludes the root. `running` may exceed `limit` after a decrease. This observation reserves no slot and is independent of the listed members and their turn status.
61
+
60
62
  Lists the root and all reachable continuable descendants, including the caller, in stable pre-order. Each row carries a `name`, a `status`, and, for the root and continuable descendants, a `description`. The root is `lead` with the description `root agent`; a descendant's name is its full path from the root and its description is its creation label. A child whose catalog entry has no name, and every descendant below it, is listed by Session id. Live status is `running` or `inactive`. External entries are omitted without reading child Sessions; readable one-shot children remain traversal nodes. Unknown modes and unreadable catalogs produce rows whose status is `unsupported`, `corrupt`, or `unavailable`; the status reports that the row's own descendants could not be read, while the row itself stays an addressable member. Ordinary Session forks lead separate subagent trees.
61
63
 
62
64
  -----
@@ -125,7 +127,7 @@ Prefix-stable; the schemas do not change at runtime, and a parent and its contin
125
127
 
126
128
  #### What the model sees
127
129
 
128
- Required `subagent:identity` runtime context identifies each agent by name. It is independent of Team mode and tool filtering. When the live root is available, identity context includes messaging and discovery instructions independently for each admitted standard tool. The root sees `You are the root agent. Your name is "lead".` followed by the same guidance. A missing live root is reported with the agent's Session id, without preventing independent work. Automatic result delivery remains owned by the subagent service. A child of the root named `reviewer`, with both tools admitted, sees:
130
+ Required `subagent:identity` runtime context identifies each agent by name. Its identity lines are independent of Team mode and tool filtering. When the live root is available, identity context includes messaging and discovery instructions independently for each admitted standard tool. While Team mode is off, a subagent with `send_message` is also told to send a self-contained result to the agent that delegated it when it finishes, and to message any agent as soon as a finding changes what that agent should do next. The root sees `You are the root agent. Your name is "lead".` followed by the same messaging and discovery guidance. A missing live root is reported with the agent's Session id, without preventing independent work. Automatic result delivery remains owned by the subagent service. A child of the root named `reviewer`, with both tools admitted, sees:
129
131
 
130
132
  ##### Subagent identity
131
133
 
@@ -135,6 +137,7 @@ Your name is "reviewer".
135
137
  The root agent of your collaboration tree is "lead".
136
138
 
137
139
  To message other agents, use send_message({ agent: "<agent-name>", message: "..." }).
140
+ When you finish, use send_message to send a self-contained result to the agent that delegated you. Message any agent as soon as a finding changes what it should do next; sending a message does not end your turn.
138
141
  Use list_agents({}) to find your collaborator agents and their names.
139
142
  ```
140
143
 
@@ -144,7 +147,7 @@ One short context entry per agent, independent of tree size; full names lengthen
144
147
 
145
148
  #### KV Cache effect
146
149
 
147
- Identity and communication guidance follow inherited history as logged runtime context, leaving the shared system prompt and tool definitions unchanged. When a retained snapshot's identity text differs from the current text, one current runtime-context snapshot is appended. This required context remains available with `includeRuntimeContext: false` and is restored after compaction. Team mode does not change it.
150
+ Identity and communication guidance follow inherited history as logged runtime context, leaving the shared system prompt and tool definitions unchanged. When a retained snapshot's identity text differs from the current text, one current runtime-context snapshot is appended. This required context remains available with `includeRuntimeContext: false` and is restored after compaction. Switching Team mode adds or removes the report instruction for delegated children, which appends one runtime-context snapshot on the next request.
148
151
 
149
152
  ### Interrupt result
150
153
 
@@ -178,11 +181,11 @@ Append-only; newly visible content follows the reusable request prefix and does
178
181
 
179
182
  #### What the model sees
180
183
 
181
- Each row renders as `<name> [<status>] — <description>`, or `<name> [<status>]` without a description. The first row is `lead [<status>] — root agent`; continuable descendants follow, such as `reviewer/checker [inactive] — Check the diff`. Unreadable branches render as `<name> [corrupt]`, `<name> [unsupported]`, or `<name> [unavailable]`. The canonical value is an array of `{ name, status, description? }`. Status describes turn activity, not task completion, success, or failure.
184
+ The result starts with `Subagent capacity: running=<running>, limit=<limit>`. Each member row renders as `<name> [<status>] — <description>`, or `<name> [<status>]` without a description. The first member row is `lead [<status>] — root agent`; continuable descendants follow, such as `reviewer/checker [inactive] — Check the diff`. Unreadable branches render as `<name> [corrupt]`, `<name> [unsupported]`, or `<name> [unavailable]`. The canonical value contains `running`, `limit`, and an `agents` array of `{ name, status, description? }`. Status describes turn activity, not task completion, success, or failure.
182
185
 
183
186
  #### Token effect
184
187
 
185
- Grows linearly with the whole subagent tree’s listed rows. There is no cursor or cap. Rows carry no parent ids or depth; a full name encodes both.
188
+ One capacity line plus text growing linearly with the whole subagent tree’s listed rows. There is no cursor or cap. Rows carry no parent ids or depth; a full name encodes both.
186
189
 
187
190
  #### KV Cache effect
188
191
 
package/README.zh.md CHANGED
@@ -57,6 +57,8 @@ kind: "package-reference"
57
57
 
58
58
  ### list_agents
59
59
 
60
+ 返回 `{ running, limit, agents }`。容量来自共享名额池,包含启动中、空闲驻留、停止中和外部子级,不包含根。调低上限后 `running` 可以超过 `limit`。该观察值不预留名额,也不由成员列表或轮次状态推算。
61
+
60
62
  按稳定前序列出根与所有可达的可继续后代,包括调用方。每行包含 `name`、`status`;根和可继续后代还包含 `description`。根的名称为 `lead`,描述为 `root agent`;后代的名称是其相对根的完整路径,描述是其创建标签。目录条目没有名称的子级及其下所有后代以 Session id 列出。在线状态为 `running` 或 `inactive`。外部条目被省略,且不读取其子 Session;可读的一次性子级仍作为遍历节点。未知模式与不可读目录产生状态为 `unsupported`、`corrupt` 或 `unavailable` 的行;该状态表示这一行自身的后代目录无法读取,该行本身仍可寻址。普通 Session 分叉形成独立的 subagent 树。
61
63
 
62
64
  -----
@@ -125,7 +127,7 @@ kind: "package-reference"
125
127
 
126
128
  #### 模型看到什么
127
129
 
128
- 必需的 `subagent:identity` 运行时上下文按名称标识每个 agent。该上下文独立于 Team 模式和工具过滤。活动根可用时,身份上下文会分别根据标准工具的获准情况提供通信与发现指引。根看到 `You are the root agent. Your name is "lead".`,后接相同指引。活动根缺失时,上下文使用该 agent 的 Session id 明确报告,但不阻止独立工作。自动结果交付仍由 subagent 服务负责。根的子级名为 `reviewer`、两个工具均获准时,它看到:
130
+ 必需的 `subagent:identity` 运行时上下文按名称标识每个 agent。其中的身份行独立于 Team 模式和工具过滤。活动根可用时,身份上下文会分别根据标准工具的获准情况提供通信与发现指引。Team 模式关闭时,获准 `send_message` 的 subagent 还会被要求在完成时把自包含结果发送给委派它的 agent,并在某项发现改变任一 agent 的下一步行动时立即通知该 agent。根看到 `You are the root agent. Your name is "lead".`,后接相同的通信与发现指引。活动根缺失时,上下文使用该 agent 的 Session id 明确报告,但不阻止独立工作。自动结果交付仍由 subagent 服务负责。根的子级名为 `reviewer`、两个工具均获准时,它看到:
129
131
 
130
132
  ##### Subagent 身份
131
133
 
@@ -135,6 +137,7 @@ Your name is "reviewer".
135
137
  The root agent of your collaboration tree is "lead".
136
138
 
137
139
  To message other agents, use send_message({ agent: "<agent-name>", message: "..." }).
140
+ When you finish, use send_message to send a self-contained result to the agent that delegated you. Message any agent as soon as a finding changes what it should do next; sending a message does not end your turn.
138
141
  Use list_agents({}) to find your collaborator agents and their names.
139
142
  ```
140
143
 
@@ -144,7 +147,7 @@ Use list_agents({}) to find your collaborator agents and their names.
144
147
 
145
148
  #### KV Cache 影响
146
149
 
147
- 身份与通信指引作为持久记录的运行时上下文位于继承历史之后,共享系统提示词和工具定义不变。保留快照中的身份文本与当前文本不同时,会追加一份当前运行时上下文快照。设置 `includeRuntimeContext: false` 后,该必需上下文仍会提供,并会在压缩后恢复。Team 模式不会改变它。
150
+ 身份与通信指引作为持久记录的运行时上下文位于继承历史之后,共享系统提示词和工具定义不变。保留快照中的身份文本与当前文本不同时,会追加一份当前运行时上下文快照。设置 `includeRuntimeContext: false` 后,该必需上下文仍会提供,并会在压缩后恢复。切换 Team 模式会为委派子级增删汇报要求,并在下一次请求时追加一份运行时上下文快照。
148
151
 
149
152
  ### 中断结果
150
153
 
@@ -178,11 +181,11 @@ Use list_agents({}) to find your collaborator agents and their names.
178
181
 
179
182
  #### 模型看到什么
180
183
 
181
- 每行显示为 `<name> [<status>] — <description>`;没有描述时显示为 `<name> [<status>]`。首行为 `lead [<status>] — root agent`;随后是可继续后代,例如 `reviewer/checker [inactive] — Check the diff`。不可读分支显示为 `<name> [corrupt]`、`<name> [unsupported]` 或 `<name> [unavailable]`。规范值是 `{ name, status, description? }` 数组。状态描述轮次活动,不表示任务完成、成功或失败。
184
+ 结果以 `Subagent capacity: running=<running>, limit=<limit>` 开头。每个成员行显示为 `<name> [<status>] — <description>`;没有描述时显示为 `<name> [<status>]`。首个成员行为 `lead [<status>] — root agent`;随后是可继续后代,例如 `reviewer/checker [inactive] — Check the diff`。不可读分支显示为 `<name> [corrupt]`、`<name> [unsupported]` 或 `<name> [unavailable]`。规范值包含 `running`、`limit` 和元素为 `{ name, status, description? }` 的 `agents` 数组。状态描述轮次活动,不表示任务完成、成功或失败。
182
185
 
183
186
  #### Token 影响
184
187
 
185
- 随整棵 subagent 树列出的行数线性增长。没有游标或上限。行不携带父级 id 或深度;完整名称已包含这两项信息。
188
+ 一行容量信息,加上随整棵 subagent 树列出的行数线性增长的文本。没有游标或上限。行不携带父级 id 或深度;完整名称已包含这两项信息。
186
189
 
187
190
  #### KV Cache 影响
188
191
 
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import z from "@deepseek-ai/schemastery";
2
- import { defineTool } from "@deepseek-ai/dsh-tools";
2
+ import { ToolContextUnavailableError, defineTool } from "@deepseek-ai/dsh-tools";
3
3
  import { ROOT_AGENT_NAME } from "@deepseek-ai/dsh-subagent";
4
4
  import { HarnessError } from "@deepseek-ai/dsh-llm";
5
5
  //#region lib/types/list-agents.js
@@ -30,50 +30,68 @@ function project(agents, entry) {
30
30
  function registerListAgents(ctx) {
31
31
  const definition = defineTool({
32
32
  name: "list_agents",
33
- description: "List your entire subagent tree: the root agent and all reachable continuable descendants, including yourself. Rows carry names, descriptions, and status. A descendant's name is its path from the root, such as reviewer/checker. You can message any other agent in the subagent tree. running means it is working; inactive means no turn is executing; it does not indicate task completion, success, or failure. corrupt, unsupported, or unavailable means this row's own descendants could not be read; the row itself is still a member you can message. While you remain active, you will be notified when a direct child finishes; there is no need to keep checking its status. Use send_message to continue the conversation.",
33
+ description: "List your entire subagent tree: the root agent and all reachable continuable descendants, including yourself. Shared capacity reports running/limit; do not spawn more agents when capacity is limited. Rows carry names, descriptions, and status. A descendant's name is its path from the root, such as reviewer/checker. You can message any other agent in the subagent tree. running means it is working; inactive means no turn is executing; it does not indicate task completion, success, or failure. corrupt, unsupported, or unavailable means this row's own descendants could not be read; the row itself is still a member you can message. While you remain active, you will be notified when a direct child finishes; there is no need to keep checking its status. Use send_message to continue the conversation.",
34
34
  parameters: {},
35
35
  isConcurrencySafe: () => true,
36
36
  output: {
37
37
  schema: {
38
- type: "array",
39
- items: {
40
- type: "object",
41
- additionalProperties: false,
42
- properties: {
43
- name: {
44
- type: "string",
45
- required: true
46
- },
47
- status: {
48
- type: "string",
49
- required: true,
50
- enum: [
51
- "running",
52
- "inactive",
53
- "corrupt",
54
- "unsupported",
55
- "unavailable"
56
- ]
57
- },
58
- description: { type: "string" }
38
+ type: "object",
39
+ additionalProperties: false,
40
+ properties: {
41
+ running: {
42
+ type: "integer",
43
+ required: true
44
+ },
45
+ limit: {
46
+ type: "integer",
47
+ required: true
48
+ },
49
+ agents: {
50
+ type: "array",
51
+ required: true,
52
+ items: {
53
+ type: "object",
54
+ additionalProperties: false,
55
+ properties: {
56
+ name: {
57
+ type: "string",
58
+ required: true
59
+ },
60
+ status: {
61
+ type: "string",
62
+ required: true,
63
+ enum: [
64
+ "running",
65
+ "inactive",
66
+ "corrupt",
67
+ "unsupported",
68
+ "unavailable"
69
+ ]
70
+ },
71
+ description: { type: "string" }
72
+ }
73
+ }
59
74
  }
60
75
  }
61
76
  },
62
- render: (_args, entries) => [{
77
+ render: (_args, value) => [{
63
78
  type: "text",
64
- text: entries.map((entry) => `${entry.name} [${entry.status}]${entry.description === void 0 ? "" : ` — ${entry.description}`}`).join("\n")
79
+ text: [`Subagent capacity: running=${value.running}, limit=${value.limit}`, ...value.agents.map((entry) => `${entry.name} [${entry.status}]${entry.description === void 0 ? "" : ` — ${entry.description}`}`)].join("\n")
65
80
  }]
66
81
  },
67
82
  async execute(_args, exec) {
68
83
  const parent = exec.agent;
69
- if (!parent) throw new Error("list_agents requires a calling agent (exec.agent was undefined)");
84
+ if (!parent) throw new ToolContextUnavailableError("list_agents requires a calling agent (exec.agent was undefined)");
70
85
  const root = ctx.subagents.rootOf(parent);
71
86
  const entries = await ctx.subagents.listDescendants(root.id, exec.signal);
72
- return [{
73
- name: ROOT_AGENT_NAME,
74
- status: statusOf(ctx.agents, root.id),
75
- description: "root agent"
76
- }, ...entries.map((entry) => project(ctx.agents, entry)).filter((entry) => entry !== void 0)];
87
+ return {
88
+ ...ctx.subagents.capacityOf(parent),
89
+ agents: [{
90
+ name: ROOT_AGENT_NAME,
91
+ status: statusOf(ctx.agents, root.id),
92
+ description: "root agent"
93
+ }, ...entries.map((entry) => project(ctx.agents, entry)).filter((entry) => entry !== void 0)]
94
+ };
77
95
  }
78
96
  });
79
97
  ctx.tools.register(definition);
@@ -249,7 +267,7 @@ function apply(ctx, config = {}) {
249
267
  },
250
268
  async execute(args, exec) {
251
269
  const sender = exec.agent;
252
- if (!sender) throw new Error("send_message requires a calling agent (exec.agent was undefined)");
270
+ if (!sender) throw new ToolContextUnavailableError("send_message requires a calling agent (exec.agent was undefined)");
253
271
  const message = [{
254
272
  type: "text",
255
273
  text: args.message
@@ -270,7 +288,10 @@ function apply(ctx, config = {}) {
270
288
  const names = ctx.subagents.namesOf(agent);
271
289
  let identity = names.parent === void 0 ? `You are the root agent. Your name is ${JSON.stringify(names.self)}.` : `You are a subagent delegated by agent ${JSON.stringify(names.parent)}.\nYour name is ${JSON.stringify(names.self)}.\nThe root agent of your collaboration tree is ${JSON.stringify(ROOT_AGENT_NAME)}.`;
272
290
  const guidance = [];
273
- if (ctx.tools.get(sendMessage.name, scope, toolSet) === sendMessage) guidance.push("To message other agents, use send_message({ agent: \"<agent-name>\", message: \"...\" }).");
291
+ if (ctx.tools.get(sendMessage.name, scope, toolSet) === sendMessage) {
292
+ guidance.push("To message other agents, use send_message({ agent: \"<agent-name>\", message: \"...\" }).");
293
+ if (names.parent !== void 0 && ctx.get("agentTeams")?.isEnabled(agent) !== true) guidance.push("When you finish, use send_message to send a self-contained result to the agent that delegated you. Message any agent as soon as a finding changes what it should do next; sending a message does not end your turn.");
294
+ }
274
295
  if (ctx.tools.get(listAgents.name, scope, toolSet) === listAgents) guidance.push("Use list_agents({}) to find your collaborator agents and their names.");
275
296
  if (guidance.length > 0) identity += "\n\n" + guidance.join("\n");
276
297
  return identity;
@@ -305,7 +326,7 @@ function apply(ctx, config = {}) {
305
326
  },
306
327
  async execute(args, exec) {
307
328
  const caller = exec.agent;
308
- if (!caller) throw new Error("interrupt_agent requires a calling agent (exec.agent was undefined)");
329
+ if (!caller) throw new ToolContextUnavailableError("interrupt_agent requires a calling agent (exec.agent was undefined)");
309
330
  const targetId = await ctx.subagents.resolveName(caller, args.agent, exec.signal);
310
331
  ctx.subagents.interrupt(targetId, {
311
332
  kind: "ancestor",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAQxC,eAAO,MAAM,IAAI,0BAA0B,CAAA;AAC3C,eAAO,MAAM,MAAM,UAAmD,CAAA;AAEtE,uCAAuC;AACvC,MAAM,WAAW,MAAM;IACrB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,yDAAyD;AACzD,eAAO,MAAM,MAAM,EAAE,CAAC,CAAC,MAAM,CAE3B,CAAA;AAEF;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,MAAW,GAAG,IAAI,CAuH7D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AASxC,eAAO,MAAM,IAAI,0BAA0B,CAAA;AAC3C,eAAO,MAAM,MAAM,UAAmD,CAAA;AAEtE,uCAAuC;AACvC,MAAM,WAAW,MAAM;IACrB,4FAA4F;IAC5F,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,yDAAyD;AACzD,eAAO,MAAM,MAAM,EAAE,CAAC,CAAC,MAAM,CAE3B,CAAA;AAEF;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,MAAW,GAAG,IAAI,CA4H7D"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,CAAC,MAAM,0BAA0B,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEnD,MAAM,CAAC,MAAM,IAAI,GAAG,uBAAuB,CAAA;AAC3C,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAA;AAQtE,yDAAyD;AACzD,MAAM,CAAC,MAAM,MAAM,GAAc,CAAC,CAAC,M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AI,2BAA2B,CAAC,qEAAqE,CAAC,CAAA;YAC9G,CAAC;YACD,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;YACjF,oEAAoE;YACpE,2DAA2D;YAC3D,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAA;YACtE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;QAC3B,CAAC;KACF,CAAC,CAAC,CAAA;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"list-agents.d.ts","sourceRoot":"","sources":["../../src/list-agents.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAExF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAkC5D;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,cAAc,CAqD/D"}
1
+ {"version":3,"file":"list-agents.d.ts","sourceRoot":"","sources":["../../src/list-agents.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAExF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAkC5D;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,cAAc,CAmE/D"}
@@ -1 +1 @@
1
- {"version":3,"file":"list-agents.js","sourceRoot":"","sources":["../../src/list-agents.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAGxF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAInD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAa3D,yE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@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-tool-subagent-control",
3
3
  "description": "Shared messaging, interruption, and child discovery tools for subagents",
4
- "version": "0.2.2-rc.5",
4
+ "version": "0.2.3-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -33,33 +33,41 @@
33
33
  "license": "MIT",
34
34
  "peerDependencies": {
35
35
  "@deepseek-ai/cordis": "~4.1.0",
36
- "@deepseek-ai/dsh-llm": "0.2.2-rc.5",
37
- "@deepseek-ai/dsh-session": "0.2.2-rc.5",
38
- "@deepseek-ai/dsh-subagent": "0.2.2-rc.5",
39
- "@deepseek-ai/dsh-tools": "0.2.2-rc.5",
40
- "@deepseek-ai/dsh-agent": "0.2.2-rc.5",
41
- "@deepseek-ai/dsh-system-prompt": "0.2.2-rc.5"
36
+ "@deepseek-ai/dsh-llm": "0.2.3-alpha.1",
37
+ "@deepseek-ai/dsh-session": "0.2.3-alpha.1",
38
+ "@deepseek-ai/dsh-subagent": "0.2.3-alpha.1",
39
+ "@deepseek-ai/dsh-tools": "0.2.3-alpha.1",
40
+ "@deepseek-ai/dsh-agent": "0.2.3-alpha.1",
41
+ "@deepseek-ai/dsh-system-prompt": "0.2.3-alpha.1",
42
+ "@deepseek-ai/dsh-agent-team": "0.2.3-alpha.1"
43
+ },
44
+ "peerDependenciesMeta": {
45
+ "@deepseek-ai/dsh-agent-team": {
46
+ "optional": true
47
+ }
42
48
  },
43
49
  "devDependencies": {
50
+ "@deepseek-ai/dsh-agent-team": "0.2.3-alpha.1",
51
+ "@deepseek-ai/dsh-brand": "0.2.3-alpha.1",
44
52
  "@deepseek-ai/cordis": "~4.1.0",
45
- "@deepseek-ai/dsh-agent": "0.2.2-rc.5",
46
- "@deepseek-ai/dsh-agent-loop": "0.2.2-rc.5",
47
- "@deepseek-ai/dsh-agent-loop-testkit": "0.2.2-rc.5",
48
- "@deepseek-ai/dsh-llm": "0.2.2-rc.5",
49
- "@deepseek-ai/dsh-session": "0.2.2-rc.5",
50
- "@deepseek-ai/dsh-session-persistence": "0.2.2-rc.5",
51
- "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.2-rc.5",
52
- "@deepseek-ai/dsh-session-projection": "0.2.2-rc.5",
53
- "@deepseek-ai/dsh-session-query": "0.2.2-rc.5",
54
- "@deepseek-ai/dsh-subagent": "0.2.2-rc.5",
55
- "@deepseek-ai/dsh-subagent-fork-in-process": "0.2.2-rc.5",
56
- "@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.2-rc.5",
57
- "@deepseek-ai/dsh-system-prompt": "0.2.2-rc.5",
58
- "@deepseek-ai/dsh-tool-testkit": "0.2.2-rc.5",
59
- "@deepseek-ai/dsh-tools": "0.2.2-rc.5"
53
+ "@deepseek-ai/dsh-agent": "0.2.3-alpha.1",
54
+ "@deepseek-ai/dsh-agent-loop": "0.2.3-alpha.1",
55
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.2.3-alpha.1",
56
+ "@deepseek-ai/dsh-llm": "0.2.3-alpha.1",
57
+ "@deepseek-ai/dsh-session": "0.2.3-alpha.1",
58
+ "@deepseek-ai/dsh-session-persistence": "0.2.3-alpha.1",
59
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.3-alpha.1",
60
+ "@deepseek-ai/dsh-session-projection": "0.2.3-alpha.1",
61
+ "@deepseek-ai/dsh-session-query": "0.2.3-alpha.1",
62
+ "@deepseek-ai/dsh-subagent": "0.2.3-alpha.1",
63
+ "@deepseek-ai/dsh-subagent-fork-in-process": "0.2.3-alpha.1",
64
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.3-alpha.1",
65
+ "@deepseek-ai/dsh-system-prompt": "0.2.3-alpha.1",
66
+ "@deepseek-ai/dsh-tool-testkit": "0.2.3-alpha.1",
67
+ "@deepseek-ai/dsh-tools": "0.2.3-alpha.1"
60
68
  },
61
69
  "dependencies": {
62
70
  "@deepseek-ai/schemastery": "~3.19.0",
63
- "@deepseek-ai/dsh-util-values": "0.2.2-rc.5"
71
+ "@deepseek-ai/dsh-util-values": "0.2.3-alpha.1"
64
72
  }
65
73
  }
package/src/index.ts CHANGED
@@ -10,10 +10,11 @@
10
10
 
11
11
  import type { Context } from '@deepseek-ai/cordis'
12
12
  import z from '@deepseek-ai/schemastery'
13
- import { defineTool } from '@deepseek-ai/dsh-tools'
13
+ import { defineTool, ToolContextUnavailableError } from '@deepseek-ai/dsh-tools'
14
14
  import type { ContentBlock } from '@deepseek-ai/dsh-llm'
15
15
  import { ROOT_AGENT_NAME } from '@deepseek-ai/dsh-subagent'
16
16
  import type {} from '@deepseek-ai/dsh-system-prompt'
17
+ import type {} from '@deepseek-ai/dsh-agent-team'
17
18
  import { registerListAgents } from './list-agents.ts'
18
19
  import { registerWaitAgent } from './wait-agent.ts'
19
20
 
@@ -73,7 +74,7 @@ export function apply(ctx: Context, config: Config = {}): void {
73
74
  async execute(args, exec) {
74
75
  const sender = exec.agent
75
76
  if (!sender) {
76
- throw new Error('send_message requires a calling agent (exec.agent was undefined)')
77
+ throw new ToolContextUnavailableError('send_message requires a calling agent (exec.agent was undefined)')
77
78
  }
78
79
  const message: ContentBlock[] = [{ type: 'text', text: args.message }]
79
80
  const targetId = await ctx.subagents.resolveName(sender, args.agent, exec.signal)
@@ -99,6 +100,11 @@ export function apply(ctx: Context, config: Config = {}): void {
99
100
  const guidance: string[] = []
100
101
  if (ctx.tools.get(sendMessage.name, scope, toolSet) === sendMessage) {
101
102
  guidance.push('To message other agents, use send_message({ agent: "<agent-name>", message: "..." }).')
103
+ // Team mode coordinates results through shared tasks, so only plain delegation asks for a report.
104
+ if (names.parent !== undefined && ctx.get('agentTeams')?.isEnabled(agent) !== true) {
105
+ guidance.push('When you finish, use send_message to send a self-contained result to the agent that delegated you. '
106
+ + 'Message any agent as soon as a finding changes what it should do next; sending a message does not end your turn.')
107
+ }
102
108
  }
103
109
  if (ctx.tools.get(listAgents.name, scope, toolSet) === listAgents) {
104
110
  guidance.push('Use list_agents({}) to find your collaborator agents and their names.')
@@ -146,7 +152,7 @@ export function apply(ctx: Context, config: Config = {}): void {
146
152
  const caller = exec.agent
147
153
  if (!caller) {
148
154
  // Ancestor authority requires an exact live calling agent.
149
- throw new Error('interrupt_agent requires a calling agent (exec.agent was undefined)')
155
+ throw new ToolContextUnavailableError('interrupt_agent requires a calling agent (exec.agent was undefined)')
150
156
  }
151
157
  const targetId = await ctx.subagents.resolveName(caller, args.agent, exec.signal)
152
158
  // The service authorizes the exact live caller against the target's
@@ -1,7 +1,7 @@
1
1
  /** Discover the caller's entire subagent tree; the control plugin owns registration. */
2
2
 
3
3
  import type { Context } from '@deepseek-ai/cordis'
4
- import { defineTool } from '@deepseek-ai/dsh-tools'
4
+ import { defineTool, ToolContextUnavailableError } from '@deepseek-ai/dsh-tools'
5
5
  import type { ToolDefinition } from '@deepseek-ai/dsh-tools'
6
6
  import type { Agent } from '@deepseek-ai/dsh-agent'
7
7
  import type { SessionId } from '@deepseek-ai/dsh-session'
@@ -46,6 +46,7 @@ export function registerListAgents(ctx: Context): ToolDefinition {
46
46
  name: 'list_agents',
47
47
  description:
48
48
  'List your entire subagent tree: the root agent and all reachable continuable descendants, including yourself. '
49
+ + 'Shared capacity reports running/limit; do not spawn more agents when capacity is limited. '
49
50
  + 'Rows carry names, descriptions, and status. A descendant\'s name is its path from the root, such as reviewer/checker. '
50
51
  + 'You can message any other agent in the subagent tree. '
51
52
  + 'running means it is working; inactive means no turn is executing; it does not indicate task completion, success, or failure. '
@@ -58,38 +59,51 @@ export function registerListAgents(ctx: Context): ToolDefinition {
58
59
  isConcurrencySafe: () => true,
59
60
  output: {
60
61
  schema: {
61
- type: 'array',
62
- items: {
63
- type: 'object',
64
- additionalProperties: false,
65
- properties: {
66
- name: { type: 'string', required: true },
67
- status: { type: 'string', required: true, enum: ['running', 'inactive', 'corrupt', 'unsupported', 'unavailable'] },
68
- description: { type: 'string' },
62
+ type: 'object',
63
+ additionalProperties: false,
64
+ properties: {
65
+ running: { type: 'integer', required: true },
66
+ limit: { type: 'integer', required: true },
67
+ agents: {
68
+ type: 'array', required: true,
69
+ items: {
70
+ type: 'object',
71
+ additionalProperties: false,
72
+ properties: {
73
+ name: { type: 'string', required: true },
74
+ status: { type: 'string', required: true, enum: ['running', 'inactive', 'corrupt', 'unsupported', 'unavailable'] },
75
+ description: { type: 'string' },
76
+ },
77
+ },
69
78
  },
70
79
  },
71
80
  },
72
- render: (_args, entries) => [{
81
+ render: (_args, value) => [{
73
82
  type: 'text',
74
- text: entries.map(entry =>
75
- `${entry.name} [${entry.status}]${entry.description === undefined ? '' : ` — ${entry.description}`}`,
76
- ).join('\n'),
83
+ text: [
84
+ `Subagent capacity: running=${value.running}, limit=${value.limit}`,
85
+ ...value.agents.map(entry =>
86
+ `${entry.name} [${entry.status}]${entry.description === undefined ? '' : ` — ${entry.description}`}`),
87
+ ].join('\n'),
77
88
  }],
78
89
  },
79
90
  async execute(_args, exec) {
80
91
  const parent = exec.agent
81
92
  if (!parent) {
82
93
  // Non-agent callers have no session whose children could be listed.
83
- throw new Error('list_agents requires a calling agent (exec.agent was undefined)')
94
+ throw new ToolContextUnavailableError('list_agents requires a calling agent (exec.agent was undefined)')
84
95
  }
85
96
  const root = ctx.subagents.rootOf(parent)
86
97
  const entries = await ctx.subagents.listDescendants(root.id, exec.signal)
87
- return [
88
- { name: ROOT_AGENT_NAME, status: statusOf(ctx.agents, root.id), description: 'root agent' },
89
- ...entries
90
- .map(entry => project(ctx.agents, entry))
91
- .filter(entry => entry !== undefined),
92
- ]
98
+ return {
99
+ ...ctx.subagents.capacityOf(parent),
100
+ agents: [
101
+ { name: ROOT_AGENT_NAME, status: statusOf(ctx.agents, root.id), description: 'root agent' },
102
+ ...entries
103
+ .map(entry => project(ctx.agents, entry))
104
+ .filter(entry => entry !== undefined),
105
+ ],
106
+ }
93
107
  },
94
108
  })
95
109
  ctx.tools.register(definition)