Library terminal output

Contract

TerminalOutputView renders ordered output chunks with required text, optional stream, and optional numeric sequence. Output text is escaped. Missing output stream defaults to stdout. Supported streams are stdout, stderr, stdin, and system; unknown streams fail validation before render.

Chunks render in array order. When Sequence is present, every chunk in the slice must have a unique monotonic integer sequence and the slice must already be sorted by it; the component validates order but does not reorder. The component caller owns chunk ordering, truncation, redaction, and retention through ordinary Go state and callbacks in the UI runtime contract.

Consequence

Terminal output rendering stays deterministic and safe.