export interface HookEvent { hook_event_name: string; event_type?: string; provider: string; tool_name?: string; tool_input?: unknown; tool_output?: { text: string; } | null; success?: boolean; session_id?: string | null; message?: string | null; timestamp: string; [key: string]: unknown; } /** Canonical event_type for a hook_event_name (falls back to snake_case-ing the name). */ export declare function eventTypeFor(hookEventName: string): string; export declare function normalizeEvent(provider: string, raw: Record): HookEvent | null; /** * Append a normalized event to a JSONL sink file. * Creates the directory if it doesn't exist. * Silently ignores write errors (non-critical path). */ export declare function appendHookEvent(jsonlPath: string, provider: string, raw: Record, fs: { mkdirSync: (p: string, opts: { recursive: boolean; }) => void; appendFileSync: (p: string, d: string, opts: BufferEncoding | { encoding: BufferEncoding; }) => void; }, path: { dirname: (p: string) => string; }, onError?: (err: unknown) => void): void; /** * Per-family normalizer. Concrete providers override `normalizeRaw` when they * speak a native event dialect (copilot-sdk, opencode-sdk, dummy). CLI-hook * families inherit the already-formatted pass-through. */ export declare abstract class ProviderNormalizer { abstract readonly provider: string; normalize(raw: Record): HookEvent | null; }