import type { RemoteInteractiveActions } from "../interactive/remote-interactive-actions.js";
import type { RemoteInteractiveCapabilities } from "../interactive/remote-interactive-capabilities.js";
import type { RemoteInteractiveSessionView, RemoteInteractiveView } from "../interactive/remote-interactive-view.js";
declare module "@sheason/pi-tui" {
    interface Keybindings {
        "app.connection.retry": true;
    }
}
type PeerItem = NonNullable<RemoteInteractiveSessionView["items"]>[number];
type PeerMessage = Extract<PeerItem, {
    type: "message";
}>["message"];
type AssistantPeerMessage = Extract<PeerMessage, {
    role: "assistant";
}>;
type LiveAssistantPeerMessage = NonNullable<NonNullable<RemoteInteractiveView["live"]>["streamingMessage"]>;
type RenderedAssistantMessage = AssistantPeerMessage | LiveAssistantPeerMessage;
type IncrementalAssistantMessageComponent = {
    updateContent(message: RenderedAssistantMessage): void;
    tryUpdateContentIncrementally?(message: RenderedAssistantMessage): boolean;
};
type SelectorKind = "model" | "agent-list" | "settings" | "source-list" | "source-detail" | "mcp-list" | "mcp-detail" | "skill-list" | "skill-detail";
export interface ForkedInteractiveModeOptions {
    themeName?: string;
}
export interface ForkedInteractiveModeDeps {
    peerId: string;
    cwd: string;
    getView(): RemoteInteractiveView;
    actions: RemoteInteractiveActions;
    capabilities: RemoteInteractiveCapabilities;
    getDraft(): string;
    setDraft(draft: string): void;
    subscribe(listener: () => void): () => void;
}
export declare class ForkedInteractiveMode {
    private readonly deps;
    private readonly ui;
    private readonly root;
    private readonly headerContainer;
    private readonly chatContainer;
    private readonly pendingMessagesContainer;
    private readonly statusContainer;
    private readonly editorContainer;
    private readonly footer;
    private readonly dPiRow;
    private readonly keybindings;
    private readonly editor;
    private readonly markdownTheme;
    private statusLoader;
    private statusLoaderMessage;
    private workingStatusTimer;
    private workingStatusTimerStartedAt;
    private scheduledRender;
    private activeSelector;
    activeSelectorKind: SelectorKind | undefined;
    private unsubscribers;
    private signalCleanupHandlers;
    private shutdownResolver;
    private isShuttingDown;
    private lastClearActionTime;
    private currentSourceStatuses;
    private currentMcpServers;
    private currentMcpConfigError;
    private currentSkills;
    private currentSkillDiagnostics;
    private readonly userMessageComponents;
    private readonly assistantMessageComponents;
    private readonly toolExecutionComponents;
    private readonly pendingMessageComponents;
    private lastRenderedSignatures;
    private liveAssistantComponent;
    private extensionRunner;
    private builtInHeader;
    private toolOutputExpanded;
    private hideThinkingBlock;
    private pendingImages;
    constructor(deps: ForkedInteractiveModeDeps, options?: ForkedInteractiveModeOptions);
    private initExtensionRunner;
    private installPeerKeybindings;
    run(): Promise<number>;
    stop(): Promise<void>;
    private buildLayout;
    private installEditorHandlers;
    private handleEscape;
    private subscribeToState;
    private shouldRenderLiveStateImmediately;
    private tryRenderLiveStateIncrementally;
    private computeRenderDirtyFlags;
    private canRenderDirtyStateDirectly;
    private renderDirtyState;
    private scheduleRenderFromState;
    private renderSubscribedState;
    private cancelScheduledRender;
    private renderFromState;
    private updateActiveSelectorFromView;
    private renderHeader;
    private renderMessages;
    private renderMetricsLines;
    private renderAssistantMessage;
    private renderUserMessage;
    private updateSnapshotAssistantComponent;
    private updateLiveAssistantComponent;
    private updateToolExecutionComponent;
    private pruneCachedMessageComponents;
    private renderLiveToolExecutions;
    private queueInput;
    private requireQueueWrite;
    private requireQueueFlush;
    private shutdown;
    private registerSignalHandlers;
    private unregisterSignalHandlers;
    private handleParsedCommand;
    private showSessionSummary;
    private showGroupSummary;
    private toggleToolOutputExpansion;
    private setToolsExpanded;
    private cycleThinkingLevel;
    private cycleModel;
    private toggleThinkingBlockVisibility;
    private handleClipboardImagePaste;
    private appendInfoMessage;
    private appendWarningMessage;
    private appendCommandWarning;
    private renderPendingMessages;
    private renderQueueArea;
    private restoreEditor;
    private showSelector;
    private closeSelector;
    private openModelSelector;
    private openAgentSelector;
    private resolveAgentSelectionConstraint;
    private isEveryAgentBlocked;
    private switchAgent;
    private findModelResource;
    private openSettingsSelector;
    private openSourceSelector;
    private openSourceListSelector;
    private openSourceDetailSelector;
    private openMcpSelector;
    private openSkillSelector;
    private openSkillListSelector;
    private openSkillDetailSelector;
    private openMcpListSelector;
    private openMcpDetailSelector;
    private handleMcpDetailAction;
    private handleSourceDetailAction;
    private handleClearAction;
    private handleDequeue;
    private renderStatusArea;
    private createWorkingStatusMessage;
    private startWorkingStatusTimer;
    private updateWorkingStatusMessage;
    private setStatusLoaderMessage;
    private stopWorkingStatusTimer;
    private createAutocompleteProvider;
    private createSlashCommands;
}
export declare function updateAssistantComponentContent(component: IncrementalAssistantMessageComponent, message: RenderedAssistantMessage): void;
export {};
//# sourceMappingURL=interactive-mode.d.ts.map