@genex-ai/multiplayer 0.17.1 → 0.17.6
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.
- package/PROTOCOL.md +688 -7
- package/README.md +263 -0
- package/dist/authority/fast-udp.d.ts +13 -0
- package/dist/authority/fast-udp.js +52 -0
- package/dist/authority/fast-webtransport.d.ts +45 -0
- package/dist/authority/fast-webtransport.js +124 -0
- package/dist/authority/index.d.ts +2333 -0
- package/dist/authority/index.js +758 -0
- package/dist/authority/module.d.ts +1 -0
- package/dist/authority/module.js +12 -0
- package/dist/bridge-authority.d.ts +100 -0
- package/dist/bridge-authority.global.js +14 -0
- package/dist/bridge-authority.js +286 -0
- package/dist/bridge-core-Dhc73GC8.d.ts +27 -0
- package/dist/bridge.d.ts +26 -20
- package/dist/bridge.global.js +7 -7
- package/dist/bridge.js +17 -48
- package/dist/chunk-4R7C2TLH.js +68 -0
- package/dist/chunk-5JGRFT2N.js +3646 -0
- package/dist/{chunk-3ZUPU3GT.js → chunk-7QVOIHJF.js} +13 -122
- package/dist/chunk-K3SF5VDS.js +27 -0
- package/dist/chunk-UX3F6YTV.js +143 -0
- package/dist/chunk-Y6XHXDIK.js +6617 -0
- package/dist/{chunk-C52XFIB6.js → chunk-ZSWF4VCN.js} +141 -4
- package/dist/fast-client-CZ41v-oB.d.ts +465 -0
- package/dist/index.d.ts +3 -5
- package/dist/index.js +3 -2
- package/dist/join-CGoInvUM.d.ts +6 -0
- package/dist/module-DqtFb5wA.d.ts +1436 -0
- package/dist/physics-predict-49udN3a1.d.ts +1208 -0
- package/dist/protocol.d.ts +137 -2
- package/dist/protocol.js +33 -1
- package/package.json +33 -3
package/dist/protocol.d.ts
CHANGED
|
@@ -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,86 @@ 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
|
+
};
|
|
57
|
+
/** Client capabilities (§17.10 *Joining*). */
|
|
58
|
+
declare const AuthorityCaps: {
|
|
59
|
+
/** Decodes and draws §17.10's physics bodies. A physics room refuses a join without it (426). An
|
|
60
|
+
* SDK sends it only once its drawing passes `physics-draw.json` and, for an engine SDK, its own
|
|
61
|
+
* probe on the pinned core (§17.10 *Conformance*). */
|
|
62
|
+
readonly PHYSICS: "physics@1";
|
|
63
|
+
/** Also predicts a predicting room's bodies (§17.11): it builds the room's world from `physDesc`,
|
|
64
|
+
* adopts and replays keyframes, and draws its predicted bodies. A client sends it beside
|
|
65
|
+
* `physics@1`, never alone; a room serves the same state to both, so the cap only says what the
|
|
66
|
+
* client does. An SDK sends it only once it passes `physics-predict.json` (§17.11 *Conformance*). */
|
|
67
|
+
readonly PHYSICS_PREDICT: "physics@2";
|
|
68
|
+
/** Reconciles a predicting room's repeated inputs (§17.11 *Input pacing*): it predicts its own
|
|
69
|
+
* entity from the state as stepped through `ackSeq + inRep`, not `ackSeq`. A predicting room repeats
|
|
70
|
+
* a starved seat's last input only for a client that sends it; without it a starved tick steps
|
|
71
|
+
* nothing, as before. An SDK sends it only once it passes `input-repeat.json`. */
|
|
72
|
+
readonly INPUT_REPEAT: "repeat@1";
|
|
73
|
+
/** Collides with, rides and draws a room's declared lifts (§17.11 *Lifts*). A room that declares
|
|
74
|
+
* lifts refuses a join without it (426, `lifts@1 required`): a client that does not pose them
|
|
75
|
+
* would fall through them in its prediction. An SDK sends it only once it passes `lifts.json`. */
|
|
76
|
+
readonly LIFTS: "lifts@1";
|
|
77
|
+
/** Writes into each input the server tick its prediction steps it at (`AuthorityInput.tick`, modulo
|
|
78
|
+
* 2^16; §17.11 *The input's tick*): the server then judges a re-timed input (a tick that steps two of
|
|
79
|
+
* a seat's inputs or none) at the tick it was meant for — a firstperson view on a spinning lift
|
|
80
|
+
* carried by the lift's turn between the two, lag compensation's lift frames. Without it the field
|
|
81
|
+
* is ignored, as before. */
|
|
82
|
+
readonly INPUT_TICK: "tick@1";
|
|
83
|
+
/** Moves the seat's inputs and motion state to the fast channel (§17.12): redundant input datagrams
|
|
84
|
+
* and ack-delta snapshots over UDP or WebTransport, the WebSocket kept for everything else. Sent
|
|
85
|
+
* beside `tick@1`. An SDK sends it only once it passes `fast-transport.json` and its transport
|
|
86
|
+
* tests; a room that does not offer the channel ignores it. */
|
|
87
|
+
readonly FAST: "fast@1";
|
|
88
|
+
readonly MAX_CAPS: 16;
|
|
89
|
+
readonly MAX_CAP_CHARS: 32;
|
|
90
|
+
};
|
|
91
|
+
/** A join's `caps` option as a list, or null when it is malformed (refused with 400). */
|
|
92
|
+
declare function capsOf(value: unknown): string[] | null;
|
|
93
|
+
/** Placement units a physics room weighs at up to 60 Hz (§17.10 *Admission and placement*); any
|
|
94
|
+
* other room weighs 1. */
|
|
95
|
+
declare const AUTHORITY_PHYSICS_UNITS = 6;
|
|
96
|
+
/** How many times its 60 Hz weight a physics room weighs at each tick rate (§17.10 *Admission and
|
|
97
|
+
* placement*): a 120 Hz room steps twice as often, so it places and meters as twelve rooms. */
|
|
98
|
+
declare const AUTHORITY_PHYSICS_TICK_WEIGHT: {
|
|
99
|
+
readonly 20: 1;
|
|
100
|
+
readonly 30: 1;
|
|
101
|
+
readonly 60: 1;
|
|
102
|
+
readonly 120: 2;
|
|
103
|
+
};
|
|
104
|
+
/** A room's weight per unit the platform weighs a room by: 1 without physics, else
|
|
105
|
+
* {@link AUTHORITY_PHYSICS_UNITS} times its tick rate's {@link AUTHORITY_PHYSICS_TICK_WEIGHT}. */
|
|
106
|
+
declare function authorityRoomUnits(physics: boolean, tickHz: keyof typeof AUTHORITY_PHYSICS_TICK_WEIGHT): number;
|
|
107
|
+
/** How many 1/60 s of simulated time one tick's physics budget covers at `tickHz` (§17.10 *Limits
|
|
108
|
+
* and failures*): the 1/60 s a tick steps up to 60 Hz, so a room's budget per simulated second is the
|
|
109
|
+
* 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
|
|
110
|
+
* 120 Hz room gets twice the CPU per simulated second, as it weighs twice in placement. Per second it
|
|
111
|
+
* is always {@link AUTHORITY_PHYSICS_TICK_WEIGHT} times a 60 Hz room's. */
|
|
112
|
+
declare function authorityPhysicsBudgetSixtieths(tickHz: keyof typeof AUTHORITY_PHYSICS_TICK_WEIGHT): number;
|
|
113
|
+
/** The simulated time one tick's budgets are written for at `tickHz`, ms: its
|
|
114
|
+
* {@link authorityPhysicsBudgetSixtieths} (50, 33.3 and 16.7 at 20, 30 and 60 Hz, and a 60 Hz tick's
|
|
115
|
+
* 16.7 at 120 Hz). Placement's event-loop gate is a share of it (colyseus `authorityLoopP99MaxMs`). */
|
|
116
|
+
declare function authorityTickBudgetMs(tickHz: keyof typeof AUTHORITY_PHYSICS_TICK_WEIGHT): number;
|
|
117
|
+
/** Colyseus's `Encoder.BUFFER_SIZE` on every authority worker (§17.10 *Interest*), set before any
|
|
118
|
+
* room is created: a physics room's full state outgrows the 16 KiB default, and a predicting room's
|
|
119
|
+
* (§17.11: a canonical descriptor on every body, up to 32 shared shapes of 16 KiB) measured 672 KB.
|
|
120
|
+
* A full sync past it is re-run in a grown buffer, which sent the C# and C-core decoders a view they
|
|
121
|
+
* could not decode, so it must never be taken. 1 MiB, written as one literal: esbuild keeps an
|
|
122
|
+
* unused `1024 * 1024` in the relay bridge build and drops a literal. */
|
|
123
|
+
declare const AUTHORITY_ENCODER_BUFFER_BYTES = 1048576;
|
|
29
124
|
/** Join options only the relay itself may set; a client sending any of them is refused (400). */
|
|
30
125
|
declare const SERVER_OWNED_JOIN_OPTIONS: readonly ["clients", "preset", "winCondition", "config", "matchmade"];
|
|
126
|
+
/** The authority room's server-owned options (§17.2): the relay's plus what the authority server
|
|
127
|
+
* 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
|
|
128
|
+
* {@link SERVER_OWNED_JOIN_OPTIONS} would start refusing protocol-3 joins that send them today. */
|
|
129
|
+
declare const AUTHORITY_SERVER_OWNED_JOIN_OPTIONS: readonly ["clients", "preset", "winCondition", "config", "matchmade", "moduleSha", "tickHz", "maxPlayers", "lagComp", "seed", "units", "leaseId", "region"];
|
|
31
130
|
/** Join refusal codes (the matchmaking error's `code`; the message names the reason). */
|
|
32
131
|
declare const JoinError: {
|
|
33
132
|
/** A server-owned option was sent. */
|
|
@@ -36,8 +135,17 @@ declare const JoinError: {
|
|
|
36
135
|
readonly AUTH_REQUIRED: 401;
|
|
37
136
|
/** Token for another game ('wrong game'), or the room's guest cap is full. */
|
|
38
137
|
readonly FORBIDDEN: 403;
|
|
39
|
-
/** `protocol` missing or outside
|
|
138
|
+
/** `protocol` missing or outside the room type's window ({@link RELAY_WINDOW},
|
|
139
|
+
* {@link AUTHORITY_WINDOW}). Update the client. */
|
|
40
140
|
readonly PROTOCOL_UNSUPPORTED: 426;
|
|
141
|
+
/** The game's owner is not entitled to server-authoritative rooms. Terminal: do not retry. */
|
|
142
|
+
readonly NOT_ENTITLED: 402;
|
|
143
|
+
/** The owner's room quota, concurrency cap or credits refused a NEW room. Live rooms never close for it. */
|
|
144
|
+
readonly ROOM_QUOTA: 429;
|
|
145
|
+
/** The game has no published room module on this channel, or it could not be loaded. */
|
|
146
|
+
readonly MODULE_UNAVAILABLE: 424;
|
|
147
|
+
/** No authority server can take the room right now, or admission could not be checked. Retry later. */
|
|
148
|
+
readonly AUTHORITY_CAPACITY: 503;
|
|
41
149
|
};
|
|
42
150
|
/** A preview (staging) build's rooms: the relay keys them `preview--<slug>`, apart from the live
|
|
43
151
|
* game's rooms, so testers on a preview link play together and never meet real players. The
|
|
@@ -178,6 +286,10 @@ declare const CloseCode: {
|
|
|
178
286
|
readonly REVOKED: 4401;
|
|
179
287
|
/** A newer session of the same player took the seat (second tab, or the page reloaded). */
|
|
180
288
|
readonly SUPERSEDED: 4409;
|
|
289
|
+
/** The operator or the platform halted the room (kill switch, takedown, disabled game). */
|
|
290
|
+
readonly MODULE_HALTED: 4500;
|
|
291
|
+
/** The game's room module broke its limits or threw; the room is gone. */
|
|
292
|
+
readonly MODULE_FAULT: 4501;
|
|
181
293
|
};
|
|
182
294
|
declare const Limits: {
|
|
183
295
|
readonly ROOM_MAX_CLIENTS: 64;
|
|
@@ -243,6 +355,29 @@ declare const RelayTiming: {
|
|
|
243
355
|
/** Embed tokens are re-checked for revocation on this cadence (REVOKED close on hit). */
|
|
244
356
|
readonly REVOCATION_SWEEP_MS: 30000;
|
|
245
357
|
};
|
|
358
|
+
declare const AuthorityTiming: {
|
|
359
|
+
/** Fixed simulation step rate when the module does not choose one. */
|
|
360
|
+
readonly TICK_HZ: 30;
|
|
361
|
+
/** How far behind the server clock clients render other entities (the interpolation buffer). */
|
|
362
|
+
readonly RENDER_DELAY_MS: 100;
|
|
363
|
+
/** The furthest back lag compensation rewinds for one input's `seen` snapshot. */
|
|
364
|
+
readonly MAX_REWIND_MS: 500;
|
|
365
|
+
/** Inputs buffered per seat before the oldest are folded away. */
|
|
366
|
+
readonly INPUT_BUFFER: 32;
|
|
367
|
+
/** State patch cadence. The spike measured its feel gates at 50 ms; 33 is an owner call. */
|
|
368
|
+
readonly PATCH_INTERVAL_MS: 50;
|
|
369
|
+
/** A predicting room repeats a starved seat's last input for at most this long of repeats not yet
|
|
370
|
+
* paid back (§17.11 *Input pacing*), then the seat holds: a vanished player stops instead of
|
|
371
|
+
* driving into a wall. Rocket League's client resends its last 10 frames of input in every packet
|
|
372
|
+
* (83 ms at 120 Hz), the gap its server's repeat bridges; 100 ms is that rounded up to whole ticks
|
|
373
|
+
* at every tick rate (12 at 120 Hz, 6 at 60, 3 at 30). */
|
|
374
|
+
readonly INPUT_REPEAT_MAX_MS: 100;
|
|
375
|
+
/** One starve run is repeated for at most this long; past it the seat holds as before (§17.11 *Input
|
|
376
|
+
* pacing*): a stick steady before a starve is less and less likely to stay so through it, and on
|
|
377
|
+
* car-ball (5 runs a profile) 4 repeats a run at 120 Hz kept its corrections over 20 u at the base's
|
|
378
|
+
* under loss where 12 doubled them. 4 ticks at 120 Hz, 2 at 60, 1 at 30. */
|
|
379
|
+
readonly INPUT_REPEAT_RUN_MS: 33;
|
|
380
|
+
};
|
|
246
381
|
/** One owner of reconnection: the Colyseus SDK's in-place auto-reconnect, on from the first
|
|
247
382
|
* millisecond (`minUptime: 0`), sized so the last attempt (~23.75s of backoff) lands inside the
|
|
248
383
|
* 30s seat grace, and with no send queue — a stale queued pose or event must never replay. */
|
|
@@ -416,4 +551,4 @@ declare const ClockSync: {
|
|
|
416
551
|
readonly WARMUP_ACKS: 30;
|
|
417
552
|
};
|
|
418
553
|
|
|
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 };
|
|
554
|
+
export { AUTHORITY_ENCODER_BUFFER_BYTES, AUTHORITY_MIN_PROTOCOL_VERSION, AUTHORITY_PHYSICS_TICK_WEIGHT, AUTHORITY_PHYSICS_UNITS, AUTHORITY_PROTOCOL_VERSION, AUTHORITY_SERVER_OWNED_JOIN_OPTIONS, AUTHORITY_WINDOW, AuthorityCaps, 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, ServerMessage, type ServerMessageType, type SharedWrite, type VoiceSignal, type VoiceSignalEnvelope, authorityPhysicsBudgetSixtieths, authorityRoomUnits, authorityTickBudgetMs, capsOf, inProtocolWindow, isReservedEventType, roomKeyFor, slugOfRoomKey };
|
package/dist/protocol.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AUTHORITY_ENCODER_BUFFER_BYTES,
|
|
3
|
+
AUTHORITY_MIN_PROTOCOL_VERSION,
|
|
4
|
+
AUTHORITY_PHYSICS_TICK_WEIGHT,
|
|
5
|
+
AUTHORITY_PHYSICS_UNITS,
|
|
6
|
+
AUTHORITY_PROTOCOL_VERSION,
|
|
7
|
+
AUTHORITY_SERVER_OWNED_JOIN_OPTIONS,
|
|
8
|
+
AUTHORITY_WINDOW,
|
|
9
|
+
AuthorityCaps,
|
|
10
|
+
AuthorityJoinOption,
|
|
11
|
+
AuthorityTiming,
|
|
2
12
|
ClientMessage,
|
|
3
13
|
ClientReconnection,
|
|
4
14
|
ClockSync,
|
|
@@ -14,6 +24,7 @@ import {
|
|
|
14
24
|
POSE_KEYS,
|
|
15
25
|
PROTOCOL_VERSION,
|
|
16
26
|
RATE_LANES,
|
|
27
|
+
RELAY_WINDOW,
|
|
17
28
|
RESERVED_EVENT_PREFIXES,
|
|
18
29
|
RESERVED_EVENT_TYPES,
|
|
19
30
|
RESERVED_SHARED_PREFIX,
|
|
@@ -23,11 +34,26 @@ import {
|
|
|
23
34
|
SERVER_OWNED_JOIN_OPTIONS,
|
|
24
35
|
STAGING_ROOM_PREFIX,
|
|
25
36
|
ServerMessage,
|
|
37
|
+
authorityPhysicsBudgetSixtieths,
|
|
38
|
+
authorityRoomUnits,
|
|
39
|
+
authorityTickBudgetMs,
|
|
40
|
+
capsOf,
|
|
41
|
+
inProtocolWindow,
|
|
26
42
|
isReservedEventType,
|
|
27
43
|
roomKeyFor,
|
|
28
44
|
slugOfRoomKey
|
|
29
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-ZSWF4VCN.js";
|
|
30
46
|
export {
|
|
47
|
+
AUTHORITY_ENCODER_BUFFER_BYTES,
|
|
48
|
+
AUTHORITY_MIN_PROTOCOL_VERSION,
|
|
49
|
+
AUTHORITY_PHYSICS_TICK_WEIGHT,
|
|
50
|
+
AUTHORITY_PHYSICS_UNITS,
|
|
51
|
+
AUTHORITY_PROTOCOL_VERSION,
|
|
52
|
+
AUTHORITY_SERVER_OWNED_JOIN_OPTIONS,
|
|
53
|
+
AUTHORITY_WINDOW,
|
|
54
|
+
AuthorityCaps,
|
|
55
|
+
AuthorityJoinOption,
|
|
56
|
+
AuthorityTiming,
|
|
31
57
|
ClientMessage,
|
|
32
58
|
ClientReconnection,
|
|
33
59
|
ClockSync,
|
|
@@ -43,6 +69,7 @@ export {
|
|
|
43
69
|
POSE_KEYS,
|
|
44
70
|
PROTOCOL_VERSION,
|
|
45
71
|
RATE_LANES,
|
|
72
|
+
RELAY_WINDOW,
|
|
46
73
|
RESERVED_EVENT_PREFIXES,
|
|
47
74
|
RESERVED_EVENT_TYPES,
|
|
48
75
|
RESERVED_SHARED_PREFIX,
|
|
@@ -52,6 +79,11 @@ export {
|
|
|
52
79
|
SERVER_OWNED_JOIN_OPTIONS,
|
|
53
80
|
STAGING_ROOM_PREFIX,
|
|
54
81
|
ServerMessage,
|
|
82
|
+
authorityPhysicsBudgetSixtieths,
|
|
83
|
+
authorityRoomUnits,
|
|
84
|
+
authorityTickBudgetMs,
|
|
85
|
+
capsOf,
|
|
86
|
+
inProtocolWindow,
|
|
55
87
|
isReservedEventType,
|
|
56
88
|
roomKeyFor,
|
|
57
89
|
slugOfRoomKey
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genex-ai/multiplayer",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.6",
|
|
4
4
|
"description": "The multiplayer client wrapper + shared room schema for genex.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,7 +26,33 @@
|
|
|
26
26
|
"types": "./dist/bridge.d.ts",
|
|
27
27
|
"import": "./dist/bridge.js"
|
|
28
28
|
},
|
|
29
|
-
"./bridge
|
|
29
|
+
"./bridge/authority": {
|
|
30
|
+
"@genex-ai/source": "./src/bridge-authority.ts",
|
|
31
|
+
"types": "./dist/bridge-authority.d.ts",
|
|
32
|
+
"import": "./dist/bridge-authority.js"
|
|
33
|
+
},
|
|
34
|
+
"./authority": {
|
|
35
|
+
"@genex-ai/source": "./src/authority/index.ts",
|
|
36
|
+
"types": "./dist/authority/index.d.ts",
|
|
37
|
+
"import": "./dist/authority/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./authority/module": {
|
|
40
|
+
"@genex-ai/source": "./src/authority/module.ts",
|
|
41
|
+
"types": "./dist/authority/module.d.ts",
|
|
42
|
+
"import": "./dist/authority/module.js"
|
|
43
|
+
},
|
|
44
|
+
"./authority/fast-udp": {
|
|
45
|
+
"@genex-ai/source": "./src/authority/fast-udp.ts",
|
|
46
|
+
"types": "./dist/authority/fast-udp.d.ts",
|
|
47
|
+
"import": "./dist/authority/fast-udp.js"
|
|
48
|
+
},
|
|
49
|
+
"./authority/fast-webtransport": {
|
|
50
|
+
"@genex-ai/source": "./src/authority/fast-webtransport.ts",
|
|
51
|
+
"types": "./dist/authority/fast-webtransport.d.ts",
|
|
52
|
+
"import": "./dist/authority/fast-webtransport.js"
|
|
53
|
+
},
|
|
54
|
+
"./bridge.global.js": "./dist/bridge.global.js",
|
|
55
|
+
"./bridge-authority.global.js": "./dist/bridge-authority.global.js"
|
|
30
56
|
},
|
|
31
57
|
"files": [
|
|
32
58
|
"dist",
|
|
@@ -36,7 +62,7 @@
|
|
|
36
62
|
"build": "tsup",
|
|
37
63
|
"typecheck": "tsc --noEmit",
|
|
38
64
|
"test": "node --conditions=@genex-ai/source --test test/*.test.ts",
|
|
39
|
-
"check": "pnpm build && publint && attw --pack . --profile esm-only --exclude-entrypoints ./bridge.global.js",
|
|
65
|
+
"check": "pnpm build && node --test test/authority-module.test.ts test/relay-surface.test.ts test/bridge-bundle.test.ts && publint && attw --pack . --profile esm-only --exclude-entrypoints ./bridge.global.js ./bridge-authority.global.js",
|
|
40
66
|
"prepack": "pnpm build && publint"
|
|
41
67
|
},
|
|
42
68
|
"publishConfig": {
|
|
@@ -60,7 +86,11 @@
|
|
|
60
86
|
},
|
|
61
87
|
"devDependencies": {
|
|
62
88
|
"@arethetypeswrong/cli": "^0.18.0",
|
|
89
|
+
"@colyseus/core": "^0.18.18",
|
|
90
|
+
"@colyseus/uwebsockets-transport": "^0.18.4",
|
|
91
|
+
"@colyseus/ws-transport": "^0.18.4",
|
|
63
92
|
"@genex-ai/embed-sdk": "workspace:*",
|
|
93
|
+
"@genex-ai/physics": "file:../authority-host/vendor/genex-ai-physics-0.1.0.tgz",
|
|
64
94
|
"publint": "^0.3.0",
|
|
65
95
|
"tsup": "^8.0.0",
|
|
66
96
|
"typescript": "^5.8.0"
|