/** Outcome strings written into the row. `expired` is reserved for the * later approval-timeout path (v1.2.131 P0b only writes the first * three). */ export type PlanOutcome = 'approved' | 'rejected' | 'edited' | 'expired'; /** What the audit callers pass in. `pendingMs` is optional because * callers may not have measured it (e.g. test paths); the column * stays NULL in that case. */ export interface RecordPlanInput { threadKey: string; planMd: string; outcome: PlanOutcome; detail?: string | null; pendingMs?: number | null; } /** Insert a new immutable row. Returns the auto-id or null on failure. */ export declare function recordPlanHistory(input: RecordPlanInput): number | null; export interface PlanHistoryRow { id: number; threadKey: string; planMd: string; outcome: PlanOutcome; detail: string | null; resolvedAt: string; pendingMs: number | null; } /** Recent entries — admin UI uses this. `threadKey` filter is optional; * omit to see global history. */ export declare function listPlanHistory(opts?: { threadKey?: string; limit?: number; }): PlanHistoryRow[]; /** Test-only: close the db handle so a tmp file can be unlinked. */ export declare function closePlanHistoryDb(): void; //# sourceMappingURL=plan-history.d.ts.map