@genex-ai/multiplayer 0.17.1 → 0.17.8

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.
Files changed (45) hide show
  1. package/PROTOCOL.md +761 -9
  2. package/README.md +285 -1
  3. package/WORLD-GLTF.md +109 -0
  4. package/WORLD-SCENE.md +135 -0
  5. package/dist/authority/fast-udp.d.ts +15 -0
  6. package/dist/authority/fast-udp.js +14 -0
  7. package/dist/authority/fast-webtransport.d.ts +67 -0
  8. package/dist/authority/fast-webtransport.js +21 -0
  9. package/dist/authority/index.d.ts +2671 -0
  10. package/dist/authority/index.js +958 -0
  11. package/dist/authority/module.d.ts +2 -0
  12. package/dist/authority/module.js +12 -0
  13. package/dist/bridge-authority.d.ts +101 -0
  14. package/dist/bridge-authority.global.js +15 -0
  15. package/dist/bridge-authority.js +291 -0
  16. package/dist/bridge-core-Dhc73GC8.d.ts +27 -0
  17. package/dist/bridge.d.ts +26 -20
  18. package/dist/bridge.global.js +7 -7
  19. package/dist/bridge.js +17 -48
  20. package/dist/chunk-2NGXXQDS.js +1916 -0
  21. package/dist/chunk-4R7C2TLH.js +68 -0
  22. package/dist/{chunk-C52XFIB6.js → chunk-CSQEEANB.js} +217 -4
  23. package/dist/chunk-FPWP22Y7.js +143 -0
  24. package/dist/chunk-NFMGIKFZ.js +2627 -0
  25. package/dist/chunk-OD6NRSX2.js +29 -0
  26. package/dist/{chunk-3ZUPU3GT.js → chunk-QY3QQNDJ.js} +13 -122
  27. package/dist/chunk-QZOCUQJT.js +6900 -0
  28. package/dist/chunk-TSYEWPVO.js +44 -0
  29. package/dist/chunk-TVTVIMIH.js +675 -0
  30. package/dist/chunk-YWQ3ALYY.js +69 -0
  31. package/dist/fast-client--A88q0kk.d.ts +546 -0
  32. package/dist/index.d.ts +3 -5
  33. package/dist/index.js +3 -2
  34. package/dist/join-CGoInvUM.d.ts +6 -0
  35. package/dist/level-build-CbRqrYJq.d.ts +140 -0
  36. package/dist/module-CSpXrzFc.d.ts +1187 -0
  37. package/dist/physics-predict-C7ZB1gDG.d.ts +1223 -0
  38. package/dist/protocol.d.ts +222 -2
  39. package/dist/protocol.js +47 -1
  40. package/dist/shot-world-D22tqOUT.d.ts +485 -0
  41. package/dist/world-fit/index.d.ts +549 -0
  42. package/dist/world-fit/index.js +4763 -0
  43. package/dist/world-fit/three.d.ts +77 -0
  44. package/dist/world-fit/three.js +140 -0
  45. package/package.json +46 -4
@@ -5,6 +5,24 @@ declare const PROTOCOL_VERSION = 3;
5
5
  /** The oldest protocol the relay still seats. A join below it (or without one) is refused with
6
6
  * {@link JoinError.PROTOCOL_UNSUPPORTED}. Protocol 3 is a hard cut: 2 (`__v`) is not served. */
7
7
  declare const MIN_PROTOCOL_VERSION = 3;
8
+ /** The protocol an authority room (§17) speaks. Authority rooms have their own window so the relay
9
+ * rooms' window above never moves: a published protocol-3 game keeps joining `play`, `queue` and
10
+ * `match` exactly as before, and only an authority session sends 4. */
11
+ declare const AUTHORITY_PROTOCOL_VERSION = 4;
12
+ /** The oldest protocol an authority room seats. */
13
+ declare const AUTHORITY_MIN_PROTOCOL_VERSION = 4;
14
+ /** The inclusive range of `protocol` values one room type accepts. */
15
+ interface ProtocolWindow {
16
+ min: number;
17
+ max: number;
18
+ }
19
+ /** `play`, `queue` and `match`. */
20
+ declare const RELAY_WINDOW: Readonly<ProtocolWindow>;
21
+ /** `authority` (§17). */
22
+ declare const AUTHORITY_WINDOW: Readonly<ProtocolWindow>;
23
+ /** Whether a sent `protocol` join option lies inside `window`: an integer number, nothing else
24
+ * (a string, a boxed number or a missing option is outside every window). */
25
+ declare function inProtocolWindow(sent: unknown, window: Readonly<ProtocolWindow>): boolean;
8
26
  /** Colyseus room types. Every game shares them; games are isolated by the `gameId` filter. */
9
27
  declare const RoomType: {
10
28
  /** The plain relay room: joinOrCreate, fullest-first placement. */
@@ -13,6 +31,9 @@ declare const RoomType: {
13
31
  readonly QUEUE: "queue";
14
32
  /** A capped match arena: seat reservation (matchmade), create (private lobby) or joinById (invite). */
15
33
  readonly MATCH: "match";
34
+ /** A server-authoritative room (§17): the server runs the game's room module, clients send input.
35
+ * Served by the authority cluster, never by a relay. */
36
+ readonly AUTHORITY: "authority";
16
37
  };
17
38
  /** Join option keys (every room type). Anything else is ignored, except the server-owned names in
18
39
  * {@link SERVER_OWNED_JOIN_OPTIONS}, which refuse the join. */
@@ -26,8 +47,113 @@ declare const JoinOption: {
26
47
  /** {@link PROTOCOL_VERSION}. Required. */
27
48
  readonly PROTOCOL: "protocol";
28
49
  };
50
+ /** The authority room's own join options (§17.2, §17.10). */
51
+ declare const AuthorityJoinOption: {
52
+ /** The capabilities this client implements: at most {@link AuthorityCaps.MAX_CAPS} strings of at
53
+ * most {@link AuthorityCaps.MAX_CAP_CHARS} characters; absent = []. Any other value is refused
54
+ * with 400 by every authority room. */
55
+ readonly CAPS: "caps";
56
+ /** The client's SDK and version, `<sdk>/<version>` (§17.1): counted so a protocol bump can see whom it would
57
+ * strand. Telemetry only: anything malformed is counted as unknown, never refused. */
58
+ readonly SDK: "sdk";
59
+ /** The pool this join asks for (§17.2 *Choosing a room*): rooms are found by it beside the game and
60
+ * the region. Absent or empty = the game's one pool, as a client that names no room has always had.
61
+ * Malformed (authority/room-key.ts `matchKeyOf`) is refused with 400. */
62
+ readonly MATCH_KEY: "matchKey";
63
+ /** `true` on a `create` makes a private room: no matchmaking reaches it, only its code. Any other
64
+ * type is refused with 400. */
65
+ readonly PRIVATE: "private";
66
+ /** The room this seat lost (§17.13 *Drain and rejoin*): a room code. Rooms are found by it too, so a
67
+ * lost room's seats meet in one successor, which alone reads the room's hand-off. Absent or empty =
68
+ * no successor. Malformed is refused with 400. */
69
+ readonly SUCCESSOR_OF: "successorOf";
70
+ /** `true` keeps a successor closed to the game's pool: the lost room was private. Any other type is
71
+ * refused with 400. */
72
+ readonly SUCCESSOR_CLOSED: "successorClosed";
73
+ };
74
+ /** `server:restart` on an authority room (§17.13): the room closes with 4001 this long after it. */
75
+ interface AuthorityDrainNotice {
76
+ drainMs: number;
77
+ }
78
+ /** The SDK label this TypeScript client sends. tests hold it to package.json. */
79
+ declare const AUTHORITY_SDK_LABEL = "ts/0.17.8";
80
+ /** Client capabilities (§17.10 *Joining*). */
81
+ declare const AuthorityCaps: {
82
+ /** Decodes and draws §17.10's physics bodies. A physics room refuses a join without it (426). An
83
+ * SDK sends it only once its drawing passes `physics-draw.json` and, for an engine SDK, its own
84
+ * probe on the pinned core (§17.10 *Conformance*). */
85
+ readonly PHYSICS: "physics@1";
86
+ /** Also predicts a predicting room's bodies (§17.11): it builds the room's world from `physDesc`,
87
+ * adopts and replays keyframes, and draws its predicted bodies. A client sends it beside
88
+ * `physics@1`, never alone; a room serves the same state to both, so the cap only says what the
89
+ * client does. An SDK sends it only once it passes `physics-predict.json` (§17.11 *Conformance*). */
90
+ readonly PHYSICS_PREDICT: "physics@2";
91
+ /** Reconciles a predicting room's repeated inputs (§17.11 *Input pacing*): it predicts its own
92
+ * entity from the state as stepped through `ackSeq + inRep`, not `ackSeq`. A predicting room repeats
93
+ * a starved seat's last input only for a client that sends it; without it a starved tick steps
94
+ * nothing, as before. An SDK sends it only once it passes `input-repeat.json`. */
95
+ readonly INPUT_REPEAT: "repeat@1";
96
+ /** Collides with, rides and draws a room's declared lifts (§17.11 *Lifts*). A room that declares
97
+ * lifts refuses a join without it (426, `lifts@1 required`): a client that does not pose them
98
+ * would fall through them in its prediction. An SDK sends it only once it passes `lifts.json`. */
99
+ readonly LIFTS: "lifts@1";
100
+ /** Writes into each input the server tick its prediction steps it at (`AuthorityInput.tick`, modulo
101
+ * 2^16; §17.11 *The input's tick*): the server then judges a re-timed input (a tick that steps two of
102
+ * a seat's inputs or none) at the tick it was meant for — a firstperson view on a spinning lift
103
+ * carried by the lift's turn between the two, lag compensation's lift frames. Without it the field
104
+ * is ignored, as before. */
105
+ readonly INPUT_TICK: "tick@1";
106
+ /** Moves the seat's inputs and motion state to the fast channel (§17.12): redundant input datagrams
107
+ * and ack-delta snapshots over UDP or WebTransport, the WebSocket kept for everything else. Sent
108
+ * beside `tick@1`. An SDK sends it only once it passes `fast-transport.json` and its transport
109
+ * tests; a room that does not offer the channel ignores it. */
110
+ readonly FAST: "fast@1";
111
+ /** The seat can come back to the fast channel after a fallback (§17.12 *Return to the channel*): it asks
112
+ * for a fresh binding, proves the path and swaps. Sent beside `fast@1`; a host that does not know it
113
+ * ignores it, and a client asks only a host whose binding says `rev` 2. */
114
+ readonly FAST_RETURN: "fast-return@1";
115
+ readonly MAX_CAPS: 16;
116
+ readonly MAX_CAP_CHARS: 32;
117
+ };
118
+ /** A join's `caps` option as a list, or null when it is malformed (refused with 400). */
119
+ declare function capsOf(value: unknown): string[] | null;
120
+ /** Placement units a physics room weighs at up to 60 Hz (§17.10 *Admission and placement*); any
121
+ * other room weighs 1. */
122
+ declare const AUTHORITY_PHYSICS_UNITS = 6;
123
+ /** How many times its 60 Hz weight a physics room weighs at each tick rate (§17.10 *Admission and
124
+ * placement*): a 120 Hz room steps twice as often, so it places and meters as twelve rooms. */
125
+ declare const AUTHORITY_PHYSICS_TICK_WEIGHT: {
126
+ readonly 20: 1;
127
+ readonly 30: 1;
128
+ readonly 60: 1;
129
+ readonly 120: 2;
130
+ };
131
+ /** A room's weight per unit the platform weighs a room by: 1 without physics, else
132
+ * {@link AUTHORITY_PHYSICS_UNITS} times its tick rate's {@link AUTHORITY_PHYSICS_TICK_WEIGHT}. */
133
+ declare function authorityRoomUnits(physics: boolean, tickHz: keyof typeof AUTHORITY_PHYSICS_TICK_WEIGHT): number;
134
+ /** How many 1/60 s of simulated time one tick's physics budget covers at `tickHz` (§17.10 *Limits
135
+ * and failures*): the 1/60 s a tick steps up to 60 Hz, so a room's budget per simulated second is the
136
+ * same at 20, 30 and 60 Hz; a 60 Hz tick's at 120 Hz (the owner's per-tick rule, 2026-11-03), so a
137
+ * 120 Hz room gets twice the CPU per simulated second, as it weighs twice in placement. Per second it
138
+ * is always {@link AUTHORITY_PHYSICS_TICK_WEIGHT} times a 60 Hz room's. */
139
+ declare function authorityPhysicsBudgetSixtieths(tickHz: keyof typeof AUTHORITY_PHYSICS_TICK_WEIGHT): number;
140
+ /** The simulated time one tick's budgets are written for at `tickHz`, ms: its
141
+ * {@link authorityPhysicsBudgetSixtieths} (50, 33.3 and 16.7 at 20, 30 and 60 Hz, and a 60 Hz tick's
142
+ * 16.7 at 120 Hz). Placement's event-loop gate is a share of it (colyseus `authorityLoopP99MaxMs`). */
143
+ declare function authorityTickBudgetMs(tickHz: keyof typeof AUTHORITY_PHYSICS_TICK_WEIGHT): number;
144
+ /** Colyseus's `Encoder.BUFFER_SIZE` on every authority worker (§17.10 *Interest*), set before any
145
+ * room is created: a physics room's full state outgrows the 16 KiB default, and a predicting room's
146
+ * (§17.11: a canonical descriptor on every body, up to 32 shared shapes of 16 KiB) measured 672 KB.
147
+ * A full sync past it is re-run in a grown buffer, which sent the C# and C-core decoders a view they
148
+ * could not decode, so it must never be taken. 1 MiB, written as one literal: esbuild keeps an
149
+ * unused `1024 * 1024` in the relay bridge build and drops a literal. */
150
+ declare const AUTHORITY_ENCODER_BUFFER_BYTES = 1048576;
29
151
  /** Join options only the relay itself may set; a client sending any of them is refused (400). */
30
152
  declare const SERVER_OWNED_JOIN_OPTIONS: readonly ["clients", "preset", "winCondition", "config", "matchmade"];
153
+ /** The authority room's server-owned options (§17.2): the relay's plus what the authority server
154
+ * stamps from the admission it got for the room and the region the join entered through (§17.1). A separate list on purpose — adding these names to
155
+ * {@link SERVER_OWNED_JOIN_OPTIONS} would start refusing protocol-3 joins that send them today. */
156
+ declare const AUTHORITY_SERVER_OWNED_JOIN_OPTIONS: readonly ["clients", "preset", "winCondition", "config", "matchmade", "moduleSha", "tickHz", "maxPlayers", "lagComp", "seed", "units", "leaseId", "region", "createdBy"];
31
157
  /** Join refusal codes (the matchmaking error's `code`; the message names the reason). */
32
158
  declare const JoinError: {
33
159
  /** A server-owned option was sent. */
@@ -36,8 +162,20 @@ declare const JoinError: {
36
162
  readonly AUTH_REQUIRED: 401;
37
163
  /** Token for another game ('wrong game'), or the room's guest cap is full. */
38
164
  readonly FORBIDDEN: 403;
39
- /** `protocol` missing or outside [MIN_PROTOCOL_VERSION, PROTOCOL_VERSION]. Update the client. */
165
+ /** A join by code entered through another region than the room's (§17.2 *Choosing a room*): the
166
+ * client tries its next region. */
167
+ readonly WRONG_REGION: 421;
168
+ /** `protocol` missing or outside the room type's window ({@link RELAY_WINDOW},
169
+ * {@link AUTHORITY_WINDOW}). Update the client. */
40
170
  readonly PROTOCOL_UNSUPPORTED: 426;
171
+ /** The game's owner is not entitled to server-authoritative rooms. Terminal: do not retry. */
172
+ readonly NOT_ENTITLED: 402;
173
+ /** The owner's room quota, concurrency cap or credits refused a NEW room. Live rooms never close for it. */
174
+ readonly ROOM_QUOTA: 429;
175
+ /** The game has no published room module on this channel, or it could not be loaded. */
176
+ readonly MODULE_UNAVAILABLE: 424;
177
+ /** No authority server can take the room right now, or admission could not be checked. Retry later. */
178
+ readonly AUTHORITY_CAPACITY: 503;
41
179
  };
42
180
  /** A preview (staging) build's rooms: the relay keys them `preview--<slug>`, apart from the live
43
181
  * game's rooms, so testers on a preview link play together and never meet real players. The
@@ -155,6 +293,22 @@ declare const GLOBAL_RATE: {
155
293
  /** Colyseus's own per-socket ceiling. Unlike the lanes this CLOSES the socket (4002); it exists
156
294
  * only to stop a raw socket hammering far past anything the lanes accept. */
157
295
  declare const MAX_MESSAGES_PER_SECOND = 1200;
296
+ /** The same ceiling on an authority room's socket (§17.6 *The socket ceiling*): twenty seconds of inputs
297
+ * at the top tick rate, so a seat whose TCP stalled that long and then hands its whole backlog over in
298
+ * a second is not closed for it. A seat costs the worker's event loop about 5 µs a frame: 1% of a core
299
+ * at the ceiling, and it may not exceed it. */
300
+ declare const AUTHORITY_MAX_MESSAGES_PER_SECOND = 2400;
301
+ /** The largest frame an authority node reads (a bigger one closes the socket): a client sends an input
302
+ * frame (under 100 bytes) and `__fast:off` and nothing else, and no room type there takes a shared value. */
303
+ declare const AUTHORITY_MAX_FRAME_BYTES: number;
304
+ /** Why a seat, not its room, was closed: the reason text of its close frame. */
305
+ declare const SeatCloseReason: {
306
+ /** Its socket passed {@link AUTHORITY_MAX_MESSAGES_PER_SECOND} (4002). */
307
+ readonly MessageFlood: "message_flood";
308
+ /** Its input had not changed for the room's idle limit (4408). */
309
+ readonly SeatIdle: "seat_idle";
310
+ };
311
+ type SeatCloseReason = (typeof SeatCloseReason)[keyof typeof SeatCloseReason];
158
312
  /** The lane each relay-handled client message spends. Game events and anything unhandled: bulk. */
159
313
  declare const MESSAGE_LANE: Readonly<Record<ClientMessageType, RateLane>>;
160
314
  /** WebSocket close codes a client can observe. Terminal = the seat is gone; do not reconnect. */
@@ -178,7 +332,50 @@ declare const CloseCode: {
178
332
  readonly REVOKED: 4401;
179
333
  /** A newer session of the same player took the seat (second tab, or the page reloaded). */
180
334
  readonly SUPERSEDED: 4409;
335
+ /** Authority rooms: the seat's input had not changed for the room's idle limit (§17.6 *Room lifetime*). */
336
+ readonly IDLE: 4408;
337
+ /** The operator or the platform halted the room (kill switch, takedown, disabled game). */
338
+ readonly MODULE_HALTED: 4500;
339
+ /** The game's room module broke its limits or threw; the room is gone. */
340
+ readonly MODULE_FAULT: 4501;
341
+ };
342
+ /** Why an authority room's module was stopped. These are abuse and defect kills, distinct from billing: a quota
343
+ * never closes a live room. The host's reason for an end, and the reason text of the close frame every seat gets
344
+ * (§17.6), for the game's creator to read. */
345
+ declare const AuthorityCloseCode: {
346
+ /** A call ran past its hard timeout (an infinite loop, a long microtask). */
347
+ readonly ModuleTimeout: "module_timeout";
348
+ /** The module hit its memory limit, or the heap poll caught it near the limit. */
349
+ readonly ModuleMemory: "module_memory";
350
+ /** The module threw (or failed to load) too many times. */
351
+ readonly ModuleError: "module_error";
352
+ /** The module's output broke the wire limits too many times. */
353
+ readonly ModuleOutputInvalid: "module_output_invalid";
354
+ /** The module stayed under the hard timeout but over the mean CPU budget for a whole window. */
355
+ readonly ModuleBudget: "module_budget";
356
+ /** The operator or the platform stopped the room (kill switch, takedown, disabled game). */
357
+ readonly Halted: "halted";
358
+ /** isolated-vm's wall-clock backstop stopped a call while the guest's own CPU stayed under its limit: the
359
+ * host stalled (contention, a GC pause, descheduled). The guest was cut off mid-call, so it is
360
+ * never called again; the room ends, but the module is not at fault. */
361
+ readonly HostStall: "host_stall";
362
+ /** The room's physics passed the physics meter for the third strike (§17.10). */
363
+ readonly PhysicsBudget: "physics_budget";
364
+ /** The room reached its age limit (§17.6 *Room lifetime*), announced like a drain. Not a fault. */
365
+ readonly RoomAge: "room_age";
366
+ /** The room sent more than its ceiling for a whole window (§17.6 *The downlink budget*): its module writes
367
+ * too much state or too many events for its seats. Lower what it writes; no strike comes first. */
368
+ readonly ModuleBandwidth: "module_bandwidth";
369
+ /** The physics core answered `internal` (C§11.3): every physics room on that instance ends. Never
370
+ * the module's fault. */
371
+ readonly PhysicsInternal: "physics_internal";
181
372
  };
373
+ type AuthorityCloseCode = (typeof AuthorityCloseCode)[keyof typeof AuthorityCloseCode];
374
+ /** A close frame's reason text as the vocabulary, or null: it comes from the network, so anything else reads as no reason.
375
+ * Nothing at the module's top level, so the relay's bridge bundle, which never closes an authority room, leaves all this out. */
376
+ declare function authorityCloseCodeOf(reason: unknown): AuthorityCloseCode | null;
377
+ /** What to tell a player when a room ends with a reason: the code is for the game's creator, and none of them is the player's to act on. */
378
+ declare const AUTHORITY_ROOM_ENDED_TEXT = "This match ended because of a problem with the game. Please try again.";
182
379
  declare const Limits: {
183
380
  readonly ROOM_MAX_CLIENTS: 64;
184
381
  readonly MAX_NAME_CHARS: 64;
@@ -243,6 +440,29 @@ declare const RelayTiming: {
243
440
  /** Embed tokens are re-checked for revocation on this cadence (REVOKED close on hit). */
244
441
  readonly REVOCATION_SWEEP_MS: 30000;
245
442
  };
443
+ declare const AuthorityTiming: {
444
+ /** Fixed simulation step rate when the module does not choose one. */
445
+ readonly TICK_HZ: 30;
446
+ /** How far behind the server clock clients render other entities (the interpolation buffer). */
447
+ readonly RENDER_DELAY_MS: 100;
448
+ /** The furthest back lag compensation rewinds for one input's `seen` snapshot. */
449
+ readonly MAX_REWIND_MS: 500;
450
+ /** Inputs buffered per seat before the oldest are folded away. */
451
+ readonly INPUT_BUFFER: 32;
452
+ /** State patch cadence. The spike measured its feel gates at 50 ms; 33 is an owner call. */
453
+ readonly PATCH_INTERVAL_MS: 50;
454
+ /** A predicting room repeats a starved seat's last input for at most this long of repeats not yet
455
+ * paid back (§17.11 *Input pacing*), then the seat holds: a vanished player stops instead of
456
+ * driving into a wall. Rocket League's client resends its last 10 frames of input in every packet
457
+ * (83 ms at 120 Hz), the gap its server's repeat bridges; 100 ms is that rounded up to whole ticks
458
+ * at every tick rate (12 at 120 Hz, 6 at 60, 3 at 30). */
459
+ readonly INPUT_REPEAT_MAX_MS: 100;
460
+ /** One starve run is repeated for at most this long; past it the seat holds as before (§17.11 *Input
461
+ * pacing*): a stick steady before a starve is less and less likely to stay so through it, and on
462
+ * car-ball (5 runs a profile) 4 repeats a run at 120 Hz kept its corrections over 20 u at the base's
463
+ * under loss where 12 doubled them. 4 ticks at 120 Hz, 2 at 60, 1 at 30. */
464
+ readonly INPUT_REPEAT_RUN_MS: 33;
465
+ };
246
466
  /** One owner of reconnection: the Colyseus SDK's in-place auto-reconnect, on from the first
247
467
  * millisecond (`minUptime: 0`), sized so the last attempt (~23.75s of backoff) lands inside the
248
468
  * 30s seat grace, and with no send queue — a stale queued pose or event must never replay. */
@@ -416,4 +636,4 @@ declare const ClockSync: {
416
636
  readonly WARMUP_ACKS: 30;
417
637
  };
418
638
 
419
- export { type ChatMessage, ClientMessage, type ClientMessageType, ClientReconnection, ClockSync, CloseCode, GLOBAL_RATE, type IceConfig, type IceServer, type InputEnvelope, Interpolation, JoinError, JoinOption, Limits, MAX_MESSAGES_PER_SECOND, MESSAGE_LANE, MIN_PROTOCOL_VERSION, type MatchEnded, type ObjectControlOperation, type ObjectControlReason, type ObjectControlRequest, type ObjectControlResult, type ObjectPublish, POSE_KEYS, PROTOCOL_VERSION, type PoseKey, type PosePublish, RATE_LANES, RESERVED_EVENT_PREFIXES, RESERVED_EVENT_TYPES, RESERVED_SHARED_PREFIX, type RateLane, RelayTiming, RoomType, SEND_TIME_KEY, SERVER_OWNED_JOIN_OPTIONS, STAGING_ROOM_PREFIX, ServerMessage, type ServerMessageType, type SharedWrite, type VoiceSignal, type VoiceSignalEnvelope, isReservedEventType, roomKeyFor, slugOfRoomKey };
639
+ export { AUTHORITY_ENCODER_BUFFER_BYTES, AUTHORITY_MAX_FRAME_BYTES, AUTHORITY_MAX_MESSAGES_PER_SECOND, AUTHORITY_MIN_PROTOCOL_VERSION, AUTHORITY_PHYSICS_TICK_WEIGHT, AUTHORITY_PHYSICS_UNITS, AUTHORITY_PROTOCOL_VERSION, AUTHORITY_ROOM_ENDED_TEXT, AUTHORITY_SDK_LABEL, AUTHORITY_SERVER_OWNED_JOIN_OPTIONS, AUTHORITY_WINDOW, AuthorityCaps, AuthorityCloseCode, type AuthorityDrainNotice, AuthorityJoinOption, AuthorityTiming, type ChatMessage, ClientMessage, type ClientMessageType, ClientReconnection, ClockSync, CloseCode, GLOBAL_RATE, type IceConfig, type IceServer, type InputEnvelope, Interpolation, JoinError, JoinOption, Limits, MAX_MESSAGES_PER_SECOND, MESSAGE_LANE, MIN_PROTOCOL_VERSION, type MatchEnded, type ObjectControlOperation, type ObjectControlReason, type ObjectControlRequest, type ObjectControlResult, type ObjectPublish, POSE_KEYS, PROTOCOL_VERSION, type PoseKey, type PosePublish, type ProtocolWindow, RATE_LANES, RELAY_WINDOW, RESERVED_EVENT_PREFIXES, RESERVED_EVENT_TYPES, RESERVED_SHARED_PREFIX, type RateLane, RelayTiming, RoomType, SEND_TIME_KEY, SERVER_OWNED_JOIN_OPTIONS, STAGING_ROOM_PREFIX, SeatCloseReason, ServerMessage, type ServerMessageType, type SharedWrite, type VoiceSignal, type VoiceSignalEnvelope, authorityCloseCodeOf, authorityPhysicsBudgetSixtieths, authorityRoomUnits, authorityTickBudgetMs, capsOf, inProtocolWindow, isReservedEventType, roomKeyFor, slugOfRoomKey };
package/dist/protocol.js CHANGED
@@ -1,4 +1,19 @@
1
1
  import {
2
+ AUTHORITY_ENCODER_BUFFER_BYTES,
3
+ AUTHORITY_MAX_FRAME_BYTES,
4
+ AUTHORITY_MAX_MESSAGES_PER_SECOND,
5
+ AUTHORITY_MIN_PROTOCOL_VERSION,
6
+ AUTHORITY_PHYSICS_TICK_WEIGHT,
7
+ AUTHORITY_PHYSICS_UNITS,
8
+ AUTHORITY_PROTOCOL_VERSION,
9
+ AUTHORITY_ROOM_ENDED_TEXT,
10
+ AUTHORITY_SDK_LABEL,
11
+ AUTHORITY_SERVER_OWNED_JOIN_OPTIONS,
12
+ AUTHORITY_WINDOW,
13
+ AuthorityCaps,
14
+ AuthorityCloseCode,
15
+ AuthorityJoinOption,
16
+ AuthorityTiming,
2
17
  ClientMessage,
3
18
  ClientReconnection,
4
19
  ClockSync,
@@ -14,6 +29,7 @@ import {
14
29
  POSE_KEYS,
15
30
  PROTOCOL_VERSION,
16
31
  RATE_LANES,
32
+ RELAY_WINDOW,
17
33
  RESERVED_EVENT_PREFIXES,
18
34
  RESERVED_EVENT_TYPES,
19
35
  RESERVED_SHARED_PREFIX,
@@ -22,12 +38,34 @@ import {
22
38
  SEND_TIME_KEY,
23
39
  SERVER_OWNED_JOIN_OPTIONS,
24
40
  STAGING_ROOM_PREFIX,
41
+ SeatCloseReason,
25
42
  ServerMessage,
43
+ authorityCloseCodeOf,
44
+ authorityPhysicsBudgetSixtieths,
45
+ authorityRoomUnits,
46
+ authorityTickBudgetMs,
47
+ capsOf,
48
+ inProtocolWindow,
26
49
  isReservedEventType,
27
50
  roomKeyFor,
28
51
  slugOfRoomKey
29
- } from "./chunk-C52XFIB6.js";
52
+ } from "./chunk-CSQEEANB.js";
30
53
  export {
54
+ AUTHORITY_ENCODER_BUFFER_BYTES,
55
+ AUTHORITY_MAX_FRAME_BYTES,
56
+ AUTHORITY_MAX_MESSAGES_PER_SECOND,
57
+ AUTHORITY_MIN_PROTOCOL_VERSION,
58
+ AUTHORITY_PHYSICS_TICK_WEIGHT,
59
+ AUTHORITY_PHYSICS_UNITS,
60
+ AUTHORITY_PROTOCOL_VERSION,
61
+ AUTHORITY_ROOM_ENDED_TEXT,
62
+ AUTHORITY_SDK_LABEL,
63
+ AUTHORITY_SERVER_OWNED_JOIN_OPTIONS,
64
+ AUTHORITY_WINDOW,
65
+ AuthorityCaps,
66
+ AuthorityCloseCode,
67
+ AuthorityJoinOption,
68
+ AuthorityTiming,
31
69
  ClientMessage,
32
70
  ClientReconnection,
33
71
  ClockSync,
@@ -43,6 +81,7 @@ export {
43
81
  POSE_KEYS,
44
82
  PROTOCOL_VERSION,
45
83
  RATE_LANES,
84
+ RELAY_WINDOW,
46
85
  RESERVED_EVENT_PREFIXES,
47
86
  RESERVED_EVENT_TYPES,
48
87
  RESERVED_SHARED_PREFIX,
@@ -51,7 +90,14 @@ export {
51
90
  SEND_TIME_KEY,
52
91
  SERVER_OWNED_JOIN_OPTIONS,
53
92
  STAGING_ROOM_PREFIX,
93
+ SeatCloseReason,
54
94
  ServerMessage,
95
+ authorityCloseCodeOf,
96
+ authorityPhysicsBudgetSixtieths,
97
+ authorityRoomUnits,
98
+ authorityTickBudgetMs,
99
+ capsOf,
100
+ inProtocolWindow,
55
101
  isReservedEventType,
56
102
  roomKeyFor,
57
103
  slugOfRoomKey