/** * Lock Manager - File-based locking with staleness detection * * Provides atomic file locking using directory creation (mkdir) * with automatic stale lock detection and removal. */ import { Logger } from './logger.js'; export declare class LockManager { private lockDir; private staleThresholdSeconds; private logger; private skipLocks; constructor(lockDir: string, staleThresholdSeconds?: number, options?: { logger?: Logger; }); /** * Acquires the lock with automatic stale lock detection * * @returns true if lock acquired, false if failed */ acquire(): Promise; /** * Releases the lock */ release(): Promise; /** * Checks if the lock is stale * * A lock is stale if: * 1. It's older than the threshold * 2. The PID in the lock file no longer exists * * @returns true if lock is stale */ isStale(): Promise; /** * Removes a stale lock after validation */ removeStale(): Promise; /** * Gets the age of the lock in seconds */ private getLockAge; /** * Checks if a PID exists (cross-platform) */ private checkPidExists; } //# sourceMappingURL=lock-manager.d.ts.map