(tools: readonly MakaTool[])
| 57 | type SubagentToolResult = Extract<ToolResultContent, { kind: 'subagent' }>; |
| 58 | |
| 59 | export function buildChildAgentTools(tools: readonly MakaTool[]): MakaTool[] { |
| 60 | const seen = new Set<string>(); |
| 61 | const out: MakaTool[] = []; |
| 62 | for (const definition of BUILTIN_AGENT_DEFINITIONS) { |
| 63 | for (const tool of buildToolsForAgentDefinition(tools, definition)) { |
| 64 | if (seen.has(tool.name)) continue; |
| 65 | seen.add(tool.name); |
| 66 | out.push(tool); |
| 67 | } |
| 68 | } |
| 69 | return out; |
| 70 | } |
| 71 | |
| 72 | export function buildSubagentSpawnTool( |
| 73 | deps: { taskLedger?: TaskLedgerStore; definitions?: readonly AgentDefinition[] } = {}, |
no test coverage detected