@crowdedkingdoms/crowdyjs 18.15.0 → 18.17.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/README.md CHANGED
@@ -12,19 +12,23 @@ gameplay, minted per app through `client.portal`.
12
12
 
13
13
  Start here:
14
14
 
15
- - [SDK guide](https://docs.crowdedkingdoms.com/crowdyjs/readme) — the canonical
15
+ - [SDK guide](https://docs.dev.crowdedkingdoms.com/crowdyjs/readme) — the canonical
16
16
  walkthrough of everything in this README.
17
- - [Build a game](https://docs.crowdedkingdoms.com/build-a-game/intro) — a
17
+ - [Build a game](https://docs.dev.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.crowdedkingdoms.com/overview/client-workflow)
19
+ - [Platform overview](https://docs.dev.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
25
+ npm install @crowdedkingdoms/crowdyjs@dev
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
+
28
32
  **Server compatibility.** A release selects fields the Game API it was built against has,
29
33
  so it needs that Game API or newer; promote the Game API before the SDK on each tier.
30
34
 
@@ -103,6 +107,7 @@ game stack never receives the player's full session.
103
107
  | in a browser, on your own domain (every customer game) | `portal.signIn` -> Studio -> `portal.handleSignInCallback` | the client already holds the app token |
104
108
  | in a browser, on the first-party host (Studio) | `auth.login` / magic link / social | `portal.mintAppToken(appId)` |
105
109
  | outside a browser (Node, CLI, CrowdyCPP, tests) | `auth.login` / `auth.register` | `portal.mintAppToken(appId)` |
110
+ | anywhere, for players of an organization that runs its own accounts | the organization signs its player in: its server mints with an org token, or its sign-in service signs an assertion | `portal.adoptAppToken(response)` / `portal.exchangeManagedPlayerAssertion(...)` — see [Org-managed players](#org-managed-players) |
106
111
 
107
112
  The first row is the only one a game on its own domain can take: the direct
108
113
  sign-in mutations are refused from a non-first-party browser origin with
@@ -195,8 +200,80 @@ Notes:
195
200
  - Use `client.auth.setToken(token)` to seed a token externally (e.g. when
196
201
  restoring auth from a non-default storage).
197
202
 
198
- Deeper reading: [Portals & app-scoped tokens](https://docs.crowdedkingdoms.com/management-api/portals-and-app-tokens)
199
- and [Sign in](https://docs.crowdedkingdoms.com/management-api/authentication).
203
+ Deeper reading: [Portals & app-scoped tokens](https://docs.dev.crowdedkingdoms.com/management-api/portals-and-app-tokens)
204
+ and [Sign in](https://docs.dev.crowdedkingdoms.com/management-api/authentication).
205
+
206
+ ### Org-managed players
207
+
208
+ An organization that runs its own accounts can sign its players in to its own apps itself
209
+ (18.16.0, cks-game-api #557). The player never types a Crowded Kingdoms password, and Crowded
210
+ Kingdoms holds no email or password for it: the organization vouches for the player and the
211
+ device gets the player's own app token, which plays exactly like any other. An org-managed
212
+ player has no session and no wallet, plays only its organization's apps, and its mods are paid
213
+ for by the organization where it switched them on (`managedPlayers.setAppMods`). An operator
214
+ turns the feature on for an organization.
215
+
216
+ **The organization accepts the Org-Managed Players Addendum first** (18.17.0, ck-api v2.53.0).
217
+ An admin of the organization accepts it once in Studio (Org > Players); until then every
218
+ sign-in, refresh and `provision` answers `ORG_LEGAL_ACCEPTANCE_REQUIRED`
219
+ (`orgLegalAcceptanceRequiredOf(err)`), which neither the player nor your server can fix.
220
+ `managedPlayers.settings(orgId)` reports `termsAccepted`, the current `termsVersion` and its
221
+ `termsUrl`. The SDK does not wrap the acceptance: it binds the organization, so a person makes
222
+ it in Studio.
223
+
224
+ **From the organization's server, with an org token.** Create the token in Studio (or
225
+ `organizations.createToken({ orgId, scopes: ['players:mint'], appIds: [appId] })`) and keep it
226
+ on the server: it signs in any of the organization's players, and the API refuses one sent
227
+ with an `Origin` header. The SDK deliberately has no wrapper for the mint; it is one request:
228
+
229
+ ```ts
230
+ // your server, after your own sign-in succeeded
231
+ const res = await fetch('https://ck.dev.crowdedkingdoms.com/graphql', {
232
+ method: 'POST',
233
+ headers: { 'content-type': 'application/json', authorization: `Bearer ${process.env.CK_ORG_TOKEN}` },
234
+ body: JSON.stringify({
235
+ query: `mutation($i: MintManagedPlayerTokenInput!) { mintManagedPlayerToken(input: $i) {
236
+ token gameTokenId appId expiresAt gameApiUrl gameApiWsUrl discoveryUrl launchUrl } }`,
237
+ variables: { i: { appId, externalId: account.id, gamertag: account.displayName } },
238
+ }),
239
+ });
240
+ const { data } = await res.json();
241
+ // send data.mintManagedPlayerToken to the player's device
242
+ ```
243
+
244
+ ```ts
245
+ // the player's device
246
+ const access = await fetch('/api/crowded-kingdoms/token').then((r) => r.json());
247
+ const game = createCrowdyClient({ httpUrl: access.gameApiUrl, wsUrl: access.gameApiWsUrl });
248
+ game.portal.adoptAppToken(access); // refuses an org token by mistake
249
+ game.world(appId).subscribe({ actorUpdate: (n) => { /* ... */ } });
250
+ ```
251
+
252
+ `externalId` is your own stable account id (not an email); the first sign-in creates the player
253
+ and the same id is always the same player. The token refreshes (`refreshGameplayToken`) until
254
+ the sign-in's lifetime ends (`sessionTtlSeconds`, at most the organization's setting); then the
255
+ device asks your server again.
256
+
257
+ **With a signed assertion.** Register a public key once
258
+ (`managedPlayers.registerSigningKey({ orgId, kid, algorithm: 'EdDSA', publicJwk, issuer })`);
259
+ your sign-in service signs a short JWS per player (`iss`, `aud: 'ck:app:<appId>'`, `sub` your
260
+ account id, `iat`, `exp` at most 300 s later, a fresh `jti`, optionally `gamertag`) and the
261
+ device trades it, without your server calling Crowded Kingdoms:
262
+
263
+ ```ts
264
+ const access = await game.portal.exchangeManagedPlayerAssertion({ appId, assertion });
265
+ ```
266
+
267
+ Each assertion works once; a refusal reads with `assertionRejectedOf(err)?.reason`
268
+ (`expired`, `replayed`, `signature`, …).
269
+
270
+ **Administration** takes an org admin's session with `manage_players`:
271
+ `client.managedPlayers.list` / `get` / `provision` (up to 500 a call: pre-provision before a
272
+ launch) / `update` (rename, disable, enable) / `endSessions` / `delete`, `settings` (the
273
+ operator-set limits and the addendum), `signingKeys` / `registerSigningKey` / `revokeSigningKey`, and
274
+ `appModsEnabled` / `setAppMods` (`manage_billing`). From your server, an org token with
275
+ `players:manage` also works for the six player operations. `organizations.revokeToken(id, { endSessions: true })`
276
+ also ends the sessions a token signed in.
200
277
 
201
278
  ### Token refresh during gameplay
202
279
 
@@ -244,7 +321,7 @@ never told about, so a native refresh without it is a re-placement.
244
321
  | `client.auth` | Sign-in: `login` / `register` (email + password), magic link, social/OIDC. Passwords: `requestPasswordReset` / `resetPassword`, `changePassword`, and `setInitialPassword` for an account created by magic link or a social provider (added in 15.1.0). Log out, and linked identities (`myIdentities`, `linkIdentity`/`unlinkIdentity`). **No dev bypass** — `devLogin` was removed in 15.0.0 and `DEV_AUTH_BYPASS` is gone from every tier. |
245
322
  | `client.users` | `me`, `updateGamertag`, profile reads; `playerProfile` / `playerProfiles` (up to 100) for other players' public `{ userId, gamertag, disambiguation }`. |
246
323
  | `client.session` | Token store, `restore()`, `getToken()`, manual `setToken()`. |
247
- | `client.portal` | App-scoped token minting (`mintAppToken`) and the cross-origin PKCE entry flow (`beginEntry` / `handleAuthorizeRequest` / `completeEntry` / `refresh`). |
324
+ | `client.portal` | App-scoped token minting (`mintAppToken`) and the cross-origin PKCE entry flow (`beginEntry` / `handleAuthorizeRequest` / `completeEntry` / `refresh`). For an org-managed player, `adoptAppToken` stores the token its organization minted and `exchangeManagedPlayerAssertion` trades the organization's signed assertion. |
248
325
  | `client.hosting` | Third-party hosting on Crowdy Games (17.2.0): `claim` a slug for an app, `beginPublish` / `completePublish` / `abandonPublish` a built bundle, `setEnabled`; public `game(slug)` / `listed()`. Mutations need an identity session with `manage_apps`. `@crowdedkingdoms/crowdyjs/hosting` exports `publishDirectory(client, { dir, slug })`, the Node helper that does the whole publish for a `dist/`. |
249
326
  | `client.platform` | Public platform configuration (`config()`). |
250
327
  | `client.serverStatus` | `gameClientBootstrap(appId)` — per-app version info, UDP status, spatial limits. |
@@ -270,7 +347,8 @@ grouped under `client.admin` and mirrored at the top level):
270
347
 
271
348
  | Sub-client | What it does |
272
349
  |---|---|
273
- | `client.organizations` | Orgs, members, RBAC roles, org API tokens. |
350
+ | `client.organizations` | Orgs, members, RBAC roles, org API tokens (with `scopes` and `appIds` for org-managed players). |
351
+ | `client.managedPlayers` | Org-managed players: list, provision, rename, disable, end sessions, delete; assertion signing keys; whether the org pays for their mods in an app; where the org stands on the addendum. See [Org-managed players](#org-managed-players). |
274
352
  | `client.apps` | App registry, discovery + routing (`create`, `routeFor`, `marketplace`), visibility, and player-code admission mode / allow-list administration. |
275
353
  | `client.appAccess` | Access tiers + per-user grants, and the feature keys a tier grants (`defineFeature`, `grantTierFeature`, `tierFeatures`, …), which a hub checks with the node API's `players.features`; timed bans (`suspend`, `unsuspend`) and `resyncTierGridPermissions`. |
276
354
  | `client.billing` | Org wallet + per-app spend budgets. |
@@ -320,7 +398,7 @@ query AppForRouting($appId: BigInt!) {
320
398
  `CrowdyClient` with `httpUrl: gameApiUrl` (and the matching `wsUrl`) holding
321
399
  that app's app-scoped token, then drive gameplay through that client. Apps
322
400
  with no `gameApiUrl` keep working against the default `httpUrl` you
323
- configured. See [Loading an app's Game API](https://docs.crowdedkingdoms.com/crowdyjs/shared-environment-routing).
401
+ configured. See [Loading an app's Game API](https://docs.dev.crowdedkingdoms.com/crowdyjs/shared-environment-routing).
324
402
 
325
403
  ## Realtime notifications
326
404
 
@@ -746,7 +824,7 @@ reach your bundle. Reads are synchronous snapshots and writes happen on
746
824
  WebSocket events (not `requestAnimationFrame`), so render loops read freely
747
825
  and a backgrounded tab keeps ingesting updates; pass `workerTicker()` to also
748
826
  keep timer-driven sends at full rate while hidden. See the
749
- [World Stores guide](https://docs.crowdedkingdoms.com/crowdyjs/stores).
827
+ [World Stores guide](https://docs.dev.crowdedkingdoms.com/crowdyjs/stores).
750
828
 
751
829
  ## Game Kit
752
830
 
@@ -824,7 +902,7 @@ The protocol is held to ck-exec's golden record of the starters
824
902
  (`test/unit/fixtures/kit-protocol.json`): every module call and topic in it is replayed in
825
903
  `test/unit/game-kit.test.mjs`. The blueprints, `kit.deploy`, the engines and the model-backed
826
904
  helpers went with the game model in 18.0.0; the hub modules replace them. See the
827
- [Game Kit docs](https://docs.crowdedkingdoms.com/game-kit/intro) and
905
+ [Game Kit docs](https://docs.dev.crowdedkingdoms.com/game-kit/intro) and
828
906
  [MIGRATION.md](MIGRATION.md).
829
907
 
830
908
  ## ck-exec
@@ -888,7 +966,7 @@ Integers above 2^53 decode as `number` and lose precision unless you pass
888
966
  `{ decode: { useBigInt64: true } }`. A call's whole numbers outside 32 bits (a timestamp in
889
967
  milliseconds, a player id) go out as 64-bit integers (18.11.0; before, as floats, which a
890
968
  hub's integer fields refuse). The wire format is in the
891
- [ck-exec docs](https://docs.crowdedkingdoms.com/exec/intro).
969
+ [ck-exec docs](https://docs.dev.crowdedkingdoms.com/exec/intro).
892
970
 
893
971
  ### A mod's CLIENT half
894
972
 
@@ -959,7 +1037,7 @@ counts what was dropped); `invoke` sends at most 256 KiB each way and is refused
959
1037
  module is not running. `NOT_FOUND` holds a CLIENT half back 15 s and `RATE_LIMITED` 60 s. The
960
1038
  grid's owner is asked about their own CLIENT halves like anyone; answer yes in `confirm` when
961
1039
  `prompt.authorId` is the player. See
962
- [CLIENT halves](https://docs.crowdedkingdoms.com/exec/client-halves).
1040
+ [CLIENT halves](https://docs.dev.crowdedkingdoms.com/exec/client-halves).
963
1041
 
964
1042
  ## Hosting a game on Crowdy Games
965
1043
 
@@ -1078,8 +1156,8 @@ CLIENT project needs ck-api `v2.25.1` or later. A CLIENT crate still on the lega
1078
1156
  `mountCrowdyStudio` and the controller take `mods: client.exec`. Crowdy Studio runs nothing
1079
1157
  on legacy player compute since 18.0.0.
1080
1158
 
1081
- See [CLIENT halves](https://docs.crowdedkingdoms.com/exec/client-halves), [mods](https://docs.crowdedkingdoms.com/exec/mods)
1082
- and [Embed Crowdy Studio in your game](https://docs.crowdedkingdoms.com/crowdyjs/crowdy-studio-embed).
1159
+ See [CLIENT halves](https://docs.dev.crowdedkingdoms.com/exec/client-halves), [mods](https://docs.dev.crowdedkingdoms.com/exec/mods)
1160
+ and [Embed Crowdy Studio in your game](https://docs.dev.crowdedkingdoms.com/crowdyjs/crowdy-studio-embed).
1083
1161
 
1084
1162
  ### The Studio agent (DeepSeek Harness in the browser)
1085
1163
 
@@ -1170,7 +1248,9 @@ Readers for the refusals a player should be told about, each `null` for any othe
1170
1248
  `ACCESS_NOT_GRANTED`), `appPausedOf(err)` (`APP_PAUSED`, with `reason`) and `actorExistsOf(err)`
1171
1249
  (`ACTOR_EXISTS`; `ownedByCaller: true` means a retried create of your own actor). A paused app
1172
1250
  still mints tokens: check `isAppPaused(token.runtimeGate)` (or the bootstrap's `runtimeGate`)
1173
- before entering the world.
1251
+ before entering the world. For org-managed players: `assertionRejectedOf(err)`
1252
+ (`ASSERTION_REJECTED`, with the failed check as `reason`) and `managedPlayerNotAllowedOf(err)`
1253
+ (`MANAGED_PLAYER_NOT_ALLOWED`: no wallet, or mods the organization has not switched on).
1174
1254
 
1175
1255
  ## Idempotent retries
1176
1256
 
@@ -1268,7 +1348,7 @@ no other repositories and no network access required:
1268
1348
  `src/generated/graphql-schema.ts`, the generated schema types.
1269
1349
 
1270
1350
  Schema refresh is explicit, from the published
1271
- [SDL](https://docs.crowdedkingdoms.com/schema/game-api.graphql):
1351
+ [SDL](https://docs.dev.crowdedkingdoms.com/schema/game-api.graphql):
1272
1352
 
1273
1353
  ```bash
1274
1354
  npm run schema:sync:prod
@@ -37,6 +37,7 @@ import { HostingAPI } from './domains/hosting.js';
37
37
  import { PortalAPI, type AppTokenResponse, type PkceStore } from './domains/portal.js';
38
38
  import { PlatformAPI } from './domains/platform.js';
39
39
  import { OrganizationsAPI } from './domains/organizations.js';
40
+ import { ManagedPlayersAPI } from './domains/managedPlayers.js';
40
41
  import { AppAccessAPI } from './domains/appAccess.js';
41
42
  import { BillingAPI } from './domains/billing.js';
42
43
  import { PaymentsAPI } from './domains/payments.js';
@@ -242,6 +243,8 @@ export declare class CrowdyClient {
242
243
  readonly platform: PlatformAPI;
243
244
  /** Organizations, members, RBAC roles, and org API tokens (studio admin). */
244
245
  readonly organizations: OrganizationsAPI;
246
+ /** An organization's own players, signed in by the organization (studio admin). */
247
+ readonly managedPlayers: ManagedPlayersAPI;
245
248
  /** App access tiers + per-user access grants (studio admin). */
246
249
  readonly appAccess: AppAccessAPI;
247
250
  /** Org wallet + per-app spend budgets (studio admin). */
@@ -1 +1 @@
1
- {"version":3,"file":"crowdy-client.d.ts","sourceRoot":"","sources":["../src/crowdy-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAK5C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEpE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,YAAY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AI,IAAI;IAQb,yDAAyD;IACzD,IAAI,eAAe,IAAI,MAAM,CAE5B;CACF;AAED,wBAAgB,kBAAkB,CAChC,MAAM,GAAE,kBAAuB,GAC9B,YAAY,CAEd"}
@@ -38,6 +38,7 @@ import { HostingAPI } from './domains/hosting.js';
38
38
  import { PortalAPI, } from './domains/portal.js';
39
39
  import { PlatformAPI } from './domains/platform.js';
40
40
  import { OrganizationsAPI } from './domains/organizations.js';
41
+ import { ManagedPlayersAPI } from './domains/managedPlayers.js';
41
42
  import { AppAccessAPI } from './domains/appAccess.js';
42
43
  import { BillingAPI } from './domains/billing.js';
43
44
  import { PaymentsAPI } from './domains/payments.js';
@@ -196,6 +197,7 @@ export class CrowdyClient {
196
197
  this.discovery = new DiscoveryDomain(this.graphql);
197
198
  this.platform = new PlatformAPI(this.graphql);
198
199
  this.organizations = new OrganizationsAPI(this.graphql);
200
+ this.managedPlayers = new ManagedPlayersAPI(this.graphql);
199
201
  this.appAccess = new AppAccessAPI(this.graphql);
200
202
  this.billing = new BillingAPI(this.graphql);
201
203
  this.payments = new PaymentsAPI(this.graphql);
@@ -223,6 +225,7 @@ export class CrowdyClient {
223
225
  this.gameApps = new GameAppsAPI(this.graphql);
224
226
  this.admin = new AdminAPI({
225
227
  organizations: this.organizations,
228
+ managedPlayers: this.managedPlayers,
226
229
  apps: this.apps,
227
230
  appAccess: this.appAccess,
228
231
  billing: this.billing,
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * GENERATED — do not edit. The operator tooling's
3
- * `sync-client-origins.mjs --write --tier prod` writes this file, and
3
+ * `sync-client-origins.mjs --write --tier dev` 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 'prod'
13
+ * Source: the operator's per-tier public CK API origin declaration, tier 'dev'
14
14
  */
15
15
  /** The tier this build of the SDK is published for. */
16
- export declare const CROWDY_DEFAULT_TIER = "prod";
16
+ export declare const CROWDY_DEFAULT_TIER = "dev";
17
17
  /** The public CK API origin for that tier. */
18
- export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.prod.crowdedkingdoms.com";
18
+ export declare const CROWDY_DEFAULT_HTTP_ORIGIN = "https://ck.dev.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.prod.crowdedkingdoms.com";
20
+ export declare const CROWDY_DEFAULT_WS_ORIGIN = "wss://ck.dev.crowdedkingdoms.com";
21
21
  /** The bare hostname, for callers that need to compare rather than dial. */
22
- export declare const CROWDY_DEFAULT_HOST = "ck.prod.crowdedkingdoms.com";
22
+ export declare const CROWDY_DEFAULT_HOST = "ck.dev.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,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
+ {"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,6 +1,6 @@
1
1
  /**
2
2
  * GENERATED — do not edit. The operator tooling's
3
- * `sync-client-origins.mjs --write --tier prod` writes this file, and
3
+ * `sync-client-origins.mjs --write --tier dev` 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 'prod'
13
+ * Source: the operator's per-tier public CK API origin declaration, tier 'dev'
14
14
  */
15
15
  /** The tier this build of the SDK is published for. */
16
- export const CROWDY_DEFAULT_TIER = 'prod';
16
+ export const CROWDY_DEFAULT_TIER = 'dev';
17
17
  /** The public CK API origin for that tier. */
18
- export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.prod.crowdedkingdoms.com';
18
+ export const CROWDY_DEFAULT_HTTP_ORIGIN = 'https://ck.dev.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.prod.crowdedkingdoms.com';
20
+ export const CROWDY_DEFAULT_WS_ORIGIN = 'wss://ck.dev.crowdedkingdoms.com';
21
21
  /** The bare hostname, for callers that need to compare rather than dial. */
22
- export const CROWDY_DEFAULT_HOST = 'ck.prod.crowdedkingdoms.com';
22
+ export const CROWDY_DEFAULT_HOST = 'ck.dev.crowdedkingdoms.com';
@@ -1,4 +1,5 @@
1
1
  import type { OrganizationsAPI } from './organizations.js';
2
+ import type { ManagedPlayersAPI } from './managedPlayers.js';
2
3
  import type { AppsAPI } from './apps.js';
3
4
  import type { AppAccessAPI } from './appAccess.js';
4
5
  import type { BillingAPI } from './billing.js';
@@ -30,6 +31,8 @@ import type { GameAppsAPI } from './gameApps.js';
30
31
  export declare class AdminAPI {
31
32
  /** Organizations, members, RBAC roles, and org API tokens. */
32
33
  readonly organizations: OrganizationsAPI;
34
+ /** The organization's own players, signed in by the organization. */
35
+ readonly managedPlayers: ManagedPlayersAPI;
33
36
  /** App registry, routing, and player-code admission policy. */
34
37
  readonly apps: AppsAPI;
35
38
  /** App access tiers + per-user access grants. */
@@ -48,6 +51,7 @@ export declare class AdminAPI {
48
51
  readonly grids: GameAppsAPI;
49
52
  constructor(deps: {
50
53
  organizations: OrganizationsAPI;
54
+ managedPlayers: ManagedPlayersAPI;
51
55
  apps: AppsAPI;
52
56
  appAccess: AppAccessAPI;
53
57
  billing: BillingAPI;
@@ -1 +1 @@
1
- {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/domains/admin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,QAAQ;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,aAAa,EAAE,gBAAgB,CAAC;IACzC,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,OAA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 this.managedPlayers = deps.managedPlayers;
24
25
  this.apps = deps.apps;
25
26
  this.appAccess = deps.appAccess;
26
27
  this.billing = deps.billing;
@@ -0,0 +1,112 @@
1
+ import type { GraphQLClient } from '../client.js';
2
+ import { type ManagedPlayersQuery, type ManagedPlayerQuery, type ProvisionManagedPlayersMutation, type UpdateManagedPlayerMutation, type OrgManagedPlayerSettingsQuery, type OrgSigningKeysQuery, type RegisterOrgSigningKeyMutation, type ProvisionManagedPlayersInput, type UpdateManagedPlayerInput, type RegisterOrgSigningKeyInput } from '../generated/graphql.js';
3
+ /** A public key as {@link ManagedPlayersAPI.registerSigningKey} takes it: a JWK object or its JSON. */
4
+ export type OrgSigningKeyRegistration = Omit<RegisterOrgSigningKeyInput, 'publicJwk'> & {
5
+ publicJwk: string | Record<string, unknown>;
6
+ };
7
+ /**
8
+ * Org-managed players: an organization's own players, signed in by the organization
9
+ * instead of with a Crowded Kingdoms email and password. Exposed as
10
+ * `client.managedPlayers` (and `client.admin.managedPlayers`).
11
+ *
12
+ * An org-managed player has no email, password, session or wallet. Its organization
13
+ * vouches for it in one of two ways, and either one ends in the player's own app token:
14
+ *
15
+ * - **From its server, with an org token** (`cko_…`, scope `players:mint`): the server calls
16
+ * the `mintManagedPlayerToken` mutation itself and hands the response to the player's
17
+ * device, which stores it with `client.portal.adoptAppToken`. This SDK has no wrapper for
18
+ * that mutation on purpose: an org token signs in any of the organization's players, so
19
+ * it never belongs in a browser or a game client, and the API refuses one sent with an
20
+ * `Origin` header.
21
+ * - **With a signed assertion**: the organization registers a public key here
22
+ * ({@link registerSigningKey}), its sign-in service signs a short JWS for the player, and
23
+ * the device trades it with `client.portal.exchangeManagedPlayerAssertion`.
24
+ *
25
+ * The methods below are the organization's administration. They take an org admin's
26
+ * session with the `manage_players` permission (or, from the organization's server, an org
27
+ * token with `players:manage` for the player operations). An operator turns the feature on
28
+ * for an organization and sets its limits; {@link settings} reads them.
29
+ *
30
+ * **The Org-Managed Players Addendum** (ck-api v2.53.0). Before any of the organization's
31
+ * players is created or signed in, an admin of the organization accepts the addendum in
32
+ * Studio, on the organization's Players tab. Until then sign-ins (both ways), refreshes and
33
+ * {@link provision} answer `ORG_LEGAL_ACCEPTANCE_REQUIRED` (`orgLegalAcceptanceRequiredOf`).
34
+ * {@link settings} reports `termsVersion`, `termsUrl`, `termsAccepted` and whether the
35
+ * signed-in user may accept (`viewerMayAcceptTerms`). This SDK has no wrapper for the
36
+ * acceptance on purpose: it binds the organization, so a person makes it, in Studio.
37
+ *
38
+ * A tier that does not serve org-managed players answers `FEATURE_DISABLED` to every field.
39
+ */
40
+ export declare class ManagedPlayersAPI {
41
+ private readonly api;
42
+ constructor(api: GraphQLClient);
43
+ /**
44
+ * The organization's players in the order they were created, a page at a time (`first`
45
+ * defaults to 50, at most 200). `search` matches the start of an external id (exactly) or
46
+ * of a gamertag (any case). Pass `nextCursor` back as `after` for the next page; it is
47
+ * null on the last.
48
+ */
49
+ list(orgId: string, options?: {
50
+ search?: string;
51
+ first?: number;
52
+ after?: string;
53
+ }): Promise<ManagedPlayersQuery['managedPlayers']>;
54
+ /** One player by the id the organization knows it by, or null. */
55
+ get(orgId: string, externalId: string): Promise<ManagedPlayerQuery['managedPlayer']>;
56
+ /**
57
+ * Create players ahead of their first sign-in, up to 500 per call (one statement, much
58
+ * faster than first sign-ins one at a time: pre-provision before a launch). A player
59
+ * that already exists is left as it is and counted in `existing`. Refused with
60
+ * `ORG_LEGAL_ACCEPTANCE_REQUIRED` until the organization has accepted the current
61
+ * Org-Managed Players Addendum.
62
+ */
63
+ provision(input: ProvisionManagedPlayersInput): Promise<ProvisionManagedPlayersMutation['provisionManagedPlayers']>;
64
+ /**
65
+ * Rename a player, or disable or enable it. Disabling ends every session the player has
66
+ * (its devices stop at once) and refuses its sign-ins until enabled again. A block a
67
+ * platform operator set also reads as disabled, and only an operator lifts it.
68
+ */
69
+ update(input: UpdateManagedPlayerInput): Promise<UpdateManagedPlayerMutation['updateManagedPlayer']>;
70
+ /** End every session of a player now (sign it out everywhere); it can sign in again. */
71
+ endSessions(orgId: string, externalId: string): Promise<boolean>;
72
+ /**
73
+ * Delete a player: its sessions end and its account is scrubbed. The external id is free
74
+ * again, so a later sign-in with it creates a new player.
75
+ */
76
+ delete(orgId: string, externalId: string): Promise<boolean>;
77
+ /**
78
+ * Whether an operator has turned managed players on for the organization, and its limits:
79
+ * the player cap, sign-ins per minute and the session lengths. Also where the organization
80
+ * stands on the Org-Managed Players Addendum: the current `termsVersion` and `termsUrl`,
81
+ * `termsAccepted`, the latest acceptance, and `viewerMayAcceptTerms` (whether the signed-in
82
+ * user is an admin of the organization who may accept it, in Studio). Read-only here.
83
+ */
84
+ settings(orgId: string): Promise<OrgManagedPlayerSettingsQuery['orgManagedPlayerSettings']>;
85
+ /** The organization's assertion signing keys, revoked ones included. */
86
+ signingKeys(orgId: string): Promise<OrgSigningKeysQuery['orgSigningKeys']>;
87
+ /**
88
+ * Register a PUBLIC key the organization's sign-in service signs player assertions with:
89
+ * `EdDSA` (Ed25519), `ES256` (P-256) or `RS256` (RSA, 2048 bits or more). `publicJwk` may be
90
+ * the JWK object (for example `publicKey.export({ format: 'jwk' })` in Node) or its JSON.
91
+ * A JWK with private members is refused. `appIds` limits the key to some of the
92
+ * organization's apps; `audience` replaces the default `ck:app:<appId>` when the
93
+ * organization's identity provider sets its own.
94
+ */
95
+ registerSigningKey(input: OrgSigningKeyRegistration): Promise<RegisterOrgSigningKeyMutation['registerOrgSigningKey']>;
96
+ /** Revoke a signing key: assertions it signed are refused from now on. */
97
+ revokeSigningKey(orgId: string, keyId: string): Promise<boolean>;
98
+ /**
99
+ * Whether the organization pays for its managed players' mods in this app. A managed
100
+ * player has no wallet, so with this off its mods, its Crowdy Studio writes and its use
101
+ * of the Studio agent are refused with `MANAGED_PLAYER_NOT_ALLOWED`. False for an app the
102
+ * caller cannot see.
103
+ */
104
+ appModsEnabled(appId: string): Promise<boolean>;
105
+ /**
106
+ * Switch the organization paying for its managed players' mods in this app on or off
107
+ * (`manage_billing` on the app). On, their mods' compute, storage and agent use are billed
108
+ * to the organization; off, those mods are switched off at once.
109
+ */
110
+ setAppMods(appId: string, enabled: boolean): Promise<boolean>;
111
+ }
112
+ //# sourceMappingURL=managedPlayers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"managedPlayers.d.ts","sourceRoot":"","sources":["../../src/domains/managedPlayers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAaL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,+BAA+B,EACpC,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AAgBjC,uGAAuG;AACvG,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,0BAA0B,EAAE,WAAW,CAAC,GAAG;IACtF,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,aAAa;IAE/C;;;;;OAKG;IACG,IAAI,CACR,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO,GAChE,OAAO,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAKjD,kEAAkE;IAC5D,GAAG,CACP,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,kBAAkB,CAAC,eAAe,CAAC,C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