import type { ThreadId, ThreadWorkspaceStats } from "@best-agent/protocol";
export interface WorkspaceMutationPromotion {
    invalidatedThreadIds: ThreadId[];
    revision: number;
}
export interface WorkspaceStaleViewErrorMetadata {
    currentRevision: number;
    path: string;
    reason: string;
    seenRevision?: number;
}
export declare class WorkspaceState {
    #private;
    recordRead(threadId: ThreadId, path: string): void;
    assertMutationAllowed(threadId: ThreadId, path: string): void;
    promoteWrite(threadId: ThreadId, path: string): WorkspaceMutationPromotion;
    withWriteLocks<T>(paths: string[], action: () => Promise<T>): Promise<T>;
    getDiagnostics(threadId: ThreadId): ThreadWorkspaceStats;
}
export declare function getWorkspaceStaleViewErrorMetadata(error: unknown): WorkspaceStaleViewErrorMetadata | undefined;
//# sourceMappingURL=workspace-state.d.ts.map