Encode lifecycle events as Server-Sent Events for a browser/HTTP route.
The package ships two helpers: readinessServerSentEvent for one-off
readiness reports, and runtimeStreamServerSentEvent for the streamed
event variant from runAgentTaskStream.
pnpm tsx examples/sse-stream/sse-stream.ts- Encoding a
KnowledgeReadinessReportto SSE in a single call - Encoding a stream of
RuntimeStreamEventto SSE inside anrunAgentTaskStreamloop - Why you should never
JSON.stringifyevents directly — these helpers delegate to the same redaction rules ascreateRuntimeEventCollector