/**
 * Session Write Locks (OpenClaw-inspired)
 *
 * PID-based file locks with stale detection for session files.
 * Prevents concurrent writes to the same session from multiple processes.
 */
export interface LockInfo {
    pid: number;
    timestamp: number;
    hostname: string;
}
/**
 * Session file lock manager.
 * Uses .lock files alongside session files with PID-based ownership.
 */
export declare class SessionLock {
    private lockPath;
    private acquired;
    constructor(sessionFilePath: string);
    /**
     * Attempt to acquire the lock.
     * Returns true if acquired, false if another live process holds it.
     */
    acquire(): boolean;
    /**
     * Release the lock.
     */
    release(): void;
    /**
     * Check if the lock is currently held (by any process).
     */
    isLocked(): boolean;
    /**
     * Get info about the current lock holder.
     */
    getLockHolder(): LockInfo | null;
}
/**
 * Execute a function with a session lock held.
 * Throws if the lock cannot be acquired.
 */
export declare function withSessionLock<T>(sessionFilePath: string, fn: () => Promise<T>): Promise<T>;
