/** @jsxImportSource @opentui/react */
/**
 * OrchestratorPanel — public API class that bridges the imperative
 * executor interface with the React-based session graph TUI.
 */
import { type CliRenderer } from "@opentui/core";
import type { PanelSession, PanelOptions, SessionData } from "./orchestrator-panel-types.ts";
export declare class OrchestratorPanel {
    private store;
    private renderer;
    private destroyed;
    private terminalBackgroundSynced;
    private diagnostics;
    private unsubscribeDiagnostics;
    private constructor();
    /**
     * Create a new OrchestratorPanel with the default CLI renderer.
     *
     * This is the primary entry point — it initialises the terminal renderer
     * and mounts the React-based session graph TUI.
     */
    static create(options: PanelOptions): Promise<OrchestratorPanel>;
    /** Create with an externally-provided renderer (e.g. a test renderer). */
    static createWithRenderer(renderer: CliRenderer, options: PanelOptions, { syncTerminalBackground }?: {
        syncTerminalBackground?: boolean;
    }): OrchestratorPanel;
    /**
     * Display the workflow overview in the TUI — name, agent, session graph,
     * and the user prompt. Call once after construction before sessions start.
     */
    showWorkflowInfo(name: string, agent: string, sessions: PanelSession[], prompt: string): void;
    /** Mark a session as running in the graph UI. */
    sessionStart(name: string): void;
    /** Mark a session as successfully completed in the graph UI. */
    sessionSuccess(name: string): void;
    /** Mark a session as failed in the graph UI and display the error message. */
    sessionError(name: string, message: string): void;
    sessionAwaitingInput(name: string): void;
    sessionResumed(name: string): void;
    /** Dynamically add a new session node to the graph UI. */
    addSession(name: string, parents: string[]): void;
    /** Increment the background task counter (shown in the statusline footer). */
    backgroundTaskStarted(): void;
    /** Decrement the background task counter (shown in the statusline footer). */
    backgroundTaskFinished(): void;
    /** Show the workflow-complete banner with a link to saved transcripts. */
    showCompletion(workflowName: string, transcriptsPath: string): void;
    /** Display a fatal error banner in the TUI. */
    showFatalError(message: string): void;
    /**
     * Block until the user presses `q` or `Ctrl+C` in the TUI.
     * Call after {@link showCompletion} or {@link showFatalError}.
     */
    waitForExit(): Promise<void>;
    /**
     * Returns a promise that resolves when the user requests a mid-execution quit
     * (via `q` or `Ctrl+C`). Race this against the workflow run.
     */
    waitForAbort(): Promise<void>;
    /** Tear down the terminal renderer and release resources. Idempotent. */
    destroy(): void;
    /**
     * Subscribe to store mutations. Returned function unsubscribes.
     *
     * Used by the orchestrator process to mirror the in-memory panel
     * state to a `status.json` file on disk so out-of-process consumers
     * (e.g. `atomic workflow status`) can read the live workflow state.
     */
    subscribe(fn: () => void): () => void;
    /**
     * Read-only snapshot of the fields needed by the on-disk status
     * writer. Defined here (not in PanelStore) because the store keeps
     * full mutable references; this projection drops the renderer-only
     * promise resolvers and version counter.
     */
    getSnapshot(): {
        workflowName: string;
        agent: string;
        prompt: string;
        fatalError: string | null;
        completionReached: boolean;
        sessions: readonly SessionData[];
    };
    private getDiagnosticSnapshot;
}
//# sourceMappingURL=orchestrator-panel.d.ts.map