@crowdedkingdoms/crowdyjs 17.13.0-dev.1 → 17.14.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.
Files changed (62) hide show
  1. package/MIGRATION.md +72 -1
  2. package/README.md +72 -7
  3. package/dist/crowdy-studio/controller.d.ts +38 -11
  4. package/dist/crowdy-studio/controller.d.ts.map +1 -1
  5. package/dist/crowdy-studio/controller.js +237 -46
  6. package/dist/crowdy-studio/dom-shell.d.ts.map +1 -1
  7. package/dist/crowdy-studio/dom-shell.js +3 -1
  8. package/dist/crowdy-studio/embed/hud-layer.d.ts +2 -1
  9. package/dist/crowdy-studio/embed/hud-layer.d.ts.map +1 -1
  10. package/dist/crowdy-studio/embed/panel.d.ts +7 -6
  11. package/dist/crowdy-studio/embed/panel.d.ts.map +1 -1
  12. package/dist/crowdy-studio/starter-projects.d.ts +8 -0
  13. package/dist/crowdy-studio/starter-projects.d.ts.map +1 -1
  14. package/dist/crowdy-studio/starter-projects.js +79 -5
  15. package/dist/domains/exec.d.ts +162 -15
  16. package/dist/domains/exec.d.ts.map +1 -1
  17. package/dist/domains/exec.js +180 -18
  18. package/dist/domains/marketplace.d.ts +15 -3
  19. package/dist/domains/marketplace.d.ts.map +1 -1
  20. package/dist/domains/marketplace.js +17 -3
  21. package/dist/generated/graphql.d.ts +349 -0
  22. package/dist/generated/graphql.d.ts.map +1 -1
  23. package/dist/generated/graphql.js +17 -8
  24. package/dist/grid-mods/exec-client-halves.d.ts +140 -0
  25. package/dist/grid-mods/exec-client-halves.d.ts.map +1 -0
  26. package/dist/grid-mods/exec-client-halves.js +341 -0
  27. package/dist/grid-mods/grid-host-calls.d.ts +3 -1
  28. package/dist/grid-mods/grid-host-calls.d.ts.map +1 -1
  29. package/dist/grid-mods/grid-host-calls.js +3 -1
  30. package/dist/grid-mods/index.d.ts +1 -0
  31. package/dist/grid-mods/index.d.ts.map +1 -1
  32. package/dist/grid-mods/index.js +1 -0
  33. package/dist/grid-mods/mod-runtime.d.ts +10 -2
  34. package/dist/grid-mods/mod-runtime.d.ts.map +1 -1
  35. package/dist/grid-mods/mod-runtime.js +2 -0
  36. package/dist/grid-scope.d.ts +1 -0
  37. package/dist/grid-scope.d.ts.map +1 -1
  38. package/dist/grid-scope.js +1 -0
  39. package/dist/index.d.ts +4 -4
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +4 -3
  42. package/dist/kit/npcs.d.ts.map +1 -1
  43. package/dist/kit/social.d.ts.map +1 -1
  44. package/dist/live-coding/rust-analysis.js +13 -1
  45. package/dist/player-runtime/glue-runtime.d.ts +19 -6
  46. package/dist/player-runtime/glue-runtime.d.ts.map +1 -1
  47. package/dist/player-runtime/glue-runtime.js +40 -16
  48. package/dist/player-runtime/player-code-broker.d.ts +29 -0
  49. package/dist/player-runtime/player-code-broker.d.ts.map +1 -1
  50. package/dist/player-runtime/player-code-broker.js +41 -8
  51. package/dist/player-runtime/player-glue-worker.d.ts +2 -1
  52. package/dist/player-runtime/player-glue-worker.d.ts.map +1 -1
  53. package/dist/player-runtime/player-glue-worker.js +3 -1
  54. package/dist/stores/actors.d.ts +12 -2
  55. package/dist/stores/actors.d.ts.map +1 -1
  56. package/dist/stores/actors.js +43 -18
  57. package/dist/stores/chunks.d.ts +12 -0
  58. package/dist/stores/chunks.d.ts.map +1 -1
  59. package/dist/stores/chunks.js +112 -39
  60. package/dist/stores/durable.d.ts.map +1 -1
  61. package/dist/stores/durable.js +2 -1
  62. package/package.json +1 -1
@@ -65,12 +65,20 @@ export class MarketplaceAPI {
65
65
  return data.uninstallPlayerCode;
66
66
  }
67
67
  // -- Grid-attached client mods (D2) --------------------------------------------
68
- /** Client mods attached to a grid, with the caller's consent state. */
68
+ // Superseded by ck-exec mods' CLIENT halves (`client.exec`, 17.14.0) and removed with the
69
+ // legacy engines in 18.0.
70
+ /**
71
+ * Client mods attached to a grid, with the caller's consent state.
72
+ * @deprecated Superseded by `client.exec.gridClientMods` (a ck-exec mod's CLIENT half); removed in 18.0.
73
+ */
69
74
  async gridClientMods(variables) {
70
75
  const data = await this.game.request(MarketplaceGridClientModsDocument, variables);
71
76
  return data.gridClientMods;
72
77
  }
73
- /** Consent to one attachment's exact capability hash (per player). */
78
+ /**
79
+ * Consent to one attachment's exact capability hash (per player).
80
+ * @deprecated Superseded by `client.exec.consentClientMod`; removed in 18.0.
81
+ */
74
82
  async consentGridClientMod(variables) {
75
83
  const data = await this.game.request(MarketplaceConsentGridClientModDocument, variables);
76
84
  return data.consentGridClientMod;
@@ -79,12 +87,16 @@ export class MarketplaceAPI {
79
87
  * Trust one author's active attachments in a grid at the exact aggregate
80
88
  * capability hash returned by `gridClientMods`. Capability widening changes
81
89
  * the hash and requires another explicit call.
90
+ * @deprecated Superseded by `client.exec.trustAuthor`; removed in 18.0.
82
91
  */
83
92
  async trustGridAuthor(variables) {
84
93
  const data = await this.game.request(MarketplaceTrustGridAuthorDocument, variables);
85
94
  return data.trustGridAuthor;
86
95
  }
87
- /** Fetch an acquired/attached listing's client artifact (base64 + metadata). */
96
+ /**
97
+ * Fetch an acquired/attached listing's client artifact (base64 + metadata).
98
+ * @deprecated Superseded by `client.exec.modClientArtifact`; removed in 18.0.
99
+ */
88
100
  async clientArtifact(variables) {
89
101
  const data = await this.game.request(MarketplaceClientArtifactDocument, variables);
90
102
  return data.playerCodeClientArtifact;
@@ -93,6 +105,8 @@ export class MarketplaceAPI {
93
105
  * Fetch and decode a client artifact into broker inputs (bytes, content
94
106
  * hash, per-dispatch fuel budget) — the marketplace twin of
95
107
  * `playerCompute.artifactBytes` for acquired and grid-attached mods.
108
+ * @deprecated Superseded by `client.exec.modClientArtifactBytes`, which also checks the
109
+ * bytes against their digest; `ExecClientHalves` runs a grid's CLIENT halves. Removed in 18.0.
96
110
  */
97
111
  async clientArtifactBytes(variables) {
98
112
  const a = await this.clientArtifact(variables);
@@ -3649,6 +3649,8 @@ export type ExecBuild = {
3649
3649
  createdAt: Scalars['DateTime']['output'];
3650
3650
  /** When it finished. */
3651
3651
  finishedAt: Maybe<Scalars['DateTime']['output']>;
3652
+ /** What it builds: `exec` for ck-exec modules, `client` for the CLIENT half of a mod (`execModClientBuild`). */
3653
+ kind: Scalars['String']['output'];
3652
3654
  /** The compiler’s output once the build finishes, at most 64 KB (the end is kept). */
3653
3655
  log: Maybe<Scalars['String']['output']>;
3654
3656
  /** When it started compiling. */
@@ -3659,12 +3661,18 @@ export type ExecBuild = {
3659
3661
  /** One module a ck-exec build produced. */
3660
3662
  export type ExecBuildArtifact = {
3661
3663
  __typename?: 'ExecBuildArtifact';
3664
+ /** SHA-256 of the canonical capability summary, hex: what visitors consent to. Null for a ck-exec module. */
3665
+ capabilityHash: Maybe<Scalars['String']['output']>;
3666
+ /** A CLIENT half’s capability summary as JSON, derived from the module: its imports, the client host calls it can reach, their groups, its presentation hooks and exports. Null for a ck-exec module. */
3667
+ capabilitySummaryJson: Maybe<Scalars['String']['output']>;
3662
3668
  /** The crate it was built from. */
3663
3669
  crate: Scalars['String']['output'];
3664
3670
  /** SHA-256 of the WASM: the `digest` a manifest names it by. */
3665
3671
  digest: Scalars['String']['output'];
3666
3672
  /** The module’s size in bytes. */
3667
3673
  sizeBytes: Scalars['Int']['output'];
3674
+ /** How often, in milliseconds, browsers tick a CLIENT half: `[package.metadata.crowdy] tick_interval_ms`, 16-1000, 1000 by default. Null for a ck-exec module. */
3675
+ tickIntervalMs: Maybe<Scalars['Int']['output']>;
3668
3676
  };
3669
3677
  /** One crate of a ck-exec build: a `ckx-sdk` library with `[lib] crate-type = ["cdylib"]`, built into one module. */
3670
3678
  export type ExecBuildCrateInput = {
@@ -3746,6 +3754,40 @@ export type ExecEndpointStat = {
3746
3754
  /** Calls a handler answered (`Ok` or `AppError`); the latencies are over these. */
3747
3755
  timedCalls: Scalars['Float']['output'];
3748
3756
  };
3757
+ /** A CLIENT half a grid serves (dev-tier preview): of a mod on it that is switched on, not stopped by the kill ladder and admitted, running as the grid’s owner. Carries the caller’s consent and trust in its author. */
3758
+ export type ExecGridClientMod = {
3759
+ __typename?: 'ExecGridClientMod';
3760
+ /** The hash `execTrustAuthor` takes: SHA-256 of the canonical union. A new capability changes it. */
3761
+ authorCapabilityHash: Scalars['String']['output'];
3762
+ /** The union, as JSON, of the capability summaries of every CLIENT half this author has on the grid: the summary a one-per-author trust prompt shows. */
3763
+ authorCapabilitySummaryJson: Scalars['String']['output'];
3764
+ /** Its author: the mod’s owner, who owns the grid. Pass it to `execTrustAuthor`. */
3765
+ authorId: Scalars['BigInt']['output'];
3766
+ /** The caller consented to it at its current capability hash. */
3767
+ callerConsented: Scalars['Boolean']['output'];
3768
+ /** The caller trusts this author on this grid, at this hash or a union at least as wide. */
3769
+ callerTrustsAuthor: Scalars['Boolean']['output'];
3770
+ /** The hash `execConsentClientMod` takes: SHA-256 of the canonical capability summary. */
3771
+ capabilityHash: Scalars['String']['output'];
3772
+ /** Its capability summary as JSON. */
3773
+ capabilitySummaryJson: Scalars['String']['output'];
3774
+ /** The CLIENT half’s version. */
3775
+ clientVersion: Scalars['Int']['output'];
3776
+ /** SHA-256 of the module, hex: cache the bytes by it, and stop a worker whose digest is no longer listed. */
3777
+ digest: Scalars['String']['output'];
3778
+ /** The grid. */
3779
+ gridId: Scalars['BigInt']['output'];
3780
+ /** The marketplace listing the mod was installed from. */
3781
+ listingId: Maybe<Scalars['BigInt']['output']>;
3782
+ /** The mod, for `execConsentClientMod` and `execModClientArtifact`. */
3783
+ modId: Scalars['String']['output'];
3784
+ /** The mod’s name: its name on the page’s grid event bus. */
3785
+ name: Scalars['String']['output'];
3786
+ /** How often, in milliseconds, to tick it (16-1000). */
3787
+ tickIntervalMs: Scalars['Int']['output'];
3788
+ /** When it was last attached. */
3789
+ updatedAt: Scalars['DateTime']['output'];
3790
+ };
3749
3791
  /** An instance the execution manager has placed for an app (dev-tier preview). */
3750
3792
  export type ExecInstance = {
3751
3793
  __typename?: 'ExecInstance';
@@ -3809,9 +3851,71 @@ export type ExecMod = {
3809
3851
  updatedAt: Scalars['DateTime']['output'];
3810
3852
  version: Scalars['Int']['output'];
3811
3853
  };
3854
+ /** The CLIENT half of a mod (dev-tier preview): browser WASM built from a crowdy-client-sdk crate and attached to the mod, which the mod’s grid serves to visitors who consent to it. */
3855
+ export type ExecModClient = {
3856
+ __typename?: 'ExecModClient';
3857
+ /** SHA-256 of the canonical capability summary, hex: what a visitor consents to. */
3858
+ capabilityHash: Scalars['String']['output'];
3859
+ /** Its capability summary as JSON, derived from the module: imports, the client host calls it can reach, their groups, presentation hooks and exports. */
3860
+ capabilitySummaryJson: Scalars['String']['output'];
3861
+ /** Rises by one with every attach to the mod. */
3862
+ clientVersion: Scalars['Int']['output'];
3863
+ /** SHA-256 of the module, hex: what `execModClientArtifact` serves. */
3864
+ digest: Scalars['String']['output'];
3865
+ /** The mod’s grid. */
3866
+ gridId: Scalars['BigInt']['output'];
3867
+ /** The mod it is attached to. */
3868
+ modId: Scalars['String']['output'];
3869
+ /** The mod’s name. */
3870
+ name: Scalars['String']['output'];
3871
+ /** The player it was attached as: the mod’s owner. */
3872
+ ownerId: Scalars['BigInt']['output'];
3873
+ /** The module’s size in bytes. */
3874
+ sizeBytes: Scalars['Int']['output'];
3875
+ /** How often, in milliseconds, browsers tick it (16-1000, from its Cargo.toml). */
3876
+ tickIntervalMs: Scalars['Int']['output'];
3877
+ /** When it was last attached. */
3878
+ updatedAt: Scalars['DateTime']['output'];
3879
+ };
3880
+ /** A CLIENT half’s module and what the browser broker needs to run it (dev-tier preview): the fuel-metered wasm32-unknown-unknown module, its digest to check the bytes against, and the per-dispatch fuel budget to load into its `ck_fuel` global. */
3881
+ export type ExecModClientArtifact = {
3882
+ __typename?: 'ExecModClientArtifact';
3883
+ /** The client ABI version it was built for (0). */
3884
+ abiVersion: Scalars['Int']['output'];
3885
+ /** SHA-256 of the canonical capability summary. */
3886
+ capabilityHash: Scalars['String']['output'];
3887
+ /** Its capability summary as JSON. */
3888
+ capabilitySummaryJson: Scalars['String']['output'];
3889
+ /** The CLIENT half’s version. */
3890
+ clientVersion: Scalars['Int']['output'];
3891
+ /** SHA-256 of the module, hex. The broker recomputes it and refuses bytes that differ. */
3892
+ digest: Scalars['String']['output'];
3893
+ /** Fuel for each dispatch (init, tick, invoke, event): the broker sets `ck_fuel` to it before every call, and the module traps when it runs out. */
3894
+ fuelPerDispatch: Scalars['BigInt']['output'];
3895
+ /** The mod’s grid. */
3896
+ gridId: Scalars['BigInt']['output'];
3897
+ /** The mod. */
3898
+ modId: Scalars['String']['output'];
3899
+ /** The mod’s name: its name on the page’s grid event bus. */
3900
+ name: Scalars['String']['output'];
3901
+ /** Its size in bytes, at most 512 KiB. */
3902
+ sizeBytes: Scalars['Int']['output'];
3903
+ /** How often, in milliseconds, to tick it (16-1000). */
3904
+ tickIntervalMs: Scalars['Int']['output'];
3905
+ /** The module, base64. */
3906
+ wasmBase64: Scalars['String']['output'];
3907
+ };
3812
3908
  /** A mod version its owner published, which any grid owner in the app may install as a mod of their own (dev-tier preview; no payments). */
3813
3909
  export type ExecModListing = {
3814
3910
  __typename?: 'ExecModListing';
3911
+ /** SHA-256 of that capability summary, hex. */
3912
+ clientCapabilityHash: Maybe<Scalars['String']['output']>;
3913
+ /** That CLIENT half’s capability summary as JSON, for an installer to review first. */
3914
+ clientCapabilitySummaryJson: Maybe<Scalars['String']['output']>;
3915
+ /** SHA-256 of the CLIENT half the mod had when it was published, hex; null without one. An install attaches it to the installer’s mod, and visitors consent to it afresh. */
3916
+ clientDigest: Maybe<Scalars['String']['output']>;
3917
+ /** How often, in milliseconds, browsers tick that CLIENT half. */
3918
+ clientTickIntervalMs: Maybe<Scalars['Int']['output']>;
3815
3919
  createdAt: Scalars['DateTime']['output'];
3816
3920
  delistedAt: Maybe<Scalars['DateTime']['output']>;
3817
3921
  description: Maybe<Scalars['String']['output']>;
@@ -5766,10 +5870,18 @@ export type Mutation = {
5766
5870
  execConnect: ExecConnection;
5767
5871
  /** Connect to an app's ck-exec code as one of its developers, for studio tools, manual runs and admin endpoints (dev-tier preview). The session's calls arrive as `Caller::Developer` with your user id and may reach any node type, not only `client` ones, but never the platform's `$` methods. Requires the org 'manage_compute' permission and your own session, not an app token. */
5768
5872
  execConnectAsDeveloper: ExecConnection;
5873
+ /** Consent to run a mod's CLIENT half in your browser (dev-tier preview) at its current capability hash. A CLIENT half whose capabilities change carries a new hash, and the consent stops holding until you consent again. Answers CONFLICT when the hash is not the current one. Requires access to the app. */
5874
+ execConsentClientMod: Scalars['Boolean']['output'];
5769
5875
  /** Deploy a new version of an app's ck-exec topology (dev-tier preview): the manifest and any modules it names that were not uploaded before. The execution manager checks the manifest's tree and bounds and each module's digest, stores them, and makes the version active; running instances pick it up when they next start. Requires the org 'manage_compute' permission. */
5770
5876
  execDeploy: ExecDeployResult;
5771
5877
  /** Build a mod from one ckx-sdk crate (dev-tier preview), as `execBuild` builds a developer's crates. Returns at once with the build queued; poll `execModBuildStatus`, then pass its id to `execModDeploy`. One build at a time per player. Requires the 'write_server_code' permission in the app. */
5772
5878
  execModBuild: ExecBuild;
5879
+ /** Build the CLIENT half of a mod from one crowdy-client-sdk crate (dev-tier preview): compiled for wasm32-unknown-unknown in the build sandbox, fuel-metered and optimized there, checked against the client ABI and at most 512 KiB, with its capability summary derived from the module. Returns at once with the build queued (`kind` `client`); poll `execModBuildStatus`, then attach it with `execModClientDeploy`. One build, server or CLIENT, at a time per player. Requires the 'write_client_code' permission in the app. */
5880
+ execModClientBuild: ExecBuild;
5881
+ /** Detach the CLIENT half of a mod on your grid (dev-tier preview), with every visitor's consent to it; the mod itself keeps running. Requires being the grid's current owner and 'write_client_code' on both the app tier and the grid. */
5882
+ execModClientDelete: Scalars['Boolean']['output'];
5883
+ /** Attach a CLIENT build of yours to your mod on a grid you own (dev-tier preview), replacing the CLIENT half it had; its version rises by one. A visitor's consent carries over only while the capability hash is unchanged. Requires being the grid's current owner, 'write_client_code' on both the app tier and the grid, the mod running as you, and the app's code admission admitting the new CLIENT version (an admission naming the mod, its listing or you). */
5884
+ execModClientDeploy: ExecModClient;
5773
5885
  /** Stop and remove a mod on your grid, with its state and versions (dev-tier preview). Requires being the grid's current owner and 'write_server_code' on both the app tier and the grid. */
5774
5886
  execModDelete: Scalars['Boolean']['output'];
5775
5887
  /** Deploy a mod build of yours to a grid you own (dev-tier preview): a new mod starts switched off; a running one restarts on the new version. Requires being the grid's current owner and 'write_server_code' on both the app tier and the grid. */
@@ -5786,6 +5898,8 @@ export type Mutation = {
5786
5898
  execModUnpublish: Scalars['Boolean']['output'];
5787
5899
  /** The kill switch for an app's ck-exec code, or one node type of it (dev-tier preview). Switched off, nothing of it is placed, what runs is persisted and stopped, and calls are refused with `Denied`; switched on, instances start as they are called. Requires the org 'manage_compute' permission. */
5788
5900
  execSetEnabled: ExecAppStatus;
5901
+ /** Trust one author's CLIENT halves on a grid you stand in (dev-tier preview), at the hash of their union (`authorCapabilityHash`): it covers the author's CLIENT halves there while their union is no wider, and consents to each current one at its own hash. Answers CONFLICT when the hash is not the current one. Requires access to the app. */
5902
+ execTrustAuthor: Scalars['Boolean']['output'];
5789
5903
  /** ADMIN/DESTRUCTIVE: revokes ALL of the target user’s sessions by deleting every game_token row, forcing re-authentication on every device. Returns true if at least one session was revoked. Requires a super-admin bearer game token (and the management API enabled). */
5790
5904
  forceLogoutUser: Scalars['Boolean']['output'];
5791
5905
  /** Operator only (is_operator). Deletes the stored deliverability rows for one address (email_status and email_events) and returns how many rows went. Exists so a verification run is not reading the previous run's events, and so an address suppressed by a bounce that has since been fixed can be given another chance. Returns 0 when there was nothing stored. */
@@ -6414,6 +6528,11 @@ export type MutationExecConnectAsDeveloperArgs = {
6414
6528
  key?: InputMaybe<Scalars['String']['input']>;
6415
6529
  nodeType?: InputMaybe<Scalars['String']['input']>;
6416
6530
  };
6531
+ export type MutationExecConsentClientModArgs = {
6532
+ appId: Scalars['BigInt']['input'];
6533
+ capabilityHash: Scalars['String']['input'];
6534
+ modId: Scalars['String']['input'];
6535
+ };
6417
6536
  export type MutationExecDeployArgs = {
6418
6537
  input: ExecDeployInput;
6419
6538
  };
@@ -6421,6 +6540,21 @@ export type MutationExecModBuildArgs = {
6421
6540
  appId: Scalars['BigInt']['input'];
6422
6541
  crate: ExecBuildCrateInput;
6423
6542
  };
6543
+ export type MutationExecModClientBuildArgs = {
6544
+ appId: Scalars['BigInt']['input'];
6545
+ crate: ExecBuildCrateInput;
6546
+ };
6547
+ export type MutationExecModClientDeleteArgs = {
6548
+ appId: Scalars['BigInt']['input'];
6549
+ gridId: Scalars['BigInt']['input'];
6550
+ name: Scalars['String']['input'];
6551
+ };
6552
+ export type MutationExecModClientDeployArgs = {
6553
+ appId: Scalars['BigInt']['input'];
6554
+ buildId: Scalars['String']['input'];
6555
+ gridId: Scalars['BigInt']['input'];
6556
+ name: Scalars['String']['input'];
6557
+ };
6424
6558
  export type MutationExecModDeleteArgs = {
6425
6559
  appId: Scalars['BigInt']['input'];
6426
6560
  gridId: Scalars['BigInt']['input'];
@@ -6467,6 +6601,12 @@ export type MutationExecSetEnabledArgs = {
6467
6601
  enabled: Scalars['Boolean']['input'];
6468
6602
  nodeType?: InputMaybe<Scalars['String']['input']>;
6469
6603
  };
6604
+ export type MutationExecTrustAuthorArgs = {
6605
+ appId: Scalars['BigInt']['input'];
6606
+ authorId: Scalars['BigInt']['input'];
6607
+ capabilityHash: Scalars['String']['input'];
6608
+ gridId: Scalars['BigInt']['input'];
6609
+ };
6470
6610
  export type MutationForceLogoutUserArgs = {
6471
6611
  userId: Scalars['BigInt']['input'];
6472
6612
  };
@@ -8453,12 +8593,16 @@ export type Query = {
8453
8593
  execBuildStatus: Maybe<ExecBuild>;
8454
8594
  /** Calls to each endpoint of an app's ck-exec code over the last minutes, by outcome, with their latency, most called first (dev-tier preview). Each execution host reports a minute once it ends; counters are kept 7 days. Requires the org 'view_compute_diagnostics' permission. */
8455
8595
  execEndpointStats: Array<ExecEndpointStat>;
8596
+ /** The CLIENT halves a grid serves (dev-tier preview): those of its mods that are switched on, not stopped by the kill ladder, running as the grid's owner and admitted, each with its capability summary and hash and whether you consented to it, and its author's union summary and hash and whether you trust them. Show one prompt per author and call `execTrustAuthor` (or `execConsentClientMod` per CLIENT half), fetch with `execModClientArtifact`, cache by digest, and poll this to stop CLIENT halves that were removed or changed. Requires access to the app. */
8597
+ execGridClientMods: Array<ExecGridClientMod>;
8456
8598
  /** What the execution manager has placed for an app: every instance, its phase and host (dev-tier preview). Requires the org 'view_compute_diagnostics' permission. */
8457
8599
  execInstances: Array<ExecInstance>;
8458
8600
  /** Guest log lines from an app's ck-exec instances (`ctx.log`), newest first, kept for 24 hours (dev-tier preview). Requires the org 'view_compute_diagnostics' permission. */
8459
8601
  execLogs: Array<ExecLogLine>;
8460
8602
  /** A mod build of yours: its status, compiler log and module (dev-tier preview). Builds are kept for 7 days. */
8461
8603
  execModBuildStatus: ExecBuild;
8604
+ /** A served CLIENT half's module, for the browser broker (dev-tier preview). Served only to a player holding 'run_client_code' in the app, standing in the mod's grid now, who consented to it at its current hash or trusts its author at a union no wider; every refusal answers NOT_FOUND. At most 12 fetches a minute per player and mod on each API instance (RATE_LIMITED); the module never changes for its digest, so cache it. */
8605
+ execModClientArtifact: ExecModClientArtifact;
8462
8606
  /** The app's mod marketplace: listed mods, most installed first (dev-tier preview). Requires access to the app. */
8463
8607
  execModListings: Array<ExecModListing>;
8464
8608
  /** A mod of yours' guest log lines (`ctx.log`), newest first, kept for 24 hours (dev-tier preview). */
@@ -9066,6 +9210,10 @@ export type QueryExecEndpointStatsArgs = {
9066
9210
  nodeType?: InputMaybe<Scalars['String']['input']>;
9067
9211
  sinceMinutes?: InputMaybe<Scalars['Int']['input']>;
9068
9212
  };
9213
+ export type QueryExecGridClientModsArgs = {
9214
+ appId: Scalars['BigInt']['input'];
9215
+ gridId: Scalars['BigInt']['input'];
9216
+ };
9069
9217
  export type QueryExecInstancesArgs = {
9070
9218
  appId: Scalars['BigInt']['input'];
9071
9219
  };
@@ -9082,6 +9230,10 @@ export type QueryExecModBuildStatusArgs = {
9082
9230
  appId: Scalars['BigInt']['input'];
9083
9231
  buildId: Scalars['String']['input'];
9084
9232
  };
9233
+ export type QueryExecModClientArtifactArgs = {
9234
+ appId: Scalars['BigInt']['input'];
9235
+ modId: Scalars['String']['input'];
9236
+ };
9085
9237
  export type QueryExecModListingsArgs = {
9086
9238
  appId: Scalars['BigInt']['input'];
9087
9239
  };
@@ -14559,6 +14711,7 @@ export type ExecBuildFieldsFragment = {
14559
14711
  __typename?: 'ExecBuild';
14560
14712
  buildId: string;
14561
14713
  status: string;
14714
+ kind: string;
14562
14715
  log: string | null;
14563
14716
  createdAt: string;
14564
14717
  startedAt: string | null;
@@ -14568,6 +14721,9 @@ export type ExecBuildFieldsFragment = {
14568
14721
  crate: string;
14569
14722
  digest: string;
14570
14723
  sizeBytes: number;
14724
+ capabilitySummaryJson: string | null;
14725
+ capabilityHash: string | null;
14726
+ tickIntervalMs: number | null;
14571
14727
  }>;
14572
14728
  };
14573
14729
  export type ExecBuildMutationVariables = Exact<{
@@ -14579,6 +14735,7 @@ export type ExecBuildMutation = {
14579
14735
  __typename?: 'ExecBuild';
14580
14736
  buildId: string;
14581
14737
  status: string;
14738
+ kind: string;
14582
14739
  log: string | null;
14583
14740
  createdAt: string;
14584
14741
  startedAt: string | null;
@@ -14588,6 +14745,9 @@ export type ExecBuildMutation = {
14588
14745
  crate: string;
14589
14746
  digest: string;
14590
14747
  sizeBytes: number;
14748
+ capabilitySummaryJson: string | null;
14749
+ capabilityHash: string | null;
14750
+ tickIntervalMs: number | null;
14591
14751
  }>;
14592
14752
  };
14593
14753
  };
@@ -14601,6 +14761,7 @@ export type ExecBuildStatusQuery = {
14601
14761
  __typename?: 'ExecBuild';
14602
14762
  buildId: string;
14603
14763
  status: string;
14764
+ kind: string;
14604
14765
  log: string | null;
14605
14766
  createdAt: string;
14606
14767
  startedAt: string | null;
@@ -14610,6 +14771,9 @@ export type ExecBuildStatusQuery = {
14610
14771
  crate: string;
14611
14772
  digest: string;
14612
14773
  sizeBytes: number;
14774
+ capabilitySummaryJson: string | null;
14775
+ capabilityHash: string | null;
14776
+ tickIntervalMs: number | null;
14613
14777
  }>;
14614
14778
  } | null;
14615
14779
  };
@@ -14637,6 +14801,10 @@ export type ExecModListingFieldsFragment = {
14637
14801
  sourceVersion: number;
14638
14802
  digest: string;
14639
14803
  installs: number;
14804
+ clientDigest: string | null;
14805
+ clientCapabilitySummaryJson: string | null;
14806
+ clientCapabilityHash: string | null;
14807
+ clientTickIntervalMs: number | null;
14640
14808
  createdAt: string;
14641
14809
  delistedAt: string | null;
14642
14810
  };
@@ -14675,6 +14843,7 @@ export type ExecModBuildMutation = {
14675
14843
  __typename?: 'ExecBuild';
14676
14844
  buildId: string;
14677
14845
  status: string;
14846
+ kind: string;
14678
14847
  log: string | null;
14679
14848
  createdAt: string;
14680
14849
  startedAt: string | null;
@@ -14684,6 +14853,9 @@ export type ExecModBuildMutation = {
14684
14853
  crate: string;
14685
14854
  digest: string;
14686
14855
  sizeBytes: number;
14856
+ capabilitySummaryJson: string | null;
14857
+ capabilityHash: string | null;
14858
+ tickIntervalMs: number | null;
14687
14859
  }>;
14688
14860
  };
14689
14861
  };
@@ -14697,6 +14869,7 @@ export type ExecModBuildStatusQuery = {
14697
14869
  __typename?: 'ExecBuild';
14698
14870
  buildId: string;
14699
14871
  status: string;
14872
+ kind: string;
14700
14873
  log: string | null;
14701
14874
  createdAt: string;
14702
14875
  startedAt: string | null;
@@ -14706,6 +14879,9 @@ export type ExecModBuildStatusQuery = {
14706
14879
  crate: string;
14707
14880
  digest: string;
14708
14881
  sizeBytes: number;
14882
+ capabilitySummaryJson: string | null;
14883
+ capabilityHash: string | null;
14884
+ tickIntervalMs: number | null;
14709
14885
  }>;
14710
14886
  };
14711
14887
  };
@@ -14846,6 +15022,10 @@ export type ExecModPublishMutation = {
14846
15022
  sourceVersion: number;
14847
15023
  digest: string;
14848
15024
  installs: number;
15025
+ clientDigest: string | null;
15026
+ clientCapabilitySummaryJson: string | null;
15027
+ clientCapabilityHash: string | null;
15028
+ clientTickIntervalMs: number | null;
14849
15029
  createdAt: string;
14850
15030
  delistedAt: string | null;
14851
15031
  };
@@ -14865,6 +15045,10 @@ export type ExecModListingsQuery = {
14865
15045
  sourceVersion: number;
14866
15046
  digest: string;
14867
15047
  installs: number;
15048
+ clientDigest: string | null;
15049
+ clientCapabilitySummaryJson: string | null;
15050
+ clientCapabilityHash: string | null;
15051
+ clientTickIntervalMs: number | null;
14868
15052
  createdAt: string;
14869
15053
  delistedAt: string | null;
14870
15054
  }>;
@@ -14954,6 +15138,162 @@ export type ExecModSetSwitchMutation = {
14954
15138
  createdAt: string;
14955
15139
  }>;
14956
15140
  };
15141
+ export type ExecModClientFieldsFragment = {
15142
+ __typename?: 'ExecModClient';
15143
+ modId: string;
15144
+ gridId: string;
15145
+ name: string;
15146
+ ownerId: string;
15147
+ clientVersion: number;
15148
+ digest: string;
15149
+ sizeBytes: number;
15150
+ capabilitySummaryJson: string;
15151
+ capabilityHash: string;
15152
+ tickIntervalMs: number;
15153
+ updatedAt: string;
15154
+ };
15155
+ export type ExecGridClientModFieldsFragment = {
15156
+ __typename?: 'ExecGridClientMod';
15157
+ modId: string;
15158
+ name: string;
15159
+ gridId: string;
15160
+ authorId: string;
15161
+ listingId: string | null;
15162
+ clientVersion: number;
15163
+ digest: string;
15164
+ capabilitySummaryJson: string;
15165
+ capabilityHash: string;
15166
+ tickIntervalMs: number;
15167
+ callerConsented: boolean;
15168
+ authorCapabilitySummaryJson: string;
15169
+ authorCapabilityHash: string;
15170
+ callerTrustsAuthor: boolean;
15171
+ updatedAt: string;
15172
+ };
15173
+ export type ExecModClientBuildMutationVariables = Exact<{
15174
+ appId: Scalars['BigInt']['input'];
15175
+ crate: ExecBuildCrateInput;
15176
+ }>;
15177
+ export type ExecModClientBuildMutation = {
15178
+ __typename?: 'Mutation';
15179
+ execModClientBuild: {
15180
+ __typename?: 'ExecBuild';
15181
+ buildId: string;
15182
+ status: string;
15183
+ kind: string;
15184
+ log: string | null;
15185
+ createdAt: string;
15186
+ startedAt: string | null;
15187
+ finishedAt: string | null;
15188
+ artifacts: Array<{
15189
+ __typename?: 'ExecBuildArtifact';
15190
+ crate: string;
15191
+ digest: string;
15192
+ sizeBytes: number;
15193
+ capabilitySummaryJson: string | null;
15194
+ capabilityHash: string | null;
15195
+ tickIntervalMs: number | null;
15196
+ }>;
15197
+ };
15198
+ };
15199
+ export type ExecModClientDeployMutationVariables = Exact<{
15200
+ appId: Scalars['BigInt']['input'];
15201
+ gridId: Scalars['BigInt']['input'];
15202
+ name: Scalars['String']['input'];
15203
+ buildId: Scalars['String']['input'];
15204
+ }>;
15205
+ export type ExecModClientDeployMutation = {
15206
+ __typename?: 'Mutation';
15207
+ execModClientDeploy: {
15208
+ __typename?: 'ExecModClient';
15209
+ modId: string;
15210
+ gridId: string;
15211
+ name: string;
15212
+ ownerId: string;
15213
+ clientVersion: number;
15214
+ digest: string;
15215
+ sizeBytes: number;
15216
+ capabilitySummaryJson: string;
15217
+ capabilityHash: string;
15218
+ tickIntervalMs: number;
15219
+ updatedAt: string;
15220
+ };
15221
+ };
15222
+ export type ExecModClientDeleteMutationVariables = Exact<{
15223
+ appId: Scalars['BigInt']['input'];
15224
+ gridId: Scalars['BigInt']['input'];
15225
+ name: Scalars['String']['input'];
15226
+ }>;
15227
+ export type ExecModClientDeleteMutation = {
15228
+ __typename?: 'Mutation';
15229
+ execModClientDelete: boolean;
15230
+ };
15231
+ export type ExecGridClientModsQueryVariables = Exact<{
15232
+ appId: Scalars['BigInt']['input'];
15233
+ gridId: Scalars['BigInt']['input'];
15234
+ }>;
15235
+ export type ExecGridClientModsQuery = {
15236
+ __typename?: 'Query';
15237
+ execGridClientMods: Array<{
15238
+ __typename?: 'ExecGridClientMod';
15239
+ modId: string;
15240
+ name: string;
15241
+ gridId: string;
15242
+ authorId: string;
15243
+ listingId: string | null;
15244
+ clientVersion: number;
15245
+ digest: string;
15246
+ capabilitySummaryJson: string;
15247
+ capabilityHash: string;
15248
+ tickIntervalMs: number;
15249
+ callerConsented: boolean;
15250
+ authorCapabilitySummaryJson: string;
15251
+ authorCapabilityHash: string;
15252
+ callerTrustsAuthor: boolean;
15253
+ updatedAt: string;
15254
+ }>;
15255
+ };
15256
+ export type ExecConsentClientModMutationVariables = Exact<{
15257
+ appId: Scalars['BigInt']['input'];
15258
+ modId: Scalars['String']['input'];
15259
+ capabilityHash: Scalars['String']['input'];
15260
+ }>;
15261
+ export type ExecConsentClientModMutation = {
15262
+ __typename?: 'Mutation';
15263
+ execConsentClientMod: boolean;
15264
+ };
15265
+ export type ExecTrustAuthorMutationVariables = Exact<{
15266
+ appId: Scalars['BigInt']['input'];
15267
+ gridId: Scalars['BigInt']['input'];
15268
+ authorId: Scalars['BigInt']['input'];
15269
+ capabilityHash: Scalars['String']['input'];
15270
+ }>;
15271
+ export type ExecTrustAuthorMutation = {
15272
+ __typename?: 'Mutation';
15273
+ execTrustAuthor: boolean;
15274
+ };
15275
+ export type ExecModClientArtifactQueryVariables = Exact<{
15276
+ appId: Scalars['BigInt']['input'];
15277
+ modId: Scalars['String']['input'];
15278
+ }>;
15279
+ export type ExecModClientArtifactQuery = {
15280
+ __typename?: 'Query';
15281
+ execModClientArtifact: {
15282
+ __typename?: 'ExecModClientArtifact';
15283
+ modId: string;
15284
+ name: string;
15285
+ gridId: string;
15286
+ clientVersion: number;
15287
+ digest: string;
15288
+ wasmBase64: string;
15289
+ sizeBytes: number;
15290
+ capabilitySummaryJson: string;
15291
+ capabilityHash: string;
15292
+ tickIntervalMs: number;
15293
+ fuelPerDispatch: string;
15294
+ abiVersion: number;
15295
+ };
15296
+ };
14957
15297
  export type GridOwnershipFieldsFragment = {
14958
15298
  __typename?: 'GridOwnership';
14959
15299
  gridOwnershipId: string;
@@ -21115,6 +21455,8 @@ export declare const ExecBuildFieldsFragmentDoc: DocumentNode<ExecBuildFieldsFra
21115
21455
  export declare const ExecModFieldsFragmentDoc: DocumentNode<ExecModFieldsFragment, unknown>;
21116
21456
  export declare const ExecModListingFieldsFragmentDoc: DocumentNode<ExecModListingFieldsFragment, unknown>;
21117
21457
  export declare const ExecModSwitchFieldsFragmentDoc: DocumentNode<ExecModSwitchFieldsFragment, unknown>;
21458
+ export declare const ExecModClientFieldsFragmentDoc: DocumentNode<ExecModClientFieldsFragment, unknown>;
21459
+ export declare const ExecGridClientModFieldsFragmentDoc: DocumentNode<ExecGridClientModFieldsFragment, unknown>;
21118
21460
  export declare const GridOwnershipFieldsFragmentDoc: DocumentNode<GridOwnershipFieldsFragment, unknown>;
21119
21461
  export declare const GmAutomationFieldsFragmentDoc: DocumentNode<GmAutomationFieldsFragment, unknown>;
21120
21462
  export declare const GmAutomationTriggerFieldsFragmentDoc: DocumentNode<GmAutomationTriggerFieldsFragment, unknown>;
@@ -21285,6 +21627,13 @@ export declare const ExecModInstallDocument: DocumentNode<ExecModInstallMutation
21285
21627
  export declare const ExecAppModsDocument: DocumentNode<ExecAppModsQuery, ExecAppModsQueryVariables>;
21286
21628
  export declare const ExecModSwitchesDocument: DocumentNode<ExecModSwitchesQuery, ExecModSwitchesQueryVariables>;
21287
21629
  export declare const ExecModSetSwitchDocument: DocumentNode<ExecModSetSwitchMutation, ExecModSetSwitchMutationVariables>;
21630
+ export declare const ExecModClientBuildDocument: DocumentNode<ExecModClientBuildMutation, ExecModClientBuildMutationVariables>;
21631
+ export declare const ExecModClientDeployDocument: DocumentNode<ExecModClientDeployMutation, ExecModClientDeployMutationVariables>;
21632
+ export declare const ExecModClientDeleteDocument: DocumentNode<ExecModClientDeleteMutation, ExecModClientDeleteMutationVariables>;
21633
+ export declare const ExecGridClientModsDocument: DocumentNode<ExecGridClientModsQuery, ExecGridClientModsQueryVariables>;
21634
+ export declare const ExecConsentClientModDocument: DocumentNode<ExecConsentClientModMutation, ExecConsentClientModMutationVariables>;
21635
+ export declare const ExecTrustAuthorDocument: DocumentNode<ExecTrustAuthorMutation, ExecTrustAuthorMutationVariables>;
21636
+ export declare const ExecModClientArtifactDocument: DocumentNode<ExecModClientArtifactQuery, ExecModClientArtifactQueryVariables>;
21288
21637
  export declare const GridOwnershipDocument: DocumentNode<GridOwnershipQuery, GridOwnershipQueryVariables>;
21289
21638
  export declare const AssignGridOwnershipDocument: DocumentNode<AssignGridOwnershipMutation, AssignGridOwnershipMutationVariables>;
21290
21639
  export declare const TransferGridOwnershipDocument: DocumentNode<TransferGridOwnershipMutation, TransferGridOwnershipMutationVariables>;