Expand description
Wave Pub/Sub system: event brokering with scoped subscriptions. Port of Go’s pkg/wps/wps.go + wpstypes.go.
The Broker supports:
- All-scope subscriptions (receive all events of a type)
- Exact-scope subscriptions (e.g., “block:uuid”)
- Star-scope subscriptions (e.g., “block:*”)
- Event persistence (history/replay)
Structs§
- Broker
- The central pub/sub broker for WaveEvents.
- Broker
Inner 🔒 - Broker
Subscription 🔒 - Persist
Event 🔒Wrap - Persist
Key 🔒 - Subscription
Request - WSFile
Event Data - Wave
Event
Constants§
- EVENT_
AGENT_ HEALTH - EVENT_
AGENT_ MESSAGE_ ACCEPTED - Fired by
SubprocessController::spawn_turnwhen a user message is picked up (either direct-spawn or queue drain). Frontend uses this to promote pendingPendingMessageentries into the conversation document. Payload:{ block_id, message_id }. - EVENT_
BLOCK_ CLOSE - EVENT_
BLOCK_ FILE - EVENT_
BLOCK_ STATS - EVENT_
CONFIG - EVENT_
CONN_ CHANGE - EVENT_
CONTROLLER_ STATUS - EVENT_
INSTALL_ PROGRESS - EVENT_
ROUTE_ GONE - EVENT_
SYS_ INFO - EVENT_
USER_ INPUT - EVENT_
WAVE_ OBJ_ UPDATE - FILE_
OP_ APPEND - FILE_
OP_ CREATE - FILE_
OP_ DELETE - FILE_
OP_ INVALIDATE - FILE_
OP_ TRUNCATE - MAX_
PERSIST 🔒 - REMAKE_
ARR_ 🔒THRESHOLD
Traits§
- WpsClient
- Trait for event delivery to connected clients.
Functions§
- add_
to_ 🔒scope_ map - add_
unique 🔒 - is_zero 🔒
- publish_
install_ progress - Publish a single install-progress line to the frontend for a given block.
The frontend subscribes to
install_progressevents scoped toblock:{block_id}and displays each message as a log line in the agent presentation view. - remove_
from_ 🔒all_ scopes - scope_
has_ 🔒star - star_
match 🔒 - Simple star matching: each segment separated by
sepis compared. “*” matches any single segment, “**” matches any remaining segments.
Type Aliases§
- Replay
Key 🔒 - Tracks
(route_id, event_name, scope)tuples whose persisted history has already been replayed to a given route. Skipping replay on resubscribe prevents the frontend’seventsubflushes (sent on every listener add/remove against the sharedws-mainroute) from re-emitting completed bash logs on every pane mount or tab switch. Codex P2 on PR #817.