import { type RecordCodec } from "../../../schema/src/records/envelope.js";
export type Codec<T> = RecordCodec<T>;
export type RecordStateClass = "blocking" | "advisory";
export interface ReadRecordOptions {
    stateClass: RecordStateClass;
}
export declare class CorruptStateError extends Error {
    readonly path: string;
    readonly reason: string;
    readonly recoveryInstructions: string;
    readonly quarantinePath?: string;
    readonly quarantineReport?: string;
    constructor(config: {
        path: string;
        reason: string;
        recoveryInstructions: string;
        quarantinePath?: string;
        quarantineReport?: string;
        cause?: unknown;
    });
}
export declare function atomicWriteRecord(path: string, value: unknown, codec: Codec<unknown>): Promise<void>;
export declare function readRecord<T>(path: string, codec: Codec<T>, options: ReadRecordOptions): Promise<T>;
//# sourceMappingURL=atomic.d.ts.map