feat: US-018 - Add SubagentTool with ToolResult support

Created new SubagentTool for synchronous subagent execution:
- Implements Tool interface with Name(), Description(), Parameters(), SetContext(), Execute()
- Returns ToolResult with ForUser (summary), ForLLM (full details), Silent=false, Async=false
- Registered in AgentLoop with context support
- Comprehensive test file subagent_tool_test.go with 9 passing tests

Acceptance criteria met:
- ForUser contains subagent output summary (truncated to 500 chars)
- ForLLM contains full execution details with label and result
- Typecheck passes (go build ./... succeeds)
- go test ./pkg/tools -run TestSubagentTool passes (all 9 tests pass)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
yinwm
2026-02-12 20:14:21 +08:00
parent 061b07192d
commit 28734c3a2e
6 changed files with 461 additions and 302 deletions

View File

@@ -269,7 +269,7 @@
"go test ./pkg/tools -run TestSubagentTool passes"
],
"priority": 18,
"passes": false,
"passes": true,
"notes": ""
},
{