Files
plezy/relay_protocol.json
T
edde746 178634e943 fix(watch-together): authenticate retained room recovery
A transport reconnect could recover the wrong room or retain obsolete host authority.

Authenticate retained membership and recover the relay-authoritative role without falling back to create or join. Release retained membership through authenticated teardown and document the coordinated relay rollout.
2026-09-06 20:21:11 +02:00

59 lines
1.5 KiB
JSON

{
"protocolVersion": 2,
"legacyProtocolVersion": 0,
"clientMessageTypes": {
"create": "create",
"join": "join",
"resume": "resume",
"broadcast": "broadcast",
"sendTo": "sendTo",
"ping": "ping",
"leave": "leave",
"endSession": "endSession",
"transferHost": "transferHost"
},
"serverMessageTypes": {
"created": "created",
"joined": "joined",
"resumed": "resumed",
"peerJoined": "peerJoined",
"peerLeft": "peerLeft",
"message": "message",
"error": "error",
"pong": "pong",
"left": "left",
"ended": "ended",
"hostChanged": "hostChanged",
"hostTransferEligibility": "hostTransferEligibility"
},
"errorCodes": {
"rateLimited": "rate_limited",
"invalidMessage": "invalid_message",
"roomExists": "room_exists",
"roomNotFound": "room_not_found",
"roomFull": "room_full",
"notInRoom": "not_in_room",
"alreadyInRoom": "already_in_room",
"peerIdUnavailable": "peer_id_unavailable",
"protocolMismatch": "protocol_mismatch",
"notHost": "not_host",
"peerNotFound": "peer_not_found",
"hostTransferUnavailable": "host_transfer_unavailable"
},
"features": {
"atomicHostTransfer": "atomicHostTransfer",
"authenticatedResume": "authenticatedResume"
},
"capabilities": {
"hostTransfer": "hostTransfer"
},
"limits": {
"maxRoomSize": 8,
"maxMessageSize": 65536,
"maxSessionIdLength": 64,
"maxPeerIdLength": 128
},
"idPattern": "^[A-Za-z0-9_-]+$",
"reconnectTokenBytes": 32
}