import type { CrossProcessLockMetadata, LockInfo } from '../../types/spec-lock-v2.js';
/**
 * A lock with lastHeartbeatAt older than this threshold is reclaimable.
 * 5 minutes balances long-running ops with crash recovery.
 */
export declare const STALE_THRESHOLD_MS: number;
/**
 * Returns true when the heartbeat is older than STALE_THRESHOLD_MS from `now`.
 */
export declare function isHeartbeatStale(lock: CrossProcessLockMetadata, now: number): boolean;
/**
 * Returns true when the hard TTL has expired: acquiredAt + ttlMs < now.
 */
export declare function isTtlExpired(lock: CrossProcessLockMetadata, now: number): boolean;
/**
 * Returns true when the pid is on the same hostname as `localHostname` and the
 * process no longer exists (`process.kill(pid, 0)` throws ESRCH).
 *
 * NOTE: Only meaningful when `lock.hostname === localHostname`. Remote PIDs
 * cannot be checked cross-machine.
 */
export declare function isPidDead(lock: CrossProcessLockMetadata, localHostname: string): boolean;
/**
 * Compute the stale reason for a lock, if any.
 * Returns undefined when the lock is live.
 * Order: TTL expiry is checked first (hardest deadline), then PID, then heartbeat.
 */
export declare function computeStaleReason(lock: CrossProcessLockMetadata, localHostname: string, now: number): LockInfo['staleReason'] | undefined;
/**
 * Enrich a raw lock metadata object with computed staleness fields.
 */
export declare function enrichWithStaleness(lock: CrossProcessLockMetadata, localHostname: string, now: number): LockInfo;
//# sourceMappingURL=lock-staleness.d.ts.map