aimdb-ws-protocol
Shared wire protocol types for the AimDB WebSocket connector ecosystem.
Used by:
aimdb-websocket-connector— the server side (Axum/Tokio)aimdb-wasm-adapter— the browser client (WsBridge)
Wire Protocol
All messages are JSON-encoded with a "type" discriminant tag:
Server → Client ([ServerMessage])
data— live record push with timestampsnapshot— late-join current valuesubscribed— subscription acknowledgementerror— per-operation errorpong— response to client pingquery_result— response to a client query request
Client → Server ([ClientMessage])
subscribe— subscribe to one or more topics (supports MQTT wildcards)unsubscribe— cancel subscriptionswrite— inbound value for alink_from("ws://…")recordping— keepalive pingquery— query historical / persisted records
Topic Matching
[topic_matches] implements MQTT-style wildcard matching (# for
multi-level, * for single-level).