diff --git a/docs/tool-catalog.i18n.yaml b/docs/tool-catalog.i18n.yaml index 3b76b88253..6391fcaf7f 100644 --- a/docs/tool-catalog.i18n.yaml +++ b/docs/tool-catalog.i18n.yaml @@ -243,8 +243,8 @@ en: 9190a32df5e10ddd zh: 48e1b05956d63e26 /tool-schema-catalog/deepseek-ai-dsh-tool-subagent-control/list-agents: - en: 90e684158bcd0b55 - zh: 23cdd90a05f4909f + en: b68f6c31d72980d1 + zh: 38be7bfea793043c /tool-schema-catalog/deepseek-ai-dsh-tool-subagent-control/send-message: en: 69c1c0a80c24e3a4 zh: 8d3e8b8b1137e5c5 diff --git a/docs/tool-catalog.md b/docs/tool-catalog.md index 811595b41f..18914b13c3 100644 --- a/docs/tool-catalog.md +++ b/docs/tool-catalog.md @@ -2147,21 +2147,12 @@ Source: [`packages/subagent/tool-subagent-control/src/index.ts`](../packages/sub ### `list_agents` -List agents you can message: subagents you started and, when you are a subagent, your parent and your continuable siblings. Rows carry ids, descriptions, and status. running means it is working; inactive means it is not currently working. You will be notified when a subagent finishes; there is no need to keep checking its status. Use send_message to continue the conversation. +List all your reachable continuable descendants and, when you are a continuable subagent, your parent and continuable siblings. Rows carry ids, descriptions, and status; descendant rows also carry parent ids and depth. You can message your parent, continuable siblings, and direct children. Deeper descendants accept only interrupt_agent. running means it is working; inactive means it is not currently working. 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. ```json { "type": "object", - "properties": { - "scope": { - "type": "string", - "description": "children (default) lists your parent, continuable siblings, and direct children; each accepts send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent.", - "enum": [ - "children", - "descendants" - ] - } - } + "properties": {} } ``` diff --git a/docs/tool-catalog.zh.md b/docs/tool-catalog.zh.md index 780df7e476..1c76491da8 100644 --- a/docs/tool-catalog.zh.md +++ b/docs/tool-catalog.zh.md @@ -2153,21 +2153,12 @@ lsp 工具将提供方选择和语言服务器子进程置于 ctx.lsp 之后, ### `list_agents` -列出可联系的代理:你启动的子代理,以及你作为子代理时的父级和可继续同级。每行包含 id、描述和状态。running 表示正在工作,inactive 表示当前未工作。子代理完成时会通知你,无需反复检查;使用 send_message 继续对话。 +列出全部可达的可继续后代;如果调用方是可继续子代理,还列出父代理和可继续同级。行包含 id、描述和状态;后代行还包含父级 id 和深度。可以向父代理、可继续同级和直接子级发送消息,更深后代只接受 interrupt_agent。running 表示正在工作;inactive 表示当前没有工作。直属子代理结束时会收到通知,无需反复查询其状态。使用 send_message 继续对话。 ```json { "type": "object", - "properties": { - "scope": { - "type": "string", - "description": "children (default) lists your parent, continuable siblings, and direct children; each accepts send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent.", - "enum": [ - "children", - "descendants" - ] - } - } + "properties": {} } ``` diff --git a/docs/upgrade-guide/v0.2.1-alpha.3/agent-team-subagents/guide.i18n.yaml b/docs/upgrade-guide/v0.2.1-alpha.3/agent-team-subagents/guide.i18n.yaml index de503a5d4e..ca805fd4fa 100644 --- a/docs/upgrade-guide/v0.2.1-alpha.3/agent-team-subagents/guide.i18n.yaml +++ b/docs/upgrade-guide/v0.2.1-alpha.3/agent-team-subagents/guide.i18n.yaml @@ -9,8 +9,8 @@ en: 32ee389e58de25fe zh: 420fd4344f8f1214 /agent-teams-uses-subagents-and-session-ids/change: - en: fb96ccedefaa5eee - zh: 7598b8e1f2cffac7 + en: 208add38ac8dc327 + zh: c34fce9b2a978e5f /agent-teams-uses-subagents-and-session-ids/migration: en: 0ed5e22412074192 zh: 60deae7d46a21c75 diff --git a/docs/upgrade-guide/v0.2.1-alpha.3/agent-team-subagents/guide.md b/docs/upgrade-guide/v0.2.1-alpha.3/agent-team-subagents/guide.md index 278d432b62..70d6e7ead2 100644 --- a/docs/upgrade-guide/v0.2.1-alpha.3/agent-team-subagents/guide.md +++ b/docs/upgrade-guide/v0.2.1-alpha.3/agent-team-subagents/guide.md @@ -12,6 +12,7 @@ English | [中文](guide.zh.md) The experimental Agent Teams plugins share agent creation, discovery, messaging, and interruption with subagents. Start a teammate with `subagent` or `subagent_fork`, describe its responsibility with `description`, and use its returned agent id for messages and task assignment. Descriptions may repeat and never identify a recipient. - `spawn_teammate` and the Team-scoped `send_message`, `list_agents`, and `interrupt_agent` are removed. The standard control tools use `agent_id`, not `target`. Continuable children of one live parent can message each other by id. +- `list_agents` takes no arguments and always lists all reachable continuable descendants, plus a continuable caller’s live parent and siblings. Remove the `scope` argument from scripted calls. Listing deeper descendants does not grant messaging or task-assignment authority. - The Team profile no longer disables the subagent tools. Team adds only task tools, `wait_agent`, and collaboration guidance. - `agent-team` rejects `maxMembers`, `maxMessageBytes`, and `disposalTimeoutMs`; `tool-agent-team` rejects `interrupt`, `freshProvider`, and `forkProvider`. - `ctx.agentTeams` removes `spawnTeammate()`, `sendMessage()`, `interrupt()`, and `listMembers()`. Task views expose `ownerId` instead of `ownerName`; task ownership uses Session ids, including the Lead's id. diff --git a/docs/upgrade-guide/v0.2.1-alpha.3/agent-team-subagents/guide.zh.md b/docs/upgrade-guide/v0.2.1-alpha.3/agent-team-subagents/guide.zh.md index 408763c21d..01ca6ec858 100644 --- a/docs/upgrade-guide/v0.2.1-alpha.3/agent-team-subagents/guide.zh.md +++ b/docs/upgrade-guide/v0.2.1-alpha.3/agent-team-subagents/guide.zh.md @@ -12,6 +12,7 @@ description: "Agent Teams 使用标准 subagent 工具和 Session id;移除 Te 实验性 Agent Teams 插件与 subagent 共用代理创建、发现、消息和中断能力。使用 `subagent` 或 `subagent_fork` 创建队友,以 `description` 描述职责,并用返回的 agent id 发送消息和分配任务。描述可以重复,不能作为收件人标识。 - 移除 `spawn_teammate` 以及 Team 作用域的 `send_message`、`list_agents` 和 `interrupt_agent`。标准控制工具使用 `agent_id` 而非 `target`。同一个在线父代理的可继续子代理可以通过 id 互发消息。 +- `list_agents` 不接收参数,始终列出全部可达的可继续后代,以及可继续调用方的在线父级和同级。从脚本调用中移除 `scope` 参数。列出更深后代不会授予消息或任务指派权限。 - Team profile 不再禁用 subagent 工具。Team 只增加任务工具、`wait_agent` 和协作提示。 - `agent-team` 拒绝 `maxMembers`、`maxMessageBytes` 和 `disposalTimeoutMs`;`tool-agent-team` 拒绝 `interrupt`、`freshProvider` 和 `forkProvider`。 - `ctx.agentTeams` 移除 `spawnTeammate()`、`sendMessage()`、`interrupt()` 和 `listMembers()`。任务视图以 `ownerId` 取代 `ownerName`;包括 Lead 在内,任务所有者均使用 Session id。 diff --git a/packages/experimental/tool-agent-team/README.md b/packages/experimental/tool-agent-team/README.md index 60b1f9aceb..037b7b36dd 100644 --- a/packages/experimental/tool-agent-team/README.md +++ b/packages/experimental/tool-agent-team/README.md @@ -128,7 +128,7 @@ The Team Lead and all teammates share the same working directory and filesystem. Prefer read/edit/write for file changes. If a file operation returns FS_STALE_VERSION, read the current file, rebase your intended change onto the new content, and retry. Bash, formatters, code generators, and scripts are not fully protected by the filesystem version guard; coordinate them explicitly and have the Lead review the final diff and run tests. -Use agent ids as task owners. The Lead can reassign to itself, its direct continuable children, or historical members; other descendants claim tasks themselves. list_agents shows direct contacts by default; descendants scope discovers deeper agents without granting message or assignment authority. inactive means no turn is executing; it does not describe task completion, success, failure, or waiting for other agents. A successful send does not mean the recipient has processed it. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. Before wait_agent, make sure another required member is running; use send_message first for an inactive direct contact, or coordinate through its parent for a deeper member. wait_agent observes only changes after that call starts, never wakes a member, and returns noProgress immediately when no other member is running. Re-list after wakeup or timeout. The Lead must wait for required teammates before giving the final answer. +Use agent ids as task owners. The Lead can reassign to itself, its direct continuable children, or historical members; other descendants claim tasks themselves. list_agents shows direct contacts and all reachable continuable descendants; discovery does not grant message or assignment authority. inactive means no turn is executing; it does not describe task completion, success, failure, or waiting for other agents. A successful send does not mean the recipient has processed it. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. Before wait_agent, make sure another required member is running; use send_message first for an inactive direct contact, or coordinate through its parent for a deeper member. wait_agent observes only changes after that call starts, never wakes a member, and returns noProgress immediately when no other member is running. Re-list after wakeup or timeout. The Lead must wait for required teammates before giving the final answer. ``` #### Token effect diff --git a/packages/experimental/tool-agent-team/README.zh.md b/packages/experimental/tool-agent-team/README.zh.md index 1554bd9639..d52273921a 100644 --- a/packages/experimental/tool-agent-team/README.zh.md +++ b/packages/experimental/tool-agent-team/README.zh.md @@ -128,7 +128,7 @@ The Team Lead and all teammates share the same working directory and filesystem. Prefer read/edit/write for file changes. If a file operation returns FS_STALE_VERSION, read the current file, rebase your intended change onto the new content, and retry. Bash, formatters, code generators, and scripts are not fully protected by the filesystem version guard; coordinate them explicitly and have the Lead review the final diff and run tests. -Use agent ids as task owners. The Lead can reassign to itself, its direct continuable children, or historical members; other descendants claim tasks themselves. list_agents shows direct contacts by default; descendants scope discovers deeper agents without granting message or assignment authority. inactive means no turn is executing; it does not describe task completion, success, failure, or waiting for other agents. A successful send does not mean the recipient has processed it. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. Before wait_agent, make sure another required member is running; use send_message first for an inactive direct contact, or coordinate through its parent for a deeper member. wait_agent observes only changes after that call starts, never wakes a member, and returns noProgress immediately when no other member is running. Re-list after wakeup or timeout. The Lead must wait for required teammates before giving the final answer. +Use agent ids as task owners. The Lead can reassign to itself, its direct continuable children, or historical members; other descendants claim tasks themselves. list_agents shows direct contacts and all reachable continuable descendants; discovery does not grant message or assignment authority. inactive means no turn is executing; it does not describe task completion, success, failure, or waiting for other agents. A successful send does not mean the recipient has processed it. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. Before wait_agent, make sure another required member is running; use send_message first for an inactive direct contact, or coordinate through its parent for a deeper member. wait_agent observes only changes after that call starts, never wakes a member, and returns noProgress immediately when no other member is running. Re-list after wakeup or timeout. The Lead must wait for required teammates before giving the final answer. ``` #### Token 影响 diff --git a/packages/experimental/tool-agent-team/src/index.ts b/packages/experimental/tool-agent-team/src/index.ts index 74b153e147..cf3b411e21 100644 --- a/packages/experimental/tool-agent-team/src/index.ts +++ b/packages/experimental/tool-agent-team/src/index.ts @@ -29,7 +29,7 @@ The Team Lead and all teammates share the same working directory and filesystem. Prefer read/edit/write for file changes. If a file operation returns FS_STALE_VERSION, read the current file, rebase your intended change onto the new content, and retry. Bash, formatters, code generators, and scripts are not fully protected by the filesystem version guard; coordinate them explicitly and have the Lead review the final diff and run tests. -Use agent ids as task owners. The Lead can reassign to itself, its direct continuable children, or historical members; other descendants claim tasks themselves. list_agents shows direct contacts by default; descendants scope discovers deeper agents without granting message or assignment authority. inactive means no turn is executing; it does not describe task completion, success, failure, or waiting for other agents. A successful send does not mean the recipient has processed it. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. Before wait_agent, make sure another required member is running; use send_message first for an inactive direct contact, or coordinate through its parent for a deeper member. wait_agent observes only changes after that call starts, never wakes a member, and returns noProgress immediately when no other member is running. Re-list after wakeup or timeout. The Lead must wait for required teammates before giving the final answer.` +Use agent ids as task owners. The Lead can reassign to itself, its direct continuable children, or historical members; other descendants claim tasks themselves. list_agents shows direct contacts and all reachable continuable descendants; discovery does not grant message or assignment authority. inactive means no turn is executing; it does not describe task completion, success, failure, or waiting for other agents. A successful send does not mean the recipient has processed it. Shared-task workflow is list, get, claim with the current revision, perform the work, then complete. Task readiness never starts an owner. Before wait_agent, make sure another required member is running; use send_message first for an inactive direct contact, or coordinate through its parent for a deeper member. wait_agent observes only changes after that call starts, never wakes a member, and returns noProgress immediately when no other member is running. Re-list after wakeup or timeout. The Lead must wait for required teammates before giving the final answer.` const NO_ACTIVE_PEER_MESSAGE = 'No other Team member is running. wait_agent cannot make progress or wake inactive teammates. Re-list with list_agents and team_task_list, then use send_message to wake a required inactive direct contact before waiting again; coordinate deeper members through their parent.' diff --git a/packages/subagent/tool-subagent-control/README.i18n.yaml b/packages/subagent/tool-subagent-control/README.i18n.yaml index 73439c4bc2..c91f1a708e 100644 --- a/packages/subagent/tool-subagent-control/README.i18n.yaml +++ b/packages/subagent/tool-subagent-control/README.i18n.yaml @@ -27,8 +27,8 @@ en: 4ccd504f8886d8b0 zh: 480ab8cba905ac02 /deepseek-ai-dsh-tool-subagent-control/use-this-package/list-agents: - en: a5cfa30c936ca353 - zh: d8a83a6190cbd7c8 + en: 22cd16d544be9f7f + zh: 52aa3655d8091ec4 /deepseek-ai-dsh-tool-subagent-control/understand-the-implementation: en: c5cdf01a78c990f2 zh: 53c180d726ce4502 @@ -39,8 +39,8 @@ en: b596c53c18b3e7f5 zh: bd17f4216a3a6301 /deepseek-ai-dsh-tool-subagent-control/understand-the-implementation/listing-projection: - en: 25dd569dbb350eb7 - zh: bd7ae865d93a6c4b + en: 05a40d0cd5acd045 + zh: 1914d078d4263753 /deepseek-ai-dsh-tool-subagent-control/understand-the-implementation/source-map: en: c86b31cecfd505a0 zh: 14250cb3bf3e614f @@ -54,8 +54,8 @@ en: e4c7376d4f29dbd5 zh: 6b7a9eaf69c9ea53 /deepseek-ai-dsh-tool-subagent-control/model-experience/tool-schema/what-the-model-sees: - en: d0c7a044fe6b9bf4 - zh: 94e7b4fc4615f356 + en: b558efb37bc78acf + zh: 8534c438edd306cd /deepseek-ai-dsh-tool-subagent-control/model-experience/tool-schema/token-effect: en: 282c65ac0eebfbdd zh: e9610d49f72918b0 @@ -90,11 +90,11 @@ en: 094e55d258f2ec2e zh: f364bc9046530bff /deepseek-ai-dsh-tool-subagent-control/model-experience/listing-result/what-the-model-sees: - en: 5d64b578e3301189 - zh: 68b04cf88e83bde7 + en: a975a6e493671c84 + zh: a258b718855972ea /deepseek-ai-dsh-tool-subagent-control/model-experience/listing-result/token-effect: - en: 55161776c603f199 - zh: 8e5625243f42dbaa + en: d3ced2fbde9382ef + zh: 8c7e904ed30f7353 /deepseek-ai-dsh-tool-subagent-control/model-experience/listing-result/kv-cache-effect: en: 4a629edb36a17e32 zh: 5a7539cfbf404c54 diff --git a/packages/subagent/tool-subagent-control/README.md b/packages/subagent/tool-subagent-control/README.md index aa835c08af..b1992fc46f 100644 --- a/packages/subagent/tool-subagent-control/README.md +++ b/packages/subagent/tool-subagent-control/README.md @@ -53,7 +53,7 @@ Sends a message to the Session id in `agent_id`. Any exact live Agent may target ### list_agents -Lists agents by id and description. `children` (default) lists direct continuable children from the parent catalog and, for a continuable subagent with a live parent, first lists that parent and its continuable siblings. `descendants` lists only reachable descendants in stable pre-order, with their direct parent id and depth. Live status is `running` or `inactive`. External entries are omitted without reading child Sessions; readable one-shot children are traversal nodes but not output rows. Unknown modes and unreadable child catalogs produce diagnostics only in `descendants` scope. Ordinary Session forks are not catalog entries. +Lists all reachable continuable descendants in stable pre-order, with each row’s direct parent id and depth. A continuable subagent with a live parent first sees that parent and its continuable siblings. Live status is `running` or `inactive`. External entries are omitted without reading child Sessions; readable one-shot children are traversal nodes but not output rows. Unknown modes and unreadable child catalogs produce diagnostics. Ordinary Session forks are not catalog entries. ----- @@ -75,7 +75,7 @@ The tool forwards its execution signal, which owns admission only until inbox ac ### Listing projection -`list_agents` reads the caller’s catalog without a cursor and refines status through the live Agent registry. In `children` scope, a continuable caller’s live parent catalog supplies the parent and sibling rows. Descendant traversal preserves catalog order; unknown modes remain traversable with diagnostics, while unreadable catalogs stop that branch. Descendants absent from reachable catalogs cannot be discovered. +`list_agents` traverses the caller’s catalogs without a cursor and refines status through the live Agent registry. A continuable caller’s live parent catalog supplies the parent and sibling rows. Descendant traversal preserves catalog order; unknown modes remain traversable with diagnostics, while unreadable catalogs stop that branch. Descendants absent from reachable catalogs cannot be discovered. ### Source map @@ -106,7 +106,7 @@ Read these pages when the package-level contract is not enough; they move from t #### What the model sees -The generated [schemas](../../../docs/tool-catalog.md#deepseek-aidsh-tool-subagent-control): `send_message` takes an `agent_id` and `message`; `interrupt_agent` takes an `agent_id`; `list_agents` takes an optional `scope`. All addresses are Session ids; descriptions are display text and may repeat. +The generated [schemas](../../../docs/tool-catalog.md#deepseek-aidsh-tool-subagent-control): `send_message` takes an `agent_id` and `message`; `interrupt_agent` takes an `agent_id`; `list_agents` takes no arguments. All addresses are Session ids; descriptions are display text and may repeat. #### Token effect @@ -148,11 +148,11 @@ Append-only; newly visible content follows the reusable request prefix and does #### What the model sees -One line per row in stable order: ` [] —