/**
 * Shared file-locking utilities built on `proper-lockfile`.
 *
 * Centralises the synchronous retry-loop and async lock/release patterns
 * that were previously duplicated across auth-storage, session-manager,
 * settings-manager, and models-json-writer.
 */
/**
 * Acquire a synchronous file lock with retry.
 *
 * Retries up to `maxAttempts` times when the lock is held by another process
 * (ELOCKED), using a busy-wait between attempts.
 *
 * @returns A release function to unlock.
 * @throws On non-ELOCKED errors or when all attempts are exhausted.
 */
export declare function acquireLockSyncWithRetry(lockPath: string, maxAttempts?: number, delayMs?: number): () => void;
/**
 * Non-throwing variant of {@link acquireLockSyncWithRetry}.
 *
 * Returns `undefined` instead of throwing when the lock cannot be acquired,
 * allowing callers to proceed without the lock rather than losing data.
 */
export declare function tryAcquireLockSync(lockPath: string, maxAttempts?: number, delayMs?: number): (() => void) | undefined;
export interface AsyncLockOptions {
    /** Maximum staleness in ms before the lock is considered stale. */
    staleMs?: number;
    /** Called if the lock is compromised while held. */
    onCompromised?: (err: Error) => void;
}
/**
 * Acquire an async file lock with retries and optional staleness detection.
 *
 * Uses `proper-lockfile`'s async API with exponential-backoff retries.
 *
 * @returns A release function (async) to unlock.
 */
export declare function acquireLockAsync(lockPath: string, options?: AsyncLockOptions): Promise<() => Promise<void>>;
//# sourceMappingURL=lock-utils.d.ts.map