Expand description
NOI-5b agent-observability transcript subscription serving.
NOI-5b transcript subscription: namespace-gated durable-tail + live-splice
forward loop for one (workflow, run, activity, attempt) agent transcript.
This is the agent-observability counterpart to [super::cluster_stream]’s
forward loop, and a NEW ARM on the existing single subscription frame of
/events/stream (the socket stays one-subscription-per-socket; there is no
multiplexing layer). A client that wants both a workflow stream and a
transcript opens two /events/stream sockets.
§Authorization: namespace-scoped (like the per-workflow event stream)
A transcript belongs to the workflow the activity runs under, so it is
authorized exactly like the per-workflow event subscription: the caller must
hold a grant for the transcript’s namespace AND the target workflow_id
must be visible in it. The gate reuses the SAME
NamespaceGuard::scope +
SubscriptionScope::PerWorkflow path
the workflow stream uses, so a caller probing a foreign or nonexistent
workflow receives the guard’s anti-leak not_found, never a transcript.
§Splice contract (gap-free, no duplicate)
Mirrors the workflow resume path: attach the live broadcast BEFORE reading the
durable O tail (subscribe-then-replay), so an event that races the priming
read is retained by the receiver and applied after it, deduped on store_seq.
Ephemeral token deltas (store_seq: None) are forwarded live and never
replayed.
Functions§
- serve_
transcript_ socket - Serve a transcript subscription on an already-upgraded socket.