export type HookOutcome = 'ok' | 'error' | 'overrun'; /** * One recorded run: time, moment, whole-process milliseconds, outcome, findings shown, and for an * `error`, what failed: without it a failed run cannot be diagnosed afterwards. */ export interface HookRun { t: string; moment: string; ms: number; outcome: HookOutcome; shown: number; reason?: string; } /** A thrown value as one bounded line: `TypeError: x is not a function`. */ export declare function errorReason(error: unknown): string; export interface MomentHealth { moment: string; runs: number; lastRun: string; p95Ms: number; errors: number; overruns: number; shown: number; /** The most recent failed run's reason, when one was recorded. */ lastError?: { t: string; reason: string; }; } export declare function hookRunsPath(root: string): string; /** Append one run. Never throws: a record that cannot be written changes nothing. */ export declare function recordHookRun(root: string, run: Omit & { t?: string; }): Promise; /** Per moment, over the last 7 days: runs, last run, p95, errors, overruns, findings shown. */ export declare function readHookHealth(root: string, now?: number): MomentHealth[]; /** What happened to the findings the hooks showed (design section 4); the four counts sum to `total`. */ export interface FindingOutcomes { total: number; fixed: number; decided: number; open: number; notAssessed: number; } /** * Over the session records touched in the last 7 days: each distinct finding shown, counted once, * as fixed, decided (a decision's title, rationale, or consequences cites its id, `f:1a2b3c4d`), * open (still in the last stop receipt), or not assessed. Precedence in that order. Read-only. */ export declare function readFindingOutcomes(root: string, now?: number): Promise; //# sourceMappingURL=hook-health.d.ts.map