@playdrop/playdrop-cli 0.15.5 → 0.15.9

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 (74) hide show
  1. package/config/client-meta.json +2 -2
  2. package/dist/apps/index.d.ts +0 -1
  3. package/dist/apps/index.js +0 -1
  4. package/dist/apps/loadCheck.d.ts +2 -1
  5. package/dist/apps/loadCheck.js +15 -7
  6. package/dist/apps/staticHtml.js +1 -0
  7. package/dist/apps/upload.d.ts +0 -1
  8. package/dist/apps/upload.js +19 -12
  9. package/dist/catalogue.d.ts +3 -0
  10. package/dist/catalogue.js +26 -0
  11. package/dist/commands/create.js +45 -16
  12. package/dist/commands/devRuntimeAssets.d.ts +1 -0
  13. package/dist/commands/devRuntimeAssets.js +2 -0
  14. package/dist/commands/review.js +0 -3
  15. package/dist/commands/upload.d.ts +2 -3
  16. package/dist/commands/upload.js +22 -42
  17. package/dist/commands/validate.js +0 -4
  18. package/dist/commands/worker.d.ts +7 -1
  19. package/dist/commands/worker.js +65 -57
  20. package/dist/index.js +1 -1
  21. package/dist/listingPreflight.d.ts +1 -24
  22. package/dist/listingPreflight.js +3 -288
  23. package/node_modules/@playdrop/api-client/dist/client.d.ts +29 -1
  24. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  25. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +4 -1
  26. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
  27. package/node_modules/@playdrop/api-client/dist/domains/admin.js +31 -2
  28. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts +2 -1
  29. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.d.ts.map +1 -1
  30. package/node_modules/@playdrop/api-client/dist/domains/agent-tasks.js +12 -0
  31. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts +9 -1
  32. package/node_modules/@playdrop/api-client/dist/domains/apps.d.ts.map +1 -1
  33. package/node_modules/@playdrop/api-client/dist/domains/apps.js +66 -0
  34. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts +1 -0
  35. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.d.ts.map +1 -1
  36. package/node_modules/@playdrop/api-client/dist/domains/asset-packs.js +3 -0
  37. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts +1 -0
  38. package/node_modules/@playdrop/api-client/dist/domains/assets.d.ts.map +1 -1
  39. package/node_modules/@playdrop/api-client/dist/domains/assets.js +3 -0
  40. package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts +15 -1
  41. package/node_modules/@playdrop/api-client/dist/domains/payments.d.ts.map +1 -1
  42. package/node_modules/@playdrop/api-client/dist/domains/payments.js +58 -0
  43. package/node_modules/@playdrop/api-client/dist/index.d.ts +30 -1
  44. package/node_modules/@playdrop/api-client/dist/index.d.ts.map +1 -1
  45. package/node_modules/@playdrop/api-client/dist/index.js +65 -0
  46. package/node_modules/@playdrop/config/client-meta.json +2 -2
  47. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts +18 -0
  48. package/node_modules/@playdrop/config/dist/src/creator-plans.d.ts.map +1 -0
  49. package/node_modules/@playdrop/config/dist/src/creator-plans.js +117 -0
  50. package/node_modules/@playdrop/config/dist/src/game-arena.d.ts +1 -1
  51. package/node_modules/@playdrop/config/dist/src/game-arena.js +1 -1
  52. package/node_modules/@playdrop/config/dist/src/index.d.ts +1 -0
  53. package/node_modules/@playdrop/config/dist/src/index.d.ts.map +1 -1
  54. package/node_modules/@playdrop/config/dist/src/index.js +1 -0
  55. package/node_modules/@playdrop/config/dist/test/creator-plans.test.d.ts +2 -0
  56. package/node_modules/@playdrop/config/dist/test/creator-plans.test.d.ts.map +1 -0
  57. package/node_modules/@playdrop/config/dist/test/creator-plans.test.js +28 -0
  58. package/node_modules/@playdrop/config/dist/test/game-arena.test.js +3 -3
  59. package/node_modules/@playdrop/config/dist/tsconfig.tsbuildinfo +1 -1
  60. package/node_modules/@playdrop/types/dist/api.d.ts +133 -14
  61. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  62. package/node_modules/@playdrop/types/dist/api.js +20 -2
  63. package/node_modules/@playdrop/types/dist/app-review.d.ts +2 -0
  64. package/node_modules/@playdrop/types/dist/app-review.d.ts.map +1 -1
  65. package/node_modules/@playdrop/types/dist/app-review.js +31 -2
  66. package/node_modules/@playdrop/types/dist/index.d.ts +1 -0
  67. package/node_modules/@playdrop/types/dist/index.d.ts.map +1 -1
  68. package/node_modules/@playdrop/types/dist/index.js +3 -1
  69. package/node_modules/@playdrop/types/dist/release-smoke.d.ts +3 -0
  70. package/node_modules/@playdrop/types/dist/release-smoke.d.ts.map +1 -0
  71. package/node_modules/@playdrop/types/dist/release-smoke.js +35 -0
  72. package/node_modules/@playdrop/types/dist/version.d.ts +5 -0
  73. package/node_modules/@playdrop/types/dist/version.d.ts.map +1 -1
  74. package/package.json +1 -1
@@ -59,6 +59,9 @@ __export(dist_exports, {
59
59
  createCliApiKey: () => createCliApiKey,
60
60
  createCliApiToken: () => createCliApiToken,
61
61
  createContentComment: () => createContentComment,
62
+ createCreatorPlanChangeSession: () => createCreatorPlanChangeSession,
63
+ createCreatorPlanCheckoutSession: () => createCreatorPlanCheckoutSession,
64
+ createCreatorPlanPortalSession: () => createCreatorPlanPortalSession,
62
65
  createCreditPackCheckoutSession: () => createCreditPackCheckoutSession,
63
66
  createNativeOAuthLinkStart: () => createNativeOAuthLinkStart,
64
67
  createNewGameAgentTask: () => createNewGameAgentTask,
@@ -78,6 +81,7 @@ __export(dist_exports, {
78
81
  deleteContentComment: () => deleteContentComment,
79
82
  deleteFirebasePushDevice: () => deleteFirebasePushDevice,
80
83
  deleteWebPushSubscription: () => deleteWebPushSubscription,
84
+ discardAppListingDraft: () => discardAppListingDraft,
81
85
  dislikeContentComment: () => dislikeContentComment,
82
86
  dislikeItem: () => dislikeItem,
83
87
  downloadAppSource: () => downloadAppSource,
@@ -134,6 +138,7 @@ __export(dist_exports, {
134
138
  fetchCliLoginStatus: () => fetchCliLoginStatus,
135
139
  fetchContentComments: () => fetchContentComments,
136
140
  fetchCreatorEarnings: () => fetchCreatorEarnings,
141
+ fetchCreatorPlanCheckoutStatus: () => fetchCreatorPlanCheckoutStatus,
137
142
  fetchCreditPackCheckoutStatus: () => fetchCreditPackCheckoutStatus,
138
143
  fetchCreditTransactions: () => fetchCreditTransactions,
139
144
  fetchEmailPreferences: () => fetchEmailPreferences,
@@ -177,6 +182,7 @@ __export(dist_exports, {
177
182
  getAgentTaskAvailability: () => getAgentTaskAvailability,
178
183
  getAppAgentTask: () => getAppAgentTask,
179
184
  getAppAgentTaskAvailability: () => getAppAgentTaskAvailability,
185
+ getAppListingDraft: () => getAppListingDraft,
180
186
  getAppTweaks: () => getAppTweaks,
181
187
  getAppVersion: () => getAppVersion,
182
188
  getClientVersionLabel: () => getClientVersionLabel,
@@ -228,14 +234,17 @@ __export(dist_exports, {
228
234
  normalizeAppType: () => import_types2.normalizeAppType,
229
235
  pollCliLogin: () => pollCliLogin,
230
236
  previewAdminCommunicationsRule: () => previewAdminCommunicationsRule,
237
+ publishAppListingDraft: () => publishAppListingDraft,
231
238
  purchaseAsset: () => purchaseAsset,
232
239
  purchaseBoostPack: () => purchaseBoostPack,
233
240
  purchaseDevIap: () => purchaseDevIap,
234
241
  purchaseIap: () => purchaseIap,
242
+ reconcileCreatorPlanSubscription: () => reconcileCreatorPlanSubscription,
235
243
  recordAppUploadLaunchCheck: () => recordAppUploadLaunchCheck,
236
244
  recordCreatorGameShare: () => recordCreatorGameShare,
237
245
  register: () => register,
238
246
  registerAgentBundle: () => registerAgentBundle,
247
+ removeAppListingDraftMedia: () => removeAppListingDraftMedia,
239
248
  replaceAdminGameCollectionGames: () => replaceAdminGameCollectionGames,
240
249
  replaceAppTweaks: () => replaceAppTweaks,
241
250
  reportComment: () => reportComment,
@@ -287,17 +296,20 @@ __export(dist_exports, {
287
296
  updateAdminCommunicationsRuleAction: () => updateAdminCommunicationsRuleAction,
288
297
  updateAdminFeedback: () => updateAdminFeedback,
289
298
  updateAdminGameCollection: () => updateAdminGameCollection,
299
+ updateAppListingDraft: () => updateAppListingDraft,
290
300
  updateAppVersion: () => updateAppVersion,
291
301
  updateAsset: () => updateAsset,
292
302
  updateAssetPack: () => updateAssetPack,
293
303
  updateAssetPackVersion: () => updateAssetPackVersion,
294
304
  updateAssetVersion: () => updateAssetVersion,
295
305
  updateCreatorGameFeedbackStatus: () => updateCreatorGameFeedbackStatus,
306
+ updateCreatorPlanCreditUsage: () => updateCreatorPlanCreditUsage,
296
307
  updateEmailPreferences: () => updateEmailPreferences,
297
308
  updateProfile: () => updateProfile,
298
309
  updatePublicEmailPreferences: () => updatePublicEmailPreferences,
299
310
  uploadAdminGameCollectionIcon: () => uploadAdminGameCollectionIcon,
300
311
  uploadAgentTaskAttachment: () => uploadAgentTaskAttachment,
312
+ uploadAppListingDraftMedia: () => uploadAppListingDraftMedia,
301
313
  uploadAppSessionFile: () => uploadAppSessionFile,
302
314
  upsertApplePushDevice: () => upsertApplePushDevice,
303
315
  upsertFirebasePushDevice: () => upsertFirebasePushDevice,
@@ -306,6 +318,7 @@ __export(dist_exports, {
306
318
  workerClaimAgentTask: () => workerClaimAgentTask,
307
319
  workerClaimAgentTaskSlug: () => workerClaimAgentTaskSlug,
308
320
  workerCompleteAgentTask: () => workerCompleteAgentTask,
321
+ workerCompleteReleaseSmoke: () => workerCompleteReleaseSmoke,
309
322
  workerCreateAgentTaskEvent: () => workerCreateAgentTaskEvent,
310
323
  workerCreateUpdateIntent: () => workerCreateUpdateIntent,
311
324
  workerFailAgentTask: () => workerFailAgentTask,
@@ -665,6 +678,9 @@ async function workerRecordAgentTaskRunTelemetry(taskId, body) {
665
678
  async function workerCompleteAgentTask(taskId, body) {
666
679
  return await getDefaultClient().workerCompleteAgentTask(taskId, body);
667
680
  }
681
+ async function workerCompleteReleaseSmoke(taskId, body) {
682
+ return await getDefaultClient().workerCompleteReleaseSmoke(taskId, body);
683
+ }
668
684
  async function workerSubmitAgentTaskReview(taskId, body) {
669
685
  return await getDefaultClient().workerSubmitAgentTaskReview(taskId, body);
670
686
  }
@@ -1009,6 +1025,24 @@ async function createCreditPackCheckoutSession(sku, request) {
1009
1025
  async function fetchCreditPackCheckoutStatus(sessionId) {
1010
1026
  return await getDefaultClient().fetchCreditPackCheckoutStatus(sessionId);
1011
1027
  }
1028
+ async function createCreatorPlanCheckoutSession(tier, requestKey, request) {
1029
+ return await getDefaultClient().createCreatorPlanCheckoutSession(tier, requestKey, request);
1030
+ }
1031
+ async function fetchCreatorPlanCheckoutStatus(sessionId) {
1032
+ return await getDefaultClient().fetchCreatorPlanCheckoutStatus(sessionId);
1033
+ }
1034
+ async function createCreatorPlanChangeSession(tier, request) {
1035
+ return await getDefaultClient().createCreatorPlanChangeSession(tier, request);
1036
+ }
1037
+ async function createCreatorPlanPortalSession(request) {
1038
+ return await getDefaultClient().createCreatorPlanPortalSession(request);
1039
+ }
1040
+ async function reconcileCreatorPlanSubscription() {
1041
+ return await getDefaultClient().reconcileCreatorPlanSubscription();
1042
+ }
1043
+ async function updateCreatorPlanCreditUsage(enabled) {
1044
+ return await getDefaultClient().updateCreatorPlanCreditUsage(enabled);
1045
+ }
1012
1046
  async function fulfillAppleCreditPackPurchase(request) {
1013
1047
  return await getDefaultClient().fulfillAppleCreditPackPurchase(request);
1014
1048
  }
@@ -1223,6 +1257,24 @@ async function deleteAssetPack(creatorUsername, name) {
1223
1257
  async function getAppVersion(creatorUsername, appName, version) {
1224
1258
  return await getDefaultClient().getAppVersion(creatorUsername, appName, version);
1225
1259
  }
1260
+ async function getAppListingDraft(creatorUsername, appName) {
1261
+ return await getDefaultClient().getAppListingDraft(creatorUsername, appName);
1262
+ }
1263
+ async function updateAppListingDraft(creatorUsername, appName, request) {
1264
+ return await getDefaultClient().updateAppListingDraft(creatorUsername, appName, request);
1265
+ }
1266
+ async function uploadAppListingDraftMedia(creatorUsername, appName, slot, file, filename) {
1267
+ return await getDefaultClient().uploadAppListingDraftMedia(creatorUsername, appName, slot, file, filename);
1268
+ }
1269
+ async function removeAppListingDraftMedia(creatorUsername, appName, slot) {
1270
+ return await getDefaultClient().removeAppListingDraftMedia(creatorUsername, appName, slot);
1271
+ }
1272
+ async function discardAppListingDraft(creatorUsername, appName) {
1273
+ return await getDefaultClient().discardAppListingDraft(creatorUsername, appName);
1274
+ }
1275
+ async function publishAppListingDraft(creatorUsername, appName) {
1276
+ return await getDefaultClient().publishAppListingDraft(creatorUsername, appName);
1277
+ }
1226
1278
  async function fetchAppRuntimeAssets(creatorUsername, appName, version) {
1227
1279
  return await getDefaultClient().fetchAppRuntimeAssets(creatorUsername, appName, version);
1228
1280
  }
@@ -1365,6 +1417,9 @@ function getClientVersionLabel() {
1365
1417
  createCliApiKey,
1366
1418
  createCliApiToken,
1367
1419
  createContentComment,
1420
+ createCreatorPlanChangeSession,
1421
+ createCreatorPlanCheckoutSession,
1422
+ createCreatorPlanPortalSession,
1368
1423
  createCreditPackCheckoutSession,
1369
1424
  createNativeOAuthLinkStart,
1370
1425
  createNewGameAgentTask,
@@ -1384,6 +1439,7 @@ function getClientVersionLabel() {
1384
1439
  deleteContentComment,
1385
1440
  deleteFirebasePushDevice,
1386
1441
  deleteWebPushSubscription,
1442
+ discardAppListingDraft,
1387
1443
  dislikeContentComment,
1388
1444
  dislikeItem,
1389
1445
  downloadAppSource,
@@ -1440,6 +1496,7 @@ function getClientVersionLabel() {
1440
1496
  fetchCliLoginStatus,
1441
1497
  fetchContentComments,
1442
1498
  fetchCreatorEarnings,
1499
+ fetchCreatorPlanCheckoutStatus,
1443
1500
  fetchCreditPackCheckoutStatus,
1444
1501
  fetchCreditTransactions,
1445
1502
  fetchEmailPreferences,
@@ -1483,6 +1540,7 @@ function getClientVersionLabel() {
1483
1540
  getAgentTaskAvailability,
1484
1541
  getAppAgentTask,
1485
1542
  getAppAgentTaskAvailability,
1543
+ getAppListingDraft,
1486
1544
  getAppTweaks,
1487
1545
  getAppVersion,
1488
1546
  getClientVersionLabel,
@@ -1534,14 +1592,17 @@ function getClientVersionLabel() {
1534
1592
  normalizeAppType,
1535
1593
  pollCliLogin,
1536
1594
  previewAdminCommunicationsRule,
1595
+ publishAppListingDraft,
1537
1596
  purchaseAsset,
1538
1597
  purchaseBoostPack,
1539
1598
  purchaseDevIap,
1540
1599
  purchaseIap,
1600
+ reconcileCreatorPlanSubscription,
1541
1601
  recordAppUploadLaunchCheck,
1542
1602
  recordCreatorGameShare,
1543
1603
  register,
1544
1604
  registerAgentBundle,
1605
+ removeAppListingDraftMedia,
1545
1606
  replaceAdminGameCollectionGames,
1546
1607
  replaceAppTweaks,
1547
1608
  reportComment,
@@ -1593,17 +1654,20 @@ function getClientVersionLabel() {
1593
1654
  updateAdminCommunicationsRuleAction,
1594
1655
  updateAdminFeedback,
1595
1656
  updateAdminGameCollection,
1657
+ updateAppListingDraft,
1596
1658
  updateAppVersion,
1597
1659
  updateAsset,
1598
1660
  updateAssetPack,
1599
1661
  updateAssetPackVersion,
1600
1662
  updateAssetVersion,
1601
1663
  updateCreatorGameFeedbackStatus,
1664
+ updateCreatorPlanCreditUsage,
1602
1665
  updateEmailPreferences,
1603
1666
  updateProfile,
1604
1667
  updatePublicEmailPreferences,
1605
1668
  uploadAdminGameCollectionIcon,
1606
1669
  uploadAgentTaskAttachment,
1670
+ uploadAppListingDraftMedia,
1607
1671
  uploadAppSessionFile,
1608
1672
  upsertApplePushDevice,
1609
1673
  upsertFirebasePushDevice,
@@ -1612,6 +1676,7 @@ function getClientVersionLabel() {
1612
1676
  workerClaimAgentTask,
1613
1677
  workerClaimAgentTaskSlug,
1614
1678
  workerCompleteAgentTask,
1679
+ workerCompleteReleaseSmoke,
1615
1680
  workerCreateAgentTaskEvent,
1616
1681
  workerCreateUpdateIntent,
1617
1682
  workerFailAgentTask,
@@ -1,7 +1,7 @@
1
1
  {
2
- "version": "0.15.5",
2
+ "version": "0.15.9",
3
3
  "build": 1,
4
- "runtimeSdkVersion": "0.15.5",
4
+ "runtimeSdkVersion": "0.15.9",
5
5
  "runtimeSdkBuild": 1,
6
6
  "clients": {
7
7
  "all": {
@@ -0,0 +1,18 @@
1
+ export declare const CREATOR_PLAN_TIER_VALUES: readonly ["BASIC", "PLUS", "PRO"];
2
+ export type CreatorPlanTier = typeof CREATOR_PLAN_TIER_VALUES[number];
3
+ export type CreatorPlanDefinition = {
4
+ tier: CreatorPlanTier;
5
+ name: string;
6
+ monthlyPriceCents: number;
7
+ weeklyGenerations: number;
8
+ maxConcurrentTasks: number;
9
+ maxGames: number;
10
+ maxStoredContentBytes: bigint;
11
+ };
12
+ export declare const CREATOR_PLAN_CATALOG: Record<CreatorPlanTier, CreatorPlanDefinition>;
13
+ export declare const CREATOR_PLAN_RANK: Record<CreatorPlanTier, number>;
14
+ export declare function isCreatorPlanTier(value: unknown): value is CreatorPlanTier;
15
+ export declare function getCreatorPlanDefinition(tier: CreatorPlanTier): CreatorPlanDefinition;
16
+ export declare function higherCreatorPlanTier(a: CreatorPlanTier, b: CreatorPlanTier): CreatorPlanTier;
17
+ export declare function getNextCreatorPlanResetAt(now?: Date): Date;
18
+ //# sourceMappingURL=creator-plans.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creator-plans.d.ts","sourceRoot":"","sources":["../../src/creator-plans.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,mCAAoC,CAAC;AAE1E,MAAM,MAAM,eAAe,GAAG,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAEtE,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC;AAIF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,eAAe,EAAE,qBAAqB,CA4B/E,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAI7D,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,eAAe,GAAG,qBAAqB,CAErF;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,eAAe,GAAG,eAAe,CAE7F;AAsED,wBAAgB,yBAAyB,CAAC,GAAG,GAAE,IAAiB,GAAG,IAAI,CAsBtE"}
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CREATOR_PLAN_RANK = exports.CREATOR_PLAN_CATALOG = exports.CREATOR_PLAN_TIER_VALUES = void 0;
4
+ exports.isCreatorPlanTier = isCreatorPlanTier;
5
+ exports.getCreatorPlanDefinition = getCreatorPlanDefinition;
6
+ exports.higherCreatorPlanTier = higherCreatorPlanTier;
7
+ exports.getNextCreatorPlanResetAt = getNextCreatorPlanResetAt;
8
+ exports.CREATOR_PLAN_TIER_VALUES = ['BASIC', 'PLUS', 'PRO'];
9
+ const GIB = 1024n * 1024n * 1024n;
10
+ exports.CREATOR_PLAN_CATALOG = {
11
+ BASIC: {
12
+ tier: 'BASIC',
13
+ name: 'Basic',
14
+ monthlyPriceCents: 0,
15
+ weeklyGenerations: 5,
16
+ maxConcurrentTasks: 1,
17
+ maxGames: 10,
18
+ maxStoredContentBytes: GIB,
19
+ },
20
+ PLUS: {
21
+ tier: 'PLUS',
22
+ name: 'Plus',
23
+ monthlyPriceCents: 2000,
24
+ weeklyGenerations: 50,
25
+ maxConcurrentTasks: 5,
26
+ maxGames: 100,
27
+ maxStoredContentBytes: 10n * GIB,
28
+ },
29
+ PRO: {
30
+ tier: 'PRO',
31
+ name: 'Pro',
32
+ monthlyPriceCents: 10000,
33
+ weeklyGenerations: 500,
34
+ maxConcurrentTasks: 10,
35
+ maxGames: 1000,
36
+ maxStoredContentBytes: 100n * GIB,
37
+ },
38
+ };
39
+ exports.CREATOR_PLAN_RANK = {
40
+ BASIC: 0,
41
+ PLUS: 1,
42
+ PRO: 2,
43
+ };
44
+ function isCreatorPlanTier(value) {
45
+ return typeof value === 'string' && exports.CREATOR_PLAN_TIER_VALUES.includes(value);
46
+ }
47
+ function getCreatorPlanDefinition(tier) {
48
+ return exports.CREATOR_PLAN_CATALOG[tier];
49
+ }
50
+ function higherCreatorPlanTier(a, b) {
51
+ return exports.CREATOR_PLAN_RANK[a] >= exports.CREATOR_PLAN_RANK[b] ? a : b;
52
+ }
53
+ const CREATOR_PLAN_RESET_TIME_ZONE = 'America/New_York';
54
+ function zonedDateParts(date) {
55
+ const parts = new Intl.DateTimeFormat('en-US', {
56
+ timeZone: CREATOR_PLAN_RESET_TIME_ZONE,
57
+ year: 'numeric',
58
+ month: '2-digit',
59
+ day: '2-digit',
60
+ hour: '2-digit',
61
+ minute: '2-digit',
62
+ second: '2-digit',
63
+ hourCycle: 'h23',
64
+ }).formatToParts(date);
65
+ const read = (type) => {
66
+ const value = Number(parts.find((part) => part.type === type)?.value);
67
+ if (!Number.isInteger(value)) {
68
+ throw new Error('creator_plan_reset_time_conversion_failed');
69
+ }
70
+ return value;
71
+ };
72
+ return {
73
+ year: read('year'),
74
+ month: read('month'),
75
+ day: read('day'),
76
+ hour: read('hour'),
77
+ minute: read('minute'),
78
+ second: read('second'),
79
+ };
80
+ }
81
+ function localDateTimeToUtc(parts) {
82
+ const localAsUtc = Date.UTC(parts.year, parts.month - 1, parts.day, parts.hour, parts.minute, parts.second);
83
+ let candidate = localAsUtc;
84
+ for (let attempt = 0; attempt < 3; attempt += 1) {
85
+ const rendered = zonedDateParts(new Date(candidate));
86
+ const renderedAsUtc = Date.UTC(rendered.year, rendered.month - 1, rendered.day, rendered.hour, rendered.minute, rendered.second);
87
+ const next = candidate - (renderedAsUtc - localAsUtc);
88
+ if (next === candidate) {
89
+ break;
90
+ }
91
+ candidate = next;
92
+ }
93
+ return new Date(candidate);
94
+ }
95
+ function getNextCreatorPlanResetAt(now = new Date()) {
96
+ if (Number.isNaN(now.getTime())) {
97
+ throw new Error('invalid_creator_plan_reset_reference_time');
98
+ }
99
+ const local = zonedDateParts(now);
100
+ const localDate = new Date(Date.UTC(local.year, local.month - 1, local.day));
101
+ const friday = 5;
102
+ let daysUntilFriday = (friday - localDate.getUTCDay() + 7) % 7;
103
+ const isPastFridayReset = daysUntilFriday === 0
104
+ && (local.hour > 17 || (local.hour === 17 && (local.minute > 0 || local.second > 0)));
105
+ if (isPastFridayReset || (daysUntilFriday === 0 && local.hour === 17 && local.minute === 0 && local.second === 0)) {
106
+ daysUntilFriday = 7;
107
+ }
108
+ localDate.setUTCDate(localDate.getUTCDate() + daysUntilFriday);
109
+ return localDateTimeToUtc({
110
+ year: localDate.getUTCFullYear(),
111
+ month: localDate.getUTCMonth() + 1,
112
+ day: localDate.getUTCDate(),
113
+ hour: 17,
114
+ minute: 0,
115
+ second: 0,
116
+ });
117
+ }
@@ -3,7 +3,7 @@ export declare const GAME_ARENA_ROUND_ONE: Readonly<{
3
3
  label: "Round 1";
4
4
  modelsLabel: "Opus 5 vs Sol 5.6";
5
5
  description: "Opus 5 vs Sol 5.6 · casual games";
6
- revealAt: "2026-08-09T17:00:00-04:00";
6
+ revealAt: "2026-08-16T17:00:00-04:00";
7
7
  revealLabel: "Sunday · 5:00 PM ET";
8
8
  comparisonMode: "BARE_SOL_OPUS";
9
9
  opusModel: "opus-max";
@@ -8,7 +8,7 @@ exports.GAME_ARENA_ROUND_ONE = Object.freeze({
8
8
  label: 'Round 1',
9
9
  modelsLabel: 'Opus 5 vs Sol 5.6',
10
10
  description: 'Opus 5 vs Sol 5.6 · casual games',
11
- revealAt: '2026-08-09T17:00:00-04:00',
11
+ revealAt: '2026-08-16T17:00:00-04:00',
12
12
  revealLabel: 'Sunday · 5:00 PM ET',
13
13
  comparisonMode: 'BARE_SOL_OPUS',
14
14
  opusModel: 'opus-max',
@@ -5,6 +5,7 @@ export declare function getClientVersion(): string;
5
5
  export declare function getClientBuild(): number;
6
6
  export declare function getClientVersionLabel(): string;
7
7
  export * from './constants';
8
+ export * from './creator-plans';
8
9
  export * from './deployment';
9
10
  export * from './game-arena';
10
11
  export * from './server/fastify';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EAEvB,MAAM,SAAS,CAAC;AAEjB,wBAAgB,cAAc,IAAI,gBAAgB,CAEjD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CAG9C;AAED,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUxF;AAwBD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,iBAAiB,GAAG,sBAAsB,CAqEzF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EAEvB,MAAM,SAAS,CAAC;AAEjB,wBAAgB,cAAc,IAAI,gBAAgB,CAEjD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,qBAAqB,IAAI,MAAM,CAG9C;AAED,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUxF;AAwBD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,iBAAiB,GAAG,sBAAsB,CAqEzF"}
@@ -38,6 +38,7 @@ function getClientVersionLabel() {
38
38
  return `${meta.version} (build ${meta.build})`;
39
39
  }
40
40
  __exportStar(require("./constants"), exports);
41
+ __exportStar(require("./creator-plans"), exports);
41
42
  __exportStar(require("./deployment"), exports);
42
43
  __exportStar(require("./game-arena"), exports);
43
44
  __exportStar(require("./server/fastify"), exports);
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=creator-plans.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"creator-plans.test.d.ts","sourceRoot":"","sources":["../../test/creator-plans.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const strict_1 = __importDefault(require("node:assert/strict"));
7
+ const node_test_1 = __importDefault(require("node:test"));
8
+ const creator_plans_1 = require("../src/creator-plans");
9
+ (0, node_test_1.default)('creator plans define progressively higher concurrent task limits', () => {
10
+ strict_1.default.equal(creator_plans_1.CREATOR_PLAN_CATALOG.BASIC.maxConcurrentTasks, 1);
11
+ strict_1.default.equal(creator_plans_1.CREATOR_PLAN_CATALOG.PLUS.maxConcurrentTasks, 5);
12
+ strict_1.default.equal(creator_plans_1.CREATOR_PLAN_CATALOG.PRO.maxConcurrentTasks, 10);
13
+ });
14
+ (0, node_test_1.default)('weekly reset is Friday 5 PM ET during standard time', () => {
15
+ strict_1.default.equal((0, creator_plans_1.getNextCreatorPlanResetAt)(new Date('2026-01-12T12:00:00Z')).toISOString(), '2026-01-16T22:00:00.000Z');
16
+ });
17
+ (0, node_test_1.default)('weekly reset is Friday 5 PM ET during daylight time', () => {
18
+ strict_1.default.equal((0, creator_plans_1.getNextCreatorPlanResetAt)(new Date('2026-08-03T12:00:00Z')).toISOString(), '2026-08-07T21:00:00.000Z');
19
+ });
20
+ (0, node_test_1.default)('weekly reset stays at local 5 PM across the spring DST boundary', () => {
21
+ strict_1.default.equal((0, creator_plans_1.getNextCreatorPlanResetAt)(new Date('2026-03-07T23:00:00Z')).toISOString(), '2026-03-13T21:00:00.000Z');
22
+ });
23
+ (0, node_test_1.default)('weekly reset stays at local 5 PM across the fall DST boundary', () => {
24
+ strict_1.default.equal((0, creator_plans_1.getNextCreatorPlanResetAt)(new Date('2026-10-31T22:00:00Z')).toISOString(), '2026-11-06T22:00:00.000Z');
25
+ });
26
+ (0, node_test_1.default)('the exact reset instant advances to the next week', () => {
27
+ strict_1.default.equal((0, creator_plans_1.getNextCreatorPlanResetAt)(new Date('2026-08-07T21:00:00Z')).toISOString(), '2026-08-14T21:00:00.000Z');
28
+ });
@@ -8,10 +8,10 @@ const strict_1 = __importDefault(require("node:assert/strict"));
8
8
  const game_arena_1 = require("../src/game-arena");
9
9
  (0, node_test_1.default)('Game Arena round one keeps the launch framing and configured reveal', () => {
10
10
  strict_1.default.equal(game_arena_1.GAME_ARENA_ROUND_ONE.description, 'Opus 5 vs Sol 5.6 · casual games');
11
- strict_1.default.equal((0, game_arena_1.resolveGameArenaRevealAt)(undefined), '2026-08-09T17:00:00-04:00');
11
+ strict_1.default.equal((0, game_arena_1.resolveGameArenaRevealAt)(undefined), '2026-08-16T17:00:00-04:00');
12
12
  strict_1.default.equal(game_arena_1.GAME_ARENA_ROUND_ONE.revealLabel, 'Sunday · 5:00 PM ET');
13
13
  strict_1.default.equal((0, game_arena_1.resolveGameArenaRevealAt)('2026-08-13T17:00:00-04:00'), '2026-08-13T17:00:00-04:00');
14
- strict_1.default.equal((0, game_arena_1.areGameArenaStandingsRevealed)(game_arena_1.GAME_ARENA_ROUND_ONE.revealAt, Date.parse('2026-08-09T16:59:59-04:00')), false);
15
- strict_1.default.equal((0, game_arena_1.areGameArenaStandingsRevealed)(game_arena_1.GAME_ARENA_ROUND_ONE.revealAt, Date.parse('2026-08-09T17:00:00-04:00')), true);
14
+ strict_1.default.equal((0, game_arena_1.areGameArenaStandingsRevealed)(game_arena_1.GAME_ARENA_ROUND_ONE.revealAt, Date.parse('2026-08-16T16:59:59-04:00')), false);
15
+ strict_1.default.equal((0, game_arena_1.areGameArenaStandingsRevealed)(game_arena_1.GAME_ARENA_ROUND_ONE.revealAt, Date.parse('2026-08-16T17:00:00-04:00')), true);
16
16
  strict_1.default.throws(() => (0, game_arena_1.resolveGameArenaRevealAt)('not-a-date'), /invalid_game_arena_reveal_at/);
17
17
  });