/** Runtime-neutral hook input validation and decision handling. */ declare const HOOK_EVENTS: readonly ['PreToolUse', 'PostToolUse', 'SessionStart', 'SessionEnd']; export interface NormalizedHookEvent { event: (typeof HOOK_EVENTS)[number]; tool: string; cwd: string; sessionId: string; input: Record; } export type HookDecision = { action: 'allow'; reason?: string; } | { action: 'block'; reason?: string; } | { action: 'observe'; reason?: string; }; export interface HookPolicy { mode: 'observe' | 'block'; timeoutMs: Partial>; } export declare const DEFAULT_TIMEOUTS: Readonly>; /** Parse untrusted platform stdin without guessing a platform-specific payload shape. */ export declare function parseNormalizedHookEvent(payload: unknown): NormalizedHookEvent | null; export type HookHandler = (event: NormalizedHookEvent) => Promise | HookDecision; /** * A self-contained Node bridge for native hook runners. It intentionally has * no dependency on a Claude installation or helper tree: every supported * runner can invoke the same executable and receive a protocol-only result. * * The generated program currently performs neutral observation. Blocking is * a transport capability, not an implicit policy: a future policy must return * an explicit `block` decision before a runner is allowed to stop a tool. */ export declare function renderNeutralHookBridge(): string; /** * Run a normalized policy handler. Observe mode is deliberately fail-open: * handler failures and deadlines never become a platform-level block. */ export declare function runHook(event: NormalizedHookEvent, policy: HookPolicy, handler?: HookHandler): Promise; export {}; //# sourceMappingURL=hook-bridge.d.ts.map