Merge ID-only Team base into agent teamwork UI polish
This commit is contained in:
commit
5a052d6767
321 files changed
+1771
-4966
No files matched your search
@@ -140,8 +140,6 @@ flowchart LR
|
||||
cfg --> plugin_dsh_base_command_compact
|
||||
plugin_dsh_base_subagent["subagent<br/>@deepseek-ai/dsh-subagent"]
|
||||
cfg --> plugin_dsh_base_subagent
|
||||
plugin_dsh_base_subagent_names["subagent-names<br/>@deepseek-ai/dsh-subagent-names"]
|
||||
cfg --> plugin_dsh_base_subagent_names
|
||||
plugin_dsh_base_agent_team["agent-team<br/>@deepseek-ai/dsh-agent-team"]
|
||||
cfg --> plugin_dsh_base_agent_team
|
||||
plugin_dsh_base_tool_agent_team["tool-agent-team<br/>@deepseek-ai/dsh-tool-agent-team"]
|
||||
@@ -278,7 +276,6 @@ flowchart LR
|
||||
| `compaction-basic` | `@deepseek-ai/dsh-compaction-basic` |
|
||||
| `command-compact` | `@deepseek-ai/dsh-command-compact` |
|
||||
| `subagent` | `@deepseek-ai/dsh-subagent` |
|
||||
| `subagent-names` | `@deepseek-ai/dsh-subagent-names` |
|
||||
| `agent-team` | `@deepseek-ai/dsh-agent-team` |
|
||||
| `tool-agent-team` | `@deepseek-ai/dsh-tool-agent-team` |
|
||||
| `subagent-spawn-in-process` | `@deepseek-ai/dsh-subagent-spawn-in-process` |
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
"@deepseek-ai/dsh-sdk-minimal": "workspace:*",
|
||||
"@deepseek-ai/dsh-session-projection": "workspace:*",
|
||||
"@deepseek-ai/dsh-session-reference": "workspace:*",
|
||||
"@deepseek-ai/dsh-subagent-names": "workspace:*",
|
||||
"@deepseek-ai/dsh-skill": "workspace:*",
|
||||
"@deepseek-ai/dsh-skill-filesystem": "workspace:*",
|
||||
"@deepseek-ai/dsh-skill-office": "workspace:*",
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
{"type":"session/title","data":{"title":"Start a background job.","messageSeqs":[3],"source":{"kind":"fallback"}}}
|
||||
{"type":"assistant/message","data":{"turn":2,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"list-once","name":"list_agents","arguments":"{}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":0,"index":0,"dt":[],"id":"list-once","name":"list_agents","args":["{}"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"list-once","name":"list_agents","arguments":"{}"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"tool/call","data":{"turn":2,"step":1,"callId":"list-once","name":"list_agents","arguments":"{}"}}
|
||||
{"type":"tool/result","data":{"turn":2,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"list-once"},"toolCallId":"list-once","content":[{"type":"text","text":"{{sessionId}} [running] — lead: root agent\n{{sessionId}} [inactive] parent={{sessionId}} depth=1 — descriptorless child"}],"isError":false,"id":"{{sessionId}}"}},"sourceEventSeqs":[22],"surfaceOp":"append"}
|
||||
{"type":"tool/result","data":{"turn":2,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"list-once"},"toolCallId":"list-once","content":[{"type":"text","text":"{{sessionId}} [running] — root agent\n{{sessionId}} [inactive] parent={{sessionId}} depth=1 — descriptorless child"}],"isError":false,"id":"{{sessionId}}"}},"sourceEventSeqs":[22],"surfaceOp":"append"}
|
||||
{"type":"step/end","data":{"turn":2,"step":1}}
|
||||
{"type":"step/start","data":{"turn":2,"step":2}}
|
||||
{"type":"assistant/message","data":{"turn":2,"step":2,"message":{"role":"assistant","content":[{"type":"text","text":"The catalogued subagent is ready. PARENT_DONE"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":0,"index":0,"dt":[],"texts":["The catalogued subagent is ready. PARENT_DONE"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"The catalogued subagent is ready. PARENT_DONE"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
{"type":"step/start","data":{"turn":1,"step":1}}
|
||||
{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Use the write tool exactly once with file_path set to exactly the relative path inherited.txt and content escaped. If the write is denied, reply with the single word CHILD_DENIED and the denial marker line; do not retry and do not request escalation. If it succeeds, reply CHILD_WROTE."},{"type":"text","text":"Your final answer is delivered automatically if your parent is still online. Include the result and relevant evidence in that answer; the parent does not receive your full transcript, tool output, or reasoning. If your last action is a message to your parent, the completion notice omits your final answer; include the result and relevant evidence in that message."}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: read-only. Any available operation enforced by the DSH file sandbox cannot modify files in the standing mode. Do not refuse a required modification from this policy alone: try an available tool normally and follow any denial and escalation guidance it returns.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYour parent agent id is \"{{sessionId}}\". Use send_message({ name: \"{{sessionId}}\", message: \"<finding>\" }) when a finding changes what the parent should do next; sending a message does not end your turn.\n\nDelegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly.\n\nDelegation depth for `subagent_fork`: current 1, maximum 1, remaining levels 0. Do not call `subagent_fork` at this depth; carry out the work directly.\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: read-only. Any available operation enforced by the DSH file sandbox cannot modify files in the standing mode. Do not refuse a required modification from this policy alone: try an available tool normally and follow any denial and escalation guidance it returns."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"subagent:communication","text":"Your parent agent id is \"{{sessionId}}\". Use send_message({ name: \"{{sessionId}}\", message: \"<finding>\" }) when a finding changes what the parent should do next; sending a message does not end your turn."},{"name":"tool:subagent:depth","text":"Delegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly."},{"name":"tool:subagent_fork:depth","text":"Delegation depth for `subagent_fork`: current 1, maximum 1, remaining levels 0. Do not call `subagent_fork` at this depth; carry out the work directly."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: read-only. Any available operation enforced by the DSH file sandbox cannot modify files in the standing mode. Do not refuse a required modification from this policy alone: try an available tool normally and follow any denial and escalation guidance it returns.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYour parent agent id is \"{{sessionId}}\". Use send_message({ agent_id: \"{{sessionId}}\", message: \"<finding>\" }) when a finding changes what the parent should do next; sending a message does not end your turn.\n\nDelegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly.\n\nDelegation depth for `subagent_fork`: current 1, maximum 1, remaining levels 0. Do not call `subagent_fork` at this depth; carry out the work directly.\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: read-only. Any available operation enforced by the DSH file sandbox cannot modify files in the standing mode. Do not refuse a required modification from this policy alone: try an available tool normally and follow any denial and escalation guidance it returns."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"subagent:communication","text":"Your parent agent id is \"{{sessionId}}\". Use send_message({ agent_id: \"{{sessionId}}\", message: \"<finding>\" }) when a finding changes what the parent should do next; sending a message does not end your turn."},{"name":"tool:subagent:depth","text":"Delegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly."},{"name":"tool:subagent_fork:depth","text":"Delegation depth for `subagent_fork`: current 1, maximum 1, remaining levels 0. Do not call `subagent_fork` at this depth; carry out the work directly."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}
|
||||
{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","reasoningEffort":"low"},"tools":"{{tools}}"},"reason":"initial"}}
|
||||
{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}
|
||||
{"type":"session/title","data":{"title":"Use the write tool exactly","messageSeqs":[8],"source":{"kind":"fallback"}}}
|
||||
|
||||
+3
-4
@@ -24,13 +24,12 @@
|
||||
{"type":"assistant/message","data":{"turn":2,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"delegate-write","name":"subagent","arguments":"{\"description\": \"Delegated write probe\", \"prompt\": \"Use the write tool exactly once with file_path set to exactly the relative path inherited.txt and content escaped. If the write is denied, reply with the single word CHILD_DENIED and the denial marker line; do not retry and do not request escalation. If it succeeds, reply CHILD_WROTE.\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":0,"index":0,"dt":[],"id":"delegate-write","name":"subagent","args":["{\"description\": \"Delegated write probe\", \"prompt\": \"Use the write tool exactly once with file_path set to exactly the relative path inherited.txt and content escaped. If the write is denied, reply with the single word CHILD_DENIED and the denial marker line; do not retry and do not request escalation. If it succeeds, reply CHILD_WROTE.\"}"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"delegate-write","name":"subagent","arguments":"{\"description\": \"Delegated write probe\", \"prompt\": \"Use the write tool exactly once with file_path set to exactly the relative path inherited.txt and content escaped. If the write is denied, reply with the single word CHILD_DENIED and the denial marker line; do not retry and do not request escalation. If it succeeds, reply CHILD_WROTE.\"}"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
|
||||
{"type":"tool/call","data":{"turn":2,"step":1,"callId":"delegate-write","name":"subagent","arguments":"{\"description\": \"Delegated write probe\", \"prompt\": \"Use the write tool exactly once with file_path set to exactly the relative path inherited.txt and content escaped. If the write is denied, reply with the single word CHILD_DENIED and the denial marker line; do not retry and do not request escalation. If it succeeds, reply CHILD_WROTE.\"}"}}
|
||||
{"type":"subagent/catalog","data":{"version":0,"childId":"{{sessionId}}","childCreatedAt":0,"mode":"continuable","label":"Delegated write probe"}}
|
||||
{"type":"subagent-name/bound","data":{"version":1,"childId":"{{sessionId}}","name":"lead/agent-1"}}
|
||||
{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"inserted":[{"content":[{"type":"text","text":"Background subagent {{sessionId}} finished and will do no further work unless you send it more."},{"type":"text","text":"Its closing message:"},{"type":"text","text":"CHILD_DENIED [sandbox: file access denied under read-only mode]"}],"source":{"kind":"subagent-settled","form":"notice","summary":"Background subagent {{sessionId}} finished and will do no further work unless you send it more.","stopReason":"completed","senderSessionId":"{{sessionId}}"},"role":"user","id":"{{sessionId}}"}]}}
|
||||
{"type":"tool/result","data":{"turn":2,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"delegate-write"},"toolCallId":"delegate-write","content":[{"type":"text","text":"started subagent {{sessionId}}\nname: lead/agent-1"}],"isError":false,"id":"{{sessionId}}"},"meta":{"kind":"activation","name":"lead/agent-1"}},"sourceEventSeqs":[23],"surfaceOp":"append"}
|
||||
{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"inserted":[{"content":[{"type":"text","text":"Background subagent {{sessionId}} finished and will do no further work unless you send it more."},{"type":"text","text":"Its closing message:"},{"type":"text","text":"CHILD_DENIED [sandbox: file access denied under read-only mode]"}],"source":{"kind":"subagent-settled","form":"notice","summary":"Background subagent {{sessionId}} finished and will do no further work unless you send it more.","senderSessionId":"{{sessionId}}"},"role":"user","id":"{{sessionId}}"}]}}
|
||||
{"type":"tool/result","data":{"turn":2,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"delegate-write"},"toolCallId":"delegate-write","content":[{"type":"text","text":"started subagent {{sessionId}}"}],"isError":false,"id":"{{sessionId}}"}},"sourceEventSeqs":[23],"surfaceOp":"append"}
|
||||
{"type":"step/end","data":{"turn":2,"step":1}}
|
||||
{"type":"agent/inbox/spliced","data":{"target":"next-step","start":0,"removedCount":1,"inserted":[]}}
|
||||
{"type":"step/start","data":{"turn":2,"step":2}}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Background subagent {{sessionId}} finished and will do no further work unless you send it more."},{"type":"text","text":"Its closing message:"},{"type":"text","text":"CHILD_DENIED [sandbox: file access denied under read-only mode]"}],"source":{"kind":"subagent-settled","form":"notice","summary":"Background subagent {{sessionId}} finished and will do no further work unless you send it more.","stopReason":"completed","senderSessionId":"{{sessionId}}"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Background subagent {{sessionId}} finished and will do no further work unless you send it more."},{"type":"text","text":"Its closing message:"},{"type":"text","text":"CHILD_DENIED [sandbox: file access denied under read-only mode]"}],"source":{"kind":"subagent-settled","form":"notice","summary":"Background subagent {{sessionId}} finished and will do no further work unless you send it more.","senderSessionId":"{{sessionId}}"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}
|
||||
{"type":"assistant/message","data":{"turn":2,"step":2,"message":{"role":"assistant","content":[{"type":"text","text":"The delegated child was denied by the sandbox. PARENT_DONE"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":0,"index":0,"dt":[],"texts":["The delegated child was denied by the sandbox. PARENT_DONE"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"The delegated child was denied by the sandbox. PARENT_DONE"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}
|
||||
{"type":"step/end","data":{"turn":2,"step":2}}
|
||||
{"type":"turn/end","data":{"turn":2,"reason":{"kind":"completed"}}}
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
{"type":"step/start","data":{"turn":1,"step":1}}
|
||||
{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Reply with exactly CHILD_RESULT and nothing else. Do not call send_message."},{"type":"text","text":"Your final answer is delivered automatically if your parent is still online. Include the result and relevant evidence in that answer; the parent does not receive your full transcript, tool output, or reasoning. If your last action is a message to your parent, the completion notice omits your final answer; include the result and relevant evidence in that message."}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYour parent agent id is \"{{sessionId}}\". Use send_message({ name: \"{{sessionId}}\", message: \"<finding>\" }) when a finding changes what the parent should do next; sending a message does not end your turn.\n\nDelegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly.\n\nDelegation depth for `subagent_fork`: current 1, maximum 1, remaining levels 0. Do not call `subagent_fork` at this depth; carry out the work directly.\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"subagent:communication","text":"Your parent agent id is \"{{sessionId}}\". Use send_message({ name: \"{{sessionId}}\", message: \"<finding>\" }) when a finding changes what the parent should do next; sending a message does not end your turn."},{"name":"tool:subagent:depth","text":"Delegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly."},{"name":"tool:subagent_fork:depth","text":"Delegation depth for `subagent_fork`: current 1, maximum 1, remaining levels 0. Do not call `subagent_fork` at this depth; carry out the work directly."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}
|
||||
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).\n\nYour parent agent id is \"{{sessionId}}\". Use send_message({ agent_id: \"{{sessionId}}\", message: \"<finding>\" }) when a finding changes what the parent should do next; sending a message does not end your turn.\n\nDelegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly.\n\nDelegation depth for `subagent_fork`: current 1, maximum 1, remaining levels 0. Do not call `subagent_fork` at this depth; carry out the work directly.\n\nYou are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: workspace-write. Any available operation enforced by the DSH file sandbox may modify files under the session workspace: \"{{cwd}}\". Some platform temporary areas may also be writable."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."},{"name":"subagent:communication","text":"Your parent agent id is \"{{sessionId}}\". Use send_message({ agent_id: \"{{sessionId}}\", message: \"<finding>\" }) when a finding changes what the parent should do next; sending a message does not end your turn."},{"name":"tool:subagent:depth","text":"Delegation depth for `subagent`: current 1, maximum 1, remaining levels 0. Do not call `subagent` at this depth; carry out the work directly."},{"name":"tool:subagent_fork:depth","text":"Delegation depth for `subagent_fork`: current 1, maximum 1, remaining levels 0. Do not call `subagent_fork` at this depth; carry out the work directly."},{"name":"subagent:delegation","text":"You are a delegated subagent: your permission scope was fixed when you were started and cannot be widened from inside this session — operations that require approval are rejected automatically. When the task needs access beyond that scope, do not retry the denied operation; state the limitation in your reply so the delegating agent can handle it."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}
|
||||
{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":"{{tools}}"},"reason":"initial"}}
|
||||
{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}
|
||||
{"type":"session/title","data":{"title":"Reply with exactly CHILD_RESULT and","messageSeqs":[8],"source":{"kind":"fallback"}}}
|
||||
|
||||
+12
-13
@@ -13,17 +13,16 @@
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"tool/call","seq":15,"time":0,"data":{"turn":1,"step":1,"callId":"start-child","name":"subagent","arguments":"{\"description\":\"Return child result\",\"prompt\":\"Reply with exactly CHILD_RESULT and nothing else. Do not call send_message.\"}"}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"session/title","seq":16,"time":0,"data":{"title":"Subagent settlement","messageSeqs":[8],"source":{"kind":"provider","provider":"session-title-first-prompt-llm","model":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"subagent/catalog","seq":17,"time":0,"data":{"version":0,"childId":"{{sessionId}}","childCreatedAt":0,"mode":"continuable","label":"Return child result"}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"subagent-name/bound","seq":18,"time":0,"data":{"version":1,"childId":"{{sessionId}}","name":"lead/agent-1"}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"tool/result","seq":19,"time":0,"data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"start-child"},"toolCallId":"start-child","content":[{"type":"text","text":"started subagent {{sessionId}}\nname: lead/agent-1"}],"isError":false,"id":"{{sessionId}}"},"meta":{"kind":"activation","name":"lead/agent-1"}},"sourceEventSeqs":[15],"surfaceOp":"append"}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/end","seq":20,"time":0,"data":{"turn":1,"step":1}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":21,"time":0,"data":{"target":"next-step","start":0,"inserted":[{"content":[{"type":"text","text":"Background subagent {{sessionId}} finished and will do no further work unless you send it more."},{"type":"text","text":"Its closing message:"},{"type":"text","text":"CHILD_RESULT"}],"source":{"kind":"subagent-settled","form":"notice","summary":"Background subagent {{sessionId}} finished and will do no further work unless you send it more.","stopReason":"completed","senderSessionId":"{{sessionId}}"},"role":"user","id":"{{sessionId}}"}]}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/start","seq":22,"time":0,"data":{"turn":1,"step":2}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"assistant/message","seq":23,"time":0,"data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"text","text":"STARTED"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":0,"index":0,"dt":[],"texts":["STARTED"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"STARTED"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/end","seq":24,"time":0,"data":{"turn":1,"step":2}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":25,"time":0,"data":{"target":"next-step","start":0,"removedCount":1,"inserted":[]}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/start","seq":26,"time":0,"data":{"turn":1,"step":3}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":27,"time":0,"data":{"content":[{"type":"text","text":"Background subagent {{sessionId}} finished and will do no further work unless you send it more."},{"type":"text","text":"Its closing message:"},{"type":"text","text":"CHILD_RESULT"}],"source":{"kind":"subagent-settled","form":"notice","summary":"Background subagent {{sessionId}} finished and will do no further work unless you send it more.","stopReason":"completed","senderSessionId":"{{sessionId}}"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"assistant/message","seq":28,"time":0,"data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"text","text":"PARENT_RECEIVED_SETTLEMENT_NOTICE"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":0,"index":0,"dt":[],"texts":["PARENT_RECEIVED_SETTLEMENT_NOTICE"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"PARENT_RECEIVED_SETTLEMENT_NOTICE"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/end","seq":29,"time":0,"data":{"turn":1,"step":3}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"turn/end","seq":30,"time":0,"data":{"turn":1,"reason":{"kind":"completed"}}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"tool/result","seq":18,"time":0,"data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"start-child"},"toolCallId":"start-child","content":[{"type":"text","text":"started subagent {{sessionId}}"}],"isError":false,"id":"{{sessionId}}"}},"sourceEventSeqs":[15],"surfaceOp":"append"}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/end","seq":19,"time":0,"data":{"turn":1,"step":1}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":20,"time":0,"data":{"target":"next-step","start":0,"inserted":[{"content":[{"type":"text","text":"Background subagent {{sessionId}} finished and will do no further work unless you send it more."},{"type":"text","text":"Its closing message:"},{"type":"text","text":"CHILD_RESULT"}],"source":{"kind":"subagent-settled","form":"notice","summary":"Background subagent {{sessionId}} finished and will do no further work unless you send it more.","senderSessionId":"{{sessionId}}"},"role":"user","id":"{{sessionId}}"}]}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/start","seq":21,"time":0,"data":{"turn":1,"step":2}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"assistant/message","seq":22,"time":0,"data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"text","text":"STARTED"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":0,"index":0,"dt":[],"texts":["STARTED"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"STARTED"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/end","seq":23,"time":0,"data":{"turn":1,"step":2}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"agent/inbox/spliced","seq":24,"time":0,"data":{"target":"next-step","start":0,"removedCount":1,"inserted":[]}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/start","seq":25,"time":0,"data":{"turn":1,"step":3}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"user/message","seq":26,"time":0,"data":{"content":[{"type":"text","text":"Background subagent {{sessionId}} finished and will do no further work unless you send it more."},{"type":"text","text":"Its closing message:"},{"type":"text","text":"CHILD_RESULT"}],"source":{"kind":"subagent-settled","form":"notice","summary":"Background subagent {{sessionId}} finished and will do no further work unless you send it more.","senderSessionId":"{{sessionId}}"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"assistant/message","seq":27,"time":0,"data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"text","text":"PARENT_RECEIVED_SETTLEMENT_NOTICE"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":0,"index":0,"dt":[],"texts":["PARENT_RECEIVED_SETTLEMENT_NOTICE"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"PARENT_RECEIVED_SETTLEMENT_NOTICE"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"step/end","seq":28,"time":0,"data":{"turn":1,"step":3}}}
|
||||
{"type":"session_event","sessionId":"{{sessionId}}","event":{"type":"turn/end","seq":29,"time":0,"data":{"turn":1,"reason":{"kind":"completed"}}}}
|
||||
{"type":"result","sessionId":"{{sessionId}}","output":"PARENT_RECEIVED_SETTLEMENT_NOTICE","usage":{"inputTokens":30,"outputTokens":15}}
|
||||
@@ -72,7 +72,7 @@ function researcher(messages) {
|
||||
if (!names.includes('list_agents')) return toolChunks([{ name: 'list_agents', args: {} }])
|
||||
const sibling = messages.filter(message => message.role === 'tool')
|
||||
.flatMap(message => message.content.filter(block => block.type === 'text').flatMap(block => block.text.split('\n')))
|
||||
.find(line => line.endsWith('Own deterministic implementation.'))?.split(' ')[0]
|
||||
.find(line => line.endsWith('— Own deterministic implementation.'))?.split(' ')[0]
|
||||
if (sibling === undefined) throw new Error('list_agents did not expose the implementation sibling')
|
||||
if (!names.includes('team_task_create')) {
|
||||
return toolChunks([{ name: 'team_task_create', args: {
|
||||
@@ -87,13 +87,13 @@ function researcher(messages) {
|
||||
if (!names.includes('send_message')) {
|
||||
return toolChunks([
|
||||
{ name: 'team_task_update', args: { task_id: 'task-1', expected_revision: 2, action: 'complete' } },
|
||||
{ name: 'send_message', args: { name: sibling, message: 'Research complete: use the deterministic finding.' } },
|
||||
{ name: 'send_message', args: { agent_id: sibling, message: 'Research complete: use the deterministic finding.' } },
|
||||
])
|
||||
}
|
||||
return textChunks('Research teammate complete.')
|
||||
}
|
||||
|
||||
function implementer(messages) {
|
||||
function implementer(messages, parentId) {
|
||||
const names = calls(messages)
|
||||
const last = latestAssistantCalls(messages)
|
||||
const text = latestToolText(messages)
|
||||
@@ -134,7 +134,7 @@ function implementer(messages) {
|
||||
if (!names.includes('send_message')) {
|
||||
return toolChunks([
|
||||
{ name: 'team_task_update', args: { task_id: 'task-2', expected_revision: 2, action: 'complete' } },
|
||||
{ name: 'send_message', args: { name: 'lead', message: 'Implementation complete and verified.' } },
|
||||
{ name: 'send_message', args: { agent_id: parentId, message: 'Implementation complete and verified.' } },
|
||||
])
|
||||
}
|
||||
return textChunks('Implementation teammate complete.')
|
||||
@@ -154,7 +154,6 @@ function lead(messages) {
|
||||
return toolChunks([{
|
||||
name: 'subagent',
|
||||
args: {
|
||||
name: 'implementer',
|
||||
description: 'Own deterministic implementation.',
|
||||
prompt: 'IMPLEMENTER_MARK: wait for research, complete dependent task 2, report to lead.',
|
||||
},
|
||||
@@ -164,7 +163,6 @@ function lead(messages) {
|
||||
return toolChunks([{
|
||||
name: 'subagent',
|
||||
args: {
|
||||
name: 'researcher',
|
||||
description: 'Own deterministic research.',
|
||||
prompt: 'RESEARCHER_MARK: complete research task 1, message implementer, then finish.',
|
||||
},
|
||||
@@ -179,7 +177,7 @@ function lead(messages) {
|
||||
}
|
||||
if (last.includes('list_agents')) {
|
||||
const inactive = result.split('\n')
|
||||
.filter(row => row.includes('Own deterministic ') && row.includes('[inactive]')).length
|
||||
.filter(row => row.includes('— Own deterministic ') && row.includes('[inactive]')).length
|
||||
if (inactive >= 2) return textChunks('TEAM_WORKFLOW_OK: both teammates and dependent tasks completed.')
|
||||
return toolChunks([{ name: hasNewCoordinationInput(messages) ? 'list_agents' : 'wait_agent',
|
||||
args: hasNewCoordinationInput(messages) ? {} : { timeout_ms: 10000 } }])
|
||||
@@ -196,6 +194,7 @@ class TeamFixtureAdapter extends LlmAdapter {
|
||||
const context = options.messages.findLast(message => message.source?.kind === 'runtime-context')
|
||||
const section = name => context?.source.sections?.find(candidate => candidate.name === name)?.text
|
||||
const role = section('team:identity')
|
||||
const parentId = role?.match(/Team led by agent "([^"]+)"/u)?.[1]
|
||||
const task = initial?.content.filter(block => block.type === 'text').map(block => block.text).join('\n')
|
||||
if (!workflowChild && (!tools.includes('subagent') || !tools.includes('workflow') || !tools.includes('team_task_create'))) {
|
||||
throw new Error('Team profile is missing delegation, workflow, or task tools')
|
||||
@@ -203,8 +202,8 @@ class TeamFixtureAdapter extends LlmAdapter {
|
||||
let chunks
|
||||
if (workflowChild) chunks = textChunks('Fresh workflow child complete.')
|
||||
else if (task?.startsWith('RESEARCHER_MARK:')) chunks = researcher(options.messages)
|
||||
else if (task?.startsWith('IMPLEMENTER_MARK:')) chunks = implementer(options.messages)
|
||||
else if (role?.startsWith('Your name is "lead".')) chunks = lead(options.messages)
|
||||
else if (task?.startsWith('IMPLEMENTER_MARK:')) chunks = implementer(options.messages, parentId)
|
||||
else if (role?.includes('You are the Team Lead.')) chunks = lead(options.messages)
|
||||
else throw new Error('Team runtime context is missing a recognized identity')
|
||||
for (const chunk of chunks) {
|
||||
options.signal?.throwIfAborted()
|
||||
|
||||
@@ -1254,12 +1254,8 @@ describe('headless stream-json snapshots', () => {
|
||||
"checkedAgents": true,
|
||||
"deliveredMessages": 0,
|
||||
"identities": [
|
||||
"Your name is "lead/implementer". Your team lead is "lead".
|
||||
Use list_agents({}) to find your teammates and their full names.
|
||||
Use send_message({ name: "<full agent path>", message: "..." }) to message a teammate.",
|
||||
"Your name is "lead/researcher". Your team lead is "lead".
|
||||
Use list_agents({}) to find your teammates and their full names.
|
||||
Use send_message({ name: "<full agent path>", message: "..." }) to message a teammate.",
|
||||
"You are a teammate in the Team led by agent "<lead>".",
|
||||
"You are a teammate in the Team led by agent "<lead>".",
|
||||
],
|
||||
"queuedMessages": 0,
|
||||
"sessions": 4,
|
||||
|
||||
@@ -345,7 +345,7 @@ describe('the shipped Web composition', () => {
|
||||
'model', 'provider', 'reasoning_effort',
|
||||
]))
|
||||
for (const agent of [disabled.agent, enabled.agent]) {
|
||||
expect(toolParameterNames(ctx, agent, 'subagent_fork')).toEqual(['cwd', 'description', 'name', 'prompt'])
|
||||
expect(toolParameterNames(ctx, agent, 'subagent_fork')).toEqual(['cwd', 'description', 'prompt'])
|
||||
}
|
||||
} finally {
|
||||
await policy.dispose()
|
||||
@@ -802,7 +802,7 @@ describe.each(['web', 'desktop'] as const)('%s native subagent bundles', (surfac
|
||||
})
|
||||
try {
|
||||
for (const product of installed) {
|
||||
expect(toolParameterNames(productCtx, handle.agent, toolName(product))).toEqual(['cwd', 'description', 'name', 'prompt'])
|
||||
expect(toolParameterNames(productCtx, handle.agent, toolName(product))).toEqual(['cwd', 'description', 'prompt'])
|
||||
}
|
||||
} finally { await handle.dispose() }
|
||||
expect(spawn).not.toHaveBeenCalled()
|
||||
|
||||
@@ -273,7 +273,6 @@ describe('web e2e: agent teamwork panel', () => {
|
||||
version: 2, childId: memberId, childCreatedAt: Date.now(), mode: 'external',
|
||||
label: RESEARCHER_DESCRIPTION,
|
||||
})
|
||||
scaffold.ctx.subagentNames.bind(agent.session, memberId, 'lead/researcher')
|
||||
const countAction = page.locator('[data-subagent-action]')
|
||||
await countAction.waitFor()
|
||||
await page.mouse.move(2, 2)
|
||||
@@ -362,7 +361,7 @@ describe('web e2e: agent teamwork panel', () => {
|
||||
})))
|
||||
expect(primaryStyles.map(style => style.fontSize)).toEqual(['13px', '13px'])
|
||||
expect(primaryStyles[1]).toEqual(primaryStyles[0])
|
||||
expect(await member.getByText('researcher', { exact: true })
|
||||
expect(await member.getByText('team-panel-researcher', { exact: true })
|
||||
.evaluate(element => getComputedStyle(element).fontSize)).toBe('12px')
|
||||
const memberHover = member.locator(':scope > div')
|
||||
for (const target of [member, memberHover]) {
|
||||
@@ -421,7 +420,7 @@ describe('web e2e: agent teamwork panel', () => {
|
||||
taskId: task.id, expectedRevision: task.revision, action: 'claim',
|
||||
})
|
||||
await row.getByRole('img', { name: 'In progress', exact: true }).waitFor()
|
||||
await row.locator('[data-team-task-owner]').filter({ hasText: 'Lead' }).waitFor()
|
||||
await row.locator('[data-team-task-owner]').filter({ hasText: agent.id }).waitFor()
|
||||
await action.getByRole('heading', { name: 'Shared tasks 1 in progress', exact: true }).waitFor()
|
||||
expect(await action.getByRole('button', { name: /^(New task|Edit|Complete|Reopen|Delete)$/u }).count()).toBe(0)
|
||||
expect(await action.locator('input, select, textarea').count()).toBe(0)
|
||||
@@ -553,7 +552,7 @@ describe('web e2e: agent teamwork panel', () => {
|
||||
}
|
||||
const row = panel.getByRole('treeitem', { name: /Researcher/u })
|
||||
const primary = row.getByText(RESEARCHER_DESCRIPTION, { exact: true })
|
||||
const secondary = row.getByText('researcher', { exact: true })
|
||||
const secondary = row.getByText('team-panel-researcher', { exact: true })
|
||||
expect(await row.getByRole('button').count()).toBe(0)
|
||||
expect(await primary.evaluate((element) => {
|
||||
const style = getComputedStyle(element)
|
||||
@@ -755,7 +754,7 @@ describe('web e2e: agent teamwork panel', () => {
|
||||
expect(await row.getAttribute('data-expanded')).toBe('false')
|
||||
expect(await row.locator('[data-team-task-details]').count()).toBe(0)
|
||||
expect(await board.locator('[data-team-task-details]').count()).toBe(1)
|
||||
expect(await emptyRow.locator('[data-team-task-owner]').textContent()).toBe('Owner: Lead')
|
||||
expect(await emptyRow.locator('[data-team-task-owner]').textContent()).toBe(`Owner: ${agent.id}`)
|
||||
expect(await emptyRow.locator('[data-team-task-details] p:not([data-team-task-owner])').textContent()).toBe(completed.description)
|
||||
expect(await emptyRow.locator('dl, dt, dd').count()).toBe(0)
|
||||
expect(await emptyRow.locator('[data-team-task-details]').textContent()).not.toContain(completed.id)
|
||||
|
||||
@@ -161,9 +161,7 @@ describe.skipIf(MODE === 'record')('web snapshot: Official native subagent bundl
|
||||
if (notice?.data.source.kind !== 'subagent-settled') throw new Error('Native completion was not delivered to the parent')
|
||||
expect(notice.data.source.senderSessionId).toBe(catalog[0]?.childId)
|
||||
expect(notice.data.content).toContainEqual({ type: 'text', text: RESPONSE })
|
||||
expect(dispatches[0]?.content).toEqual([{
|
||||
type: 'text', text: `started subagent ${notice.data.source.senderSessionId}\nname: lead/native-worker`,
|
||||
}])
|
||||
expect(dispatches[0]?.content).toEqual([{ type: 'text', text: `started subagent ${notice.data.source.senderSessionId}` }])
|
||||
expect(events.filter(event => event.type === 'turn/end')).toHaveLength(2)
|
||||
expect(server.requests).toHaveLength(1)
|
||||
expect(server.requests[0]?.body).toMatchObject({ model: 'fixture-model' })
|
||||
|
||||
@@ -279,7 +279,6 @@ class ShippedChildAutoAdapter extends LlmAdapter {
|
||||
this.parentPhase += 1
|
||||
if (phase === 0 && prompt.includes(AUTO_PARENT_AUTHORIZED)) {
|
||||
return toolChunks('parent-authorized', 'subagent', {
|
||||
name: 'authorized',
|
||||
description: 'Auto authorized child',
|
||||
prompt: [
|
||||
AUTO_CHILD_AUTHORIZED,
|
||||
@@ -292,7 +291,6 @@ class ShippedChildAutoAdapter extends LlmAdapter {
|
||||
if (phase === 1) return textChunks('PARENT_AUTHORIZED_SETTLED')
|
||||
if (phase === 2 && prompt.includes(AUTO_PARENT_CONTINUABLE)) {
|
||||
return toolChunks('parent-continuable', 'subagent', {
|
||||
name: 'continuable',
|
||||
description: 'Auto continuable child',
|
||||
prompt: [
|
||||
AUTO_CHILD_CONTINUABLE,
|
||||
@@ -307,7 +305,7 @@ class ShippedChildAutoAdapter extends LlmAdapter {
|
||||
throw new Error('continuable child id was not observed before parent adjustment')
|
||||
}
|
||||
return toolChunks('parent-adjust', 'send_message', {
|
||||
name: 'lead/continuable',
|
||||
agent_id: this.continuableChildId,
|
||||
message: [
|
||||
AUTO_CHILD_ADJUSTED,
|
||||
`Replace the earlier no-deletion restriction: permanently delete exactly ${this.continuableDeletePath}.`,
|
||||
|
||||
@@ -157,7 +157,6 @@ describe('web e2e: persisted subagent conversation and human continuation', () =
|
||||
prompt: [{ type: 'text', text: INITIAL_PROMPT }],
|
||||
parent,
|
||||
})
|
||||
scaffold.ctx.subagentNames.bind(parent.session, started.childId, 'lead/researcher')
|
||||
childId = started.childId
|
||||
await waitForAgentToSettle(scaffold, childId)
|
||||
const liveInput = page.locator('[data-composer-input][contenteditable="true"]').first()
|
||||
|
||||
@@ -155,7 +155,6 @@ describe.skipIf(MODE === 'record')('web e2e: composer interrupt for a running co
|
||||
signal: new AbortController().signal,
|
||||
prompt: [{ type: 'text', text: INITIAL }], parent,
|
||||
})
|
||||
scaffold.ctx.subagentNames.bind(parent.session, started.childId, 'lead/interrupt-worker')
|
||||
childId = started.childId
|
||||
await waitFor(() => existsSync(readyFile), 'the held child turn to open')
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ describe.skipIf(MODE === 'record')('web e2e: subagent task summary', () => {
|
||||
await expectSummary(card, DESCRIPTION)
|
||||
await capture('Running')
|
||||
|
||||
finishCall(agent, call, 'Delegation accepted.', false, { kind: 'activation', name: 'lead/foo' })
|
||||
finishCall(agent, call, 'Delegation accepted.', false, { kind: 'activation', subagentId: 'child-foo' })
|
||||
await scaffold.ctx.sessions.flush(agent.session)
|
||||
await expect.poll(() => card.getAttribute('data-state')).toBe('ok')
|
||||
await expectSummary(card, DESCRIPTION)
|
||||
@@ -161,8 +161,8 @@ describe.skipIf(MODE === 'record')('web e2e: subagent task summary', () => {
|
||||
await expectSummary(card, DESCRIPTION)
|
||||
expect(await card.getByText('Agent response', { exact: true }).count()).toBe(0)
|
||||
await card.getByText('Started', { exact: true }).waitFor()
|
||||
expect(await card.locator('dt').allTextContents()).toEqual(['Agent task description', 'Agent name'])
|
||||
expect(await card.locator('dd').allTextContents()).toEqual([`${DESCRIPTION}\nAdditional description context`, 'lead/foo'])
|
||||
expect(await card.locator('dt').allTextContents()).toEqual(['Agent task description', 'ID'])
|
||||
expect(await card.locator('dd').allTextContents()).toEqual([`${DESCRIPTION}\nAdditional description context`, 'child-foo'])
|
||||
await capture('Creation receipt and complete task')
|
||||
|
||||
const beforeReload = tripwire.warnings.length
|
||||
@@ -182,9 +182,9 @@ describe.skipIf(MODE === 'record')('web e2e: subagent task summary', () => {
|
||||
|
||||
it('falls back to the prompt, keeps synchronous replies in details, and preserves errors', async () => {
|
||||
const cases = [
|
||||
{ id: 'fallback', args: { prompt: 'Review the fallback summary.\nKeep the complete task in details.' }, summary: 'Review the fallback summary.', result: 'started subagent fallback-worker\nname: lead/fallback' },
|
||||
{ id: 'fallback', args: { prompt: 'Review the fallback summary.\nKeep the complete task in details.' }, summary: 'Review the fallback summary.', result: 'started subagent fallback-worker' },
|
||||
{ id: 'reply', args: { description: 'Check synchronous agent reply', prompt: 'Review the synchronous report.\nKeep every instruction available.' }, summary: 'Check synchronous agent reply', result: 'The synchronous agent found two issues.\nBoth are documented in the report.' },
|
||||
{ id: 'title-only', args: {}, summary: '', result: 'started subagent empty-worker\nname: lead/empty' },
|
||||
{ id: 'title-only', args: {}, summary: '', result: 'started subagent empty-worker' },
|
||||
{ id: 'error', args: { description: 'Delegate a failing task', prompt: 'Attempt the requested delegation.' }, summary: 'Subagent capacity exceeded', result: 'Subagent capacity exceeded\nWait for an active agent to finish.', error: true },
|
||||
]
|
||||
const snapshots: string[] = []
|
||||
@@ -244,13 +244,13 @@ describe.skipIf(MODE === 'record')('web e2e: subagent task summary', () => {
|
||||
await expect.poll(() => card.getAttribute('data-state')).toBe('running')
|
||||
await expectForkSummary()
|
||||
await capture('Running')
|
||||
finishCall(agent, call, 'started subagent fork-worker\nname: lead/context-reviewer')
|
||||
finishCall(agent, call, 'started subagent fork-worker')
|
||||
await scaffold.ctx.sessions.flush(agent.session)
|
||||
await expect.poll(() => card.getAttribute('data-state')).toBe('ok')
|
||||
await expandTask(card, prompt)
|
||||
await expectForkSummary()
|
||||
expect(await card.locator('dt').allTextContents()).toEqual(['Agent task description', 'Agent name'])
|
||||
expect(await card.locator('dd').allTextContents()).toEqual([description, 'lead/context-reviewer'])
|
||||
expect(await card.locator('dt').allTextContents()).toEqual(['Agent task description', 'ID'])
|
||||
expect(await card.locator('dd').allTextContents()).toEqual([description, 'fork-worker'])
|
||||
expect(await card.getByText('Agent response', { exact: true }).count()).toBe(0)
|
||||
await capture('Creation receipt and complete task')
|
||||
const beforeReload = tripwire.warnings.length
|
||||
|
||||
Reference in new issue
Block a user