import type Database from "better-sqlite3";
export declare const KIT_TASK_STATE_PROJECTION_META_TABLE = "kit_task_state_projection_meta";
/** Row schema version for JSON/API surfaces (distinct from kit SQLite user_version). */
export declare const TASK_STATE_PROJECTION_META_SCHEMA_VERSION: 1;
export declare const TASK_STATE_PROJECTION_SYNC_STATUSES: readonly ["empty", "fresh", "stale", "rebuilding", "corrupt"];
export type TaskStateProjectionSyncStatus = (typeof TASK_STATE_PROJECTION_SYNC_STATUSES)[number];
/** Canonical event-log backend the local SQLite cache is projecting from. */
export declare const TASK_STATE_PROJECTION_BACKENDS: readonly ["git-event-log", "sqlite-relational"];
export type TaskStateProjectionBackend = (typeof TASK_STATE_PROJECTION_BACKENDS)[number];
export type TaskStateProjectionMeta = {
    schemaVersion: typeof TASK_STATE_PROJECTION_META_SCHEMA_VERSION;
    backend: TaskStateProjectionBackend;
    appliedSequence: number;
    sourceCommit: string | null;
    projectionSchemaVersion: number;
    syncStatus: TaskStateProjectionSyncStatus;
    updatedAt: string;
};
export declare function taskStateProjectionMetaTableAvailable(db: Database.Database): boolean;
export declare function readTaskStateProjectionMeta(db: Database.Database): TaskStateProjectionMeta | null;
export type UpsertTaskStateProjectionMetaInput = {
    backend?: TaskStateProjectionBackend;
    appliedSequence?: number;
    sourceCommit?: string | null;
    projectionSchemaVersion?: number;
    syncStatus?: TaskStateProjectionSyncStatus;
    updatedAt: string;
};
export declare function upsertTaskStateProjectionMeta(db: Database.Database, input: UpsertTaskStateProjectionMetaInput): TaskStateProjectionMeta;
