( trigger: 'init' | 'maintenance', signal?: AbortSignal, timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, forceSyncExecution?: boolean, )
| 3995 | * @returns Async generator that yields progress messages and hook results |
| 3996 | */ |
| 3997 | export async function* executeSetupHooks( |
| 3998 | trigger: 'init' | 'maintenance', |
| 3999 | signal?: AbortSignal, |
| 4000 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 4001 | forceSyncExecution?: boolean, |
| 4002 | ): AsyncGenerator<AggregatedHookResult> { |
| 4003 | const hookInput: SetupHookInput = { |
| 4004 | ...createBaseHookInput(undefined), |
| 4005 | hook_event_name: 'Setup', |
| 4006 | trigger, |
| 4007 | } |
| 4008 | |
| 4009 | yield* executeHooks({ |
| 4010 | hookInput, |
| 4011 | toolUseID: randomUUID(), |
| 4012 | matchQuery: trigger, |
| 4013 | signal, |
| 4014 | timeoutMs, |
| 4015 | forceSyncExecution, |
| 4016 | }) |
| 4017 | } |
| 4018 | |
| 4019 | /** |
| 4020 | * Execute subagent start hooks if configured |
no test coverage detected