export interface LockOptions { /** Give up acquiring after this long. */ maxWaitMs?: number; /** Treat a held lock older than this as abandoned and reclaim it. */ staleMs?: number; /** * Re-stamp the owner file on this interval while the lock is held (Phase 15.2). * A long-lived holder (the sync-watch daemon) would otherwise exceed any waiter's * `staleMs` and get its LIVE lock reclaimed. With a heartbeat the stamp stays fresh * while the holder is alive, and a crashed holder stops stamping — so the normal * stale-reclaim path still frees the lock. Omit for ordinary short critical sections. */ heartbeatMs?: number; } /** * Run `fn` while holding the named lock under `locksDir`. Serializes concurrent * callers (same process or different processes) on the same name. */ export declare function withLock(locksDir: string, name: string, fn: () => Promise, opts?: LockOptions): Promise; //# sourceMappingURL=lock.d.ts.map