/**
 * Lightweight filesystem lock for preventing concurrent mutations
 * to .totem/lessons/ and .lancedb/ directories.
 *
 * Uses a lockfile with PID + timestamp. Stale locks (>30s) are
 * automatically cleaned up to handle crashed processes.
 */
/**
 * Attempt to acquire the sync lock.
 * Returns a release function on success, or throws after retries are exhausted.
 */
export declare function acquireLock(totemDir: string, onWarn?: (msg: string) => void): Promise<() => void>;
/**
 * Execute a function while holding the sync lock.
 * Automatically releases the lock when done (even on error).
 */
export declare function withLock<T>(totemDir: string, fn: () => Promise<T>, onWarn?: (msg: string) => void): Promise<T>;
//# sourceMappingURL=lock.d.ts.map