import type { Database } from "bun:sqlite";
export interface ScaleBenchmark {
    name: string;
    rows: number;
    elapsed_ms: number;
    threshold_ms: number;
    ok: boolean;
}
export interface ScalePerformanceReport {
    schema_version: 1;
    local_only: true;
    no_network: true;
    generated_at: string;
    database_path: string;
    counts: {
        tasks: number;
        archived_tasks: number;
        projects: number;
        agents: number;
        plans: number;
        runs: number;
        run_events: number;
        comments: number;
        dependencies: number;
    };
    benchmarks: ScaleBenchmark[];
    archive: {
        terminal_unarchived_tasks: number;
        older_than_days: number;
        older_terminal_unarchived_tasks: number;
        archived_tasks_visible_with_include_archived: boolean;
    };
    compaction: {
        page_count: number;
        freelist_count: number;
        freelist_ratio: number;
        recommended: boolean;
        commands: string[];
    };
    integrity: {
        quick_check: string;
        foreign_key_violations: number;
        missing_indexes: string[];
        ok: boolean;
    };
    warnings: string[];
}
export interface ScaleCompactionResult {
    schema_version: 1;
    local_only: true;
    no_network: true;
    dry_run: boolean;
    database_path: string;
    before: {
        page_count: number;
        freelist_count: number;
    };
    after: {
        page_count: number;
        freelist_count: number;
    };
    actions: string[];
}
export interface CreateScalePerformanceReportOptions {
    older_than_days?: number;
    generated_at?: string;
}
export interface CompactScaleStorageOptions {
    apply?: boolean;
}
export declare function createScalePerformanceReport(options?: CreateScalePerformanceReportOptions, db?: Database): ScalePerformanceReport;
export declare function compactScaleStorage(options?: CompactScaleStorageOptions, db?: Database): ScaleCompactionResult;
export declare function renderScalePerformanceReportMarkdown(report: ScalePerformanceReport): string;
//# sourceMappingURL=scale-hardening.d.ts.map