@crowdedkingdoms/crowdyjs 8.15.0 → 8.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +16 -1
  2. package/dist/crowdy-client.d.ts +12 -0
  3. package/dist/crowdy-client.d.ts.map +1 -1
  4. package/dist/crowdy-client.js +9 -0
  5. package/dist/domains/admin.d.ts +4 -0
  6. package/dist/domains/admin.d.ts.map +1 -1
  7. package/dist/domains/admin.js +1 -0
  8. package/dist/domains/apps.d.ts +28 -1
  9. package/dist/domains/apps.d.ts.map +1 -1
  10. package/dist/domains/apps.js +52 -1
  11. package/dist/domains/gameApps.d.ts +17 -1
  12. package/dist/domains/gameApps.d.ts.map +1 -1
  13. package/dist/domains/gameApps.js +29 -1
  14. package/dist/domains/marketplace.d.ts +147 -0
  15. package/dist/domains/marketplace.d.ts.map +1 -0
  16. package/dist/domains/marketplace.js +257 -0
  17. package/dist/domains/playerCompute.d.ts +85 -0
  18. package/dist/domains/playerCompute.d.ts.map +1 -0
  19. package/dist/domains/playerCompute.js +127 -0
  20. package/dist/domains/playerModel.d.ts +20 -0
  21. package/dist/domains/playerModel.d.ts.map +1 -0
  22. package/dist/domains/playerModel.js +54 -0
  23. package/dist/domains/playerWallet.d.ts +59 -0
  24. package/dist/domains/playerWallet.d.ts.map +1 -0
  25. package/dist/domains/playerWallet.js +106 -0
  26. package/dist/generated/graphql.d.ts +3529 -241
  27. package/dist/generated/graphql.d.ts.map +1 -1
  28. package/dist/generated/graphql.js +187 -1
  29. package/dist/index.d.ts +12 -3
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +10 -1
  32. package/dist/kit/npcs.d.ts.map +1 -1
  33. package/dist/kit/social.d.ts.map +1 -1
  34. package/dist/live-coding/live-coding-controller.d.ts +73 -0
  35. package/dist/live-coding/live-coding-controller.d.ts.map +1 -0
  36. package/dist/live-coding/live-coding-controller.js +140 -0
  37. package/dist/live-coding/mount.d.ts +26 -0
  38. package/dist/live-coding/mount.d.ts.map +1 -0
  39. package/dist/live-coding/mount.js +108 -0
  40. package/dist/live-coding/templates.d.ts +17 -0
  41. package/dist/live-coding/templates.d.ts.map +1 -0
  42. package/dist/live-coding/templates.js +59 -0
  43. package/dist/player-runtime/player-code-broker.d.ts +101 -0
  44. package/dist/player-runtime/player-code-broker.d.ts.map +1 -0
  45. package/dist/player-runtime/player-code-broker.js +251 -0
  46. package/dist/player-runtime/player-glue-worker.d.ts +62 -0
  47. package/dist/player-runtime/player-glue-worker.d.ts.map +1 -0
  48. package/dist/player-runtime/player-glue-worker.js +127 -0
  49. package/package.json +1 -1
@@ -0,0 +1,257 @@
1
+ import { MarketplaceListingsDocument, MarketplaceListingVersionsDocument, MarketplaceMyAcquisitionsDocument, MarketplaceMyInstallsDocument, MarketplaceGridClientModsDocument, MarketplaceClientArtifactDocument, MarketplacePublishListingDocument, MarketplacePublishVersionDocument, MarketplaceAcquireDocument, MarketplaceInstallDocument, MarketplaceUninstallDocument, MarketplaceConsentGridClientModDocument, MarketplaceGridClaimPolicyDocument, MarketplaceGridClaimRequestsDocument, MarketplaceClaimGridOwnershipDocument, MarketplaceDecideGridClaimDocument, MarketplaceIssueGridClaimInviteDocument, MarketplaceAdmissionQueueDocument, MarketplaceAppListingsDocument, MarketplaceAppAcquisitionsDocument, MarketplaceTransferListingDocument, MarketplaceSetListingStatusDocument, MarketplaceSetGridClaimPolicyDocument, MarketplaceRenewAcquisitionDocument, MarketplaceTopUpAcquisitionDocument, MarketplaceRefundAcquisitionDocument, MarketplaceGridListingsDocument, MarketplacePurchaseGridDocument, MarketplaceSetListingPricingDocument, MarketplaceSetOrgShareDocument, MarketplaceBeginSellerOnboardingDocument, MarketplaceBeginOrgSellerOnboardingDocument, MarketplaceCreateAccountSessionDocument, MarketplaceCreateOrgAccountSessionDocument, MarketplaceMySellerBalanceDocument, MarketplaceRequestPayoutDocument, MarketplaceSpendPayoutToWalletDocument, MarketplaceCommerceRiskQueueDocument, MarketplaceDecideRiskFlagDocument, MarketplaceCreateGridListingDocument, } from '../generated/graphql.js';
2
+ /**
3
+ * The P4a player-code marketplace (free mode) — exposed as
4
+ * `client.marketplace`. Player-facing browse/publish/acquire/install/consent
5
+ * and the D4 grid claim flows route to the Game API; studio moderation
6
+ * (admission queue, catalog administration, ownership transfer, claim-policy
7
+ * config) routes to the Management API.
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.
13
+ */
14
+ export class MarketplaceAPI {
15
+ constructor(game, management) {
16
+ this.game = game;
17
+ this.management = management;
18
+ }
19
+ // -- Store (Game API) ---------------------------------------------------------
20
+ /** Browse the app's active listings with admission standing per listing. */
21
+ async listings(variables) {
22
+ const data = await this.game.request(MarketplaceListingsDocument, variables);
23
+ return data.playerCodeListings;
24
+ }
25
+ /** Published versions of one listing (capability summaries + consent hashes). */
26
+ async versions(variables) {
27
+ const data = await this.game.request(MarketplaceListingVersionsDocument, variables);
28
+ return data.playerCodeListingVersions;
29
+ }
30
+ /** The caller's entitlements in this app. */
31
+ async myAcquisitions(variables) {
32
+ const data = await this.game.request(MarketplaceMyAcquisitionsDocument, variables);
33
+ return data.myPlayerCodeAcquisitions;
34
+ }
35
+ /** The caller's active installs in this app. */
36
+ async myInstalls(variables) {
37
+ const data = await this.game.request(MarketplaceMyInstallsDocument, variables);
38
+ return data.myPlayerCodeInstalls;
39
+ }
40
+ /** Create a listing (personal, or org-owned via input.ownerOrgId). */
41
+ async publishListing(variables) {
42
+ const data = await this.game.request(MarketplacePublishListingDocument, variables);
43
+ return data.publishPlayerCode;
44
+ }
45
+ /** Publish an immutable version from compiled module versions (hashes only). */
46
+ async publishVersion(variables) {
47
+ const data = await this.game.request(MarketplacePublishVersionDocument, variables);
48
+ return data.publishPlayerCodeVersion;
49
+ }
50
+ /** Free acquisition (entitlement write; idempotent per listing+caller). */
51
+ async acquire(variables) {
52
+ const data = await this.game.request(MarketplaceAcquireDocument, variables);
53
+ return data.acquirePlayerCode;
54
+ }
55
+ /**
56
+ * Install an acquisition after consenting to the version's capability
57
+ * hash. Server/bundled listings need an owned target gridId.
58
+ */
59
+ async install(variables) {
60
+ const data = await this.game.request(MarketplaceInstallDocument, variables);
61
+ return data.installPlayerCode;
62
+ }
63
+ /** Remove instances/attachments/fetch rights; the acquisition is retained. */
64
+ async uninstall(variables) {
65
+ const data = await this.game.request(MarketplaceUninstallDocument, variables);
66
+ return data.uninstallPlayerCode;
67
+ }
68
+ // -- Grid-attached client mods (D2) --------------------------------------------
69
+ /** Client mods attached to a grid, with the caller's consent state. */
70
+ async gridClientMods(variables) {
71
+ const data = await this.game.request(MarketplaceGridClientModsDocument, variables);
72
+ return data.gridClientMods;
73
+ }
74
+ /** Consent to one attachment's exact capability hash (per player). */
75
+ async consentGridClientMod(variables) {
76
+ const data = await this.game.request(MarketplaceConsentGridClientModDocument, variables);
77
+ return data.consentGridClientMod;
78
+ }
79
+ /** Fetch an acquired/attached listing's client artifact (base64 + metadata). */
80
+ async clientArtifact(variables) {
81
+ const data = await this.game.request(MarketplaceClientArtifactDocument, variables);
82
+ return data.playerCodeClientArtifact;
83
+ }
84
+ /**
85
+ * Fetch and decode a client artifact into broker inputs (bytes, content
86
+ * hash, per-dispatch fuel budget) — the marketplace twin of
87
+ * `playerCompute.artifactBytes` for acquired and grid-attached mods.
88
+ */
89
+ async clientArtifactBytes(variables) {
90
+ const a = await this.clientArtifact(variables);
91
+ const binary = atob(a.artifactBase64);
92
+ const bytes = new Uint8Array(binary.length);
93
+ for (let i = 0; i < binary.length; i++)
94
+ bytes[i] = binary.charCodeAt(i);
95
+ return {
96
+ bytes: bytes.buffer,
97
+ artifactHash: a.artifactHash,
98
+ fuelPerDispatch: BigInt(a.clientFuelPerDispatch),
99
+ contractJson: a.contractJson ?? null,
100
+ versionId: a.versionId,
101
+ };
102
+ }
103
+ // -- D4 grid claim flows (Game API) ---------------------------------------------
104
+ /** The app's claim policy (self_claim / approval / invite / marketplace_only). */
105
+ async gridClaimPolicy(variables) {
106
+ const data = await this.game.request(MarketplaceGridClaimPolicyDocument, variables);
107
+ return data.gridClaimPolicy;
108
+ }
109
+ /** Pending claim requests (approvers see the app queue; players their own). */
110
+ async gridClaimRequests(variables) {
111
+ const data = await this.game.request(MarketplaceGridClaimRequestsDocument, variables);
112
+ return data.gridClaimRequests;
113
+ }
114
+ /** Claim grid ownership under the app policy (server-authorized, D4). */
115
+ async claimGridOwnership(variables) {
116
+ const data = await this.game.request(MarketplaceClaimGridOwnershipDocument, variables);
117
+ return data.claimGridOwnership;
118
+ }
119
+ /** Approve or deny a pending claim request (approvers/staff). */
120
+ async decideGridClaim(variables) {
121
+ const data = await this.game.request(MarketplaceDecideGridClaimDocument, variables);
122
+ return data.decideGridClaim;
123
+ }
124
+ /** Issue a standing claim invite (approvers/staff; INVITE mode). */
125
+ async issueGridClaimInvite(variables) {
126
+ const data = await this.game.request(MarketplaceIssueGridClaimInviteDocument, variables);
127
+ return data.issueGridClaimInvite;
128
+ }
129
+ // -- Studio moderation (Management API) ------------------------------------------
130
+ /** The admission queue: listings joined with allow-list standing. */
131
+ async admissionQueue(variables) {
132
+ const data = await this.management.request(MarketplaceAdmissionQueueDocument, variables);
133
+ return data.appCodeAdmissionQueue;
134
+ }
135
+ /** Studio catalog administration view (includes delisted/killed on request). */
136
+ async appListings(variables) {
137
+ const data = await this.management.request(MarketplaceAppListingsDocument, variables);
138
+ return data.appPlayerCodeListings;
139
+ }
140
+ /** All acquisitions in the app (studio audit view). */
141
+ async appAcquisitions(variables) {
142
+ const data = await this.management.request(MarketplaceAppAcquisitionsDocument, variables);
143
+ return data.appPlayerCodeAcquisitions;
144
+ }
145
+ /** Audited personal<->org listing transfer (DN-9). */
146
+ async transferListing(variables) {
147
+ const data = await this.management.request(MarketplaceTransferListingDocument, variables);
148
+ return data.transferPlayerCodeListing;
149
+ }
150
+ /**
151
+ * Catalog status: DELISTED/ACTIVE are owner actions; KILLED is the studio
152
+ * catalog kill — pair with playerCompute.setSwitch({scope:'listing'}) to
153
+ * also disable running installs fleet-wide.
154
+ */
155
+ async setListingStatus(variables) {
156
+ const data = await this.management.request(MarketplaceSetListingStatusDocument, variables);
157
+ return data.setPlayerCodeListingStatus;
158
+ }
159
+ /** Configure the app's D4 grid claim policy (manage_apps). */
160
+ async setGridClaimPolicy(variables) {
161
+ const data = await this.management.request(MarketplaceSetGridClaimPolicyDocument, variables);
162
+ return data.setAppGridClaimPolicy;
163
+ }
164
+ // -- P4b: paid modes + grid commerce (Game API) --------------------------------
165
+ /** Renew a RENT / extend a TIME_LIMITED acquisition (a wallet charge). */
166
+ async renewAcquisition(variables) {
167
+ const data = await this.game.request(MarketplaceRenewAcquisitionDocument, variables);
168
+ return data.renewPlayerCodeAcquisition;
169
+ }
170
+ /** Top up a COST_LIMITED acquisition's unit budget (a wallet charge). */
171
+ async topUpAcquisition(variables) {
172
+ const data = await this.game.request(MarketplaceTopUpAcquisitionDocument, variables);
173
+ return data.topUpPlayerCodeAcquisition;
174
+ }
175
+ /** Refund a paid acquisition (within window, before meaningful use). Returns cents. */
176
+ async refundAcquisition(variables) {
177
+ const data = await this.game.request(MarketplaceRefundAcquisitionDocument, variables);
178
+ return data.refundPlayerCodeAcquisition;
179
+ }
180
+ /** Browse the app's grid listings. */
181
+ async gridListings(variables) {
182
+ const data = await this.game.request(MarketplaceGridListingsDocument, variables);
183
+ return data.gridListings;
184
+ }
185
+ /** Buy a grid listing (wallet debit + atomic ownership; refund on failure). */
186
+ async purchaseGrid(variables) {
187
+ const data = await this.game.request(MarketplacePurchaseGridDocument, variables);
188
+ return data.purchaseGrid;
189
+ }
190
+ // -- P4b: pricing, seller payouts, grid catalog, risk (Management API) ----------
191
+ /** Author-only: set a listing's acquisition mode + price. */
192
+ async setListingPricing(variables) {
193
+ const data = await this.management.request(MarketplaceSetListingPricingDocument, variables);
194
+ return data.setListingPricing;
195
+ }
196
+ /** Set the app's marketplace org revenue share (bps; manage_billing). */
197
+ async setOrgShare(variables) {
198
+ const data = await this.management.request(MarketplaceSetOrgShareDocument, variables);
199
+ return data.setAppMarketplaceOrgShare;
200
+ }
201
+ /**
202
+ * Account Session for the EMBEDDED Connect components: initialize
203
+ * Connect.js with the returned publishableKey + clientSecret and mount
204
+ * account-onboarding / payouts / balances INSIDE your UI (no Stripe-hosted
205
+ * redirect). Client secrets are short-lived — pass this method as the
206
+ * fetchClientSecret callback so Connect.js refreshes automatically.
207
+ */
208
+ async createAccountSession(variables) {
209
+ const data = await this.management.request(MarketplaceCreateAccountSessionDocument, variables);
210
+ return data.createSellerAccountSession;
211
+ }
212
+ /** Embedded-components Account Session for an ORG payout account (manage_billing). */
213
+ async createOrgAccountSession(variables) {
214
+ const data = await this.management.request(MarketplaceCreateOrgAccountSessionDocument, variables);
215
+ return data.createOrgSellerAccountSession;
216
+ }
217
+ /** Begin Stripe Connect Express onboarding for the calling player-seller. */
218
+ async beginSellerOnboarding(variables) {
219
+ const data = await this.management.request(MarketplaceBeginSellerOnboardingDocument, variables);
220
+ return data.beginSellerOnboarding;
221
+ }
222
+ /** Begin onboarding for an org payout account (manage_billing in the org). */
223
+ async beginOrgSellerOnboarding(variables) {
224
+ const data = await this.management.request(MarketplaceBeginOrgSellerOnboardingDocument, variables);
225
+ return data.beginOrgSellerOnboarding;
226
+ }
227
+ /** The calling player's seller payout balance. */
228
+ async mySellerBalance() {
229
+ const data = await this.management.request(MarketplaceMySellerBalanceDocument, {});
230
+ return data.mySellerPayoutBalance;
231
+ }
232
+ /** Pay out the calling player's payable balance to their Connect account. */
233
+ async requestPayout(variables = {}) {
234
+ const data = await this.management.request(MarketplaceRequestPayoutDocument, variables);
235
+ return data.requestSellerPayout;
236
+ }
237
+ /** Earn-to-mod: convert payable balance into the player wallet. Returns cents. */
238
+ async spendPayoutToWallet(variables) {
239
+ const data = await this.management.request(MarketplaceSpendPayoutToWalletDocument, variables);
240
+ return data.spendPayoutBalanceToWallet;
241
+ }
242
+ /** The app's open T11 commerce risk queue (manage_compute). */
243
+ async commerceRiskQueue(variables) {
244
+ const data = await this.management.request(MarketplaceCommerceRiskQueueDocument, variables);
245
+ return data.commerceRiskQueue;
246
+ }
247
+ /** Release or confirm a T11 risk flag (manage_compute). */
248
+ async decideRiskFlag(variables) {
249
+ const data = await this.management.request(MarketplaceDecideRiskFlagDocument, variables);
250
+ return data.decideCommerceRiskFlag;
251
+ }
252
+ /** Studio: create a grid listing (blueprint or concrete; manage_apps). */
253
+ async createGridListing(variables) {
254
+ const data = await this.management.request(MarketplaceCreateGridListingDocument, variables);
255
+ return data.createGridListing;
256
+ }
257
+ }
@@ -0,0 +1,85 @@
1
+ import type { GraphQLClient } from '../client.js';
2
+ import { type PlayerComputeArtifactQuery, type PlayerComputeArtifactQueryVariables, type PlayerComputeUsageQuery, type PlayerComputeUsageQueryVariables, type PlayerComputeRunsQuery, type PlayerComputeRunsQueryVariables, type PlayerComputeLogsQuery, type PlayerComputeLogsQueryVariables, type PlayerComputeSetSwitchMutation, type PlayerComputeSetSwitchMutationVariables, type PlayerComputeSwitchesQuery, type PlayerComputeSwitchesQueryVariables, type PlayerComputeDeployMutation, type PlayerComputeDeployMutationVariables, type PlayerComputeSetEnabledMutation, type PlayerComputeSetEnabledMutationVariables, type PlayerComputeMyModulesQuery, type PlayerComputeMyModulesQueryVariables, type PlayerComputeVersionsQuery, type PlayerComputeVersionsQueryVariables, type PlayerComputeDeleteMutation, type PlayerComputeDeleteMutationVariables, type PlayerComputeInvokeMutation, type PlayerComputeInvokeMutationVariables } from '../generated/graphql.js';
3
+ /**
4
+ * Player-authored Rust/WASM bound to player-owned grids — exposed as
5
+ * `client.playerCompute` and routed to the Game API.
6
+ *
7
+ * Deploying requires current grid ownership plus the target-specific
8
+ * `write_server_code` or `write_client_code` permission at both the app-tier
9
+ * and grid ACL layers. Enabling separately requires the matching run
10
+ * permission, a successful compile, and app admission when strict allow-list
11
+ * mode is active. Closed source remains visible only to its personal author.
12
+ */
13
+ export declare class PlayerComputeAPI {
14
+ private readonly graphql;
15
+ constructor(graphql: GraphQLClient);
16
+ /**
17
+ * Create or update a grid-bound module and publish an immutable pending
18
+ * source version. Compilation is asynchronous.
19
+ */
20
+ deploy(input: PlayerComputeDeployMutationVariables['input']): Promise<PlayerComputeDeployMutation['playerComputeDeploy']>;
21
+ /**
22
+ * Request activation or stop execution. Enabling checks ownership, run
23
+ * permission, compile success, and app code admission independently of
24
+ * authoring permission.
25
+ */
26
+ setEnabled(variables: PlayerComputeSetEnabledMutationVariables): Promise<PlayerComputeSetEnabledMutation['playerComputeSetEnabled']>;
27
+ /**
28
+ * List modules authored by the caller or installed on grids they currently
29
+ * own. Closed source is not included in this module-level result.
30
+ */
31
+ myModules(variables: PlayerComputeMyModulesQueryVariables): Promise<PlayerComputeMyModulesQuery['playerComputeMyModules']>;
32
+ /**
33
+ * List immutable versions newest-first. Source and compile logs are redacted
34
+ * unless the caller is the personal author or the version is open source.
35
+ */
36
+ versions(variables: PlayerComputeVersionsQueryVariables): Promise<PlayerComputeVersionsQuery['playerComputeVersions']>;
37
+ /**
38
+ * Delete a self-authored module and its versions. The caller must still own
39
+ * the grid. Returns false when no matching module exists.
40
+ */
41
+ delete(variables: PlayerComputeDeleteMutationVariables): Promise<PlayerComputeDeleteMutation['playerComputeDelete']>;
42
+ /** Invoke an enabled/admitted server module synchronously as the grid owner. */
43
+ invoke(variables: PlayerComputeInvokeMutationVariables): Promise<PlayerComputeInvokeMutation['playerComputeInvoke']>;
44
+ /**
45
+ * The caller's spend/quota view for one app (P2): compute units burned in
46
+ * the current clock hour/day vs the effective policy caps, compile-quota
47
+ * utilization, and the wallet/spend-cap gate state with its typed reason
48
+ * (PLAYER_QUOTA_EXHAUSTED / PLAYER_WALLET_EMPTY / PLAYER_SPEND_CAP /
49
+ * PLAYER_COMPUTE_KILLED). The remaining-budget source for a live cost
50
+ * meter.
51
+ */
52
+ usage(variables: PlayerComputeUsageQueryVariables): Promise<PlayerComputeUsageQuery['playerComputeUsage']>;
53
+ /** Executions on an owned grid, newest first (attributed to the grid owner). */
54
+ runs(variables: PlayerComputeRunsQueryVariables): Promise<PlayerComputeRunsQuery['playerComputeRuns']>;
55
+ /** Failed-run diagnostics on an owned grid (typed error kinds), newest first. */
56
+ logs(variables: PlayerComputeLogsQueryVariables): Promise<PlayerComputeLogsQuery['playerComputeLogs']>;
57
+ /**
58
+ * Throw or release a kill-ladder switch at player/grid/app scope (studio,
59
+ * requires `manage_compute`). Quota state is retained across a kill.
60
+ */
61
+ setSwitch(variables: PlayerComputeSetSwitchMutationVariables): Promise<PlayerComputeSetSwitchMutation['playerComputeSetSwitch']>;
62
+ /** Active kill-ladder switches (studio, requires `view_compute_diagnostics`). */
63
+ switches(variables: PlayerComputeSwitchesQueryVariables): Promise<PlayerComputeSwitchesQuery['playerComputeSwitches']>;
64
+ /**
65
+ * Fetch a compiled CLIENT artifact + metadata for the browser broker (P3).
66
+ * Fail-closed server-side (ownership, authorship, run_client_code,
67
+ * admission). Returns the metadata as-is; use {@link artifactBytes} to get
68
+ * the decoded ArrayBuffer ready to hand {@link PlayerCodeBroker.start}.
69
+ */
70
+ artifact(variables: PlayerComputeArtifactQueryVariables): Promise<PlayerComputeArtifactQuery['playerComputeArtifact']>;
71
+ /**
72
+ * Fetch a client artifact and decode its bytes to an ArrayBuffer plus the
73
+ * broker inputs (content hash for side-load verification, per-dispatch fuel
74
+ * budget). Convenience over {@link artifact} for the live-coding client
75
+ * deploy loop.
76
+ */
77
+ artifactBytes(variables: PlayerComputeArtifactQueryVariables): Promise<{
78
+ bytes: ArrayBuffer;
79
+ artifactHash: string;
80
+ fuelPerDispatch: bigint;
81
+ contractJson: string | null;
82
+ versionId: string;
83
+ }>;
84
+ }
85
+ //# sourceMappingURL=playerCompute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playerCompute.d.ts","sourceRoot":"","s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C9C,OAAO,CAAC,2BAA2B,CAAC,qBAAqB,CAAC,CAAC;IAK9D,gFAAgF;IAC1E,MAAM,CACV,SAAS,EAAE,oCAAoC,GAC9C,OAAO,CAAC,2BAA2B,CAAC,qBAAqB,CAAC,CAAC;IAQ9D;;;;;;;OAOG;IACG,KAAK,CACT,SAAS,EAAE,gCAAgC,GAC1C,OAAO,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;IAQzD,gFAAgF;IAC1E,IAAI,CACR,SAAS,EAAE,+BAA+B,GACzC,OAAO,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;IAQvD,iFAAiF;IAC3E,IAAI,CACR,SAAS,EAAE,+BAA+B,GACzC,OAAO,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;IAQvD;;;OAGG;IACG,SAAS,CACb,SAAS,EAAE,uCAAuC,GACjD,OAAO,CAAC,8BAA8B,CAAC,wBAAwB,CAAC,CAAC;IAQpE,iFAAiF;IAC3E,QAAQ,CACZ,SAAS,EAAE,mCAAmC,GAC7C,OAAO,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,CAAC;IAQ/D;;;;;OAKG;IACG,QAAQ,CACZ,SAAS,EAAE,mCAAmC,GAC7C,OAAO,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,CAAC;IAQ/D;;;;;OAKG;IACG,aAAa,CACjB,SAAS,EAAE,mCAAmC,GAC7C,OAAO,CAAC;QACT,KAAK,EAAE,WAAW,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CAaH"}
@@ -0,0 +1,127 @@
1
+ import { PlayerComputeDeployDocument, PlayerComputeSetEnabledDocument, PlayerComputeMyModulesDocument, PlayerComputeVersionsDocument, PlayerComputeDeleteDocument, PlayerComputeInvokeDocument, PlayerComputeUsageDocument, PlayerComputeRunsDocument, PlayerComputeLogsDocument, PlayerComputeSetSwitchDocument, PlayerComputeSwitchesDocument, PlayerComputeArtifactDocument, } from '../generated/graphql.js';
2
+ /**
3
+ * Player-authored Rust/WASM bound to player-owned grids — exposed as
4
+ * `client.playerCompute` and routed to the Game API.
5
+ *
6
+ * Deploying requires current grid ownership plus the target-specific
7
+ * `write_server_code` or `write_client_code` permission at both the app-tier
8
+ * and grid ACL layers. Enabling separately requires the matching run
9
+ * permission, a successful compile, and app admission when strict allow-list
10
+ * mode is active. Closed source remains visible only to its personal author.
11
+ */
12
+ export class PlayerComputeAPI {
13
+ constructor(graphql) {
14
+ this.graphql = graphql;
15
+ }
16
+ /**
17
+ * Create or update a grid-bound module and publish an immutable pending
18
+ * source version. Compilation is asynchronous.
19
+ */
20
+ async deploy(input) {
21
+ const data = await this.graphql.request(PlayerComputeDeployDocument, { input });
22
+ return data.playerComputeDeploy;
23
+ }
24
+ /**
25
+ * Request activation or stop execution. Enabling checks ownership, run
26
+ * permission, compile success, and app code admission independently of
27
+ * authoring permission.
28
+ */
29
+ async setEnabled(variables) {
30
+ const data = await this.graphql.request(PlayerComputeSetEnabledDocument, variables);
31
+ return data.playerComputeSetEnabled;
32
+ }
33
+ /**
34
+ * List modules authored by the caller or installed on grids they currently
35
+ * own. Closed source is not included in this module-level result.
36
+ */
37
+ async myModules(variables) {
38
+ const data = await this.graphql.request(PlayerComputeMyModulesDocument, variables);
39
+ return data.playerComputeMyModules;
40
+ }
41
+ /**
42
+ * List immutable versions newest-first. Source and compile logs are redacted
43
+ * unless the caller is the personal author or the version is open source.
44
+ */
45
+ async versions(variables) {
46
+ const data = await this.graphql.request(PlayerComputeVersionsDocument, variables);
47
+ return data.playerComputeVersions;
48
+ }
49
+ /**
50
+ * Delete a self-authored module and its versions. The caller must still own
51
+ * the grid. Returns false when no matching module exists.
52
+ */
53
+ async delete(variables) {
54
+ const data = await this.graphql.request(PlayerComputeDeleteDocument, variables);
55
+ return data.playerComputeDelete;
56
+ }
57
+ /** Invoke an enabled/admitted server module synchronously as the grid owner. */
58
+ async invoke(variables) {
59
+ const data = await this.graphql.request(PlayerComputeInvokeDocument, variables);
60
+ return data.playerComputeInvoke;
61
+ }
62
+ /**
63
+ * The caller's spend/quota view for one app (P2): compute units burned in
64
+ * the current clock hour/day vs the effective policy caps, compile-quota
65
+ * utilization, and the wallet/spend-cap gate state with its typed reason
66
+ * (PLAYER_QUOTA_EXHAUSTED / PLAYER_WALLET_EMPTY / PLAYER_SPEND_CAP /
67
+ * PLAYER_COMPUTE_KILLED). The remaining-budget source for a live cost
68
+ * meter.
69
+ */
70
+ async usage(variables) {
71
+ const data = await this.graphql.request(PlayerComputeUsageDocument, variables);
72
+ return data.playerComputeUsage;
73
+ }
74
+ /** Executions on an owned grid, newest first (attributed to the grid owner). */
75
+ async runs(variables) {
76
+ const data = await this.graphql.request(PlayerComputeRunsDocument, variables);
77
+ return data.playerComputeRuns;
78
+ }
79
+ /** Failed-run diagnostics on an owned grid (typed error kinds), newest first. */
80
+ async logs(variables) {
81
+ const data = await this.graphql.request(PlayerComputeLogsDocument, variables);
82
+ return data.playerComputeLogs;
83
+ }
84
+ /**
85
+ * Throw or release a kill-ladder switch at player/grid/app scope (studio,
86
+ * requires `manage_compute`). Quota state is retained across a kill.
87
+ */
88
+ async setSwitch(variables) {
89
+ const data = await this.graphql.request(PlayerComputeSetSwitchDocument, variables);
90
+ return data.playerComputeSetSwitch;
91
+ }
92
+ /** Active kill-ladder switches (studio, requires `view_compute_diagnostics`). */
93
+ async switches(variables) {
94
+ const data = await this.graphql.request(PlayerComputeSwitchesDocument, variables);
95
+ return data.playerComputeSwitches;
96
+ }
97
+ /**
98
+ * Fetch a compiled CLIENT artifact + metadata for the browser broker (P3).
99
+ * Fail-closed server-side (ownership, authorship, run_client_code,
100
+ * admission). Returns the metadata as-is; use {@link artifactBytes} to get
101
+ * the decoded ArrayBuffer ready to hand {@link PlayerCodeBroker.start}.
102
+ */
103
+ async artifact(variables) {
104
+ const data = await this.graphql.request(PlayerComputeArtifactDocument, variables);
105
+ return data.playerComputeArtifact;
106
+ }
107
+ /**
108
+ * Fetch a client artifact and decode its bytes to an ArrayBuffer plus the
109
+ * broker inputs (content hash for side-load verification, per-dispatch fuel
110
+ * budget). Convenience over {@link artifact} for the live-coding client
111
+ * deploy loop.
112
+ */
113
+ async artifactBytes(variables) {
114
+ const a = await this.artifact(variables);
115
+ const binary = atob(a.artifactBase64);
116
+ const bytes = new Uint8Array(binary.length);
117
+ for (let i = 0; i < binary.length; i++)
118
+ bytes[i] = binary.charCodeAt(i);
119
+ return {
120
+ bytes: bytes.buffer,
121
+ artifactHash: a.artifactHash,
122
+ fuelPerDispatch: BigInt(a.clientFuelPerDispatch),
123
+ contractJson: a.contractJson ?? null,
124
+ versionId: a.versionId,
125
+ };
126
+ }
127
+ }
@@ -0,0 +1,20 @@
1
+ import type { GraphQLClient } from '../client.js';
2
+ import { type PlayerModelContainersQuery, type PlayerModelContainersQueryVariables, type PlayerModelContainerQuery, type PlayerModelContainerQueryVariables, type PlayerModelCreateContainerMutation, type PlayerModelCreateContainerMutationVariables, type PlayerModelSetPropertyMutation, type PlayerModelSetPropertyMutationVariables, type PlayerModelDeleteContainerMutation, type PlayerModelDeleteContainerMutationVariables, type PlayerAutomationsQuery, type PlayerAutomationsQueryVariables, type PlayerAutomationCreateMutation, type PlayerAutomationCreateMutationVariables, type PlayerAutomationSetEnabledMutation, type PlayerAutomationSetEnabledMutationVariables, type PlayerAutomationDeleteMutation, type PlayerAutomationDeleteMutationVariables } from '../generated/graphql.js';
3
+ /**
4
+ * Grid-owner Model data and Automations. Every operation is forced to the
5
+ * current caller + owned grid by game-api; no studio gm_* row is reachable.
6
+ */
7
+ export declare class PlayerModelAPI {
8
+ private readonly graphql;
9
+ constructor(graphql: GraphQLClient);
10
+ containers(variables: PlayerModelContainersQueryVariables): Promise<PlayerModelContainersQuery['playerModelContainers']>;
11
+ container(input: PlayerModelContainerQueryVariables['input']): Promise<PlayerModelContainerQuery['playerModelContainer']>;
12
+ createContainer(input: PlayerModelCreateContainerMutationVariables['input']): Promise<PlayerModelCreateContainerMutation['playerModelCreateContainer']>;
13
+ setProperty(input: PlayerModelSetPropertyMutationVariables['input']): Promise<PlayerModelSetPropertyMutation['playerModelSetProperty']>;
14
+ deleteContainer(input: PlayerModelDeleteContainerMutationVariables['input']): Promise<PlayerModelDeleteContainerMutation['playerModelDeleteContainer']>;
15
+ automations(variables: PlayerAutomationsQueryVariables): Promise<PlayerAutomationsQuery['playerAutomations']>;
16
+ createAutomation(input: PlayerAutomationCreateMutationVariables['input']): Promise<PlayerAutomationCreateMutation['playerAutomationCreate']>;
17
+ setAutomationEnabled(input: PlayerAutomationSetEnabledMutationVariables['input']): Promise<PlayerAutomationSetEnabledMutation['playerAutomationSetEnabled']>;
18
+ deleteAutomation(input: PlayerAutomationDeleteMutationVariables['input']): Promise<PlayerAutomationDeleteMutation['playerAutomationDelete']>;
19
+ }
20
+ //# sourceMappingURL=playerModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playerModel.d.ts","sourceRoot":"","sources":["../../src/domains/playerModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAUL,KAAK,0BAA0B,EAC/B,KAAK,mCAAmC,EACxC,KAAK,yBAAyB,EAC9B,KAAK,kCAAkC,EACvC,KAAK,kCAAkC,EACvC,KAAK,2CAA2C,EAChD,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAC5C,KAAK,kCAAkC,EACvC,KAAK,2CAA2C,EAChD,KAAK,sBAAsB,EAC3B,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAC5C,KAAK,kCAAkC,EACvC,KAAK,2CAA2C,EAChD,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAC7C,MAAM,yBAAyB,CAAC;AAEjC;;;GAGG;AACH,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,aAAa;IAE7C,UAAU,CACd,SAAS,EAAE,mCAAmC,GAC7C,OAAO,CAAC,0BAA0B,CAAC,uBAAuB,CAAC,CAAC;IAQzD,SAAS,CACb,KAAK,EAAE,kCAAkC,CAAC,OAAO,CAAC,GACjD,OAAO,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,CAAC;IAOvD,eAAe,CACnB,KAAK,EAAE,2CAA2C,CAAC,OAAO,CAAC,GAC1D,OAAO,CAAC,kCAAkC,CAAC,4BAA4B,CAAC,CAAC;IAQtE,WAAW,CACf,KAAK,EAAE,uCAAuC,CAAC,OAAO,CAAC,GACtD,OAAO,CAAC,8BAA8B,CAAC,wBAAwB,CAAC,CAAC;IAO9D,eAAe,CACnB,KAAK,EAAE,2CAA2C,CAAC,OAAO,CAAC,GAC1D,OAAO,CAAC,kCAAkC,CAAC,4BAA4B,CAAC,CAAC;IAQtE,WAAW,CACf,SAAS,EAAE,+BAA+B,GACzC,OAAO,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;IAQjD,gBAAgB,CACpB,KAAK,EAAE,uCAAuC,CAAC,OAAO,CAAC,GACtD,OAAO,CAAC,8BAA8B,CAAC,wBAAwB,CAAC,CAAC;IAO9D,oBAAoB,CACxB,KAAK,EAAE,2CAA2C,CAAC,OAAO,CAAC,GAC1D,OAAO,CACR,kCAAkC,CAAC,4BAA4B,CAAC,CACjE;IAQK,gBAAgB,CACpB,KAAK,EAAE,uCAAuC,CAAC,OAAO,CAAC,GACtD,OAAO,CAAC,8BAA8B,CAAC,wBAAwB,CAAC,CAAC;CAMrE"}
@@ -0,0 +1,54 @@
1
+ import { PlayerModelContainersDocument, PlayerModelContainerDocument, PlayerModelCreateContainerDocument, PlayerModelSetPropertyDocument, PlayerModelDeleteContainerDocument, PlayerAutomationsDocument, PlayerAutomationCreateDocument, PlayerAutomationSetEnabledDocument, PlayerAutomationDeleteDocument, } from '../generated/graphql.js';
2
+ /**
3
+ * Grid-owner Model data and Automations. Every operation is forced to the
4
+ * current caller + owned grid by game-api; no studio gm_* row is reachable.
5
+ */
6
+ export class PlayerModelAPI {
7
+ constructor(graphql) {
8
+ this.graphql = graphql;
9
+ }
10
+ async containers(variables) {
11
+ const data = await this.graphql.request(PlayerModelContainersDocument, variables);
12
+ return data.playerModelContainers;
13
+ }
14
+ async container(input) {
15
+ const data = await this.graphql.request(PlayerModelContainerDocument, {
16
+ input,
17
+ });
18
+ return data.playerModelContainer;
19
+ }
20
+ async createContainer(input) {
21
+ const data = await this.graphql.request(PlayerModelCreateContainerDocument, { input });
22
+ return data.playerModelCreateContainer;
23
+ }
24
+ async setProperty(input) {
25
+ const data = await this.graphql.request(PlayerModelSetPropertyDocument, {
26
+ input,
27
+ });
28
+ return data.playerModelSetProperty;
29
+ }
30
+ async deleteContainer(input) {
31
+ const data = await this.graphql.request(PlayerModelDeleteContainerDocument, { input });
32
+ return data.playerModelDeleteContainer;
33
+ }
34
+ async automations(variables) {
35
+ const data = await this.graphql.request(PlayerAutomationsDocument, variables);
36
+ return data.playerAutomations;
37
+ }
38
+ async createAutomation(input) {
39
+ const data = await this.graphql.request(PlayerAutomationCreateDocument, {
40
+ input,
41
+ });
42
+ return data.playerAutomationCreate;
43
+ }
44
+ async setAutomationEnabled(input) {
45
+ const data = await this.graphql.request(PlayerAutomationSetEnabledDocument, { input });
46
+ return data.playerAutomationSetEnabled;
47
+ }
48
+ async deleteAutomation(input) {
49
+ const data = await this.graphql.request(PlayerAutomationDeleteDocument, {
50
+ input,
51
+ });
52
+ return data.playerAutomationDelete;
53
+ }
54
+ }
@@ -0,0 +1,59 @@
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 } from '../generated/graphql.js';
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.
6
+ *
7
+ * Every viewer-scoped call operates on the CALLER's own wallet: balance,
8
+ * ledger, hourly usage charges (platform vs studio-markup split), self-set
9
+ * spend caps, auto-recharge config, and per-app gate states. Fund the wallet
10
+ * via `client.payments.createCheckout` with purpose `PLAYER_WALLET_TOPUP`.
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`).
15
+ */
16
+ export declare class PlayerWalletAPI {
17
+ private readonly graphql;
18
+ constructor(graphql: GraphQLClient);
19
+ /** The caller's wallet, created empty on first access (never null). */
20
+ balance(): Promise<PlayerWalletBalanceQuery['playerWalletBalance']>;
21
+ /** The caller's wallet ledger, newest first. */
22
+ transactions(variables?: PlayerWalletTransactionsQueryVariables): Promise<PlayerWalletTransactionsQuery['playerWalletTransactions']>;
23
+ /**
24
+ * The caller's posted hourly usage charges; each splits platformCents vs
25
+ * markupCents with a per-metric snapshot ("what is this grid costing me").
26
+ */
27
+ charges(variables?: PlayerUsageChargesQueryVariables): Promise<PlayerUsageChargesQuery['playerUsageCharges']>;
28
+ /** The caller's self-set spend caps with running counters. */
29
+ spendCaps(): Promise<PlayerSpendCapsQuery['playerSpendCaps']>;
30
+ /** Set (or clear with null limits) a global or per-app self spend cap. */
31
+ setSpendCap(variables: SetPlayerSpendCapMutationVariables): Promise<SetPlayerSpendCapMutation['setPlayerSpendCap']>;
32
+ /** The caller's auto-recharge settings. */
33
+ autoBilling(): Promise<PlayerAutoBillingQuery['playerAutoBilling']>;
34
+ /** Configure auto-recharge (requires a vaulted payment method to enable). */
35
+ setAutoBilling(variables: SetPlayerAutoBillingMutationVariables): Promise<SetPlayerAutoBillingMutation['setPlayerAutoBilling']>;
36
+ /**
37
+ * Begin vaulting a card on the caller's player wallet (P4b): returns the
38
+ * Stripe SetupIntent client secret + publishable key the browser confirms.
39
+ * On success the card is saved for wallet auto-recharge and rent auto-renew.
40
+ */
41
+ beginCardSetup(): Promise<BeginPlayerCardSetupMutation['beginPlayerCardSetup']>;
42
+ /** The caller's per-app gate states (absence means active). */
43
+ runtimeStates(): Promise<PlayerRuntimeStatesQuery['playerRuntimeStates']>;
44
+ /** Studio: list an app's player policy rows (`view_compute_diagnostics`). */
45
+ policies(variables: PlayerWasmPoliciesQueryVariables): Promise<PlayerWasmPoliciesQuery['playerWasmPolicies']>;
46
+ /** Studio: upsert a player policy row (`manage_compute`). */
47
+ setPolicy(variables: SetPlayerWasmPolicyMutationVariables): Promise<SetPlayerWasmPolicyMutation['setPlayerWasmPolicy']>;
48
+ /** Studio: delete a player policy row (`manage_compute`). */
49
+ deletePolicy(variables: DeletePlayerWasmPolicyMutationVariables): Promise<DeletePlayerWasmPolicyMutation['deletePlayerWasmPolicy']>;
50
+ /** Studio: read the app's player rate-card markup in bps (`view_billing`). */
51
+ rateMarkup(variables: PlayerRateMarkupQueryVariables): Promise<PlayerRateMarkupQuery['playerRateMarkup']>;
52
+ /** Studio: set the app's player rate-card markup in bps (`manage_billing`). */
53
+ setRateMarkup(variables: SetPlayerRateMarkupMutationVariables): Promise<SetPlayerRateMarkupMutation['setPlayerRateMarkup']>;
54
+ /** Studio: per-player usage aggregate (`view_compute_diagnostics`). */
55
+ appPlayerUsage(variables: AppPlayerUsageQueryVariables): Promise<AppPlayerUsageQuery['appPlayerUsage']>;
56
+ /** Studio: total accrued markup income in cents (`view_billing`). */
57
+ appMarkupAccrued(variables: AppPlayerMarkupAccruedQueryVariables): Promise<AppPlayerMarkupAccruedQuery['appPlayerMarkupAccrued']>;
58
+ }
59
+ //# sourceMappingURL=playerWallet.d.ts.map
@@ -0,0 +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,EASjC,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,KAAK,gCAAgC,EACrC,KAAK,2BAA2B,EAChC,KAAK,oCAAoC,EACzC,KAAK,8BAA8B,EACnC,KAAK,uCAAuC,EAC5C,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,2BAA2B,EAChC,KAAK,oCAAoC,EACzC,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,oCAAoC,EAC1C,MAAM,yBAAyB,CAAC;AAEjC;;;;;;;;;;;;GAYG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,aAAa;IAEnD,uEAAuE;IACjE,OAAO,IAAI,OAAO,CAAC,wBAAwB,CAAC,qBAAqB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