/**
 * Cross-process (and re-entrant same-process) advisory lock for session transcript JSONL.
 * Aligns with the goal of safe concurrent gateway/CLI access; same idea as OpenClaw's
 * session write lock, but scoped to a single transcript path with a smaller surface area.
 */
export type TranscriptFileLock = {
    release: () => Promise<void>;
};
/**
 * Acquire an exclusive lock for mutations to `transcriptAbsPath`.
 * Re-entrant on the same path in the same process (nested `withTranscriptFileLock`).
 */
export declare function acquireTranscriptFileLock(transcriptAbsPath: string, opts?: {
    timeoutMs?: number;
    staleMs?: number;
}): Promise<TranscriptFileLock>;
export declare function withTranscriptFileLock<T>(transcriptAbsPath: string, fn: () => Promise<T>, opts?: {
    timeoutMs?: number;
    staleMs?: number;
}): Promise<T>;
/** Best-effort: remove a stale lock without acquiring (e.g. doctor tooling). */
export declare function tryRemoveStaleTranscriptLock(transcriptAbsPath: string, staleMs?: number): Promise<boolean>;
