deepline 0.3.347 → 0.3.349

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 (125) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +5 -0
  2. package/dist/bundling-sources/sdk/src/index.ts +1 -0
  3. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  4. package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +29 -0
  5. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +32 -1
  6. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +17 -1
  7. package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +18 -0
  8. package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +9 -0
  9. package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +11 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +6 -0
  11. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +38 -13
  12. package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +3 -0
  13. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +13 -0
  14. package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +1 -1
  15. package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +1 -1
  16. package/dist/bundling-sources/shared_libs/product-notifications/events.ts +5 -1
  17. package/dist/cli/auth-KGXZELZ3.js +31 -0
  18. package/dist/cli/{auth-RWP45MJX.mjs → auth-MPHXSP64.mjs} +4 -4
  19. package/dist/cli/{billing-F6RNSQWW.js → billing-2KUUGVDZ.js} +99 -72
  20. package/dist/cli/{billing-XPKHI4LF.mjs → billing-K5WCTRBE.mjs} +31 -4
  21. package/dist/cli/{chunk-FKKNYKDY.js → chunk-5O4B6AUN.js} +2 -0
  22. package/dist/cli/{chunk-AOKWJJLP.mjs → chunk-6OVLJLYH.mjs} +1 -1
  23. package/dist/cli/{chunk-GS2ZSOAQ.js → chunk-6YZDQZE6.js} +2 -2
  24. package/dist/cli/{chunk-NTVTZAVZ.mjs → chunk-7E66A24V.mjs} +2 -0
  25. package/dist/cli/{chunk-VRYRVD3F.mjs → chunk-BEGPN6NG.mjs} +1 -1
  26. package/dist/cli/{chunk-X32ZLEUU.mjs → chunk-BPJTGASI.mjs} +2 -2
  27. package/dist/cli/{chunk-AGV2VS4U.js → chunk-CRSMVSER.js} +54 -54
  28. package/dist/cli/{chunk-NU5EU2SH.mjs → chunk-DOHULRK2.mjs} +4 -4
  29. package/dist/cli/{chunk-IIOBMOMH.mjs → chunk-DSWSEHRX.mjs} +1 -1
  30. package/dist/cli/{chunk-ROEN4NXY.js → chunk-GHYMVZID.js} +60 -60
  31. package/dist/cli/{chunk-Y6D2JYBR.mjs → chunk-GXN7DGNL.mjs} +2 -2
  32. package/dist/cli/{chunk-LH4VHCN5.mjs → chunk-HVD3DK7S.mjs} +6 -6
  33. package/dist/cli/{chunk-BUXJSW26.js → chunk-I4VZKXMX.js} +26 -26
  34. package/dist/cli/{chunk-EOS73ZCP.js → chunk-IHYVEM5Q.js} +8 -8
  35. package/dist/cli/{chunk-5UJOJKPW.js → chunk-JBGR6U57.js} +4 -4
  36. package/dist/cli/{chunk-PQGDU7B5.mjs → chunk-JKJSTQ2I.mjs} +1 -1
  37. package/dist/cli/{chunk-L4TXOCCC.js → chunk-KW25DKRC.js} +1 -1
  38. package/dist/cli/{chunk-LPKV6IBM.js → chunk-M42H2BPA.js} +8 -8
  39. package/dist/cli/{chunk-3PRBUTJK.js → chunk-MVQ3JAJA.js} +242 -242
  40. package/dist/cli/{chunk-LTJOC47W.mjs → chunk-O2FM2MS5.mjs} +7 -7
  41. package/dist/cli/{chunk-GT7OCAWV.js → chunk-QAM2K3CG.js} +48 -48
  42. package/dist/cli/{chunk-JB4UKD3B.js → chunk-QCSLIEMC.js} +6 -6
  43. package/dist/cli/{chunk-OJVAVQLB.js → chunk-QGKPTBRR.js} +3 -3
  44. package/dist/cli/{chunk-723POEH5.js → chunk-S347PHNB.js} +10 -9
  45. package/dist/cli/{chunk-U2GPF4SB.mjs → chunk-SPB6CF4S.mjs} +2 -2
  46. package/dist/cli/{chunk-WX7W76U7.js → chunk-TVS3TAFR.js} +15 -15
  47. package/dist/cli/{chunk-OS6CZRJE.mjs → chunk-UE7DS2YV.mjs} +3 -3
  48. package/dist/cli/{chunk-AYR45POY.mjs → chunk-VDOH4A34.mjs} +2 -1
  49. package/dist/cli/{chunk-3JJLQQLW.mjs → chunk-WOFHIUOT.mjs} +2 -2
  50. package/dist/cli/{chunk-SFJEAK54.mjs → chunk-ZQ6UF55Y.mjs} +1 -1
  51. package/dist/cli/{client-FZJ3RSO3.mjs → client-JWKYNLCR.mjs} +3 -3
  52. package/dist/cli/client-O4DPNWVJ.js +20 -0
  53. package/dist/cli/{csv-QSMT5HZS.js → csv-IW75DRFX.js} +12 -12
  54. package/dist/cli/{csv-HPBPBU3I.mjs → csv-Y2O237NO.mjs} +3 -3
  55. package/dist/cli/{db-IKZKICP3.js → db-6Q4VK5T2.js} +29 -29
  56. package/dist/cli/{db-2KAUAVVC.mjs → db-JW6UUJXC.mjs} +4 -4
  57. package/dist/cli/{describe-QM7Q5Y2H.js → describe-DI65QISF.js} +17 -17
  58. package/dist/cli/{describe-EW4GZMUK.mjs → describe-JLN4RTGM.mjs} +10 -10
  59. package/dist/cli/{executions-5ICONLFX.js → executions-GB2E3BU6.js} +6 -6
  60. package/dist/cli/{executions-U5WWUFEZ.mjs → executions-UK6LA2O5.mjs} +4 -4
  61. package/dist/cli/{feedback-N2KGAK4V.js → feedback-MJE3A5ON.js} +7 -7
  62. package/dist/cli/{feedback-ZBQPQPFG.mjs → feedback-N2KAFS3R.mjs} +3 -3
  63. package/dist/cli/git-A7J4SSRV.js +23 -0
  64. package/dist/cli/{git-M5YEP57H.mjs → git-NWRJFNII.mjs} +4 -4
  65. package/dist/cli/index.js +79 -79
  66. package/dist/cli/index.mjs +31 -31
  67. package/dist/cli/{legacy-noops-IQIPPJF7.js → legacy-noops-EIO65N6W.js} +7 -7
  68. package/dist/cli/{legacy-noops-GJUYBH2F.mjs → legacy-noops-RR4W2TTE.mjs} +4 -4
  69. package/dist/cli/{monitors-XJAJNMG4.mjs → monitors-HNUCJYET.mjs} +4 -4
  70. package/dist/cli/{monitors-DQUCHISX.js → monitors-U7NVJDQL.js} +85 -85
  71. package/dist/cli/{org-DFWDN4EJ.mjs → org-O7MFRQNG.mjs} +4 -4
  72. package/dist/cli/{org-G45CXUJV.js → org-UBHNTBSB.js} +60 -60
  73. package/dist/cli/{play-URTZW2Q4.mjs → play-4EIIEFQK.mjs} +9 -9
  74. package/dist/cli/play-IHLNNVPR.js +153 -0
  75. package/dist/cli/{providers-IVUWWGFP.js → providers-CJ56HZIT.js} +7 -7
  76. package/dist/cli/{providers-CCKMRCXU.mjs → providers-REJIT7CX.mjs} +4 -4
  77. package/dist/cli/{quickstart-MMIVNRV4.js → quickstart-BZUQWQK5.js} +5 -5
  78. package/dist/cli/{quickstart-CRHIA3PZ.mjs → quickstart-DQN2LYBC.mjs} +3 -3
  79. package/dist/cli/{search-NDRDOINX.mjs → search-35UOMFL2.mjs} +5 -5
  80. package/dist/cli/search-4EPCIU2T.js +26 -0
  81. package/dist/cli/{secrets-GQUBMJGM.js → secrets-G4RYNUUD.js} +13 -13
  82. package/dist/cli/{secrets-SUC3KLLH.mjs → secrets-YJB66UXU.mjs} +4 -4
  83. package/dist/cli/{sessions-7CAU6JL5.mjs → sessions-BUWSRUSJ.mjs} +4 -4
  84. package/dist/cli/{sessions-AQCRVLHW.js → sessions-DGS7S6XX.js} +5 -5
  85. package/dist/cli/{settings-LFFOFAU6.mjs → settings-OCMJXIFD.mjs} +7 -7
  86. package/dist/cli/{settings-4SDI73XW.js → settings-OTWDMCM5.js} +74 -74
  87. package/dist/cli/{setup-FQ3E7U7G.js → setup-MYD34DUG.js} +41 -41
  88. package/dist/cli/{setup-BKCQOJBD.mjs → setup-UXYFRGIX.mjs} +6 -6
  89. package/dist/cli/skills-7UHWU7XL.js +28 -0
  90. package/dist/cli/{skills-USGJ5MF7.mjs → skills-LOWITZWQ.mjs} +4 -4
  91. package/dist/cli/tools-CBYKQ7IY.js +40 -0
  92. package/dist/cli/{tools-5HTXLDZ4.mjs → tools-YJHZJLES.mjs} +7 -7
  93. package/dist/cli/update-5M3OKPEU.js +28 -0
  94. package/dist/cli/{update-F7TIJEIV.mjs → update-PB5UCW4I.mjs} +6 -6
  95. package/dist/cli/{workflow-J5JVOUIL.js → workflow-DJYTA2YM.js} +15 -15
  96. package/dist/cli/{workflow-FXJ2D2MG.mjs → workflow-IH2FQSYZ.mjs} +5 -5
  97. package/dist/{client-rHyf5s_Y.d.ts → client-4DbE-U6e.d.ts} +3 -1
  98. package/dist/{client-D20uyRYB.d.mts → client-DIJpwhl-.d.mts} +3 -1
  99. package/dist/{compiler-manifest-CButyeZ8.d.ts → compiler-manifest-DgdW0q0b.d.mts} +42 -1
  100. package/dist/{compiler-manifest-CButyeZ8.d.mts → compiler-manifest-DgdW0q0b.d.ts} +42 -1
  101. package/dist/{index-BMsNUoL5.d.mts → index-C3nQQTI-.d.mts} +1 -1
  102. package/dist/{index-LDRzwo09.d.ts → index-CEYQAfS0.d.ts} +1 -1
  103. package/dist/index.d.mts +6 -6
  104. package/dist/index.d.ts +6 -6
  105. package/dist/index.js +7 -7
  106. package/dist/index.mjs +4 -4
  107. package/dist/install-integrity.json +85 -84
  108. package/dist/plays/bundle-play-file.d.mts +3 -3
  109. package/dist/plays/bundle-play-file.d.ts +3 -3
  110. package/dist/plays/bundle-play-file.mjs +2 -2
  111. package/dist/plays/run-request.d.mts +2 -2
  112. package/dist/plays/run-request.d.ts +2 -2
  113. package/dist/release.d.mts +1 -1
  114. package/dist/release.d.ts +1 -1
  115. package/dist/release.js +2 -2
  116. package/dist/release.mjs +1 -1
  117. package/package.json +1 -1
  118. package/dist/cli/auth-PSMCNXBC.js +0 -31
  119. package/dist/cli/client-J4QGSQ6Y.js +0 -20
  120. package/dist/cli/git-2N5LS25H.js +0 -23
  121. package/dist/cli/play-WWMUYKWS.js +0 -153
  122. package/dist/cli/search-YZL2QRIF.js +0 -26
  123. package/dist/cli/skills-7BPEGDIA.js +0 -28
  124. package/dist/cli/tools-5VEZ4QR4.js +0 -40
  125. package/dist/cli/update-YFPMWKI4.js +0 -28
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk723POEH5js = require('./chunk-723POEH5.js');
5
+ var _chunkS347PHNBjs = require('./chunk-S347PHNB.js');
6
6
  require('./chunk-LA46MMTL.js');
7
7
 
8
8
 
@@ -10,13 +10,13 @@ require('./chunk-LA46MMTL.js');
10
10
 
11
11
 
12
12
 
13
- var _chunkJB4UKD3Bjs = require('./chunk-JB4UKD3B.js');
13
+ var _chunkQCSLIEMCjs = require('./chunk-QCSLIEMC.js');
14
14
 
15
15
 
16
16
 
17
- var _chunk5UJOJKPWjs = require('./chunk-5UJOJKPW.js');
17
+ var _chunkJBGR6U57js = require('./chunk-JBGR6U57.js');
18
18
  require('./chunk-XNYIZMNQ.js');
19
- require('./chunk-L4TXOCCC.js');
19
+ require('./chunk-KW25DKRC.js');
20
20
  require('./chunk-S6R3OX7B.js');
21
21
 
22
22
 
@@ -35,7 +35,7 @@ var SUBSCRIPTION_CANCEL_PATH = "/api/v2/billing/subscription/cancel";
35
35
  var BILLING_TOP_UP_PATH = "/api/v2/billing/top-up";
36
36
  var DEFAULT_BALANCE_RECOVERY_CREDITS = 100;
37
37
  function billingFailureFromError(error, options) {
38
- if (error instanceof _chunk5UJOJKPWjs.AuthError) {
38
+ if (error instanceof _chunkJBGR6U57js.AuthError) {
39
39
  return {
40
40
  exitCode: 3,
41
41
  code: "AUTH_ERROR",
@@ -69,7 +69,7 @@ function reportBillingFailure(failure, options) {
69
69
  if (failure.next) {
70
70
  textLines.push(`Next: ${failure.next}`);
71
71
  }
72
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
72
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
73
73
  {
74
74
  ok: false,
75
75
  exitCode: failure.exitCode,
@@ -90,7 +90,7 @@ function parseTopUpCredits(raw) {
90
90
  return parsed;
91
91
  }
92
92
  function topUpIdempotencyKey(raw) {
93
- return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunk723POEH5js.requireBillingIdempotencyKey.call(void 0, raw);
93
+ return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunkS347PHNBjs.requireBillingIdempotencyKey.call(void 0, raw);
94
94
  }
95
95
  function targetBillingIdempotencyKey(raw) {
96
96
  return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
@@ -127,7 +127,7 @@ function apiErrorCode(error) {
127
127
  return _nullishCoalesce(error.code, () => ( "BILLING_API_ERROR"));
128
128
  }
129
129
  function billingTopUpFailureFromError(error, input) {
130
- if (error instanceof _chunk5UJOJKPWjs.AuthError || error instanceof _chunk5UJOJKPWjs.ConfigError) {
130
+ if (error instanceof _chunkJBGR6U57js.AuthError || error instanceof _chunkJBGR6U57js.ConfigError) {
131
131
  return {
132
132
  exitCode: 3,
133
133
  code: "AUTH_ERROR",
@@ -296,7 +296,7 @@ function defaultLedgerExportPath() {
296
296
  );
297
297
  }
298
298
  async function handleBalance(options) {
299
- const { http } = _chunkJB4UKD3Bjs.getAuthedHttpClient.call(void 0, );
299
+ const { http } = _chunkQCSLIEMCjs.getAuthedHttpClient.call(void 0, );
300
300
  const payload = await http.get(
301
301
  "/api/v2/billing/balance"
302
302
  );
@@ -364,7 +364,7 @@ async function handleBalance(options) {
364
364
  ...options.verbose ? detail : [],
365
365
  ...lines.slice(1)
366
366
  ];
367
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
367
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
368
368
  {
369
369
  ...payload,
370
370
  ...recovery ? { recovery } : {},
@@ -388,7 +388,7 @@ function quoteShellArgument(value) {
388
388
  return `'${value.replace(/'/g, `'\\''`)}'`;
389
389
  }
390
390
  async function handleUsage(options) {
391
- const { http } = _chunkJB4UKD3Bjs.getAuthedHttpClient.call(void 0, );
391
+ const { http } = _chunkQCSLIEMCjs.getAuthedHttpClient.call(void 0, );
392
392
  const params = new URLSearchParams();
393
393
  if (options.requestId !== void 0) {
394
394
  const requestId = options.requestId.trim();
@@ -469,7 +469,7 @@ async function handleUsage(options) {
469
469
  "No continuation is available for this view. Use deepline billing ledger export all --json for the full ledger."
470
470
  ] : []
471
471
  ];
472
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
472
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
473
473
  {
474
474
  ...payload,
475
475
  recent: {
@@ -483,7 +483,7 @@ async function handleUsage(options) {
483
483
  );
484
484
  }
485
485
  async function handleLimit(options) {
486
- const { http } = _chunkJB4UKD3Bjs.getAuthedHttpClient.call(void 0, );
486
+ const { http } = _chunkQCSLIEMCjs.getAuthedHttpClient.call(void 0, );
487
487
  const payload = await http.get(
488
488
  "/api/v2/billing/limit"
489
489
  );
@@ -491,7 +491,7 @@ async function handleLimit(options) {
491
491
  `Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
492
492
  "Enforcement: checked before new calls; in-flight work can exceed the cap."
493
493
  ] : ["Monthly usage cap: off"];
494
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
494
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
495
495
  {
496
496
  ...payload,
497
497
  render: { sections: [{ title: "billing limit", lines }] }
@@ -500,12 +500,12 @@ async function handleLimit(options) {
500
500
  );
501
501
  }
502
502
  async function handleSetLimit(credits, options) {
503
- const { http } = _chunkJB4UKD3Bjs.getAuthedHttpClient.call(void 0, );
503
+ const { http } = _chunkQCSLIEMCjs.getAuthedHttpClient.call(void 0, );
504
504
  const payload = await http.request("/api/v2/billing/limit", {
505
505
  method: "PUT",
506
506
  body: { monthly_credits_limit: Number.parseInt(credits, 10) }
507
507
  });
508
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
508
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
509
509
  {
510
510
  ...payload,
511
511
  render: {
@@ -521,11 +521,11 @@ async function handleSetLimit(credits, options) {
521
521
  );
522
522
  }
523
523
  async function handleLimitOff(options) {
524
- const { http } = _chunkJB4UKD3Bjs.getAuthedHttpClient.call(void 0, );
524
+ const { http } = _chunkQCSLIEMCjs.getAuthedHttpClient.call(void 0, );
525
525
  const payload = await http.request("/api/v2/billing/limit", {
526
526
  method: "DELETE"
527
527
  });
528
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
528
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
529
529
  {
530
530
  ...payload,
531
531
  render: {
@@ -545,7 +545,7 @@ async function exportLedger(http, outputPath, options) {
545
545
  let initialized = false;
546
546
  let pageNumber = 0;
547
547
  console.error(`Exporting billing ledger to ${outputPath}`);
548
- for await (const entries of _chunk723POEH5js.iterateCursorPages.call(void 0, async (cursor) => {
548
+ for await (const entries of _chunkS347PHNBjs.iterateCursorPages.call(void 0, async (cursor) => {
549
549
  pageNumber += 1;
550
550
  console.error(
551
551
  `Fetching page ${pageNumber}; ${summary.row_count} rows written.`
@@ -584,7 +584,7 @@ async function exportLedger(http, outputPath, options) {
584
584
  return summary;
585
585
  }
586
586
  async function handleHistory(options) {
587
- const { http } = _chunkJB4UKD3Bjs.getAuthedHttpClient.call(void 0, );
587
+ const { http } = _chunkQCSLIEMCjs.getAuthedHttpClient.call(void 0, );
588
588
  const windows = {
589
589
  "1d": 86400,
590
590
  "1w": 604800,
@@ -596,10 +596,10 @@ async function handleHistory(options) {
596
596
  process.cwd(),
597
597
  "deepline",
598
598
  "data",
599
- _chunkJB4UKD3Bjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
599
+ _chunkQCSLIEMCjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
600
600
  );
601
601
  const summary = await exportLedger(http, outputPath, { sinceAt });
602
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
602
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
603
603
  {
604
604
  output_path: outputPath,
605
605
  row_count: summary.row_count,
@@ -636,14 +636,14 @@ async function handleLedgerExportAll(options) {
636
636
  );
637
637
  return;
638
638
  }
639
- const { http } = _chunkJB4UKD3Bjs.getAuthedHttpClient.call(void 0, );
639
+ const { http } = _chunkQCSLIEMCjs.getAuthedHttpClient.call(void 0, );
640
640
  const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
641
641
  const summary = await exportLedger(http, outputPath, {
642
642
  sinceAt,
643
643
  runId: options.runId,
644
644
  operation: options.operation
645
645
  });
646
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
646
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
647
647
  {
648
648
  output_path: outputPath,
649
649
  row_count: summary.row_count,
@@ -682,7 +682,7 @@ function targetPlanLine(plan) {
682
682
  return `${plan.name} (${plan.sku}) | ${planPriceText(plan.recurring_price_usd, plan.interval)} | ${plan.included_credits} included credits/month | $${plan.purchased_credit_price_usd}/purchased credit | ${plan.acquisition_enabled ? "available" : "unavailable"}`;
683
683
  }
684
684
  async function handlePlans(options) {
685
- const client = new (0, _chunk723POEH5js.DeeplineClient)();
685
+ const client = new (0, _chunkS347PHNBjs.DeeplineClient)();
686
686
  const payload = await client.billing.targetPlans();
687
687
  const listedCurrentPlan = payload.plans.find(
688
688
  (plan) => plan.sku === payload.current_plan_sku
@@ -695,8 +695,8 @@ async function handlePlans(options) {
695
695
  ...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
696
696
  "Change plan: deepline billing change-plan <plan_sku> --json"
697
697
  ];
698
- const legacyPayload = _chunkJB4UKD3Bjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
699
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
698
+ const legacyPayload = _chunkQCSLIEMCjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
699
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
700
700
  {
701
701
  ..._nullishCoalesce(legacyPayload, () => ( payload)),
702
702
  ...legacyPayload ? { target_billing: payload } : {},
@@ -706,7 +706,7 @@ async function handlePlans(options) {
706
706
  );
707
707
  }
708
708
  async function handleSubscribe(planVersionId, options) {
709
- const { http } = _chunkJB4UKD3Bjs.getAuthedHttpClient.call(void 0, );
709
+ const { http } = _chunkQCSLIEMCjs.getAuthedHttpClient.call(void 0, );
710
710
  const payload = await http.request(
711
711
  "/api/v2/billing/subscription/checkout",
712
712
  {
@@ -715,8 +715,8 @@ async function handleSubscribe(planVersionId, options) {
715
715
  }
716
716
  );
717
717
  const url = String(payload.checkout_url || "");
718
- if (!options.json && options.open !== false && url) _chunkJB4UKD3Bjs.openInBrowser.call(void 0, url);
719
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
718
+ if (!options.json && options.open !== false && url) _chunkQCSLIEMCjs.openInBrowser.call(void 0, url);
719
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
720
720
  {
721
721
  ...payload,
722
722
  render: {
@@ -732,7 +732,7 @@ async function handleSubscribe(planVersionId, options) {
732
732
  );
733
733
  }
734
734
  async function handleSubscriptionStatus(options) {
735
- const client = new (0, _chunk723POEH5js.DeeplineClient)();
735
+ const client = new (0, _chunkS347PHNBjs.DeeplineClient)();
736
736
  const payload = await client.billing.subscription.status();
737
737
  const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
738
738
  const lines = [
@@ -752,7 +752,7 @@ async function handleSubscriptionStatus(options) {
752
752
  ],
753
753
  `Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
754
754
  ];
755
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
755
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
756
756
  {
757
757
  ...payload,
758
758
  render: { sections: [{ title: "billing subscription", lines }] }
@@ -761,7 +761,7 @@ async function handleSubscriptionStatus(options) {
761
761
  );
762
762
  }
763
763
  async function handleSubscriptionCancel(options) {
764
- const client = new (0, _chunk723POEH5js.DeeplineClient)();
764
+ const client = new (0, _chunkS347PHNBjs.DeeplineClient)();
765
765
  const action = options.undo ? "undo_cancel" : "cancel";
766
766
  if (options.dryRun) {
767
767
  const status = await client.billing.subscription.status();
@@ -778,7 +778,7 @@ async function handleSubscriptionCancel(options) {
778
778
  return;
779
779
  }
780
780
  const consequence = action === "cancel" ? `Would schedule cancellation at period end${status.current_period_end ? ` (${status.current_period_end})` : ""}. The subscription stays active until then and remaining credits are kept.` : "Would reverse the pending cancellation; the subscription would renew normally.";
781
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
781
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
782
782
  {
783
783
  ok: true,
784
784
  dry_run: true,
@@ -833,7 +833,7 @@ async function handleSubscriptionCancel(options) {
833
833
  "Remaining credits are yours to keep \u2014 cancellation never removes credits.",
834
834
  "Undo with: deepline billing subscription cancel --undo"
835
835
  ];
836
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
836
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
837
837
  {
838
838
  ok: true,
839
839
  ...result,
@@ -887,7 +887,7 @@ async function handleInvoices(options) {
887
887
  return;
888
888
  }
889
889
  }
890
- const client = new (0, _chunk723POEH5js.DeeplineClient)();
890
+ const client = new (0, _chunkS347PHNBjs.DeeplineClient)();
891
891
  let payload;
892
892
  try {
893
893
  payload = await client.billing.invoices.list(
@@ -916,7 +916,7 @@ async function handleInvoices(options) {
916
916
  url: entry.url
917
917
  }))
918
918
  } : { ...payload, count: entries.length };
919
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
919
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
920
920
  {
921
921
  ...envelope,
922
922
  render: { sections: [{ title: "billing invoices", lines }] }
@@ -925,7 +925,7 @@ async function handleInvoices(options) {
925
925
  );
926
926
  }
927
927
  async function handleCheckout(options) {
928
- const { http } = _chunkJB4UKD3Bjs.getAuthedHttpClient.call(void 0, );
928
+ const { http } = _chunkQCSLIEMCjs.getAuthedHttpClient.call(void 0, );
929
929
  const payload = await http.post(
930
930
  "/api/v2/billing/checkout",
931
931
  {
@@ -935,8 +935,8 @@ async function handleCheckout(options) {
935
935
  }
936
936
  );
937
937
  const url = String(payload.url || payload.checkout_url || "");
938
- if (!options.json && !options.noOpen && url) _chunkJB4UKD3Bjs.openInBrowser.call(void 0, url);
939
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
938
+ if (!options.json && !options.noOpen && url) _chunkQCSLIEMCjs.openInBrowser.call(void 0, url);
939
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
940
940
  {
941
941
  ...payload,
942
942
  render: {
@@ -981,7 +981,7 @@ async function handleTopUp(creditsRaw, options) {
981
981
  return;
982
982
  }
983
983
  if (options.dryRun) {
984
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
984
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
985
985
  {
986
986
  ok: true,
987
987
  dry_run: true,
@@ -1011,7 +1011,7 @@ async function handleTopUp(creditsRaw, options) {
1011
1011
  );
1012
1012
  return;
1013
1013
  }
1014
- const client = new (0, _chunk723POEH5js.DeeplineClient)();
1014
+ const client = new (0, _chunkS347PHNBjs.DeeplineClient)();
1015
1015
  let payload;
1016
1016
  try {
1017
1017
  payload = await client.billing.topUpWithReceipt({
@@ -1028,7 +1028,7 @@ async function handleTopUp(creditsRaw, options) {
1028
1028
  return;
1029
1029
  }
1030
1030
  if (payload.status === "pending") {
1031
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
1031
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
1032
1032
  {
1033
1033
  ok: true,
1034
1034
  ...payload,
@@ -1092,17 +1092,17 @@ async function handleTopUp(creditsRaw, options) {
1092
1092
  ]
1093
1093
  }
1094
1094
  };
1095
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
1095
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
1096
1096
  json: options.json
1097
1097
  });
1098
1098
  }
1099
1099
  async function handleTargetStatus(options) {
1100
- const client = new (0, _chunk723POEH5js.DeeplineClient)();
1100
+ const client = new (0, _chunkS347PHNBjs.DeeplineClient)();
1101
1101
  const payload = await client.billing.targetStatus();
1102
1102
  const balanceCommand = "deepline billing balance --json";
1103
1103
  const recentChargesCommand = "deepline billing usage --limit 5 --json";
1104
1104
  const exactChargeCommand = "deepline billing usage --request-id <job_id> --json";
1105
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
1105
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
1106
1106
  {
1107
1107
  ok: true,
1108
1108
  ...payload,
@@ -1131,8 +1131,34 @@ async function handleTargetStatus(options) {
1131
1131
  { json: options.json }
1132
1132
  );
1133
1133
  }
1134
+ async function handleEntitlements(options) {
1135
+ const payload = await new (0, _chunkS347PHNBjs.DeeplineClient)().billing.entitlements();
1136
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
1137
+ {
1138
+ ok: true,
1139
+ ...payload,
1140
+ render: {
1141
+ sections: [
1142
+ {
1143
+ title: "billing entitlements",
1144
+ lines: [
1145
+ `Plan: ${_nullishCoalesce(_optionalChain([payload, 'access', _11 => _11.plan, 'optionalAccess', _12 => _12.name]), () => ( "Legacy billing"))}`,
1146
+ ...Object.entries(payload.benefits).map(
1147
+ ([key, grant]) => `${key}: ${grant.status}, ${JSON.stringify(grant.value)}${grant.expiresAt === void 0 ? "" : `, expires ${new Date(grant.expiresAt).toISOString()}`}`
1148
+ ),
1149
+ ...Object.entries(payload.effective_limits).map(
1150
+ ([key, limit]) => `${key} rate: ${limit.effective}/minute (${limit.source}; plan baseline ${limit.baseline})`
1151
+ )
1152
+ ]
1153
+ }
1154
+ ]
1155
+ }
1156
+ },
1157
+ { json: options.json }
1158
+ );
1159
+ }
1134
1160
  async function handleAutoRechargeStatus(options) {
1135
- const payload = await new (0, _chunk723POEH5js.DeeplineClient)().billing.autoRecharge.get();
1161
+ const payload = await new (0, _chunkS347PHNBjs.DeeplineClient)().billing.autoRecharge.get();
1136
1162
  const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
1137
1163
  const lines = [
1138
1164
  `State: ${state}`,
@@ -1142,7 +1168,7 @@ async function handleAutoRechargeStatus(options) {
1142
1168
  `Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
1143
1169
  ] : []
1144
1170
  ];
1145
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
1171
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
1146
1172
  {
1147
1173
  ok: true,
1148
1174
  ...payload,
@@ -1191,7 +1217,7 @@ async function handleAutoRechargeSet(options) {
1191
1217
  }
1192
1218
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1193
1219
  if (options.dryRun) {
1194
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
1220
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
1195
1221
  {
1196
1222
  ok: true,
1197
1223
  dry_run: true,
@@ -1212,7 +1238,7 @@ async function handleAutoRechargeSet(options) {
1212
1238
  );
1213
1239
  return;
1214
1240
  }
1215
- const payload = await new (0, _chunk723POEH5js.DeeplineClient)().billing.autoRecharge.update({
1241
+ const payload = await new (0, _chunkS347PHNBjs.DeeplineClient)().billing.autoRecharge.update({
1216
1242
  enabled: true,
1217
1243
  thresholdCredits,
1218
1244
  refillToCredits,
@@ -1220,7 +1246,7 @@ async function handleAutoRechargeSet(options) {
1220
1246
  ...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
1221
1247
  idempotencyKey
1222
1248
  });
1223
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
1249
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
1224
1250
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1225
1251
  { json: options.json }
1226
1252
  );
@@ -1228,7 +1254,7 @@ async function handleAutoRechargeSet(options) {
1228
1254
  async function handleAutoRechargeOff(options) {
1229
1255
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1230
1256
  if (options.dryRun) {
1231
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
1257
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
1232
1258
  {
1233
1259
  ok: true,
1234
1260
  dry_run: true,
@@ -1243,11 +1269,11 @@ async function handleAutoRechargeOff(options) {
1243
1269
  );
1244
1270
  return;
1245
1271
  }
1246
- const payload = await new (0, _chunk723POEH5js.DeeplineClient)().billing.autoRecharge.update({
1272
+ const payload = await new (0, _chunkS347PHNBjs.DeeplineClient)().billing.autoRecharge.update({
1247
1273
  enabled: false,
1248
1274
  idempotencyKey
1249
1275
  });
1250
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
1276
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
1251
1277
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1252
1278
  { json: options.json }
1253
1279
  );
@@ -1266,11 +1292,11 @@ async function handleBuyCredits(creditsRaw, options) {
1266
1292
  return;
1267
1293
  }
1268
1294
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1269
- const payload = await new (0, _chunk723POEH5js.DeeplineClient)().billing.purchaseCredits({
1295
+ const payload = await new (0, _chunkS347PHNBjs.DeeplineClient)().billing.purchaseCredits({
1270
1296
  credits,
1271
1297
  idempotencyKey
1272
1298
  });
1273
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
1299
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
1274
1300
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1275
1301
  { json: options.json }
1276
1302
  );
@@ -1288,7 +1314,7 @@ async function handleTopUpRecover(creditsRaw, options) {
1288
1314
  );
1289
1315
  return;
1290
1316
  }
1291
- const failure = !_optionalChain([options, 'access', _11 => _11.orgId, 'optionalAccess', _12 => _12.trim, 'call', _13 => _13()]) || options.orgId !== options.orgId.trim() ? {
1317
+ const failure = !_optionalChain([options, 'access', _13 => _13.orgId, 'optionalAccess', _14 => _14.trim, 'call', _15 => _15()]) || options.orgId !== options.orgId.trim() ? {
1292
1318
  code: "INVALID_ORG_ID",
1293
1319
  message: "--org-id must be the original workspace ID without surrounding whitespace."
1294
1320
  } : !options.idempotencyKey || options.idempotencyKey.length > 200 || options.idempotencyKey !== options.idempotencyKey.trim() ? {
@@ -1306,7 +1332,7 @@ async function handleTopUpRecover(creditsRaw, options) {
1306
1332
  return;
1307
1333
  }
1308
1334
  if (options.dryRun) {
1309
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
1335
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
1310
1336
  {
1311
1337
  ok: true,
1312
1338
  dry_run: true,
@@ -1319,12 +1345,12 @@ async function handleTopUpRecover(creditsRaw, options) {
1319
1345
  );
1320
1346
  return;
1321
1347
  }
1322
- const payload = await new (0, _chunk723POEH5js.DeeplineClient)().billing.recoverCreditPurchase({
1348
+ const payload = await new (0, _chunkS347PHNBjs.DeeplineClient)().billing.recoverCreditPurchase({
1323
1349
  credits,
1324
1350
  orgId: options.orgId,
1325
1351
  idempotencyKey: options.idempotencyKey
1326
1352
  });
1327
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
1353
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
1328
1354
  { ok: true, idempotency_key: options.idempotencyKey, ...payload },
1329
1355
  { json: options.json }
1330
1356
  );
@@ -1344,37 +1370,37 @@ async function handleTargetPlan(planSku, options) {
1344
1370
  return;
1345
1371
  }
1346
1372
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1347
- const payload = await new (0, _chunk723POEH5js.DeeplineClient)().billing.transitionPlan({
1373
+ const payload = await new (0, _chunkS347PHNBjs.DeeplineClient)().billing.transitionPlan({
1348
1374
  action: "start_or_change",
1349
1375
  targetPlanSku: planSku,
1350
1376
  ...options.billingEmail ? { billingEmail: options.billingEmail } : {},
1351
1377
  idempotencyKey
1352
1378
  });
1353
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
1379
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
1354
1380
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1355
1381
  { json: options.json }
1356
1382
  );
1357
1383
  }
1358
1384
  async function handleTargetPlanCancellation(options) {
1359
1385
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1360
- const payload = await new (0, _chunk723POEH5js.DeeplineClient)().billing.transitionPlan({
1386
+ const payload = await new (0, _chunkS347PHNBjs.DeeplineClient)().billing.transitionPlan({
1361
1387
  action: options.undo ? "undo_cancel" : "cancel",
1362
1388
  idempotencyKey
1363
1389
  });
1364
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
1390
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
1365
1391
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1366
1392
  { json: options.json }
1367
1393
  );
1368
1394
  }
1369
1395
  async function handleTargetPortal(options) {
1370
- const payload = await new (0, _chunk723POEH5js.DeeplineClient)().billing.portalSession(
1396
+ const payload = await new (0, _chunkS347PHNBjs.DeeplineClient)().billing.portalSession(
1371
1397
  options.billingAddress ? { flow: "customer_update" } : void 0
1372
1398
  );
1373
- if (!options.json && !options.noOpen) _chunkJB4UKD3Bjs.openInBrowser.call(void 0, payload.url);
1374
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
1399
+ if (!options.json && !options.noOpen) _chunkQCSLIEMCjs.openInBrowser.call(void 0, payload.url);
1400
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
1375
1401
  }
1376
1402
  async function handleRedeemCode(code, options) {
1377
- const { http } = _chunkJB4UKD3Bjs.getAuthedHttpClient.call(void 0, );
1403
+ const { http } = _chunkQCSLIEMCjs.getAuthedHttpClient.call(void 0, );
1378
1404
  const payload = await http.post(
1379
1405
  "/api/v2/billing/checkout",
1380
1406
  {
@@ -1382,8 +1408,8 @@ async function handleRedeemCode(code, options) {
1382
1408
  }
1383
1409
  );
1384
1410
  const url = String(payload.url || payload.checkout_url || "");
1385
- if (!options.json && !options.noOpen && url) _chunkJB4UKD3Bjs.openInBrowser.call(void 0, url);
1386
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
1411
+ if (!options.json && !options.noOpen && url) _chunkQCSLIEMCjs.openInBrowser.call(void 0, url);
1412
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0,
1387
1413
  {
1388
1414
  ...payload,
1389
1415
  render: {
@@ -1616,6 +1642,7 @@ Examples:
1616
1642
  billing.command("status").description(
1617
1643
  "Show plan, payment, and recharge state; use usage for charges."
1618
1644
  ).option("--json", "Emit JSON output").action(handleTargetStatus);
1645
+ billing.command("entitlements").description("Show current workspace benefits and effective rate limits.").option("--json", "Emit JSON output").action(handleEntitlements);
1619
1646
  billing.command("auto-recharge").description("Inspect and manage automatic Deepline credit recharge.").addHelpText(
1620
1647
  "after",
1621
1648
  `
@@ -1652,8 +1679,8 @@ Examples:
1652
1679
  new (0, _commander.Command)("trigger").description(
1653
1680
  "Evaluate capped automatic recharge and resume any pending purchase."
1654
1681
  ).option("--json", "Emit JSON output").action(async (options) => {
1655
- const result = await new (0, _chunk723POEH5js.DeeplineClient)().billing.autoRecharge.trigger();
1656
- _chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
1682
+ const result = await new (0, _chunkS347PHNBjs.DeeplineClient)().billing.autoRecharge.trigger();
1683
+ _chunkQCSLIEMCjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
1657
1684
  })
1658
1685
  );
1659
1686
  billing.command("change-plan").description("Start or change the target billing plan.").argument("<plan_sku>", "payg-v1, builder-v1, growth-v1, or team-v1").option(
@@ -2,7 +2,7 @@ import {
2
2
  DeeplineClient,
3
3
  iterateCursorPages,
4
4
  requireBillingIdempotencyKey
5
- } from "./chunk-AYR45POY.mjs";
5
+ } from "./chunk-VDOH4A34.mjs";
6
6
  import "./chunk-CBVIJSHF.mjs";
7
7
  import {
8
8
  createTimestampedName,
@@ -10,13 +10,13 @@ import {
10
10
  openInBrowser,
11
11
  printCommandEnvelope,
12
12
  shouldEmitJson
13
- } from "./chunk-SFJEAK54.mjs";
13
+ } from "./chunk-ZQ6UF55Y.mjs";
14
14
  import {
15
15
  AuthError,
16
16
  ConfigError
17
- } from "./chunk-PQGDU7B5.mjs";
17
+ } from "./chunk-JKJSTQ2I.mjs";
18
18
  import "./chunk-DLIRSHV6.mjs";
19
- import "./chunk-AOKWJJLP.mjs";
19
+ import "./chunk-6OVLJLYH.mjs";
20
20
  import "./chunk-6IKARAYD.mjs";
21
21
  import {
22
22
  DeeplineError
@@ -1131,6 +1131,32 @@ async function handleTargetStatus(options) {
1131
1131
  { json: options.json }
1132
1132
  );
1133
1133
  }
1134
+ async function handleEntitlements(options) {
1135
+ const payload = await new DeeplineClient().billing.entitlements();
1136
+ printCommandEnvelope(
1137
+ {
1138
+ ok: true,
1139
+ ...payload,
1140
+ render: {
1141
+ sections: [
1142
+ {
1143
+ title: "billing entitlements",
1144
+ lines: [
1145
+ `Plan: ${payload.plan?.name ?? "Legacy billing"}`,
1146
+ ...Object.entries(payload.benefits).map(
1147
+ ([key, grant]) => `${key}: ${grant.status}, ${JSON.stringify(grant.value)}${grant.expiresAt === void 0 ? "" : `, expires ${new Date(grant.expiresAt).toISOString()}`}`
1148
+ ),
1149
+ ...Object.entries(payload.effective_limits).map(
1150
+ ([key, limit]) => `${key} rate: ${limit.effective}/minute (${limit.source}; plan baseline ${limit.baseline})`
1151
+ )
1152
+ ]
1153
+ }
1154
+ ]
1155
+ }
1156
+ },
1157
+ { json: options.json }
1158
+ );
1159
+ }
1134
1160
  async function handleAutoRechargeStatus(options) {
1135
1161
  const payload = await new DeeplineClient().billing.autoRecharge.get();
1136
1162
  const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
@@ -1616,6 +1642,7 @@ Examples:
1616
1642
  billing.command("status").description(
1617
1643
  "Show plan, payment, and recharge state; use usage for charges."
1618
1644
  ).option("--json", "Emit JSON output").action(handleTargetStatus);
1645
+ billing.command("entitlements").description("Show current workspace benefits and effective rate limits.").option("--json", "Emit JSON output").action(handleEntitlements);
1619
1646
  billing.command("auto-recharge").description("Inspect and manage automatic Deepline credit recharge.").addHelpText(
1620
1647
  "after",
1621
1648
  `
@@ -1620,7 +1620,9 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
1620
1620
  " run(options?: DatasetRunOptions<InputRow>): Promise<PlayDataset<OutputRow>>;",
1621
1621
  "};",
1622
1622
  "export type PlayReferenceLike<TInput extends Record<string, unknown> = Record<string, unknown>> = ({ readonly playName: string; readonly name?: string } | { readonly name: string; readonly playName?: string }) & { readonly __inputType?: TInput };",
1623
+ "export type BillingEntitlements = { org_id: string; as_of: number; plan: { sku: string; name: string; catalog_revision: string | null; included_credits: number; interval: 'month' | 'year' | null } | null; benefits: { quickenrichUnlimited?: { status: 'active' | 'past_due'; value: { enabled: boolean; requestsPerMinute: number }; expiresAt?: number } }; effective_limits: { quickenrichUnlimited?: { baseline: number; effective: number; source: 'plan' | 'override'; override_expires_at?: number } } };",
1623
1624
  "export interface DeeplinePlayRuntimeContext {",
1625
+ " billing: { entitlements(): Promise<BillingEntitlements> };",
1624
1626
  " csv<T = Record<string, unknown>>(path: string | CsvInput<T & object>, options?: CsvOptions): Promise<PlayDataset<T>>;",
1625
1627
  " dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): DatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object>;",
1626
1628
  " map<TSource extends PlayDatasetInput<object>>(key: string, items: TSource, options?: DatasetDefinitionOptions<PlayDatasetRow<TSource> & object>): never;",
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
49
49
  // getters keep their established compatibility behavior.
50
50
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
51
51
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
52
- version: "0.3.347",
52
+ version: "0.3.349",
53
53
  updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
54
54
  packageCapabilities: {
55
55
  updatePreferences: 1
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkROEN4NXYjs = require('./chunk-ROEN4NXY.js');
3
+ var _chunkGHYMVZIDjs = require('./chunk-GHYMVZID.js');
4
4
 
5
5
  // src/cli/npm-script-policy.ts
6
6
  var _child_process = require('child_process');
@@ -13,7 +13,7 @@ function npmSupportsAllowScripts(version) {
13
13
  }
14
14
  function readNpmVersion(env) {
15
15
  try {
16
- const plan = _chunkROEN4NXYjs.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
16
+ const plan = _chunkGHYMVZIDjs.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
17
17
  const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
18
18
  encoding: "utf8",
19
19
  env,