Wire Protocol
Versioning
What counts as a breaking change, and how versions coexist on one socket.
The wire version is encoded in the channel topic:
| Product | Current | Frozen? |
|---|---|---|
| Chat | chat:v1:app:{appKey}:thread:{threadId} | yes — v1 is locked |
| PubSub | app:{appKey}:room:{channel} | no version segment yet |
| Durable Objects | durable:{appKey}:{type}:{key} | no version segment yet |
| Spaces | app:{appKey}:room:ephemeral-{spaceId} | rides PubSub |
A breaking change bumps the version segment — chat:v2:... — and both
versions run on the same socket. A client on v1 and a client on v2 can be
connected at once; the server serves each its own contract. There is no flag
day.
Breaking (bumps the version)
- Removing or renaming an event or a push
- Removing or renaming a field in a payload
- Changing a field's type
- Changing a sequencing guarantee (e.g. making an atomic
batchnon-atomic) - Changing auth semantics for a join
- Changing the meaning of an existing capability string
Non-breaking (no bump)
- Adding an optional field to an existing event or reply
- Adding a new event type — clients ignore events they don't recognise
- Adding a new push / HTTP endpoint
- Adding a new error
reasonstring - Adding a new capability verb or product
- Tightening validation in a way that only rejects already-malformed input
Capability-token version
Capability tokens carry their own audience, independent of the channel version:
aud: "pingerchips:v3"A token-format change bumps this (pingerchips:v4), and the issuer
(POST /api/auth) can mint the new format while the server still accepts the
old one during a transition. See Authentication.
Deprecations in flight
| Thing | Status | Replacement |
|---|---|---|
ephemeral- / presence- / private- topic prefixes | working, undocumented as the primary model | explicit channel config + capabilities |
presence:state one-shot on join | working | a present / enter / leave event stream (presence redesign) |
SDKs ≤ 2.x ({appKey}:{hmac} auth) | cannot connect — backend cut over | pingerchips-js / -server 3.0.0 |