export declare const HOOK_INPUT_LIMITS: { readonly maxBytes: number; readonly maxDepth: 32; readonly maxNodes: 10000; readonly maxHandlers: 64; readonly maxHandlerTimeoutMs: 30000; readonly maxAggregateTimeoutMs: 60000; readonly maxDiagnosticBytes: 4096; readonly maxAggregateContextBytes: 8192; }; export type HookClient = "claude" | "codex"; export type LogicalHookEvent = "session-start" | "session-end" | "before-tool" | "permission-request" | "after-tool" | "tool-failure" | "before-compact" | "after-compact" | "user-prompt" | "agent-start" | "agent-stop" | "notification" | "stop"; type JsonPrimitive = boolean | number | string | null; export type JsonValue = JsonPrimitive | JsonValue[] | { [key: string]: JsonValue; }; export interface NormalizedHookEvent { version: 1; client: HookClient; event: LogicalHookEvent; nativeEvent: string; sessionId: string; transcriptPath: string | null; cwd: string; permissionMode?: string; model?: string; turnId?: string; promptId?: string; effortLevel?: "low" | "medium" | "high" | "xhigh" | "max"; tool?: { name: string; id?: string; input: JsonValue; response?: JsonValue; error?: string; interrupted?: boolean; }; prompt?: string; trigger?: "auto" | "manual"; customInstructions?: string; compactSummary?: string; source?: "startup" | "resume" | "clear" | "compact"; reason?: string; durationMs?: number; stopHookActive?: boolean; lastAssistantMessage?: string | null; agent?: { id?: string; type?: string; transcriptPath?: string | null; }; notification?: { message: string; title?: string; type?: string; }; } export interface HookHandlerDecision { action: "continue" | "block"; context?: string; reason?: string; } export interface HookHandler { id: string; events: readonly LogicalHookEvent[]; enabled: boolean; order: number; timeoutMs: number; failurePolicy: "open" | "closed"; redactionPolicy: "none" | "sensitive-values"; storagePolicy: "none" | "ephemeral" | "aih-state"; run: (event: Readonly, signal: AbortSignal) => HookHandlerDecision | Promise; } export type HookHandlerStatus = "disabled" | "not-matched" | "continued" | "blocked" | "failed-open" | "failed-closed" | "timed-out-open" | "timed-out-closed"; export interface HookHandlerReceipt { handlerId: string; status: HookHandlerStatus; failurePolicy: "open" | "closed"; } export interface HookDispatchResult { action: "continue" | "block"; reason?: string; contexts: string[]; receipts: HookHandlerReceipt[]; } export declare function normalizeClaudeHookInput(input: unknown): NormalizedHookEvent; export declare function normalizeCodexHookInput(input: unknown): NormalizedHookEvent; export declare function dispatchHookEvent(event: NormalizedHookEvent, handlers: readonly HookHandler[]): Promise; export declare function serializeHookDispatchResult(result: HookDispatchResult): string; export {};