import { type TerminalStreamFrame } from "../shared/binary-frames/index.js";
import type { TerminalInput, TerminalState } from "../shared/messages.js";
export type TerminalStreamEvent = {
    terminalId: string;
    type: "output";
    data: Uint8Array;
} | {
    terminalId: string;
    type: "snapshot";
    state: TerminalState;
};
export declare class TerminalStreamRouter {
    private readonly terminalSlots;
    private readonly slotTerminals;
    private readonly listeners;
    onEvent(handler: (event: TerminalStreamEvent) => void): () => void;
    setSlot(terminalId: string, slot: number): void;
    removeTerminal(terminalId: string): void;
    clearSlots(): void;
    encodeInput(terminalId: string, message: TerminalInput["message"]): Uint8Array | null;
    handleFrame(frame: TerminalStreamFrame): void;
    private emit;
}
//# sourceMappingURL=terminal-stream-router.d.ts.map