@crowdedkingdoms/crowdyjs 18.0.4-dev.1 → 18.1.0-dev.1

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/MIGRATION.md CHANGED
@@ -120,6 +120,39 @@ super-admin's session). There is no SDK replacement.
120
120
  `dev`'s SDL after #417 merged (`npm run schema:sync:paths -- --schema <that schema.gql>`, then
121
121
  `npm run codegen`).
122
122
 
123
+ ## 18.1.0: open grids, and where a connect token may go
124
+
125
+ Additive, except that `client.exec.connect` refuses a gateway it would once have dialed (below).
126
+ The two grid calls need a game API with cks-game-api #436 (ck-api `dev/v2.31.0`); nothing else
127
+ calls them.
128
+
129
+ - `client.gameApps.setOpenPermissions({ appId, gridId, permissionKeys })` (also
130
+ `client.admin.grids`) opens a grid to every player with active access to the app: it replaces
131
+ the keys the grid grants each of them, within its limits, and players who gain access later get
132
+ them too. An empty `permissionKeys` closes it; `openPermissions(appId, gridId)` reads them. Both
133
+ need `manage_apps`. Since #436 the most specific grid covering a chunk decides who may build
134
+ there, so a zone nested in the world grid that everyone should build in must grant
135
+ `update_voxel_data` itself. `BAD_REQUEST` refuses the world grid (open already), the four
136
+ player-code keys, a key that is not an active grid key, and a 33rd open grid in one app.
137
+ (OI-2026-09-30-007)
138
+ - `client.exec.connect` and `connectAsDeveloper` send the connect token only to a gateway that
139
+ `execGatewayRefusal(gameApiUrl, gatewayUrl)` passes: `ws:` or `wss:`, `wss:` whenever the game
140
+ API is `https:`, no credentials in the URL, and on the estate of the game API or of this
141
+ release's default origin, as `BinaryRelayTransport` holds a reconnect directive to its estate.
142
+ A loopback game API may name a loopback gateway (ck-exec's local cluster). Any other gateway is
143
+ never dialed: the attempt fails `Unavailable` ("refusing the gateway …"), and a reconnect asks
144
+ the game API again. `ExecConnection.open(gatewayUrl, token)` still dials what it is given.
145
+ (OI-2026-09-30-010)
146
+ - A gateway's refusal of the connect token is `Denied` again under Node's `ws` package. Since
147
+ ck-exec 0.10.0 a gateway answers the upgrade `HTTP 401` with the reason as its body, which
148
+ `connect` now reads: `Denied: the gateway refused the connection (HTTP 401: <reason>)`.
149
+ `HTTP 429` (a player past 16 sessions to one app through a gateway, or a gateway past its
150
+ total) is `Unavailable` with its reason. A browser, and Node's built-in WebSocket, cannot read a
151
+ refused upgrade, so there both stay `Unavailable`. A gateway before 0.10.0 closed with 4401,
152
+ which is `Denied` everywhere, now for a call in flight when it closes as well.
153
+ (OI-2026-09-29-002)
154
+ - `schema.gql` and the generated types are cks-game-api `dev`'s after #436.
155
+
123
156
  ## 18.0.4: a refused chunk write-back is dropped, and the wilderness setting
124
157
 
125
158
  The P3 W5 security review's notes for the SDKs. The game API now refuses `updateChunk` with
package/README.md CHANGED
@@ -253,7 +253,7 @@ grouped under `client.admin` and mirrored at the top level):
253
253
  | `client.quotas` | Usage quotas at the org/app scope. |
254
254
  | `client.usage` | Replication + GraphQL usage reporting. |
255
255
  | `client.sharedEnvironment` | Publish to shared, runtime gating, spend caps, auto-billing. |
256
- | `client.gameApps` | App grids (`createGrid` / `deleteGrid`), first-class grid ownership (`ownership` / `assignOwnership` / `transferOwnership`), and grid runtime-permission administration. |
256
+ | `client.gameApps` | App grids (`createGrid` / `deleteGrid`), first-class grid ownership (`ownership` / `assignOwnership` / `transferOwnership`), and grid runtime-permission administration, including open grids (`setOpenPermissions` / `openPermissions`, 18.1.0): the keys a grid grants every player, which a zone everyone may build in needs, since the most specific grid over a chunk decides who builds there. |
257
257
 
258
258
  **The SDK is for normal clients, and designed for production.** It carries what players,
259
259
  developers and org-admins call, and nothing only a super-admin or a platform operator can
@@ -643,6 +643,14 @@ exec.onReconnect((host) => console.log('moved to', host));
643
643
  - `connect` asks the game API for a host (`execConnect`) and opens a WebSocket to its gateway.
644
644
  With `nodeType` and `key`, the player lands on the host that runs that instance. On runtimes
645
645
  without a global `WebSocket` (Node before 22), pass one: `{ WebSocket }` from the `ws` package.
646
+ - The connect token rides in the gateway URL, so `connect` dials only a gateway
647
+ `execGatewayRefusal(gameApiUrl, gatewayUrl)` passes: `wss:` when the game API is `https:`, and on
648
+ the game API's estate or the platform's (a loopback game API may name a loopback gateway, as
649
+ ck-exec's local cluster does). Any other is refused `Unavailable` without being dialed (18.1.0).
650
+ - A gateway that refuses the connect token answers the upgrade `HTTP 401` with its reason. Under
651
+ Node's `ws` package `connect` throws `Denied` with that reason; a browser cannot read a refused
652
+ upgrade, so there it is `Unavailable`. `HTTP 429` (more than 16 sessions to one app through
653
+ one gateway) is `Unavailable` with its reason under `ws` (18.1.0).
646
654
  - A refused call throws `CrowdyExecError`: `status` is the platform's (`AppError` carries the
647
655
  handler's own message; `Busy`, `Moved`, `Unavailable` and `RateLimited` are `retryable`).
648
656
  The SDK does not retry `Busy`. A gateway refuses a player's calls over 120 per 10 s (per app
@@ -660,7 +668,7 @@ exec.onReconnect((host) => console.log('moved to', host));
660
668
  - When the host goes away, the connection asks for a host again, reconnects and renews every
661
669
  subscription; a call caught by it, or answered `Moved`, is tried once more.
662
670
  - `ExecConnection.open(gatewayUrl, token)` connects with a connect token you already have
663
- (tools and tests), without reconnecting.
671
+ (tools and tests), without reconnecting. It dials the URL it is given.
664
672
  - `client.exec.deploy({ appId, root, types })` takes each node type's compiled module
665
673
  (`wasm: Uint8Array`) with its manifest fields, sends each distinct module once, and makes
666
674
  the version active.
@@ -1028,6 +1036,11 @@ while `mintAppToken` under direct connect hands back one instance
1028
1036
  (`ck-api-<dc>-<n>.<zone>`). They agree on the datacenter, not on the host, which
1029
1037
  is why the mint also returns `discoveryUrl`.
1030
1038
 
1039
+ `test/e2e/open-grid-and-exec-gateway.test.mjs` needs no account at all: with
1040
+ `CROWDY_HTTP_URL` and `CROWDY_E2E_THROWAWAY_OWNER=1` it registers a throwaway org admin (its own
1041
+ org and app) and a player, opens and closes a grid, and checks the tier's ck-exec gateway. It
1042
+ leaves the org behind and archives the app, so it runs only when asked to.
1043
+
1031
1044
  ## Maintainers: schema artifacts and fixtures
1032
1045
 
1033
1046
  CrowdyJS is a standalone public package: a clean clone builds with
@@ -17,7 +17,8 @@ export { ExecModScope };
17
17
  * ```
18
18
  *
19
19
  * `connect` asks the game API for a host (`execConnect`, with the app-scoped token
20
- * of `appId` as the session token) and opens a WebSocket to its gateway. Frames are
20
+ * of `appId` as the session token) and opens a WebSocket to its gateway, once the
21
+ * gateway passes {@link execGatewayRefusal}. Frames are
21
22
  * ck-exec's client protocol (`ckx-proto/src/client.rs`); payloads are MessagePack.
22
23
  * The connection recovers by itself: a closed socket or a `Moved` reply asks for a
23
24
  * host again, renews every subscription, and retries the call once.
@@ -111,11 +112,28 @@ export interface ExecConnectOptions {
111
112
  callTimeoutMs?: number;
112
113
  /** Connect again when the socket closes unexpectedly. Default true. */
113
114
  reconnect?: boolean;
114
- /** A WebSocket implementation where there is no global one (older Node). */
115
+ /**
116
+ * A WebSocket implementation where there is no global one (older Node). With Node's `ws`
117
+ * package, a gateway that refuses the connect token (`HTTP 401`) is reported as `Denied`
118
+ * with the gateway's reason; a browser, and Node's built-in WebSocket, cannot read a refused
119
+ * upgrade, so there it is `Unavailable`. A gateway before ck-exec 0.10.0 closed with 4401,
120
+ * which is `Denied` everywhere.
121
+ */
115
122
  WebSocket?: ExecWebSocketCtor;
116
123
  /** MessagePack decoding options, e.g. `{ useBigInt64: true }` for 64-bit integers above 2^53. */
117
124
  decode?: DecoderOptions;
118
125
  }
126
+ /**
127
+ * Why {@link ExecAPI.connect} will not send a connect token to `gatewayUrl`, or null when it
128
+ * will. The game API names the gateway, and the token rides in its query string, so a gateway
129
+ * must be `ws:` or `wss:` (`wss:` whenever the game API is `https:`), carry no credentials,
130
+ * and be on the estate of the game API or of this release's default origin
131
+ * (`CROWDY_DEFAULT_HTTP_ORIGIN`, the tier the SDK was published for), as
132
+ * `BinaryRelayTransport` holds a reconnect directive to its estate. A game API on loopback
133
+ * (ck-exec's local cluster) may also name a loopback gateway. `gameApiUrl` may be relative to
134
+ * the page.
135
+ */
136
+ export declare function execGatewayRefusal(gameApiUrl: string, gatewayUrl: string): string | null;
119
137
  /**
120
138
  * One player's connection to a ck-exec host. Calls go to any node of the app;
121
139
  * the host routes them. Subscriptions survive reconnects.
@@ -138,7 +156,8 @@ export declare class ExecConnection {
138
156
  constructor(dial: () => Promise<ExecEndpoint>, options?: ExecConnectOptions);
139
157
  /**
140
158
  * Opens a connection to a known gateway with a connect token, without the game API
141
- * (tools and tests; a game uses {@link ExecAPI.connect}). It does not reconnect.
159
+ * (tools and tests; a game uses {@link ExecAPI.connect}). It does not reconnect, and it
160
+ * dials the URL it is given: {@link execGatewayRefusal} judges only what the game API names.
142
161
  */
143
162
  static open(gatewayUrl: string, token: string, options?: Omit<ExecConnectOptions, 'reconnect'>): Promise<ExecConnection>;
144
163
  /** The execution host this connection is on. */
@@ -402,6 +421,8 @@ export declare function isNameList(value: unknown): value is string[];
402
421
  export declare class ExecAPI {
403
422
  private readonly graphql;
404
423
  constructor(graphql: GraphQLClient);
424
+ /** `fetch`, refusing a gateway {@link execGatewayRefusal} will not send a token to. */
425
+ private checked;
405
426
  /**
406
427
  * A host and a developer connect token for `appId` (valid for about a minute). The
407
428
  * session's calls arrive as `Caller::Developer` with your user id and may reach any
@@ -605,7 +626,11 @@ export declare class ExecAPI {
605
626
  * `consentedHostCalls: capabilitySummary.hostFunctions`.
606
627
  */
607
628
  modClientArtifactBytes(appId: string, modId: string): Promise<ExecModClientArtifactBytes>;
608
- /** A host for this player and its connect token (valid for about a minute). */
629
+ /**
630
+ * A host for this player and its connect token (valid for about a minute). {@link connect}
631
+ * dials its gateway only when {@link execGatewayRefusal} passes it; dialing it any other way,
632
+ * apply the same check.
633
+ */
609
634
  endpoint(appId: string, options?: {
610
635
  nodeType?: string;
611
636
  key?: string;
@@ -615,7 +640,10 @@ export declare class ExecAPI {
615
640
  /**
616
641
  * Connects the signed-in player to ck-exec for `appId`. The session token must be
617
642
  * that app's app-scoped token. With `nodeType` (and `key`) the player lands on the
618
- * host that runs that instance.
643
+ * host that runs that instance. A gateway that {@link execGatewayRefusal} refuses is never
644
+ * dialed: the attempt fails `Unavailable`, and a reconnect asks the game API again.
645
+ * @throws {CrowdyExecError} `Denied` when the gateway refuses the connect token (see
646
+ * {@link ExecConnectOptions.WebSocket}), `Unavailable` when no host could be reached.
619
647
  */
620
648
  connect(appId: string, options?: ExecConnectOptions): Promise<ExecConnection>;
621
649
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/domains/exec.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,WAAW,EAAuB,MAAM,cAAc,CAAC;AAChE,OAAO,EAGL,KAAK,2BAA2B,EAEhC,KAAK,uBAAuB,EAS5B,KAAK,sBAAsB,EAE3B,KAAK,+BAA+B,EAEpC,KAAK,kBAAkB,EAEvB,KAAK,aAAa,EAKlB,KAAK,0BAA0B,EAI/B,KAAK,2BAA2B,EAGhC,KAAK,qBAAqB,EAE1B,KAAK,4BAA4B,EAIjC,YAAY,EAIZ,KAAK,2BAA2B,EAWhC,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB;;;;;;;;;;;;;;;;;;GAkBG;AAEH,oFAAoF;AACpF,eAAO,MAAM,aAAa,2JAahB,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;AAEpE,wCAAwC;AACxC,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAEpD;AAWD;;;;;;;;;GASG;AACH,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,sFAA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;;;;OAQG;IACG,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAsC/F;;;;OAIG;IACG,QAAQ,CACZ,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAO,GAChD,OAAO,CAAC,YAAY,GAAG;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAShD;;;;;;;OAOG;IACG,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,cAAc,CAAC;IASvF;;;;;OAKG;IACG,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CA0BvE"}
@@ -1,4 +1,6 @@
1
1
  import { decode, encode } from '@msgpack/msgpack';
2
+ import { isSameEstate } from '../binary-relay.js';
3
+ import { CROWDY_DEFAULT_HTTP_ORIGIN } from '../default-origin.js';
2
4
  import { CrowdyError, CrowdyProtocolError } from '../errors.js';
3
5
  import { ExecActivateVersionDocument, ExecAppStatusDocument, ExecBuildDocument, ExecBuildStatusDocument, ExecConnectAsDeveloperDocument, ExecConnectDocument, ExecConsentClientModDocument, ExecDeployDocument, ExecEndpointStatsDocument, ExecGridClientModsDocument, ExecInstancesDocument, ExecLogsDocument, ExecAppModsDocument, ExecModBuildDocument, ExecModBuildStatusDocument, ExecModClientArtifactDocument, ExecModClientBuildDocument, ExecModClientDeleteDocument, ExecModClientDeployDocument, ExecModDeleteDocument, ExecModDeployDocument, ExecModInstallDocument, ExecModListingsDocument, ExecModLogsDocument, ExecModPublishDocument, ExecModScope, ExecModSetEnabledDocument, ExecModSetSwitchDocument, ExecModStarterDocument, ExecModSwitchesDocument, ExecModUnpublishDocument, ExecModsDocument, ExecMyModsDocument, ExecRevokeAuthorTrustDocument, ExecRevokeClientModConsentDocument, ExecSetEnabledDocument, ExecStartersDocument, ExecTrustAuthorDocument, ExecVersionsDocument, } from '../generated/graphql.js';
4
6
  export { ExecModScope };
@@ -16,7 +18,8 @@ export { ExecModScope };
16
18
  * ```
17
19
  *
18
20
  * `connect` asks the game API for a host (`execConnect`, with the app-scoped token
19
- * of `appId` as the session token) and opens a WebSocket to its gateway. Frames are
21
+ * of `appId` as the session token) and opens a WebSocket to its gateway, once the
22
+ * gateway passes {@link execGatewayRefusal}. Frames are
20
23
  * ck-exec's client protocol (`ckx-proto/src/client.rs`); payloads are MessagePack.
21
24
  * The connection recovers by itself: a closed socket or a `Moved` reply asks for a
22
25
  * host again, renews every subscription, and retries the call once.
@@ -190,6 +193,112 @@ const MAX_BACKOFF_MS = 5000;
190
193
  function subKey(nodeType, key, topic) {
191
194
  return `${nodeType}\u0000${key}\u0000${topic}`;
192
195
  }
196
+ // ---- where a connect token may go ----
197
+ function parseUrl(raw, base) {
198
+ try {
199
+ return new URL(raw, base);
200
+ }
201
+ catch {
202
+ return null;
203
+ }
204
+ }
205
+ function isIpLiteral(host) {
206
+ return host.startsWith('[') || /^\d{1,3}(\.\d{1,3}){3}$/.test(host);
207
+ }
208
+ function isLoopback(host) {
209
+ return (host === 'localhost' ||
210
+ host.endsWith('.localhost') ||
211
+ host === '[::1]' ||
212
+ /^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(host));
213
+ }
214
+ /** One host, or two DNS names that {@link isSameEstate} puts on one estate. Never two IPs. */
215
+ function sameEstate(a, b) {
216
+ if (a.hostname === b.hostname)
217
+ return true;
218
+ if (isIpLiteral(a.hostname) || isIpLiteral(b.hostname))
219
+ return false;
220
+ return isSameEstate(a.href, b.href);
221
+ }
222
+ /**
223
+ * Why {@link ExecAPI.connect} will not send a connect token to `gatewayUrl`, or null when it
224
+ * will. The game API names the gateway, and the token rides in its query string, so a gateway
225
+ * must be `ws:` or `wss:` (`wss:` whenever the game API is `https:`), carry no credentials,
226
+ * and be on the estate of the game API or of this release's default origin
227
+ * (`CROWDY_DEFAULT_HTTP_ORIGIN`, the tier the SDK was published for), as
228
+ * `BinaryRelayTransport` holds a reconnect directive to its estate. A game API on loopback
229
+ * (ck-exec's local cluster) may also name a loopback gateway. `gameApiUrl` may be relative to
230
+ * the page.
231
+ */
232
+ export function execGatewayRefusal(gameApiUrl, gatewayUrl) {
233
+ const gateway = parseUrl(gatewayUrl);
234
+ if (!gateway)
235
+ return 'it is not an absolute URL';
236
+ if (gateway.protocol !== 'ws:' && gateway.protocol !== 'wss:') {
237
+ return `${gateway.protocol} is not a WebSocket scheme`;
238
+ }
239
+ if (gateway.username || gateway.password)
240
+ return 'it carries credentials';
241
+ const page = globalThis.location?.href;
242
+ const api = parseUrl(gameApiUrl, page);
243
+ if (!api)
244
+ return `the game API URL ${gameApiUrl} is not absolute`;
245
+ if (api.protocol === 'https:' && gateway.protocol !== 'wss:') {
246
+ return 'a game API on https: hands out wss: gateways only';
247
+ }
248
+ if (sameEstate(api, gateway))
249
+ return null;
250
+ const tier = parseUrl(CROWDY_DEFAULT_HTTP_ORIGIN);
251
+ if (tier && sameEstate(tier, gateway))
252
+ return null;
253
+ if (isLoopback(api.hostname) && isLoopback(gateway.hostname))
254
+ return null;
255
+ const estates = tier && tier.hostname !== api.hostname ? `${api.hostname} and ${tier.hostname}` : api.hostname;
256
+ return `${gateway.hostname} is outside the estate of ${estates}`;
257
+ }
258
+ /**
259
+ * A gateway's close as an error. 4401 is how a gateway before ck-exec 0.10.0 refused a token:
260
+ * it upgraded, then closed, so a call already in flight learns of it here.
261
+ */
262
+ function closedError(ev) {
263
+ return new CrowdyExecError(ev.code === 4401 ? 'Denied' : 'Unavailable', `the gateway closed the connection (${ev.code}${ev.reason ? `: ${ev.reason}` : ''})`);
264
+ }
265
+ const REFUSAL_REASON_MAX_CHARS = 500;
266
+ const REFUSAL_BODY_WAIT_MS = 1000;
267
+ /**
268
+ * Calls `refused` with the status and body of an upgrade the gateway answered with something
269
+ * other than 101. Since ck-exec 0.10.0 a gateway answers a refused connect token `401` and a
270
+ * player past their session cap `429`, each with the reason as its body, before any
271
+ * WebSocket exists. Only Node's `ws` package can read that answer; a browser's WebSocket, and
272
+ * Node's built-in one, see a failed connection and nothing else.
273
+ */
274
+ function onUpgradeRefused(ws, refused) {
275
+ const node = ws;
276
+ if (typeof node.on !== 'function')
277
+ return;
278
+ node.on('unexpected-response', (_req, res) => {
279
+ let body = '';
280
+ let done = false;
281
+ const finish = () => {
282
+ if (done)
283
+ return;
284
+ done = true;
285
+ clearTimeout(timer);
286
+ refused(res.statusCode ?? 0, body.replace(/\s+/g, ' ').trim().slice(0, REFUSAL_REASON_MAX_CHARS));
287
+ // With a listener, `ws` leaves the handshake to it: end it, which also closes the socket.
288
+ node.terminate?.();
289
+ };
290
+ const timer = setTimeout(finish, REFUSAL_BODY_WAIT_MS);
291
+ res.setEncoding?.('utf8');
292
+ res.on('data', (chunk) => {
293
+ body += chunk;
294
+ if (body.length > REFUSAL_REASON_MAX_CHARS)
295
+ finish();
296
+ });
297
+ res.on('end', finish);
298
+ res.on('error', finish);
299
+ res.on('close', finish);
300
+ });
301
+ }
193
302
  /**
194
303
  * One player's connection to a ck-exec host. Calls go to any node of the app;
195
304
  * the host routes them. Subscriptions survive reconnects.
@@ -217,7 +326,8 @@ export class ExecConnection {
217
326
  }
218
327
  /**
219
328
  * Opens a connection to a known gateway with a connect token, without the game API
220
- * (tools and tests; a game uses {@link ExecAPI.connect}). It does not reconnect.
329
+ * (tools and tests; a game uses {@link ExecAPI.connect}). It does not reconnect, and it
330
+ * dials the URL it is given: {@link execGatewayRefusal} judges only what the game API names.
221
331
  */
222
332
  static async open(gatewayUrl, token, options = {}) {
223
333
  const c = new ExecConnection(async () => ({ gatewayUrl, token, host: '' }), {
@@ -261,6 +371,10 @@ export class ExecConnection {
261
371
  /* already closed */
262
372
  }
263
373
  }, OPEN_TIMEOUT_MS);
374
+ onUpgradeRefused(ws, (status, reason) => {
375
+ clearTimeout(timer);
376
+ reject(new CrowdyExecError(status === 401 ? 'Denied' : 'Unavailable', `the gateway refused the connection (HTTP ${status}${reason ? `: ${reason}` : ''})`));
377
+ });
264
378
  ws.onopen = () => {
265
379
  clearTimeout(timer);
266
380
  resolve();
@@ -271,7 +385,7 @@ export class ExecConnection {
271
385
  };
272
386
  ws.onclose = (ev) => {
273
387
  clearTimeout(timer);
274
- reject(new CrowdyExecError(ev.code === 4401 ? 'Denied' : 'Unavailable', `the gateway closed the connection (${ev.code}${ev.reason ? `: ${ev.reason}` : ''})`));
388
+ reject(closedError(ev));
275
389
  };
276
390
  });
277
391
  this.ws = ws;
@@ -279,7 +393,7 @@ export class ExecConnection {
279
393
  this.backoffMs = 250;
280
394
  ws.onmessage = (ev) => this.onMessage(ev.data);
281
395
  ws.onerror = () => { };
282
- ws.onclose = () => this.onClosed(ws);
396
+ ws.onclose = (ev) => this.onClosed(ws, ev);
283
397
  }
284
398
  onMessage(data) {
285
399
  let frame;
@@ -333,11 +447,11 @@ export class ExecConnection {
333
447
  continue;
334
448
  this.pending.delete(rid);
335
449
  clearTimeout(p.timer);
336
- p.reject(new CrowdyExecError('Unavailable', why));
450
+ p.reject(typeof why === 'string' ? new CrowdyExecError('Unavailable', why) : why);
337
451
  }
338
452
  }
339
- onClosed(ws) {
340
- this.rejectPending(ws, 'the connection to the execution host closed');
453
+ onClosed(ws, ev) {
454
+ this.rejectPending(ws, ev?.code === 4401 ? closedError(ev) : 'the connection to the execution host closed');
341
455
  if (this.ws !== ws)
342
456
  return;
343
457
  this.ws = null;
@@ -595,6 +709,16 @@ export class ExecAPI {
595
709
  constructor(graphql) {
596
710
  this.graphql = graphql;
597
711
  }
712
+ /** `fetch`, refusing a gateway {@link execGatewayRefusal} will not send a token to. */
713
+ checked(fetch) {
714
+ return async () => {
715
+ const endpoint = await fetch();
716
+ const why = execGatewayRefusal(this.graphql.endpoint ?? CROWDY_DEFAULT_HTTP_ORIGIN, endpoint.gatewayUrl);
717
+ if (why)
718
+ throw new CrowdyExecError('Unavailable', `refusing the gateway ${endpoint.gatewayUrl}: ${why}`);
719
+ return endpoint;
720
+ };
721
+ }
598
722
  /**
599
723
  * A host and a developer connect token for `appId` (valid for about a minute). The
600
724
  * session's calls arrive as `Caller::Developer` with your user id and may reach any
@@ -615,7 +739,7 @@ export class ExecAPI {
615
739
  * developer token.
616
740
  */
617
741
  async connectAsDeveloper(appId, options = {}) {
618
- const c = new ExecConnection(() => this.developerEndpoint(appId, { nodeType: options.nodeType, key: options.key }), options);
742
+ const c = new ExecConnection(this.checked(() => this.developerEndpoint(appId, { nodeType: options.nodeType, key: options.key })), options);
619
743
  await c.connect();
620
744
  return c;
621
745
  }
@@ -985,7 +1109,11 @@ export class ExecAPI {
985
1109
  abiVersion: a.abiVersion,
986
1110
  };
987
1111
  }
988
- /** A host for this player and its connect token (valid for about a minute). */
1112
+ /**
1113
+ * A host for this player and its connect token (valid for about a minute). {@link connect}
1114
+ * dials its gateway only when {@link execGatewayRefusal} passes it; dialing it any other way,
1115
+ * apply the same check.
1116
+ */
989
1117
  async endpoint(appId, options = {}) {
990
1118
  const data = await this.graphql.request(ExecConnectDocument, {
991
1119
  appId,
@@ -997,10 +1125,13 @@ export class ExecAPI {
997
1125
  /**
998
1126
  * Connects the signed-in player to ck-exec for `appId`. The session token must be
999
1127
  * that app's app-scoped token. With `nodeType` (and `key`) the player lands on the
1000
- * host that runs that instance.
1128
+ * host that runs that instance. A gateway that {@link execGatewayRefusal} refuses is never
1129
+ * dialed: the attempt fails `Unavailable`, and a reconnect asks the game API again.
1130
+ * @throws {CrowdyExecError} `Denied` when the gateway refuses the connect token (see
1131
+ * {@link ExecConnectOptions.WebSocket}), `Unavailable` when no host could be reached.
1001
1132
  */
1002
1133
  async connect(appId, options = {}) {
1003
- const c = new ExecConnection(() => this.endpoint(appId, { nodeType: options.nodeType, key: options.key }), options);
1134
+ const c = new ExecConnection(this.checked(() => this.endpoint(appId, { nodeType: options.nodeType, key: options.key })), options);
1004
1135
  await c.connect();
1005
1136
  return c;
1006
1137
  }
@@ -1,5 +1,5 @@
1
1
  import type { GraphQLClient } from '../client.js';
2
- import { type GridOwnershipQuery, type AssignGridOwnershipMutation, type TransferGridOwnershipMutation, type GridUserPermissionsQuery, type NearbyGridPermissionsQuery, type NearbyGridsQuery, type GridPermissionLimitsQuery, type GridGroupGrantsQuery, type CreateGridMutation, type DeleteGridMutation, type GrantGridPermissionsMutation, type RevokeGridPermissionsMutation, type SetGridPermissionLimitsMutation, type AssignGroupToGridMutation, type RevokeGroupFromGridMutation, type AssignGridOwnershipInput, type TransferGridOwnershipInput, type NearbyGridPermissionsInput, type NearbyGridsInput, type CreateGridInput, type DeleteGridInput, type GrantGridPermissionsInput, type RevokeGridPermissionsInput, type SetGridPermissionLimitsInput, type AssignGroupToGridInput, type RevokeGroupFromGridInput } from '../generated/graphql.js';
2
+ import { type GridOwnershipQuery, type AssignGridOwnershipMutation, type TransferGridOwnershipMutation, type GridUserPermissionsQuery, type NearbyGridPermissionsQuery, type NearbyGridsQuery, type GridPermissionLimitsQuery, type GridOpenPermissionsQuery, type GridGroupGrantsQuery, type CreateGridMutation, type DeleteGridMutation, type GrantGridPermissionsMutation, type RevokeGridPermissionsMutation, type SetGridPermissionLimitsMutation, type SetGridOpenPermissionsMutation, type AssignGroupToGridMutation, type RevokeGroupFromGridMutation, type AssignGridOwnershipInput, type TransferGridOwnershipInput, type NearbyGridPermissionsInput, type NearbyGridsInput, type CreateGridInput, type DeleteGridInput, type GrantGridPermissionsInput, type RevokeGridPermissionsInput, type SetGridPermissionLimitsInput, type SetGridOpenPermissionsInput, type AssignGroupToGridInput, type RevokeGroupFromGridInput } from '../generated/graphql.js';
3
3
  /**
4
4
  * App grids + grid runtime-permission administration — exposed as
5
5
  * `client.gameApps` (and grouped under `client.admin`).
@@ -65,6 +65,15 @@ export declare class GameAppsAPI {
65
65
  * @returns The grid's permission limits.
66
66
  */
67
67
  permissionLimits(appId: string, gridId: string): Promise<GridPermissionLimitsQuery['gridPermissionLimits']>;
68
+ /**
69
+ * Read the keys a grid grants every player with active access to the app
70
+ * (an open build area, a public arena). Empty means the grid is not open.
71
+ *
72
+ * @param appId - App that owns the grid.
73
+ * @param gridId - Grid whose open keys to read.
74
+ * @returns The grid's open keys.
75
+ */
76
+ openPermissions(appId: string, gridId: string): Promise<GridOpenPermissionsQuery['gridOpenPermissions']>;
68
77
  /**
69
78
  * List a group's grants on a grid (rows of the group-grants input table).
70
79
  *
@@ -119,6 +128,22 @@ export declare class GameAppsAPI {
119
128
  * @returns The grid's updated permission limits.
120
129
  */
121
130
  setPermissionLimits(input: SetGridPermissionLimitsInput): Promise<SetGridPermissionLimitsMutation['setGridPermissionLimits']>;
131
+ /**
132
+ * Open a grid to every player: replace the keys it grants each player with
133
+ * active access to the app, within its limits, then recompute the effective
134
+ * ACL for all of them. Players who gain access later get them too. The most
135
+ * specific grid covering a chunk decides a voxel write there, so a zone
136
+ * nested in the world grid that everyone may build in must grant
137
+ * `update_voxel_data` itself. An empty `permissionKeys` closes the grid.
138
+ *
139
+ * Refused with `BAD_REQUEST` for the app's world grid (open already), any of
140
+ * the four player-code keys, a key that is not an active grid key, and a
141
+ * 33rd open grid in one app.
142
+ *
143
+ * @param input - {@link SetGridOpenPermissionsInput}.
144
+ * @returns The grid's open keys after the change.
145
+ */
146
+ setOpenPermissions(input: SetGridOpenPermissionsInput): Promise<SetGridOpenPermissionsMutation['setGridOpenPermissions']>;
122
147
  /**
123
148
  * Grant permission keys to a group (optionally a single role) on a grid;
124
149
  * recomputes the effective ACL.
@@ -1 +1 @@
1
- {"version":3,"file":"gameApps.d.ts","sourceRoot":"","sources":["../../src/domains/gameApps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAgBL,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B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;;;OAcG;IACG,kBAAkB,CACtB,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,8BAA8B,CAAC,wBAAwB,CAAC,CAAC;IAOpE;;;;;;OAMG;IACG,WAAW,CACf,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,yBAAyB,CAAC,mBAAmB,CAAC,CAAC;IAO1D;;;;;;OAMG;IACG,WAAW,CACf,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,2BAA2B,CAAC,qBAAqB,CAAC,CAAC;CAM/D"}
@@ -1,4 +1,4 @@
1
- import { GridOwnershipDocument, AssignGridOwnershipDocument, TransferGridOwnershipDocument, GridUserPermissionsDocument, NearbyGridPermissionsDocument, NearbyGridsDocument, GridPermissionLimitsDocument, GridGroupGrantsDocument, CreateGridDocument, DeleteGridDocument, GrantGridPermissionsDocument, RevokeGridPermissionsDocument, SetGridPermissionLimitsDocument, AssignGroupToGridDocument, RevokeGroupFromGridDocument, } from '../generated/graphql.js';
1
+ import { GridOwnershipDocument, AssignGridOwnershipDocument, TransferGridOwnershipDocument, GridUserPermissionsDocument, NearbyGridPermissionsDocument, NearbyGridsDocument, GridPermissionLimitsDocument, GridOpenPermissionsDocument, GridGroupGrantsDocument, CreateGridDocument, DeleteGridDocument, GrantGridPermissionsDocument, RevokeGridPermissionsDocument, SetGridPermissionLimitsDocument, SetGridOpenPermissionsDocument, AssignGroupToGridDocument, RevokeGroupFromGridDocument, } from '../generated/graphql.js';
2
2
  /**
3
3
  * App grids + grid runtime-permission administration — exposed as
4
4
  * `client.gameApps` (and grouped under `client.admin`).
@@ -98,6 +98,21 @@ export class GameAppsAPI {
98
98
  });
99
99
  return data.gridPermissionLimits;
100
100
  }
101
+ /**
102
+ * Read the keys a grid grants every player with active access to the app
103
+ * (an open build area, a public arena). Empty means the grid is not open.
104
+ *
105
+ * @param appId - App that owns the grid.
106
+ * @param gridId - Grid whose open keys to read.
107
+ * @returns The grid's open keys.
108
+ */
109
+ async openPermissions(appId, gridId) {
110
+ const data = await this.graphql.request(GridOpenPermissionsDocument, {
111
+ appId,
112
+ gridId,
113
+ });
114
+ return data.gridOpenPermissions;
115
+ }
101
116
  /**
102
117
  * List a group's grants on a grid (rows of the group-grants input table).
103
118
  *
@@ -180,6 +195,27 @@ export class GameAppsAPI {
180
195
  });
181
196
  return data.setGridPermissionLimits;
182
197
  }
198
+ /**
199
+ * Open a grid to every player: replace the keys it grants each player with
200
+ * active access to the app, within its limits, then recompute the effective
201
+ * ACL for all of them. Players who gain access later get them too. The most
202
+ * specific grid covering a chunk decides a voxel write there, so a zone
203
+ * nested in the world grid that everyone may build in must grant
204
+ * `update_voxel_data` itself. An empty `permissionKeys` closes the grid.
205
+ *
206
+ * Refused with `BAD_REQUEST` for the app's world grid (open already), any of
207
+ * the four player-code keys, a key that is not an active grid key, and a
208
+ * 33rd open grid in one app.
209
+ *
210
+ * @param input - {@link SetGridOpenPermissionsInput}.
211
+ * @returns The grid's open keys after the change.
212
+ */
213
+ async setOpenPermissions(input) {
214
+ const data = await this.graphql.request(SetGridOpenPermissionsDocument, {
215
+ input,
216
+ });
217
+ return data.setGridOpenPermissions;
218
+ }
183
219
  /**
184
220
  * Grant permission keys to a group (optionally a single role) on a grid;
185
221
  * recomputes the effective ACL.