Module wps

Module wps 

Source
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.
BrokerInner 🔒
BrokerSubscription 🔒
PersistEventWrap 🔒
PersistKey 🔒
SubscriptionRequest
WSFileEventData
WaveEvent

Constants§

EVENT_AGENT_HEALTH
EVENT_AGENT_MESSAGE_ACCEPTED
Fired by SubprocessController::spawn_turn when a user message is picked up (either direct-spawn or queue drain). Frontend uses this to promote pending PendingMessage entries 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_progress events scoped to block:{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 sep is compared. “*” matches any single segment, “**” matches any remaining segments.

Type Aliases§

ReplayKey 🔒
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’s eventsub flushes (sent on every listener add/remove against the shared ws-main route) from re-emitting completed bash logs on every pane mount or tab switch. Codex P2 on PR #817.