( source: 'startup' | 'resume' | 'clear' | 'compact', sessionId?: string, agentType?: string, model?: string, signal?: AbortSignal, timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, forceSyncExecution?: boolean, )
| 3960 | * @returns Async generator that yields progress messages and hook results |
| 3961 | */ |
| 3962 | export async function* executeSessionStartHooks( |
| 3963 | source: 'startup' | 'resume' | 'clear' | 'compact', |
| 3964 | sessionId?: string, |
| 3965 | agentType?: string, |
| 3966 | model?: string, |
| 3967 | signal?: AbortSignal, |
| 3968 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 3969 | forceSyncExecution?: boolean, |
| 3970 | ): AsyncGenerator<AggregatedHookResult> { |
| 3971 | const hookInput: SessionStartHookInput = { |
| 3972 | ...createBaseHookInput(undefined, sessionId), |
| 3973 | hook_event_name: 'SessionStart', |
| 3974 | source, |
| 3975 | agent_type: agentType, |
| 3976 | model, |
| 3977 | } |
| 3978 | |
| 3979 | yield* executeHooks({ |
| 3980 | hookInput, |
| 3981 | toolUseID: randomUUID(), |
| 3982 | matchQuery: source, |
| 3983 | signal, |
| 3984 | timeoutMs, |
| 3985 | forceSyncExecution, |
| 3986 | }) |
| 3987 | } |
| 3988 | |
| 3989 | /** |
| 3990 | * Execute setup hooks if configured |
no test coverage detected