Expand description
Event forwarding from MPSC to broadcast channels.
Creates an MPSC channel for agent loop events and spawns a background task that relays events to the session’s broadcast sender while tracking runner diagnostic state (budget events, tool execution, round progress).
Structs§
- History
Commit Acknowledger - Forwarder-owned half of
HistoryCommitBarrier. - History
Commit Barrier - Completion signal for the durable history barrier emitted at the end of a
run. The runner must not become replaceable until the forwarder has actually
published
SessionHistoryCommitted; merely enqueueing the event leaves a race where a successor can retire this generation first.
Functions§
- create_
event_ forwarder - Create an MPSC channel for agent events and spawn a forwarding task that relays events to the broadcast sender while tracking runner diagnostic fields for live visibility.
- create_
event_ forwarder_ with_ history_ commit_ barrier - Create an event forwarder plus a producer-side durable-history barrier. Runtime paths that finalize and replace runner generations must use this variant so they can await actual barrier publication before finalization.
- create_
event_ forwarder_ with_ root_ actor - The Root adapter passes its immutable capability before any Started frame. Legacy Child/Supervisor/standalone callers keep the existing queue behavior.
- history_
commit_ barrier - Create the acknowledgment pair shared by an event producer and forwarder.
- interrupt_
root_ on_ authority_ loss - Close only the obsolete run’s live transport. This is not a runtime-state publication: it never enters the account journal, replay cache, or storage. The exact local runner guard keeps this fixed error ahead of any successor’s Started frame on the shared session channel. A successor already installed in the registry must not receive the obsolete run’s error or cancellation. Server adapters share this boundary with the generic engine forwarder.
Type Aliases§
- Account
Feed Inbox - Inbox to the account-wide change feed:
(session_id, event)before the writer assigns a seq. Threaded asOptionso engine-internal callers that have no feed (tests, standalone embeddings) can passNone. Defined here so the engine stays free of anybamboo-serverdependency.