MCPcopy
hub / github.com/codeaashu/claude-code / executeSetupHooks

Function executeSetupHooks

src/utils/hooks.ts:3902–3922  ·  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

3900 * @returns Async generator that yields progress messages and hook results
3901 */
3902export 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

Callers 1

processSetupHooksFunction · 0.85

Calls 2

createBaseHookInputFunction · 0.85
executeHooksFunction · 0.85

Tested by

no test coverage detected