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