import type { AgentBusEvent, LockAcquireResult } from '../types/bus/index.js';
import type { RunId } from '../types/ids/index.js';
import type { Logger } from '../utils/logger.js';
export interface FileLockManagerConfig {
    readonly lockTimeoutMs: number;
    readonly acquireTimeoutMs: number;
    readonly maxLocksPerAgent: number;
}
export declare class FileLockManager {
    private readonly locks;
    private readonly agentLocks;
    private readonly config;
    private readonly log;
    private readonly emit;
    constructor(log: Logger, emit: (event: AgentBusEvent) => void, config?: Partial<FileLockManagerConfig>);
    private generateLockId;
    private getAgentLockSet;
    private tryAcquire;
    acquire(filePath: string, owner: RunId): Promise<LockAcquireResult>;
    release(filePath: string, owner: RunId): boolean;
    releaseAll(owner: RunId): number;
    isLocked(filePath: string): boolean;
    getHolder(filePath: string): RunId | undefined;
    expireStale(): number;
    private expireLock;
}
//# sourceMappingURL=lock.d.ts.map