export interface TuiSize {
    cols: number;
    rows: number;
}
export type ChatRole = 'user' | 'assistant' | 'system' | 'tool' | 'error';
export interface ChatEntry {
    role: ChatRole;
    text: string;
    timestamp?: string;
}
export interface ActiveSubagentSummary {
    id: string;
    name: string;
    durationMs: number;
}
/**
 * Wrap `text` to `width` columns using a simple greedy word-wrap that
 * preserves explicit newlines. Pure: no terminal control characters.
 */
export declare function wrapText(text: string, width: number): string[];
/**
 * Format a single chat entry into terminal-ready lines. The first line is
 * decorated with the role prefix; continuation lines are indented to align.
 */
export declare function formatChatEntry(entry: ChatEntry, width: number, useColor: boolean): string[];
/**
 * Render the active sub-agents bar shown above the input. Returns the
 * empty string when no sub-agents are running so the bar disappears.
 */
export declare function formatActiveSubagentsBar(active: ActiveSubagentSummary[], useColor: boolean): string;
/**
 * Render the status line drawn at the bottom of the screen. Surfaces
 * connection state and any transient hint set by the client.
 */
export declare function formatStatusLine(input: {
    connected: boolean;
    model: string;
    hint?: string;
}, useColor: boolean): string;
/** Strip ANSI escape sequences. Useful for measuring rendered width. */
export declare function stripAnsi(text: string): string;
/**
 * Parse one Server-Sent-Events buffer chunk into JSON event payloads.
 * Returns an array of parsed events plus the unconsumed remainder so the
 * caller can stitch streaming reads together.
 */
export interface SseParseResult {
    events: Array<{
        raw: string;
        payload: unknown;
    }>;
    remainder: string;
}
export declare function parseSseChunk(buffer: string): SseParseResult;
//# sourceMappingURL=render.d.ts.map