export interface NoClobberLeaseOwner { schema_version: 1; owner_id: string; owner_file: string; scope: string; authority_sha256: string; metadata?: Record; pid: number; host: string; created_at: string; expires_at: string; } export type LeaseRecoveryStep = "claim_created" | "stale_pinned" | "current_removed" | "new_current_linked"; export interface AcquireNoClobberLeaseInput { path: string; scope: string; authoritySha256: string; metadata?: Readonly>; staleAfterMs: number; validateStaleOwner?: (owner: NoClobberLeaseOwner) => boolean; now?: () => number; pid?: number; host?: string; /** Fault-injection hook immediately before the lease directory is created. */ onLeaseDirectoryCreate?: () => void; /** Fault-injection hook after contention is observed and before owner inspection. */ onContention?: () => void; onRecoveryStep?: (step: LeaseRecoveryStep) => void; } export interface NoClobberLease { owner: NoClobberLeaseOwner; recovered_owner?: NoClobberLeaseOwner; release(): void; } /** * Acquires a crash-safe lease whose active name is always a hard link to one * immutable owner file. Stale takeover is serialized by an atomic recovery * directory; only its claimant may pin and replace the observed `current`. */ export declare function acquireNoClobberLease(input: AcquireNoClobberLeaseInput): NoClobberLease; //# sourceMappingURL=leases.d.ts.map