( trigger: 'init' | 'maintenance', signal?: AbortSignal, timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, forceSyncExecution?: boolean, )
| 4059 | * @returns Async generator that yields progress messages and hook results |
| 4060 | */ |
| 4061 | export async function* executeSetupHooks( |
| 4062 | trigger: 'init' | 'maintenance', |
| 4063 | signal?: AbortSignal, |
| 4064 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 4065 | forceSyncExecution?: boolean, |
| 4066 | ): AsyncGenerator<AggregatedHookResult> { |
| 4067 | const hookInput: SetupHookInput = { |
| 4068 | ...createBaseHookInput(undefined), |
| 4069 | hook_event_name: 'Setup', |
| 4070 | trigger, |
| 4071 | } |
| 4072 | |
| 4073 | yield* executeHooks({ |
| 4074 | hookInput, |
| 4075 | toolUseID: randomUUID(), |
| 4076 | matchQuery: trigger, |
| 4077 | signal, |
| 4078 | timeoutMs, |
| 4079 | forceSyncExecution, |
| 4080 | }) |
| 4081 | } |
| 4082 | |
| 4083 | /** |
| 4084 | * Execute subagent start hooks if configured |
no test coverage detected