MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / executeSetupHooks

Function executeSetupHooks

source code/utils/hooks.ts:3904–3924  ·  view source on GitHub ↗
(
  trigger: 'init' | 'maintenance',
  signal?: AbortSignal,
  timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS,
  forceSyncExecution?: boolean,
)

Source from the content-addressed store, hash-verified

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

Callers 1

processSetupHooksFunction · 0.85

Calls 2

createBaseHookInputFunction · 0.85
executeHooksFunction · 0.85

Tested by

no test coverage detected