( trigger: 'init' | 'maintenance', signal?: AbortSignal, timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, forceSyncExecution?: boolean, )
| 3900 | * @returns Async generator that yields progress messages and hook results |
| 3901 | */ |
| 3902 | export async function* executeSetupHooks( |
| 3903 | trigger: 'init' | 'maintenance', |
| 3904 | signal?: AbortSignal, |
| 3905 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 3906 | forceSyncExecution?: boolean, |
| 3907 | ): AsyncGenerator<AggregatedHookResult> { |
| 3908 | const hookInput: SetupHookInput = { |
| 3909 | ...createBaseHookInput(undefined), |
| 3910 | hook_event_name: 'Setup', |
| 3911 | trigger, |
| 3912 | } |
| 3913 | |
| 3914 | yield* executeHooks({ |
| 3915 | hookInput, |
| 3916 | toolUseID: randomUUID(), |
| 3917 | matchQuery: trigger, |
| 3918 | signal, |
| 3919 | timeoutMs, |
| 3920 | forceSyncExecution, |
| 3921 | }) |
| 3922 | } |
| 3923 | |
| 3924 | /** |
| 3925 | * Execute subagent start hooks if configured |
no test coverage detected