Initializes a pipe capture sink.
The surrounding sink that receives stderr. Data remains captured for the next pipe segment, while stderr retains its ordinary unpiped destination.
Returns everything captured on the data channel so far.
The captured bytes (stripped text and raw binary, in write order).
Writes command output (the data channel).
Printable text (ANSI permitted) or raw bytes.
Writes error-stream output (the err channel).
Printable text (ANSI permitted) or raw bytes.
Sends a typed event to the command's origin surface, while the command runs.
The kind names what the data is (games.trek.state); a surface shows
the kinds it knows and drops the rest. Optional: a sink that predates
events, or has nowhere to send one, leaves it out, and a command sends
with sink.event_write?.(kind, data).
What the data is.
The event, shaped by its kind; it must survive JSON.
Writes an ephemeral status line (the status channel).
Transient text; consumers may overwrite or drop it.
Sink that captures the data channel for a pipe or redirect.
Text writes (a command's rendered envelope output) are ANSI-stripped, the documented plain-pipe deviation; binary writes (a raw
catof a DICOM file) are kept byte-for-byte. The err channel passes through to stderr live, since a pipe never carries the error stream. Status and progress are ephemeral.