/** Locks a writer would take for the identity; held so none can start. */
export declare const WRITER_OPERATIONS: readonly ["index", "watch", "graph", "context"];
export type WriterOperation = (typeof WRITER_OPERATIONS)[number];
export declare class ReclamationBarrierError extends Error {
    readonly projectId: string;
    constructor(projectId: string, detail: string);
}
/** Whether this process is reclaiming the identity right now. */
export declare function isReclamationBarrierHeld(projectId: string): boolean;
/** Throws ReclamationBarrierError while the identity is being reclaimed here or on this host, and LockInspectionError when that cannot be told. */
export declare function assertNoReclamationBarrier(projectId: string): Promise<void>;
/** Hold a writer lock by identity for the duration of a write; false when another process holds it or it cannot be taken. */
export declare function withWriterLock<T>(projectId: string, operation: WriterOperation, write: () => Promise<T>): Promise<T | null>;
export interface ReclamationBarrier {
    /** True once proper-lockfile reported any barrier lock lost; the delete must not proceed. */
    isCompromised(): boolean;
    release(): Promise<void>;
}
/** Take the barrier for an identity, or null when a writer holds any lock it needs; partial acquisition is undone. */
export declare function acquireReclamationBarrier(projectId: string): Promise<ReclamationBarrier | null>;
/** Test seam: forget every barrier this process holds without touching lock files. */
export declare function resetReclamationBarriers(): void;
//# sourceMappingURL=reclamation-barrier.d.ts.map