Documentation
¶
Overview ¶
Package ansi strips terminal escape sequences from captured agent output.
It is its own package because both the process runner (stripping collected stdout) and the transcript recorder (stripping a decoded stream event's text) need it, and the recorder runs in packages that must not depend on the runner's process-execution and telemetry machinery.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Strip ¶
Strip removes ANSI terminal escape sequences from b: CSI sequences (colors and cursor movement, "\x1b[31m"), OSC sequences (window titles and hyperlinks, terminated by BEL or ST), and the remaining ESC-prefixed forms (charset designations, "\x1b(B"). It covers what agent CLIs and the tools they shell out to actually emit; it is not a full terminal emulator.
Callers stripping JSON stream output must strip the DECODED text of an event, not the raw line: there a tool's escapes sit backslash-u escaped inside a JSON string, where this is a no-op.
Types ¶
This section is empty.