import type SqliteDatabase from "better-sqlite3";
export declare const CHECKPOINT_KIT_MIN_USER_VERSION = 9;
export type CheckpointRefKind = "head" | "stash";
export type CheckpointRow = {
    id: string;
    createdAt: string;
    taskId: string | null;
    actor: string | null;
    label: string | null;
    actionType: string;
    refKind: CheckpointRefKind;
    gitHeadSha: string;
    secondaryRef: string | null;
    manifest: string[];
    metadata: Record<string, unknown> | null;
};
export declare function assertCheckpointKitSchema(dbAbsPath: string): {
    ok: true;
} | {
    ok: false;
    message: string;
};
export declare function insertCheckpoint(db: SqliteDatabase.Database, row: {
    id: string;
    createdAt: string;
    taskId?: string | null;
    actor?: string | null;
    label?: string | null;
    actionType: string;
    refKind: CheckpointRefKind;
    gitHeadSha: string;
    secondaryRef?: string | null;
    manifest: string[];
    metadata?: Record<string, unknown> | null;
}): void;
export declare function getCheckpointById(db: SqliteDatabase.Database, id: string): CheckpointRow | undefined;
export declare function listCheckpoints(db: SqliteDatabase.Database, opts?: {
    taskId?: string;
    limit?: number;
}): CheckpointRow[];
/** Read-only rollup for `dashboard-summary` / extension (Phase 64+). */
export type TaskCheckpointsDashboardRollup = {
    schemaVersion: 1;
    available: boolean;
    totalCount: number;
    /** Newest checkpoints first (bounded). */
    topRecent: Array<{
        id: string;
        taskId: string | null;
        label: string | null;
        refKind: CheckpointRefKind;
        createdAt: string;
        gitHeadSha: string;
    }>;
};
export declare function summarizeCheckpointsForDashboard(db: SqliteDatabase.Database | undefined): TaskCheckpointsDashboardRollup;
