@tikoci/centrs
    Preparing search index...

    Interface TerminalIo

    The stdio/terminal seam terminal drives, injectable so the relay is testable without a real TTY. The CLI wires process.*; a test can pass scripted streams.

    interface TerminalIo {
        isInteractive: boolean;
        cleanup(): void;
        onResize?(listener: () => void): void;
        readInput(onChunk: (bytes: Uint8Array) => void, onEnd: () => void): void;
        size(): { cols: number; rows: number };
        writeOutput(bytes: Uint8Array): void;
    }
    Index

    Properties

    isInteractive: boolean

    True when both stdin and stdout are TTYs (raw-mode interactive relay).

    Methods

    • Restore terminal state (raw mode off, listeners removed).

      Returns void

    • Register a window-resize listener (interactive only).

      Parameters

      • listener: () => void

      Returns void

    • Start reading input; onChunk per chunk, onEnd once at EOF.

      Parameters

      • onChunk: (bytes: Uint8Array) => void
      • onEnd: () => void

      Returns void

    • Current terminal size reported to the device.

      Returns { cols: number; rows: number }

    • Write raw device output bytes to the user's terminal.

      Parameters

      • bytes: Uint8Array

      Returns void