feat: renamed subagent handoff flow to use yield instead of submit_result

- Renamed subagent completion flow from `submit_result` to `yield` across SDK tools, prompts, and docs.
- Updated executor/task handling to require and parse `yield` calls, replacing legacy submit-result extraction and state flags.
- Added `subagent-yield-reminder` and updated system prompts to require `yield` with `result.data` or `result.error`.
- Renamed hidden-tool and registration plumbing to `yield`, including discovery helpers and renderer/test surface.
This commit is contained in:
can1357
2026-04-26 00:29:10 +02:00
parent 6bd4cf24fd
commit ecd1554eba
30 changed files with 200 additions and 221 deletions
File diff suppressed because one or more lines are too long
@@ -1178,8 +1178,8 @@
return html;
}
function renderSubmitResult(name, args, result, ctx) {
let html = toolHead('submit_result');
function renderYield(name, args, result, ctx) {
let html = toolHead('yield');
if (args.data !== undefined) {
html += '<div class="tool-output"><pre>' + escapeHtml(JSON.stringify(args.data, null, 2)) + '</pre></div>';
}
@@ -1287,7 +1287,7 @@
gh_search_issues: renderGh,
gh_search_prs: renderGh,
render_mermaid: renderMermaid,
submit_result: renderSubmitResult,
yield: renderYield,
report_finding: renderReportFinding,
report_tool_issue: renderReportToolIssue,
calc: renderCalc,