export interface HookProfileRow {
    hook: string;
    n: number;
    p50Ms: number;
    p95Ms: number;
    p99Ms: number;
    meanMs: number;
    maxMs: number;
    cacheHitPct: number;
    cacheStalePct: number;
    cacheMissPct: number;
    errorCount: number;
    /**
     * Fraction (0-1) of fires with a real crash exit (exit 1 / other nonzero
     * except intentional PreToolUse deny code 2). Exit 2 is blockRate.
     */
    errorRate?: number;
    /**
     * Count of intentional deny/block exits (PreToolUse exit 2). Deny-by-design
     * guards (ask-user-question-guard, git-guard, plan-html-reminder) use this
     * path — not a crash.
     */
    blockCount: number;
    /** Fraction (0-1) of fires with exit code 2 (intentional deny/block). */
    blockRate?: number;
    /** Fraction (0-1) of fires that hit their configured timeout. */
    timeoutRate?: number;
    /** Project key the row is scoped to (see project-key.ts) — set only when
     *  a `--project` filter narrowed the underlying query. */
    project?: string;
}
interface RawFireEvent {
    event?: string;
    hook?: string;
    ms?: number;
    cache?: 'hit' | 'miss' | 'stale-prefetch' | string;
    exit?: number;
}
/**
 * Load every `hook.fire` event from the last `days` daily log files.
 * Lines that aren't JSON or aren't `hook.fire` events are silently skipped —
 * the events log is multiplexed (version.switch, secrets.get, …).
 */
export declare function loadHookFireEvents(days?: number, logsDir?: string): RawFireEvent[];
/** Aggregate fire events into a per-hook profile, sorted by p99 desc. */
export declare function aggregateHookProfile(events: RawFireEvent[]): HookProfileRow[];
/** Human-friendly duration: "42ms" / "1.2s" / "12s" / "2m". */
export declare function formatMs(ms: number): string;
/** Format a row's cache column: `hit:97% miss:3%` or `n/a` when nothing cached. */
export declare function formatCacheColumn(row: HookProfileRow): string;
export declare const DEFAULT_SLOW_HOOK_WARN_MS = 2000;
export {};
