( source: 'startup' | 'resume' | 'clear' | 'compact', sessionId?: string, agentType?: string, model?: string, signal?: AbortSignal, timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, forceSyncExecution?: boolean, )
| 3865 | * @returns Async generator that yields progress messages and hook results |
| 3866 | */ |
| 3867 | export async function* executeSessionStartHooks( |
| 3868 | source: 'startup' | 'resume' | 'clear' | 'compact', |
| 3869 | sessionId?: string, |
| 3870 | agentType?: string, |
| 3871 | model?: string, |
| 3872 | signal?: AbortSignal, |
| 3873 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 3874 | forceSyncExecution?: boolean, |
| 3875 | ): AsyncGenerator<AggregatedHookResult> { |
| 3876 | const hookInput: SessionStartHookInput = { |
| 3877 | ...createBaseHookInput(undefined, sessionId), |
| 3878 | hook_event_name: 'SessionStart', |
| 3879 | source, |
| 3880 | agent_type: agentType, |
| 3881 | model, |
| 3882 | } |
| 3883 | |
| 3884 | yield* executeHooks({ |
| 3885 | hookInput, |
| 3886 | toolUseID: randomUUID(), |
| 3887 | matchQuery: source, |
| 3888 | signal, |
| 3889 | timeoutMs, |
| 3890 | forceSyncExecution, |
| 3891 | }) |
| 3892 | } |
| 3893 | |
| 3894 | /** |
| 3895 | * Execute setup hooks if configured |
no test coverage detected