( agentId: string, agentType: string, signal?: AbortSignal, timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, )
| 3930 | * @returns Async generator that yields progress messages and hook results |
| 3931 | */ |
| 3932 | export async function* executeSubagentStartHooks( |
| 3933 | agentId: string, |
| 3934 | agentType: string, |
| 3935 | signal?: AbortSignal, |
| 3936 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 3937 | ): AsyncGenerator<AggregatedHookResult> { |
| 3938 | const hookInput: SubagentStartHookInput = { |
| 3939 | ...createBaseHookInput(undefined), |
| 3940 | hook_event_name: 'SubagentStart', |
| 3941 | agent_id: agentId, |
| 3942 | agent_type: agentType, |
| 3943 | } |
| 3944 | |
| 3945 | yield* executeHooks({ |
| 3946 | hookInput, |
| 3947 | toolUseID: randomUUID(), |
| 3948 | matchQuery: agentType, |
| 3949 | signal, |
| 3950 | timeoutMs, |
| 3951 | }) |
| 3952 | } |
| 3953 | |
| 3954 | /** |
| 3955 | * Execute pre-compact hooks if configured |
no test coverage detected