pub fn emit_stream_record<T: Serialize>(value: &T) -> Result<(), AppError>Expand description
Writes one record of a stream, with the per-record knobs applied.
GAP-SG-215. Deliberately does NOT go through super::envelope::render: that
path exists to shape and annotate ONE complete envelope, and reaching it once
per line is the defect this replaces. A record line leaves here carrying the
record and nothing else.
The command must have called crate::agent_surface::stream::open first, so
that an unusable knob has already been refused. Emitting without opening
shapes nothing rather than misbehaving, and tests/stream_contract_gate.rs
is what keeps that from being a quiet way to lose the surface.
§Errors
Returns Err when serialization fails or on a non-BrokenPipe I/O error.