import type { AgentTUIInputQuestion, AgentTUIInputQuestionResponse, AgentTUISessionOptions, AgentTUIStreamResult, AgentTUIToolApprovalRequest, AgentTUIToolApprovalResponse, ConnectionAuthUpdate, SubagentStepUpdate, SubagentToolUpdate } from "./runner.js";
import type { AssistantResponseStatsMode, LogDisplayMode, TerminalPartDisplayMode } from "./types.js";
import type { AgentInfoResult } from "#client/index.js";
export type TerminalInput = {
    isTTY?: boolean;
    on(event: "data", listener: (chunk: Buffer) => void): TerminalInput;
    off(event: "data", listener: (chunk: Buffer) => void): TerminalInput;
    resume(): TerminalInput;
    pause(): TerminalInput;
    setRawMode?: (mode: boolean) => TerminalInput;
};
export type TerminalOutput = {
    columns?: number;
    rows?: number;
    write(chunk: string | Uint8Array, encodingOrCallback?: BufferEncoding | ((error?: Error | null) => void), callback?: (error?: Error | null) => void): boolean;
    on(event: "resize", listener: () => void): TerminalOutput;
    off(event: "resize", listener: () => void): TerminalOutput;
};
export type TerminalRendererOptions = {
    input?: TerminalInput;
    output?: TerminalOutput;
    tools?: TerminalPartDisplayMode;
    reasoning?: TerminalPartDisplayMode;
    subagents?: TerminalPartDisplayMode;
    connectionAuth?: TerminalPartDisplayMode;
    assistantResponseStats?: AssistantResponseStatsMode;
    contextSize?: number;
    captureForeignOutput?: boolean;
    logs?: LogDisplayMode;
    color?: boolean;
    unicode?: boolean;
};
export type AgentHeaderOptions = {
    name: string;
    serverUrl: string;
    info?: AgentInfoResult;
};
export declare class TerminalRenderer {
    #private;
    constructor(options?: TerminalRendererOptions);
    /**
     * Commits the startup agent header (brand mark + resolved configuration) to
     * scrollback before the first prompt. Later calls replace the committed
     * header and replay the transcript beneath it so dev HMR can refresh fields
     * such as the resolved model.
     */
    renderAgentHeader(options: AgentHeaderOptions): void;
    readPrompt(options?: AgentTUISessionOptions): Promise<string>;
    renderStream(result: AgentTUIStreamResult, options?: AgentTUISessionOptions): Promise<void>;
    readToolApproval(request: AgentTUIToolApprovalRequest, options?: AgentTUISessionOptions): Promise<AgentTUIToolApprovalResponse>;
    readInputQuestion(question: AgentTUIInputQuestion, options?: AgentTUISessionOptions): Promise<AgentTUIInputQuestionResponse | undefined>;
    upsertSubagentStep(update: SubagentStepUpdate): void;
    upsertSubagentTool(update: SubagentToolUpdate): void;
    markChildToolCallId(callId: string): void;
    upsertConnectionAuth(update: ConnectionAuthUpdate): void;
    setConnectionAuthPendingCount(count: number): void;
    reset(): void;
    /**
     * Commits a single dim informational line to the transcript (e.g. the
     * session-recovery notice after a terminal server failure). No-op when the
     * text is blank.
     */
    renderNotice(text: string): void;
    shutdown(): void;
}
