import { DatabaseSync } from 'node:sqlite'; export declare const AUDIT_DB_PATH: string; export interface PruneFilters { /** Delete runs whose started_at < (now - olderThanMs). Falsy = no age filter. */ olderThanMs?: number; /** Delete runs whose status is in this set. Default: stopped, error, stale. */ statuses?: Set; /** For each automation_id, keep the N most recent runs regardless of other filters. */ keepLastPerAutomation?: number; /** Delete every run that is not currently alive (overrides status/age). */ all?: boolean; } export interface PruneOptions extends PruneFilters { dbPath?: string; dryRun?: boolean; vacuum?: boolean; /** * When true, skip the deletion phase and only update status of orphaned * 'running' rows whose pid is dead — used by `auto clean` to reconcile state * without losing history. */ reconcileOnly?: boolean; } export interface PruneResult { reconciled: number; candidateRunIds: string[]; deletedRows: Record; freedBytes: number; dryRun: boolean; } /** Parse human-friendly durations like `7d`, `24h`, `30m`, `45s`. */ export declare function parseDuration(input: string): number; /** Reconcile orphan-running rows in the DB (process dead → mark stopped). */ export declare function reconcileStaleRuns(db: DatabaseSync, opts?: { dryRun?: boolean; now?: number; }): number; export declare function prune(opts?: PruneOptions): PruneResult; export declare function fmtBytes(n: number): string; //# sourceMappingURL=prune.d.ts.map