/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { HookConfig } from './types.js'; import { HookEventName } from './types.js'; import type { HookInput, HookExecutionResult } from './types.js'; /** * Hook runner that executes command hooks */ export declare class HookRunner { constructor(); /** * Execute a single hook */ executeHook(hookConfig: HookConfig, eventName: HookEventName, input: HookInput): Promise; /** * Execute multiple hooks in parallel */ executeHooksParallel(hookConfigs: HookConfig[], eventName: HookEventName, input: HookInput): Promise; /** * Execute multiple hooks sequentially */ executeHooksSequential(hookConfigs: HookConfig[], eventName: HookEventName, input: HookInput): Promise; /** * Apply hook output to modify input for the next hook in sequential execution */ private applyHookOutputToInput; /** * Execute a command hook */ private executeCommandHook; /** * Expand command with environment variables and input context * * SECURITY: All variable values are escaped before substitution to prevent injection */ private expandCommand; /** * Convert plain text output to structured HookOutput */ private convertPlainTextToHookOutput; }