fix(subagent): complete output selection contract

This commit is contained in:
Hypatia May
2026-08-10 22:19:14 +08:00
parent 084638af47
commit 4f23fa84cc
32 changed files with 113 additions and 93 deletions

View File

@@ -294,10 +294,10 @@ type SubagentDescendantListEntry = SubagentListEntry & {
*/
interface SubagentResult {
/**
* The child's final assistant output: the content of the last NON-EMPTY
* assistant message (an empty-content message hosts only usage and is
* skipped), else the text streamed before the turn was cut short, or `[]`
* when the child produced none.
* The child's final assistant output is the content of its last non-empty
* assistant message. Empty-content messages, including usage-only messages,
* are skipped. Without a non-empty message, the output is its accumulated
* assistant text stream, or `[]` when the child produced neither.
*/
readonly output: ContentBlock[]
/**