/**
 * perf-history.ts — Lightweight per-tool performance recorder.
 *
 * Appends { tool, ms, at } rows to ~/.nexus-prime/perf-history.jsonl.
 * Reads them back to compute p50 / p90 / p99 per tool for nexus_doctor.
 * File-backed so stats survive daemon restarts without a full SQLite migration.
 */
export interface PerfRow {
    tool: string;
    ms: number;
    at: number;
}
export interface PerfStats {
    tool: string;
    count: number;
    p50: number;
    p90: number;
    p99: number;
    /** Wall-clock budget thresholds (ms). Undefined means no defined budget. */
    budget?: {
        warn: number;
        fail: number;
    };
}
/**
 * Append a single timing row (fire-and-forget — never throws).
 * Called from runHandler after each successful tool invocation.
 */
export declare function recordPerf(tool: string, ms: number): void;
/** Compute p50/p90/p99 for a specific tool from recent history. */
export declare function getPerfStats(tool: string): Promise<PerfStats>;
/** Get stats for every tool that has recorded data. */
export declare function getAllPerfStats(): Promise<PerfStats[]>;
