@crowdedkingdoms/crowdyjs 14.1.0 → 14.2.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.
@@ -1114,6 +1114,54 @@ export type AppCodeAdmission = {
1114
1114
  /** Optional P1 version range: exact "3", inclusive "2-5", ">=4", or "<=9". Null admits all versions; invalid expressions fail closed at runtime. */
1115
1115
  versionRange: Maybe<Scalars['String']['output']>;
1116
1116
  };
1117
+ /** An app's compute allowance in units per minute, spanning the expression engine and both WASM tiers. Absent when no allowance has been set for the app, in which case the app is measured against the platform reference allowance and is never refused. */
1118
+ export type AppComputeBudgetInfo = {
1119
+ __typename?: 'AppComputeBudgetInfo';
1120
+ /** The app the allowance belongs to. */
1121
+ appId: Scalars['BigInt']['output'];
1122
+ /** When false the allowance is observed and recorded and nothing is refused (the ship default). When true, exceeding it refuses further model invokes until the minute rolls. Enforcement additionally requires the fleet kill switch to be in its default position, so a true here can still be observing. */
1123
+ enforce: Scalars['Boolean']['output'];
1124
+ /** Why this number was chosen. Recorded because an allowance with no stated basis is a number the next operator cannot safely change. */
1125
+ note: Maybe<Scalars['String']['output']>;
1126
+ /** Compute units this app may consume per minute. */
1127
+ unitsPerMinute: Scalars['BigInt']['output'];
1128
+ /** When the allowance was last written. */
1129
+ updatedAt: Scalars['DateTime']['output'];
1130
+ };
1131
+ /** Whether an app is inside its per-minute compute allowance right now, and what would happen if it were not. Reading this does not charge anything. */
1132
+ export type AppComputeBudgetStatus = {
1133
+ __typename?: 'AppComputeBudgetStatus';
1134
+ /** The allowance the decision was made against. */
1135
+ allowance: Scalars['BigInt']['output'];
1136
+ /** True when the allowance is the app's own stored one, false when it is the platform reference allowance. The reference allowance can never refuse — it exists so shadow-mode observations have a denominator. */
1137
+ allowanceIsAppOwn: Scalars['Boolean']['output'];
1138
+ /** The app. */
1139
+ appId: Scalars['BigInt']['output'];
1140
+ /** Which engines the units came from. Carried on every decision because a single allowance spans the engines, so a player invoke can be refused for compute modules the developer forgot were ticking — and that is only explainable with the breakdown. */
1141
+ byEngine: Array<EngineComputeUnits>;
1142
+ /** Whether being over the allowance is currently refusing invokes. False while in shadow mode, which is the ship default. */
1143
+ enforced: Scalars['Boolean']['output'];
1144
+ /** Whether the app is over the allowance this minute. */
1145
+ overBudget: Scalars['Boolean']['output'];
1146
+ /** Milliseconds until the minute rolls and the allowance resets. */
1147
+ retryAfterMs: Scalars['Int']['output'];
1148
+ /** Compute units accrued in the current minute, across every engine. Between reconciles this is the serving instance's own view, so it can read low on a multi-instance fleet; it converges within seconds. */
1149
+ unitsUsed: Scalars['BigInt']['output'];
1150
+ };
1151
+ /** What an app consumed, per engine, in ONE unit — the number a developer uses to compare the model engine against compute modules, and the number an operator's per-minute allowance is checked against. Derived from the existing per-minute ledgers (wasm_compute_usage, player_wasm_compute_usage, gm_automation_runs, gm_event_log); there is deliberately no separate rollup table for it. */
1152
+ export type AppComputeUsage = {
1153
+ __typename?: 'AppComputeUsage';
1154
+ /** Units per engine, always including engines that contributed nothing, so a zero is distinguishable from an engine the query forgot. */
1155
+ byEngine: Array<EngineComputeUnits>;
1156
+ /** Units divided by the window length. Useful for cost, misleading for safety — compare peakMinuteUnits against an allowance, not this. */
1157
+ meanUnitsPerMinute: Scalars['Float']['output'];
1158
+ /** The highest single minute in the window, summed across engines. This is the number a per-minute allowance refuses on: a mean over an hour hides the minute that would have been refused. */
1159
+ peakMinuteUnits: Scalars['BigInt']['output'];
1160
+ /** Compute units across every engine in the window. */
1161
+ totalUnits: Scalars['BigInt']['output'];
1162
+ /** Length of the window in minutes, as clamped (1 to 1440). */
1163
+ windowMinutes: Scalars['Int']['output'];
1164
+ };
1117
1165
  /** Where an app runs: none (draft), shared (the shared game-api), or dedicated (a provisioned environment). */
1118
1166
  export declare enum AppDeploymentTarget {
1119
1167
  /** Runs on a dedicated, org-provisioned environment. */
@@ -2069,6 +2117,8 @@ export type CreateAgentSessionInput = {
2069
2117
  };
2070
2118
  /** Input payload for creating a new app. */
2071
2119
  export type CreateAppInput = {
2120
+ /** Datacenter the app will live in, e.g. 'or' or 'va'. Query placeableDatacenters for the accepted codes and whether each can currently hold an app. REQUIRED and permanent: an app is distributed on app_id, so all of its data lives on one node in one datacenter and that is fixed when the id is minted. Creation FAILS if the datacenter is unknown to this deployment or holds no capacity, rather than creating an app that cannot be routed. There is no default — the instance answering this call may be in a different datacenter from the one you want. Moving an app afterwards is an operator action. */
2121
+ datacenter: Scalars['String']['input'];
2072
2122
  /** Optional short plain-text description for listings. */
2073
2123
  description?: InputMaybe<Scalars['String']['input']>;
2074
2124
  /** Optional JSON-encoded marketplace metadata string (see App.metadata). Defaults to an empty object when omitted. */
@@ -3131,6 +3181,15 @@ export declare enum CrowdyStudioTarget {
3131
3181
  /** Server-target Rust that can run only after the caller separately passes current grid ownership and write_server_code deployment checks. */
3132
3182
  Server = "SERVER"
3133
3183
  }
3184
+ /** Whether a datacenter currently has a ck-api instance able to serve clients. Three-valued on purpose: "nothing is serving there" and "the liveness signal could not be read" look identical through a boolean and call for opposite reactions. */
3185
+ export declare enum DatacenterServingStatus {
3186
+ /** The signal was readable and reported no instance able to take a client there. An app placed here would be created and stored correctly, and its players would be told the app is temporarily offline until an instance returns. */
3187
+ NotServing = "NOT_SERVING",
3188
+ /** At least one instance in that datacenter has heartbeated within the freshness window and is not draining. */
3189
+ Serving = "SERVING",
3190
+ /** The liveness signal itself could not be read or trusted. Must NOT be presented as an outage: a fleet-wide heartbeat failure once made every datacenter look dead while all of them were fine, and healthy players were told their app was offline. */
3191
+ Unknown = "UNKNOWN"
3192
+ }
3134
3193
  /** Approve or reject one exact pending tool call by its displayed argument hash. */
3135
3194
  export type DecideAgentToolInput = {
3136
3195
  /** Exact sha256 hash displayed by APPROVAL_REQUESTED; substitutions and stale contexts fail. */
@@ -3210,6 +3269,14 @@ export type DevLoginInput = {
3210
3269
  /** Email of the account to sign in as (created if absent). */
3211
3270
  email: Scalars['String']['input'];
3212
3271
  };
3272
+ /** Compute units attributed to one engine over the query window. */
3273
+ export type EngineComputeUnits = {
3274
+ __typename?: 'EngineComputeUnits';
3275
+ /** The engine whose meter produced these units. */
3276
+ engine: MeteredComputeEngine;
3277
+ /** Compute units, where one unit is one millisecond of measured execution time. Comparable across engines by construction: both engines measure the same quantity with the same clock (process.hrtime around the app's code), and a WASM engine additionally floors its answer by fuel/22,000,000 to charge work done inside the sandbox between two host calls. Zero when the engine ran nothing. */
3278
+ units: Scalars['BigInt']['output'];
3279
+ };
3213
3280
  /** Atomically get-or-create a container by an opaque binding key. The key is unique per (appId, typeName, sessionId); concurrent ensures converge on one row. Creation-only fields are ignored when the row already exists. */
3214
3281
  export type EnsureContainerInput = {
3215
3282
  /** The app (tenant) the container belongs to. */
@@ -3996,10 +4063,15 @@ export type GmFunctionTimer = {
3996
4063
  /** The outcome of a gameModelInvoke call (return value, applied writes, and any error). */
3997
4064
  export type GmInvokeResult = {
3998
4065
  __typename?: 'GmInvokeResult';
3999
- /** Error message when success is false (e.g. authority denied or evaluation error). */
4066
+ /**
4067
+ * A platform-authored sentence matching `fault`, safe to show a player. It carries no engine detail on purpose (decision D4): the failing expression, the timeout and the gas figures are in gameModelEvents and the fault record, where a developer reads them and a player does not.
4068
+ * @deprecated Read `fault` instead and choose your own wording. This field no longer carries the engine's error text and will be removed once no client depends on it.
4069
+ */
4000
4070
  errorMessage: Maybe<Scalars['String']['output']>;
4001
4071
  /** The id of the event logged for this invocation. */
4002
4072
  eventId: Scalars['String']['output'];
4073
+ /** Why the invocation failed, when it did: a stable code, whose problem it is, and whether retrying could help. Null when success is true. This is the field to branch on — it is the platform's blame attribution, and rendering is the game's decision. */
4074
+ fault: Maybe<PlayerFaultInfo>;
4003
4075
  /** The function that was invoked. */
4004
4076
  functionName: Scalars['String']['output'];
4005
4077
  /** The property writes that were applied (empty if none / on failure). */
@@ -4638,6 +4710,15 @@ export type LoginUserInput = {
4638
4710
  /** Account password (min 8 characters). */
4639
4711
  password: Scalars['String']['input'];
4640
4712
  };
4713
+ /** Which engine's meter produced a quantity of compute units. "expression" is the model expression engine (player invokes, automations and timers); "studio_wasm" is developer-authored compute modules; "player_wasm" is the player compute tier, which has its own tables and its own billed metric. */
4714
+ export declare enum MeteredComputeEngine {
4715
+ /** The model expression engine: gameModelInvoke, automation runs and timer fires. */
4716
+ Expression = "EXPRESSION",
4717
+ /** Player-authored WASM compute. */
4718
+ PlayerWasm = "PLAYER_WASM",
4719
+ /** Developer-authored WASM compute modules. */
4720
+ StudioWasm = "STUDIO_WASM"
4721
+ }
4641
4722
  /** Input for mintAppToken: directly mint an app-scoped gameplay token for the calling user (native/direct path, no browser redirect). */
4642
4723
  export type MintAppTokenInput = {
4643
4724
  /** Numeric id of the app to mint a confined gameplay token for. Free/open apps are auto-granted access; paid apps require an existing entitlement (else FORBIDDEN). */
@@ -4683,6 +4764,8 @@ export type Mutation = {
4683
4764
  claimGridChunk: ChunkClaimResult;
4684
4765
  /** 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. */
4685
4766
  claimGridOwnership: GridClaimResult;
4767
+ /** Remove an app's compute allowance, returning it to observation against the platform reference allowance. Returns true if an allowance was removed. Requires app-admin ('manage_apps'). */
4768
+ clearAppComputeBudget: Scalars['Boolean']['output'];
4686
4769
  /** 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. */
4687
4770
  completeLoginLink: AuthResponse;
4688
4771
  /** Delete a compute module and (via cascade) its versions, triggers, and lease. Run history is retained for auditing. Returns true when a module was deleted. Requires the org 'manage_compute' permission. */
@@ -4721,7 +4804,7 @@ export type Mutation = {
4721
4804
  createAccessTier: AppAccessTier;
4722
4805
  /** Creates an actor (a player’s presence/instance in an app world) owned by the authenticated user and returns the persisted row (including the server-set `createdAt`). Requires a valid game token. If `input.avatarId` is set it must reference an avatar the caller owns (throws Unauthorized otherwise). `input.uuid` must be the 32-character ASCII actor id used on the UDP wire (NOT a hyphenated RFC-4122 UUID). */
4723
4806
  createActor: Actor;
4724
- /** Create a new app within an organization. Requires the 'manage_apps' permission on the target org (input.orgId); super admins bypass. SIDE EFFECTS: also provisions a free, open-by-default "Default" access tier granting baseline runtime permissions and notifies the game API. Elevated capabilities such as use_studio_agent are NOT granted by default and require an explicit tier grant. Slug must be unique within the org (a duplicate slug fails). New apps default to visibility=PUBLIC and status=DRAFT unless overridden in the input. */
4807
+ /** Create a new app within an organization. Requires the 'manage_apps' permission on the target org (input.orgId); super admins bypass. REQUIRES A DATACENTER (input.datacenter): the app is distributed on its app_id, so all of its data lives in one datacenter, and the id is chosen at creation so that it does. Query placeableDatacenters first for the codes this deployment accepts. Creation FAILS — rather than producing an unroutable app — if the named datacenter is unknown to this deployment or holds no shards. SIDE EFFECTS: also provisions a free, open-by-default "Default" access tier granting baseline runtime permissions and notifies the game API. Elevated capabilities such as use_studio_agent are NOT granted by default and require an explicit tier grant. Slug must be unique within the org (a duplicate slug fails). New apps default to visibility=PUBLIC and status=DRAFT unless overridden in the input. */
4725
4808
  createApp: App;
4726
4809
  /** Creates a new avatar owned by the authenticated user and returns it. Requires a valid game token; the new avatar is always owned by the caller. `input.name` is optional and defaults to "Default Avatar". */
4727
4810
  createAvatar: Avatar;
@@ -4867,7 +4950,7 @@ export type Mutation = {
4867
4950
  gameModelEnsureContainer: GmEnsureContainerResult;
4868
4951
  /** Grant a feature key to an access tier, so users on that tier satisfy tier_feature authority checks for it. Requires app-admin ('manage_apps'). */
4869
4952
  gameModelGrantTierFeature: GmTierFeature;
4870
- /** Invoke a studio-defined function against a 'self' container with JSON params. The server enforces the function's invoke policy (authority rule tree: owner_of_self / is_host / is_current_turn / is_participant / tier_feature / group_permission / grid_permission / condition), evaluates its expressions, atomically applies its declared property mutations, logs an event, and returns the result (return value + mutations applied, or success=false with an error message). Invoke-policy denials are gameplay verdicts, NOT exceptions: they return success=false with errorMessage and log a failure event (observable via gameModelEvents). Scope violations (calling a server-scope function as a non-admin, or an internal function directly) are misconfigurations and throw FORBIDDEN. This is the primary, safe way for players to mutate game state. Requires a valid token; only player-scope functions are invocable here. */
4953
+ /** Invoke a studio-defined function against a 'self' container with JSON params. The server enforces the function's invoke policy (authority rule tree: owner_of_self / is_host / is_current_turn / is_participant / tier_feature / group_permission / grid_permission / condition), evaluates its expressions, atomically applies its declared property mutations, logs an event, and returns the result (return value + mutations applied, or success=false with an error message). Invoke-policy denials are gameplay verdicts, NOT exceptions: they return success=false with errorMessage and log a failure event (observable via gameModelEvents). Scope violations (calling a server-scope function as a non-admin, or an internal function directly) are misconfigurations and throw FORBIDDEN. This is the primary, safe way for players to mutate game state. Requires a valid token; only player-scope functions are invocable here. RATE LIMITED per player per app, defaulting to 120 invocations per 10 seconds: over the limit the call is refused with extensions.code RATE_LIMITED, extensions.blame 'budget' (the caller's own budget — not a fault in the game's code and not a platform failure) and extensions.retryAfterMs. A client that awaits each response cannot reach the limit, because the per-call ceiling already bounds a serial caller well below it. */
4871
4954
  gameModelInvoke: GmInvokeResult;
4872
4955
  /** Join an existing session as a participant, optionally with a role. Requires a valid token and app access. */
4873
4956
  gameModelJoinSession: GmSessionParticipant;
@@ -4925,7 +5008,7 @@ export type Mutation = {
4925
5008
  login: AuthResponse;
4926
5009
  /** Ends the current session by deleting the game_token that authenticated this request; other devices stay logged in. An identity session logout also cascades to (revokes) every app token it minted. Returns false if no token was resolved. */
4927
5010
  logout: Scalars['Boolean']['output'];
4928
- /** Ends every active session for the authenticated user (deletes all their game_tokens and records revocations). Requires a valid session token. */
5011
+ /** Ends every active session for the authenticated user: deletes every session token and every app-scoped gameplay token derived from one, so the user is signed out of the platform and of every game they had entered. Takes effect immediately — a deleted token stops authenticating on its next request rather than at its next refresh. Requires a valid session token. */
4929
5012
  logoutAllDevices: Scalars['Boolean']['output'];
4930
5013
  /** Mint a short-lived, app-scoped gameplay token for the calling user (native/direct path; no browser redirect). Requires an identity SESSION token (app tokens cannot mint). Free/open apps auto-grant access; paid apps require an existing entitlement (else FORBIDDEN). Side effect: may create an app_user_access row on the app's free default tier. */
4931
5014
  mintAppToken: AppTokenResponse;
@@ -4995,7 +5078,7 @@ export type Mutation = {
4995
5078
  resetPassword: Scalars['Boolean']['output'];
4996
5079
  /** Revoke a user's access to an app by setting their app_user_access status to 'revoked', and notifies the game API so the user immediately loses runtime access in Buddy. Requires the 'manage_access_tiers' permission on the app; super admins bypass. The row is retained for audit (not deleted); REVERSIBLE via grantAppAccess. */
4997
5080
  revokeAppAccess: AppUserAccess;
4998
- /** Revoke a previously-granted app authorization and immediately revoke the user's live app tokens for it. Requires a SESSION token. */
5081
+ /** Withdraw consent for an app and immediately invalidate every app-scoped token the authenticated user holds for it, whichever session minted them — the tokens stop authenticating on their next request, not at their next refresh. Atomic: if the tokens cannot be invalidated, consent is left in place and this returns an error, so a successful response is the only state in which access has actually been withdrawn. Does NOT sign the user out: their identity session and their tokens for other apps are untouched. Returns false when there was nothing to revoke (no active grant and no live tokens), which makes a repeat call safe. Requires a SESSION token. */
4999
5082
  revokeAppAuthorization: Scalars['Boolean']['output'];
5000
5083
  /** Revoke an active player-code admission. Requires 'manage_compute'. SIDE EFFECTS: audit row + replica sync; game-api drains affected server modules and blocks client artifact fetches on the next admission refresh. */
5001
5084
  revokeAppCodeAdmission: AppCodeAdmission;
@@ -5027,6 +5110,8 @@ export type Mutation = {
5027
5110
  setAppClientSettings: PortalConsentState;
5028
5111
  /** Set an app's player-code censorship mode. Requires 'manage_compute'. SIDE EFFECTS: writes an immutable audit row and replica-syncs the mode to game-api. Switching to ALLOW_LIST is strict: unadmitted code (including self-authored code) drains at the runtime activation gate; deploy/compile remain allowed. */
5029
5112
  setAppCodeAdmissionMode: CodeAdmissionMode;
5113
+ /** Set an app's compute allowance in units per minute, spanning the model expression engine and both WASM tiers. One unit is one millisecond of measured execution time. An over-ceiling value is REFUSED naming the ceiling (6000000 units per minute) rather than accepted and clamped, so the value reported back is always the value in force. Set enforce to true to refuse invokes when the allowance is exceeded; leave it false to record the decision and admit, which is what produces the measurements a threshold should be chosen from. Requires app-admin ('manage_apps'). */
5114
+ setAppComputeBudget: AppComputeBudgetInfo;
5030
5115
  /** Set how a player claim confers grid ownership in this app (D4): SELF_CLAIM, APPROVAL (optionally with a designated approver list), INVITE, or MARKETPLACE_ONLY. Requires 'manage_apps'. SIDE EFFECTS: replica-syncs to game-api, where claimGridOwnership enforces the policy. Changing policy never revokes existing grid_ownership rows. */
5031
5116
  setAppGridClaimPolicy: GridClaimPolicy;
5032
5117
  /** Set the app's marketplace org revenue share in basis points (OQ-3; taken from the post-platform remainder). Requires 'manage_billing'. BWF uses 0. */
@@ -5205,6 +5290,9 @@ export type MutationClaimGridOwnershipArgs = {
5205
5290
  appId: Scalars['BigInt']['input'];
5206
5291
  gridId: Scalars['BigInt']['input'];
5207
5292
  };
5293
+ export type MutationClearAppComputeBudgetArgs = {
5294
+ appId: Scalars['BigInt']['input'];
5295
+ };
5208
5296
  export type MutationCompleteLoginLinkArgs = {
5209
5297
  input: CompleteLoginLinkInput;
5210
5298
  };
@@ -5791,6 +5879,12 @@ export type MutationSetAppCodeAdmissionModeArgs = {
5791
5879
  appId: Scalars['BigInt']['input'];
5792
5880
  mode: CodeAdmissionMode;
5793
5881
  };
5882
+ export type MutationSetAppComputeBudgetArgs = {
5883
+ appId: Scalars['BigInt']['input'];
5884
+ enforce?: InputMaybe<Scalars['Boolean']['input']>;
5885
+ note?: InputMaybe<Scalars['String']['input']>;
5886
+ unitsPerMinute: Scalars['Int']['input'];
5887
+ };
5794
5888
  export type MutationSetAppGridClaimPolicyArgs = {
5795
5889
  appId: Scalars['BigInt']['input'];
5796
5890
  approverUserIds?: InputMaybe<Array<Scalars['BigInt']['input']>>;
@@ -6303,6 +6397,32 @@ export declare enum PaymentProvider {
6303
6397
  /** Stripe Checkout. Hosted card payment session; completion is confirmed via Stripe webhooks. */
6304
6398
  Stripe = "STRIPE"
6305
6399
  }
6400
+ /** One datacenter an app can be created in. The `code` is exactly what createApp takes as input.datacenter. */
6401
+ export type PlaceableDatacenter = {
6402
+ __typename?: 'PlaceableDatacenter';
6403
+ /** How many shards of the app colocation group this datacenter currently holds. This is the placement odds: createApp mints candidate app ids until one hashes into the requested datacenter, so a datacenter holding half the shards is satisfied in about two attempts. Zero means unplaceable. Always 0 on a deployment that distributes nothing, where the number does not exist and `placeable` is true regardless — read `placeable`, not this, to decide whether a choice is offerable. */
6404
+ appShardCount: Scalars['Int']['output'];
6405
+ /** Datacenter code, e.g. 'or' or 'va'. Pass this verbatim as createApp's input.datacenter; it is compared lowercase. */
6406
+ code: Scalars['String']['output'];
6407
+ /** HTTPS GraphQL origin clients of an app in this datacenter should use. Null only where no topology has been pushed, which on a Citus deployment means the datacenter cannot yet be reached and on a single-node one means there is nothing to route. Informational for a picker: createApp does not need it, and appDiscovery is what a client reads per app. */
6408
+ gameApiUrl: Maybe<Scalars['String']['output']>;
6409
+ /** The wss:// form of gameApiUrl. Null under the same conditions. */
6410
+ gameApiWsUrl: Maybe<Scalars['String']['output']>;
6411
+ /** Whether createApp will accept this datacenter right now. False means it holds no shards of the app colocation group, so no app id can hash into it and creation would fail after exhausting its candidates. Do not offer a false entry as a choice — show it as unavailable, because dropping it hides a half-built datacenter from the only person who would notice. */
6412
+ placeable: Scalars['Boolean']['output'];
6413
+ /** Whether any ck-api instance in this datacenter is currently serving clients. NOT part of whether an app can be PLACED here: placement is about where the data lands and survives a datacenter being down, while this is about whether players could connect today. A datacenter that is placeable but NOT_SERVING will hold the app fine and answer its clients with APP_UNAVAILABLE until an instance comes back, so it is worth warning about and wrong to forbid. UNKNOWN means the liveness signal itself could not be read and must not be shown as an outage — a fleet-wide heartbeat failure once made every datacenter look dead while all of them were fine. */
6414
+ serving: DatacenterServingStatus;
6415
+ };
6416
+ /** The datacenter choices this deployment offers for app creation, plus the two facts a caller needs to interpret an empty list. */
6417
+ export type PlaceableDatacenters = {
6418
+ __typename?: 'PlaceableDatacenters';
6419
+ /** Every datacenter this deployment knows how to route to, sorted by code, including any that cannot currently hold an app. EMPTY means the control plane has never pushed a datacenter topology here, in which case createApp refuses every datacenter and the remedy is a change order (pg:upsert_datacenter_topology) rather than a different argument. */
6420
+ datacenters: Array<PlaceableDatacenter>;
6421
+ /** Whether this deployment actually places apps by datacenter. True on any Citus tier: the datacenter is verified at creation and an unknown or empty one is refused. False on a single-node deployment (a developer machine, the CI database), where there is exactly one place an app can be, the argument is still required but cannot be verified, and the single entry returned is a formality. A caller should present a choice when this is true and need not when it is false. */
6422
+ placementEnforced: Scalars['Boolean']['output'];
6423
+ /** The datacenter of the instance that answered this call, or null if it was not told its own. Present so a picker can SAY which datacenter it is talking to; deliberately NOT a default. The published origin is a multivalue record over every datacenter's load balancer, so the instance answering is whichever one DNS picked, and defaulting to it would place apps by exactly the accident createApp's required argument exists to remove. */
6424
+ servedBy: Maybe<Scalars['String']['output']>;
6425
+ };
6306
6426
  /** Public platform discovery. Clients/SDKs read the shared game-api URL here to route apps deployed to the shared environment. */
6307
6427
  export type PlatformConfig = {
6308
6428
  __typename?: 'PlatformConfig';
@@ -6663,6 +6783,49 @@ export type PlayerComputeUsage = {
6663
6783
  /** Effective units_per_hour developer-policy cap; null when the app sets no hourly quota. */
6664
6784
  unitsPerHour: Maybe<Scalars['BigInt']['output']>;
6665
6785
  };
6786
+ /** What a player-facing surface may be told about a failure that came from code the platform did not write. Deliberately coarser than the internal fault taxonomy: it says what a player can act on and never names an engine, a module, a function or a limit. The full detail is in the developer surfaces (gameModelEvents, computeModuleRuns, userCodeFaults). */
6787
+ export declare enum PlayerFaultCode {
6788
+ /** The app's datacenter has no instance able to serve clients. No endpoint is named, on purpose — there is nowhere to send the client. */
6789
+ AppUnavailable = "APP_UNAVAILABLE",
6790
+ /** A per-minute allowance for this app is spent; it returns on the next window. */
6791
+ BudgetExceeded = "BUDGET_EXCEEDED",
6792
+ /** The arguments did not satisfy the function's contract. */
6793
+ InvalidRequest = "INVALID_REQUEST",
6794
+ /** An invoke policy or permission refused this caller. */
6795
+ NotAllowed = "NOT_ALLOWED",
6796
+ /** The named function, module or export does not exist for this app. */
6797
+ NotFound = "NOT_FOUND",
6798
+ /** The platform could not start the work in time. The app's code never ran. Retrying is correct. */
6799
+ PlatformBusy = "PLATFORM_BUSY",
6800
+ /** A platform failure. Retrying is reasonable. */
6801
+ PlatformError = "PLATFORM_ERROR",
6802
+ /** A metered allowance is spent and does not return on its own. */
6803
+ QuotaExhausted = "QUOTA_EXHAUSTED",
6804
+ /** This caller is asking too often. `retryAfterMs` is carried in error extensions when it is known. */
6805
+ RateLimited = "RATE_LIMITED",
6806
+ /** A breaker is open or an operator switch is off for this subject. */
6807
+ TemporarilyDisabled = "TEMPORARILY_DISABLED",
6808
+ /** No valid credential was presented. */
6809
+ Unauthenticated = "UNAUTHENTICATED",
6810
+ /** The app's own code failed while running. */
6811
+ UserCodeError = "USER_CODE_ERROR",
6812
+ /** The app's own code exceeded a per-call resource ceiling (gas, fuel, memory, depth, database operations, response size). */
6813
+ UserCodeLimitExceeded = "USER_CODE_LIMIT_EXCEEDED",
6814
+ /** The app's own code ran past the time it is allowed. */
6815
+ UserCodeTooSlow = "USER_CODE_TOO_SLOW",
6816
+ /** This app is served from another datacenter. The error extensions carry `gameApiUrl`; move there and retry. */
6817
+ WrongDatacenter = "WRONG_DATACENTER"
6818
+ }
6819
+ /** Why an invocation failed, in the only vocabulary a player may be shown: a stable code, whose problem it is, and whether repeating the identical call could succeed. It carries no message, no engine name and no internal detail by design — blame attribution is the platform's job and presentation is the game's. */
6820
+ export type PlayerFaultInfo = {
6821
+ __typename?: 'PlayerFaultInfo';
6822
+ /** Whose problem this is. The one question a game cannot answer for itself. */
6823
+ blame: UserCodeFaultBlame;
6824
+ /** A stable, enumerated reason. Branch on this rather than on any text. */
6825
+ code: PlayerFaultCode;
6826
+ /** True when repeating the identical call could succeed with nothing else changing. About the caller's options, not about how long a fix takes: an open breaker is retryable because it closes itself, while a spent plan allowance is not. */
6827
+ retryable: Scalars['Boolean']['output'];
6828
+ };
6666
6829
  /** A flexible player-owned model container confined to exactly one app, grid, and current owner. */
6667
6830
  export type PlayerModelContainer = {
6668
6831
  __typename?: 'PlayerModelContainer';
@@ -7050,6 +7213,12 @@ export type Query = {
7050
7213
  appCodeAdmissionQueue: Array<PlayerCodeAdmissionQueueEntry>;
7051
7214
  /** List an app's player-code admission entries, newest first. Requires 'view_compute_diagnostics'. By default returns active entries only; includeRevoked adds audit-visible revoked rows. Admission controls execution, never source visibility. */
7052
7215
  appCodeAdmissions: Array<AppCodeAdmission>;
7216
+ /** An app's stored compute allowance, or null when none has been set — in which case the app is measured against the platform reference allowance and is never refused. Requires app-admin ('manage_apps'). */
7217
+ appComputeBudget: Maybe<AppComputeBudgetInfo>;
7218
+ /** Whether an app is inside its per-minute compute allowance right now, which engines its units came from, and whether exceeding the allowance is currently refusing invokes or only being recorded. Shipped in shadow mode: unless an operator has set an enforcing allowance for this app, overBudget can be true while enforced is false. Requires app-admin ('manage_apps'). */
7219
+ appComputeBudgetStatus: AppComputeBudgetStatus;
7220
+ /** What an app consumed, in compute units, split by engine — the model expression engine, developer compute modules, and player compute — over a window of minutes. ONE unit spans them: a compute unit is one millisecond of measured execution time, which both engines already measure with the same clock, floored per engine by that engine's own work counter where the clock cannot see the work (fuel for WASM). Use peakMinuteUnits, not meanUnitsPerMinute, when comparing against a per-minute allowance. Requires app-admin ('manage_apps'). */
7221
+ appComputeUsage: AppComputeUsage;
7053
7222
  /** Resolve where one or more apps are placed, WITHOUT authenticating. Call this before login and connect to the returned gameApiUrl, so the session and app token are both written in the app's own datacenter instead of across a WAN. Pass every app a launcher might switch to and cache the result; placement changes rarely and only an operator can change it. An app with no placement comes back with nulls, which means 'keep using the shared origin'. */
7054
7223
  appDiscovery: Array<AppDiscovery>;
7055
7224
  /** Lists org members eligible for a manual app access grant (active members of the app's owning org). Requires the 'manage_access_tiers' permission on the app; super admins bypass. Use the returned user ids with grantAppAccess. */
@@ -7116,7 +7285,7 @@ export type Query = {
7116
7285
  computeAppDiagnostics: WasmAppDiagnostics;
7117
7286
  /** Read one compute module by name. Requires the org 'view_compute_diagnostics' permission. */
7118
7287
  computeModule: WasmModule;
7119
- /** Diagnostic log lines for an app's compute modules, newest first. Phase 1 surfaces failed-run errors; the runtime adds guest log output when modules execute. Requires the org 'view_compute_diagnostics' permission. */
7288
+ /** Diagnostic log lines for an app's compute modules, newest first: failed-run errors from the runtime plus guest ck.log output. Complete across the fleet — each line carries the instance that produced it. Requires the org 'view_compute_diagnostics' permission. */
7120
7289
  computeModuleLogs: Array<WasmModuleLogEntry>;
7121
7290
  /** Read the app's compute policy (platform defaults when unset). Requires the org 'view_compute_diagnostics' permission. */
7122
7291
  computeModulePolicy: WasmModulePolicy;
@@ -7318,6 +7487,8 @@ export type Query = {
7318
7487
  paymentEvents: PaymentEventsPage;
7319
7488
  /** Audit log of inbound payment-provider webhook events (used for idempotent reconciliation of checkouts), newest first. Restricted to super admins; requests from non-super-admins are rejected. Relay cursor connection; prefer this over the offset-based paymentEvents. */
7320
7489
  paymentEventsConnection: PaymentEventsConnection;
7490
+ /** The datacenters this deployment can create an app in. Call this before createApp and use a returned `code` as input.datacenter: the argument is REQUIRED and permanent, because an app is distributed on its app_id and all of its data lives in one datacenter for the life of the app. Requires authentication. Offer only entries with placeable=true; an empty list means no datacenter topology has been pushed here and app creation will refuse until it has. Cheap and stable — the answer changes only when the fleet does, and it is served from Citus reference tables on whichever instance answers. */
7491
+ placeableDatacenters: PlaceableDatacenters;
7321
7492
  /** Public platform discovery. Returns the shared game-api URL clients use for shared-environment apps (served by the platform shared environment). No auth required. */
7322
7493
  platformConfig: PlatformConfig;
7323
7494
  /** The caller's player-wallet auto-recharge settings (off-session card top-up before the player gate denies for funds). */
@@ -7396,6 +7567,10 @@ export type Query = {
7396
7567
  userAppStates: Array<UserAppState>;
7397
7568
  /** Lists the avatars owned by `userId`. Requires a valid game token. Owner-aware: when the caller is NOT the owner, each avatar’s `privateState` is stripped (returned null); `publicState` is always included. State blobs are base64-encoded binary. */
7398
7569
  userAvatars: Array<Avatar>;
7570
+ /** Faults grouped by engine, kind, blame and subject over a window, most frequent first. This is the health question: a count per shape answers 'what is failing and how often', which a single overwritten last_error slot never could — five prod modules read last_error = NULL while holding 4,767 lifetime watchdog terminations between them. Requires the org 'view_compute_diagnostics' permission. */
7571
+ userCodeFaultSummary: Array<UserCodeFaultSummaryEntry>;
7572
+ /** Failures of code this app's users wrote, newest first, across all three engines (model expressions, studio WASM, player WASM). Each row carries what ran, what went wrong, whose problem it is, whether retrying could help, and what the run cost against what it was allowed. Requires the org 'view_compute_diagnostics' permission. */
7573
+ userCodeFaults: Array<UserCodeFaultRecord>;
7399
7574
  /** Super admin only. Paginated user search across email, gamertag, disambiguation, and exact user_id. Relay cursor connection; prefer this over the offset-based usersPaginated. */
7400
7575
  usersConnection: UsersConnection;
7401
7576
  /** SUPER-ADMIN ONLY paginated user search; replaces the legacy `users`/`usersByGamertag`/`usersByEmail` queries. `query` is ILIKE-prefix matched against email, gamertag, and disambiguation, plus an exact user_id match. Requires a super-admin bearer game token. */
@@ -7454,6 +7629,16 @@ export type QueryAppCodeAdmissionsArgs = {
7454
7629
  appId: Scalars['BigInt']['input'];
7455
7630
  includeRevoked?: InputMaybe<Scalars['Boolean']['input']>;
7456
7631
  };
7632
+ export type QueryAppComputeBudgetArgs = {
7633
+ appId: Scalars['BigInt']['input'];
7634
+ };
7635
+ export type QueryAppComputeBudgetStatusArgs = {
7636
+ appId: Scalars['BigInt']['input'];
7637
+ };
7638
+ export type QueryAppComputeUsageArgs = {
7639
+ appId: Scalars['BigInt']['input'];
7640
+ windowMinutes?: InputMaybe<Scalars['Int']['input']>;
7641
+ };
7457
7642
  export type QueryAppDiscoveryArgs = {
7458
7643
  appIds: Array<Scalars['BigInt']['input']>;
7459
7644
  };
@@ -8019,6 +8204,20 @@ export type QueryUserAppStateArgs = {
8019
8204
  export type QueryUserAvatarsArgs = {
8020
8205
  userId: Scalars['BigInt']['input'];
8021
8206
  };
8207
+ export type QueryUserCodeFaultSummaryArgs = {
8208
+ appId: Scalars['BigInt']['input'];
8209
+ windowMinutes?: InputMaybe<Scalars['Int']['input']>;
8210
+ };
8211
+ export type QueryUserCodeFaultsArgs = {
8212
+ appId: Scalars['BigInt']['input'];
8213
+ blame?: InputMaybe<UserCodeFaultBlame>;
8214
+ engine?: InputMaybe<UserCodeFaultEngine>;
8215
+ kind?: InputMaybe<UserCodeFaultKind>;
8216
+ limit?: InputMaybe<Scalars['Int']['input']>;
8217
+ offset?: InputMaybe<Scalars['Int']['input']>;
8218
+ subject?: InputMaybe<Scalars['String']['input']>;
8219
+ windowMinutes?: InputMaybe<Scalars['Int']['input']>;
8220
+ };
8022
8221
  export type QueryUsersConnectionArgs = {
8023
8222
  after?: InputMaybe<Scalars['String']['input']>;
8024
8223
  first?: InputMaybe<Scalars['Int']['input']>;
@@ -8549,8 +8748,10 @@ export type ServerStatus = {
8549
8748
  clientSendIndividualMsgsPerSec: Maybe<Scalars['Float']['output']>;
8550
8749
  /** Messages per second sent to clients in the last reporting window. Null until reported. */
8551
8750
  clientSendMsgsPerSec: Maybe<Scalars['Float']['output']>;
8552
- /** Number of game clients currently connected to this server. serverWithLeastClients uses this to balance load across the fleet. */
8751
+ /** Number of game clients currently connected to this server. serverWithLeastClients balances on this DIVIDED BY routerThreads, not on the raw count, so that a server with four fan-out workers takes roughly four times the clients of a server with one. */
8553
8752
  clients: Scalars['Int']['output'];
8753
+ /** CPU cores available to this server. Reported by the server itself; null on a build that predates capacity reporting. Informational — client balancing divides by routerThreads, not by cores. */
8754
+ cpuCount: Maybe<Scalars['Int']['output']>;
8554
8755
  /** Peak CPU utilization percentage (0-100) observed in the last reporting window. Null until reported. */
8555
8756
  cpuPeakPct: Maybe<Scalars['Float']['output']>;
8556
8757
  /** When this server was first registered in the fleet. */
@@ -8571,6 +8772,8 @@ export type ServerStatus = {
8571
8772
  peerSendMsgsPerSec: Maybe<Scalars['Float']['output']>;
8572
8773
  /** Number of peer (server-to-server P2P) connections this server currently holds. */
8573
8774
  peers: Scalars['Int']['output'];
8775
+ /** Independent fan-out workers (RouterWorkers) on this server, which is how much of it there is for the purpose of placing a client. serverWithLeastClients divides the client count by this value. Null on a build that predates capacity reporting, and treated as 1, which balances every server equally as before. */
8776
+ routerThreads: Maybe<Scalars['Int']['output']>;
8574
8777
  /** Unique id of this game-server row in the fleet registry (the Buddy instance uuid). */
8575
8778
  serverId: Scalars['ID']['output'];
8576
8779
  /** Current lifecycle state of this server (see ServerState). Only ReadyForClients servers accept new clients. */
@@ -9619,6 +9822,110 @@ export type UserAppState = {
9619
9822
  /** Owner user id. BigInt serialized as a decimal string. */
9620
9823
  userId: Scalars['BigInt']['output'];
9621
9824
  };
9825
+ /** Whose problem a failure is. The platform attributes blame; the game decides what to render. PLATFORM means ours and a retry is reasonable; AUTHOR means the app's own code and the same call will fail the same way; BUDGET means an allowance is spent and nothing is broken. */
9826
+ export declare enum UserCodeFaultBlame {
9827
+ /** The app's own code or configuration. Repeating the call gets the same answer. */
9828
+ Author = "AUTHOR",
9829
+ /** A metered allowance for this app or caller is spent. Nothing is broken. */
9830
+ Budget = "BUDGET",
9831
+ /** Ours. The app's code is not at fault — it may not have run at all. */
9832
+ Platform = "PLATFORM"
9833
+ }
9834
+ /** Which engine ran the code that faulted: the model expression engine, studio WASM compute, or player WASM compute. */
9835
+ export declare enum UserCodeFaultEngine {
9836
+ /** The model expression engine: declarative JSON ASTs bounded by gas and a wall-clock deadline. */
9837
+ Expression = "EXPRESSION",
9838
+ /** Player WASM compute: the same compiler and sandbox at a lower trust tier, owned by a player. */
9839
+ PlayerWasm = "PLAYER_WASM",
9840
+ /** Studio WASM compute: Rust compiled by the pinned toolchain and run in a worker-thread sandbox. */
9841
+ StudioWasm = "STUDIO_WASM"
9842
+ }
9843
+ /** What went wrong, at the granularity an operator would alert on and a developer would fix. One kind per distinguishable remedy: an expression timeout and a watchdog termination are both "ran too long" and are kept apart because one rolls back a transaction and the other kills a worker thread. */
9844
+ export declare enum UserCodeFaultKind {
9845
+ BindingMismatch = "BINDING_MISMATCH",
9846
+ CallLimitExceeded = "CALL_LIMIT_EXCEEDED",
9847
+ CircuitOpen = "CIRCUIT_OPEN",
9848
+ ContractValidationFailed = "CONTRACT_VALIDATION_FAILED",
9849
+ DbOpsExceeded = "DB_OPS_EXCEEDED",
9850
+ DisabledByPolicy = "DISABLED_BY_POLICY",
9851
+ EgressBudgetExceeded = "EGRESS_BUDGET_EXCEEDED",
9852
+ ExpressionError = "EXPRESSION_ERROR",
9853
+ ExpressionTimeout = "EXPRESSION_TIMEOUT",
9854
+ FuelExhausted = "FUEL_EXHAUSTED",
9855
+ GasExhausted = "GAS_EXHAUSTED",
9856
+ HostCallFailed = "HOST_CALL_FAILED",
9857
+ InternalError = "INTERNAL_ERROR",
9858
+ MemoryExceeded = "MEMORY_EXCEEDED",
9859
+ ModuleLoadFailed = "MODULE_LOAD_FAILED",
9860
+ PlatformBusy = "PLATFORM_BUSY",
9861
+ QuotaExhausted = "QUOTA_EXHAUSTED",
9862
+ RateLimitExceeded = "RATE_LIMIT_EXCEEDED",
9863
+ ResponseTooLarge = "RESPONSE_TOO_LARGE",
9864
+ SandboxPoisoned = "SANDBOX_POISONED",
9865
+ StateWriteBudgetExceeded = "STATE_WRITE_BUDGET_EXCEEDED",
9866
+ UnknownHostFunction = "UNKNOWN_HOST_FUNCTION",
9867
+ WasmTrap = "WASM_TRAP",
9868
+ WatchdogTerminated = "WATCHDOG_TERMINATED",
9869
+ WorkerExit = "WORKER_EXIT"
9870
+ }
9871
+ /** One failure of code a user wrote, from any of the three engines. Replaces three disagreeing surfaces: a bare error string on the invoke path, a run table that recorded failures and not successes, and a last_error slot the next success cleared. */
9872
+ export type UserCodeFaultRecord = {
9873
+ __typename?: 'UserCodeFaultRecord';
9874
+ /** The user the work ran on behalf of, when there was one. */
9875
+ actingUserId: Maybe<Scalars['BigInt']['output']>;
9876
+ /** The app (tenant) the fault occurred in. */
9877
+ appId: Scalars['BigInt']['output'];
9878
+ /** Whose problem this is. Stored rather than derived from kind, because the same kind can have a different owner given context — which is what platform saturation reported as an author timeout cost us. */
9879
+ blame: UserCodeFaultBlame;
9880
+ /** The wall-clock budget it was given, in microseconds. Stored beside durationUs rather than as a ratio: 249ms against a 250ms budget and 249ms against a 2000ms budget are different bugs. */
9881
+ budgetUs: Maybe<Scalars['String']['output']>;
9882
+ /** Operator-facing detail, for the developer who owns the app. Never shown to a player. */
9883
+ detail: Maybe<Scalars['String']['output']>;
9884
+ /** Wall-clock microseconds the work consumed before it faulted. */
9885
+ durationUs: Maybe<Scalars['String']['output']>;
9886
+ /** Which engine ran the code. */
9887
+ engine: UserCodeFaultEngine;
9888
+ /** The entry point that started the work: player_invoke, automation, system, tick, invoke, event, init. */
9889
+ entryPoint: Maybe<Scalars['String']['output']>;
9890
+ /** Unique fault id. */
9891
+ faultId: Scalars['String']['output'];
9892
+ /** Correlation id shared with gm_event_log, gm_automation_runs and wasm_module_runs; pass it to gameModelFlow for the whole timeline. */
9893
+ flowId: Maybe<Scalars['String']['output']>;
9894
+ /** The grid, when the faulting code belonged to one (player WASM). */
9895
+ gridId: Maybe<Scalars['BigInt']['output']>;
9896
+ /** Which ck-api instance observed the fault. A fault that only ever appears on one instance is a different bug from one the fleet shares. */
9897
+ instanceId: Maybe<Scalars['String']['output']>;
9898
+ /** What went wrong. */
9899
+ kind: UserCodeFaultKind;
9900
+ /** When the fault was recorded. */
9901
+ occurredAt: Scalars['DateTime']['output'];
9902
+ /** Whether repeating the identical call could succeed with nothing else changing. This is what a game reads to choose between retrying and telling the player it is broken. */
9903
+ retryable: Scalars['Boolean']['output'];
9904
+ /** Mutation steps or host calls completed before the fault. This is what distinguishes "never started" from "died on step nine". */
9905
+ stepsCompleted: Maybe<Scalars['Int']['output']>;
9906
+ /** What ran: the function name for the expression engine, the module name for either WASM engine. */
9907
+ subject: Scalars['String']['output'];
9908
+ /** Budget units granted, in the same units as unitsUsed. */
9909
+ unitsLimit: Maybe<Scalars['String']['output']>;
9910
+ /** Budget units consumed — expression-engine gas or WASM fuel. Named neutrally so a developer using both engines can compare them. */
9911
+ unitsUsed: Maybe<Scalars['String']['output']>;
9912
+ };
9913
+ /** Faults grouped by engine, kind and blame over a window — the shape to alert on, and the answer to "is this us or them". */
9914
+ export type UserCodeFaultSummaryEntry = {
9915
+ __typename?: 'UserCodeFaultSummaryEntry';
9916
+ /** Whose problem it is. */
9917
+ blame: UserCodeFaultBlame;
9918
+ /** Which engine. */
9919
+ engine: UserCodeFaultEngine;
9920
+ /** How many faults of this shape in the window. */
9921
+ faults: Scalars['Int']['output'];
9922
+ /** What went wrong. */
9923
+ kind: UserCodeFaultKind;
9924
+ /** The most recent one. */
9925
+ lastAt: Scalars['DateTime']['output'];
9926
+ /** What ran. */
9927
+ subject: Scalars['String']['output'];
9928
+ };
9622
9929
  export type UserDonationData = {
9623
9930
  __typename?: 'UserDonationData';
9624
9931
  /** ISO currency code for the total, e.g. "usd". */
@@ -9997,7 +10304,7 @@ export type WasmModule = {
9997
10304
  description: Maybe<Scalars['String']['output']>;
9998
10305
  /** Whether the module may run. New modules start disabled; enable after a successful compile. */
9999
10306
  enabled: Scalars['Boolean']['output'];
10000
- /** Last error recorded for this module. */
10307
+ /** The single most recent error string, overwritten by each new failure and CLEARED by the next success — so a module that fails intermittently reports null between failures. Do not read this as a health signal: use userCodeFaultSummary, which keeps every fault with its kind and blame. Kept for the "what went wrong just now" case it is genuinely good at. */
10001
10308
  lastError: Maybe<Scalars['String']['output']>;
10002
10309
  /** Unique module id (UUID). */
10003
10310
  moduleId: Scalars['String']['output'];
@@ -10009,6 +10316,8 @@ export type WasmModule = {
10009
10316
  /** A diagnostic log line for a compute module. Phase 1 surfaces failed-run errors; the Phase 2 runtime adds guest ck.log output. */
10010
10317
  export type WasmModuleLogEntry = {
10011
10318
  __typename?: 'WasmModuleLogEntry';
10319
+ /** Which ck-api instance produced the line. Null for runtime error lines, which are read back from the run table rather than attributed to an instance. Present on guest ck.log lines, which used to be served from the answering replica's memory and so silently excluded every other instance's output. */
10320
+ instanceId: Maybe<Scalars['String']['output']>;
10012
10321
  /** Log level: debug | info | warn | error. */
10013
10322
  level: Scalars['String']['output'];
10014
10323
  /** The log message. */
@@ -10056,7 +10365,7 @@ export type WasmModulePolicy = {
10056
10365
  /** Minimum gap in milliseconds between saves of a module’s state. Saves made inside the window are combined and the newest one is written, so a module that saves every tick still only writes once per window. */
10057
10366
  statePersistMinIntervalMs: Scalars['Int']['output'];
10058
10367
  };
10059
- /** One recorded compute execution (init / tick batch / event / invoke): timing, fuel, host-call counts, outcome. Written by the runtime (Phase 2); empty until modules execute. */
10368
+ /** One recorded compute execution: timing, fuel, host-call counts, outcome. NOT a sample of all executions — a successful tick is deliberately not recorded here, because ticks are high-frequency and aggregate into per-minute usage instead, so this table holds every failure plus demand-driven runs plus the reload that follows a terminated worker. Counting rows here to get a success rate gives roughly 50% against a true 0.1-1.6%; computeModuleStats and computeAppDiagnostics read the per-minute rollups for that. Use this for what happened on an individual run and for flow correlation. */
10060
10369
  export type WasmModuleRun = {
10061
10370
  __typename?: 'WasmModuleRun';
10062
10371
  /** The app (tenant). */
@@ -10911,6 +11220,26 @@ export type MyAppsQuery = {
10911
11220
  } | null;
10912
11221
  }>;
10913
11222
  };
11223
+ export type PlaceableDatacentersQueryVariables = Exact<{
11224
+ [key: string]: never;
11225
+ }>;
11226
+ export type PlaceableDatacentersQuery = {
11227
+ __typename?: 'Query';
11228
+ placeableDatacenters: {
11229
+ __typename?: 'PlaceableDatacenters';
11230
+ placementEnforced: boolean;
11231
+ servedBy: string | null;
11232
+ datacenters: Array<{
11233
+ __typename?: 'PlaceableDatacenter';
11234
+ code: string;
11235
+ placeable: boolean;
11236
+ serving: DatacenterServingStatus;
11237
+ appShardCount: number;
11238
+ gameApiUrl: string | null;
11239
+ gameApiWsUrl: string | null;
11240
+ }>;
11241
+ };
11242
+ };
10914
11243
  export type SetAppVisibilityMutationVariables = Exact<{
10915
11244
  appId: Scalars['BigInt']['input'];
10916
11245
  visibility: AppVisibility;
@@ -15471,6 +15800,12 @@ export type GmInvokeResultFieldsFragment = {
15471
15800
  success: boolean;
15472
15801
  returnValueJson: string | null;
15473
15802
  errorMessage: string | null;
15803
+ fault: {
15804
+ __typename?: 'PlayerFaultInfo';
15805
+ code: PlayerFaultCode;
15806
+ blame: UserCodeFaultBlame;
15807
+ retryable: boolean;
15808
+ } | null;
15474
15809
  mutationsApplied: Array<{
15475
15810
  __typename?: 'GmMutationApplied';
15476
15811
  containerId: string;
@@ -15600,6 +15935,12 @@ export type GameModelInvokeMutation = {
15600
15935
  success: boolean;
15601
15936
  returnValueJson: string | null;
15602
15937
  errorMessage: string | null;
15938
+ fault: {
15939
+ __typename?: 'PlayerFaultInfo';
15940
+ code: PlayerFaultCode;
15941
+ blame: UserCodeFaultBlame;
15942
+ retryable: boolean;
15943
+ } | null;
15603
15944
  mutationsApplied: Array<{
15604
15945
  __typename?: 'GmMutationApplied';
15605
15946
  containerId: string;
@@ -18736,6 +19077,9 @@ export type GameClientBootstrapQuery = {
18736
19077
  gameClientBootstrap: {
18737
19078
  __typename?: 'GameClientBootstrap';
18738
19079
  appId: string;
19080
+ gameApiUrl: string | null;
19081
+ gameApiWsUrl: string | null;
19082
+ discoveryUrl: string | null;
18739
19083
  realtimeProtocol: string;
18740
19084
  subscriptionName: string;
18741
19085
  maxReplicationDistance: number;
@@ -20196,6 +20540,7 @@ export declare const CreateAppDocument: DocumentNode<CreateAppMutation, CreateAp
20196
20540
  export declare const MarketplaceAppsDocument: DocumentNode<MarketplaceAppsQuery, MarketplaceAppsQueryVariables>;
20197
20541
  export declare const AppsConnectionDocument: DocumentNode<AppsConnectionQuery, AppsConnectionQueryVariables>;
20198
20542
  export declare const MyAppsDocument: DocumentNode<MyAppsQuery, MyAppsQueryVariables>;
20543
+ export declare const PlaceableDatacentersDocument: DocumentNode<PlaceableDatacentersQuery, PlaceableDatacentersQueryVariables>;
20199
20544
  export declare const SetAppVisibilityDocument: DocumentNode<SetAppVisibilityMutation, SetAppVisibilityMutationVariables>;
20200
20545
  export declare const UpdateAppDocument: DocumentNode<UpdateAppMutation, UpdateAppMutationVariables>;
20201
20546
  export declare const LogoutDocument: DocumentNode<LogoutMutation, LogoutMutationVariables>;