@crowdedkingdoms/crowdyjs 18.28.0-dev.1 → 18.29.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 +15 -0
- package/README.md +1 -0
- package/dist/binary-wire.d.ts +1 -0
- package/dist/binary-wire.d.ts.map +1 -1
- package/dist/binary-wire.js +14 -0
- package/dist/generated/graphql-schema.d.ts +19 -1
- package/dist/generated/graphql-schema.d.ts.map +1 -1
- package/dist/generated/graphql.d.ts +9 -0
- package/dist/generated/graphql.d.ts.map +1 -1
- package/dist/generated/graphql.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/live-coding/assets/browser-authoring-index.json +1 -1
- package/dist/live-coding/assets/manifest.json +1 -1
- package/dist/live-coding/browser-authoring-index.generated.d.ts.map +1 -1
- package/dist/live-coding/browser-authoring-index.generated.js +101 -10
- package/dist/realtime.d.ts +7 -0
- package/dist/realtime.d.ts.map +1 -1
- package/dist/realtime.js +4 -0
- package/dist/stores/session.d.ts.map +1 -1
- package/dist/stores/session.js +1 -0
- package/dist/types.d.ts +26 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/MIGRATION.md
CHANGED
|
@@ -120,6 +120,21 @@ 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.29.0: a replaced chunk says so
|
|
124
|
+
|
|
125
|
+
**What it needs.** ck-api `v2.68.0` (cks-game-api #654) for the GraphQL proxy: the
|
|
126
|
+
`udpNotifications` document selects `ChunkChangedNotification`, which an older Game API refuses as
|
|
127
|
+
a whole subscription. The binary relay needs nothing new. The notification itself comes from the
|
|
128
|
+
realtime servers' `v0.45.0`.
|
|
129
|
+
|
|
130
|
+
**What changes for a game.**
|
|
131
|
+
|
|
132
|
+
- `chunkChanged` (a handler, a World Stores bus key, `ChunkChangedNotification`) fires when a chunk
|
|
133
|
+
near the player was replaced as a whole by a hub's or mod's `world.set_chunk`. It carries the
|
|
134
|
+
chunk and its new `updatedAtMs`: read the chunk again (`chunks.get`, or `chunks.byDistance` with
|
|
135
|
+
`since`). It comes instead of a voxel update per voxel, so a game that ignores it sees the
|
|
136
|
+
change only on its next read.
|
|
137
|
+
|
|
123
138
|
## 18.28.0: region reads take a box, a `since` and stable pages
|
|
124
139
|
|
|
125
140
|
**What it needs.** ck-api `v2.67.0` (cks-game-api #652): `gameApps.nearbyGrids` selects
|
package/README.md
CHANGED
|
@@ -34,6 +34,7 @@ so it needs that Game API or newer; promote the Game API before the SDK on each
|
|
|
34
34
|
|
|
35
35
|
| CrowdyJS | Needs the Game API (ck-api) |
|
|
36
36
|
| --- | --- |
|
|
37
|
+
| 18.29.0 | v2.68.0 or later for the GraphQL proxy (`udpNotifications` selects `ChunkChangedNotification`) |
|
|
37
38
|
| 18.28.0 | v2.67.0 or later (`gameApps.nearbyGrids` selects `permissionKeys`) |
|
|
38
39
|
| 18.27.0 | v2.64.0 or later (`isEmailConfirmationRequiredError` reads a code v2.65.0 sends) |
|
|
39
40
|
| 18.26.0 | v2.64.0 or later (app reads and `apps.update` select `idleTimeoutSeconds` and `effectiveIdleTimeoutSeconds`) |
|
package/dist/binary-wire.d.ts
CHANGED
|
@@ -71,6 +71,7 @@ export declare const WireMessageType: {
|
|
|
71
71
|
readonly CLIENT_VIDEO_PACKET_2: 143;
|
|
72
72
|
readonly CLIENT_VIDEO_NOTIFICATION_2: 144;
|
|
73
73
|
readonly ACTOR_LEFT_NOTIFICATION_2: 145;
|
|
74
|
+
readonly CHUNK_CHANGED_NOTIFICATION: 146;
|
|
74
75
|
};
|
|
75
76
|
/**
|
|
76
77
|
* Per-session signing context: the game token id (from the relay `ready`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary-wire.d.ts","sourceRoot":"","sources":["../src/binary-wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,uEAAuE;AACvE,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,qEAAqE;AACrE,eAAO,MAAM,6BAA6B,QACmC,CAAC;AAE9E;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,CAInE;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,UAAU,CAwB5E;AAED,kEAAkE;AAClE,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"binary-wire.d.ts","sourceRoot":"","sources":["../src/binary-wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAC5C,uEAAuE;AACvE,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,qEAAqE;AACrE,eAAO,MAAM,6BAA6B,QACmC,CAAC;AAE9E;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,CAInE;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,UAAU,CAwB5E;AAED,kEAAkE;AAClE,eAAO,MAAM,eAAe;;;;;;;;;;;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AAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,GACA,OAAO,CAAC,UAAU,CAAC,CAwDrB;AAwQD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,eAAe,EAAE,CAuBpE"}
|
package/dist/binary-wire.js
CHANGED
|
@@ -114,6 +114,9 @@ export const WireMessageType = {
|
|
|
114
114
|
CLIENT_VIDEO_PACKET_2: 143,
|
|
115
115
|
CLIENT_VIDEO_NOTIFICATION_2: 144,
|
|
116
116
|
ACTOR_LEFT_NOTIFICATION_2: 145,
|
|
117
|
+
// Buddy v0.45.0, server-only: a chunk was replaced as a whole (`world.set_chunk`); read it
|
|
118
|
+
// again. Payload [i64 updatedAt ms LE].
|
|
119
|
+
CHUNK_CHANGED_NOTIFICATION: 146,
|
|
117
120
|
};
|
|
118
121
|
const SPATIAL_HEADER_SIZE = 68;
|
|
119
122
|
const UUID_SIZE = 32;
|
|
@@ -615,6 +618,17 @@ function parseOne(bytes) {
|
|
|
615
618
|
leftReason: p.payload.length >= 1 && p.payload[0] === 1 ? 1 : 0,
|
|
616
619
|
};
|
|
617
620
|
}
|
|
621
|
+
case WireMessageType.CHUNK_CHANGED_NOTIFICATION: {
|
|
622
|
+
const { decayRate: _r, uuid: _u, epochMillis: _e, ...rest } = spatialCommon(p);
|
|
623
|
+
const updatedAtMs = p.payload.length >= 8
|
|
624
|
+
? new DataView(p.payload.buffer, p.payload.byteOffset, 8).getBigInt64(0, true).toString()
|
|
625
|
+
: '0';
|
|
626
|
+
return {
|
|
627
|
+
__typename: 'ChunkChangedNotification',
|
|
628
|
+
...rest,
|
|
629
|
+
updatedAtMs,
|
|
630
|
+
};
|
|
631
|
+
}
|
|
618
632
|
case WireMessageType.CLIENT_TEXT_NOTIFICATION_2:
|
|
619
633
|
return {
|
|
620
634
|
__typename: 'ClientTextNotification',
|
|
@@ -1800,6 +1800,24 @@ export type Chunk = {
|
|
|
1800
1800
|
/** BASE64-encoded binary blob of the dense voxel-type grid. When present, the DECODED buffer is exactly 4096 bytes: one unsigned byte (voxel type 0-255) per voxel, indexed as x + y*16 + z*256 with x,y,z in 0-15. Null when the chunk has no voxel grid yet. Decode from base64 before reading. */
|
|
1801
1801
|
voxels: Maybe<Scalars['String']['output']>;
|
|
1802
1802
|
};
|
|
1803
|
+
/** A chunk near you was replaced as a whole (a hub's or mod's world.set_chunk; Buddy v0.45.0): read it again with getChunk, or getChunksByDistance with since. It comes instead of a voxel update per voxel. Received via the udpNotifications subscription. */
|
|
1804
|
+
export type ChunkChangedNotification = {
|
|
1805
|
+
__typename?: 'ChunkChangedNotification';
|
|
1806
|
+
/** The ID of the app the chunk is in. */
|
|
1807
|
+
appId: Scalars['BigInt']['output'];
|
|
1808
|
+
/** The X coordinate of the replaced chunk. */
|
|
1809
|
+
chunkX: Scalars['BigInt']['output'];
|
|
1810
|
+
/** The Y coordinate of the replaced chunk. */
|
|
1811
|
+
chunkY: Scalars['BigInt']['output'];
|
|
1812
|
+
/** The Z coordinate of the replaced chunk. */
|
|
1813
|
+
chunkZ: Scalars['BigInt']['output'];
|
|
1814
|
+
/** Chunk replication distance (0-8) the notification was fanned out over. */
|
|
1815
|
+
distance: Scalars['Int']['output'];
|
|
1816
|
+
/** Correlation byte from the datagram tail (always 0 today). */
|
|
1817
|
+
sequenceNumber: Scalars['Int']['output'];
|
|
1818
|
+
/** The stored chunk's new updatedAt, in epoch milliseconds: a copy at least this new is current. */
|
|
1819
|
+
updatedAtMs: Scalars['BigInt']['output'];
|
|
1820
|
+
};
|
|
1803
1821
|
/** Authoritative result of an ordinary player claiming one chunk as a new grid under SELF_CLAIM. Grid creation, title assignment, and direct ACL grants are committed atomically. */
|
|
1804
1822
|
export type ChunkClaimResult = {
|
|
1805
1823
|
__typename?: 'ChunkClaimResult';
|
|
@@ -9606,7 +9624,7 @@ export declare enum UdpErrorCode {
|
|
|
9606
9624
|
UserNotAuthenticated = "USER_NOT_AUTHENTICATED"
|
|
9607
9625
|
}
|
|
9608
9626
|
/** All game-server messages delivered over the UDP proxy as GraphQL payloads. Subscribe to udpNotifications before or with sending mutations so responses and GenericErrorResponse (correlate via sequenceNumber) are not missed. NOTE: the ActorUpdateResponse and VoxelUpdateResponse members are LEGACY and never emitted (applied updates arrive as your own *Notification self-echo; failures as GenericErrorResponse) — they remain in the union for backward compatibility and will be removed in a future major version. */
|
|
9609
|
-
export type UdpNotification = ActorLeftNotification | ActorUpdateNotification | ActorUpdateResponse | ChannelAudioNotification | ChannelMessageNotification | ClientAudioNotification | ClientEventNotification | ClientTextNotification | ClientVideoNotification | GenericErrorResponse | RealtimeConnectionEvent | ServerEventNotification | SingleActorMessageNotification | VoxelUpdateNotification | VoxelUpdateResponse;
|
|
9627
|
+
export type UdpNotification = ActorLeftNotification | ActorUpdateNotification | ActorUpdateResponse | ChannelAudioNotification | ChannelMessageNotification | ChunkChangedNotification | ClientAudioNotification | ClientEventNotification | ClientTextNotification | ClientVideoNotification | GenericErrorResponse | RealtimeConnectionEvent | ServerEventNotification | SingleActorMessageNotification | VoxelUpdateNotification | VoxelUpdateResponse;
|
|
9610
9628
|
/** UDP proxy session for the game token on the request. Returned by udpProxyConnectionStatus and connectUdpProxy. Binary UDP layouts are documented in database/client-wire-formats.md. */
|
|
9611
9629
|
export type UdpProxyConnectionStatus = {
|
|
9612
9630
|
__typename?: 'UdpProxyConnectionStatus';
|