import type { Component } from "@earendil-works/pi-tui";
import type { CustomMessage } from "../../core/messages.ts";
import type { ToolExecutionComponent } from "../interactive/components/tool-execution.ts";
import type { IsolatedInteractiveRuntime } from "./isolated-runtime.ts";
import type { InteractiveEngineCommand } from "./protocol.ts";
type RenderableToolResult = Parameters<ToolExecutionComponent["updateResult"]>[0];
declare abstract class RemoteRenderer implements Component {
    protected readonly componentId: string;
    private lines;
    private width;
    private requestId;
    private appliedRequestId;
    private dirty;
    private disposed;
    private readonly frameClamp;
    private readonly unsubscribe;
    protected readonly runtime: IsolatedInteractiveRuntime;
    private readonly requestRender;
    constructor(runtime: IsolatedInteractiveRuntime, requestRender: () => void);
    render(width: number): string[];
    invalidate(): void;
    dispose(): void;
    protected changed(): void;
    protected abstract command(requestId: number, width: number): InteractiveEngineCommand;
    private markDirty;
}
export declare class RemoteToolExecutionComponent extends RemoteRenderer {
    private readonly toolName;
    private readonly toolCallId;
    private args;
    private result;
    private executionStarted;
    private argsComplete;
    private isPartial;
    private expanded;
    private showImages;
    private imageWidthCells;
    constructor(toolName: string, toolCallId: string, args: unknown, options: {
        showImages?: boolean;
        imageWidthCells?: number;
    }, runtime: IsolatedInteractiveRuntime, requestRender: () => void);
    updateArgs(args: unknown): void;
    markExecutionStarted(): void;
    setArgsComplete(): void;
    updateResult(result: RenderableToolResult, isPartial?: boolean): void;
    setExpanded(expanded: boolean): void;
    setShowImages(show: boolean): void;
    setImageWidthCells(width: number): void;
    protected command(requestId: number, width: number): InteractiveEngineCommand;
}
export declare class RemoteCustomMessageComponent extends RemoteRenderer {
    private readonly message;
    private expanded;
    constructor(message: CustomMessage<unknown>, runtime: IsolatedInteractiveRuntime, requestRender: () => void);
    setExpanded(expanded: boolean): void;
    protected command(requestId: number, width: number): InteractiveEngineCommand;
}
export {};
//# sourceMappingURL=remote-renderer.d.ts.map