@crowdedkingdoms/crowdyjs 18.25.0-dev.1 → 18.25.0

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/README.md CHANGED
@@ -12,23 +12,19 @@ gameplay, minted per app through `client.portal`.
12
12
 
13
13
  Start here:
14
14
 
15
- - [SDK guide](https://docs.dev.crowdedkingdoms.com/crowdyjs/readme) — the canonical
15
+ - [SDK guide](https://docs.crowdedkingdoms.com/crowdyjs/readme) — the canonical
16
16
  walkthrough of everything in this README.
17
- - [Build a game](https://docs.dev.crowdedkingdoms.com/build-a-game/intro) — a
17
+ - [Build a game](https://docs.crowdedkingdoms.com/build-a-game/intro) — a
18
18
  hands-on tutorial from sign-in to a playable voxel game.
19
- - [Platform overview](https://docs.dev.crowdedkingdoms.com/overview/client-workflow)
19
+ - [Platform overview](https://docs.crowdedkingdoms.com/overview/client-workflow)
20
20
  — how a client session flows through the platform.
21
21
 
22
22
  ## Install
23
23
 
24
24
  ```bash
25
- npm install @crowdedkingdoms/crowdyjs@dev
25
+ npm install @crowdedkingdoms/crowdyjs
26
26
  ```
27
27
 
28
- This README is the `dev` branch's: it documents the release on the `dev` dist-tag
29
- (`npm view @crowdedkingdoms/crowdyjs dist-tags`), and its links go to the dev docs site. A
30
- plain `npm install` resolves `latest`, the production release, which has no `client.exec`.
31
-
32
28
  **Server compatibility.** A release selects fields the Game API it was built against has,
33
29
  so it needs that Game API or newer; promote the Game API before the SDK on each tier.
34
30
 
@@ -217,8 +213,8 @@ Notes:
217
213
  - Use `client.auth.setToken(token)` to seed a token externally (e.g. when
218
214
  restoring auth from a non-default storage).
219
215
 
220
- Deeper reading: [Portals & app-scoped tokens](https://docs.dev.crowdedkingdoms.com/management-api/portals-and-app-tokens)
221
- and [Sign in](https://docs.dev.crowdedkingdoms.com/management-api/authentication).
216
+ Deeper reading: [Portals & app-scoped tokens](https://docs.crowdedkingdoms.com/management-api/portals-and-app-tokens)
217
+ and [Sign in](https://docs.crowdedkingdoms.com/management-api/authentication).
222
218
 
223
219
  ### Org-managed players
224
220
 
@@ -510,7 +506,7 @@ query AppForRouting($appId: BigInt!) {
510
506
  `CrowdyClient` with `httpUrl: gameApiUrl` (and the matching `wsUrl`) holding
511
507
  that app's app-scoped token, then drive gameplay through that client. Apps
512
508
  with no `gameApiUrl` keep working against the default `httpUrl` you
513
- configured. See [Loading an app's Game API](https://docs.dev.crowdedkingdoms.com/crowdyjs/shared-environment-routing).
509
+ configured. See [Loading an app's Game API](https://docs.crowdedkingdoms.com/crowdyjs/shared-environment-routing).
514
510
 
515
511
  ## Realtime notifications
516
512
 
@@ -946,7 +942,7 @@ reach your bundle. Reads are synchronous snapshots and writes happen on
946
942
  WebSocket events (not `requestAnimationFrame`), so render loops read freely
947
943
  and a backgrounded tab keeps ingesting updates; pass `workerTicker()` to also
948
944
  keep timer-driven sends at full rate while hidden. See the
949
- [World Stores guide](https://docs.dev.crowdedkingdoms.com/crowdyjs/stores).
945
+ [World Stores guide](https://docs.crowdedkingdoms.com/crowdyjs/stores).
950
946
 
951
947
  ## Game Kit
952
948
 
@@ -1024,7 +1020,7 @@ The protocol is held to ck-exec's golden record of the starters
1024
1020
  (`test/unit/fixtures/kit-protocol.json`): every module call and topic in it is replayed in
1025
1021
  `test/unit/game-kit.test.mjs`. The blueprints, `kit.deploy`, the engines and the model-backed
1026
1022
  helpers went with the game model in 18.0.0; the hub modules replace them. See the
1027
- [Game Kit docs](https://docs.dev.crowdedkingdoms.com/game-kit/intro) and
1023
+ [Game Kit docs](https://docs.crowdedkingdoms.com/game-kit/intro) and
1028
1024
  [MIGRATION.md](MIGRATION.md).
1029
1025
 
1030
1026
  ## ck-exec
@@ -1088,7 +1084,7 @@ Integers above 2^53 decode as `number` and lose precision unless you pass
1088
1084
  `{ decode: { useBigInt64: true } }`. A call's whole numbers outside 32 bits (a timestamp in
1089
1085
  milliseconds, a player id) go out as 64-bit integers (18.11.0; before, as floats, which a
1090
1086
  hub's integer fields refuse). The wire format is in the
1091
- [ck-exec docs](https://docs.dev.crowdedkingdoms.com/exec/intro).
1087
+ [ck-exec docs](https://docs.crowdedkingdoms.com/exec/intro).
1092
1088
 
1093
1089
  ### A mod's CLIENT half
1094
1090
 
@@ -1159,7 +1155,7 @@ counts what was dropped); `invoke` sends at most 256 KiB each way and is refused
1159
1155
  module is not running. `NOT_FOUND` holds a CLIENT half back 15 s and `RATE_LIMITED` 60 s. The
1160
1156
  grid's owner is asked about their own CLIENT halves like anyone; answer yes in `confirm` when
1161
1157
  `prompt.authorId` is the player. See
1162
- [CLIENT halves](https://docs.dev.crowdedkingdoms.com/exec/client-halves).
1158
+ [CLIENT halves](https://docs.crowdedkingdoms.com/exec/client-halves).
1163
1159
 
1164
1160
  ## Hosting your game
1165
1161
 
@@ -1172,7 +1168,7 @@ set response headers. Then, in Studio, open the app's
1172
1168
  origin as the app's **Launch URL**. The redirect URI is what admits the origin to CORS
1173
1169
  and to the hosted sign-in return, so `portal.signIn` works there as in the
1174
1170
  [Quick start](#quick-start).
1175
- [Host your game](https://docs.dev.crowdedkingdoms.com/build-a-game/host-your-game)
1171
+ [Host your game](https://docs.crowdedkingdoms.com/build-a-game/host-your-game)
1176
1172
  has the requirements and recipes.
1177
1173
 
1178
1174
  `client.hosting`, `uploadPublishFiles`, `publishDirectory` and `manifestForDirectory`
@@ -1268,8 +1264,8 @@ CLIENT project needs ck-api `v2.25.1` or later. A CLIENT crate still on the lega
1268
1264
  `mountCrowdyStudio` and the controller take `mods: client.exec`. Crowdy Studio runs nothing
1269
1265
  on legacy player compute since 18.0.0.
1270
1266
 
1271
- See [CLIENT halves](https://docs.dev.crowdedkingdoms.com/exec/client-halves), [mods](https://docs.dev.crowdedkingdoms.com/exec/mods)
1272
- and [Embed Crowdy Studio in your game](https://docs.dev.crowdedkingdoms.com/crowdyjs/crowdy-studio-embed).
1267
+ See [CLIENT halves](https://docs.crowdedkingdoms.com/exec/client-halves), [mods](https://docs.crowdedkingdoms.com/exec/mods)
1268
+ and [Embed Crowdy Studio in your game](https://docs.crowdedkingdoms.com/crowdyjs/crowdy-studio-embed).
1273
1269
 
1274
1270
  ### The Studio agent (DeepSeek Harness in the browser)
1275
1271
 
@@ -1525,7 +1521,7 @@ no other repositories and no network access required:
1525
1521
  `src/generated/graphql-schema.ts`, the generated schema types.
1526
1522
 
1527
1523
  Schema refresh is explicit, from the published
1528
- [SDL](https://docs.dev.crowdedkingdoms.com/schema/game-api.graphql):
1524
+ [SDL](https://docs.crowdedkingdoms.com/schema/game-api.graphql):
1529
1525
 
1530
1526
  ```bash
1531
1527
  npm run schema:sync:prod
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * GENERATED — do not edit. The operator tooling's
3
- * `sync-client-origins.mjs --write --tier dev` writes this file, and
3
+ * `sync-client-origins.mjs --write --tier prod` writes this file, and
4
4
  * `check-sdk-default-origin.mjs` refuses it when it names the wrong tier or a
5
5
  * host that declaration does not carry. Regenerate; never hand-edit.
6
6
  *
@@ -10,14 +10,14 @@
10
10
  * than no default at all. Every fallback this SDK ever removed named a host that
11
11
  * was already dead. A generated file plus a gate is what makes this one different.
12
12
  *
13
- * Source: the operator's per-tier public CK API origin declaration, tier 'dev'
13
+ * Source: the operator's per-tier public CK API origin declaration, tier 'prod'
14
14
  */
15
15
  /** The tier this build of the SDK is published for. */
16
- export declare const CROWDY_DEFAULT_TIER = "dev";
16
+ export declare const CROWDY_DEFAULT_TIER = "prod";
17
17
  /** The public CK API origin for that tier. */
18
- export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.dev.crowdedkingdoms.com";
18
+ export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.prod.crowdedkingdoms.com";
19
19
  /** The same host over WebSocket. A scheme is composed; a hostname is looked up. */
20
- export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.dev.crowdedkingdoms.com";
20
+ export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.prod.crowdedkingdoms.com";
21
21
  /** The bare hostname, for callers that need to compare rather than dial. */
22
- export declare const CROWDY_DEFAULT_HOST = "ck.dev.crowdedkingdoms.com";
22
+ export declare const CROWDY_DEFAULT_HOST = "ck.prod.crowdedkingdoms.com";
23
23
  //# sourceMappingURL=default-origin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"default-origin.d.ts","sourceRoot":"","sources":["../src/default-origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,QAAQ,CAAC;AAEzC,8CAA8C;AAC9C,eAAO,MAAM,0BAA0B,uCAAuC,CAAC;AAE/E,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,qCAAqC,CAAC;AAE3E,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,+BAA+B,CAAC"}
1
+ {"version":3,"file":"default-origin.d.ts","sourceRoot":"","sources":["../src/default-origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAE1C,8CAA8C;AAC9C,eAAO,MAAM,0BAA0B,wCAAwC,CAAC;AAEhF,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,sCAAsC,CAAC;AAE5E,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,gCAAgC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * GENERATED — do not edit. The operator tooling's
3
- * `sync-client-origins.mjs --write --tier dev` writes this file, and
3
+ * `sync-client-origins.mjs --write --tier prod` writes this file, and
4
4
  * `check-sdk-default-origin.mjs` refuses it when it names the wrong tier or a
5
5
  * host that declaration does not carry. Regenerate; never hand-edit.
6
6
  *
@@ -10,13 +10,13 @@
10
10
  * than no default at all. Every fallback this SDK ever removed named a host that
11
11
  * was already dead. A generated file plus a gate is what makes this one different.
12
12
  *
13
- * Source: the operator's per-tier public CK API origin declaration, tier 'dev'
13
+ * Source: the operator's per-tier public CK API origin declaration, tier 'prod'
14
14
  */
15
15
  /** The tier this build of the SDK is published for. */
16
- export const CROWDY_DEFAULT_TIER = 'dev';
16
+ export const CROWDY_DEFAULT_TIER = 'prod';
17
17
  /** The public CK API origin for that tier. */
18
- export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.dev.crowdedkingdoms.com';
18
+ export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.prod.crowdedkingdoms.com';
19
19
  /** The same host over WebSocket. A scheme is composed; a hostname is looked up. */
20
- export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.dev.crowdedkingdoms.com';
20
+ export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.prod.crowdedkingdoms.com';
21
21
  /** The bare hostname, for callers that need to compare rather than dial. */
22
- export const CROWDY_DEFAULT_HOST = 'ck.dev.crowdedkingdoms.com';
22
+ export const CROWDY_DEFAULT_HOST = 'ck.prod.crowdedkingdoms.com';
@@ -4959,7 +4959,7 @@ export type Mutation = {
4959
4959
  createOrgToken: OrgTokenWithSecret;
4960
4960
  /** Creates a new organization and makes the authenticated caller its owner (with full permissions). Requires a valid session token. Once developers accept their own documents (developerLegalDocuments not empty), refused with LEGAL_ACCEPTANCE_REQUIRED until recordDeveloperConsents, and to an account under 18 (AGE_REQUIREMENT_NOT_MET) or with no age (AGE_REQUIRED); administering an organization or app asks the same. */
4961
4961
  createOrganization: Organization;
4962
- /** Create a one-time, PKCE-bound portal authorization code (browser handoff). The Overworld identity origin (holding the SESSION token) calls this; redirect the player to the destination game carrying the code, which the game exchanges via exchangePortalCode. Requires a SESSION token. */
4962
+ /** Create a one-time, PKCE-bound portal authorization code (browser handoff). The Overworld identity origin (holding the SESSION token) calls this; redirect the player to the destination game carrying the code, which the game exchanges via exchangePortalCode. Refused like mintAppToken before any code exists: TERRITORY_NOT_SUPPORTED, AGE_REQUIRED, AGE_REQUIREMENT_NOT_MET and LEGAL_ACCEPTANCE_REQUIRED, and for a player under 18 SAFETY_LOG_REQUIRED (the app keeps no safety log) then SAFETY_MODERATOR_REQUIRED (its organization has no safety moderator), with the same neutral messages. Requires a SESSION token. */
4963
4963
  createPortalAuthorizationCode: PortalAuthorizationCode;
4964
4964
  /** Create a team. Whether the caller may create one is governed by the per-app team policy (app_group_policies: admin | member | anyone). The caller becomes the owner and is granted a system 'leader' role holding every team permission. New teams default to the app's default membership policy unless overridden. */
4965
4965
  createTeam: Group;
@@ -5143,7 +5143,7 @@ export type Mutation = {
5143
5143
  recordDeveloperConsents: Scalars['Boolean']['output'];
5144
5144
  /** OPERATOR: record a parent's withdrawal of consent to one medium (VOICE or VIDEO) for one player in one app, when it reached Crowded Kingdoms by email rather than through the consent service. It ends the consent as the service's own withdrawal does, recomputes the player's communication settings (a minor's medium goes back to OFF) and tells the realtime servers (P2P_SOCIAL_REFRESH) when that changes what they read, so live sessions apply it within a second. withdrawn is false when no consent was held; the settings are recomputed all the same, so calling it again is safe. NOT_FOUND unless the player has a grant or a consent in the app. Send the identity session to the app's datacenter. */
5145
5145
  recordParentalConsentWithdrawal: ParentalConsentWithdrawal;
5146
- /** Record the signed-in player's birth date and country, and under 18 that a parent or guardian agreed, for an account whose age is not known yet (me.ageBracket is 'unknown'). Only the year and month are kept. Refused with CONFLICT when the account already has an age, TERRITORY_NOT_SUPPORTED where Crowded Kingdoms does not serve (the declared country, or the network's country or region; not for Crowded Kingdoms staff), and AGE_REQUIREMENT_NOT_MET under 13, in which case the account is deleted and erased as deleteMyAccount does. That refusal names no age, and for 24 hours afterwards the same client (address and user agent) is refused AGE_REQUIREMENT_NOT_MET here and at register whatever it sends. Whether the player may play a given app (its minimum age, the country's) is decided at the mint. Returns the account; read ageBracket and country. Requires a session token. */
5146
+ /** Record the signed-in player's birth date and country, and under 18 that a parent or guardian agreed, for an account whose age is not known yet (me.ageBracket is 'unknown'). Only the year and month are kept. Refused with CONFLICT when the account already has an age, TERRITORY_NOT_SUPPORTED where Crowded Kingdoms does not serve (the declared country, or the network's country or region; not for Crowded Kingdoms staff), and AGE_REQUIREMENT_NOT_MET under 13, in which case the account is deleted and erased as deleteMyAccount does. That refusal names no age, and afterwards the same client is refused AGE_REQUIREMENT_NOT_MET here and at register whatever it sends: for 24 hours a device that sent the x-ck-device-id header (an opaque random id the client keeps), else for an hour the same address and user agent. Whether the player may play a given app (its minimum age, the country's) is decided at the mint. Returns the account; read ageBracket and country. Requires a session token. */
5147
5147
  recordPlayerAge: User;
5148
5148
  /** Store acceptance of the platform's current player documents (playerLegalDocuments) and, with appId, of the app's own (appRequiredDocuments), recorded with the app and the method. acceptLegal must be true. attestAgeOfMajority must be true too while the platform still uses the age-of-majority attestation (the player then counts as 18 or older); once players give a birth date instead (recordPlayerAge) it is ignored. A refused call stores nothing (LEGAL_ACCEPTANCE_REQUIRED). Idempotent for a version already stored. Requires a session token. Gameplay tokens stay refused until this has succeeded for the current documents. */
5149
5149
  recordPlayerConsents: Scalars['Boolean']['output'];
@@ -5175,7 +5175,7 @@ export type Mutation = {
5175
5175
  requestContact: PlayerContact;
5176
5176
  /** Passwordless: email a one-time magic sign-in link to the address (creates the account on first sign-in). Always reports sent=true (no account enumeration). Public; first-party origins only (HOSTED_SIGN_IN_REQUIRED otherwise); rate-limited. */
5177
5177
  requestLoginLink: RequestLoginLinkResult;
5178
- /** For a player under 18: ask a parent, through the consent service (Kids Web Services), to allow one medium (VOICE or VIDEO) in this app. The service emails parentEmail; once the parent consents, the medium opens up to CONTACTS (see myCommSettings). The address goes to the service and is not stored by Crowded Kingdoms. NOT_REQUIRED for a player 18 or over, ALREADY_GRANTED if a parent has consented. Errors: PARENTAL_CONSENT_UNAVAILABLE while the service is not configured on this deployment; RATE_LIMITED after three requests in an hour. Game plane: send the app-scoped token for this app to the app’s datacenter. */
5178
+ /** For a player under 18: ask a parent, through the consent service (Kids Web Services), to allow one medium (VOICE or VIDEO) in this app. The service emails parentEmail; once the parent consents, the medium opens up to CONTACTS (see myCommSettings). The address goes to the service and is not stored by Crowded Kingdoms. NOT_REQUIRED for a player 18 or over, ALREADY_GRANTED if a parent has consented. Errors: PARENTAL_CONSENT_UNAVAILABLE, nothing sent, with extensions.reason not_configured (no consent service on this deployment), provider_refused (the service refused the request, such as an address it does not accept; do not retry it as it is) or provider_unavailable (the service did not answer; retryable); RATE_LIMITED after three requests in an hour. Game plane: send the app-scoped token for this app to the app’s datacenter. */
5179
5179
  requestParentalConsent: ParentalConsentRequest;
5180
5180
  /** Starts the password-reset flow by emailing a reset link to the address. Always returns true regardless of whether the email exists (prevents account enumeration). The reset link is also the ownership-proven way an existing passwordless account adds a password. Public; first-party origins only (HOSTED_SIGN_IN_REQUIRED otherwise); rate-limited. */
5181
5181
  requestPasswordReset: Scalars['Boolean']['output'];
@@ -8482,7 +8482,7 @@ export type RegisterUserInput = {
8482
8482
  acceptLegal?: InputMaybe<Scalars['Boolean']['input']>;
8483
8483
  /** True when the player attests they are at least 18, or the age of majority where they live if that is higher. Same requirement as acceptLegal while the platform uses the attestation: required on a browser signup, optional when the request has no Origin. Ignored once the platform asks for birthDate instead. */
8484
8484
  attestAgeOfMajority?: InputMaybe<Scalars['Boolean']['input']>;
8485
- /** Birth date, YYYY-MM-DD (YYYY-MM is accepted too); only the year and month are kept, and the age is counted from the last day of that month. Sent with country. Required on a browser signup once the platform admits players under 18 (AGE_REQUIRED without it); a request with no Origin may omit it and gives it later with recordPlayerAge. Under 13, or under the minimum age where the player is, the signup is refused with AGE_REQUIREMENT_NOT_MET (it names no age) and no account is made; for 24 hours afterwards the same client (address and user agent) is refused AGE_REQUIREMENT_NOT_MET whatever it sends. */
8485
+ /** Birth date, YYYY-MM-DD (YYYY-MM is accepted too); only the year and month are kept, and the age is counted from the last day of that month. Sent with country. Required on a browser signup once the platform admits players under 18 (AGE_REQUIRED without it); a request with no Origin may omit it and gives it later with recordPlayerAge. Under 13, or under the minimum age where the player is, the signup is refused with AGE_REQUIREMENT_NOT_MET (it names no age) and no account is made; afterwards the same client is refused AGE_REQUIREMENT_NOT_MET whatever it sends: for 24 hours a device that sent the x-ck-device-id header (an opaque random id the client keeps), else for an hour the same address and user agent. */
8486
8486
  birthDate?: InputMaybe<Scalars['String']['input']>;
8487
8487
  /** The country the player lives in, ISO 3166-1 alpha-2 (such as US); required with birthDate. A country Crowded Kingdoms does not serve, declared or detected from the network address, is refused with TERRITORY_NOT_SUPPORTED before an account exists. */
8488
8488
  country?: InputMaybe<Scalars['String']['input']>;