/** * #387: one lifecycle step of a native Claude subagent (a `Task`/`Agent` tool * call), carried on an `AgentMessage` of type `'subagent'` and forwarded by * agent-exec.ts as the protocol's `subagent` event (doc/agent-exec-protocol.md * ยง3.2.1). `id` is the SDK's task_id; `tool_use_id` is the id of the `Task`/ * `Agent` tool call that started it, i.e. the matching `tool_activity` id. */ export interface SubagentEvent { phase: 'started' | 'progress' | 'finished'; id: string; tool_use_id: string; subagent_type?: string; description?: string; prompt?: string; summary?: string; last_tool?: string; status?: string; /** The SDK's own task usage, passed through as-is โ€” it reports a token * total, not an input/output split, and no cost. */ usage?: { total_tokens: number; tool_uses: number; duration_ms: number; }; } /** * Map the Agent SDK's `system` task messages (`task_started`, * `task_progress`, `task_notification`; sdk.d.ts SDKTask*Message) to * SubagentEvents. Stateful per turn: a later message may omit `tool_use_id`, * so it is remembered from `task_started`; a task that was never started here * โ€” no tool call to join to, or an ambient `skip_transcript` housekeeping * task โ€” is dropped at every phase. Returns undefined for anything else. */ export declare function createSubagentTracker(): (m: any) => SubagentEvent | undefined; //# sourceMappingURL=agent-runner-claude-subagent.d.ts.map