import type DatabaseCtor from "better-sqlite3";
import type { PlanningStateProjectionV1 } from "./planning-projection-types.js";
import type { PlanningSyncDomainId } from "../persistence/planning-canonical-sync-domains.js";
type SqliteDb = InstanceType<typeof DatabaseCtor>;
type StoredWorkspaceStatusEventRow = {
    created_at: string;
    event_kind: string;
    actor: string | null;
    command: string | null;
    revision_before: number;
    revision_after: number;
    details_json: string;
};
/** Normalize audit event_kind for kit_workspace_status_events (roster reads set_current_phase). */
export declare function normalizeWorkspaceStatusEventKind(eventKind: string): string;
export declare function previousCurrentKitPhaseFromDetailsJson(detailsJson: string): string | null;
/** Merge git-replayed audits without dropping local rollover history missing from the canonical stream. */
export declare function rewriteWorkspaceStatusFromProjection(db: SqliteDb, projection: PlanningStateProjectionV1, preservedRollovers: StoredWorkspaceStatusEventRow[]): void;
/** Persist in-memory planning projection into kit SQLite (full rebuild path). */
export declare function persistPlanningProjectionToSqlite(db: SqliteDb, projection: PlanningStateProjectionV1, options?: {
    replaceCatalog?: boolean;
    enabledDomains?: ReadonlySet<PlanningSyncDomainId>;
}): void;
/** Seed planning projection from current SQLite rows (baseline / snapshot paths). */
export declare function planningProjectionFromSqlite(db: SqliteDb): PlanningStateProjectionV1;
export {};
