@crowdedkingdoms/crowdyjs 8.5.0 → 8.7.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.
Files changed (43) hide show
  1. package/MIGRATION.md +66 -0
  2. package/README.md +3 -2
  3. package/dist/crowdy-client.d.ts +3 -0
  4. package/dist/crowdy-client.d.ts.map +1 -1
  5. package/dist/crowdy-client.js +3 -0
  6. package/dist/domains/compute.d.ts +175 -0
  7. package/dist/domains/compute.d.ts.map +1 -0
  8. package/dist/domains/compute.js +232 -0
  9. package/dist/generated/graphql.d.ts +893 -1
  10. package/dist/generated/graphql.d.ts.map +1 -1
  11. package/dist/generated/graphql.js +22 -0
  12. package/dist/index.d.ts +3 -2
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +3 -2
  15. package/dist/kit/combat.d.ts +38 -1
  16. package/dist/kit/combat.d.ts.map +1 -1
  17. package/dist/kit/combat.js +45 -1
  18. package/dist/kit/engine.d.ts +43 -0
  19. package/dist/kit/engine.d.ts.map +1 -0
  20. package/dist/kit/engine.js +108 -0
  21. package/dist/kit/index.d.ts +7 -3
  22. package/dist/kit/index.d.ts.map +1 -1
  23. package/dist/kit/index.js +5 -1
  24. package/dist/kit/kit.d.ts +15 -1
  25. package/dist/kit/kit.d.ts.map +1 -1
  26. package/dist/kit/kit.js +9 -3
  27. package/dist/kit/mobs.d.ts +90 -0
  28. package/dist/kit/mobs.d.ts.map +1 -0
  29. package/dist/kit/mobs.js +98 -0
  30. package/dist/kit/npcs.d.ts +38 -1
  31. package/dist/kit/npcs.d.ts.map +1 -1
  32. package/dist/kit/npcs.js +36 -1
  33. package/dist/kit/pets.d.ts +85 -0
  34. package/dist/kit/pets.d.ts.map +1 -0
  35. package/dist/kit/pets.js +96 -0
  36. package/dist/kit/social.d.ts.map +1 -1
  37. package/dist/kit/wire.d.ts +87 -0
  38. package/dist/kit/wire.d.ts.map +1 -0
  39. package/dist/kit/wire.js +156 -0
  40. package/dist/kit/worldsim.d.ts +34 -1
  41. package/dist/kit/worldsim.d.ts.map +1 -1
  42. package/dist/kit/worldsim.js +38 -1
  43. package/package.json +1 -1
@@ -1344,6 +1344,18 @@ export type CompleteLoginLinkInput = {
1344
1344
  /** The one-time token from the magic-link URL. */
1345
1345
  token: Scalars['String']['input'];
1346
1346
  };
1347
+ /** The synchronous result of a computeInvoke call. Unlike the spatial send surface (dual-success), this is direct RPC: the module ran and this is its output. */
1348
+ export type ComputeInvokeResult = {
1349
+ __typename?: 'ComputeInvokeResult';
1350
+ /** Wall-clock duration in microseconds. */
1351
+ durationUs: Scalars['Int']['output'];
1352
+ /** Fuel consumed by the call. */
1353
+ fuelUsed: Scalars['BigInt']['output'];
1354
+ /** The module's raw response bytes, base64-encoded. */
1355
+ resultBase64: Scalars['String']['output'];
1356
+ /** The response decoded as JSON text when it parses as JSON; null otherwise. */
1357
+ resultJson: Maybe<Scalars['String']['output']>;
1358
+ };
1347
1359
  /** Relay-style pagination metadata for a connection. */
1348
1360
  export type ConnectionPageInfo = {
1349
1361
  __typename?: 'ConnectionPageInfo';
@@ -1880,6 +1892,19 @@ export type DeleteGridResponse = {
1880
1892
  /** The deleted grid id on success; null when `error` is non-zero. */
1881
1893
  gridId: Maybe<Scalars['BigInt']['output']>;
1882
1894
  };
1895
+ /** Upload a new immutable source version of a module. The source is validated (size caps, crate allowlist, no build-time code) and parked as compile_status=pending until an instance compiles it. */
1896
+ export type DeployComputeVersionInput = {
1897
+ /** The guest ABI version the source targets (must be platform-supported; currently 0). */
1898
+ abiVersion: Scalars['Int']['input'];
1899
+ /** The app (tenant) that owns the module. */
1900
+ appId: Scalars['BigInt']['input'];
1901
+ /** The module (by name) this version belongs to. */
1902
+ moduleName: Scalars['String']['input'];
1903
+ /** The crowdy-compute-sdk version the source targets (must be a platform-supported version, e.g. '0.0.1'). */
1904
+ sdkVersion: Scalars['String']['input'];
1905
+ /** JSON object mapping relative paths to file contents. Must include Cargo.toml and src/lib.rs; only .rs files under src/ plus Cargo.toml are allowed. Dependencies are restricted to the platform crate allowlist; build.rs and [build-dependencies] are rejected. */
1906
+ sourceFilesJson: Scalars['String']['input'];
1907
+ };
1883
1908
  export type DestroyEnvironmentInput = {
1884
1909
  /** Optional idempotency key. Recommended for retries: replaying with the same key and identical input returns the first result instead of re-applying; the same key with different input returns IDEMPOTENCY_CONFLICT. Keys expire after 24h. */
1885
1910
  idempotencyKey?: InputMaybe<Scalars['String']['input']>;
@@ -3062,6 +3087,22 @@ export type Mutation = {
3062
3087
  claimFreeAppAccess: AppUserAccess;
3063
3088
  /** 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. */
3064
3089
  completeLoginLink: AuthResponse;
3090
+ /** 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. */
3091
+ computeDeleteModule: Scalars['Boolean']['output'];
3092
+ /** Delete a compute-module trigger by id. Returns true when a trigger was deleted. Requires the org 'manage_compute' permission. */
3093
+ computeDeleteTrigger: Scalars['Boolean']['output'];
3094
+ /** Upload a new immutable source version of a compute module and make it the deployed version. The source map is validated (Cargo.toml + src/*.rs only, size caps, platform crate allowlist, no build-time code) and parked as compile_status=pending; a game-api instance compiles it before it can run. Requires the org 'manage_compute' permission. */
3095
+ computeDeployVersion: WasmModuleVersion;
3096
+ /** Invoke a compute module's client-callable export (a trigger with triggerType=invoke). Synchronous RPC: the module runs and returns its result directly (unlike the spatial send surface's dual-success model). Authorization: the export's invoke policy (authority tree) — or holders of 'manage_compute' only when no policy is set. Requires a valid app token. */
3097
+ computeInvoke: ComputeInvokeResult;
3098
+ /** Enable or disable a compute module. Enabling requires a deployed version and resets the module's circuit breaker; disabling stops all scheduling. Requires the org 'manage_compute' permission. */
3099
+ computeSetModuleEnabled: WasmModule;
3100
+ /** Set the app's compute policy (platform guardrails): the kill switch, module count / tick-rate / fuel / memory / runtime / host-op / egress ceilings, and circuit-breaker tuning. Omitted fields keep current values. Requires the org 'manage_compute' permission. */
3101
+ computeSetPolicy: WasmModulePolicy;
3102
+ /** Create or update a WASM compute module (metadata only). Modules hold developer-authored Rust compiled to sandboxed WASM on game-api instances; upload source with computeDeployVersion. New modules start disabled. Upsert key is (app, name). Requires the org 'manage_compute' permission. */
3103
+ computeUpsertModule: WasmModule;
3104
+ /** Bind a trigger to a compute module: a tick loop (tickHz, clamped by policy), an event subscription (model or compute events), or a client-invokable export (with an optional invoke policy). Requires the org 'manage_compute' permission. */
3105
+ computeUpsertTrigger: WasmModuleTrigger;
3065
3106
  /** Confirms a user email address using the token from the confirmation email (also enables password sign-in for the account). Returns true on success, false if the token is invalid or expired. Public (the token authorizes the call). */
3066
3107
  confirmEmail: Scalars['Boolean']['output'];
3067
3108
  /** Open the UDP proxy session for this game token (idempotent: returns the existing status if one is already open). Binds a socket and selects the game server with the fewest clients on first open. Optional: send mutations and udpNotifications also create a session lazily when none exists. To force a fresh socket, call disconnectUdpProxy first. */
@@ -3154,7 +3195,7 @@ export type Mutation = {
3154
3195
  gameModelDeletePropertyDef: Scalars['Boolean']['output'];
3155
3196
  /** 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'). */
3156
3197
  gameModelGrantTierFeature: GmTierFeature;
3157
- /** 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). This is the primary, safe way for players to mutate game state. Requires a valid token; only player-scope functions are invocable here. */
3198
+ /** 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. */
3158
3199
  gameModelInvoke: GmInvokeResult;
3159
3200
  /** Join an existing session as a participant, optionally with a role. Requires a valid token and app access. */
3160
3201
  gameModelJoinSession: GmSessionParticipant;
@@ -3418,6 +3459,37 @@ export type MutationClaimFreeAppAccessArgs = {
3418
3459
  export type MutationCompleteLoginLinkArgs = {
3419
3460
  input: CompleteLoginLinkInput;
3420
3461
  };
3462
+ export type MutationComputeDeleteModuleArgs = {
3463
+ appId: Scalars['BigInt']['input'];
3464
+ name: Scalars['String']['input'];
3465
+ };
3466
+ export type MutationComputeDeleteTriggerArgs = {
3467
+ appId: Scalars['BigInt']['input'];
3468
+ triggerId: Scalars['String']['input'];
3469
+ };
3470
+ export type MutationComputeDeployVersionArgs = {
3471
+ input: DeployComputeVersionInput;
3472
+ };
3473
+ export type MutationComputeInvokeArgs = {
3474
+ appId: Scalars['BigInt']['input'];
3475
+ exportName: Scalars['String']['input'];
3476
+ moduleName: Scalars['String']['input'];
3477
+ paramsJson?: InputMaybe<Scalars['String']['input']>;
3478
+ };
3479
+ export type MutationComputeSetModuleEnabledArgs = {
3480
+ appId: Scalars['BigInt']['input'];
3481
+ enabled: Scalars['Boolean']['input'];
3482
+ name: Scalars['String']['input'];
3483
+ };
3484
+ export type MutationComputeSetPolicyArgs = {
3485
+ input: SetComputePolicyInput;
3486
+ };
3487
+ export type MutationComputeUpsertModuleArgs = {
3488
+ input: UpsertComputeModuleInput;
3489
+ };
3490
+ export type MutationComputeUpsertTriggerArgs = {
3491
+ input: UpsertComputeTriggerInput;
3492
+ };
3421
3493
  export type MutationConfirmEmailArgs = {
3422
3494
  token: Scalars['String']['input'];
3423
3495
  };
@@ -4400,6 +4472,24 @@ export type Query = {
4400
4472
  checkouts: CheckoutsPage;
4401
4473
  /** Cross-tenant payments audit across all users, orgs, and apps (newest first), with optional filtering. Restricted to super admins; requests from non-super-admins are rejected. For a caller's own history use `myCheckoutsConnection` instead. Relay cursor connection; prefer this over the offset-based checkouts. */
4402
4474
  checkoutsConnection: CheckoutsConnection;
4475
+ /** A snapshot of an app's compute footprint: module/version/trigger counts plus 24h run activity and the most-active modules. Requires the org 'view_compute_diagnostics' permission. */
4476
+ computeAppDiagnostics: WasmAppDiagnostics;
4477
+ /** Read one compute module by name. Requires the org 'view_compute_diagnostics' permission. */
4478
+ computeModule: WasmModule;
4479
+ /** 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. */
4480
+ computeModuleLogs: Array<WasmModuleLogEntry>;
4481
+ /** Read the app's compute policy (platform defaults when unset). Requires the org 'view_compute_diagnostics' permission. */
4482
+ computeModulePolicy: WasmModulePolicy;
4483
+ /** List compute-module runs (the monitoring + audit trail of executions), newest first, optionally filtered by module and/or outcome. Rows are written by the runtime; empty until modules execute (Phase 2). Requires the org 'view_compute_diagnostics' permission. */
4484
+ computeModuleRuns: Array<WasmModuleRun>;
4485
+ /** Aggregate compute activity for an app over a recent window: run/failure counts, fuel, egress, and a per-module breakdown. Requires the org 'view_compute_diagnostics' permission. */
4486
+ computeModuleStats: WasmComputeStats;
4487
+ /** List trigger bindings for an app, optionally filtered to one module. Requires the org 'view_compute_diagnostics' permission. */
4488
+ computeModuleTriggers: Array<WasmModuleTrigger>;
4489
+ /** List a module's source versions, newest first, including compile status/logs. Requires the org 'view_compute_diagnostics' permission. */
4490
+ computeModuleVersions: Array<WasmModuleVersion>;
4491
+ /** List the compute modules defined for an app. Requires the org 'view_compute_diagnostics' permission. */
4492
+ computeModules: Array<WasmModule>;
4403
4493
  /** Operator only (is_operator). Most recent operator audit entries, newest first, optionally filtered by environment. */
4404
4494
  cpAudit: Array<CpAuditEntry>;
4405
4495
  /** Operator only (is_operator). One change order with its tasks and steps. Null when the id is not found. */
@@ -4760,6 +4850,44 @@ export type QueryCheckoutsConnectionArgs = {
4760
4850
  filter?: InputMaybe<CheckoutFilterInput>;
4761
4851
  first?: InputMaybe<Scalars['Int']['input']>;
4762
4852
  };
4853
+ export type QueryComputeAppDiagnosticsArgs = {
4854
+ appId: Scalars['BigInt']['input'];
4855
+ };
4856
+ export type QueryComputeModuleArgs = {
4857
+ appId: Scalars['BigInt']['input'];
4858
+ name: Scalars['String']['input'];
4859
+ };
4860
+ export type QueryComputeModuleLogsArgs = {
4861
+ appId: Scalars['BigInt']['input'];
4862
+ limit?: InputMaybe<Scalars['Int']['input']>;
4863
+ moduleName?: InputMaybe<Scalars['String']['input']>;
4864
+ };
4865
+ export type QueryComputeModulePolicyArgs = {
4866
+ appId: Scalars['BigInt']['input'];
4867
+ };
4868
+ export type QueryComputeModuleRunsArgs = {
4869
+ appId: Scalars['BigInt']['input'];
4870
+ limit?: InputMaybe<Scalars['Int']['input']>;
4871
+ moduleName?: InputMaybe<Scalars['String']['input']>;
4872
+ offset?: InputMaybe<Scalars['Int']['input']>;
4873
+ success?: InputMaybe<Scalars['Boolean']['input']>;
4874
+ };
4875
+ export type QueryComputeModuleStatsArgs = {
4876
+ appId: Scalars['BigInt']['input'];
4877
+ windowMinutes?: InputMaybe<Scalars['Int']['input']>;
4878
+ };
4879
+ export type QueryComputeModuleTriggersArgs = {
4880
+ appId: Scalars['BigInt']['input'];
4881
+ moduleName?: InputMaybe<Scalars['String']['input']>;
4882
+ };
4883
+ export type QueryComputeModuleVersionsArgs = {
4884
+ appId: Scalars['BigInt']['input'];
4885
+ limit?: InputMaybe<Scalars['Int']['input']>;
4886
+ moduleName: Scalars['String']['input'];
4887
+ };
4888
+ export type QueryComputeModulesArgs = {
4889
+ appId: Scalars['BigInt']['input'];
4890
+ };
4763
4891
  export type QueryCpAuditArgs = {
4764
4892
  environmentId?: InputMaybe<Scalars['String']['input']>;
4765
4893
  limit?: Scalars['Int']['input'];
@@ -5539,6 +5667,35 @@ export type SetChannelPolicyInput = {
5539
5667
  /** Optional cap on members per channel (null = unlimited). */
5540
5668
  maxMembers?: InputMaybe<Scalars['Int']['input']>;
5541
5669
  };
5670
+ /** Set the per-app compute policy (guardrails / platform ceilings). Omitted fields keep their current (or default) values. */
5671
+ export type SetComputePolicyInput = {
5672
+ /** The app (tenant). */
5673
+ appId: Scalars['BigInt']['input'];
5674
+ /** Cooldown (ms) while a module circuit is open. */
5675
+ cooldownMs?: InputMaybe<Scalars['Int']['input']>;
5676
+ /** App-wide kill switch for all compute modules. */
5677
+ enabled?: InputMaybe<Scalars['Boolean']['input']>;
5678
+ /** Consecutive failures that open a module circuit. */
5679
+ failureThreshold?: InputMaybe<Scalars['Int']['input']>;
5680
+ /** Fuel budget per invoke/event call. */
5681
+ fuelPerInvoke?: InputMaybe<Scalars['BigInt']['input']>;
5682
+ /** Fuel budget per tick call. */
5683
+ fuelPerTick?: InputMaybe<Scalars['BigInt']['input']>;
5684
+ /** Max host data-API operations per tick. */
5685
+ maxDbOpsPerTick?: InputMaybe<Scalars['Int']['input']>;
5686
+ /** Max replication bytes a module may emit per minute. */
5687
+ maxEgressBytesPerMin?: InputMaybe<Scalars['BigInt']['input']>;
5688
+ /** Max replication messages a module may emit per minute. */
5689
+ maxEgressMsgsPerMin?: InputMaybe<Scalars['Int']['input']>;
5690
+ /** Max guest linear memory (MB). */
5691
+ maxMemoryMb?: InputMaybe<Scalars['Int']['input']>;
5692
+ /** Max modules the app may define. */
5693
+ maxModules?: InputMaybe<Scalars['Int']['input']>;
5694
+ /** Wall-clock watchdog budget per entry call (ms). */
5695
+ maxRunMs?: InputMaybe<Scalars['Int']['input']>;
5696
+ /** Max tick rate (Hz) any module may request. */
5697
+ maxTickHz?: InputMaybe<Scalars['Float']['input']>;
5698
+ };
5542
5699
  /** Set one property value on a container directly. */
5543
5700
  export type SetContainerPropertyInput = {
5544
5701
  /** The app (tenant) that owns the container. */
@@ -6056,6 +6213,44 @@ export type UpsertAutomationTriggerInput = {
6056
6213
  /** Filter: only this property key. */
6057
6214
  propertyKey?: InputMaybe<Scalars['String']['input']>;
6058
6215
  };
6216
+ /** Create or update a WASM compute module (metadata only; source is uploaded with computeDeployVersion). Upsert key is (app, name). */
6217
+ export type UpsertComputeModuleInput = {
6218
+ /** Run without active players (world simulation). Policy-gated; defaults to false. */
6219
+ alwaysOn?: InputMaybe<Scalars['Boolean']['input']>;
6220
+ /** The app (tenant) that owns the module. */
6221
+ appId: Scalars['BigInt']['input'];
6222
+ /** Optional description. */
6223
+ description?: InputMaybe<Scalars['String']['input']>;
6224
+ /** Module name (unique per app, lowercase crate-style: [a-z][a-z0-9_-]*). The upsert key. */
6225
+ name: Scalars['String']['input'];
6226
+ };
6227
+ /** Bind a trigger to a module: a tick loop (tick_hz), a model/compute event subscription, or a client-invokable export. */
6228
+ export type UpsertComputeTriggerInput = {
6229
+ /** The app (tenant). */
6230
+ appId: Scalars['BigInt']['input'];
6231
+ /** Event filter: only this container type. */
6232
+ containerTypeName?: InputMaybe<Scalars['String']['input']>;
6233
+ /** Debounce/coalesce window in ms for event triggers. */
6234
+ debounceMs?: InputMaybe<Scalars['Int']['input']>;
6235
+ /** Event filter: only compute events with this name (on_event=compute_event). */
6236
+ eventName?: InputMaybe<Scalars['String']['input']>;
6237
+ /** For invoke triggers: the exported guest function name computeInvoke routes to. */
6238
+ exportName?: InputMaybe<Scalars['String']['input']>;
6239
+ /** Event filter: only this model function name. */
6240
+ functionName?: InputMaybe<Scalars['String']['input']>;
6241
+ /** For invoke triggers: JSON authority tree gating who may invoke (same shape as game-model function invoke policies). Null = app admins only. */
6242
+ invokePolicyJson?: InputMaybe<Scalars['String']['input']>;
6243
+ /** The module (by name) this trigger drives. */
6244
+ moduleName: Scalars['String']['input'];
6245
+ /** For event triggers: function_invoked | property_changed | container_created | compute_event. */
6246
+ onEvent?: InputMaybe<Scalars['String']['input']>;
6247
+ /** Event filter: only this property key. */
6248
+ propertyKey?: InputMaybe<Scalars['String']['input']>;
6249
+ /** For tick triggers: the tick rate in Hz (clamped by the app policy's maxTickHz). */
6250
+ tickHz?: InputMaybe<Scalars['Float']['input']>;
6251
+ /** Trigger type: tick | event | invoke. */
6252
+ triggerType: Scalars['String']['input'];
6253
+ };
6059
6254
  /** Create or update a container type (schema for a kind of entity). */
6060
6255
  export type UpsertContainerTypeInput = {
6061
6256
  /** The app (tenant) that owns the type. */
@@ -6492,6 +6687,246 @@ export type WalletTransactionsConnection = {
6492
6687
  /** Total matching records across all pages, when known (null for sources that do not compute a total). */
6493
6688
  totalCount: Maybe<Scalars['Int']['output']>;
6494
6689
  };
6690
+ /** A snapshot of an app's compute footprint: module/version/trigger counts plus recent run activity. Helps developers understand what compute is deployed and doing. */
6691
+ export type WasmAppDiagnostics = {
6692
+ __typename?: 'WasmAppDiagnostics';
6693
+ /** The app (tenant). */
6694
+ appId: Scalars['BigInt']['output'];
6695
+ /** Modules currently enabled. */
6696
+ enabledModuleCount: Scalars['Int']['output'];
6697
+ /** Failed runs in the last 24h. */
6698
+ failedRuns24h: Scalars['Int']['output'];
6699
+ /** Fuel consumed in the last 24h. */
6700
+ fuelUsed24h: Scalars['BigInt']['output'];
6701
+ /** Modules defined. */
6702
+ moduleCount: Scalars['Int']['output'];
6703
+ /** Runs in the last 24h. */
6704
+ runs24h: Scalars['Int']['output'];
6705
+ /** Most-active modules in the last 24h. */
6706
+ topModules: Array<WasmTopModule>;
6707
+ /** Trigger bindings defined. */
6708
+ triggerCount: Scalars['Int']['output'];
6709
+ /** Source versions uploaded (all modules). */
6710
+ versionCount: Scalars['Int']['output'];
6711
+ };
6712
+ /** Per-module rollup within a stats window. */
6713
+ export type WasmComputeStat = {
6714
+ __typename?: 'WasmComputeStat';
6715
+ /** Average run duration (microseconds). */
6716
+ avgDurationUs: Scalars['Int']['output'];
6717
+ /** Current circuit-breaker state: closed | open | half_open. */
6718
+ circuitState: Scalars['String']['output'];
6719
+ /** Failed runs in the window. */
6720
+ failures: Scalars['Int']['output'];
6721
+ /** Total fuel consumed. */
6722
+ fuelUsed: Scalars['BigInt']['output'];
6723
+ /** The module name. */
6724
+ moduleName: Scalars['String']['output'];
6725
+ /** Runs in the window. */
6726
+ runs: Scalars['Int']['output'];
6727
+ };
6728
+ /** Aggregate compute activity for an app over a recent window: throughput, failure rate, fuel, egress, and a per-module breakdown. */
6729
+ export type WasmComputeStats = {
6730
+ __typename?: 'WasmComputeStats';
6731
+ /** Average run duration in microseconds. */
6732
+ avgDurationUs: Scalars['Int']['output'];
6733
+ /** Per-module breakdown. */
6734
+ byModule: Array<WasmComputeStat>;
6735
+ /** Failed runs in the window. */
6736
+ failedRuns: Scalars['Int']['output'];
6737
+ /** Failure rate as a percentage (0-100). */
6738
+ failureRatePct: Scalars['Float']['output'];
6739
+ /** Total replication messages emitted in the window. */
6740
+ totalEgressMsgs: Scalars['BigInt']['output'];
6741
+ /** Total fuel consumed in the window. */
6742
+ totalFuelUsed: Scalars['BigInt']['output'];
6743
+ /** Total runs in the window. */
6744
+ totalRuns: Scalars['Int']['output'];
6745
+ /** The window size in minutes. */
6746
+ windowMinutes: Scalars['Int']['output'];
6747
+ };
6748
+ /** A WASM compute module: developer-authored Rust compiled to sandboxed WASM on game-api instances. Holds metadata, the deployed version pointer, and circuit-breaker state; source lives in versions. */
6749
+ export type WasmModule = {
6750
+ __typename?: 'WasmModule';
6751
+ /** Whether the module runs without active players (world simulation). Policy-gated. */
6752
+ alwaysOn: Scalars['Boolean']['output'];
6753
+ /** The app (tenant) that owns the module. */
6754
+ appId: Scalars['BigInt']['output'];
6755
+ /** Circuit-breaker state: closed | open | half_open. */
6756
+ circuitState: Scalars['String']['output'];
6757
+ /** Current consecutive-failure count. */
6758
+ consecutiveFailures: Scalars['Int']['output'];
6759
+ /** When the open circuit may retry (half-open). */
6760
+ cooldownUntil: Maybe<Scalars['DateTime']['output']>;
6761
+ /** When the module was created. */
6762
+ createdAt: Scalars['DateTime']['output'];
6763
+ /** The deployed version id (UUID). Null until first deploy. */
6764
+ currentVersionId: Maybe<Scalars['String']['output']>;
6765
+ /** Optional description. */
6766
+ description: Maybe<Scalars['String']['output']>;
6767
+ /** Whether the module may run. New modules start disabled; enable after a successful compile. */
6768
+ enabled: Scalars['Boolean']['output'];
6769
+ /** Last error recorded for this module. */
6770
+ lastError: Maybe<Scalars['String']['output']>;
6771
+ /** Unique module id (UUID). */
6772
+ moduleId: Scalars['String']['output'];
6773
+ /** Module name (unique per app); the upsert key. */
6774
+ name: Scalars['String']['output'];
6775
+ /** When the module was last updated. */
6776
+ updatedAt: Scalars['DateTime']['output'];
6777
+ };
6778
+ /** A diagnostic log line for a compute module. Phase 1 surfaces failed-run errors; the Phase 2 runtime adds guest ck.log output. */
6779
+ export type WasmModuleLogEntry = {
6780
+ __typename?: 'WasmModuleLogEntry';
6781
+ /** Log level: debug | info | warn | error. */
6782
+ level: Scalars['String']['output'];
6783
+ /** The log message. */
6784
+ message: Scalars['String']['output'];
6785
+ /** The module name. */
6786
+ moduleName: Scalars['String']['output'];
6787
+ /** The entry that produced the line: init | tick | event | invoke. */
6788
+ triggerSource: Maybe<Scalars['String']['output']>;
6789
+ /** When the line was recorded. */
6790
+ ts: Scalars['DateTime']['output'];
6791
+ };
6792
+ /** Per-app guardrails / platform ceilings for compute modules. A missing row means platform defaults. */
6793
+ export type WasmModulePolicy = {
6794
+ __typename?: 'WasmModulePolicy';
6795
+ /** The app (tenant) the policy applies to. */
6796
+ appId: Scalars['BigInt']['output'];
6797
+ /** Cooldown (ms) while a module circuit is open. */
6798
+ cooldownMs: Scalars['Int']['output'];
6799
+ /** App-wide kill switch for all compute modules. */
6800
+ enabled: Scalars['Boolean']['output'];
6801
+ /** Consecutive failures that open a module circuit. */
6802
+ failureThreshold: Scalars['Int']['output'];
6803
+ /** Fuel budget per invoke/event call. */
6804
+ fuelPerInvoke: Scalars['BigInt']['output'];
6805
+ /** Fuel budget per tick call. */
6806
+ fuelPerTick: Scalars['BigInt']['output'];
6807
+ /** Max host data-API operations per tick. */
6808
+ maxDbOpsPerTick: Scalars['Int']['output'];
6809
+ /** Max replication bytes a module may emit per minute. */
6810
+ maxEgressBytesPerMin: Scalars['BigInt']['output'];
6811
+ /** Max replication messages a module may emit per minute. */
6812
+ maxEgressMsgsPerMin: Scalars['Int']['output'];
6813
+ /** Max guest linear memory (MB). */
6814
+ maxMemoryMb: Scalars['Int']['output'];
6815
+ /** Max modules the app may define. */
6816
+ maxModules: Scalars['Int']['output'];
6817
+ /** Wall-clock watchdog budget per entry call (ms). */
6818
+ maxRunMs: Scalars['Int']['output'];
6819
+ /** Max tick rate (Hz) any module may request. */
6820
+ maxTickHz: Scalars['Float']['output'];
6821
+ };
6822
+ /** 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. */
6823
+ export type WasmModuleRun = {
6824
+ __typename?: 'WasmModuleRun';
6825
+ /** The app (tenant). */
6826
+ appId: Scalars['BigInt']['output'];
6827
+ /** Circuit action taken (e.g. opened, half_open_retry). */
6828
+ circuitAction: Maybe<Scalars['String']['output']>;
6829
+ /** Host data-API reads performed. */
6830
+ dbReads: Scalars['Int']['output'];
6831
+ /** Host data-API writes performed. */
6832
+ dbWrites: Scalars['Int']['output'];
6833
+ /** Wall-clock duration in microseconds. */
6834
+ durationUs: Scalars['Int']['output'];
6835
+ /** Replication bytes emitted. */
6836
+ egressBytes: Scalars['BigInt']['output'];
6837
+ /** Replication messages emitted. */
6838
+ egressMsgs: Scalars['Int']['output'];
6839
+ /** The guest entry point (e.g. an invoke export name). */
6840
+ entry: Maybe<Scalars['String']['output']>;
6841
+ /** Error message when the run failed (trap, fuel, watchdog). */
6842
+ errorMessage: Maybe<Scalars['String']['output']>;
6843
+ /** Fuel consumed by the run. */
6844
+ fuelUsed: Scalars['BigInt']['output'];
6845
+ /** The module that ran. */
6846
+ moduleId: Scalars['String']['output'];
6847
+ /** The module name at run time. */
6848
+ moduleName: Scalars['String']['output'];
6849
+ /** Unique run id (UUID). */
6850
+ runId: Scalars['String']['output'];
6851
+ /** When the run started. */
6852
+ startedAt: Scalars['DateTime']['output'];
6853
+ /** Whether the run succeeded. */
6854
+ success: Scalars['Boolean']['output'];
6855
+ /** What ran: init | tick | event | invoke. */
6856
+ triggerSource: Scalars['String']['output'];
6857
+ };
6858
+ /** A trigger binding on a compute module: a tick loop, a model/compute event subscription, or a client-invokable export. */
6859
+ export type WasmModuleTrigger = {
6860
+ __typename?: 'WasmModuleTrigger';
6861
+ /** The app (tenant). */
6862
+ appId: Scalars['BigInt']['output'];
6863
+ /** Event filter: only this container type. */
6864
+ containerTypeName: Maybe<Scalars['String']['output']>;
6865
+ /** When the trigger was created. */
6866
+ createdAt: Scalars['DateTime']['output'];
6867
+ /** Debounce/coalesce window in ms. */
6868
+ debounceMs: Scalars['Int']['output'];
6869
+ /** Event filter: only compute events with this name. */
6870
+ eventName: Maybe<Scalars['String']['output']>;
6871
+ /** For invoke triggers: the exported guest function name. */
6872
+ exportName: Maybe<Scalars['String']['output']>;
6873
+ /** Event filter: only this model function name. */
6874
+ functionName: Maybe<Scalars['String']['output']>;
6875
+ /** For invoke triggers: JSON authority tree gating who may invoke. Null = app admins only. */
6876
+ invokePolicyJson: Maybe<Scalars['String']['output']>;
6877
+ /** The module this trigger drives. */
6878
+ moduleId: Scalars['String']['output'];
6879
+ /** For event triggers: function_invoked | property_changed | container_created | compute_event. */
6880
+ onEvent: Maybe<Scalars['String']['output']>;
6881
+ /** Event filter: only this property key. */
6882
+ propertyKey: Maybe<Scalars['String']['output']>;
6883
+ /** For tick triggers: the tick rate in Hz. */
6884
+ tickHz: Maybe<Scalars['Float']['output']>;
6885
+ /** Unique trigger id (UUID). */
6886
+ triggerId: Scalars['String']['output'];
6887
+ /** Trigger type: tick | event | invoke. */
6888
+ triggerType: Scalars['String']['output'];
6889
+ };
6890
+ /** An immutable source version of a compute module, plus its compile pipeline status. Rows are created pending; a game-api instance compiles them (Phase 2 runtime). */
6891
+ export type WasmModuleVersion = {
6892
+ __typename?: 'WasmModuleVersion';
6893
+ /** The guest ABI version the source targets. */
6894
+ abiVersion: Scalars['Int']['output'];
6895
+ /** The app (tenant). */
6896
+ appId: Scalars['BigInt']['output'];
6897
+ /** Compiler output (populated when compilation runs). */
6898
+ compileLog: Maybe<Scalars['String']['output']>;
6899
+ /** Compile status: pending | compiling | succeeded | failed. */
6900
+ compileStatus: Scalars['String']['output'];
6901
+ /** Size of the compiled artifact in bytes (after compile). */
6902
+ compiledSizeBytes: Maybe<Scalars['BigInt']['output']>;
6903
+ /** When this version was uploaded. */
6904
+ createdAt: Scalars['DateTime']['output'];
6905
+ /** The module this version belongs to. */
6906
+ moduleId: Scalars['String']['output'];
6907
+ /** When this version became the deployed version. */
6908
+ publishedAt: Maybe<Scalars['DateTime']['output']>;
6909
+ /** The crowdy-compute-sdk version the source targets. */
6910
+ sdkVersion: Scalars['String']['output'];
6911
+ /** JSON object mapping relative paths to file contents (the uploaded Rust source). */
6912
+ sourceFilesJson: Scalars['String']['output'];
6913
+ /** sha256 of the canonicalized source map; keys the compiled-artifact cache together with toolchain/SDK/ABI versions. */
6914
+ sourceHash: Scalars['String']['output'];
6915
+ /** Unique version id (UUID). */
6916
+ versionId: Scalars['String']['output'];
6917
+ /** Monotonic version number within the module. */
6918
+ versionNo: Scalars['Int']['output'];
6919
+ };
6920
+ /** A module and its recent run counts (diagnostics). */
6921
+ export type WasmTopModule = {
6922
+ __typename?: 'WasmTopModule';
6923
+ /** Failed runs in the window. */
6924
+ failures: Scalars['Int']['output'];
6925
+ /** The module name. */
6926
+ moduleName: Scalars['String']['output'];
6927
+ /** Runs in the window. */
6928
+ runs: Scalars['Int']['output'];
6929
+ };
6495
6930
  export type ActorQueryVariables = Exact<{
6496
6931
  uuid: Scalars['String']['input'];
6497
6932
  }>;
@@ -8031,6 +8466,441 @@ export type UpdateChunkStateMutation = {
8031
8466
  };
8032
8467
  } | null;
8033
8468
  };
8469
+ export type ComputeModuleFieldsFragment = {
8470
+ __typename?: 'WasmModule';
8471
+ moduleId: string;
8472
+ appId: string;
8473
+ name: string;
8474
+ description: string | null;
8475
+ enabled: boolean;
8476
+ alwaysOn: boolean;
8477
+ currentVersionId: string | null;
8478
+ circuitState: string;
8479
+ consecutiveFailures: number;
8480
+ cooldownUntil: string | null;
8481
+ lastError: string | null;
8482
+ createdAt: string;
8483
+ updatedAt: string;
8484
+ };
8485
+ export type ComputeVersionFieldsFragment = {
8486
+ __typename?: 'WasmModuleVersion';
8487
+ versionId: string;
8488
+ moduleId: string;
8489
+ appId: string;
8490
+ versionNo: number;
8491
+ sourceHash: string;
8492
+ sdkVersion: string;
8493
+ abiVersion: number;
8494
+ compileStatus: string;
8495
+ compileLog: string | null;
8496
+ compiledSizeBytes: string | null;
8497
+ publishedAt: string | null;
8498
+ createdAt: string;
8499
+ };
8500
+ export type ComputeTriggerFieldsFragment = {
8501
+ __typename?: 'WasmModuleTrigger';
8502
+ triggerId: string;
8503
+ appId: string;
8504
+ moduleId: string;
8505
+ triggerType: string;
8506
+ tickHz: number | null;
8507
+ onEvent: string | null;
8508
+ functionName: string | null;
8509
+ containerTypeName: string | null;
8510
+ propertyKey: string | null;
8511
+ eventName: string | null;
8512
+ debounceMs: number;
8513
+ exportName: string | null;
8514
+ invokePolicyJson: string | null;
8515
+ createdAt: string;
8516
+ };
8517
+ export type ComputePolicyFieldsFragment = {
8518
+ __typename?: 'WasmModulePolicy';
8519
+ appId: string;
8520
+ enabled: boolean;
8521
+ maxModules: number;
8522
+ maxTickHz: number;
8523
+ fuelPerTick: string;
8524
+ fuelPerInvoke: string;
8525
+ maxMemoryMb: number;
8526
+ maxRunMs: number;
8527
+ maxDbOpsPerTick: number;
8528
+ maxEgressMsgsPerMin: number;
8529
+ maxEgressBytesPerMin: string;
8530
+ failureThreshold: number;
8531
+ cooldownMs: number;
8532
+ };
8533
+ export type ComputeRunFieldsFragment = {
8534
+ __typename?: 'WasmModuleRun';
8535
+ runId: string;
8536
+ appId: string;
8537
+ moduleId: string;
8538
+ moduleName: string;
8539
+ triggerSource: string;
8540
+ entry: string | null;
8541
+ startedAt: string;
8542
+ durationUs: number;
8543
+ fuelUsed: string;
8544
+ dbReads: number;
8545
+ dbWrites: number;
8546
+ egressMsgs: number;
8547
+ egressBytes: string;
8548
+ success: boolean;
8549
+ errorMessage: string | null;
8550
+ circuitAction: string | null;
8551
+ };
8552
+ export type ComputeUpsertModuleMutationVariables = Exact<{
8553
+ input: UpsertComputeModuleInput;
8554
+ }>;
8555
+ export type ComputeUpsertModuleMutation = {
8556
+ __typename?: 'Mutation';
8557
+ computeUpsertModule: {
8558
+ __typename?: 'WasmModule';
8559
+ moduleId: string;
8560
+ appId: string;
8561
+ name: string;
8562
+ description: string | null;
8563
+ enabled: boolean;
8564
+ alwaysOn: boolean;
8565
+ currentVersionId: string | null;
8566
+ circuitState: string;
8567
+ consecutiveFailures: number;
8568
+ cooldownUntil: string | null;
8569
+ lastError: string | null;
8570
+ createdAt: string;
8571
+ updatedAt: string;
8572
+ };
8573
+ };
8574
+ export type ComputeDeployVersionMutationVariables = Exact<{
8575
+ input: DeployComputeVersionInput;
8576
+ }>;
8577
+ export type ComputeDeployVersionMutation = {
8578
+ __typename?: 'Mutation';
8579
+ computeDeployVersion: {
8580
+ __typename?: 'WasmModuleVersion';
8581
+ versionId: string;
8582
+ moduleId: string;
8583
+ appId: string;
8584
+ versionNo: number;
8585
+ sourceHash: string;
8586
+ sdkVersion: string;
8587
+ abiVersion: number;
8588
+ compileStatus: string;
8589
+ compileLog: string | null;
8590
+ compiledSizeBytes: string | null;
8591
+ publishedAt: string | null;
8592
+ createdAt: string;
8593
+ };
8594
+ };
8595
+ export type ComputeSetModuleEnabledMutationVariables = Exact<{
8596
+ appId: Scalars['BigInt']['input'];
8597
+ name: Scalars['String']['input'];
8598
+ enabled: Scalars['Boolean']['input'];
8599
+ }>;
8600
+ export type ComputeSetModuleEnabledMutation = {
8601
+ __typename?: 'Mutation';
8602
+ computeSetModuleEnabled: {
8603
+ __typename?: 'WasmModule';
8604
+ moduleId: string;
8605
+ appId: string;
8606
+ name: string;
8607
+ description: string | null;
8608
+ enabled: boolean;
8609
+ alwaysOn: boolean;
8610
+ currentVersionId: string | null;
8611
+ circuitState: string;
8612
+ consecutiveFailures: number;
8613
+ cooldownUntil: string | null;
8614
+ lastError: string | null;
8615
+ createdAt: string;
8616
+ updatedAt: string;
8617
+ };
8618
+ };
8619
+ export type ComputeDeleteModuleMutationVariables = Exact<{
8620
+ appId: Scalars['BigInt']['input'];
8621
+ name: Scalars['String']['input'];
8622
+ }>;
8623
+ export type ComputeDeleteModuleMutation = {
8624
+ __typename?: 'Mutation';
8625
+ computeDeleteModule: boolean;
8626
+ };
8627
+ export type ComputeUpsertTriggerMutationVariables = Exact<{
8628
+ input: UpsertComputeTriggerInput;
8629
+ }>;
8630
+ export type ComputeUpsertTriggerMutation = {
8631
+ __typename?: 'Mutation';
8632
+ computeUpsertTrigger: {
8633
+ __typename?: 'WasmModuleTrigger';
8634
+ triggerId: string;
8635
+ appId: string;
8636
+ moduleId: string;
8637
+ triggerType: string;
8638
+ tickHz: number | null;
8639
+ onEvent: string | null;
8640
+ functionName: string | null;
8641
+ containerTypeName: string | null;
8642
+ propertyKey: string | null;
8643
+ eventName: string | null;
8644
+ debounceMs: number;
8645
+ exportName: string | null;
8646
+ invokePolicyJson: string | null;
8647
+ createdAt: string;
8648
+ };
8649
+ };
8650
+ export type ComputeDeleteTriggerMutationVariables = Exact<{
8651
+ appId: Scalars['BigInt']['input'];
8652
+ triggerId: Scalars['String']['input'];
8653
+ }>;
8654
+ export type ComputeDeleteTriggerMutation = {
8655
+ __typename?: 'Mutation';
8656
+ computeDeleteTrigger: boolean;
8657
+ };
8658
+ export type ComputeSetPolicyMutationVariables = Exact<{
8659
+ input: SetComputePolicyInput;
8660
+ }>;
8661
+ export type ComputeSetPolicyMutation = {
8662
+ __typename?: 'Mutation';
8663
+ computeSetPolicy: {
8664
+ __typename?: 'WasmModulePolicy';
8665
+ appId: string;
8666
+ enabled: boolean;
8667
+ maxModules: number;
8668
+ maxTickHz: number;
8669
+ fuelPerTick: string;
8670
+ fuelPerInvoke: string;
8671
+ maxMemoryMb: number;
8672
+ maxRunMs: number;
8673
+ maxDbOpsPerTick: number;
8674
+ maxEgressMsgsPerMin: number;
8675
+ maxEgressBytesPerMin: string;
8676
+ failureThreshold: number;
8677
+ cooldownMs: number;
8678
+ };
8679
+ };
8680
+ export type ComputeInvokeMutationVariables = Exact<{
8681
+ appId: Scalars['BigInt']['input'];
8682
+ moduleName: Scalars['String']['input'];
8683
+ exportName: Scalars['String']['input'];
8684
+ paramsJson?: InputMaybe<Scalars['String']['input']>;
8685
+ }>;
8686
+ export type ComputeInvokeMutation = {
8687
+ __typename?: 'Mutation';
8688
+ computeInvoke: {
8689
+ __typename?: 'ComputeInvokeResult';
8690
+ resultBase64: string;
8691
+ resultJson: string | null;
8692
+ fuelUsed: string;
8693
+ durationUs: number;
8694
+ };
8695
+ };
8696
+ export type ComputeModulesQueryVariables = Exact<{
8697
+ appId: Scalars['BigInt']['input'];
8698
+ }>;
8699
+ export type ComputeModulesQuery = {
8700
+ __typename?: 'Query';
8701
+ computeModules: Array<{
8702
+ __typename?: 'WasmModule';
8703
+ moduleId: string;
8704
+ appId: string;
8705
+ name: string;
8706
+ description: string | null;
8707
+ enabled: boolean;
8708
+ alwaysOn: boolean;
8709
+ currentVersionId: string | null;
8710
+ circuitState: string;
8711
+ consecutiveFailures: number;
8712
+ cooldownUntil: string | null;
8713
+ lastError: string | null;
8714
+ createdAt: string;
8715
+ updatedAt: string;
8716
+ }>;
8717
+ };
8718
+ export type ComputeModuleQueryVariables = Exact<{
8719
+ appId: Scalars['BigInt']['input'];
8720
+ name: Scalars['String']['input'];
8721
+ }>;
8722
+ export type ComputeModuleQuery = {
8723
+ __typename?: 'Query';
8724
+ computeModule: {
8725
+ __typename?: 'WasmModule';
8726
+ moduleId: string;
8727
+ appId: string;
8728
+ name: string;
8729
+ description: string | null;
8730
+ enabled: boolean;
8731
+ alwaysOn: boolean;
8732
+ currentVersionId: string | null;
8733
+ circuitState: string;
8734
+ consecutiveFailures: number;
8735
+ cooldownUntil: string | null;
8736
+ lastError: string | null;
8737
+ createdAt: string;
8738
+ updatedAt: string;
8739
+ };
8740
+ };
8741
+ export type ComputeModuleVersionsQueryVariables = Exact<{
8742
+ appId: Scalars['BigInt']['input'];
8743
+ moduleName: Scalars['String']['input'];
8744
+ limit?: InputMaybe<Scalars['Int']['input']>;
8745
+ }>;
8746
+ export type ComputeModuleVersionsQuery = {
8747
+ __typename?: 'Query';
8748
+ computeModuleVersions: Array<{
8749
+ __typename?: 'WasmModuleVersion';
8750
+ versionId: string;
8751
+ moduleId: string;
8752
+ appId: string;
8753
+ versionNo: number;
8754
+ sourceHash: string;
8755
+ sdkVersion: string;
8756
+ abiVersion: number;
8757
+ compileStatus: string;
8758
+ compileLog: string | null;
8759
+ compiledSizeBytes: string | null;
8760
+ publishedAt: string | null;
8761
+ createdAt: string;
8762
+ }>;
8763
+ };
8764
+ export type ComputeModuleTriggersQueryVariables = Exact<{
8765
+ appId: Scalars['BigInt']['input'];
8766
+ moduleName?: InputMaybe<Scalars['String']['input']>;
8767
+ }>;
8768
+ export type ComputeModuleTriggersQuery = {
8769
+ __typename?: 'Query';
8770
+ computeModuleTriggers: Array<{
8771
+ __typename?: 'WasmModuleTrigger';
8772
+ triggerId: string;
8773
+ appId: string;
8774
+ moduleId: string;
8775
+ triggerType: string;
8776
+ tickHz: number | null;
8777
+ onEvent: string | null;
8778
+ functionName: string | null;
8779
+ containerTypeName: string | null;
8780
+ propertyKey: string | null;
8781
+ eventName: string | null;
8782
+ debounceMs: number;
8783
+ exportName: string | null;
8784
+ invokePolicyJson: string | null;
8785
+ createdAt: string;
8786
+ }>;
8787
+ };
8788
+ export type ComputeModulePolicyQueryVariables = Exact<{
8789
+ appId: Scalars['BigInt']['input'];
8790
+ }>;
8791
+ export type ComputeModulePolicyQuery = {
8792
+ __typename?: 'Query';
8793
+ computeModulePolicy: {
8794
+ __typename?: 'WasmModulePolicy';
8795
+ appId: string;
8796
+ enabled: boolean;
8797
+ maxModules: number;
8798
+ maxTickHz: number;
8799
+ fuelPerTick: string;
8800
+ fuelPerInvoke: string;
8801
+ maxMemoryMb: number;
8802
+ maxRunMs: number;
8803
+ maxDbOpsPerTick: number;
8804
+ maxEgressMsgsPerMin: number;
8805
+ maxEgressBytesPerMin: string;
8806
+ failureThreshold: number;
8807
+ cooldownMs: number;
8808
+ };
8809
+ };
8810
+ export type ComputeModuleRunsQueryVariables = Exact<{
8811
+ appId: Scalars['BigInt']['input'];
8812
+ moduleName?: InputMaybe<Scalars['String']['input']>;
8813
+ success?: InputMaybe<Scalars['Boolean']['input']>;
8814
+ limit?: InputMaybe<Scalars['Int']['input']>;
8815
+ offset?: InputMaybe<Scalars['Int']['input']>;
8816
+ }>;
8817
+ export type ComputeModuleRunsQuery = {
8818
+ __typename?: 'Query';
8819
+ computeModuleRuns: Array<{
8820
+ __typename?: 'WasmModuleRun';
8821
+ runId: string;
8822
+ appId: string;
8823
+ moduleId: string;
8824
+ moduleName: string;
8825
+ triggerSource: string;
8826
+ entry: string | null;
8827
+ startedAt: string;
8828
+ durationUs: number;
8829
+ fuelUsed: string;
8830
+ dbReads: number;
8831
+ dbWrites: number;
8832
+ egressMsgs: number;
8833
+ egressBytes: string;
8834
+ success: boolean;
8835
+ errorMessage: string | null;
8836
+ circuitAction: string | null;
8837
+ }>;
8838
+ };
8839
+ export type ComputeModuleStatsQueryVariables = Exact<{
8840
+ appId: Scalars['BigInt']['input'];
8841
+ windowMinutes?: InputMaybe<Scalars['Int']['input']>;
8842
+ }>;
8843
+ export type ComputeModuleStatsQuery = {
8844
+ __typename?: 'Query';
8845
+ computeModuleStats: {
8846
+ __typename?: 'WasmComputeStats';
8847
+ windowMinutes: number;
8848
+ totalRuns: number;
8849
+ failedRuns: number;
8850
+ failureRatePct: number;
8851
+ totalFuelUsed: string;
8852
+ totalEgressMsgs: string;
8853
+ avgDurationUs: number;
8854
+ byModule: Array<{
8855
+ __typename?: 'WasmComputeStat';
8856
+ moduleName: string;
8857
+ runs: number;
8858
+ failures: number;
8859
+ fuelUsed: string;
8860
+ avgDurationUs: number;
8861
+ circuitState: string;
8862
+ }>;
8863
+ };
8864
+ };
8865
+ export type ComputeModuleLogsQueryVariables = Exact<{
8866
+ appId: Scalars['BigInt']['input'];
8867
+ moduleName?: InputMaybe<Scalars['String']['input']>;
8868
+ limit?: InputMaybe<Scalars['Int']['input']>;
8869
+ }>;
8870
+ export type ComputeModuleLogsQuery = {
8871
+ __typename?: 'Query';
8872
+ computeModuleLogs: Array<{
8873
+ __typename?: 'WasmModuleLogEntry';
8874
+ ts: string;
8875
+ moduleName: string;
8876
+ level: string;
8877
+ message: string;
8878
+ triggerSource: string | null;
8879
+ }>;
8880
+ };
8881
+ export type ComputeAppDiagnosticsQueryVariables = Exact<{
8882
+ appId: Scalars['BigInt']['input'];
8883
+ }>;
8884
+ export type ComputeAppDiagnosticsQuery = {
8885
+ __typename?: 'Query';
8886
+ computeAppDiagnostics: {
8887
+ __typename?: 'WasmAppDiagnostics';
8888
+ appId: string;
8889
+ moduleCount: number;
8890
+ enabledModuleCount: number;
8891
+ versionCount: number;
8892
+ triggerCount: number;
8893
+ runs24h: number;
8894
+ failedRuns24h: number;
8895
+ fuelUsed24h: string;
8896
+ topModules: Array<{
8897
+ __typename?: 'WasmTopModule';
8898
+ moduleName: string;
8899
+ runs: number;
8900
+ failures: number;
8901
+ }>;
8902
+ };
8903
+ };
8034
8904
  export type CpEnvironmentsQueryVariables = Exact<{
8035
8905
  page?: InputMaybe<Scalars['Int']['input']>;
8036
8906
  pageSize?: InputMaybe<Scalars['Int']['input']>;
@@ -12368,6 +13238,11 @@ export type VoxelUpdateHistoryConnectionQuery = {
12368
13238
  };
12369
13239
  };
12370
13240
  };
13241
+ export declare const ComputeModuleFieldsFragmentDoc: DocumentNode<ComputeModuleFieldsFragment, unknown>;
13242
+ export declare const ComputeVersionFieldsFragmentDoc: DocumentNode<ComputeVersionFieldsFragment, unknown>;
13243
+ export declare const ComputeTriggerFieldsFragmentDoc: DocumentNode<ComputeTriggerFieldsFragment, unknown>;
13244
+ export declare const ComputePolicyFieldsFragmentDoc: DocumentNode<ComputePolicyFieldsFragment, unknown>;
13245
+ export declare const ComputeRunFieldsFragmentDoc: DocumentNode<ComputeRunFieldsFragment, unknown>;
12371
13246
  export declare const GmAutomationFieldsFragmentDoc: DocumentNode<GmAutomationFieldsFragment, unknown>;
12372
13247
  export declare const GmAutomationTriggerFieldsFragmentDoc: DocumentNode<GmAutomationTriggerFieldsFragment, unknown>;
12373
13248
  export declare const GmAutomationPolicyFieldsFragmentDoc: DocumentNode<GmAutomationPolicyFieldsFragment, unknown>;
@@ -12455,6 +13330,23 @@ export declare const GetVoxelListDocument: DocumentNode<GetVoxelListQuery, GetVo
12455
13330
  export declare const UpdateChunkDocument: DocumentNode<UpdateChunkMutation, UpdateChunkMutationVariables>;
12456
13331
  export declare const UpdateChunkLodsDocument: DocumentNode<UpdateChunkLodsMutation, UpdateChunkLodsMutationVariables>;
12457
13332
  export declare const UpdateChunkStateDocument: DocumentNode<UpdateChunkStateMutation, UpdateChunkStateMutationVariables>;
13333
+ export declare const ComputeUpsertModuleDocument: DocumentNode<ComputeUpsertModuleMutation, ComputeUpsertModuleMutationVariables>;
13334
+ export declare const ComputeDeployVersionDocument: DocumentNode<ComputeDeployVersionMutation, ComputeDeployVersionMutationVariables>;
13335
+ export declare const ComputeSetModuleEnabledDocument: DocumentNode<ComputeSetModuleEnabledMutation, ComputeSetModuleEnabledMutationVariables>;
13336
+ export declare const ComputeDeleteModuleDocument: DocumentNode<ComputeDeleteModuleMutation, ComputeDeleteModuleMutationVariables>;
13337
+ export declare const ComputeUpsertTriggerDocument: DocumentNode<ComputeUpsertTriggerMutation, ComputeUpsertTriggerMutationVariables>;
13338
+ export declare const ComputeDeleteTriggerDocument: DocumentNode<ComputeDeleteTriggerMutation, ComputeDeleteTriggerMutationVariables>;
13339
+ export declare const ComputeSetPolicyDocument: DocumentNode<ComputeSetPolicyMutation, ComputeSetPolicyMutationVariables>;
13340
+ export declare const ComputeInvokeDocument: DocumentNode<ComputeInvokeMutation, ComputeInvokeMutationVariables>;
13341
+ export declare const ComputeModulesDocument: DocumentNode<ComputeModulesQuery, ComputeModulesQueryVariables>;
13342
+ export declare const ComputeModuleDocument: DocumentNode<ComputeModuleQuery, ComputeModuleQueryVariables>;
13343
+ export declare const ComputeModuleVersionsDocument: DocumentNode<ComputeModuleVersionsQuery, ComputeModuleVersionsQueryVariables>;
13344
+ export declare const ComputeModuleTriggersDocument: DocumentNode<ComputeModuleTriggersQuery, ComputeModuleTriggersQueryVariables>;
13345
+ export declare const ComputeModulePolicyDocument: DocumentNode<ComputeModulePolicyQuery, ComputeModulePolicyQueryVariables>;
13346
+ export declare const ComputeModuleRunsDocument: DocumentNode<ComputeModuleRunsQuery, ComputeModuleRunsQueryVariables>;
13347
+ export declare const ComputeModuleStatsDocument: DocumentNode<ComputeModuleStatsQuery, ComputeModuleStatsQueryVariables>;
13348
+ export declare const ComputeModuleLogsDocument: DocumentNode<ComputeModuleLogsQuery, ComputeModuleLogsQueryVariables>;
13349
+ export declare const ComputeAppDiagnosticsDocument: DocumentNode<ComputeAppDiagnosticsQuery, ComputeAppDiagnosticsQueryVariables>;
12458
13350
  export declare const CpEnvironmentsDocument: DocumentNode<CpEnvironmentsQuery, CpEnvironmentsQueryVariables>;
12459
13351
  export declare const CpEnvironmentDocument: DocumentNode<CpEnvironmentQuery, CpEnvironmentQueryVariables>;
12460
13352
  export declare const CpChangeOrdersDocument: DocumentNode<CpChangeOrdersQuery, CpChangeOrdersQueryVariables>;