Merge commit '0f434d505aba1220d92015d61cc64e39442f6304' into refactor/restack-id-polish

This commit is contained in:
Dudu-0223 committed 2026-10-30 16:04:30 +08:00
commit 9656ecb162
4 files changed
+97 -80

No files matched your search

+2 -5
View File
@@ -106,11 +106,8 @@ describe('dsh run with Agent Teams enabled', () => {
expect.objectContaining({ version: 0, label: 'Own deterministic implementation.' }),
expect.objectContaining({ version: 0, label: 'Own deterministic research.' }),
]))
const names = root!.filter(record => record.type === 'subagent-name/bound').map(record => record.data)
expect(names).toEqual(expect.arrayContaining([
expect.objectContaining({ version: 1, name: 'lead/implementer' }),
expect.objectContaining({ version: 1, name: 'lead/researcher' }),
]))
for (const entry of catalog) expect(entry).not.toHaveProperty('name')
expect(eventTypes).not.toContain('subagent-name/bound')
expect(eventTypes).not.toContain('team/message/queued')
expect(eventTypes).not.toContain('team/message/delivered')
const peerMessages = parsed.flatMap(log => log.filter(record => record.type === 'user/message'
@@ -189,7 +189,7 @@
},
{
"name": "interrupt_agent",
"description": "Ask a subagent to stop its current work. This call returns without waiting for it to stop. You can continue a local direct child's conversation later with send_message. External executions stop permanently and cannot receive follow-ups. Subagents it started will keep running.",
"description": "Ask a subagent to stop its current work. This call returns without waiting for it to stop. You can continue a local subagent's conversation later with send_message. External executions stop permanently and cannot receive follow-ups. Subagents it started will keep running.",
"parameters": {
"type": "object",
"properties": {
@@ -257,19 +257,10 @@
},
{
"name": "list_agents",
"description": "List subagents you started, with their ids, labels, 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.",
"description": "List your entire subagent tree: the root agent and all reachable continuable descendants, including yourself. Rows carry ids, descriptions, and status; descendant rows carry parent ids and depth from the root. You can message any other agent in the subagent tree listed as running or inactive. running means it is working; inactive means it is not currently working. 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.",
"parameters": {
"type": "object",
"properties": {
"scope": {
"type": "string",
"description": "children (default) lists direct children, which accept 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": {}
}
},
{
@@ -320,7 +311,7 @@
"properties": {
"agent_id": {
"type": "string",
"description": "The agent id of your direct continuable child, or your direct parent when you are a resident continuable child."
"description": "The agent id of another member of your subagent tree, as shown by list_agents."
},
"message": {
"type": "string",
@@ -351,7 +342,7 @@
},
{
"name": "subagent",
"description": "Delegate a self-contained task to a subagent (a separate agent that works in its own context) to offload focused, independent work — research, a scoped implementation, an analysis — so it does not consume this conversation's context. The subagent returns its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. The runtime notifies you when it finishes. The child reports results with `send_message`; use `send_message` to steer it while running or continue its conversation after it finishes.",
"description": "Delegate a self-contained task to a subagent (a separate agent that works in its own context) to offload focused, independent work — research, a scoped implementation, an analysis — so it does not consume this conversation's context. The subagent returns its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. If you are still online when it finishes, the runtime automatically delivers its completion notice. The notice includes the final answer unless the child sent you a message just before finishing. Use `send_message` to steer it while running or continue its conversation after it finishes.",
"parameters": {
"type": "object",
"properties": {
@@ -376,7 +367,7 @@
},
{
"name": "subagent_fork",
"description": "Delegate a task to a subagent that inherits this conversation: a child agent seeded with all completed turns so far (it does not see the current in-flight turn). Use this when the subtask builds on this conversation's context — a follow-up analysis, a review, a continuation — without consuming this conversation's context for the work itself. You receive its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. The runtime notifies you when it finishes. The child reports results with `send_message`; use `send_message` to steer it while running or continue its conversation after it finishes.",
"description": "Delegate a task to a subagent that inherits this conversation: a child agent seeded with all completed turns so far (it does not see the current in-flight turn). Use this when the subtask builds on this conversation's context — a follow-up analysis, a review, a continuation — without consuming this conversation's context for the work itself. You receive its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. If you are still online when it finishes, the runtime automatically delivers its completion notice. The notice includes the final answer unless the child sent you a message just before finishing. Use `send_message` to steer it while running or continue its conversation after it finishes.",
"parameters": {
"type": "object",
"properties": {
@@ -483,6 +474,19 @@
]
}
},
{
"name": "wait_agent",
"description": "Wait for input at your next step, including agent messages, completion notifications, and user steering. Returns immediately when that input is already pending.",
"parameters": {
"type": "object",
"properties": {
"timeout_ms": {
"type": "integer",
"description": "Wait duration in milliseconds, from 10000 through 3600000. Defaults to 30000."
}
}
}
},
{
"name": "web_fetch",
"description": "Fetch the content of a specific HTTP(S) URL and return it decoded to text.",
@@ -834,7 +838,7 @@
},
{
"name": "interrupt_agent",
"description": "Ask a subagent to stop its current work. This call returns without waiting for it to stop. You can continue a local direct child's conversation later with send_message. External executions stop permanently and cannot receive follow-ups. Subagents it started will keep running.",
"description": "Ask a subagent to stop its current work. This call returns without waiting for it to stop. You can continue a local subagent's conversation later with send_message. External executions stop permanently and cannot receive follow-ups. Subagents it started will keep running.",
"parameters": {
"type": "object",
"properties": {
@@ -902,19 +906,10 @@
},
{
"name": "list_agents",
"description": "List subagents you started, with their ids, labels, 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.",
"description": "List your entire subagent tree: the root agent and all reachable continuable descendants, including yourself. Rows carry ids, descriptions, and status; descendant rows carry parent ids and depth from the root. You can message any other agent in the subagent tree listed as running or inactive. running means it is working; inactive means it is not currently working. 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.",
"parameters": {
"type": "object",
"properties": {
"scope": {
"type": "string",
"description": "children (default) lists direct children, which accept 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": {}
}
},
{
@@ -965,7 +960,7 @@
"properties": {
"agent_id": {
"type": "string",
"description": "The agent id of your direct continuable child, or your direct parent when you are a resident continuable child."
"description": "The agent id of another member of your subagent tree, as shown by list_agents."
},
"message": {
"type": "string",
@@ -996,7 +991,7 @@
},
{
"name": "subagent",
"description": "Delegate a self-contained task to a subagent (a separate agent that works in its own context) to offload focused, independent work — research, a scoped implementation, an analysis — so it does not consume this conversation's context. The subagent returns its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. The runtime notifies you when it finishes. The child reports results with `send_message`; use `send_message` to steer it while running or continue its conversation after it finishes.",
"description": "Delegate a self-contained task to a subagent (a separate agent that works in its own context) to offload focused, independent work — research, a scoped implementation, an analysis — so it does not consume this conversation's context. The subagent returns its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. If you are still online when it finishes, the runtime automatically delivers its completion notice. The notice includes the final answer unless the child sent you a message just before finishing. Use `send_message` to steer it while running or continue its conversation after it finishes.",
"parameters": {
"type": "object",
"properties": {
@@ -1021,7 +1016,7 @@
},
{
"name": "subagent_fork",
"description": "Delegate a task to a subagent that inherits this conversation: a child agent seeded with all completed turns so far (it does not see the current in-flight turn). Use this when the subtask builds on this conversation's context — a follow-up analysis, a review, a continuation — without consuming this conversation's context for the work itself. You receive its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. The runtime notifies you when it finishes. The child reports results with `send_message`; use `send_message` to steer it while running or continue its conversation after it finishes.",
"description": "Delegate a task to a subagent that inherits this conversation: a child agent seeded with all completed turns so far (it does not see the current in-flight turn). Use this when the subtask builds on this conversation's context — a follow-up analysis, a review, a continuation — without consuming this conversation's context for the work itself. You receive its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. If you are still online when it finishes, the runtime automatically delivers its completion notice. The notice includes the final answer unless the child sent you a message just before finishing. Use `send_message` to steer it while running or continue its conversation after it finishes.",
"parameters": {
"type": "object",
"properties": {
@@ -1128,6 +1123,19 @@
]
}
},
{
"name": "wait_agent",
"description": "Wait for input at your next step, including agent messages, completion notifications, and user steering. Returns immediately when that input is already pending.",
"parameters": {
"type": "object",
"properties": {
"timeout_ms": {
"type": "integer",
"description": "Wait duration in milliseconds, from 10000 through 3600000. Defaults to 30000."
}
}
}
},
{
"name": "web_fetch",
"description": "Fetch the content of a specific HTTP(S) URL and return it decoded to text.",
@@ -161,7 +161,7 @@
},
{
"name": "interrupt_agent",
"description": "Ask a subagent to stop its current work. This call returns without waiting for it to stop. You can continue a local direct child's conversation later with send_message. External executions stop permanently and cannot receive follow-ups. Subagents it started will keep running.",
"description": "Ask a subagent to stop its current work. This call returns without waiting for it to stop. You can continue a local subagent's conversation later with send_message. External executions stop permanently and cannot receive follow-ups. Subagents it started will keep running.",
"parameters": {
"type": "object",
"properties": {
@@ -177,19 +177,10 @@
},
{
"name": "list_agents",
"description": "List subagents you started, with their ids, labels, 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.",
"description": "List your entire subagent tree: the root agent and all reachable continuable descendants, including yourself. Rows carry ids, descriptions, and status; descendant rows carry parent ids and depth from the root. You can message any other agent in the subagent tree listed as running or inactive. running means it is working; inactive means it is not currently working. 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.",
"parameters": {
"type": "object",
"properties": {
"scope": {
"type": "string",
"description": "children (default) lists direct children, which accept 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": {}
}
},
{
@@ -240,7 +231,7 @@
"properties": {
"agent_id": {
"type": "string",
"description": "The agent id of your direct continuable child, or your direct parent when you are a resident continuable child."
"description": "The agent id of another member of your subagent tree, as shown by list_agents."
},
"message": {
"type": "string",
@@ -255,7 +246,7 @@
},
{
"name": "subagent",
"description": "Delegate a self-contained task to a subagent (a separate agent that works in its own context) to offload focused, independent work — research, a scoped implementation, an analysis — so it does not consume this conversation's context. The subagent returns its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. The runtime notifies you when it finishes. The child reports results with `send_message`; use `send_message` to steer it while running or continue its conversation after it finishes.",
"description": "Delegate a self-contained task to a subagent (a separate agent that works in its own context) to offload focused, independent work — research, a scoped implementation, an analysis — so it does not consume this conversation's context. The subagent returns its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. If you are still online when it finishes, the runtime automatically delivers its completion notice. The notice includes the final answer unless the child sent you a message just before finishing. Use `send_message` to steer it while running or continue its conversation after it finishes.",
"parameters": {
"type": "object",
"properties": {
@@ -280,7 +271,7 @@
},
{
"name": "subagent_fork",
"description": "Delegate a task to a subagent that inherits this conversation: a child agent seeded with all completed turns so far (it does not see the current in-flight turn). Use this when the subtask builds on this conversation's context — a follow-up analysis, a review, a continuation — without consuming this conversation's context for the work itself. You receive its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. The runtime notifies you when it finishes. The child reports results with `send_message`; use `send_message` to steer it while running or continue its conversation after it finishes.",
"description": "Delegate a task to a subagent that inherits this conversation: a child agent seeded with all completed turns so far (it does not see the current in-flight turn). Use this when the subtask builds on this conversation's context — a follow-up analysis, a review, a continuation — without consuming this conversation's context for the work itself. You receive its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. If you are still online when it finishes, the runtime automatically delivers its completion notice. The notice includes the final answer unless the child sent you a message just before finishing. Use `send_message` to steer it while running or continue its conversation after it finishes.",
"parameters": {
"type": "object",
"properties": {
@@ -342,6 +333,19 @@
]
}
},
{
"name": "wait_agent",
"description": "Wait for input at your next step, including agent messages, completion notifications, and user steering. Returns immediately when that input is already pending.",
"parameters": {
"type": "object",
"properties": {
"timeout_ms": {
"type": "integer",
"description": "Wait duration in milliseconds, from 10000 through 3600000. Defaults to 30000."
}
}
}
},
{
"name": "web_fetch",
"description": "Fetch the content of a specific HTTP(S) URL and return it decoded to text.",
@@ -189,7 +189,7 @@
},
{
"name": "interrupt_agent",
"description": "Ask a subagent to stop its current work. This call returns without waiting for it to stop. You can continue a local direct child's conversation later with send_message. External executions stop permanently and cannot receive follow-ups. Subagents it started will keep running.",
"description": "Ask a subagent to stop its current work. This call returns without waiting for it to stop. You can continue a local subagent's conversation later with send_message. External executions stop permanently and cannot receive follow-ups. Subagents it started will keep running.",
"parameters": {
"type": "object",
"properties": {
@@ -257,19 +257,10 @@
},
{
"name": "list_agents",
"description": "List subagents you started, with their ids, labels, 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.",
"description": "List your entire subagent tree: the root agent and all reachable continuable descendants, including yourself. Rows carry ids, descriptions, and status; descendant rows carry parent ids and depth from the root. You can message any other agent in the subagent tree listed as running or inactive. running means it is working; inactive means it is not currently working. 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.",
"parameters": {
"type": "object",
"properties": {
"scope": {
"type": "string",
"description": "children (default) lists direct children, which accept 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": {}
}
},
{
@@ -320,7 +311,7 @@
"properties": {
"agent_id": {
"type": "string",
"description": "The agent id of your direct continuable child, or your direct parent when you are a resident continuable child."
"description": "The agent id of another member of your subagent tree, as shown by list_agents."
},
"message": {
"type": "string",
@@ -351,7 +342,7 @@
},
{
"name": "subagent",
"description": "Delegate a self-contained task to a subagent (a separate agent that works in its own context) to offload focused, independent work — research, a scoped implementation, an analysis — so it does not consume this conversation's context. The subagent returns its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. The runtime notifies you when it finishes. The child reports results with `send_message`; use `send_message` to steer it while running or continue its conversation after it finishes.",
"description": "Delegate a self-contained task to a subagent (a separate agent that works in its own context) to offload focused, independent work — research, a scoped implementation, an analysis — so it does not consume this conversation's context. The subagent returns its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. If you are still online when it finishes, the runtime automatically delivers its completion notice. The notice includes the final answer unless the child sent you a message just before finishing. Use `send_message` to steer it while running or continue its conversation after it finishes.",
"parameters": {
"type": "object",
"properties": {
@@ -376,7 +367,7 @@
},
{
"name": "subagent_fork",
"description": "Delegate a task to a subagent that inherits this conversation: a child agent seeded with all completed turns so far (it does not see the current in-flight turn). Use this when the subtask builds on this conversation's context — a follow-up analysis, a review, a continuation — without consuming this conversation's context for the work itself. You receive its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. The runtime notifies you when it finishes. The child reports results with `send_message`; use `send_message` to steer it while running or continue its conversation after it finishes.",
"description": "Delegate a task to a subagent that inherits this conversation: a child agent seeded with all completed turns so far (it does not see the current in-flight turn). Use this when the subtask builds on this conversation's context — a follow-up analysis, a review, a continuation — without consuming this conversation's context for the work itself. You receive its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. If you are still online when it finishes, the runtime automatically delivers its completion notice. The notice includes the final answer unless the child sent you a message just before finishing. Use `send_message` to steer it while running or continue its conversation after it finishes.",
"parameters": {
"type": "object",
"properties": {
@@ -483,6 +474,19 @@
]
}
},
{
"name": "wait_agent",
"description": "Wait for input at your next step, including agent messages, completion notifications, and user steering. Returns immediately when that input is already pending.",
"parameters": {
"type": "object",
"properties": {
"timeout_ms": {
"type": "integer",
"description": "Wait duration in milliseconds, from 10000 through 3600000. Defaults to 30000."
}
}
}
},
{
"name": "web_fetch",
"description": "Fetch the content of a specific HTTP(S) URL and return it decoded to text.",
@@ -834,7 +838,7 @@
},
{
"name": "interrupt_agent",
"description": "Ask a subagent to stop its current work. This call returns without waiting for it to stop. You can continue a local direct child's conversation later with send_message. External executions stop permanently and cannot receive follow-ups. Subagents it started will keep running.",
"description": "Ask a subagent to stop its current work. This call returns without waiting for it to stop. You can continue a local subagent's conversation later with send_message. External executions stop permanently and cannot receive follow-ups. Subagents it started will keep running.",
"parameters": {
"type": "object",
"properties": {
@@ -902,19 +906,10 @@
},
{
"name": "list_agents",
"description": "List subagents you started, with their ids, labels, 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.",
"description": "List your entire subagent tree: the root agent and all reachable continuable descendants, including yourself. Rows carry ids, descriptions, and status; descendant rows carry parent ids and depth from the root. You can message any other agent in the subagent tree listed as running or inactive. running means it is working; inactive means it is not currently working. 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.",
"parameters": {
"type": "object",
"properties": {
"scope": {
"type": "string",
"description": "children (default) lists direct children, which accept 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": {}
}
},
{
@@ -965,7 +960,7 @@
"properties": {
"agent_id": {
"type": "string",
"description": "The agent id of your direct continuable child, or your direct parent when you are a resident continuable child."
"description": "The agent id of another member of your subagent tree, as shown by list_agents."
},
"message": {
"type": "string",
@@ -996,7 +991,7 @@
},
{
"name": "subagent",
"description": "Delegate a self-contained task to a subagent (a separate agent that works in its own context) to offload focused, independent work — research, a scoped implementation, an analysis — so it does not consume this conversation's context. The subagent returns its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. The runtime notifies you when it finishes. The child reports results with `send_message`; use `send_message` to steer it while running or continue its conversation after it finishes.",
"description": "Delegate a self-contained task to a subagent (a separate agent that works in its own context) to offload focused, independent work — research, a scoped implementation, an analysis — so it does not consume this conversation's context. The subagent returns its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. If you are still online when it finishes, the runtime automatically delivers its completion notice. The notice includes the final answer unless the child sent you a message just before finishing. Use `send_message` to steer it while running or continue its conversation after it finishes.",
"parameters": {
"type": "object",
"properties": {
@@ -1021,7 +1016,7 @@
},
{
"name": "subagent_fork",
"description": "Delegate a task to a subagent that inherits this conversation: a child agent seeded with all completed turns so far (it does not see the current in-flight turn). Use this when the subtask builds on this conversation's context — a follow-up analysis, a review, a continuation — without consuming this conversation's context for the work itself. You receive its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. The runtime notifies you when it finishes. The child reports results with `send_message`; use `send_message` to steer it while running or continue its conversation after it finishes.",
"description": "Delegate a task to a subagent that inherits this conversation: a child agent seeded with all completed turns so far (it does not see the current in-flight turn). Use this when the subtask builds on this conversation's context — a follow-up analysis, a review, a continuation — without consuming this conversation's context for the work itself. You receive its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. If you are still online when it finishes, the runtime automatically delivers its completion notice. The notice includes the final answer unless the child sent you a message just before finishing. Use `send_message` to steer it while running or continue its conversation after it finishes.",
"parameters": {
"type": "object",
"properties": {
@@ -1128,6 +1123,19 @@
]
}
},
{
"name": "wait_agent",
"description": "Wait for input at your next step, including agent messages, completion notifications, and user steering. Returns immediately when that input is already pending.",
"parameters": {
"type": "object",
"properties": {
"timeout_ms": {
"type": "integer",
"description": "Wait duration in milliseconds, from 10000 through 3600000. Defaults to 30000."
}
}
}
},
{
"name": "web_fetch",
"description": "Fetch the content of a specific HTTP(S) URL and return it decoded to text.",