export declare const SIDECAR_MIGRATED_SUFFIX = ".migrated";
export type SidecarReadResult<T> = {
    ok: true;
    value: T;
} | {
    ok: false;
    corrupt: true;
} | {
    ok: false;
    missing: true;
};
export declare function sidecarPath(workspacePath: string, relativePath: string): string;
export declare function readSidecarJsonFile(workspacePath: string, relativePath: string): Promise<SidecarReadResult<Record<string, unknown>>>;
/** Rename legacy sidecar so subsequent runs do not re-read it. */
export declare function archiveSidecarFile(workspacePath: string, relativePath: string): Promise<void>;
export declare function persistModuleStateRow(args: {
    workspacePath: string;
    databaseRelativePath: string;
    moduleId: string;
    stateSchemaVersion: number;
    state: Record<string, unknown>;
}): void;
