import { type CatalogState, type CatalogStatus } from './types.js'; export declare class CatalogStateError extends Error { constructor(message: string); } export declare const statePath: (root: string) => string; export declare const lockPath: (root: string) => string; /** Lifecycle moves the catalog commands may make. Restaging changed content is `stage`'s own path. */ export declare const TRANSITIONS: Record; export declare const HISTORY_CAP = 20; /** The state on disk, or the empty state when absent. Never creates directories. */ export declare function loadCatalogState(root: string): CatalogState; /** load → fn → validate → atomic write, under the catalog lock. A throw writes nothing. */ export declare function mutateCatalogState(root: string, fn: (state: CatalogState) => CatalogState): CatalogState; export interface TransitionContext { actor: string; /** ISO timestamp recorded in history. */ now: string; reason?: string; root: string; } /** One lifecycle move, enforced against `TRANSITIONS`. Returns a new state. */ export declare function transition(state: CatalogState, id: string, to: CatalogStatus, ctx: TransitionContext): CatalogState; //# sourceMappingURL=state.d.ts.map