@crowdedkingdoms/crowdyjs 18.10.0-dev.1 → 18.10.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 +13 -17
- package/dist/default-origin.d.ts +6 -6
- package/dist/default-origin.d.ts.map +1 -1
- package/dist/default-origin.js +6 -6
- package/dist/generated/graphql-schema.d.ts +1 -1
- package/dist/generated/graphql-schema.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
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.
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
|
@@ -198,8 +194,8 @@ Notes:
|
|
|
198
194
|
- Use `client.auth.setToken(token)` to seed a token externally (e.g. when
|
|
199
195
|
restoring auth from a non-default storage).
|
|
200
196
|
|
|
201
|
-
Deeper reading: [Portals & app-scoped tokens](https://docs.
|
|
202
|
-
and [Sign in](https://docs.
|
|
197
|
+
Deeper reading: [Portals & app-scoped tokens](https://docs.crowdedkingdoms.com/management-api/portals-and-app-tokens)
|
|
198
|
+
and [Sign in](https://docs.crowdedkingdoms.com/management-api/authentication).
|
|
203
199
|
|
|
204
200
|
### Token refresh during gameplay
|
|
205
201
|
|
|
@@ -323,7 +319,7 @@ query AppForRouting($appId: BigInt!) {
|
|
|
323
319
|
`CrowdyClient` with `httpUrl: gameApiUrl` (and the matching `wsUrl`) holding
|
|
324
320
|
that app's app-scoped token, then drive gameplay through that client. Apps
|
|
325
321
|
with no `gameApiUrl` keep working against the default `httpUrl` you
|
|
326
|
-
configured. See [Loading an app's Game API](https://docs.
|
|
322
|
+
configured. See [Loading an app's Game API](https://docs.crowdedkingdoms.com/crowdyjs/shared-environment-routing).
|
|
327
323
|
|
|
328
324
|
## Realtime notifications
|
|
329
325
|
|
|
@@ -734,7 +730,7 @@ reach your bundle. Reads are synchronous snapshots and writes happen on
|
|
|
734
730
|
WebSocket events (not `requestAnimationFrame`), so render loops read freely
|
|
735
731
|
and a backgrounded tab keeps ingesting updates; pass `workerTicker()` to also
|
|
736
732
|
keep timer-driven sends at full rate while hidden. See the
|
|
737
|
-
[World Stores guide](https://docs.
|
|
733
|
+
[World Stores guide](https://docs.crowdedkingdoms.com/crowdyjs/stores).
|
|
738
734
|
|
|
739
735
|
## Game Kit
|
|
740
736
|
|
|
@@ -817,7 +813,7 @@ exec.onReconnect((host) => console.log('moved to', host));
|
|
|
817
813
|
|
|
818
814
|
Integers above 2^53 decode as `number` and lose precision unless you pass
|
|
819
815
|
`{ decode: { useBigInt64: true } }`. The wire format is in the
|
|
820
|
-
[ck-exec docs](https://docs.
|
|
816
|
+
[ck-exec docs](https://docs.crowdedkingdoms.com/exec/intro).
|
|
821
817
|
|
|
822
818
|
### A mod's CLIENT half
|
|
823
819
|
|
|
@@ -888,7 +884,7 @@ counts what was dropped); `invoke` sends at most 256 KiB each way and is refused
|
|
|
888
884
|
module is not running. `NOT_FOUND` holds a CLIENT half back 15 s and `RATE_LIMITED` 60 s. The
|
|
889
885
|
grid's owner is asked about their own CLIENT halves like anyone; answer yes in `confirm` when
|
|
890
886
|
`prompt.authorId` is the player. See
|
|
891
|
-
[CLIENT halves](https://docs.
|
|
887
|
+
[CLIENT halves](https://docs.crowdedkingdoms.com/exec/client-halves).
|
|
892
888
|
|
|
893
889
|
## Hosting a game on Crowdy Games
|
|
894
890
|
|
|
@@ -1007,8 +1003,8 @@ CLIENT project needs ck-api `v2.25.1` or later. A CLIENT crate still on the lega
|
|
|
1007
1003
|
`mountCrowdyStudio` and the controller take `mods: client.exec`. Crowdy Studio runs nothing
|
|
1008
1004
|
on legacy player compute since 18.0.0.
|
|
1009
1005
|
|
|
1010
|
-
See [CLIENT halves](https://docs.
|
|
1011
|
-
and [Embed Crowdy Studio in your game](https://docs.
|
|
1006
|
+
See [CLIENT halves](https://docs.crowdedkingdoms.com/exec/client-halves), [mods](https://docs.crowdedkingdoms.com/exec/mods)
|
|
1007
|
+
and [Embed Crowdy Studio in your game](https://docs.crowdedkingdoms.com/crowdyjs/crowdy-studio-embed).
|
|
1012
1008
|
|
|
1013
1009
|
### The Studio agent (DeepSeek Harness in the browser)
|
|
1014
1010
|
|
|
@@ -1194,7 +1190,7 @@ no other repositories and no network access required:
|
|
|
1194
1190
|
`src/generated/graphql-schema.ts`, the generated schema types.
|
|
1195
1191
|
|
|
1196
1192
|
Schema refresh is explicit, from the published
|
|
1197
|
-
[SDL](https://docs.
|
|
1193
|
+
[SDL](https://docs.crowdedkingdoms.com/schema/game-api.graphql):
|
|
1198
1194
|
|
|
1199
1195
|
```bash
|
|
1200
1196
|
npm run schema:sync:prod
|
package/dist/default-origin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED — do not edit. The operator tooling's
|
|
3
|
-
* `sync-client-origins.mjs --write --tier
|
|
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 '
|
|
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 = "
|
|
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.
|
|
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.
|
|
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.
|
|
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,
|
|
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"}
|
package/dist/default-origin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* GENERATED — do not edit. The operator tooling's
|
|
3
|
-
* `sync-client-origins.mjs --write --tier
|
|
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 '
|
|
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 = '
|
|
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.
|
|
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.
|
|
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.
|
|
22
|
+
export const CROWDY_DEFAULT_HOST = 'ck.prod.crowdedkingdoms.com';
|
|
@@ -4836,7 +4836,7 @@ export type Mutation = {
|
|
|
4836
4836
|
revokeTierAccessProvisioningToken: TierAccessProvisioningToken;
|
|
4837
4837
|
/** OPERATOR: remove an entry from the list. Accounts it was admitting are refused at their next request, and their sessions and app tokens are ended. Refused on prod. */
|
|
4838
4838
|
revokeTierAccessRule: TierAccessRule;
|
|
4839
|
-
/** Reverts every voxel edit made by `userId` in `appId` between `from` and `to`, returning one RollbackVoxelEventResult per affected voxel (`applied` tells you whether each was actually changed). DEFAULTS to dryRun=true, which only PREVIEWS the planned reversions without writing; pass dryRun=false to actually apply them (DESTRUCTIVE — mutates world state). A reverted voxel’s edit-log row takes the earlier edit’s type, state and author and the ROLLBACK’s time as its createdAt, so a client reading edits `since` its last sync sees the revert. Requires a valid bearer token AND the `manage_apps` permission on the org that owns `appId` (super admins bypass). */
|
|
4839
|
+
/** Reverts every voxel edit made by `userId` in `appId` between `from` and `to`, returning one RollbackVoxelEventResult per affected voxel (`applied` tells you whether each was actually changed). DEFAULTS to dryRun=true, which only PREVIEWS the planned reversions without writing; pass dryRun=false to actually apply them (DESTRUCTIVE — mutates world state). A reverted voxel’s edit-log row takes the earlier edit’s type, state and author and the ROLLBACK’s time as its createdAt, so a client reading edits `since` its last sync sees the revert. When the app’s wilderness is closed (`wildernessOpen` false), an applied rollback that would write any chunk of closed, unclaimed wilderness is refused (403) before it writes anything; a dry run is not. Requires a valid bearer token AND the `manage_apps` permission on the org that owns `appId` (super admins bypass). */
|
|
4840
4840
|
rollbackVoxelUpdates: Array<RollbackVoxelEventResult>;
|
|
4841
4841
|
/** OPERATOR ONLY. Runs the shared-usage billing tick once. It still bills only the last CLOSED clock hour — it will not charge an open hour. Use this to prove a closed-hour debit without waiting for the ~60s cron. Backdating usage rows is a local-test fixture, not something this mutation does on a live tier. */
|
|
4842
4842
|
runSharedUsageBillingTick: Scalars['Boolean']['output'];
|