@helix3/helix-sdk 0.1.1-helix3.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAyBL,cAAc,EACd,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,aAAa,EAAqC,MAAM,UAAU,CAAC;AA2B5E,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG5D,qGAAqG;AACrG,uGAAuG;AACvG,6GAA6G;AAC7G,cAAc,wBAAwB,CAAC;AAEvC,sDAAsD;AACtD,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAiB;IACjD,SAAS;IACT,SAAS;IACT,cAAc;CACf,CAAC,CAAC;AA+BH,MAAM,eAAe,GAAG,IAAI,CAAC,CAAC,oJAAoJ;AAClL,MAAM,cAAc,GAAG,GAAG,CAAC,CAAC,4FAA4F;AACxH,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AACvC,MAAM,aAAa,GAAG,GAAG,CAAC,CAAC,iFAAiF;AAC5G,gFAAgF;AAChF,+CAA+C;AAC/C,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,CAAC;AACrC,gFAAgF;AAChF,+DAA+D;AAC/D,MAAM,iBAAiB,GAAG,EAAE,GAAG,IAAI,CAAC;AAEpC,MAAM,QAAQ;IACJ,WAAW,GAAkB,IAAI,CAAC;IAClC,OAAO,GAAwB,IAAI,CAAC;IACpC,KAAK,GAA6B,IAAI,CAAC;IACvC,WAAW,GAAG,KAAK,CAAC;IACpB,SAAS,GAAG,IAAI,GAAG,EAAgB,CAAC;IACpC,YAAY,GAAG,KAAK,CAAC;IACrB,SAAS,GAAoB,EAAE,CAAC;IA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AAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;AACH,CAAC;AAED,qFAAqF;AACrF,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,42 @@
1
+ export declare const ROOM_CREDENTIAL_AUDIENCE: "helix-instant-room";
2
+ /**
3
+ * Claims the backend signs (HS384) and the room verifies. Mirrors the world_session claim shape
4
+ * (sub/displayName/worldId/scopes/jti) plus the immutable buildId the room loads its config from.
5
+ */
6
+ export interface RoomCredentialClaims {
7
+ /** Player/user id. */
8
+ sub: string;
9
+ /** Sanitized display name for nameplates. */
10
+ displayName: string;
11
+ /**
12
+ * CDN URL of the user's equipped universal avatar, absent/null when they have none. The backend
13
+ * only mints it when the avatar's web asset is stamped `skeleton: 'helix-humanoid'` AND has a
14
+ * usable glbUrl — so a present claim is loadable by definition. The room copies it into
15
+ * `PlayerState.avatarUrl` (the ONLY identity-derived claim replicated besides displayName; `sub`
16
+ * never is). (v17)
17
+ */
18
+ avatarUrl?: string | null;
19
+ /** World the room belongs to. */
20
+ worldId: string;
21
+ /** Immutable build the room loads its declarative config (allowed messages, room-var shape) from. */
22
+ buildId: string;
23
+ /** Scopes from manifest.permissions; must include 'multiplayer' to join a room. */
24
+ scopes: string[];
25
+ /** Manifest maxPlayers (authoritative) → the room's maxClients cap, so it auto-locks + spills when full. */
26
+ maxPlayers: number;
27
+ /** Monotonic per-world build counter (1, 2, 3 …) of the active build — telemetry + config cache key. */
28
+ buildNumber: number;
29
+ /**
30
+ * Signed URL of this build's `multiplayer.json` — the validated declarative config baked into the
31
+ * published bundle. Derived server-side from the build, NEVER client-supplied, so the room fetches its
32
+ * config from an authentic, immutable location and caches the parsed result by buildId. The room
33
+ * tolerates its absence (older credentials / a build with no declared config) by running the fixed schema.
34
+ */
35
+ configUrl: string;
36
+ /** Always ROOM_CREDENTIAL_AUDIENCE. */
37
+ aud: typeof ROOM_CREDENTIAL_AUDIENCE;
38
+ iss: string;
39
+ exp: number;
40
+ iat: number;
41
+ jti: string;
42
+ }
@@ -0,0 +1,5 @@
1
+ // Room credential — the short-lived JWT the backend mints (createRoomSession) and the Colyseus room
2
+ // verifies in onAuth with a shared HMAC secret (ROOM_JWT_SECRET, Option C). Distinct audience from the
3
+ // world_session token (aud 'helix-instant-world') so a world token can't be replayed to join a room.
4
+ export const ROOM_CREDENTIAL_AUDIENCE = 'helix-instant-room';
5
+ //# sourceMappingURL=credential.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential.js","sourceRoot":"","sources":["../../src/multiplayer-contract/credential.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,uGAAuG;AACvG,qGAAqG;AAErG,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAA6B,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Wire format version. Bump on any incompatible change to PlayerReplicaState, the message table, the
3
+ * credential claims, or the realized declared-state shape (roomVars / per-player vars / entities).
4
+ *
5
+ * The SDK sends this in its join options; the room compares it in onAuth and LOGS a mismatch (P1.C2) — it
6
+ * does NOT reject. The SDK is frozen into each published bundle, so a newer room must keep admitting older
7
+ * builds; rejecting on mismatch would brick every published world on a bump. The detection is for
8
+ * cross-version diagnostics, and contract changes are kept additive/forward so older clients still play.
9
+ */
10
+ export declare const CONTRACT_VERSION: 17;
11
+ export * from './state';
12
+ export * from './room';
13
+ export * from './messages';
14
+ export * from './credential';
@@ -0,0 +1,30 @@
1
+ // @hypersoniclabs/helix-sdk/multiplayer-contract — the multiplayer wire contract.
2
+ //
3
+ // The single source of truth for the data shapes three independently-built pieces must agree on:
4
+ // • the Colyseus room (@colyseus/schema state + message dispatch + runtime validation),
5
+ // • this SDK's Helix.multiplayer client (send path + room.state),
6
+ // • the engine's NetworkDriver adapter (consumes the replicated params → blackboard).
7
+ // Plus the backend (mints RoomCredentialClaims) and the room (verifies them).
8
+ //
9
+ // Pure types + constants, ZERO runtime deps — so the standalone three.js engine adapter can import
10
+ // the types at zero runtime cost. Runtime message validation lives in the room (the only place
11
+ // untrusted inbound messages arrive), not here.
12
+ //
13
+ // The state has two layers (see room.ts): players are FIXED (the engine character contract); roomVars,
14
+ // per-player vars, and entities are DECLARED per-world — that's how an agent syncs custom game state
15
+ // without writing server code. The generic 'action' message (messages.ts) is the channel for it.
16
+ /**
17
+ * Wire format version. Bump on any incompatible change to PlayerReplicaState, the message table, the
18
+ * credential claims, or the realized declared-state shape (roomVars / per-player vars / entities).
19
+ *
20
+ * The SDK sends this in its join options; the room compares it in onAuth and LOGS a mismatch (P1.C2) — it
21
+ * does NOT reject. The SDK is frozen into each published bundle, so a newer room must keep admitting older
22
+ * builds; rejecting on mismatch would brick every published world on a bump. The detection is for
23
+ * cross-version diagnostics, and contract changes are kept additive/forward so older clients still play.
24
+ */
25
+ export const CONTRACT_VERSION = 17; // v17: universal avatars — PlayerState.avatarUrl ('' = none) + RoomCredentialClaims.avatarUrl: each player's equipped, server-side-resolved avatar GLB URL, fixed at join, so clients render THEIR character for every seat. v16: networked physics — optional EntityState velocity/angularVelocity/orientation (+ EntityStateMessage/batch lv/av/q + ack lv/q) carry dynamic-body state for `physics` kinds; MOVEMENT_GATE.impulseMul/graceMs open a bounded collision-grace gate exception (plan Phase 0/3). v15: first-class elimination — PlayerState.active (boolean, default true); an eliminated-but-connected player drops out of the gameplay active set while staying connected + rendered + reachable by broadcast (Tier 2 P3-B2)
26
+ export * from './state';
27
+ export * from './room';
28
+ export * from './messages';
29
+ export * from './credential';
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/multiplayer-contract/index.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,EAAE;AACF,iGAAiG;AACjG,0FAA0F;AAC1F,oEAAoE;AACpE,wFAAwF;AACxF,8EAA8E;AAC9E,EAAE;AACF,mGAAmG;AACnG,+FAA+F;AAC/F,gDAAgD;AAChD,EAAE;AACF,uGAAuG;AACvG,qGAAqG;AACrG,iGAAiG;AAEjG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAW,CAAC,CAAC,6sBAA6sB;AAE1vB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,284 @@
1
+ import type { Vec3, Quat } from './state';
2
+ import type { RoomVarValue } from './room';
3
+ export declare const ClientMessageType: {
4
+ /** The player's predicted kinematic state for this tick (seq-tagged for reconciliation). */
5
+ readonly State: "state";
6
+ /** Activate or deactivate an ability on this player (the built-in, engine-level intent). */
7
+ readonly Ability: "ability";
8
+ /** A world-authored declared action (the generic extensibility channel — see ActionMessage). */
9
+ readonly Action: "action";
10
+ /** An owner-authoritative entity's client-simulated state for this tick (Tier 2 Phase 4.6c — see EntityStateMessage). */
11
+ readonly EntityState: "entityState";
12
+ /**
13
+ * A BATCH of owner-authoritative entity uploads for this tick — ALL the entities this connection hosts in one
14
+ * message (Tier 2 Phase 4.10 — see EntityStateBatchMessage). The per-connection rate cap counts MESSAGES, so a
15
+ * host of N entities must batch (one message/tick) instead of N single EntityState messages, or it starves its
16
+ * own upload budget. EntityScene uses this; the single EntityState stays for one-off uploads (e.g. a flag).
17
+ */
18
+ readonly EntityStateBatch: "entityStateBatch";
19
+ /** Clock-sync probe: the client's local timestamp, which the room echoes in a Pong (RTT + offset). */
20
+ readonly Ping: "ping";
21
+ };
22
+ export type ClientMessageType = (typeof ClientMessageType)[keyof typeof ClientMessageType];
23
+ /** Server → client messages (the room sends these; SDK exposes them via room.onMessage(type, cb)). */
24
+ export declare const ServerMessageType: {
25
+ /** Reply to a Ping: the client's echoed timestamp + the server's current time, for offset estimation. */
26
+ readonly Pong: "pong";
27
+ /**
28
+ * A2 reconnection ack — the player-seat divergence correction (spec §9). Sent ONLY to the uploading client and
29
+ * ONLY when the movement gate REJECTED its `state` frame (the accepted case is silent — the accepted position is
30
+ * already in synced state). The client snaps its local body to the anchored position and prunes its reconciliation
31
+ * buffer through the echoed seq. See StateAckMessage.
32
+ */
33
+ readonly StateAck: "stateAck";
34
+ /**
35
+ * A2 reconnection ack — the owner-hosted entity divergence correction (spec §9). Sent ONLY to the hosting client,
36
+ * BATCHED (one message per tick acks every hosted entity whose upload the gate rejected — mirrors EntityStateBatch).
37
+ * The host re-anchors each entity's local sim to the anchored position so its uploads stop being fenced. See
38
+ * EntityStateAckMessage.
39
+ */
40
+ readonly EntityStateAck: "entityStateAck";
41
+ };
42
+ export type ServerMessageType = (typeof ServerMessageType)[keyof typeof ServerMessageType];
43
+ /** Per-tick state upload. Units match PlayerReplicaState (position m; all angles degrees, see *Deg). */
44
+ export interface StateMessage {
45
+ /** Monotonic per-client sequence; the room echoes the last applied seq for client reconciliation. */
46
+ seq: number;
47
+ position: Vec3;
48
+ facingYawDeg: number;
49
+ speed: number;
50
+ moveDirectionDeg: number;
51
+ verticalVelocity: number;
52
+ grounded: boolean;
53
+ crouched: boolean;
54
+ aimYawDeg: number;
55
+ aimPitchDeg: number;
56
+ /**
57
+ * Sender send-time — the client's monotonic `performance.now()` ms when it sampled this frame. The server
58
+ * SANITIZES it into the synced `PlayerState.posT` (room.ts) for source-time interpolation: clients space keyframes
59
+ * by `posT` deltas, not arrival time, so delivery jitter stops becoming motion jitter. Only deltas matter (the
60
+ * origin is arbitrary). Optional — an older client omits it and the server falls back to its own apply-clock.
61
+ */
62
+ tMs?: number;
63
+ }
64
+ /**
65
+ * An owner-authoritative entity's client-simulated state for this tick (Tier 2 Phase 4.6c, spec §9/§10.4). The
66
+ * client that the server marked as the entity's `controller` (see EntityState.controller) simulates the entity
67
+ * and uploads its transform + declared vars; the room sanity-validates (it owns this entity? movement within
68
+ * its declared `maxSpeed`? vars within their declared bounds?) and relays. Cross-player consequences still go
69
+ * through server-validated rules/actions — never this channel (the publish-time firewall enforces that).
70
+ */
71
+ export interface EntityStateMessage {
72
+ /** The entity id this upload is for (the state.entities map key). Rejected unless the sender is its controller. */
73
+ entity: string;
74
+ /** Monotonic per-entity sequence; the room ignores a stale/out-of-order frame. */
75
+ seq: number;
76
+ /** The entity's world position, METERS — gated against the kind's declared maxSpeed. */
77
+ position: Vec3;
78
+ /**
79
+ * Physics state — uploaded ONLY for a `physics` (dynamic-body) kind (networked-physics, plan Phase 0). `velocity`
80
+ * is gated against the kind's maxSpeed (magnitude-clamped on ingest, widened during a collision-grace window);
81
+ * `orientation` is normalized (zero/non-finite → identity). Synced so remotes extrapolate with the right velocity
82
+ * + reproduce spin (research §2). Omit for a kinematic kind.
83
+ */
84
+ velocity?: Vec3;
85
+ angularVelocity?: Vec3;
86
+ orientation?: Quat;
87
+ /** Declared per-kind vars to set (same vocabulary as roomVars); each is clamped to its declared type/bounds on ingest. */
88
+ vars?: Record<string, RoomVarValue>;
89
+ /**
90
+ * The authority EPOCH the client is simulating under (Tier 2 Phase 4.5.12, spec §9). Mirror the entity's synced
91
+ * `authorityEpoch`; the room bumps it on every controller handoff (host migration AND voluntary ownership
92
+ * transfer) and rejects an upload whose epoch ≠ the entity's current one — fencing a revoked/stale authority
93
+ * era even from a still-connected prior owner whose sessionId would otherwise pass. Omit only for the very
94
+ * first frame before the field is observed; the room tolerates absence (sessionId ownership still gates).
95
+ */
96
+ epoch?: number;
97
+ /**
98
+ * Sender send-time (the owner's monotonic `performance.now()` ms at upload) — the server SANITIZES it into the
99
+ * entity's synced `posT` for source-time interpolation, exactly like the player's `StateMessage.tMs`. Optional.
100
+ */
101
+ tMs?: number;
102
+ }
103
+ /**
104
+ * One entity's slot in an EntityStateBatchMessage. Compact, short keys (sent verbatim in msgpack), with position
105
+ * as a 3-tuple instead of a {x,y,z} object — the same authoritative meaning as EntityStateMessage's per-entity
106
+ * fields. `v`/`ep` are omitted when unchanged/unobserved to keep the batch small.
107
+ */
108
+ export interface EntityStateBatchEntry {
109
+ /** Entity id (the state.entities map key). Rejected unless the sender is its controller. */
110
+ e: string;
111
+ /** World position as [x, y, z], METERS — gated against the kind's declared maxSpeed. */
112
+ p: [number, number, number];
113
+ /** Linear velocity [x,y,z], m/s — physics kinds only; magnitude-clamped to the gate on ingest. Omit when unchanged/non-physics. */
114
+ lv?: [number, number, number];
115
+ /** Angular velocity [x,y,z], rad/s — physics kinds only. Omit when unchanged/non-physics. */
116
+ av?: [number, number, number];
117
+ /** Orientation quaternion [x,y,z,w] — physics kinds only; normalized (zero/non-finite → identity) on ingest. Omit when unchanged/non-physics. */
118
+ q?: [number, number, number, number];
119
+ /** Declared per-kind vars to set (clamped to declared type/bounds on ingest). Omit when unchanged this tick. */
120
+ v?: Record<string, RoomVarValue>;
121
+ /** Authority epoch this entity is simulated under (mirror its synced authorityEpoch). Omit before observed. */
122
+ ep?: number;
123
+ }
124
+ /**
125
+ * A batch of owner-authoritative entity uploads (Tier 2 Phase 4.10, spec §10.4) — every entity this connection
126
+ * hosts, in ONE message. The per-connection rate cap (MESSAGE_RATE.entityStateHz) counts messages, so batching
127
+ * lets a host refresh many entities per tick within one token instead of spending one token per entity. The room
128
+ * applies each entry exactly like a single EntityStateMessage (ownership + epoch + maxSpeed gate + var clamp).
129
+ */
130
+ export interface EntityStateBatchMessage {
131
+ /** Monotonic per-connection batch sequence; the room ignores a stale/out-of-order batch per entity (gate seq). */
132
+ seq: number;
133
+ /** One entry per hosted entity changed this tick (bounded by the room's per-owner entity cap). */
134
+ states: EntityStateBatchEntry[];
135
+ /**
136
+ * Sender send-time (the host's monotonic `performance.now()` ms when it sampled this batch) — ONE per batch (all
137
+ * entries are sampled the same frame); the server sanitizes it into each entity's synced `posT`. Optional.
138
+ */
139
+ tMs?: number;
140
+ }
141
+ /** Discrete ability activation intent. */
142
+ export interface AbilityMessage {
143
+ /** Ability id (must be one the world's build declares). */
144
+ ability: string;
145
+ /** true = activate, false = deactivate. */
146
+ active: boolean;
147
+ }
148
+ /**
149
+ * A world-authored declared action — the generic extensibility channel (e.g. 'captureFlag',
150
+ * 'scorePoint'). The room validates `name` against the world's declared action set and `args` against
151
+ * that action's declared arg schema before mutating authoritative state (table-driven dispatch); this
152
+ * module carries the envelope + arg vocabulary only, never the per-world rules.
153
+ */
154
+ export interface ActionMessage {
155
+ /** Action name; must be one the world's build declares. */
156
+ name: string;
157
+ /** Primitive/Vec3 args, validated against the declared action's schema by the room. */
158
+ args?: Record<string, RoomVarValue>;
159
+ }
160
+ /**
161
+ * Clock-sync probe. The client sends its local send time; the room replies (Pong) with this value echoed
162
+ * plus its own clock, so the client estimates RTT (recv − send) and offset (serverTimeMs − send − RTT/2).
163
+ */
164
+ export interface PingMessage {
165
+ /** The client's local clock (epoch ms) at send — echoed verbatim in the Pong. */
166
+ clientTimeMs: number;
167
+ }
168
+ /** Reply to a Ping — the echoed client time + the server's clock at reply, for offset/RTT estimation. */
169
+ export interface PongMessage {
170
+ clientTimeMs: number;
171
+ serverTimeMs: number;
172
+ }
173
+ /**
174
+ * A2 player-seat divergence ack (spec §9). Sent to ONE client when the room's movement gate rejected its `state`
175
+ * upload — the client's prediction diverged from authority, so it must correct. Under Tier-1 lean (no server
176
+ * physics) the correction is a thin SNAP: the client moves its local body to `position` (no input replay). The
177
+ * accepted case sends nothing — the accepted position is already in synced state; this fires only on divergence.
178
+ */
179
+ export interface StateAckMessage {
180
+ /** The highest client `seq` the room has processed for this seat — the client prunes its reconciliation buffer through it. */
181
+ seq: number;
182
+ /** The room's authoritative position for this seat (the last ACCEPTED upload) — the anchor the client snaps to. */
183
+ position: Vec3;
184
+ }
185
+ /**
186
+ * One entity's slot in an EntityStateAckMessage — compact short keys + a [x,y,z] tuple, mirroring EntityStateBatchEntry
187
+ * (the upload it answers).
188
+ */
189
+ export interface EntityStateAckEntry {
190
+ /** Entity id (the state.entities map key). */
191
+ e: string;
192
+ /** The last per-entity `seq` the room ACCEPTED for this entity — the host re-anchors/prunes through it. */
193
+ seq: number;
194
+ /** The room's authoritative anchored position [x, y, z], METERS — the host snaps its local sim to it. */
195
+ p: [number, number, number];
196
+ /** Anchored linear velocity [x,y,z], m/s — physics kinds only, so a reconciled body resets its velocity too (else a stale spin/drift survives). Omit for non-physics. */
197
+ lv?: [number, number, number];
198
+ /** Anchored orientation quaternion [x,y,z,w] — physics kinds only, so a reconciled body resets its spin. Omit for non-physics. */
199
+ q?: [number, number, number, number];
200
+ }
201
+ /**
202
+ * A2 owner-entity divergence ack (spec §9). Sent to ONE hosting client, BATCHED: one message per tick carries an entry
203
+ * for every entity this host uploaded whose position the gate rejected (mirrors the EntityStateBatch upload channel).
204
+ * The host re-anchors each entity's local sim to its anchor, so a sparse/throttled host stops being fenced by the gate
205
+ * — replacing the engine's prior conservative `0.83 × gate-reach` guess with the room's actual accepted position.
206
+ */
207
+ export interface EntityStateAckMessage {
208
+ /** One entry per hosted entity whose upload the gate rejected this tick. Never empty (the room omits the message instead). */
209
+ acks: EntityStateAckEntry[];
210
+ }
211
+ /**
212
+ * A server→client broadcast event (Tier 2 Phase 2.5, spec §10.3). A world declares named events with a
213
+ * payload schema; a `broadcast` rule-effect sends one on the event's NAME (not a fixed ServerMessageType),
214
+ * received via `room.onMessage(name, cb)`. Payload values are the declared fields; a `ref` field serializes
215
+ * to its `playerKey` string on the wire (so `who:"self"` and `who:{aggregate argmax}` are the same type).
216
+ */
217
+ export type BroadcastPayload = Record<string, RoomVarValue>;
218
+ /**
219
+ * Wire message-type names a world's declared event/action names MUST NOT shadow — the fixed client→server
220
+ * and server→client channels. The manifest validator rejects a declared name in this set so a `broadcast`
221
+ * can't collide with `pong` (or confuse the fixed channels). Inlined in @hypersoniclabs/helix-manifest with
222
+ * a cross-ref (the manifest takes no SDK dependency); keep the two in sync.
223
+ */
224
+ export declare const RESERVED_MESSAGE_TYPES: readonly ["state", "ability", "action", "entityState", "entityStateBatch", "ping", "pong", "stateAck", "entityStateAck"];
225
+ /** Maps each client→server message type to its payload, so senders/handlers stay in lockstep. */
226
+ export interface ClientMessagePayloads {
227
+ [ClientMessageType.State]: StateMessage;
228
+ [ClientMessageType.Ability]: AbilityMessage;
229
+ [ClientMessageType.Action]: ActionMessage;
230
+ [ClientMessageType.EntityState]: EntityStateMessage;
231
+ [ClientMessageType.EntityStateBatch]: EntityStateBatchMessage;
232
+ [ClientMessageType.Ping]: PingMessage;
233
+ }
234
+ /** Maps each server→client message type to its payload. */
235
+ export interface ServerMessagePayloads {
236
+ [ServerMessageType.Pong]: PongMessage;
237
+ [ServerMessageType.StateAck]: StateAckMessage;
238
+ [ServerMessageType.EntityStateAck]: EntityStateAckMessage;
239
+ }
240
+ /**
241
+ * Per-connection rate ceilings (messages/second) the room enforces; over-rate clients are dropped.
242
+ * State is the throttled input channel (plan D3); ability is bursty but bounded.
243
+ *
244
+ * `stateHz`/`entityStateHz` are the DEFAULT per-connection upload cadence. A world may raise BOTH to `maxUploadHz`
245
+ * via `multiplayer.uploadHz: 20` — the room derives the actual ceiling from the trusted configUrl, the client from
246
+ * its bundled manifest, so they agree without a handshake (a client that lies is simply rate-limited). Sending under
247
+ * the cap is always legal, so this is purely a cap → no CONTRACT_VERSION bump.
248
+ * SYNC: the {10, 20} tier set mirrors the manifest's MULTIPLAYER_CAPS.uploadHzAllowed — widen in lockstep.
249
+ */
250
+ export declare const MESSAGE_RATE: {
251
+ readonly stateHz: 10;
252
+ readonly abilityHz: 20;
253
+ readonly actionHz: 20;
254
+ readonly entityStateHz: 10;
255
+ readonly pingHz: 4;
256
+ readonly maxUploadHz: 20;
257
+ };
258
+ /**
259
+ * Movement-plausibility gate — the canonical home for the bound the colyseus room ENFORCES and the engine's
260
+ * client-side upload clamp MIRRORS, so both compute the SAME bound from the SAME inputs and never disagree. A
261
+ * frame moving more than `maxSpeed × Δt × toleranceMul` from the last accepted position is implausible: the
262
+ * server holds + acks it, the client pre-clamps its upload to stay inside it. `Δt` is the SANITIZED real
263
+ * send-interval (the source-time `posT` delta — clamped, spoof-bounded; see nextSourceTime), NOT integer ticks —
264
+ * time-based so the gate is cadence-agnostic and a non-tick-aligned send rate can't quantize the budget away.
265
+ * This is a SANITY bound (anti-teleport), not cheat-proof movement (Tier 3). The room imports this; the
266
+ * standalone engine mirrors the two values (it takes no SDK build dep — same SYNC pattern as the declared-state
267
+ * mirror) → keep them in lockstep.
268
+ */
269
+ export declare const MOVEMENT_GATE: {
270
+ readonly toleranceMul: 1.25;
271
+ readonly ownerEntityToleranceMul: 3;
272
+ readonly maxCatchupMs: 300;
273
+ readonly impulseMul: 6;
274
+ readonly graceMs: 250;
275
+ };
276
+ /**
277
+ * Hard payload bound the room rejects above (defense against oversized frames), measured on the JSON form (a
278
+ * cheap proxy; the msgpack wire is smaller). Sized (P1.B4) to admit a full EntityStateBatch — MAX_ENTITIES_PER_OWNER
279
+ * (128) entities with modest vars in one message (≈75 JSON bytes/entry) — so the byte cap and the per-owner entity
280
+ * cap don't disagree. MUST stay below the Colyseus transport `maxPayload` (16 KB, helix-colyseus-server src/index.ts)
281
+ * in WIRE terms, so the room's reject fires before the transport drops the frame / closes the socket. A var-heavy
282
+ * batch past this is a CLEAN DROP (the room's guard does not strike on an over-byte payload), never a kick.
283
+ */
284
+ export declare const MAX_MESSAGE_BYTES = 12288;
@@ -0,0 +1,111 @@
1
+ // Client → server messages. The SDK send path emits these; the room dispatches them through a
2
+ // table keyed by ClientMessageType and validates every payload before mutating authoritative state
3
+ // (the room owns runtime validation — this module is types + limits only, no validator, no deps).
4
+ //
5
+ // Tier 1 (lean authoritative, no server physics): the client predicts locally and sends its state
6
+ // each tick (seq-tagged so the room can echo for reconciliation); the room validates bounds/rate and
7
+ // writes the authoritative copy. Discrete intents (ability on/off) are their own message.
8
+ export const ClientMessageType = {
9
+ /** The player's predicted kinematic state for this tick (seq-tagged for reconciliation). */
10
+ State: 'state',
11
+ /** Activate or deactivate an ability on this player (the built-in, engine-level intent). */
12
+ Ability: 'ability',
13
+ /** A world-authored declared action (the generic extensibility channel — see ActionMessage). */
14
+ Action: 'action',
15
+ /** An owner-authoritative entity's client-simulated state for this tick (Tier 2 Phase 4.6c — see EntityStateMessage). */
16
+ EntityState: 'entityState',
17
+ /**
18
+ * A BATCH of owner-authoritative entity uploads for this tick — ALL the entities this connection hosts in one
19
+ * message (Tier 2 Phase 4.10 — see EntityStateBatchMessage). The per-connection rate cap counts MESSAGES, so a
20
+ * host of N entities must batch (one message/tick) instead of N single EntityState messages, or it starves its
21
+ * own upload budget. EntityScene uses this; the single EntityState stays for one-off uploads (e.g. a flag).
22
+ */
23
+ EntityStateBatch: 'entityStateBatch',
24
+ /** Clock-sync probe: the client's local timestamp, which the room echoes in a Pong (RTT + offset). */
25
+ Ping: 'ping',
26
+ };
27
+ /** Server → client messages (the room sends these; SDK exposes them via room.onMessage(type, cb)). */
28
+ export const ServerMessageType = {
29
+ /** Reply to a Ping: the client's echoed timestamp + the server's current time, for offset estimation. */
30
+ Pong: 'pong',
31
+ /**
32
+ * A2 reconnection ack — the player-seat divergence correction (spec §9). Sent ONLY to the uploading client and
33
+ * ONLY when the movement gate REJECTED its `state` frame (the accepted case is silent — the accepted position is
34
+ * already in synced state). The client snaps its local body to the anchored position and prunes its reconciliation
35
+ * buffer through the echoed seq. See StateAckMessage.
36
+ */
37
+ StateAck: 'stateAck',
38
+ /**
39
+ * A2 reconnection ack — the owner-hosted entity divergence correction (spec §9). Sent ONLY to the hosting client,
40
+ * BATCHED (one message per tick acks every hosted entity whose upload the gate rejected — mirrors EntityStateBatch).
41
+ * The host re-anchors each entity's local sim to the anchored position so its uploads stop being fenced. See
42
+ * EntityStateAckMessage.
43
+ */
44
+ EntityStateAck: 'entityStateAck',
45
+ };
46
+ /**
47
+ * Wire message-type names a world's declared event/action names MUST NOT shadow — the fixed client→server
48
+ * and server→client channels. The manifest validator rejects a declared name in this set so a `broadcast`
49
+ * can't collide with `pong` (or confuse the fixed channels). Inlined in @hypersoniclabs/helix-manifest with
50
+ * a cross-ref (the manifest takes no SDK dependency); keep the two in sync.
51
+ */
52
+ export const RESERVED_MESSAGE_TYPES = ['state', 'ability', 'action', 'entityState', 'entityStateBatch', 'ping', 'pong', 'stateAck', 'entityStateAck'];
53
+ /**
54
+ * Per-connection rate ceilings (messages/second) the room enforces; over-rate clients are dropped.
55
+ * State is the throttled input channel (plan D3); ability is bursty but bounded.
56
+ *
57
+ * `stateHz`/`entityStateHz` are the DEFAULT per-connection upload cadence. A world may raise BOTH to `maxUploadHz`
58
+ * via `multiplayer.uploadHz: 20` — the room derives the actual ceiling from the trusted configUrl, the client from
59
+ * its bundled manifest, so they agree without a handshake (a client that lies is simply rate-limited). Sending under
60
+ * the cap is always legal, so this is purely a cap → no CONTRACT_VERSION bump.
61
+ * SYNC: the {10, 20} tier set mirrors the manifest's MULTIPLAYER_CAPS.uploadHzAllowed — widen in lockstep.
62
+ */
63
+ export const MESSAGE_RATE = {
64
+ stateHz: 10,
65
+ abilityHz: 20,
66
+ actionHz: 20,
67
+ entityStateHz: 10, // owner-entity upload — same cadence as the player state channel (one bucket per connection)
68
+ pingHz: 4, // clock-sync probe — a few per second is ample to track offset/RTT
69
+ maxUploadHz: 20, // ceiling a world may raise stateHz/entityStateHz to (multiplayer.uploadHz:20); = SIM_HZ, above it buys nothing
70
+ };
71
+ /**
72
+ * Movement-plausibility gate — the canonical home for the bound the colyseus room ENFORCES and the engine's
73
+ * client-side upload clamp MIRRORS, so both compute the SAME bound from the SAME inputs and never disagree. A
74
+ * frame moving more than `maxSpeed × Δt × toleranceMul` from the last accepted position is implausible: the
75
+ * server holds + acks it, the client pre-clamps its upload to stay inside it. `Δt` is the SANITIZED real
76
+ * send-interval (the source-time `posT` delta — clamped, spoof-bounded; see nextSourceTime), NOT integer ticks —
77
+ * time-based so the gate is cadence-agnostic and a non-tick-aligned send rate can't quantize the budget away.
78
+ * This is a SANITY bound (anti-teleport), not cheat-proof movement (Tier 3). The room imports this; the
79
+ * standalone engine mirrors the two values (it takes no SDK build dep — same SYNC pattern as the declared-state
80
+ * mirror) → keep them in lockstep.
81
+ */
82
+ export const MOVEMENT_GATE = {
83
+ toleranceMul: 1.25, // accepted displacement = maxSpeed × Δt × this; the small clock-skew margin that replaces the old client 0.83 / server 2.0 tick-quantization fudge
84
+ // A client-HOSTED owner-authority ENTITY (a rolling ball, a car, any owner-hosted body — physics OR kinematic
85
+ // transport) can live AT maxSpeed continuously, so the player tolerance (1.25×) leaves it riding the exact gate
86
+ // edge — cadence/clock jitter then false-rejects legitimate motion and the client pre-clamp crawls the auth behind
87
+ // the sim (the fence → reanchor "slingshot" + remote extrapolation chop). Owner-entity uploads get a wider
88
+ // STEADY-STATE budget: enough to clear maxSpeed motion + the render-delay lag + the cadence quantum, while still
89
+ // catching a real teleport (a sanity bound, not Tier-3 anti-cheat). Used by the server entity gate AND the engine
90
+ // #clampToGate for ALL owner-hosted entity uploads. (Players keep `toleranceMul`; their gate is MAX_SPEED_MPS.)
91
+ ownerEntityToleranceMul: 3.0,
92
+ maxCatchupMs: 300, // ceiling on the Δt credited since the last ACCEPTED frame, so a long silence can't bank a teleport (was MAX_GATE_CATCHUP_TICKS 6 × 50ms)
93
+ // ── Collision-grace exception (networked-physics, plan Phase 3.3) ──────────────────────────────────────
94
+ // A collision impulse legitimately spikes a physics body's velocity past maxSpeed × Δt for an instant; the plain
95
+ // gate would reject that frame. On a SERVER-DETECTED contact involving an owner physics entity the room stamps a
96
+ // short grace window during which the gate budget is multiplied by `impulseMul`; the engine's #clampToGate mirrors
97
+ // the same widened bound so it never pre-clamps a real collision frame. Bounded by graceMs + only opened by a
98
+ // server-detected contact (a soft anti-cheat spot, documented in tuning.ts — visuals-first, not Tier-3).
99
+ impulseMul: 6, // gate multiplier while a collision-grace window is open on the entity
100
+ graceMs: 250, // grace duration (ms) after a server-detected contact involving an owner physics entity
101
+ };
102
+ /**
103
+ * Hard payload bound the room rejects above (defense against oversized frames), measured on the JSON form (a
104
+ * cheap proxy; the msgpack wire is smaller). Sized (P1.B4) to admit a full EntityStateBatch — MAX_ENTITIES_PER_OWNER
105
+ * (128) entities with modest vars in one message (≈75 JSON bytes/entry) — so the byte cap and the per-owner entity
106
+ * cap don't disagree. MUST stay below the Colyseus transport `maxPayload` (16 KB, helix-colyseus-server src/index.ts)
107
+ * in WIRE terms, so the room's reject fires before the transport drops the frame / closes the socket. A var-heavy
108
+ * batch past this is a CLEAN DROP (the room's guard does not strike on an over-byte payload), never a kick.
109
+ */
110
+ export const MAX_MESSAGE_BYTES = 12288;
111
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/multiplayer-contract/messages.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,mGAAmG;AACnG,kGAAkG;AAClG,EAAE;AACF,kGAAkG;AAClG,qGAAqG;AACrG,0FAA0F;AAK1F,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,4FAA4F;IAC5F,KAAK,EAAE,OAAO;IACd,4FAA4F;IAC5F,OAAO,EAAE,SAAS;IAClB,gGAAgG;IAChG,MAAM,EAAE,QAAQ;IAChB,yHAAyH;IACzH,WAAW,EAAE,aAAa;IAC1B;;;;;OAKG;IACH,gBAAgB,EAAE,kBAAkB;IACpC,sGAAsG;IACtG,IAAI,EAAE,MAAM;CACJ,CAAC;AAGX,sGAAsG;AACtG,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,yGAAyG;IACzG,IAAI,EAAE,MAAM;IACZ;;;;;OAKG;IACH,QAAQ,EAAE,UAAU;IACpB;;;;;OAKG;IACH,cAAc,EAAE,gBAAgB;CACxB,CAAC;AA8LX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,CAAU,CAAC;AAmB/J;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO,EAAE,EAAE;IACX,S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