import { EventEmitter } from 'events';
import type { CursorState, CursorWindow, PendingQuestionnaire, WindowSnapshot } from './types.js';
type StatePatch = Omit<Partial<CursorState>, 'pendingQuestionnaire'> & {
    pendingQuestionnaire?: PendingQuestionnaire | null;
};
export declare class StateManager extends EventEmitter {
    private state;
    private debounceMs;
    private debounceTimer;
    private pendingPatch;
    constructor(debounceMs: number);
    getState(): CursorState;
    onExtraction(partial: Partial<CursorState> | null, error?: string): void;
    onConnectionChanged(connected: boolean): void;
    updateWindows(windows: CursorWindow[], activeWindowId: string): void;
    updateWindowSnapshots(snapshots: WindowSnapshot[]): void;
    private queuePatch;
    /** Immediate patch (e.g. after stop_agent) — skips debounce wait. */
    patchNow(patch: StatePatch): void;
    private flush;
    emitFull(): void;
}
export {};
