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