Skip to content

Wire frames

The frame types super-line puts on the client↔server wire, each tagged by a short t. You never write these by hand — the transport carries them and the client/server SDKs encode and decode them — but they're useful when reading a Control Center live feed or debugging a custom transport.

Client → server

tFrameCarries
reqrequesta request call + correlation id
subsubscribeopt into a topic
unsubunsubscribedrop a topic subscription
sresserver-request responsethe client's reply to a server-request
serrserver-request errorthe client's error reply to a server-request
pingkeepaliveliveness probe
csubcollection subscribeopen a row-set for a query
cunscollection unsubscribeclose a row-set
cbatcollection batchan atomic row write batch
cdopenCRDT openopen a document by id
cdwrCRDT writea document delta
cdcloseCRDT closeclose a document handle

Server → client

tFrameCarries
resresponsea request's typed reply
errerrora request's SuperLineError
evteventa pushed event
envenv pushthe connection's current env, full-value replace; seeded at connect, re-sent on every setEnv
pubpublisha topic publish to subscribers
sreqserver-requestthe server calling the client, awaiting a reply
pongkeepalivereply to ping
cchgcollection changea row insert / update / delete for a subscribed row-set
cdchgCRDT changea merged document delta
cddelCRDT deletea document was deleted

Frame shapes are defined in @super-line/core (packages/core/src/wire.ts) and exported as PROTOCOL. See the API reference for the exact payloads.

Released under the MIT License.