import type { SessionData, PanelSession, ViewMode } from "./orchestrator-panel-types.ts";
type Listener = () => void;
export declare class PanelStore {
    version: number;
    workflowName: string;
    agent: string;
    prompt: string;
    sessions: SessionData[];
    completionInfo: {
        workflowName: string;
        transcriptsPath: string;
    } | null;
    fatalError: string | null;
    completionReached: boolean;
    exitResolve: (() => void) | null;
    abortResolve: (() => void) | null;
    /** Number of background tasks/headless stages currently running. */
    backgroundTaskCount: number;
    /** Current view mode — graph overview or attached to a specific agent. */
    viewMode: ViewMode;
    /** ID of the agent currently attached to (only meaningful when viewMode === "attached"). */
    activeAgentId: string;
    private listeners;
    subscribe: (fn: Listener) => (() => void);
    private emit;
    setWorkflowInfo(name: string, agent: string, sessions: PanelSession[], prompt: string): void;
    startSession(name: string): void;
    completeSession(name: string): void;
    failSession(name: string, error: string): void;
    awaitingInput(name: string): void;
    resumeSession(name: string): void;
    addSession(session: SessionData): void;
    setCompletion(workflowName: string, transcriptsPath: string): void;
    setFatalError(message: string): void;
    incrementBackgroundTasks(): void;
    decrementBackgroundTasks(): void;
    /**
     * Switch between graph and attached view modes.
     * When switching to "attached", provide the agent ID to attach to.
     * Switching to "graph" clears the active agent.
     */
    setViewMode(mode: ViewMode, agentId?: string): void;
    /** Safely invoke exitResolve at most once, guarding against rapid repeated calls. */
    resolveExit(): void;
    /** Safely invoke abortResolve at most once to signal mid-execution quit. */
    resolveAbort(): void;
    /** Quit the workflow — routes to the correct handler based on current phase. */
    requestQuit(): void;
    markCompletionReached(): void;
}
export {};
//# sourceMappingURL=orchestrator-panel-store.d.ts.map