@genex-ai/multiplayer 0.17.9 → 0.17.11
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 +3 -1
- package/README.md +1 -1
- package/dist/authority/fast-webtransport.js +2 -2
- package/dist/authority/index.d.ts +84 -2
- package/dist/authority/index.js +26 -4
- package/dist/bridge-authority.global.js +8 -8
- package/dist/bridge-authority.js +4 -4
- package/dist/bridge.js +3 -3
- package/dist/{chunk-WEMRRIHH.js → chunk-2CSX5WA6.js} +1 -1
- package/dist/{chunk-ZDGSUR6E.js → chunk-5WENVWVO.js} +4 -3
- package/dist/{chunk-TEHGMFAG.js → chunk-BB6OIWQ2.js} +1 -1
- package/dist/{chunk-MQYARUGU.js → chunk-I3DNVGGC.js} +178 -18
- package/dist/{chunk-DJ2XYETS.js → chunk-OESKZODQ.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/protocol.d.ts +1 -1
- package/dist/protocol.js +1 -1
- package/package.json +1 -1
package/PROTOCOL.md
CHANGED
|
@@ -633,6 +633,8 @@ The TypeScript client session is `connectAuthority` (`src/authority/session.ts`)
|
|
|
633
633
|
- An authority client sends `protocol: 4` (`AUTHORITY_PROTOCOL_VERSION`). Authority rooms accept `AUTHORITY_WINDOW` = `[4, 4]`; anything else is refused with **426** before a room is found or created. A relay room refuses 4 the same way (§2), so neither kind of client can land in the other kind of room.
|
|
634
634
|
- Authority rooms are served by their own cluster, never by a relay. The embed layer supplies its URLs next to the relay URLs (`colyseus.authorityUrls`; in local test mode, a loopback `genex_authority_url` on a loopback page, with a fixed local credential in place of a token), and the same cluster by region (`colyseus.authorityRegions`, below).
|
|
635
635
|
- *Regions.* `colyseus.authorityRegions` is a list of `{ region, urls[] }`; each region is its own matchmaking pool, because the server filters rooms by the region a join entered through (the server-owned `region` option, §17.2). A client reads it leniently: an entry without a non-empty name or without a non-empty url string is dropped, and a repeated name keeps its first entry. When no entry is usable, every `authorityUrls` entry is a region of its own (an older stand, local test mode). With one region the client joins through its first url. With several, it MUST probe as §3.1 does, a preference and never a gate: 3 samples per region, sample n going to the region's url n modulo its url count; a sample is failed when it has not answered after 4000 ms, which is also the ceiling of the whole probe, and once any sample has answered the others get 1000 ms more. A url's latency is its best answered sample (a finite number of ms, at least 0). Regions are tried in this order: those with an answer, nearest first (a tie keeps list order), each entered through its best url (the first on a tie); then the silent ones in list order, through their first url. A dead path moves to the next region at once: no answer at all, a gateway's 502 or 504, or Cloudflare's 520 to 526 and 530. Anything but those and 503 (with 4213, a process shutting down, which a sibling answers on the next try) is the server's answer and final. A join refused 503 twice in a row on one region moves to the next region at once; any other 503 waits the capacity schedule's next step on the same region, and the join gives up with the last refusal when the schedule is spent. An explicit `url` (an invite: the inviter's session url) skips the probe, so a party plays in its leader's region. `netcode-bench/conformance/authority/authority-regions.json` pins every rule; the TypeScript, Unreal, Unity and Rust clients pass it exactly. The Godot client joins its first url (labelled in CI).
|
|
636
|
+
- *Finding players.* Because each region is its own pool, a client that only ever entered its nearest region would leave two players in different regions alone, each in an empty room. So a pool join (the `joinOrCreate` of the next bullet: not a join by code, a private create, a rejoin or an explicit `url`) first asks for a room that already exists, and opens one only when no region in reach has one. A room a join can still enter has a player in it, so this is where the players are. The regions asked are the answered ones whose latency (the probe's best sample) is at most `maxPingMs`, nearest first; the default is 350 ms, and anything but a finite number of ms, at least 0, is the default. Fewer than two such regions is no search, since the join-or-create finds its own region's room itself. Each is asked with Colyseus's `join`, carrying the options the `joinOrCreate` would: seated, the player is in that region; refused, the next region is asked when the refusal is one of *Regions*' dead paths or capacity answers (Colyseus's own answer for no matching room is 521, one of them), and any other refusal is the server's answer about the player or the game, which ends the join with no room opened. When no region asked has a room, the join goes on as *Regions* says: `joinOrCreate`, nearest region first. A game may turn the search off (the rule `nearest`; any other value is `players`, the default), and a player may pin one region by its name: then that region alone is joined and created in, through its best url, and a name the list does not have is no pin. A join by code ignores a pin: its room is where it is. Nothing here is sent to a server or changes one: a client that searches plays with clients that do not. `authority-regions.json` pins the regions asked, where the room is then opened and what each refused ask does (`searches`, `searchRefusals`); the TypeScript, Unreal, Unity and Rust clients pass it exactly. The Godot client joins its first url and looks for no one.
|
|
637
|
+
- *Regrouping.* Two players who start at the same moment in two regions each find no room and each open one, and *Finding players* never runs again for them. So while a player is alone in a pool room (its state lists no other player), the client keeps asking for a room that already has players, and moves the seat there. Every client reads the regions in one order, so of two players each alone in their own region exactly one moves: a client asks only the regions listed BEFORE the one its seat is in, nearest first, among the answered ones no farther than `maxPingMs` (the join's own probe results). It asks with Colyseus's `join` and the pool's options, after each wait of 2, 4, 9, 15 and then every 30 seconds; with company it only looks again after 2 seconds, and the waits start over the next time it is alone. A seat found is given back when, while it was asked for, the player's own room gained company, was lost or was left. Otherwise it is adopted once its first state has landed, as a seat is after a drain (§17.13): the game keeps its session, hears `rejoined` with `moved` set, and the room the player was alone in is left. A refused ask is never an error; the next region is asked. Nothing is asked while a lost room is being replaced, for a private room, a room joined by code, an explicit `url`, a pinned region or the rule `nearest`, and a game may turn regrouping off. After a move the regions listed before the new one are the ones asked. `authority-regions.json` pins the regions asked and the waits (`regroups`, `regroup`). A region picker needs no join: a client may probe the regions as a join does and show each one's latency, and the region of a seat is the one whose urls hold the seat's url.
|
|
636
638
|
- A client joins with `joinOrCreate('authority', { gameId, embedToken, name, protocol: 4 })`, or names a pool or a private room (§17.2 *Choosing a room*). The token rules of §3.2 apply. A preview (staging) token joins the game's staging module, in rooms apart from the live game's (§3.4). A join lands in a room running the module the game currently ships: once a newer module has a room, new joins go there, while rooms on the older one keep their players until they empty.
|
|
637
639
|
- Appending a schema field, adding a message or adding an optional key is not a bump; the §2 bump rules apply to this section with `AUTHORITY_PROTOCOL_VERSION` in place of `PROTOCOL_VERSION`.
|
|
638
640
|
|
|
@@ -655,7 +657,7 @@ A new authority room is admitted by the platform before it is created. Admission
|
|
|
655
657
|
|
|
656
658
|
- `matchKey` (string): the pool to join. It is 1 to 32 characters of `a-z 0-9 . _ : -`, the first a letter or a digit (`AuthorityRoomLimits`, `src/authority/room-key.ts`). Anything else, a value of any other type included, is refused with **400** before the token is looked at and before any room exists. Absent and `''` are the same: no key. Rooms are found by game, module, region and key, and the server writes `''` into the filter when no key was sent, so a join without a key never lands in a keyed room. The key narrows the pool the server already chose and replaces none of it: the game and its channel come from the verified token and the region from the worker, so no key reaches another game, another region, or the staging module from live. A key is the client's choice, so a module MUST treat one it does not know as its default and never as an error.
|
|
657
659
|
- `private` (boolean): `create('authority', { …, private: true })` makes a private room; any other type is refused with **400**. A private room is unlisted from before its first await, so `joinOrCreate` and `join` never reach it, whatever key they send, and a `joinOrCreate` that carries `private` may land in a public room. The room's code is its `roomId`, returned by `create`. A private room takes a `matchKey` like any other.
|
|
658
|
-
- *Join by code.* `joinById(code, { … })` reaches that room and no other. A code is 1 to 32 characters of `A-Z a-z 0-9 _ -`, and a client refuses any other before sending it, because a code goes into a url. The room still refuses a seat for another game or channel (403) and a join that entered through another region (**421**), neither taking a seat. A `matchKey` sent with a code is checked (400) and then has no effect: the room's key is its own. A client MUST NOT send one, and an SDK refuses the pair. A client walks its regions in §17.1's order: on 421 and on Colyseus's 522 (no such room here, or it is full or closing) it tries the next region, and any other refusal, or either on the last region, is final. An explicit `url` skips the walk. A room stays on the module it started with, as §17.1 says of any live room.
|
|
660
|
+
- *Join by code.* `joinById(code, { … })` reaches that room and no other. A code is 1 to 32 characters of `A-Z a-z 0-9 _ -`, and a client refuses any other before sending it, because a code goes into a url. The room still refuses a seat for another game or channel (403) and a join that entered through another region (**421**), neither taking a seat. A region that does not hold the room answers 421 or Colyseus's 522; the deployed servers' transport sends 522 as HTTP **500** with 522 in its body, which a Colyseus client reports as 500, so a client walks on after 421, 522 and 500 alike. A `matchKey` sent with a code is checked (400) and then has no effect: the room's key is its own. A client MUST NOT send one, and an SDK refuses the pair. A client walks its regions in §17.1's order: on 421 and on Colyseus's 522 (no such room here, or it is full or closing) it tries the next region, and any other refusal, or either on the last region, is final. An explicit `url` skips the walk. A room stays on the module it started with, as §17.1 says of any live room.
|
|
659
661
|
- *Joining together.* Players who `joinOrCreate` one pool at once share one room, up to its seats. While a pool's room is being created, a later join's request stays open until that room is listed (at most about 30 s, normally the room's create time and under a second more) and is then seated in it; a client sees a slower answer and nothing else. No client sends anything new for this. It holds per pool, and each region is its own pool (§17.1 *Regions*): players whose probes pick different regions do not meet in the default pool. An invite's `url` or a room code brings them together.
|
|
660
662
|
- *Reading it.* `AuthorityRoomState.matchKey` (§17.3) is the room's key, absent for none: this is how a friend who joined by code learns it. A module reads `ctx.matchKey` in `init` (`''` for none) to choose a mode.
|
|
661
663
|
|
package/README.md
CHANGED
|
@@ -638,7 +638,7 @@ import * as genexEmbed from '@genex-ai/embed-sdk';
|
|
|
638
638
|
await genexEmbed.waitForPlayer();
|
|
639
639
|
const s = await connectAuthority({
|
|
640
640
|
urls: genexEmbed.getAuthorityUrls(), // the authority cluster, NOT getColyseusUrls()
|
|
641
|
-
regions: genexEmbed.getAuthorityRegions(), // its regions: the nearest is
|
|
641
|
+
regions: genexEmbed.getAuthorityRegions(), // its regions: a room with players in reach, else the nearest; a player alone is moved to players (PROTOCOL.md §17.1)
|
|
642
642
|
room: 'my-game',
|
|
643
643
|
auth: () => genexEmbed.getColyseusAuth(),
|
|
644
644
|
});
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
openWebTransportFastSocket,
|
|
7
7
|
webTransportFastOpener,
|
|
8
8
|
webTransportOptions
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-5WENVWVO.js";
|
|
10
10
|
import "../chunk-OD6NRSX2.js";
|
|
11
11
|
import "../chunk-2NGXXQDS.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-2CSX5WA6.js";
|
|
13
13
|
export {
|
|
14
14
|
FAST_WT_HASHES_MAX,
|
|
15
15
|
FAST_WT_HASH_HEX_DIGITS,
|
|
@@ -1020,6 +1020,7 @@ declare const AuthorityJoinMethod: {
|
|
|
1020
1020
|
readonly JoinOrCreate: "joinOrCreate";
|
|
1021
1021
|
readonly Create: "create";
|
|
1022
1022
|
readonly JoinById: "joinById";
|
|
1023
|
+
readonly Join: "join";
|
|
1023
1024
|
};
|
|
1024
1025
|
type AuthorityJoinMethod = (typeof AuthorityJoinMethod)[keyof typeof AuthorityJoinMethod];
|
|
1025
1026
|
/** Why a client refuses a target before anything reaches the network. */
|
|
@@ -2143,6 +2144,35 @@ type CapacityAttempt = {
|
|
|
2143
2144
|
};
|
|
2144
2145
|
/** Refusals (503) in a row on one region before the next attempt goes to the next-best region. */
|
|
2145
2146
|
declare const AUTHORITY_REFUSALS_PER_REGION = 2;
|
|
2147
|
+
/** How far a join looks for players by default, as a probe's round trip in ms (§17.1 *Finding players*):
|
|
2148
|
+
* far enough that a player in one region reaches the others. */
|
|
2149
|
+
declare const AUTHORITY_MAX_PING_MS = 350;
|
|
2150
|
+
/** The waits before each ask of a player who is alone in a room (§17.1 *Regrouping*); the last repeats. */
|
|
2151
|
+
declare const AUTHORITY_REGROUP_WAITS_MS: readonly [2000, 4000, 9000, 15000, 30000];
|
|
2152
|
+
/** How a pool join picks its region (§17.1 *Finding players*). */
|
|
2153
|
+
declare const RegionRule: {
|
|
2154
|
+
/** A room with players in any region in reach, nearest first; else a new room in the nearest region. */
|
|
2155
|
+
readonly Players: "players";
|
|
2156
|
+
/** The nearest region alone, whoever is elsewhere. */
|
|
2157
|
+
readonly Nearest: "nearest";
|
|
2158
|
+
};
|
|
2159
|
+
type RegionRule = (typeof RegionRule)[keyof typeof RegionRule];
|
|
2160
|
+
/** What a game or its player chose about regions; every field is read leniently. */
|
|
2161
|
+
type AuthoritySearchOptions = {
|
|
2162
|
+
/** Default {@link RegionRule.Players}; anything but `nearest` is that. */
|
|
2163
|
+
rule?: unknown;
|
|
2164
|
+
/** The farthest region asked for players, as a probe's round trip in ms. Default
|
|
2165
|
+
* {@link AUTHORITY_MAX_PING_MS}; anything but a finite number ≥ 0 is the default. */
|
|
2166
|
+
maxPingMs?: unknown;
|
|
2167
|
+
/** The one region to play in, by name (a player's own choice): no other is joined or created in. A
|
|
2168
|
+
* name the cluster does not have is no choice. */
|
|
2169
|
+
region?: unknown;
|
|
2170
|
+
};
|
|
2171
|
+
/** Where a pool join goes: the regions asked for an existing room, then where one is opened. */
|
|
2172
|
+
type AuthoritySearchPlan = {
|
|
2173
|
+
search: AuthorityRegionPick[];
|
|
2174
|
+
create: AuthorityRegionPick[];
|
|
2175
|
+
};
|
|
2146
2176
|
/** The regions a client uses, read leniently from `colyseus.authorityRegions`, else one per flat url. */
|
|
2147
2177
|
declare function normalizeAuthorityRegions(regions: unknown, urls: unknown): AuthorityRegion[];
|
|
2148
2178
|
/** The url each probe sample of a region goes to: sample n to url n modulo the url count. */
|
|
@@ -2150,6 +2180,11 @@ declare function regionProbePlan(urls: readonly string[], samples: number): stri
|
|
|
2150
2180
|
/** The order regions are tried in, from each url's best sample (`best[region][url]`; anything but a
|
|
2151
2181
|
* finite number ≥ 0 is no answer). */
|
|
2152
2182
|
declare function rankAuthorityRegions(regions: readonly AuthorityRegion[], best: readonly (readonly unknown[] | undefined)[]): AuthorityRegionPick[];
|
|
2183
|
+
/** Where a pool join goes (§17.1 *Finding players*), from each url's best sample: the answered regions
|
|
2184
|
+
* no farther than the limit are asked for an existing room, nearest first, and the room is opened in
|
|
2185
|
+
* the ranked order. Fewer than two regions in reach is no search (the join-or-create finds its own
|
|
2186
|
+
* region's room), as is the rule `nearest`. A pinned region is the only one joined. */
|
|
2187
|
+
declare function planAuthoritySearch(regions: readonly AuthorityRegion[], best: readonly (readonly unknown[] | undefined)[], options?: AuthoritySearchOptions): AuthoritySearchPlan;
|
|
2153
2188
|
/** Every attempt of a join that every server refuses 503, over `regionCount` ranked regions and the
|
|
2154
2189
|
* capacity schedule `delays`: a prefix of it is the walk of a join that is seated. */
|
|
2155
2190
|
declare function capacityWalk(regionCount: number, delays: readonly number[]): CapacityAttempt[];
|
|
@@ -2165,9 +2200,41 @@ declare const RefusalKind: {
|
|
|
2165
2200
|
type RefusalKind = (typeof RefusalKind)[keyof typeof RefusalKind];
|
|
2166
2201
|
/** What a join refused with `code` does next; no number at all is a network that failed. */
|
|
2167
2202
|
declare function refusalKind(code: unknown): RefusalKind;
|
|
2203
|
+
/** Where a player who is alone in a room keeps asking for one that has players (§17.1 *Regrouping*),
|
|
2204
|
+
* from each url's best sample and the region it is in. Every client reads the regions in one order, so
|
|
2205
|
+
* of two players each alone in their own region exactly one moves: only the regions listed before
|
|
2206
|
+
* `joined` are asked, nearest first, among the answered ones no farther than the limit. The rule
|
|
2207
|
+
* `nearest`, a pinned region and a region the list does not have ask no one. */
|
|
2208
|
+
declare function planAuthorityRegroup(regions: readonly AuthorityRegion[], best: readonly (readonly unknown[] | undefined)[], options: AuthoritySearchOptions | undefined, joined: string): AuthorityRegionPick[];
|
|
2209
|
+
/** The region `url` enters, by its name in `regions`; undefined when none lists it. */
|
|
2210
|
+
declare function authorityRegionOf(regions: readonly AuthorityRegion[], url: string): string | undefined;
|
|
2211
|
+
/** One region as a player's settings show it: its name and its round trip in ms (null: no answer). */
|
|
2212
|
+
type AuthorityRegionPing = {
|
|
2213
|
+
region: string;
|
|
2214
|
+
pingMs: number | null;
|
|
2215
|
+
};
|
|
2216
|
+
/** Every region with its latency, in list order, for a region picker: the probe a join runs, with no
|
|
2217
|
+
* join. One region is not probed (its ping is null). Never rejects on a probe. */
|
|
2218
|
+
declare function measureAuthorityRegions(regions: readonly AuthorityRegion[], options?: RelaySelectOptions): Promise<AuthorityRegionPing[]>;
|
|
2219
|
+
/** What a refused ask for an existing room does next (§17.1 *Finding players*). */
|
|
2220
|
+
declare const SearchRefusal: {
|
|
2221
|
+
/** No room here (Colyseus's 521, no room matches the criteria), a dead path, a full or draining
|
|
2222
|
+
* region: the next region is asked. */
|
|
2223
|
+
readonly Next: "next";
|
|
2224
|
+
/** The server's answer about this player or game, which every region would repeat. */
|
|
2225
|
+
readonly Final: "final";
|
|
2226
|
+
};
|
|
2227
|
+
type SearchRefusal = (typeof SearchRefusal)[keyof typeof SearchRefusal];
|
|
2228
|
+
/** What an ask refused with `code` does next; no number at all is a network that failed. */
|
|
2229
|
+
declare function searchRefusalKind(code: unknown): SearchRefusal;
|
|
2168
2230
|
/** Probes every region (relay-select.ts's tolerant samples, one url per sample) and answers the order
|
|
2169
2231
|
* to try them in. One region is not probed; none answers []. Never rejects on a probe. */
|
|
2170
2232
|
declare function selectAuthorityRegions(regions: readonly AuthorityRegion[], options?: RelaySelectOptions): Promise<AuthorityRegionPick[]>;
|
|
2233
|
+
/** Probes every region and answers each url's best sample (`best[region][url]`; undefined: silent). */
|
|
2234
|
+
declare function probeAuthorityRegions(regions: readonly AuthorityRegion[], options: RelaySelectOptions): Promise<(number | undefined)[][]>;
|
|
2235
|
+
/** {@link selectAuthorityRegions} for a pool join: the same probe, answering where to look for players
|
|
2236
|
+
* and where to open a room. One region is not probed. Never rejects on a probe. */
|
|
2237
|
+
declare function selectAuthoritySearch(regions: readonly AuthorityRegion[], search?: AuthoritySearchOptions, options?: RelaySelectOptions): Promise<AuthoritySearchPlan>;
|
|
2171
2238
|
|
|
2172
2239
|
/** The rejoin's schedule and windows, ms. */
|
|
2173
2240
|
declare const REJOIN: {
|
|
@@ -2252,10 +2319,12 @@ type AuthorityRejoining = {
|
|
|
2252
2319
|
code: number;
|
|
2253
2320
|
waitMs: number;
|
|
2254
2321
|
};
|
|
2255
|
-
/** `rejoined`: back in play, as a new seat in a new room (the invite `code` is new too).
|
|
2322
|
+
/** `rejoined`: back in play, as a new seat in a new room (the invite `code` is new too). `moved` is set
|
|
2323
|
+
* when no room was lost: the player was alone and now sits in a room that has players (§17.1 *Regrouping*). */
|
|
2256
2324
|
type AuthorityRejoined = {
|
|
2257
2325
|
code: string;
|
|
2258
2326
|
url: string;
|
|
2327
|
+
moved?: true;
|
|
2259
2328
|
};
|
|
2260
2329
|
|
|
2261
2330
|
/** The own-entity fields a prediction step may read and write: the pose and velocity always, and
|
|
@@ -2284,6 +2353,15 @@ type AuthorityConnectOptions = {
|
|
|
2284
2353
|
/** Override: connect to THIS exact url, skipping latency selection: an invitee passes the inviter's
|
|
2285
2354
|
* `session.url` and lands in the inviter's region (a party plays in its leader's region). */
|
|
2286
2355
|
url?: string;
|
|
2356
|
+
/** How a pool join picks its region (§17.1 *Finding players*). Default `players`: the regions in reach
|
|
2357
|
+
* are asked for a room that already has players, nearest first, and a room is opened in the nearest
|
|
2358
|
+
* one only when none has. `nearest` joins the nearest region whoever is elsewhere. */
|
|
2359
|
+
regionRule?: RegionRule;
|
|
2360
|
+
/** The farthest region asked for players, as a probe's round trip in ms. Default 350. */
|
|
2361
|
+
maxPingMs?: number;
|
|
2362
|
+
/** The one region to play in, by its name in `regions` (a player's own choice): no other is joined
|
|
2363
|
+
* or created in. A name the cluster does not have is ignored. A join by code still finds its room. */
|
|
2364
|
+
region?: string;
|
|
2287
2365
|
/** One latency sample of a url (relay-select.ts `RelayProbe`). Default: one Colyseus ping. For tests
|
|
2288
2366
|
* and benches; a game leaves it unset. */
|
|
2289
2367
|
probe?: RelayProbe;
|
|
@@ -2374,6 +2452,10 @@ type AuthorityConnectOptions = {
|
|
|
2374
2452
|
/** Whether a seat whose room ended for a deploy, or whose socket no reconnect restored, goes back into
|
|
2375
2453
|
* play by itself (§17.13 *Drain and rejoin*). Default true; false makes that close final. */
|
|
2376
2454
|
rejoin?: boolean;
|
|
2455
|
+
/** Whether a player who is alone in a pool room keeps asking for a room that already has players and
|
|
2456
|
+
* moves there (§17.1 *Regrouping*): the session stays the game's object and `rejoined` fires with
|
|
2457
|
+
* `moved`. Default true; false keeps the player where they are. Needs `rejoin`. */
|
|
2458
|
+
regroup?: boolean;
|
|
2377
2459
|
/** Every message the server sends, in order, by type: the room module's events and the server's
|
|
2378
2460
|
* own (`server:restart` before a drain), with no name withheld. For a facade that forwards them
|
|
2379
2461
|
* all, such as the engine bridge; a game subscribes with `on(type)`. */
|
|
@@ -2668,4 +2750,4 @@ declare function createPrivateAuthority(opts: AuthorityConnectOptions): Promise<
|
|
|
2668
2750
|
*/
|
|
2669
2751
|
declare function joinPrivateAuthority(code: string, opts: AuthorityConnectOptions): Promise<AuthoritySession>;
|
|
2670
2752
|
|
|
2671
|
-
export { AUTHORITY_REFUSALS_PER_REGION, AuthorityBody, AuthorityCloseCode, type AuthorityConnectOptions, AuthorityContactRule, type AuthorityDraining, AuthorityEntity, type AuthorityEntityView, AuthorityInput, AuthorityJoinMethod, type AuthorityJoinPlan, AuthorityJoint, AuthorityLimits, AuthorityPhysicsEntity, AuthorityPhysicsRoomState, type AuthorityPhysicsStatus, AuthorityPlayer, type AuthorityPlayerView, type AuthorityPrediction, type AuthorityPredictionStatus, type AuthorityRegion, type AuthorityRegionPick, type AuthorityRejoined, type AuthorityRejoining, AuthorityRoomLimits, AuthorityRoomState, type AuthorityRoomTarget, type AuthoritySeatPass, AuthoritySeatRule, type AuthoritySession, AuthorityShape, type AuthorityStep, AuthorityTargetRefusal, type AuthorityTelemetry, CONVEYOR_RATE, type Carried, type CarryReport, type CastHit, ContactBody, ContactDrawing, type ContactEnv, ContactEvent, ContactKind, type ContactPassOptions, ContactPolicy, type ContactReport, type ContactWorld, type ContactWorldSpec, type ConveyorBody, DEFAULT_SEAT_DRAWING, DEFAULT_TICK_HZ, type DeclaredContacts, type DrawnPose, EntityData, type EntityIndex, type EntityOut, type EventOut, FAST_OFFER_WAIT_MS, type FaceFilter, FastFallbackReason, type FastLineAnnouncer, type FastLineObservation, FastNotAsked, type FastSeatStatus, FastSocketOpener, FastTransport, FirstpersonWorld, FirstpersonWorldSpec, type Frame, GuestGlobal, HEAD_LANDING_SPEED, HeadHold, type HeadSlabs, type HeadsContext, type HeldSeat, HullBody, HullOps, INPUT_REPEAT_MAX_MS, INPUT_REPEAT_RUN_MS, INPUT_REPEAT_STEADY, INPUT_TICK_MOD, INPUT_TICK_SLACK_S, type InitOut, InputData, InputRepeat, type InputThrottle, InputUse, Json, type KinematicSupport, LeaveReason, Lift, type LiftBodyPose, type LiftCollider, type LiftPose, type LiftSeat, LiftSolidsCache, type LiftTick, LiftVec, LiftsPolicy, MAX_PROJECTILE_G, MAX_PROJECTILE_TICK, MAX_TICK_HZ, MOTION_VIEW_TAG, PHYSICS_ONLY_TICK_HZ, type PairContact, type PairOutcome, PhysAnswerRow, PhysBodyRow, type PhysCommand, PhysEvRow, type PhysicsAdmission, PhysicsCeiling, PhysicsErrorCode, type PhysicsPredictionStatus, type PhysicsTickIndex, type Plane, PlayerInfo, type PolicyBody, PosedSolid, PosedWorld, PredictBodyRule, PredictCore, PredictKinematicRule, PredictStatus, type PredictedBody, type PredictedField, PresetName, type ProjectileLaunch, type ProjectilePrediction, type ProjectileState, type PropBody, type PropNudge, type PropSeat, PropSlide, REJOIN, RIDE_CHAIN_MAX, type ReconcilerAckHold, RefusalKind, type RejoinInput, type RejoinStep, RejoinStop, RejoinWay, RemoteInput, RemotePredict, ResolvedModuleConfig, type Ride, type RiderPose, SEAT_DRAWINGS, SHOVE_EASE_DONE, STALL_PREDICT_MS, STEADY_BUCKETS, SUCCESSOR_OPEN_MS, type SeatChange, type SeatClock, type SeatDrawing, type SeatLifts, type SeatMotion, type SeatOffset, type SeatPass, type SeatPose, type SeatRate, type SeatRepeats, type SeatStep, SeatWorld, type SeatWorldLifts, type SeatWorldOptions, ShotWorldCount, SlideWay, type SolidGrid, StandRule, THROTTLE_DILATION, THROTTLE_LOW_INPUTS, THROTTLE_SEAT_LEAD, TICK_RATES, TickHz, type TickIn, type TickInput, type TickOut, TickOutFault, type TickSolids, TopRule, UNSTICK_SOLIDS, type V3, type WireResult, WorldCost, WorldCostMeter, type WorldCostReport, capacityWalk, carryOnLift, carrySlot, carryTick, castWorld, comesBackAfter, compileContactWorld, connectAuthority, consumedUse, contactOf, contactPair, contactPass, contactPassOf, contactRuleOf, conveyorNudges, conveyorUnder, createPrivateAuthority, declaredContacts, farApart, fastLineAnnouncer, feedWithPayback, forgiveRepeats, frameOf, hasStand, headHold, headOffset, headSlab, headSlabs, headStands, impartSlot, impartTick, inLiftFrame, inputThrottle, inputTickField, inputTickLag, inputTickSlack, insideFace, insideWorld, isProjectile, joinPrivateAuthority, liftBodyKey, liftBodyPose, liftBodySpawn, liftCollider, liftDrawnAt, liftPose, liftPoses, liftPosesAt, liftStartsOf, liftTopAt, liftUnder, matchKeyOf, mayStand, nextCodeRegion, normalizeAuthorityRegions, pcos, planAuthorityJoin, planSuccessorJoin, posedFor, posedSolids, projectileAt, propSlideNudges, psin, psincos, rankAuthorityRegions, reconcileThrough, reconcilerAck, reconcilerAckHold, refusalKind, regionProbePlan, rejoinStep, repeatMaxTicks, repeatRunTicks, repeatStarved, repeatsSeat, rideSlot, rideStep, rideTick, ridesOn, rodeBy, roomAlong, sameHeldInput, sanitizeInput, seatClock, seatLeadClock, seatLiftsOf, seatOffset, seatRepeats, seatTauMs, seatTouchShare, seatUnderProp, selectAuthorityRegions, selectMatchWorld, serverTick, shoveEase, spinStep, stateThrough, stepOnLifts, steppedThrough, surfaceUp, tagsOf, throttleState, throttleSteps, tickInstant, tickSolids, topRuleOf, udpLine, unstickBody, validMatchKey, validRoomCode, validSuccessorOf, validateInitOut, validateTickOut, viewOnLift, webSocketLine, worldCost, yieldShares };
|
|
2753
|
+
export { AUTHORITY_MAX_PING_MS, AUTHORITY_REFUSALS_PER_REGION, AUTHORITY_REGROUP_WAITS_MS, AuthorityBody, AuthorityCloseCode, type AuthorityConnectOptions, AuthorityContactRule, type AuthorityDraining, AuthorityEntity, type AuthorityEntityView, AuthorityInput, AuthorityJoinMethod, type AuthorityJoinPlan, AuthorityJoint, AuthorityLimits, AuthorityPhysicsEntity, AuthorityPhysicsRoomState, type AuthorityPhysicsStatus, AuthorityPlayer, type AuthorityPlayerView, type AuthorityPrediction, type AuthorityPredictionStatus, type AuthorityRegion, type AuthorityRegionPick, type AuthorityRegionPing, type AuthorityRejoined, type AuthorityRejoining, AuthorityRoomLimits, AuthorityRoomState, type AuthorityRoomTarget, type AuthoritySearchOptions, type AuthoritySearchPlan, type AuthoritySeatPass, AuthoritySeatRule, type AuthoritySession, AuthorityShape, type AuthorityStep, AuthorityTargetRefusal, type AuthorityTelemetry, CONVEYOR_RATE, type Carried, type CarryReport, type CastHit, ContactBody, ContactDrawing, type ContactEnv, ContactEvent, ContactKind, type ContactPassOptions, ContactPolicy, type ContactReport, type ContactWorld, type ContactWorldSpec, type ConveyorBody, DEFAULT_SEAT_DRAWING, DEFAULT_TICK_HZ, type DeclaredContacts, type DrawnPose, EntityData, type EntityIndex, type EntityOut, type EventOut, FAST_OFFER_WAIT_MS, type FaceFilter, FastFallbackReason, type FastLineAnnouncer, type FastLineObservation, FastNotAsked, type FastSeatStatus, FastSocketOpener, FastTransport, FirstpersonWorld, FirstpersonWorldSpec, type Frame, GuestGlobal, HEAD_LANDING_SPEED, HeadHold, type HeadSlabs, type HeadsContext, type HeldSeat, HullBody, HullOps, INPUT_REPEAT_MAX_MS, INPUT_REPEAT_RUN_MS, INPUT_REPEAT_STEADY, INPUT_TICK_MOD, INPUT_TICK_SLACK_S, type InitOut, InputData, InputRepeat, type InputThrottle, InputUse, Json, type KinematicSupport, LeaveReason, Lift, type LiftBodyPose, type LiftCollider, type LiftPose, type LiftSeat, LiftSolidsCache, type LiftTick, LiftVec, LiftsPolicy, MAX_PROJECTILE_G, MAX_PROJECTILE_TICK, MAX_TICK_HZ, MOTION_VIEW_TAG, PHYSICS_ONLY_TICK_HZ, type PairContact, type PairOutcome, PhysAnswerRow, PhysBodyRow, type PhysCommand, PhysEvRow, type PhysicsAdmission, PhysicsCeiling, PhysicsErrorCode, type PhysicsPredictionStatus, type PhysicsTickIndex, type Plane, PlayerInfo, type PolicyBody, PosedSolid, PosedWorld, PredictBodyRule, PredictCore, PredictKinematicRule, PredictStatus, type PredictedBody, type PredictedField, PresetName, type ProjectileLaunch, type ProjectilePrediction, type ProjectileState, type PropBody, type PropNudge, type PropSeat, PropSlide, REJOIN, RIDE_CHAIN_MAX, type ReconcilerAckHold, RefusalKind, RegionRule, type RejoinInput, type RejoinStep, RejoinStop, RejoinWay, RemoteInput, RemotePredict, ResolvedModuleConfig, type Ride, type RiderPose, SEAT_DRAWINGS, SHOVE_EASE_DONE, STALL_PREDICT_MS, STEADY_BUCKETS, SUCCESSOR_OPEN_MS, SearchRefusal, type SeatChange, type SeatClock, type SeatDrawing, type SeatLifts, type SeatMotion, type SeatOffset, type SeatPass, type SeatPose, type SeatRate, type SeatRepeats, type SeatStep, SeatWorld, type SeatWorldLifts, type SeatWorldOptions, ShotWorldCount, SlideWay, type SolidGrid, StandRule, THROTTLE_DILATION, THROTTLE_LOW_INPUTS, THROTTLE_SEAT_LEAD, TICK_RATES, TickHz, type TickIn, type TickInput, type TickOut, TickOutFault, type TickSolids, TopRule, UNSTICK_SOLIDS, type V3, type WireResult, WorldCost, WorldCostMeter, type WorldCostReport, authorityRegionOf, capacityWalk, carryOnLift, carrySlot, carryTick, castWorld, comesBackAfter, compileContactWorld, connectAuthority, consumedUse, contactOf, contactPair, contactPass, contactPassOf, contactRuleOf, conveyorNudges, conveyorUnder, createPrivateAuthority, declaredContacts, farApart, fastLineAnnouncer, feedWithPayback, forgiveRepeats, frameOf, hasStand, headHold, headOffset, headSlab, headSlabs, headStands, impartSlot, impartTick, inLiftFrame, inputThrottle, inputTickField, inputTickLag, inputTickSlack, insideFace, insideWorld, isProjectile, joinPrivateAuthority, liftBodyKey, liftBodyPose, liftBodySpawn, liftCollider, liftDrawnAt, liftPose, liftPoses, liftPosesAt, liftStartsOf, liftTopAt, liftUnder, matchKeyOf, mayStand, measureAuthorityRegions, nextCodeRegion, normalizeAuthorityRegions, pcos, planAuthorityJoin, planAuthorityRegroup, planAuthoritySearch, planSuccessorJoin, posedFor, posedSolids, probeAuthorityRegions, projectileAt, propSlideNudges, psin, psincos, rankAuthorityRegions, reconcileThrough, reconcilerAck, reconcilerAckHold, refusalKind, regionProbePlan, rejoinStep, repeatMaxTicks, repeatRunTicks, repeatStarved, repeatsSeat, rideSlot, rideStep, rideTick, ridesOn, rodeBy, roomAlong, sameHeldInput, sanitizeInput, searchRefusalKind, seatClock, seatLeadClock, seatLiftsOf, seatOffset, seatRepeats, seatTauMs, seatTouchShare, seatUnderProp, selectAuthorityRegions, selectAuthoritySearch, selectMatchWorld, serverTick, shoveEase, spinStep, stateThrough, stepOnLifts, steppedThrough, surfaceUp, tagsOf, throttleState, throttleSteps, tickInstant, tickSolids, topRuleOf, udpLine, unstickBody, validMatchKey, validRoomCode, validSuccessorOf, validateInitOut, validateTickOut, viewOnLift, webSocketLine, worldCost, yieldShares };
|
package/dist/authority/index.js
CHANGED
|
@@ -6,7 +6,9 @@ import {
|
|
|
6
6
|
claimToAxis
|
|
7
7
|
} from "../chunk-TSYEWPVO.js";
|
|
8
8
|
import {
|
|
9
|
+
AUTHORITY_MAX_PING_MS,
|
|
9
10
|
AUTHORITY_REFUSALS_PER_REGION,
|
|
11
|
+
AUTHORITY_REGROUP_WAITS_MS,
|
|
10
12
|
AuthorityBody,
|
|
11
13
|
AuthorityEntity,
|
|
12
14
|
AuthorityInput,
|
|
@@ -58,6 +60,7 @@ import {
|
|
|
58
60
|
RULED_SLEW,
|
|
59
61
|
RULED_SNAP_TICKS,
|
|
60
62
|
RefusalKind,
|
|
63
|
+
RegionRule,
|
|
61
64
|
RejoinStop,
|
|
62
65
|
RejoinWay,
|
|
63
66
|
SEAT_DRAWINGS,
|
|
@@ -69,6 +72,7 @@ import {
|
|
|
69
72
|
STALL_PREDICT_MS,
|
|
70
73
|
STEADY_BUCKETS,
|
|
71
74
|
SUCCESSOR_OPEN_MS,
|
|
75
|
+
SearchRefusal,
|
|
72
76
|
SeatContacts,
|
|
73
77
|
SeatWorld,
|
|
74
78
|
SlideWay,
|
|
@@ -78,6 +82,7 @@ import {
|
|
|
78
82
|
UNSTICK_SOLIDS,
|
|
79
83
|
WIRE_REST_MAX,
|
|
80
84
|
WIRE_ROW_STRIDE,
|
|
85
|
+
authorityRegionOf,
|
|
81
86
|
bodyRadiusOf,
|
|
82
87
|
bodyStateOf,
|
|
83
88
|
capacityWalk,
|
|
@@ -142,15 +147,19 @@ import {
|
|
|
142
147
|
liftTopAt,
|
|
143
148
|
liftUnder,
|
|
144
149
|
mayStand,
|
|
150
|
+
measureAuthorityRegions,
|
|
145
151
|
motorText,
|
|
146
152
|
nextPredictSetSize,
|
|
147
153
|
normalizeAuthorityRegions,
|
|
148
154
|
parsePhysDesc,
|
|
149
155
|
physDescText,
|
|
150
156
|
physicsBudgetMs,
|
|
157
|
+
planAuthorityRegroup,
|
|
158
|
+
planAuthoritySearch,
|
|
151
159
|
planSuccessorJoin,
|
|
152
160
|
posedFor,
|
|
153
161
|
posedSolids,
|
|
162
|
+
probeAuthorityRegions,
|
|
154
163
|
propSlideNudges,
|
|
155
164
|
proximityIslands,
|
|
156
165
|
quatMul,
|
|
@@ -178,6 +187,7 @@ import {
|
|
|
178
187
|
ruledPoseAt,
|
|
179
188
|
sameBodyState,
|
|
180
189
|
sameHeldInput,
|
|
190
|
+
searchRefusalKind,
|
|
181
191
|
seatClock,
|
|
182
192
|
seatLeadClock,
|
|
183
193
|
seatLiftsOf,
|
|
@@ -189,6 +199,7 @@ import {
|
|
|
189
199
|
seatTouchShare,
|
|
190
200
|
seatUnderProp,
|
|
191
201
|
selectAuthorityRegions,
|
|
202
|
+
selectAuthoritySearch,
|
|
192
203
|
selfTestPredictCore,
|
|
193
204
|
separateAround,
|
|
194
205
|
separateDrawn,
|
|
@@ -217,8 +228,8 @@ import {
|
|
|
217
228
|
wireRowOfState,
|
|
218
229
|
writeWireRow,
|
|
219
230
|
yieldShares
|
|
220
|
-
} from "../chunk-
|
|
221
|
-
import "../chunk-
|
|
231
|
+
} from "../chunk-I3DNVGGC.js";
|
|
232
|
+
import "../chunk-BB6OIWQ2.js";
|
|
222
233
|
import "../chunk-YWQ3ALYY.js";
|
|
223
234
|
import {
|
|
224
235
|
AcceptKind,
|
|
@@ -400,7 +411,7 @@ import {
|
|
|
400
411
|
validRoomCode,
|
|
401
412
|
validateInitOut,
|
|
402
413
|
validateTickOut
|
|
403
|
-
} from "../chunk-
|
|
414
|
+
} from "../chunk-5WENVWVO.js";
|
|
404
415
|
import {
|
|
405
416
|
LeaveReason,
|
|
406
417
|
MODULE_CONTRACT,
|
|
@@ -446,7 +457,7 @@ import {
|
|
|
446
457
|
AUTHORITY_ROOM_ENDED_TEXT,
|
|
447
458
|
AuthorityCloseCode,
|
|
448
459
|
authorityCloseCodeOf
|
|
449
|
-
} from "../chunk-
|
|
460
|
+
} from "../chunk-2CSX5WA6.js";
|
|
450
461
|
|
|
451
462
|
// src/authority/world-cost.ts
|
|
452
463
|
var WorldCost = {
|
|
@@ -518,7 +529,9 @@ function worldCost(spec, preset = "firstperson", params) {
|
|
|
518
529
|
return { ...meter, solids: solids.length, steps, opsPerStep, accepted: opsPerStep <= WorldCost.MAX_OPS_PER_STEP };
|
|
519
530
|
}
|
|
520
531
|
export {
|
|
532
|
+
AUTHORITY_MAX_PING_MS,
|
|
521
533
|
AUTHORITY_REFUSALS_PER_REGION,
|
|
534
|
+
AUTHORITY_REGROUP_WAITS_MS,
|
|
522
535
|
AUTHORITY_ROOM_ENDED_TEXT,
|
|
523
536
|
AcceptKind,
|
|
524
537
|
AuthorityBody,
|
|
@@ -695,6 +708,7 @@ export {
|
|
|
695
708
|
RULED_SLEW,
|
|
696
709
|
RULED_SNAP_TICKS,
|
|
697
710
|
RefusalKind,
|
|
711
|
+
RegionRule,
|
|
698
712
|
RejoinStop,
|
|
699
713
|
RejoinWay,
|
|
700
714
|
RemotePredict,
|
|
@@ -708,6 +722,7 @@ export {
|
|
|
708
722
|
STALL_PREDICT_MS,
|
|
709
723
|
STEADY_BUCKETS,
|
|
710
724
|
SUCCESSOR_OPEN_MS,
|
|
725
|
+
SearchRefusal,
|
|
711
726
|
SeatContacts,
|
|
712
727
|
SeatWorld,
|
|
713
728
|
ShotWorldCost,
|
|
@@ -731,6 +746,7 @@ export {
|
|
|
731
746
|
acceptUplink,
|
|
732
747
|
applyBody,
|
|
733
748
|
authorityCloseCodeOf,
|
|
749
|
+
authorityRegionOf,
|
|
734
750
|
axisToClaim,
|
|
735
751
|
blankEntityMotion,
|
|
736
752
|
blankSeatEcho,
|
|
@@ -831,6 +847,7 @@ export {
|
|
|
831
847
|
liftUnder,
|
|
832
848
|
matchKeyOf,
|
|
833
849
|
mayStand,
|
|
850
|
+
measureAuthorityRegions,
|
|
834
851
|
motorText,
|
|
835
852
|
nextCodeRegion,
|
|
836
853
|
nextPredictSetSize,
|
|
@@ -847,12 +864,15 @@ export {
|
|
|
847
864
|
physicsWorldDesc,
|
|
848
865
|
physicsWorldPredicts,
|
|
849
866
|
planAuthorityJoin,
|
|
867
|
+
planAuthorityRegroup,
|
|
868
|
+
planAuthoritySearch,
|
|
850
869
|
planSuccessorJoin,
|
|
851
870
|
posedFor,
|
|
852
871
|
posedSolids,
|
|
853
872
|
posedWorld,
|
|
854
873
|
presetInputRepeat,
|
|
855
874
|
presetParamsValid,
|
|
875
|
+
probeAuthorityRegions,
|
|
856
876
|
projectileAt,
|
|
857
877
|
propSlideNudges,
|
|
858
878
|
proximityIslands,
|
|
@@ -897,6 +917,7 @@ export {
|
|
|
897
917
|
sameBodyState,
|
|
898
918
|
sameHeldInput,
|
|
899
919
|
sanitizeInput,
|
|
920
|
+
searchRefusalKind,
|
|
900
921
|
seatClock,
|
|
901
922
|
seatLeadClock,
|
|
902
923
|
seatLiftsOf,
|
|
@@ -908,6 +929,7 @@ export {
|
|
|
908
929
|
seatTouchShare,
|
|
909
930
|
seatUnderProp,
|
|
910
931
|
selectAuthorityRegions,
|
|
932
|
+
selectAuthoritySearch,
|
|
911
933
|
selectMatchWorld,
|
|
912
934
|
selfTestPredictCore,
|
|
913
935
|
separateAround,
|