picoclaw/pkg/tools
yinwm 28734c3a2e 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>
2026-02-12 20:14:21 +08:00
..
base.go feat: US-006 - Add AsyncCallback type and AsyncTool interface 2026-02-12 19:35:41 +08:00
cron.go feat: US-016 - Refactor CronTool to use ToolResult 2026-02-12 20:06:53 +08:00
cron.go.bak2 feat: US-002 - Modify Tool interface to return *ToolResult 2026-02-12 19:28:56 +08:00
cron.go.broken feat: US-002 - Modify Tool interface to return *ToolResult 2026-02-12 19:28:56 +08:00
edit.go feat: US-002 - Modify Tool interface to return *ToolResult 2026-02-12 19:28:56 +08:00
edit_test.go feat: US-015 - Add EditTool tests 2026-02-12 19:55:57 +08:00
filesystem.go feat: US-002 - Modify Tool interface to return *ToolResult 2026-02-12 19:28:56 +08:00
filesystem_test.go feat: US-013 - Add FilesystemTool tests 2026-02-12 19:53:00 +08:00
message.go feat: US-002 - Modify Tool interface to return *ToolResult 2026-02-12 19:28:56 +08:00
message_test.go feat: US-011 - Add MessageTool tests 2026-02-12 19:50:53 +08:00
registry.go feat: US-008 - Inject callback into async tools in AgentLoop 2026-02-12 19:42:24 +08:00
result.go feat: US-002 - Modify Tool interface to return *ToolResult 2026-02-12 19:28:56 +08:00
result_test.go feat: US-002 - Modify Tool interface to return *ToolResult 2026-02-12 19:28:56 +08:00
shell.go feat: US-002 - Modify Tool interface to return *ToolResult 2026-02-12 19:28:56 +08:00
shell_test.go feat: US-012 - Add ShellTool tests 2026-02-12 19:52:16 +08:00
spawn.go feat: US-002 - Modify Tool interface to return *ToolResult 2026-02-12 19:28:56 +08:00
subagent.go feat: US-018 - Add SubagentTool with ToolResult support 2026-02-12 20:14:21 +08:00
subagent_tool_test.go feat: US-018 - Add SubagentTool with ToolResult support 2026-02-12 20:14:21 +08:00
types.go * First commit 2026-02-09 19:20:19 +08:00
web.go feat: US-002 - Modify Tool interface to return *ToolResult 2026-02-12 19:28:56 +08:00
web_test.go feat: US-014 - Add WebTool tests 2026-02-12 19:54:44 +08:00