pub const EVENT_LINE_PREFIX: &'static str;Expand description
Stderr line prefix used to relay events from a workflow subprocess to its
parent API server. The parent reads stderr line-by-line; lines starting
with this prefix are parsed as Event JSON and re-published on the
parent’s event bus instead of being mirrored to terminal stderr.
Why: Workflow phase + agent telemetry must reach the API server even
though the workflow runs in a child process. Reusing the same stderr
channel that already carries __OMPM_PROGRESS__ (the legacy 2s-poll
path) avoids inventing yet another IPC mechanism.
What: Match by exact byte prefix; payload after the space is one JSON
object decodable as Event. Re-exported, not declared — the marker is a
cross-crate wire format, so it has exactly one declaration, in
trusty_agents_common::events, which the harness-understanding assets
document and the session-manager prompt is built from.
Test: events_tests::event_line_prefix_is_stable and
events_tests::sm_harness_doc_documents_the_prefix_tcode_emits.
Stderr line prefix used to relay events from a child process to its parent.
THE one declaration of this wire marker. trusty_code::events and
trusty_agents::events re-export it rather than declaring their own, and
the harness-understanding assets in this crate document this exact value —
so the producer, the parent-side parser, and the session manager’s
instructions cannot drift apart (#5129).
Why: A harness may spawn workflow / agent work in a child process whose
events must still reach the parent’s bus. Reusing stderr as the IPC
channel (the parent already reads child stderr) avoids inventing a new
transport. A stable, unambiguous prefix lets the parent detect relay
lines and re-publish them rather than mirroring them to the terminal.
What: Match by exact byte prefix; the payload after the space is one JSON
object decodable as the emitting crate’s event envelope.
Test: super::tests::event_line_prefix_is_stable,
super::tests::emit_line_has_prefix_and_parses, and
crate::harness_doc::tests::harness_doc_names_the_relay_prefix.