( agentId: string, agentType: string, signal?: AbortSignal, timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, )
| 4089 | * @returns Async generator that yields progress messages and hook results |
| 4090 | */ |
| 4091 | export async function* executeSubagentStartHooks( |
| 4092 | agentId: string, |
| 4093 | agentType: string, |
| 4094 | signal?: AbortSignal, |
| 4095 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 4096 | ): AsyncGenerator<AggregatedHookResult> { |
| 4097 | const hookInput: SubagentStartHookInput = { |
| 4098 | ...createBaseHookInput(undefined), |
| 4099 | hook_event_name: 'SubagentStart', |
| 4100 | agent_id: agentId, |
| 4101 | agent_type: agentType, |
| 4102 | } |
| 4103 | |
| 4104 | yield* executeHooks({ |
| 4105 | hookInput, |
| 4106 | toolUseID: randomUUID(), |
| 4107 | matchQuery: agentType, |
| 4108 | signal, |
| 4109 | timeoutMs, |
| 4110 | }) |
| 4111 | } |
| 4112 | |
| 4113 | /** |
| 4114 | * Execute pre-compact hooks if configured |
no test coverage detected