Expand description
Event bus: WebSocket event dispatching to connected clients. Port of Go’s pkg/eventbus/eventbus.go.
Structs§
- Event
Bus - Global event bus for dispatching WebSocket events to connected clients.
- Event
BusBridge - Bridge from MPS Broker to EventBus. Wraps MuxEvents as RPC eventrecv messages and broadcasts them to all WS clients.
- WSEvent
Type - Window
Watch 🔒Data - WsReceivers
- The pair of receivers handed to a WebSocket connection on registration.
Terminal echo + interactive events arrive on
priority; perf telemetry onbackground.
Enums§
- Lane
- Egress priority lane for a server→client event.
Constants§
- BACKGROUND_
LANE_ 🔒CAPACITY - Background carries droppable perf telemetry (sysinfo ~1/s, per-block stats) already coalesced-to-latest by the receive loop — a healthy consumer never queues more than a couple of entries.
- PRIORITY_
LANE_ 🔒CAPACITY - Egress channel capacities. Bounded (not unbounded) so a stalled/hidden- renderer WS consumer can’t grow sidecar commit without limit — a healthy connection drains far below these depths; hitting the cap is itself the signal that the consumer isn’t keeping up. See docs/specs/SPEC_MEMORY_COMMIT_ATTRIBUTION_CORRECTION_2026_07_02.md §B.2.
- WS_
EVENT_ MUX_ OBJ_ BATCHED_ UPDATES - One WS frame carrying an ARRAY of
MuxObjUpdates from a single atomic backend transition. Mirrored infrontend/app/store/mps-events.ts(WpsEvent.MuxObjBatchedUpdates) — the frontend applies the whole array in one Solidbatch()flush. Seebroadcast_mux_obj_updatesbelow. - WS_
EVENT_ RPC
Functions§
- rpc_
eventrecv_ 🔒value - The
rpc/eventrecvWS envelope forevent, built with a single serialization of the payload. SeeEventBusBridge::send_event.