import { type HeldFileLock } from "../file-lock.ts";
/** The file's content, or undefined when it does not exist yet. */
export declare function readStateFile(path: string): string | undefined;
/**
 * Stages the document beside the file and renames it over the target, so a
 * reader that takes no lock always sees one complete document: the previous
 * one or the next one, never a torn write. Writers stay serialized by the
 * lock the caller holds, so the pid-suffixed temp cannot collide.
 */
export declare function writeStateFileAtomic(path: string, content: string): Promise<void>;
/**
 * Waits for the file lock within `budgetMs` (queueing behind same-process
 * callers counts against it), then fails naming the lock and the wait.
 */
export declare function acquireStateFileLock(path: string, budgetMs: number): Promise<Pick<HeldFileLock, "release" | "assertHeld">>;
//# sourceMappingURL=state-file.d.ts.map