@crowdedkingdoms/crowdyjs 8.19.1 → 8.21.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
@@ -20,7 +20,10 @@ CrowdyJS v4 targets browsers by default and uses native `fetch`, `WebSocket`, `c
20
20
  > `client.playerModel` (owner/grid-confined flexible data + automations), first-class grid
21
21
  > ownership methods on `client.gameApps`, and app code-admission methods on
22
22
  > `client.apps` require the 2026-07-20 game-api/management-api player-runtime
23
- > schemas. Older servers reject only those operations during GraphQL validation.
23
+ > schemas. Player-authorized one-chunk claims and owner release through
24
+ > `marketplace.claimGridChunk` / `marketplace.releaseClaimedGrid` require the
25
+ > corresponding 2026-07-22 Game API claim schema. Older servers reject only
26
+ > those operations during GraphQL validation.
24
27
 
25
28
  > **Player-code authoring DX:** `playerCompute.setRequires`,
26
29
  > `marketplace.trustGridAuthor`, self-authored `gridClientMods` fields, and
@@ -117,8 +120,10 @@ If `managementUrl` is omitted, the SDK falls back to `httpUrl` for backwards-com
117
120
  | `client.compute` | **Compute Modules** — server-side Rust/WASM logic: author + deploy source (`upsertModule`, `deployVersion`, `waitForCompile`), triggers + policy, synchronous `invoke`, and monitoring (`moduleRuns`, `moduleStats`, `moduleLogs`, `appDiagnostics`). Modules run server-only; see [Compute Modules docs](https://docs.crowdedkingdoms.com/game-api/compute-modules). |
118
121
  | `client.playerCompute` | Player-authored SERVER/CLIENT Rust/WASM bound to player-owned grids: deploy source, activate/deactivate, list modules/versions, and delete self-authored modules. |
119
122
  | `client.playerModel` | Player-owned flexible model containers and grid-confined automations (`containers`, `createContainer`, `setProperty`, `automations`, `createAutomation`, …). |
123
+ | `client.marketplace` | Player-code store/install/consent flows plus player-authorized grid claims: `claimGridOwnership` preserves the existing-grid policy flow, while `claimGridChunk` atomically creates and owns one chunk under `SELF_CLAIM` and `releaseClaimedGrid` releases an eligible owner-created claim. |
120
124
  | `client.udp` | UDP proxy subscriptions + spatial mutations (`sendActorUpdate`, `sendVoxelUpdate`, `sendAudioPacket`, `sendTextPacket`, `sendClientEvent`). |
121
125
  | `client.realtime` | Connection status, manual `connect()` / `disconnect()`, `onStatus()` listener. |
126
+ | `client.refreshGameplayToken()` | Safely rotates an active game client's app token: disconnects the old-token UDP proxy, refreshes/stores the token, and opens the new-token proxy while existing realtime handlers resubscribe in place. |
122
127
  | `client.world(appId)` | Higher-level helpers for browser games (`actor.join`, `actor.sendState`, `actor.sendText`). |
123
128
 
124
129
  `PlayerCodeBroker` is the P1 page-side browser security skeleton: it transfers
@@ -160,9 +165,16 @@ Auth, user reads, and the studio-admin / operator surfaces target `managementUrl
160
165
  3. Subscribe to UDP proxy notifications with `game.udp.subscribe(handlers, appId)` — `appId` is **required** (the SDK opens the realtime socket on demand and scopes it to that app).
161
166
  4. Join a chunk by sending an initial actor update.
162
167
  5. Send actor, voxel, text, audio, and client-event updates through `game.udp` or the higher-level `game.world(appId)` helpers.
163
- 6. Call `game.udp.disconnect()` when leaving the world; `game.portal.refresh()` before the token expires to keep playing.
168
+ 6. Before the app token expires, call `game.refreshGameplayToken()` while gameplay is active. It closes the old-token UDP proxy before rotating the token, opens the new-token proxy, and lets the existing realtime subscription restart without adding handlers. Use `game.portal.refresh()` directly only when no UDP proxy lifecycle needs to be preserved.
164
169
  7. Call `client.close()` (and `game.close()`) when disposing the SDK instances.
165
170
 
171
+ `refreshGameplayToken()` deliberately stops on the first failed stage. If the
172
+ old proxy cannot confirm disconnect, no refresh is attempted and the old token
173
+ remains active. If refresh fails, the old token is still retained (although its
174
+ proxy was closed and may be reopened). If the new proxy connect fails, the
175
+ fresh token remains stored; surface the error and retry `game.udp.connect()`
176
+ instead of rotating again.
177
+
166
178
  ## Per-app routing
167
179
 
168
180
  When a player is about to join an app, query its routing fields on the management API first:
@@ -502,10 +514,15 @@ location.assign(await overworld.portal.handleAuthorizeRequest());
502
514
 
503
515
  // Game origin, on callback boot: exchange code+verifier -> app token (stored).
504
516
  const entered = await game.portal.completeEntry();
505
- // Keep playing past expiry without re-portaling (same app):
506
- await game.portal.refresh();
517
+ // Keep active UDP gameplay running past expiry without orphaning the old proxy:
518
+ await game.refreshGameplayToken();
507
519
  ```
508
520
 
521
+ `portal.refresh()` remains available for clients with no active UDP lifecycle.
522
+ Once a proxy or realtime gameplay session is active, prefer
523
+ `refreshGameplayToken()` so the old Bearer closes its proxy before the token is
524
+ revoked.
525
+
509
526
  Game-to-game routes through the Overworld for a fresh per-game token. New
510
527
  realtime codes: `APP_TOKEN_REQUIRED`, `APP_SCOPE_MISMATCH`; new `UdpErrorCode`:
511
528
  `TOKEN_EXPIRED`. See [MIGRATION.md](MIGRATION.md) for the full v7 breaking guide.
@@ -32,7 +32,7 @@ import { GameKitClient, type GameKitOptions } from './kit/index.js';
32
32
  import { AuthAPI } from './domains/auth.js';
33
33
  import { UsersAPI } from './domains/users.js';
34
34
  import { AppsAPI } from './domains/apps.js';
35
- import { PortalAPI, type PkceStore } from './domains/portal.js';
35
+ import { PortalAPI, type AppTokenResponse, type PkceStore } from './domains/portal.js';
36
36
  import { PlatformAPI } from './domains/platform.js';
37
37
  import { OrganizationsAPI } from './domains/organizations.js';
38
38
  import { AppAccessAPI } from './domains/appAccess.js';
@@ -117,6 +117,7 @@ export interface CrowdyClientConfig {
117
117
  lbCookieStore?: LbCookieStore;
118
118
  }
119
119
  export declare class CrowdyClient {
120
+ private gameplayTokenRefresh;
120
121
  /** Shared token state for both game-api and management-api requests. */
121
122
  readonly session: AuthState;
122
123
  /** game-api HTTP client. */
@@ -213,6 +214,33 @@ export declare class CrowdyClient {
213
214
  setToken(token: string | null): void;
214
215
  /** Read the current Bearer token (null if no session). */
215
216
  getToken(): string | null;
217
+ /**
218
+ * Rotate an active gameplay token without orphaning its old UDP proxy.
219
+ *
220
+ * This is the supported refresh path while a game client has an open UDP
221
+ * proxy: it disconnects that proxy while the old Bearer token is still
222
+ * active, calls {@link PortalAPI.refresh} to rotate and store the new token,
223
+ * then opens a proxy authenticated by the new token. The session token
224
+ * listener restarts the existing realtime subscription in place, so its
225
+ * registered notification handlers are retained rather than duplicated.
226
+ * Concurrent calls share one in-flight rotation.
227
+ *
228
+ * Failure semantics:
229
+ * - If the old proxy disconnect rejects or does not confirm closure, rotation
230
+ * is aborted and the old token remains active.
231
+ * - If refresh rejects, the old token remains active (the old proxy has
232
+ * already closed and can be opened again with {@link UdpAPI.connect}).
233
+ * - If opening the new proxy rejects, the fresh token remains active. Surface
234
+ * the error and retry {@link UdpAPI.connect}; do not repeat the rotation
235
+ * merely to retry that connection.
236
+ *
237
+ * @returns The fresh app-scoped token response stored on this client.
238
+ * @throws {CrowdyProtocolError} if the old proxy does not confirm closure.
239
+ * @throws Transport or GraphQL errors from the disconnect, refresh, or
240
+ * reconnect step, with token state preserved as described above.
241
+ */
242
+ refreshGameplayToken(): Promise<AppTokenResponse>;
243
+ private performGameplayTokenRefresh;
216
244
  /**
217
245
  * Ergonomic, app-scoped realtime facade. `client.world(appId)` returns a
218
246
  * {@link WorldClient} whose `actor()` and `subscribe()` helpers pass `appId`
@@ -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;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,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;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,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C,gBAAgB,CAAC;YAczC,2BAA2B;IAczC;;;;;;;OAOG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW;IAIjC;;;;;;;;;;;;OAYG;IACH,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,aAAa;IAS3D,gEAAgE;IAChE,KAAK,IAAI,IAAI;CAId;AAED,wBAAgB,kBAAkB,CAChC,MAAM,GAAE,kBAAuB,GAC9B,YAAY,CAEd"}
@@ -25,12 +25,13 @@ import { GraphQLClient } from './client.js';
25
25
  import { LbCookieStore } from './lb-cookie-store.js';
26
26
  import { RealtimeMetrics } from './metrics.js';
27
27
  import { SubscriptionManager } from './subscriptions.js';
28
+ import { CrowdyProtocolError } from './errors.js';
28
29
  import { WorldClient } from './world.js';
29
30
  import { GameKitClient } from './kit/index.js';
30
31
  import { AuthAPI } from './domains/auth.js';
31
32
  import { UsersAPI } from './domains/users.js';
32
33
  import { AppsAPI } from './domains/apps.js';
33
- import { PortalAPI } from './domains/portal.js';
34
+ import { PortalAPI, } from './domains/portal.js';
34
35
  import { PlatformAPI } from './domains/platform.js';
35
36
  import { OrganizationsAPI } from './domains/organizations.js';
36
37
  import { AppAccessAPI } from './domains/appAccess.js';
@@ -62,6 +63,7 @@ import { MarketplaceAPI } from './domains/marketplace.js';
62
63
  import { PlayerModelAPI } from './domains/playerModel.js';
63
64
  export class CrowdyClient {
64
65
  constructor(config = {}) {
66
+ this.gameplayTokenRefresh = null;
65
67
  this.session = new AuthState(config.tokenStore);
66
68
  const lbCookieStore = config.lbCookieStore ?? new LbCookieStore();
67
69
  this.graphql = new GraphQLClient({
@@ -146,6 +148,56 @@ export class CrowdyClient {
146
148
  getToken() {
147
149
  return this.session.getToken();
148
150
  }
151
+ /**
152
+ * Rotate an active gameplay token without orphaning its old UDP proxy.
153
+ *
154
+ * This is the supported refresh path while a game client has an open UDP
155
+ * proxy: it disconnects that proxy while the old Bearer token is still
156
+ * active, calls {@link PortalAPI.refresh} to rotate and store the new token,
157
+ * then opens a proxy authenticated by the new token. The session token
158
+ * listener restarts the existing realtime subscription in place, so its
159
+ * registered notification handlers are retained rather than duplicated.
160
+ * Concurrent calls share one in-flight rotation.
161
+ *
162
+ * Failure semantics:
163
+ * - If the old proxy disconnect rejects or does not confirm closure, rotation
164
+ * is aborted and the old token remains active.
165
+ * - If refresh rejects, the old token remains active (the old proxy has
166
+ * already closed and can be opened again with {@link UdpAPI.connect}).
167
+ * - If opening the new proxy rejects, the fresh token remains active. Surface
168
+ * the error and retry {@link UdpAPI.connect}; do not repeat the rotation
169
+ * merely to retry that connection.
170
+ *
171
+ * @returns The fresh app-scoped token response stored on this client.
172
+ * @throws {CrowdyProtocolError} if the old proxy does not confirm closure.
173
+ * @throws Transport or GraphQL errors from the disconnect, refresh, or
174
+ * reconnect step, with token state preserved as described above.
175
+ */
176
+ async refreshGameplayToken() {
177
+ if (this.gameplayTokenRefresh)
178
+ return this.gameplayTokenRefresh;
179
+ const operation = this.performGameplayTokenRefresh();
180
+ this.gameplayTokenRefresh = operation;
181
+ try {
182
+ return await operation;
183
+ }
184
+ finally {
185
+ if (this.gameplayTokenRefresh === operation) {
186
+ this.gameplayTokenRefresh = null;
187
+ }
188
+ }
189
+ }
190
+ async performGameplayTokenRefresh() {
191
+ const disconnected = await this.udp.disconnect();
192
+ if (!disconnected) {
193
+ throw new CrowdyProtocolError({
194
+ message: 'UDP proxy did not confirm disconnect; gameplay token rotation was aborted',
195
+ });
196
+ }
197
+ const token = await this.portal.refresh();
198
+ await this.udp.connect();
199
+ return token;
200
+ }
149
201
  /**
150
202
  * Ergonomic, app-scoped realtime facade. `client.world(appId)` returns a
151
203
  * {@link WorldClient} whose `actor()` and `subscribe()` helpers pass `appId`
@@ -1,5 +1,5 @@
1
1
  import type { GraphQLClient } from '../client.js';
2
- import { type MarketplaceCreateAccountSessionMutation, type MarketplaceCreateAccountSessionMutationVariables, type MarketplaceCreateOrgAccountSessionMutation, type MarketplaceCreateOrgAccountSessionMutationVariables, type MarketplaceRenewAcquisitionMutationVariables, type MarketplaceTopUpAcquisitionMutationVariables, type MarketplaceRefundAcquisitionMutationVariables, type MarketplaceGridListingsQueryVariables, type MarketplacePurchaseGridMutationVariables, type MarketplaceSetListingPricingMutationVariables, type MarketplaceSetOrgShareMutationVariables, type MarketplaceBeginSellerOnboardingMutationVariables, type MarketplaceBeginOrgSellerOnboardingMutationVariables, type MarketplaceRequestPayoutMutationVariables, type MarketplaceSpendPayoutToWalletMutationVariables, type MarketplaceCommerceRiskQueueQueryVariables, type MarketplaceDecideRiskFlagMutationVariables, type MarketplaceCreateGridListingMutationVariables, type MarketplaceGridListingsQuery, type MarketplacePurchaseGridMutation, type MarketplaceBeginSellerOnboardingMutation, type MarketplaceBeginOrgSellerOnboardingMutation, type MarketplaceMySellerBalanceQuery, type MarketplaceCommerceRiskQueueQuery, type MarketplaceCreateGridListingMutation, type MarketplaceListingsQuery, type MarketplaceListingsQueryVariables, type MarketplaceListingVersionsQuery, type MarketplaceListingVersionsQueryVariables, type MarketplaceMyAcquisitionsQuery, type MarketplaceMyAcquisitionsQueryVariables, type MarketplaceMyInstallsQuery, type MarketplaceMyInstallsQueryVariables, type MarketplaceGridClientModsQuery, type MarketplaceGridClientModsQueryVariables, type MarketplaceClientArtifactQuery, type MarketplaceClientArtifactQueryVariables, type MarketplacePublishListingMutation, type MarketplacePublishListingMutationVariables, type MarketplacePublishVersionMutation, type MarketplacePublishVersionMutationVariables, type MarketplaceAcquireMutation, type MarketplaceAcquireMutationVariables, type MarketplaceInstallMutation, type MarketplaceInstallMutationVariables, type MarketplaceUninstallMutationVariables, type MarketplaceConsentGridClientModMutationVariables, type MarketplaceTrustGridAuthorMutation, type MarketplaceTrustGridAuthorMutationVariables, type MarketplaceGridClaimPolicyQuery, type MarketplaceGridClaimPolicyQueryVariables, type MarketplaceGridClaimRequestsQuery, type MarketplaceGridClaimRequestsQueryVariables, type MarketplaceClaimGridOwnershipMutation, type MarketplaceClaimGridOwnershipMutationVariables, type MarketplaceDecideGridClaimMutation, type MarketplaceDecideGridClaimMutationVariables, type MarketplaceIssueGridClaimInviteMutationVariables, type MarketplaceAdmissionQueueQuery, type MarketplaceAdmissionQueueQueryVariables, type MarketplaceAppListingsQuery, type MarketplaceAppListingsQueryVariables, type MarketplaceAppAcquisitionsQuery, type MarketplaceAppAcquisitionsQueryVariables, type MarketplaceTransferListingMutation, type MarketplaceTransferListingMutationVariables, type MarketplaceSetListingStatusMutation, type MarketplaceSetListingStatusMutationVariables, type MarketplaceSetGridClaimPolicyMutation, type MarketplaceSetGridClaimPolicyMutationVariables } from '../generated/graphql.js';
2
+ import { type MarketplaceCreateAccountSessionMutation, type MarketplaceCreateAccountSessionMutationVariables, type MarketplaceCreateOrgAccountSessionMutation, type MarketplaceCreateOrgAccountSessionMutationVariables, type MarketplaceRenewAcquisitionMutationVariables, type MarketplaceTopUpAcquisitionMutationVariables, type MarketplaceRefundAcquisitionMutationVariables, type MarketplaceGridListingsQueryVariables, type MarketplacePurchaseGridMutationVariables, type MarketplaceSetListingPricingMutationVariables, type MarketplaceSetOrgShareMutationVariables, type MarketplaceBeginSellerOnboardingMutationVariables, type MarketplaceBeginOrgSellerOnboardingMutationVariables, type MarketplaceRequestPayoutMutationVariables, type MarketplaceSpendPayoutToWalletMutationVariables, type MarketplaceCommerceRiskQueueQueryVariables, type MarketplaceDecideRiskFlagMutationVariables, type MarketplaceCreateGridListingMutationVariables, type MarketplaceGridListingsQuery, type MarketplacePurchaseGridMutation, type MarketplaceBeginSellerOnboardingMutation, type MarketplaceBeginOrgSellerOnboardingMutation, type MarketplaceMySellerBalanceQuery, type MarketplaceCommerceRiskQueueQuery, type MarketplaceCreateGridListingMutation, type MarketplaceListingsQuery, type MarketplaceListingsQueryVariables, type MarketplaceListingVersionsQuery, type MarketplaceListingVersionsQueryVariables, type MarketplaceMyAcquisitionsQuery, type MarketplaceMyAcquisitionsQueryVariables, type MarketplaceMyInstallsQuery, type MarketplaceMyInstallsQueryVariables, type MarketplaceGridClientModsQuery, type MarketplaceGridClientModsQueryVariables, type MarketplaceClientArtifactQuery, type MarketplaceClientArtifactQueryVariables, type MarketplacePublishListingMutation, type MarketplacePublishListingMutationVariables, type MarketplacePublishVersionMutation, type MarketplacePublishVersionMutationVariables, type MarketplaceAcquireMutation, type MarketplaceAcquireMutationVariables, type MarketplaceInstallMutation, type MarketplaceInstallMutationVariables, type MarketplaceUninstallMutationVariables, type MarketplaceConsentGridClientModMutationVariables, type MarketplaceTrustGridAuthorMutation, type MarketplaceTrustGridAuthorMutationVariables, type MarketplaceGridClaimPolicyQuery, type MarketplaceGridClaimPolicyQueryVariables, type MarketplaceGridClaimRequestsQuery, type MarketplaceGridClaimRequestsQueryVariables, type MarketplaceClaimGridOwnershipMutation, type MarketplaceClaimGridOwnershipMutationVariables, type MarketplaceClaimGridChunkMutation, type MarketplaceClaimGridChunkMutationVariables, type MarketplaceReleaseClaimedGridMutation, type MarketplaceReleaseClaimedGridMutationVariables, type MarketplaceDecideGridClaimMutation, type MarketplaceDecideGridClaimMutationVariables, type MarketplaceIssueGridClaimInviteMutationVariables, type MarketplaceAdmissionQueueQuery, type MarketplaceAdmissionQueueQueryVariables, type MarketplaceAppListingsQuery, type MarketplaceAppListingsQueryVariables, type MarketplaceAppAcquisitionsQuery, type MarketplaceAppAcquisitionsQueryVariables, type MarketplaceTransferListingMutation, type MarketplaceTransferListingMutationVariables, type MarketplaceSetListingStatusMutation, type MarketplaceSetListingStatusMutationVariables, type MarketplaceSetGridClaimPolicyMutation, type MarketplaceSetGridClaimPolicyMutationVariables } from '../generated/graphql.js';
3
3
  /**
4
4
  * The P4a player-code marketplace (free mode) — exposed as
5
5
  * `client.marketplace`. Player-facing browse/publish/acquire/install/consent
@@ -67,6 +67,17 @@ export declare class MarketplaceAPI {
67
67
  gridClaimRequests(variables: MarketplaceGridClaimRequestsQueryVariables): Promise<MarketplaceGridClaimRequestsQuery['gridClaimRequests']>;
68
68
  /** Claim grid ownership under the app policy (server-authorized, D4). */
69
69
  claimGridOwnership(variables: MarketplaceClaimGridOwnershipMutationVariables): Promise<MarketplaceClaimGridOwnershipMutation['claimGridOwnership']>;
70
+ /**
71
+ * Atomically create and claim one chunk under the app's SELF_CLAIM policy.
72
+ * Uses the authenticated player, rejects protected/overlapping chunks, and
73
+ * returns authoritative bounds plus effective build/mod permissions.
74
+ */
75
+ claimGridChunk(variables: MarketplaceClaimGridChunkMutationVariables): Promise<MarketplaceClaimGridChunkMutation['claimGridChunk']>;
76
+ /**
77
+ * Release a one-chunk grid created by `claimGridChunk`. The authenticated
78
+ * caller must still own the claim; other grid origins cannot be released.
79
+ */
80
+ releaseClaimedGrid(variables: MarketplaceReleaseClaimedGridMutationVariables): Promise<MarketplaceReleaseClaimedGridMutation['releaseClaimedGrid']>;
70
81
  /** Approve or deny a pending claim request (approvers/staff). */
71
82
  decideGridClaim(variables: MarketplaceDecideGridClaimMutationVariables): Promise<MarketplaceDecideGridClaimMutation['decideGridClaim']>;
72
83
  /** Issue a standing claim invite (approvers/staff; INVITE mode). */
@@ -1 +1 @@
1
- {"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/domains/marketplace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAoCL,KAAK,uCAAuC,EAC5C,KAAK,gDAAgD,EACrD,KAAK,0CAA0C,EAC/C,KAAK,mDAAmD,EAOxD,KAAK,4CAA4C,EACjD,KAAK,4CAA4C,EACjD,KAAK,6CAA6C,EAClD,KAAK,qCAAqC,EAC1C,KAAK,wCAAwC,EAC7C,KAAK,6CAA6C,EAClD,KAAK,uCAAuC,EAC5C,KAAK,iDAAiD,EACtD,KAAK,oDAAoD,EACzD,KAAK,yCAAyC,EAC9C,KAAK,+CAA+C,EACpD,KAAK,0CAA0C,EAC/C,KAAK,0CAA0C,EAC/C,KAAK,6CAA6C,EAClD,KAAK,4BAA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EAAyE;IACnE,WAAW,CACf,SAAS,EAAE,uCAAuC,GACjD,OAAO,CAAC,MAAM,CAAC;IAQlB;;;;;;OAMG;IACG,oBAAoB,CACxB,SAAS,EAAE,gDAAgD,GAC1D,OAAO,CACR,uCAAuC,CAAC,4BAA4B,CAAC,CACtE;IAQD,sFAAsF;IAChF,uBAAuB,CAC3B,SAAS,EAAE,mDAAmD,GAC7D,OAAO,CACR,0CAA0C,CAAC,+BAA+B,CAAC,CAC5E;IAQD,6EAA6E;IACvE,qBAAqB,CACzB,SAAS,EAAE,iDAAiD,GAC3D,OAAO,CAAC,wCAAwC,CAAC,uBAAuB,CAAC,CAAC;IAQ7E,8EAA8E;IACxE,wBAAwB,CAC5B,SAAS,EAAE,oDAAoD,GAC9D,OAAO,CACR,2CAA2C,CAAC,0BAA0B,CAAC,CACxE;IAQD,kDAAkD;IAC5C,eAAe,IAAI,OAAO,CAC9B,+BAA+B,CAAC,uBAAuB,CAAC,CACzD;IAQD,6EAA6E;IACvE,aAAa,CACjB,SAAS,GAAE,yCAA8C,GACxD,OAAO,CAAC,MAAM,CAAC;IAQlB,kFAAkF;IAC5E,mBAAmB,CACvB,SAAS,EAAE,+CAA+C,GACzD,OAAO,CAAC,MAAM,CAAC;IAQlB,+DAA+D;IACzD,iBAAiB,CACrB,SAAS,EAAE,0CAA0C,GACpD,OAAO,CAAC,iCAAiC,CAAC,mBAAmB,CAAC,CAAC;IAQlE,2DAA2D;IACrD,cAAc,CAClB,SAAS,EAAE,0CAA0C,GACpD,OAAO,CAAC,OAAO,CAAC;IAQnB,0EAA0E;IACpE,iBAAiB,CACrB,SAAS,EAAE,6CAA6C,GACvD,OAAO,CAAC,oCAAoC,CAAC,mBAAmB,CAAC,CAAC;CAOtE"}
@@ -1,4 +1,4 @@
1
- import { MarketplaceListingsDocument, MarketplaceListingVersionsDocument, MarketplaceMyAcquisitionsDocument, MarketplaceMyInstallsDocument, MarketplaceGridClientModsDocument, MarketplaceClientArtifactDocument, MarketplacePublishListingDocument, MarketplacePublishVersionDocument, MarketplaceAcquireDocument, MarketplaceInstallDocument, MarketplaceUninstallDocument, MarketplaceConsentGridClientModDocument, MarketplaceTrustGridAuthorDocument, MarketplaceGridClaimPolicyDocument, MarketplaceGridClaimRequestsDocument, MarketplaceClaimGridOwnershipDocument, MarketplaceDecideGridClaimDocument, MarketplaceIssueGridClaimInviteDocument, MarketplaceAdmissionQueueDocument, MarketplaceAppListingsDocument, MarketplaceAppAcquisitionsDocument, MarketplaceTransferListingDocument, MarketplaceSetListingStatusDocument, MarketplaceSetGridClaimPolicyDocument, MarketplaceRenewAcquisitionDocument, MarketplaceTopUpAcquisitionDocument, MarketplaceRefundAcquisitionDocument, MarketplaceGridListingsDocument, MarketplacePurchaseGridDocument, MarketplaceSetListingPricingDocument, MarketplaceSetOrgShareDocument, MarketplaceBeginSellerOnboardingDocument, MarketplaceBeginOrgSellerOnboardingDocument, MarketplaceCreateAccountSessionDocument, MarketplaceCreateOrgAccountSessionDocument, MarketplaceMySellerBalanceDocument, MarketplaceRequestPayoutDocument, MarketplaceSpendPayoutToWalletDocument, MarketplaceCommerceRiskQueueDocument, MarketplaceDecideRiskFlagDocument, MarketplaceCreateGridListingDocument, } from '../generated/graphql.js';
1
+ import { MarketplaceListingsDocument, MarketplaceListingVersionsDocument, MarketplaceMyAcquisitionsDocument, MarketplaceMyInstallsDocument, MarketplaceGridClientModsDocument, MarketplaceClientArtifactDocument, MarketplacePublishListingDocument, MarketplacePublishVersionDocument, MarketplaceAcquireDocument, MarketplaceInstallDocument, MarketplaceUninstallDocument, MarketplaceConsentGridClientModDocument, MarketplaceTrustGridAuthorDocument, MarketplaceGridClaimPolicyDocument, MarketplaceGridClaimRequestsDocument, MarketplaceClaimGridOwnershipDocument, MarketplaceClaimGridChunkDocument, MarketplaceReleaseClaimedGridDocument, MarketplaceDecideGridClaimDocument, MarketplaceIssueGridClaimInviteDocument, MarketplaceAdmissionQueueDocument, MarketplaceAppListingsDocument, MarketplaceAppAcquisitionsDocument, MarketplaceTransferListingDocument, MarketplaceSetListingStatusDocument, MarketplaceSetGridClaimPolicyDocument, MarketplaceRenewAcquisitionDocument, MarketplaceTopUpAcquisitionDocument, MarketplaceRefundAcquisitionDocument, MarketplaceGridListingsDocument, MarketplacePurchaseGridDocument, MarketplaceSetListingPricingDocument, MarketplaceSetOrgShareDocument, MarketplaceBeginSellerOnboardingDocument, MarketplaceBeginOrgSellerOnboardingDocument, MarketplaceCreateAccountSessionDocument, MarketplaceCreateOrgAccountSessionDocument, MarketplaceMySellerBalanceDocument, MarketplaceRequestPayoutDocument, MarketplaceSpendPayoutToWalletDocument, MarketplaceCommerceRiskQueueDocument, MarketplaceDecideRiskFlagDocument, MarketplaceCreateGridListingDocument, } from '../generated/graphql.js';
2
2
  /**
3
3
  * The P4a player-code marketplace (free mode) — exposed as
4
4
  * `client.marketplace`. Player-facing browse/publish/acquire/install/consent
@@ -125,6 +125,23 @@ export class MarketplaceAPI {
125
125
  const data = await this.game.request(MarketplaceClaimGridOwnershipDocument, variables);
126
126
  return data.claimGridOwnership;
127
127
  }
128
+ /**
129
+ * Atomically create and claim one chunk under the app's SELF_CLAIM policy.
130
+ * Uses the authenticated player, rejects protected/overlapping chunks, and
131
+ * returns authoritative bounds plus effective build/mod permissions.
132
+ */
133
+ async claimGridChunk(variables) {
134
+ const data = await this.game.request(MarketplaceClaimGridChunkDocument, variables);
135
+ return data.claimGridChunk;
136
+ }
137
+ /**
138
+ * Release a one-chunk grid created by `claimGridChunk`. The authenticated
139
+ * caller must still own the claim; other grid origins cannot be released.
140
+ */
141
+ async releaseClaimedGrid(variables) {
142
+ const data = await this.game.request(MarketplaceReleaseClaimedGridDocument, variables);
143
+ return data.releaseClaimedGrid;
144
+ }
128
145
  /** Approve or deny a pending claim request (approvers/staff). */
129
146
  async decideGridClaim(variables) {
130
147
  const data = await this.game.request(MarketplaceDecideGridClaimDocument, variables);
@@ -904,6 +904,24 @@ export type Chunk = {
904
904
  /** 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. */
905
905
  voxels: Maybe<Scalars['String']['output']>;
906
906
  };
907
+ /** 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. */
908
+ export type ChunkClaimResult = {
909
+ __typename?: 'ChunkClaimResult';
910
+ /** Full effective runtime permission-key set materialized for the caller on the new grid after grid limits are applied. */
911
+ effectivePermissionKeys: Array<Scalars['String']['output']>;
912
+ /** Id of the one-chunk grid created for this claim. */
913
+ gridId: Scalars['BigInt']['output'];
914
+ /** High corner of the claimed grid. It equals lowChunk because a player claim covers exactly one chunk. */
915
+ highChunk: ChunkCoordinates;
916
+ /** Low corner of the claimed grid. It equals highChunk because a player claim covers exactly one chunk. */
917
+ lowChunk: ChunkCoordinates;
918
+ /** True when the effective ACL contains both write and run permission for at least one player-code target (server or client). */
919
+ moddable: Scalars['Boolean']['output'];
920
+ /** New current user ownership record created atomically with the grid. */
921
+ ownership: GridOwnership;
922
+ /** App claim policy applied by the server. This mutation succeeds only for SELF_CLAIM. */
923
+ policy: GridClaimPolicy;
924
+ };
907
925
  /** Integer (x, y, z) address of a 16x16x16-voxel chunk within an app's world grid. Each unit step moves one whole chunk (16 voxels) along that axis. Components are signed 64-bit integers serialized as decimal strings (see the BigInt scalar). */
908
926
  export type ChunkCoordinates = {
909
927
  __typename?: 'ChunkCoordinates';
@@ -3566,6 +3584,8 @@ export type Mutation = {
3566
3584
  changePassword: Scalars['Boolean']['output'];
3567
3585
  /** Self-service: the authenticated caller claims access to an app via its free, open-by-default tier. Requires authentication only (no org membership needed). ENTITLEMENT CHANGE: grants the free default tier as a 'system' grant and notifies the game API. Idempotent: returns the existing row if already granted, and never overrides a prior revoke. Errors if the app has no free default tier or is archived. */
3568
3586
  claimFreeAppAccess: AppUserAccess;
3587
+ /** Claim one currently unclaimed chunk as a new player-owned grid. Requires an ordinary app-scoped player token and active app access, but never manage_apps. The app's policy must be SELF_CLAIM. The server validates the app's grid assignment and peer-overlap rules, then atomically creates a one-chunk grid, assigns current-user ownership, grants access/update_voxel_data/use_voice_chat/teleport plus player-code keys already carried by the caller's tier, and materializes the effective ACL. Conflicts and policy denials throw GraphQL errors; no partial grid, ownership, or grant rows remain. */
3588
+ claimGridChunk: ChunkClaimResult;
3569
3589
  /** Claim grid ownership under the app's claim policy (D4, server-authorized — no client manage_apps involved). SELF_CLAIM assigns ownership immediately; APPROVAL creates a pending request for designated approvers; INVITE requires a standing invite (consumed on use); MARKETPLACE_ONLY refuses (ownership arrives only via grid purchase, P4b). The grid must exist and have no current owner; game rules gate who may attempt a claim. */
3570
3590
  claimGridOwnership: GridClaimResult;
3571
3591
  /** Complete a magic-link sign-in with the emailed token; returns a session AuthResponse. Public (the token authorizes the call); throws if invalid/expired/used. */
@@ -3808,6 +3828,8 @@ export type Mutation = {
3808
3828
  refundPlayerCodeAcquisition: Scalars['Int']['output'];
3809
3829
  /** Registers a new email + password account: creates the (initially unconfirmed) account, emails a confirmation link, and returns an AuthResponse with a session `token` for immediate use (send as `Authorization: Bearer <token>`). If an account already exists for the email (e.g. created via magic link/social), the password is attached pending email confirmation and no session is returned (throws CONFLICT). Public. */
3810
3830
  register: AuthResponse;
3831
+ /** Release a one-chunk grid previously created through claimGridChunk. Requires an ordinary app-scoped player token and the caller must still be its current user owner. Refuses foreign grids, studio/marketplace grids, and grids assigned through legacy claimGridOwnership. Atomically removes active install attachments, self-claim ownership, direct/effective ACL rows, and the grid so its chunk can be claimed again. Player modules on the grid are deleted by the grid cascade. */
3832
+ releaseClaimedGrid: ReleaseClaimedGridResult;
3811
3833
  /** Remove a member from a channel. Requires the 'manage_members' channel permission, except that any member may remove themselves. Notifies Buddy to stop routing to the removed member. Returns true if a membership was removed. */
3812
3834
  removeChannelMember: Scalars['Boolean']['output'];
3813
3835
  /** Removes a user from an organization. Requires the 'manage_members' permission on the org (super admins bypass). DESTRUCTIVE: revokes the user's membership and role assignments in that org. Returns false if the user was not a member. */
@@ -4046,6 +4068,10 @@ export type MutationChangePasswordArgs = {
4046
4068
  export type MutationClaimFreeAppAccessArgs = {
4047
4069
  appId: Scalars['BigInt']['input'];
4048
4070
  };
4071
+ export type MutationClaimGridChunkArgs = {
4072
+ appId: Scalars['BigInt']['input'];
4073
+ chunk: ChunkCoordinatesInput;
4074
+ };
4049
4075
  export type MutationClaimGridOwnershipArgs = {
4050
4076
  appId: Scalars['BigInt']['input'];
4051
4077
  gridId: Scalars['BigInt']['input'];
@@ -4467,6 +4493,10 @@ export type MutationRefundPlayerCodeAcquisitionArgs = {
4467
4493
  export type MutationRegisterArgs = {
4468
4494
  registerUserInput: RegisterUserInput;
4469
4495
  };
4496
+ export type MutationReleaseClaimedGridArgs = {
4497
+ appId: Scalars['BigInt']['input'];
4498
+ gridId: Scalars['BigInt']['input'];
4499
+ };
4470
4500
  export type MutationRemoveChannelMemberArgs = {
4471
4501
  groupId: Scalars['BigInt']['input'];
4472
4502
  userId: Scalars['BigInt']['input'];
@@ -6917,6 +6947,20 @@ export type RegisterUserInput = {
6917
6947
  /** Password for the new account (min 8 characters). */
6918
6948
  password: Scalars['String']['input'];
6919
6949
  };
6950
+ /** Result of releasing a grid created by the caller through claimGridChunk. The ownership, direct/effective ACL, and grid have been removed atomically, making its chunk claimable again. */
6951
+ export type ReleaseClaimedGridResult = {
6952
+ __typename?: 'ReleaseClaimedGridResult';
6953
+ /** Id of the self-claimed grid that was removed. */
6954
+ gridId: Scalars['BigInt']['output'];
6955
+ /** High corner of the removed one-chunk grid. */
6956
+ highChunk: ChunkCoordinates;
6957
+ /** Low corner of the removed one-chunk grid. */
6958
+ lowChunk: ChunkCoordinates;
6959
+ /** Claim policy under which the removed grid was created. */
6960
+ policy: GridClaimPolicy;
6961
+ /** True after the ownership, ACL rows, and grid were removed in one committed transaction. */
6962
+ released: Scalars['Boolean']['output'];
6963
+ };
6920
6964
  /** Request an emailed magic-link to sign in (passwordless). */
6921
6965
  export type RequestLoginLinkInput = {
6922
6966
  /** Email address to send the one-time sign-in link to. */
@@ -13647,6 +13691,67 @@ export type MarketplaceClaimGridOwnershipMutation = {
13647
13691
  claimRequestId: string | null;
13648
13692
  };
13649
13693
  };
13694
+ export type MarketplaceClaimGridChunkMutationVariables = Exact<{
13695
+ appId: Scalars['BigInt']['input'];
13696
+ chunk: ChunkCoordinatesInput;
13697
+ }>;
13698
+ export type MarketplaceClaimGridChunkMutation = {
13699
+ __typename?: 'Mutation';
13700
+ claimGridChunk: {
13701
+ __typename?: 'ChunkClaimResult';
13702
+ gridId: string;
13703
+ policy: GridClaimPolicy;
13704
+ moddable: boolean;
13705
+ effectivePermissionKeys: Array<string>;
13706
+ lowChunk: {
13707
+ __typename?: 'ChunkCoordinates';
13708
+ x: string;
13709
+ y: string;
13710
+ z: string;
13711
+ };
13712
+ highChunk: {
13713
+ __typename?: 'ChunkCoordinates';
13714
+ x: string;
13715
+ y: string;
13716
+ z: string;
13717
+ };
13718
+ ownership: {
13719
+ __typename?: 'GridOwnership';
13720
+ gridOwnershipId: string;
13721
+ ownerKind: GridOwnerKind;
13722
+ ownerRef: string;
13723
+ tenure: GridTenure;
13724
+ acquiredVia: string;
13725
+ acquiredAt: string;
13726
+ expiresAt: string | null;
13727
+ };
13728
+ };
13729
+ };
13730
+ export type MarketplaceReleaseClaimedGridMutationVariables = Exact<{
13731
+ appId: Scalars['BigInt']['input'];
13732
+ gridId: Scalars['BigInt']['input'];
13733
+ }>;
13734
+ export type MarketplaceReleaseClaimedGridMutation = {
13735
+ __typename?: 'Mutation';
13736
+ releaseClaimedGrid: {
13737
+ __typename?: 'ReleaseClaimedGridResult';
13738
+ gridId: string;
13739
+ policy: GridClaimPolicy;
13740
+ released: boolean;
13741
+ lowChunk: {
13742
+ __typename?: 'ChunkCoordinates';
13743
+ x: string;
13744
+ y: string;
13745
+ z: string;
13746
+ };
13747
+ highChunk: {
13748
+ __typename?: 'ChunkCoordinates';
13749
+ x: string;
13750
+ y: string;
13751
+ z: string;
13752
+ };
13753
+ };
13754
+ };
13650
13755
  export type MarketplaceDecideGridClaimMutationVariables = Exact<{
13651
13756
  appId: Scalars['BigInt']['input'];
13652
13757
  requestId: Scalars['String']['input'];
@@ -17219,6 +17324,8 @@ export declare const MarketplaceConsentGridClientModDocument: DocumentNode<Marke
17219
17324
  export declare const MarketplaceGridClaimPolicyDocument: DocumentNode<MarketplaceGridClaimPolicyQuery, MarketplaceGridClaimPolicyQueryVariables>;
17220
17325
  export declare const MarketplaceGridClaimRequestsDocument: DocumentNode<MarketplaceGridClaimRequestsQuery, MarketplaceGridClaimRequestsQueryVariables>;
17221
17326
  export declare const MarketplaceClaimGridOwnershipDocument: DocumentNode<MarketplaceClaimGridOwnershipMutation, MarketplaceClaimGridOwnershipMutationVariables>;
17327
+ export declare const MarketplaceClaimGridChunkDocument: DocumentNode<MarketplaceClaimGridChunkMutation, MarketplaceClaimGridChunkMutationVariables>;
17328
+ export declare const MarketplaceReleaseClaimedGridDocument: DocumentNode<MarketplaceReleaseClaimedGridMutation, MarketplaceReleaseClaimedGridMutationVariables>;
17222
17329
  export declare const MarketplaceDecideGridClaimDocument: DocumentNode<MarketplaceDecideGridClaimMutation, MarketplaceDecideGridClaimMutationVariables>;
17223
17330
  export declare const MarketplaceIssueGridClaimInviteDocument: DocumentNode<MarketplaceIssueGridClaimInviteMutation, MarketplaceIssueGridClaimInviteMutationVariables>;
17224
17331
  export declare const MarketplaceAdmissionQueueDocument: DocumentNode<MarketplaceAdmissionQueueQuery, MarketplaceAdmissionQueueQueryVariables>;