@crowdedkingdoms/crowdyjs 17.13.0-dev.1 → 18.0.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 (284) hide show
  1. package/MIGRATION.md +163 -1
  2. package/README.md +142 -146
  3. package/dist/crowdy-client.d.ts +12 -31
  4. package/dist/crowdy-client.d.ts.map +1 -1
  5. package/dist/crowdy-client.js +15 -37
  6. package/dist/crowdy-dsh/bridge.d.ts.map +1 -1
  7. package/dist/crowdy-dsh/bridge.js +3 -6
  8. package/dist/crowdy-studio/controller.d.ts +59 -57
  9. package/dist/crowdy-studio/controller.d.ts.map +1 -1
  10. package/dist/crowdy-studio/controller.js +268 -206
  11. package/dist/crowdy-studio/diagnostics.d.ts +3 -12
  12. package/dist/crowdy-studio/diagnostics.d.ts.map +1 -1
  13. package/dist/crowdy-studio/dom-shell.d.ts +2 -4
  14. package/dist/crowdy-studio/dom-shell.d.ts.map +1 -1
  15. package/dist/crowdy-studio/dom-shell.js +16 -47
  16. package/dist/crowdy-studio/embed/hud-layer.d.ts +1 -1
  17. package/dist/crowdy-studio/embed/panel.d.ts +3 -12
  18. package/dist/crowdy-studio/embed/panel.d.ts.map +1 -1
  19. package/dist/crowdy-studio/embed/panel.js +3 -6
  20. package/dist/crowdy-studio/index.d.ts +1 -3
  21. package/dist/crowdy-studio/index.d.ts.map +1 -1
  22. package/dist/crowdy-studio/index.js +0 -2
  23. package/dist/crowdy-studio/models.d.ts +3 -4
  24. package/dist/crowdy-studio/models.d.ts.map +1 -1
  25. package/dist/crowdy-studio/starter-projects.d.ts +8 -4
  26. package/dist/crowdy-studio/starter-projects.d.ts.map +1 -1
  27. package/dist/crowdy-studio/starter-projects.js +83 -100
  28. package/dist/domains/appAccess.d.ts +14 -1
  29. package/dist/domains/appAccess.d.ts.map +1 -1
  30. package/dist/domains/appAccess.js +37 -1
  31. package/dist/domains/exec.d.ts +162 -15
  32. package/dist/domains/exec.d.ts.map +1 -1
  33. package/dist/domains/exec.js +180 -18
  34. package/dist/domains/host.d.ts +3 -3
  35. package/dist/domains/host.js +3 -3
  36. package/dist/domains/marketplace.d.ts +9 -58
  37. package/dist/domains/marketplace.d.ts.map +1 -1
  38. package/dist/domains/marketplace.js +9 -106
  39. package/dist/domains/playerWallet.d.ts +6 -12
  40. package/dist/domains/playerWallet.d.ts.map +1 -1
  41. package/dist/domains/playerWallet.js +6 -21
  42. package/dist/errors.d.ts +7 -13
  43. package/dist/errors.d.ts.map +1 -1
  44. package/dist/errors.js +6 -10
  45. package/dist/generated/graphql.d.ts +1384 -7977
  46. package/dist/generated/graphql.d.ts.map +1 -1
  47. package/dist/generated/graphql.js +22 -321
  48. package/dist/grid-mods/exec-client-halves.d.ts +156 -0
  49. package/dist/grid-mods/exec-client-halves.d.ts.map +1 -0
  50. package/dist/grid-mods/exec-client-halves.js +356 -0
  51. package/dist/grid-mods/grid-host-calls.d.ts +29 -15
  52. package/dist/grid-mods/grid-host-calls.d.ts.map +1 -1
  53. package/dist/grid-mods/grid-host-calls.js +40 -44
  54. package/dist/grid-mods/index.d.ts +1 -0
  55. package/dist/grid-mods/index.d.ts.map +1 -1
  56. package/dist/grid-mods/index.js +1 -0
  57. package/dist/grid-mods/mod-runtime.d.ts +21 -6
  58. package/dist/grid-mods/mod-runtime.d.ts.map +1 -1
  59. package/dist/grid-mods/mod-runtime.js +6 -2
  60. package/dist/grid-scope.d.ts +0 -188
  61. package/dist/grid-scope.d.ts.map +1 -1
  62. package/dist/grid-scope.js +0 -69
  63. package/dist/index.d.ts +12 -18
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +11 -16
  66. package/dist/kit/actions.d.ts +5 -9
  67. package/dist/kit/actions.d.ts.map +1 -1
  68. package/dist/kit/actions.js +5 -9
  69. package/dist/kit/index.d.ts +2 -33
  70. package/dist/kit/index.d.ts.map +1 -1
  71. package/dist/kit/index.js +1 -32
  72. package/dist/kit/kit.d.ts +8 -208
  73. package/dist/kit/kit.d.ts.map +1 -1
  74. package/dist/kit/kit.js +5 -163
  75. package/dist/kit/social.d.ts +1 -3
  76. package/dist/kit/social.d.ts.map +1 -1
  77. package/dist/kit/social.js +1 -3
  78. package/dist/kit/wire.d.ts +16 -5
  79. package/dist/kit/wire.d.ts.map +1 -1
  80. package/dist/kit/wire.js +19 -5
  81. package/dist/live-coding/assets/browser-authoring-index.json +1 -1
  82. package/dist/live-coding/assets/manifest.json +1 -1
  83. package/dist/live-coding/browser-authoring-index.generated.d.ts.map +1 -1
  84. package/dist/live-coding/browser-authoring-index.generated.js +1496 -4386
  85. package/dist/live-coding/rust-analysis.d.ts.map +1 -1
  86. package/dist/live-coding/rust-analysis.js +31 -23
  87. package/dist/player-runtime/client-host-calls.d.ts +8 -0
  88. package/dist/player-runtime/client-host-calls.d.ts.map +1 -0
  89. package/dist/player-runtime/client-host-calls.js +28 -0
  90. package/dist/player-runtime/glue-runtime.d.ts +27 -10
  91. package/dist/player-runtime/glue-runtime.d.ts.map +1 -1
  92. package/dist/player-runtime/glue-runtime.js +40 -45
  93. package/dist/player-runtime/glue-sab.d.ts +2 -2
  94. package/dist/player-runtime/glue-sab.js +2 -2
  95. package/dist/player-runtime/player-code-broker.d.ts +80 -24
  96. package/dist/player-runtime/player-code-broker.d.ts.map +1 -1
  97. package/dist/player-runtime/player-code-broker.js +169 -41
  98. package/dist/player-runtime/player-glue-worker.d.ts +8 -8
  99. package/dist/player-runtime/player-glue-worker.d.ts.map +1 -1
  100. package/dist/player-runtime/player-glue-worker.js +26 -9
  101. package/dist/stores/actors.d.ts +12 -2
  102. package/dist/stores/actors.d.ts.map +1 -1
  103. package/dist/stores/actors.js +43 -18
  104. package/dist/stores/chunks.d.ts +12 -0
  105. package/dist/stores/chunks.d.ts.map +1 -1
  106. package/dist/stores/chunks.js +112 -39
  107. package/dist/stores/durable.d.ts.map +1 -1
  108. package/dist/stores/durable.js +2 -1
  109. package/dist/stores/inbox.d.ts +1 -1
  110. package/dist/stores/inbox.d.ts.map +1 -1
  111. package/dist/stores/index.d.ts +0 -11
  112. package/dist/stores/index.d.ts.map +1 -1
  113. package/dist/stores/index.js +0 -4
  114. package/dist/stores/session.d.ts +0 -2
  115. package/dist/stores/session.d.ts.map +1 -1
  116. package/package.json +1 -1
  117. package/dist/crowdy-studio/model-lint-log.d.ts +0 -76
  118. package/dist/crowdy-studio/model-lint-log.d.ts.map +0 -1
  119. package/dist/crowdy-studio/model-lint-log.js +0 -93
  120. package/dist/crowdy-studio/model-lint.d.ts +0 -61
  121. package/dist/crowdy-studio/model-lint.d.ts.map +0 -1
  122. package/dist/crowdy-studio/model-lint.js +0 -45
  123. package/dist/domains/compute.d.ts +0 -208
  124. package/dist/domains/compute.d.ts.map +0 -1
  125. package/dist/domains/compute.js +0 -274
  126. package/dist/domains/controlPlane.d.ts +0 -38
  127. package/dist/domains/controlPlane.d.ts.map +0 -1
  128. package/dist/domains/controlPlane.js +0 -43
  129. package/dist/domains/gameModel.d.ts +0 -1174
  130. package/dist/domains/gameModel.d.ts.map +0 -1
  131. package/dist/domains/gameModel.js +0 -1333
  132. package/dist/domains/playerCompute.d.ts +0 -91
  133. package/dist/domains/playerCompute.d.ts.map +0 -1
  134. package/dist/domains/playerCompute.js +0 -136
  135. package/dist/domains/playerModel.d.ts +0 -20
  136. package/dist/domains/playerModel.d.ts.map +0 -1
  137. package/dist/domains/playerModel.js +0 -54
  138. package/dist/kit/abilities.d.ts +0 -66
  139. package/dist/kit/abilities.d.ts.map +0 -1
  140. package/dist/kit/abilities.js +0 -71
  141. package/dist/kit/blueprints/combat.d.ts +0 -81
  142. package/dist/kit/blueprints/combat.d.ts.map +0 -1
  143. package/dist/kit/blueprints/combat.js +0 -357
  144. package/dist/kit/blueprints/core.d.ts +0 -222
  145. package/dist/kit/blueprints/core.d.ts.map +0 -1
  146. package/dist/kit/blueprints/core.js +0 -185
  147. package/dist/kit/blueprints/decks.d.ts +0 -50
  148. package/dist/kit/blueprints/decks.d.ts.map +0 -1
  149. package/dist/kit/blueprints/decks.js +0 -163
  150. package/dist/kit/blueprints/economy.d.ts +0 -88
  151. package/dist/kit/blueprints/economy.d.ts.map +0 -1
  152. package/dist/kit/blueprints/economy.js +0 -533
  153. package/dist/kit/blueprints/guild.d.ts +0 -51
  154. package/dist/kit/blueprints/guild.d.ts.map +0 -1
  155. package/dist/kit/blueprints/guild.js +0 -50
  156. package/dist/kit/blueprints/index.d.ts +0 -23
  157. package/dist/kit/blueprints/index.d.ts.map +0 -1
  158. package/dist/kit/blueprints/index.js +0 -22
  159. package/dist/kit/blueprints/inventory.d.ts +0 -84
  160. package/dist/kit/blueprints/inventory.d.ts.map +0 -1
  161. package/dist/kit/blueprints/inventory.js +0 -257
  162. package/dist/kit/blueprints/leaderboards.d.ts +0 -49
  163. package/dist/kit/blueprints/leaderboards.d.ts.map +0 -1
  164. package/dist/kit/blueprints/leaderboards.js +0 -126
  165. package/dist/kit/blueprints/liveops.d.ts +0 -42
  166. package/dist/kit/blueprints/liveops.d.ts.map +0 -1
  167. package/dist/kit/blueprints/liveops.js +0 -170
  168. package/dist/kit/blueprints/locks.d.ts +0 -82
  169. package/dist/kit/blueprints/locks.d.ts.map +0 -1
  170. package/dist/kit/blueprints/locks.js +0 -155
  171. package/dist/kit/blueprints/loot.d.ts +0 -90
  172. package/dist/kit/blueprints/loot.d.ts.map +0 -1
  173. package/dist/kit/blueprints/loot.js +0 -229
  174. package/dist/kit/blueprints/matches.d.ts +0 -84
  175. package/dist/kit/blueprints/matches.d.ts.map +0 -1
  176. package/dist/kit/blueprints/matches.js +0 -349
  177. package/dist/kit/blueprints/moderation.d.ts +0 -32
  178. package/dist/kit/blueprints/moderation.d.ts.map +0 -1
  179. package/dist/kit/blueprints/moderation.js +0 -140
  180. package/dist/kit/blueprints/npcs.d.ts +0 -78
  181. package/dist/kit/blueprints/npcs.d.ts.map +0 -1
  182. package/dist/kit/blueprints/npcs.js +0 -125
  183. package/dist/kit/blueprints/plots.d.ts +0 -63
  184. package/dist/kit/blueprints/plots.d.ts.map +0 -1
  185. package/dist/kit/blueprints/plots.js +0 -151
  186. package/dist/kit/blueprints/progression.d.ts +0 -68
  187. package/dist/kit/blueprints/progression.d.ts.map +0 -1
  188. package/dist/kit/blueprints/progression.js +0 -324
  189. package/dist/kit/blueprints/quests.d.ts +0 -72
  190. package/dist/kit/blueprints/quests.d.ts.map +0 -1
  191. package/dist/kit/blueprints/quests.js +0 -285
  192. package/dist/kit/blueprints/worldsim.d.ts +0 -91
  193. package/dist/kit/blueprints/worldsim.d.ts.map +0 -1
  194. package/dist/kit/blueprints/worldsim.js +0 -468
  195. package/dist/kit/combat.d.ts +0 -141
  196. package/dist/kit/combat.d.ts.map +0 -1
  197. package/dist/kit/combat.js +0 -196
  198. package/dist/kit/decks.d.ts +0 -157
  199. package/dist/kit/decks.d.ts.map +0 -1
  200. package/dist/kit/decks.js +0 -186
  201. package/dist/kit/director.d.ts +0 -88
  202. package/dist/kit/director.d.ts.map +0 -1
  203. package/dist/kit/director.js +0 -86
  204. package/dist/kit/economy.d.ts +0 -289
  205. package/dist/kit/economy.d.ts.map +0 -1
  206. package/dist/kit/economy.js +0 -427
  207. package/dist/kit/engine.d.ts +0 -48
  208. package/dist/kit/engine.d.ts.map +0 -1
  209. package/dist/kit/engine.js +0 -113
  210. package/dist/kit/features.d.ts +0 -60
  211. package/dist/kit/features.d.ts.map +0 -1
  212. package/dist/kit/features.js +0 -65
  213. package/dist/kit/instances.d.ts +0 -52
  214. package/dist/kit/instances.d.ts.map +0 -1
  215. package/dist/kit/instances.js +0 -60
  216. package/dist/kit/inventory.d.ts +0 -129
  217. package/dist/kit/inventory.d.ts.map +0 -1
  218. package/dist/kit/inventory.js +0 -200
  219. package/dist/kit/leaderboards.d.ts +0 -86
  220. package/dist/kit/leaderboards.d.ts.map +0 -1
  221. package/dist/kit/leaderboards.js +0 -133
  222. package/dist/kit/liveops.d.ts +0 -112
  223. package/dist/kit/liveops.d.ts.map +0 -1
  224. package/dist/kit/liveops.js +0 -183
  225. package/dist/kit/loot.d.ts +0 -128
  226. package/dist/kit/loot.d.ts.map +0 -1
  227. package/dist/kit/loot.js +0 -160
  228. package/dist/kit/matches.d.ts +0 -301
  229. package/dist/kit/matches.d.ts.map +0 -1
  230. package/dist/kit/matches.js +0 -458
  231. package/dist/kit/matchmaking.d.ts +0 -57
  232. package/dist/kit/matchmaking.d.ts.map +0 -1
  233. package/dist/kit/matchmaking.js +0 -59
  234. package/dist/kit/minigames.d.ts +0 -30
  235. package/dist/kit/minigames.d.ts.map +0 -1
  236. package/dist/kit/minigames.js +0 -38
  237. package/dist/kit/mobs.d.ts +0 -90
  238. package/dist/kit/mobs.d.ts.map +0 -1
  239. package/dist/kit/mobs.js +0 -98
  240. package/dist/kit/moderation.d.ts +0 -73
  241. package/dist/kit/moderation.d.ts.map +0 -1
  242. package/dist/kit/moderation.js +0 -103
  243. package/dist/kit/movement.d.ts +0 -78
  244. package/dist/kit/movement.d.ts.map +0 -1
  245. package/dist/kit/movement.js +0 -103
  246. package/dist/kit/notifications.d.ts +0 -45
  247. package/dist/kit/notifications.d.ts.map +0 -1
  248. package/dist/kit/notifications.js +0 -67
  249. package/dist/kit/npcs.d.ts +0 -226
  250. package/dist/kit/npcs.d.ts.map +0 -1
  251. package/dist/kit/npcs.js +0 -141
  252. package/dist/kit/objects.d.ts +0 -116
  253. package/dist/kit/objects.d.ts.map +0 -1
  254. package/dist/kit/objects.js +0 -119
  255. package/dist/kit/pets.d.ts +0 -85
  256. package/dist/kit/pets.d.ts.map +0 -1
  257. package/dist/kit/pets.js +0 -96
  258. package/dist/kit/plots.d.ts +0 -85
  259. package/dist/kit/plots.d.ts.map +0 -1
  260. package/dist/kit/plots.js +0 -113
  261. package/dist/kit/progression.d.ts +0 -181
  262. package/dist/kit/progression.d.ts.map +0 -1
  263. package/dist/kit/progression.js +0 -265
  264. package/dist/kit/quests.d.ts +0 -171
  265. package/dist/kit/quests.d.ts.map +0 -1
  266. package/dist/kit/quests.js +0 -237
  267. package/dist/kit/racing.d.ts +0 -85
  268. package/dist/kit/racing.d.ts.map +0 -1
  269. package/dist/kit/racing.js +0 -99
  270. package/dist/kit/shared.d.ts +0 -73
  271. package/dist/kit/shared.d.ts.map +0 -1
  272. package/dist/kit/shared.js +0 -101
  273. package/dist/kit/telemetry.d.ts +0 -66
  274. package/dist/kit/telemetry.d.ts.map +0 -1
  275. package/dist/kit/telemetry.js +0 -133
  276. package/dist/kit/territory.d.ts +0 -97
  277. package/dist/kit/territory.d.ts.map +0 -1
  278. package/dist/kit/territory.js +0 -114
  279. package/dist/kit/worldsim.d.ts +0 -263
  280. package/dist/kit/worldsim.d.ts.map +0 -1
  281. package/dist/kit/worldsim.js +0 -268
  282. package/dist/stores/model.d.ts +0 -81
  283. package/dist/stores/model.d.ts.map +0 -1
  284. package/dist/stores/model.js +0 -163
@@ -1,6 +1,6 @@
1
1
  import { decode, encode } from '@msgpack/msgpack';
2
- import { CrowdyError } from '../errors.js';
3
- import { ExecActivateVersionDocument, ExecAppStatusDocument, ExecBuildDocument, ExecBuildStatusDocument, ExecConnectAsDeveloperDocument, ExecConnectDocument, ExecDeployDocument, ExecEndpointStatsDocument, ExecInstancesDocument, ExecLogsDocument, ExecAppModsDocument, ExecModBuildDocument, ExecModBuildStatusDocument, ExecModDeleteDocument, ExecModDeployDocument, ExecModInstallDocument, ExecModListingsDocument, ExecModLogsDocument, ExecModPublishDocument, ExecModScope, ExecModSetEnabledDocument, ExecModSetSwitchDocument, ExecModStarterDocument, ExecModSwitchesDocument, ExecModUnpublishDocument, ExecModsDocument, ExecMyModsDocument, ExecSetEnabledDocument, ExecStartersDocument, ExecVersionsDocument, } from '../generated/graphql.js';
2
+ import { CrowdyError, CrowdyProtocolError } from '../errors.js';
3
+ import { ExecActivateVersionDocument, ExecAppStatusDocument, ExecBuildDocument, ExecBuildStatusDocument, ExecConnectAsDeveloperDocument, ExecConnectDocument, ExecConsentClientModDocument, ExecDeployDocument, ExecEndpointStatsDocument, ExecGridClientModsDocument, ExecInstancesDocument, ExecLogsDocument, ExecAppModsDocument, ExecModBuildDocument, ExecModBuildStatusDocument, ExecModClientArtifactDocument, ExecModClientBuildDocument, ExecModClientDeleteDocument, ExecModClientDeployDocument, ExecModDeleteDocument, ExecModDeployDocument, ExecModInstallDocument, ExecModListingsDocument, ExecModLogsDocument, ExecModPublishDocument, ExecModScope, ExecModSetEnabledDocument, ExecModSetSwitchDocument, ExecModStarterDocument, ExecModSwitchesDocument, ExecModUnpublishDocument, ExecModsDocument, ExecMyModsDocument, ExecSetEnabledDocument, ExecStartersDocument, ExecTrustAuthorDocument, ExecVersionsDocument, } from '../generated/graphql.js';
4
4
  export { ExecModScope };
5
5
  /**
6
6
  * ck-exec, the hub-and-spoke execution service (dev-tier preview).
@@ -519,10 +519,19 @@ function base64(bytes) {
519
519
  }
520
520
  return btoa(s);
521
521
  }
522
+ function fromBase64(b64) {
523
+ const binary = atob(b64);
524
+ const out = new Uint8Array(binary.length);
525
+ for (let i = 0; i < binary.length; i++)
526
+ out[i] = binary.charCodeAt(i);
527
+ return out;
528
+ }
522
529
  async function sha256Hex(bytes) {
523
530
  const d = new Uint8Array(await crypto.subtle.digest('SHA-256', bytes));
524
531
  return Array.from(d, (x) => x.toString(16).padStart(2, '0')).join('');
525
532
  }
533
+ /** The CLIENT ABI version the player runtime's glue implements (crowdy-client-sdk `ABI_VERSION`). */
534
+ export const EXEC_CLIENT_ABI_VERSION = 0;
526
535
  /** The node type players call a mod by: `mod:<name>`, keyed by its grid id. */
527
536
  export function execModType(name) {
528
537
  return `mod:${name}`;
@@ -537,18 +546,46 @@ function parseManifest(json) {
537
546
  return null;
538
547
  }
539
548
  }
549
+ function parseCapabilities(json) {
550
+ if (!json)
551
+ return null;
552
+ try {
553
+ const parsed = JSON.parse(json);
554
+ return parsed && typeof parsed === 'object' && !Array.isArray(parsed)
555
+ ? parsed
556
+ : null;
557
+ }
558
+ catch {
559
+ return null;
560
+ }
561
+ }
540
562
  function strip(v) {
541
563
  const { __typename: _, ...rest } = v;
542
564
  return rest;
543
565
  }
544
566
  function build(b) {
545
567
  const { __typename: _, artifacts, ...rest } = b;
546
- return { ...rest, artifacts: artifacts.map(strip) };
568
+ return {
569
+ ...rest,
570
+ artifacts: artifacts.map((a) => ({
571
+ ...strip(a),
572
+ capabilitySummary: parseCapabilities(a.capabilitySummaryJson),
573
+ })),
574
+ };
575
+ }
576
+ function listing(l) {
577
+ return { ...strip(l), clientCapabilitySummary: parseCapabilities(l.clientCapabilitySummaryJson) };
578
+ }
579
+ function crateInput(crate) {
580
+ const files = Array.isArray(crate.files)
581
+ ? crate.files
582
+ : Object.entries(crate.files).map(([path, content]) => ({ path, content }));
583
+ return { name: crate.name, files };
547
584
  }
548
585
  /**
549
586
  * `client.exec`: connecting players to ck-exec, building and deploying an app's nodes (and
550
- * the starter packs), and operating them (logs, instances, versions, rollback, the kill
551
- * switch, developer connections).
587
+ * the starter packs), operating them (logs, instances, versions, rollback, the kill switch,
588
+ * developer connections), and players' mods with their CLIENT halves.
552
589
  */
553
590
  export class ExecAPI {
554
591
  constructor(graphql) {
@@ -698,21 +735,15 @@ export class ExecAPI {
698
735
  * player. Requires `write_server_code` in the app.
699
736
  */
700
737
  async modBuild(appId, crate) {
701
- const files = Array.isArray(crate.files)
702
- ? crate.files
703
- : Object.entries(crate.files).map(([path, content]) => ({ path, content }));
704
- const data = await this.graphql.request(ExecModBuildDocument, {
705
- appId,
706
- crate: { name: crate.name, files },
707
- });
738
+ const data = await this.graphql.request(ExecModBuildDocument, { appId, crate: crateInput(crate) });
708
739
  return build(data.execModBuild);
709
740
  }
710
- /** A mod build of yours. */
741
+ /** A mod build of yours: a mod's (`kind` `exec`) or a CLIENT half's (`kind` `client`). */
711
742
  async modBuildStatus(appId, buildId) {
712
743
  const data = await this.graphql.request(ExecModBuildStatusDocument, { appId, buildId });
713
744
  return build(data.execModBuildStatus);
714
745
  }
715
- /** Polls a mod build until it succeeds or fails, like {@link waitForBuild}. */
746
+ /** Polls a mod build, server or CLIENT, until it succeeds or fails, like {@link waitForBuild}. */
716
747
  async waitForModBuild(appId, buildId, options = {}) {
717
748
  const until = Date.now() + (options.timeoutMs ?? 600000);
718
749
  for (;;) {
@@ -764,19 +795,22 @@ export class ExecAPI {
764
795
  /** Publishes a mod of yours, at its current version, for other grid owners to install. */
765
796
  async modPublish(appId, gridId, name, title, description) {
766
797
  const data = await this.graphql.request(ExecModPublishDocument, { appId, gridId, name, title, description });
767
- return strip(data.execModPublish);
798
+ return listing(data.execModPublish);
768
799
  }
769
- /** The app's listed mods, most installed first. */
800
+ /** The app's listed mods, most installed first, each with the CLIENT half it carries, if any. */
770
801
  async modListings(appId) {
771
802
  const data = await this.graphql.request(ExecModListingsDocument, { appId });
772
- return data.execModListings.map(strip);
803
+ return data.execModListings.map(listing);
773
804
  }
774
805
  /** Delists a listing you published; installed copies keep running. */
775
806
  async modUnpublish(appId, listingId) {
776
807
  const data = await this.graphql.request(ExecModUnpublishDocument, { appId, listingId });
777
808
  return data.execModUnpublish;
778
809
  }
779
- /** Installs a listing onto a grid you own as your own mod, switched off. */
810
+ /**
811
+ * Installs a listing onto a grid you own as your own mod, switched off, with the listing's
812
+ * CLIENT half if it has one; visitors, you too, consent to that CLIENT half afresh.
813
+ */
780
814
  async modInstall(appId, gridId, name, listingId) {
781
815
  const data = await this.graphql.request(ExecModInstallDocument, { appId, gridId, name, listingId });
782
816
  return strip(data.execModInstall);
@@ -800,6 +834,134 @@ export class ExecAPI {
800
834
  const data = await this.graphql.request(ExecModSetSwitchDocument, { appId, scope, off, ...options });
801
835
  return data.execModSetSwitch.map(strip);
802
836
  }
837
+ // ---- CLIENT halves: a mod's browser half ----
838
+ /**
839
+ * Builds the CLIENT half of a mod from one `crowdy-client-sdk` crate: compiled for
840
+ * `wasm32-unknown-unknown` in the build sandbox, fuel-metered and optimized there, checked
841
+ * against the CLIENT ABI and at most 512 KiB, with its capability summary derived from the
842
+ * module. Its `Cargo.toml` may have only `[package]`, `[lib]` as a cdylib, `[dependencies]` on
843
+ * `crowdy-client-sdk`, `serde` and `serde_json`, and `[package.metadata.crowdy]
844
+ * tick_interval_ms`. Returns at once with the build queued (`kind` `client`); wait with
845
+ * {@link waitForModBuild}, then attach it with {@link modClientDeploy}. One build, server or
846
+ * CLIENT, at a time per player. Requires `write_client_code` in the app.
847
+ */
848
+ async modClientBuild(appId, crate) {
849
+ const data = await this.graphql.request(ExecModClientBuildDocument, { appId, crate: crateInput(crate) });
850
+ return build(data.execModClientBuild);
851
+ }
852
+ /**
853
+ * Attaches a succeeded CLIENT build of yours to your mod `name` on a grid you own, replacing
854
+ * the CLIENT half it had; its `clientVersion` rises by one. The mod must exist and run as
855
+ * you. A visitor's consent carries over only while the capability hash is unchanged.
856
+ * Requires being the grid's owner, `write_client_code` on the app tier and the grid, and the
857
+ * app's code admission admitting the new CLIENT version.
858
+ */
859
+ async modClientDeploy(appId, gridId, name, buildId) {
860
+ const data = await this.graphql.request(ExecModClientDeployDocument, { appId, gridId, name, buildId });
861
+ const c = strip(data.execModClientDeploy);
862
+ return { ...c, capabilitySummary: parseCapabilities(c.capabilitySummaryJson) };
863
+ }
864
+ /** Detaches the CLIENT half of a mod on your grid, with every visitor's consent to it; the mod keeps running. */
865
+ async modClientDelete(appId, gridId, name) {
866
+ const data = await this.graphql.request(ExecModClientDeleteDocument, { appId, gridId, name });
867
+ return data.execModClientDelete;
868
+ }
869
+ /**
870
+ * The CLIENT halves a grid serves: those of its mods that are switched on, not stopped by the
871
+ * kill ladder, running as the grid's owner and admitted. Each has its capability summary and
872
+ * hash and whether you consented to it, and its author's union summary and hash and whether
873
+ * you trust them. Prompt once per author ({@link trustAuthor}) or per CLIENT half
874
+ * ({@link consentClientMod}), fetch with {@link modClientArtifactBytes}, cache by `digest`, and
875
+ * poll this to stop the CLIENT halves that are no longer listed or whose digest changed:
876
+ * `ExecClientHalves` does all of that for a game. Requires access to the app.
877
+ */
878
+ async gridClientMods(appId, gridId) {
879
+ const data = await this.graphql.request(ExecGridClientModsDocument, { appId, gridId });
880
+ return data.execGridClientMods.map((m) => ({
881
+ ...strip(m),
882
+ capabilitySummary: parseCapabilities(m.capabilitySummaryJson),
883
+ authorCapabilitySummary: parseCapabilities(m.authorCapabilitySummaryJson),
884
+ }));
885
+ }
886
+ /**
887
+ * Consents to run one mod's CLIENT half in your browser at `capabilityHash`, the one
888
+ * {@link gridClientMods} showed you. A CLIENT half whose capabilities change carries a new hash,
889
+ * and the consent stops holding until you consent again; a hash that is not the current one
890
+ * is refused as `CONFLICT` (`CrowdyGraphQLError.code`). Requires access to the app.
891
+ */
892
+ async consentClientMod(appId, modId, capabilityHash) {
893
+ const data = await this.graphql.request(ExecConsentClientModDocument, { appId, modId, capabilityHash });
894
+ return data.execConsentClientMod;
895
+ }
896
+ /**
897
+ * Trusts one author's CLIENT halves on a grid you stand in, at the hash of their union
898
+ * (`authorCapabilityHash`): the trust covers their CLIENT halves there while the union is no
899
+ * wider, and consents to each current one at its own hash. A hash that is not the current one
900
+ * is `CONFLICT`; not standing in the grid, or an author with nothing served there, is
901
+ * `NOT_FOUND`. Requires access to the app.
902
+ */
903
+ async trustAuthor(appId, gridId, authorId, capabilityHash) {
904
+ const data = await this.graphql.request(ExecTrustAuthorDocument, { appId, gridId, authorId, capabilityHash });
905
+ return data.execTrustAuthor;
906
+ }
907
+ /**
908
+ * A served CLIENT half's module, base64, with what the broker needs to run it. Served only to a
909
+ * player holding `run_client_code` in the app, standing in the mod's grid now, who consented
910
+ * to it at its current hash or trusts its author at a union no wider; every refusal is
911
+ * `NOT_FOUND`. At most 12 fetches a minute per player and mod on each API instance
912
+ * (`RATE_LIMITED`): the module never changes for its digest, so cache it by `digest`.
913
+ */
914
+ async modClientArtifact(appId, modId) {
915
+ const data = await this.graphql.request(ExecModClientArtifactDocument, { appId, modId });
916
+ const a = strip(data.execModClientArtifact);
917
+ return { ...a, capabilitySummary: parseCapabilities(a.capabilitySummaryJson) };
918
+ }
919
+ /**
920
+ * {@link modClientArtifact} decoded for `PlayerCodeBroker`: the module's bytes, their SHA-256
921
+ * recomputed with WebCrypto, and the fuel budget as a bigint; the exec twin of
922
+ * `marketplace.clientArtifactBytes`. Bytes that differ from `digest`, a module built for a
923
+ * CLIENT ABI other than {@link EXEC_CLIENT_ABI_VERSION}, or a capability summary that does not
924
+ * parse are refused with a {@link CrowdyProtocolError} and never returned. Start the broker
925
+ * with `engine: 'ck-exec'`, `artifactHash: digest`, `fuelPerDispatch`, `tickIntervalMs` and
926
+ * `consentedHostCalls: capabilitySummary.hostFunctions`.
927
+ */
928
+ async modClientArtifactBytes(appId, modId) {
929
+ const a = await this.modClientArtifact(appId, modId);
930
+ if (a.abiVersion !== EXEC_CLIENT_ABI_VERSION) {
931
+ throw new CrowdyProtocolError({
932
+ message: `CLIENT half of mod ${a.modId} is built for CLIENT ABI ${a.abiVersion}; this SDK runs ABI ${EXEC_CLIENT_ABI_VERSION}`,
933
+ });
934
+ }
935
+ const capabilitySummary = a.capabilitySummary;
936
+ if (!capabilitySummary || !Array.isArray(capabilitySummary.hostFunctions)) {
937
+ throw new CrowdyProtocolError({
938
+ message: `CLIENT half of mod ${a.modId}: its capability summary does not parse, so nothing bounds its host calls`,
939
+ });
940
+ }
941
+ const bytes = fromBase64(a.wasmBase64);
942
+ const digest = a.digest.toLowerCase();
943
+ const actual = await sha256Hex(bytes);
944
+ if (actual !== digest) {
945
+ throw new CrowdyProtocolError({
946
+ message: `CLIENT half of mod ${a.modId}: the module's SHA-256 is ${actual}, not the digest ${digest} it was served with`,
947
+ });
948
+ }
949
+ return {
950
+ modId: a.modId,
951
+ name: a.name,
952
+ gridId: a.gridId,
953
+ clientVersion: a.clientVersion,
954
+ bytes: bytes.buffer,
955
+ digest,
956
+ sizeBytes: a.sizeBytes,
957
+ fuelPerDispatch: BigInt(a.fuelPerDispatch),
958
+ tickIntervalMs: a.tickIntervalMs,
959
+ capabilitySummaryJson: a.capabilitySummaryJson,
960
+ capabilitySummary,
961
+ capabilityHash: a.capabilityHash,
962
+ abiVersion: a.abiVersion,
963
+ };
964
+ }
803
965
  /** A host for this player and its connect token (valid for about a minute). */
804
966
  async endpoint(appId, options = {}) {
805
967
  const data = await this.graphql.request(ExecConnectDocument, {
@@ -8,8 +8,8 @@ import { type GameHostQuery, type AmIGameHostQuery, type ActorHeartbeatMutation
8
8
  * first wins). {@link heartbeat} refreshes the caller's actor freshness (keeping
9
9
  * them host-eligible) and returns the freshly-elected host in one round-trip —
10
10
  * call it on an interval shorter than the server's freshness window.
11
- * {@link amIHost} is a UI convenience (not authoritative for mutations — use
12
- * `gameModelInvoke`'s `is_host` policy for that). All require a valid session;
11
+ * {@link amIHost} is a UI convenience (not authoritative for mutations — a hub
12
+ * decides that from the caller). All require a valid session;
13
13
  * `appId` is a `BigInt` decimal string.
14
14
  *
15
15
  * @throws {CrowdyGraphQLError} `UNAUTHENTICATED` without a session.
@@ -28,7 +28,7 @@ export declare class HostAPI {
28
28
  /**
29
29
  * Return whether the authenticated caller is the currently elected host for
30
30
  * the app. Convenience for UI only — not authoritative for server mutations
31
- * (use `gameModelInvoke`'s `is_host` policy for that).
31
+ * (a hub decides those from the caller).
32
32
  *
33
33
  * @param appId - The app to check host election for.
34
34
  * @returns `true` if the caller is the elected host; otherwise `false`.
@@ -7,8 +7,8 @@ import { GameHostDocument, AmIGameHostDocument, ActorHeartbeatDocument, } from '
7
7
  * first wins). {@link heartbeat} refreshes the caller's actor freshness (keeping
8
8
  * them host-eligible) and returns the freshly-elected host in one round-trip —
9
9
  * call it on an interval shorter than the server's freshness window.
10
- * {@link amIHost} is a UI convenience (not authoritative for mutations — use
11
- * `gameModelInvoke`'s `is_host` policy for that). All require a valid session;
10
+ * {@link amIHost} is a UI convenience (not authoritative for mutations — a hub
11
+ * decides that from the caller). All require a valid session;
12
12
  * `appId` is a `BigInt` decimal string.
13
13
  *
14
14
  * @throws {CrowdyGraphQLError} `UNAUTHENTICATED` without a session.
@@ -31,7 +31,7 @@ export class HostAPI {
31
31
  /**
32
32
  * Return whether the authenticated caller is the currently elected host for
33
33
  * the app. Convenience for UI only — not authoritative for server mutations
34
- * (use `gameModelInvoke`'s `is_host` policy for that).
34
+ * (a hub decides those from the caller).
35
35
  *
36
36
  * @param appId - The app to check host election for.
37
37
  * @returns `true` if the caller is the elected host; otherwise `false`.
@@ -1,65 +1,17 @@
1
1
  import type { GraphQLClient } from '../client.js';
2
- import { type MarketplaceListingsQuery, type MarketplaceListingsQueryVariables, type MarketplaceListingVersionsQuery, type MarketplaceListingVersionsQueryVariables, type MarketplaceMyAcquisitionsQuery, type MarketplaceMyAcquisitionsQueryVariables, type MarketplaceMyInstallsQuery, type MarketplaceMyInstallsQueryVariables, type MarketplaceGridClientModsQuery, type MarketplaceGridClientModsQueryVariables, type MarketplaceClientArtifactQuery, type MarketplaceClientArtifactQueryVariables, type MarketplacePublishListingMutation, type MarketplacePublishListingMutationVariables, type MarketplacePublishVersionMutation, type MarketplacePublishVersionMutationVariables, type MarketplaceAcquireMutation, type MarketplaceAcquireMutationVariables, type MarketplaceInstallMutation, type MarketplaceInstallMutationVariables, type MarketplaceUninstallMutationVariables, type MarketplaceConsentGridClientModMutationVariables, type MarketplaceTrustGridAuthorMutation, type MarketplaceTrustGridAuthorMutationVariables, type MarketplaceGridClaimPolicyQuery, type MarketplaceGridClaimPolicyQueryVariables, type MarketplaceGridClaimRequestsQuery, type MarketplaceGridClaimRequestsQueryVariables, type MarketplaceClaimGridOwnershipMutation, type MarketplaceClaimGridOwnershipMutationVariables, type MarketplaceClaimGridChunkMutation, type MarketplaceClaimGridChunkMutationVariables, type MarketplaceReleaseClaimedGridMutation, type MarketplaceReleaseClaimedGridMutationVariables, type MarketplaceDecideGridClaimMutation, type MarketplaceDecideGridClaimMutationVariables, type MarketplaceIssueGridClaimInviteMutationVariables, type MarketplaceAdmissionQueueQuery, type MarketplaceAdmissionQueueQueryVariables, type MarketplaceAppListingsQuery, type MarketplaceAppListingsQueryVariables, type MarketplaceAppAcquisitionsQuery, type MarketplaceAppAcquisitionsQueryVariables, type MarketplaceTransferListingMutation, type MarketplaceTransferListingMutationVariables, type MarketplaceSetListingStatusMutation, type MarketplaceSetListingStatusMutationVariables, type MarketplaceSetGridClaimPolicyMutation, type MarketplaceSetGridClaimPolicyMutationVariables } from '../generated/graphql.js';
2
+ import { type MarketplaceGridClaimPolicyQuery, type MarketplaceGridClaimPolicyQueryVariables, type MarketplaceGridClaimRequestsQuery, type MarketplaceGridClaimRequestsQueryVariables, type MarketplaceClaimGridOwnershipMutation, type MarketplaceClaimGridOwnershipMutationVariables, type MarketplaceClaimGridChunkMutation, type MarketplaceClaimGridChunkMutationVariables, type MarketplaceReleaseClaimedGridMutation, type MarketplaceReleaseClaimedGridMutationVariables, type MarketplaceDecideGridClaimMutation, type MarketplaceDecideGridClaimMutationVariables, type MarketplaceIssueGridClaimInviteMutationVariables, type MarketplaceAdmissionQueueQuery, type MarketplaceAdmissionQueueQueryVariables, type MarketplaceAppListingsQuery, type MarketplaceAppListingsQueryVariables, type MarketplaceAppAcquisitionsQuery, type MarketplaceAppAcquisitionsQueryVariables, type MarketplaceTransferListingMutation, type MarketplaceTransferListingMutationVariables, type MarketplaceSetListingStatusMutation, type MarketplaceSetListingStatusMutationVariables, type MarketplaceSetGridClaimPolicyMutation, type MarketplaceSetGridClaimPolicyMutationVariables } from '../generated/graphql.js';
3
3
  /**
4
- * The player-code marketplace (free acquire / install) — exposed as
5
- * `client.marketplace`. Player-facing browse/publish/acquire/install/consent
6
- * and the D4 grid claim flows, plus studio moderation (admission queue, catalog
7
- * administration, ownership transfer, claim-policy config). Player and moderation
8
- * operations differ by the permissions they require, not by endpoint.
9
- *
10
- * No money moves through any of these calls: every listing is free in P4a,
11
- * an acquisition is an entitlement write, and the paid modes ship with P4b.
12
- * Publishing snapshots artifact hashes and the DERIVED capability summary —
13
- * never source; installs consent to the summary's hash.
4
+ * Grid claims and the app's player-code administration — exposed as
5
+ * `client.marketplace`: the D4 grid claim flows (policy, requests, chunk and
6
+ * ownership claims, invites) and studio moderation (admission queue, catalog
7
+ * administration, ownership transfer, claim-policy config). The player-facing
8
+ * listings (publish, acquire, install) and grid-attached client mods went with
9
+ * legacy player compute; ck-exec mods publish and install with
10
+ * `client.exec.modPublish` / `modInstall`.
14
11
  */
15
12
  export declare class MarketplaceAPI {
16
13
  private readonly game;
17
14
  constructor(game: GraphQLClient);
18
- /** Browse the app's active listings with admission standing per listing. */
19
- listings(variables: MarketplaceListingsQueryVariables): Promise<MarketplaceListingsQuery['playerCodeListings']>;
20
- /** Published versions of one listing (capability summaries + consent hashes). */
21
- versions(variables: MarketplaceListingVersionsQueryVariables): Promise<MarketplaceListingVersionsQuery['playerCodeListingVersions']>;
22
- /** The caller's entitlements in this app. */
23
- myAcquisitions(variables: MarketplaceMyAcquisitionsQueryVariables): Promise<MarketplaceMyAcquisitionsQuery['myPlayerCodeAcquisitions']>;
24
- /** The caller's active installs in this app. */
25
- myInstalls(variables: MarketplaceMyInstallsQueryVariables): Promise<MarketplaceMyInstallsQuery['myPlayerCodeInstalls']>;
26
- /** Create a listing (personal, or org-owned via input.ownerOrgId). */
27
- publishListing(variables: MarketplacePublishListingMutationVariables): Promise<MarketplacePublishListingMutation['publishPlayerCode']>;
28
- /** Publish an immutable version from compiled module versions (hashes only). */
29
- publishVersion(variables: MarketplacePublishVersionMutationVariables): Promise<MarketplacePublishVersionMutation['publishPlayerCodeVersion']>;
30
- /** Free acquisition (entitlement write; idempotent per listing+caller). */
31
- acquire(variables: MarketplaceAcquireMutationVariables): Promise<MarketplaceAcquireMutation['acquirePlayerCode']>;
32
- /**
33
- * Install an acquisition after consenting to the version's capability
34
- * hash. Server/bundled listings need an owned target gridId.
35
- */
36
- install(variables: MarketplaceInstallMutationVariables): Promise<MarketplaceInstallMutation['installPlayerCode']>;
37
- /** Remove instances/attachments/fetch rights; the acquisition is retained. */
38
- uninstall(variables: MarketplaceUninstallMutationVariables): Promise<boolean>;
39
- /** Client mods attached to a grid, with the caller's consent state. */
40
- gridClientMods(variables: MarketplaceGridClientModsQueryVariables): Promise<MarketplaceGridClientModsQuery['gridClientMods']>;
41
- /** Consent to one attachment's exact capability hash (per player). */
42
- consentGridClientMod(variables: MarketplaceConsentGridClientModMutationVariables): Promise<boolean>;
43
- /**
44
- * Trust one author's active attachments in a grid at the exact aggregate
45
- * capability hash returned by `gridClientMods`. Capability widening changes
46
- * the hash and requires another explicit call.
47
- */
48
- trustGridAuthor(variables: MarketplaceTrustGridAuthorMutationVariables): Promise<MarketplaceTrustGridAuthorMutation['trustGridAuthor']>;
49
- /** Fetch an acquired/attached listing's client artifact (base64 + metadata). */
50
- clientArtifact(variables: MarketplaceClientArtifactQueryVariables): Promise<MarketplaceClientArtifactQuery['playerCodeClientArtifact']>;
51
- /**
52
- * Fetch and decode a client artifact into broker inputs (bytes, content
53
- * hash, per-dispatch fuel budget) — the marketplace twin of
54
- * `playerCompute.artifactBytes` for acquired and grid-attached mods.
55
- */
56
- clientArtifactBytes(variables: MarketplaceClientArtifactQueryVariables): Promise<{
57
- bytes: ArrayBuffer;
58
- artifactHash: string;
59
- fuelPerDispatch: bigint;
60
- contractJson: string | null;
61
- versionId: string;
62
- }>;
63
15
  /** The app's claim policy (self_claim / approval / invite / marketplace_only). */
64
16
  gridClaimPolicy(variables: MarketplaceGridClaimPolicyQueryVariables): Promise<MarketplaceGridClaimPolicyQuery['gridClaimPolicy']>;
65
17
  /** Pending claim requests (approvers see the app queue; players their own). */
@@ -91,8 +43,7 @@ export declare class MarketplaceAPI {
91
43
  transferListing(variables: MarketplaceTransferListingMutationVariables): Promise<MarketplaceTransferListingMutation['transferPlayerCodeListing']>;
92
44
  /**
93
45
  * Catalog status: DELISTED/ACTIVE are owner actions; KILLED is the studio
94
- * catalog kill — pair with playerCompute.setSwitch({scope:'listing'}) to
95
- * also disable running installs fleet-wide.
46
+ * catalog kill.
96
47
  */
97
48
  setListingStatus(variables: MarketplaceSetListingStatusMutationVariables): Promise<MarketplaceSetListingStatusMutation['setPlayerCodeListingStatus']>;
98
49
  /** Configure the app's D4 grid claim policy (manage_apps). */
@@ -1 +1 @@
1
- {"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/domains/marketplace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EA2BL,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EACtC,KAAK,+BAA+B,EACpC,KAAK,wCAAwC,EAC7C,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAC5C,KAAK,0BAA0B,EAC/B,KAAK,mCAAmC,EACxC,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAC5C,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAC5C,KAAK,iCAAiC,EACtC,KAAK,0CAA0C,EAC/C,KAAK,iCAAiC,EACtC,KAAK,0CAA0C,EAC/C,KAAK,0BAA0B,EAC/B,KAAK,mCAAmC,EACxC,KAAK,0BAA0B,EAC/B,KAAK,mCAAmC,EACxC,KAAK,qCAAqC,EAC1C,KAAK,gDAAgD,EACrD,KAAK,kCAAkC,EACvC,KAAK,2CAA2C,EAChD,KAAK,+BAA+B,EACpC,KAAK,wCAAwC,EAC7C,KAAK,iCAAiC,EACtC,KAAK,0CAA0C,EAC/C,KAAK,qCAAqC,EAC1C,KAAK,8CAA8C,EACnD,KAAK,iCAAiC,EACtC,KAAK,0CAA0C,EAC/C,KAAK,qCAAqC,EAC1C,KAAK,8CAA8C,EACnD,KAAK,kCAAkC,EACvC,KAAK,2CAA2C,EAChD,KAAK,gDAAgD,EACrD,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAC5C,KAAK,2BAA2B,EAChC,KAAK,oCAAoC,EACzC,KAAK,+BAA+B,EACpC,KAAK,wCAAwC,EAC7C,KAAK,kCAAkC,EACvC,KAAK,2CAA2C,EAChD,KAAK,mCAAmC,EACxC,KAAK,4CAA4C,EACjD,KAAK,qCAAqC,EAC1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;IACjD,eAAe,CACnB,SAAS,EAAE,wCAAwC,GAClD,OAAO,CAAC,+BAA+B,CAAC,2BAA2B,CAAC,CAAC;IASxE,sDAAsD;IAChD,eAAe,CACnB,SAAS,EAAE,2CAA2C,GACrD,OAAO,CAAC,kCAAkC,CAAC,2BAA2B,CAAC,CAAC;IAS3E;;;OAGG;IACG,gBAAgB,CACpB,SAAS,EAAE,4CAA4C,GACtD,OAAO,CAAC,mCAAmC,CAAC,4BAA4B,CAAC,CAAC;IAS7E,8DAA8D;IACxD,kBAAkB,CACtB,SAAS,EAAE,8CAA8C,GACxD,OAAO,CAAC,qCAAqC,CAAC,uBAAuB,CAAC,CAAC;CAQ3E"}
@@ -1,113 +1,17 @@
1
- import { MarketplaceListingsDocument, MarketplaceListingVersionsDocument, MarketplaceMyAcquisitionsDocument, MarketplaceMyInstallsDocument, MarketplaceGridClientModsDocument, MarketplaceClientArtifactDocument, MarketplacePublishListingDocument, MarketplacePublishVersionDocument, MarketplaceAcquireDocument, MarketplaceInstallDocument, MarketplaceUninstallDocument, MarketplaceConsentGridClientModDocument, MarketplaceTrustGridAuthorDocument, MarketplaceGridClaimPolicyDocument, MarketplaceGridClaimRequestsDocument, MarketplaceClaimGridOwnershipDocument, MarketplaceClaimGridChunkDocument, MarketplaceReleaseClaimedGridDocument, MarketplaceDecideGridClaimDocument, MarketplaceIssueGridClaimInviteDocument, MarketplaceAdmissionQueueDocument, MarketplaceAppListingsDocument, MarketplaceAppAcquisitionsDocument, MarketplaceTransferListingDocument, MarketplaceSetListingStatusDocument, MarketplaceSetGridClaimPolicyDocument, } from '../generated/graphql.js';
1
+ import { MarketplaceGridClaimPolicyDocument, MarketplaceGridClaimRequestsDocument, MarketplaceClaimGridOwnershipDocument, MarketplaceClaimGridChunkDocument, MarketplaceReleaseClaimedGridDocument, MarketplaceDecideGridClaimDocument, MarketplaceIssueGridClaimInviteDocument, MarketplaceAdmissionQueueDocument, MarketplaceAppListingsDocument, MarketplaceAppAcquisitionsDocument, MarketplaceTransferListingDocument, MarketplaceSetListingStatusDocument, MarketplaceSetGridClaimPolicyDocument, } from '../generated/graphql.js';
2
2
  /**
3
- * The player-code marketplace (free acquire / install) — exposed as
4
- * `client.marketplace`. Player-facing browse/publish/acquire/install/consent
5
- * and the D4 grid claim flows, plus studio moderation (admission queue, catalog
6
- * administration, ownership transfer, claim-policy config). Player and moderation
7
- * operations differ by the permissions they require, not by endpoint.
8
- *
9
- * No money moves through any of these calls: every listing is free in P4a,
10
- * an acquisition is an entitlement write, and the paid modes ship with P4b.
11
- * Publishing snapshots artifact hashes and the DERIVED capability summary —
12
- * never source; installs consent to the summary's hash.
3
+ * Grid claims and the app's player-code administration — exposed as
4
+ * `client.marketplace`: the D4 grid claim flows (policy, requests, chunk and
5
+ * ownership claims, invites) and studio moderation (admission queue, catalog
6
+ * administration, ownership transfer, claim-policy config). The player-facing
7
+ * listings (publish, acquire, install) and grid-attached client mods went with
8
+ * legacy player compute; ck-exec mods publish and install with
9
+ * `client.exec.modPublish` / `modInstall`.
13
10
  */
14
11
  export class MarketplaceAPI {
15
12
  constructor(game) {
16
13
  this.game = game;
17
14
  }
18
- // -- Store ---------------------------------------------------------
19
- /** Browse the app's active listings with admission standing per listing. */
20
- async listings(variables) {
21
- const data = await this.game.request(MarketplaceListingsDocument, variables);
22
- return data.playerCodeListings;
23
- }
24
- /** Published versions of one listing (capability summaries + consent hashes). */
25
- async versions(variables) {
26
- const data = await this.game.request(MarketplaceListingVersionsDocument, variables);
27
- return data.playerCodeListingVersions;
28
- }
29
- /** The caller's entitlements in this app. */
30
- async myAcquisitions(variables) {
31
- const data = await this.game.request(MarketplaceMyAcquisitionsDocument, variables);
32
- return data.myPlayerCodeAcquisitions;
33
- }
34
- /** The caller's active installs in this app. */
35
- async myInstalls(variables) {
36
- const data = await this.game.request(MarketplaceMyInstallsDocument, variables);
37
- return data.myPlayerCodeInstalls;
38
- }
39
- /** Create a listing (personal, or org-owned via input.ownerOrgId). */
40
- async publishListing(variables) {
41
- const data = await this.game.request(MarketplacePublishListingDocument, variables);
42
- return data.publishPlayerCode;
43
- }
44
- /** Publish an immutable version from compiled module versions (hashes only). */
45
- async publishVersion(variables) {
46
- const data = await this.game.request(MarketplacePublishVersionDocument, variables);
47
- return data.publishPlayerCodeVersion;
48
- }
49
- /** Free acquisition (entitlement write; idempotent per listing+caller). */
50
- async acquire(variables) {
51
- const data = await this.game.request(MarketplaceAcquireDocument, variables);
52
- return data.acquirePlayerCode;
53
- }
54
- /**
55
- * Install an acquisition after consenting to the version's capability
56
- * hash. Server/bundled listings need an owned target gridId.
57
- */
58
- async install(variables) {
59
- const data = await this.game.request(MarketplaceInstallDocument, variables);
60
- return data.installPlayerCode;
61
- }
62
- /** Remove instances/attachments/fetch rights; the acquisition is retained. */
63
- async uninstall(variables) {
64
- const data = await this.game.request(MarketplaceUninstallDocument, variables);
65
- return data.uninstallPlayerCode;
66
- }
67
- // -- Grid-attached client mods (D2) --------------------------------------------
68
- /** Client mods attached to a grid, with the caller's consent state. */
69
- async gridClientMods(variables) {
70
- const data = await this.game.request(MarketplaceGridClientModsDocument, variables);
71
- return data.gridClientMods;
72
- }
73
- /** Consent to one attachment's exact capability hash (per player). */
74
- async consentGridClientMod(variables) {
75
- const data = await this.game.request(MarketplaceConsentGridClientModDocument, variables);
76
- return data.consentGridClientMod;
77
- }
78
- /**
79
- * Trust one author's active attachments in a grid at the exact aggregate
80
- * capability hash returned by `gridClientMods`. Capability widening changes
81
- * the hash and requires another explicit call.
82
- */
83
- async trustGridAuthor(variables) {
84
- const data = await this.game.request(MarketplaceTrustGridAuthorDocument, variables);
85
- return data.trustGridAuthor;
86
- }
87
- /** Fetch an acquired/attached listing's client artifact (base64 + metadata). */
88
- async clientArtifact(variables) {
89
- const data = await this.game.request(MarketplaceClientArtifactDocument, variables);
90
- return data.playerCodeClientArtifact;
91
- }
92
- /**
93
- * Fetch and decode a client artifact into broker inputs (bytes, content
94
- * hash, per-dispatch fuel budget) — the marketplace twin of
95
- * `playerCompute.artifactBytes` for acquired and grid-attached mods.
96
- */
97
- async clientArtifactBytes(variables) {
98
- const a = await this.clientArtifact(variables);
99
- const binary = atob(a.artifactBase64);
100
- const bytes = new Uint8Array(binary.length);
101
- for (let i = 0; i < binary.length; i++)
102
- bytes[i] = binary.charCodeAt(i);
103
- return {
104
- bytes: bytes.buffer,
105
- artifactHash: a.artifactHash,
106
- fuelPerDispatch: BigInt(a.clientFuelPerDispatch),
107
- contractJson: a.contractJson ?? null,
108
- versionId: a.versionId,
109
- };
110
- }
111
15
  // -- D4 grid claim flows (Game API) ---------------------------------------------
112
16
  /** The app's claim policy (self_claim / approval / invite / marketplace_only). */
113
17
  async gridClaimPolicy(variables) {
@@ -174,8 +78,7 @@ export class MarketplaceAPI {
174
78
  }
175
79
  /**
176
80
  * Catalog status: DELISTED/ACTIVE are owner actions; KILLED is the studio
177
- * catalog kill — pair with playerCompute.setSwitch({scope:'listing'}) to
178
- * also disable running installs fleet-wide.
81
+ * catalog kill.
179
82
  */
180
83
  async setListingStatus(variables) {
181
84
  const data = await this.game.request(MarketplaceSetListingStatusDocument, variables);
@@ -1,17 +1,17 @@
1
1
  import type { GraphQLClient } from "../client.js";
2
- import { type BeginPlayerCardSetupMutation, type PlayerWalletBalanceQuery, type PlayerWalletTransactionsQuery, type PlayerWalletTransactionsQueryVariables, type PlayerUsageChargesQuery, type PlayerUsageChargesQueryVariables, type PlayerSpendCapsQuery, type SetPlayerSpendCapMutation, type SetPlayerSpendCapMutationVariables, type PlayerAutoBillingQuery, type SetPlayerAutoBillingMutation, type SetPlayerAutoBillingMutationVariables, type PlayerRuntimeStatesQuery, type PlayerWasmPoliciesQuery, type PlayerWasmPoliciesQueryVariables, type SetPlayerWasmPolicyMutation, type SetPlayerWasmPolicyMutationVariables, type DeletePlayerWasmPolicyMutation, type DeletePlayerWasmPolicyMutationVariables, type PlayerRateMarkupQuery, type PlayerRateMarkupQueryVariables, type SetPlayerRateMarkupMutation, type SetPlayerRateMarkupMutationVariables, type AppPlayerUsageQuery, type AppPlayerUsageQueryVariables, type AppPlayerMarkupAccruedQuery, type AppPlayerMarkupAccruedQueryVariables, type AppPlayerMarkupAccruedMicrousdQuery, type AppPlayerMarkupAccruedMicrousdQueryVariables } from "../generated/graphql.js";
2
+ import { type BeginPlayerCardSetupMutation, type PlayerWalletBalanceQuery, type PlayerWalletTransactionsQuery, type PlayerWalletTransactionsQueryVariables, type PlayerUsageChargesQuery, type PlayerUsageChargesQueryVariables, type PlayerSpendCapsQuery, type SetPlayerSpendCapMutation, type SetPlayerSpendCapMutationVariables, type PlayerAutoBillingQuery, type SetPlayerAutoBillingMutation, type SetPlayerAutoBillingMutationVariables, type PlayerRuntimeStatesQuery, type PlayerRateMarkupQuery, type PlayerRateMarkupQueryVariables, type SetPlayerRateMarkupMutation, type SetPlayerRateMarkupMutationVariables, type AppPlayerUsageQuery, type AppPlayerUsageQueryVariables, type AppPlayerMarkupAccruedQuery, type AppPlayerMarkupAccruedQueryVariables, type AppPlayerMarkupAccruedMicrousdQuery, type AppPlayerMarkupAccruedMicrousdQueryVariables } from "../generated/graphql.js";
3
3
  /**
4
- * The player wallet and player-billing surface (player compute P2, DN-5) —
5
- * exposed as `client.playerWallet` and routed to the Management API.
4
+ * The player wallet and player-billing surface (DN-5) — exposed as
5
+ * `client.playerWallet`. A ck-exec mod's compute is billed here, to its owner.
6
6
  *
7
7
  * Every viewer-scoped call operates on the CALLER's own wallet: balance,
8
8
  * ledger, hourly usage charges (platform vs studio-markup split), self-set
9
9
  * spend caps, auto-recharge config, and per-app gate states. Fund the wallet
10
10
  * via `client.payments.createCheckout` with purpose `PLAYER_WALLET_TOPUP`.
11
11
  *
12
- * The studio-scoped calls (policies, markup, per-player usage, accrued
13
- * markup) require the corresponding org permissions (`manage_compute`,
14
- * `manage_billing`, `view_compute_diagnostics`, `view_billing`).
12
+ * The studio-scoped calls (markup, per-player usage, accrued markup) require
13
+ * the corresponding org permissions (`manage_billing`,
14
+ * `view_compute_diagnostics`, `view_billing`).
15
15
  */
16
16
  export declare class PlayerWalletAPI {
17
17
  private readonly graphql;
@@ -46,12 +46,6 @@ export declare class PlayerWalletAPI {
46
46
  beginCardSetup(): Promise<BeginPlayerCardSetupMutation["beginPlayerCardSetup"]>;
47
47
  /** The caller's per-app gate states (absence means active). */
48
48
  runtimeStates(): Promise<PlayerRuntimeStatesQuery["playerRuntimeStates"]>;
49
- /** Studio: list an app's player policy rows (`view_compute_diagnostics`). */
50
- policies(variables: PlayerWasmPoliciesQueryVariables): Promise<PlayerWasmPoliciesQuery["playerWasmPolicies"]>;
51
- /** Studio: upsert a player policy row (`manage_compute`). */
52
- setPolicy(variables: SetPlayerWasmPolicyMutationVariables): Promise<SetPlayerWasmPolicyMutation["setPlayerWasmPolicy"]>;
53
- /** Studio: delete a player policy row (`manage_compute`). */
54
- deletePolicy(variables: DeletePlayerWasmPolicyMutationVariables): Promise<DeletePlayerWasmPolicyMutation["deletePlayerWasmPolicy"]>;
55
49
  /** Studio: read the app's player rate-card markup in bps (`view_billing`). */
56
50
  rateMarkup(variables: PlayerRateMarkupQueryVariables): Promise<PlayerRateMarkupQuery["playerRateMarkup"]>;
57
51
  /** Studio: set the app's player rate-card markup in bps (`manage_billing`). */
@@ -1 +1 @@
1
- {"version":3,"file":"playerWallet.d.ts","sourceRoot":"","sources":["../../src/domains/playerWallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EASL,KAAK,4BAA4B,EAUjC,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,sCAAsC,EAC3C,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACrC,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,kCAAkC,EACvC,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,KAAK,qCAAqC,EAC1C,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,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