import { EventEmitter } from "node:events";
import type http from "node:http";
import type { ChannelAdapter, CommandMessage, MessageAttachment, ReplyContext } from "./interface.js";
export interface TuiEvent {
    type: "reply" | "status" | "error" | "ack";
    timestamp: string;
    message?: string;
    attachments?: MessageAttachment[];
    commandId?: string;
    commandState?: "queued" | "running" | "completed" | "failed";
}
/**
 * TUI channel adapter for local terminal UI communication.
 *
 * Unlike Telegram/Gmail adapters that listen on external APIs, the TUI adapter
 * is purely in-process: inbound messages arrive via the TUI HTTP server
 * (POST /tui/send), and outbound replies are pushed to the SSE client
 * associated with the target sender ID.
 */
export declare class TuiAdapter extends EventEmitter implements ChannelAdapter {
    readonly name = "tui";
    private sseClients;
    private eventBuffers;
    private readonly maxBufferSize;
    start(): Promise<void>;
    stop(): Promise<void>;
    sendMessage(to: string, message: string, attachments?: MessageAttachment[], _replyTo?: ReplyContext): Promise<void>;
    addSseClient(res: http.ServerResponse, senderId: string): void;
    get connectedClients(): number;
    pushEvent(event: TuiEvent, senderId?: string): void;
    injectMessage(msg: CommandMessage): void;
}
//# sourceMappingURL=tui.d.ts.map