TerminalOutputParser

Byte-stream parser contract for terminal host output.

Implementations accept raw bytes from PTY/network/process output, preserve parser state across arbitrary chunk boundaries, and emit semantic terminal operations to a TerminalCommandSink.

Functions

Link copied to clipboard
abstract fun accept(bytes: ByteArray, offset: Int = 0, length: Int = bytes.size)

Feeds a chunk of bytes from the terminal host output stream to the parser.

Link copied to clipboard
abstract fun acceptByte(byteValue: Int)

Feeds a single byte from the terminal host output stream to the parser.

Link copied to clipboard
abstract fun endOfInput()

Signals the end of the input stream.

Link copied to clipboard
abstract fun reset()

Resets the internal parser state, discarding any partially parsed sequences or control signatures.