deepline 0.3.394 → 0.3.395

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 (106) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +30 -162
  2. package/dist/bundling-sources/sdk/src/index.ts +1 -0
  3. package/dist/bundling-sources/sdk/src/plays/play-description.ts +167 -0
  4. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  5. package/dist/bundling-sources/sdk/src/types.ts +1 -0
  6. package/dist/cli/{auth-OSXDAVCF.mjs → auth-NMQXZRS7.mjs} +4 -4
  7. package/dist/cli/auth-UYCOBAL5.js +39 -0
  8. package/dist/cli/{billing-ZNNKX3UR.mjs → billing-5MVXZRS6.mjs} +5 -4
  9. package/dist/cli/{billing-EKLYOXUY.js → billing-Z4JTGUU3.js} +76 -75
  10. package/dist/cli/{chunk-E23BQ5SC.js → chunk-36ML3YKA.js} +241 -349
  11. package/dist/cli/{chunk-XRQ2AQL7.mjs → chunk-3TRY7KAC.mjs} +2 -2
  12. package/dist/cli/{chunk-NR3DFKNF.mjs → chunk-47M6HPGP.mjs} +1 -1
  13. package/dist/cli/{chunk-RBJYWRCF.js → chunk-4KLCLLTO.js} +239 -237
  14. package/dist/cli/{chunk-CS6RAIVY.js → chunk-56IFFVIB.js} +4 -4
  15. package/dist/cli/chunk-5VCZ3WRH.mjs +129 -0
  16. package/dist/cli/{chunk-FJGW5GXU.mjs → chunk-6D7A2FSL.mjs} +1 -1
  17. package/dist/cli/{chunk-X63FDZJZ.mjs → chunk-7MVWUXOD.mjs} +3 -3
  18. package/dist/cli/{chunk-ZYBGA4AR.mjs → chunk-7XAM7KDW.mjs} +3 -3
  19. package/dist/cli/{chunk-BP33SIZF.mjs → chunk-BLYL3KOC.mjs} +1 -1
  20. package/dist/cli/{chunk-TJI2EN6K.mjs → chunk-BON3DRC6.mjs} +1 -1
  21. package/dist/cli/chunk-DRM3CMHL.js +129 -0
  22. package/dist/cli/{chunk-XXUDVEXK.mjs → chunk-EFLQHJZ6.mjs} +5 -5
  23. package/dist/cli/{chunk-JHIJIHFB.mjs → chunk-G4IWGRMK.mjs} +23 -131
  24. package/dist/cli/{chunk-KGNTKMRG.js → chunk-HRWUQJ4K.js} +6 -6
  25. package/dist/cli/{chunk-2MDDA7A4.js → chunk-K5T3EN6D.js} +26 -26
  26. package/dist/cli/{chunk-KI635JN4.js → chunk-LZLBR2SF.js} +50 -50
  27. package/dist/cli/{chunk-MLPU5SMZ.js → chunk-MYIBHORT.js} +2 -2
  28. package/dist/cli/{chunk-UXFSWG3Q.mjs → chunk-OCSG6X67.mjs} +4 -4
  29. package/dist/cli/{chunk-354JCXA2.js → chunk-PZ5BZ76S.js} +50 -50
  30. package/dist/cli/{chunk-VK6FYZLP.js → chunk-R4XZO6Z5.js} +8 -8
  31. package/dist/cli/{chunk-6YAUMG27.js → chunk-TO2MWPGR.js} +1 -1
  32. package/dist/cli/{chunk-QIQBYKLB.js → chunk-UCXK2DS4.js} +15 -15
  33. package/dist/cli/{chunk-KIUMEOM5.js → chunk-UKU6JM3S.js} +8 -8
  34. package/dist/cli/{chunk-4P27AXEA.js → chunk-VYLJJQ7Y.js} +65 -65
  35. package/dist/cli/{chunk-M57J2SK4.mjs → chunk-WCCKMLHL.mjs} +2 -2
  36. package/dist/cli/{chunk-5BB2RGAX.mjs → chunk-XMAPE2KH.mjs} +15 -13
  37. package/dist/cli/{chunk-MFB2VKBO.mjs → chunk-ZWH2TFA7.mjs} +2 -2
  38. package/dist/cli/{csv-LU7O75WE.js → csv-HTS5ZYQ4.js} +12 -12
  39. package/dist/cli/{csv-5AXRB35H.mjs → csv-SVOD5UBH.mjs} +3 -3
  40. package/dist/cli/{db-F7YTFKVM.js → db-7AP4P52N.js} +30 -29
  41. package/dist/cli/{db-7XP5UWEW.mjs → db-7QLNI3Q4.mjs} +5 -4
  42. package/dist/cli/{describe-K4ES5LIL.mjs → describe-DBRY5BNK.mjs} +10 -9
  43. package/dist/cli/{describe-FRH32RDV.js → describe-YKOE54ZO.js} +20 -19
  44. package/dist/cli/{executions-RZV5XPT2.js → executions-GRQXTB2P.js} +7 -6
  45. package/dist/cli/{executions-IEHEHJUO.mjs → executions-QNZTPNG4.mjs} +5 -4
  46. package/dist/cli/{feedback-FPUVZBAN.mjs → feedback-JMCSR624.mjs} +3 -3
  47. package/dist/cli/{feedback-3P65QTX3.js → feedback-ZOLA2KY7.js} +7 -7
  48. package/dist/cli/git-EJQLRK27.js +23 -0
  49. package/dist/cli/{git-GLVVP7TY.mjs → git-LJGL2IHS.mjs} +4 -4
  50. package/dist/cli/index.js +94 -94
  51. package/dist/cli/index.mjs +42 -42
  52. package/dist/cli/{legacy-noops-3MOI6NBM.mjs → legacy-noops-F23PKVBN.mjs} +4 -4
  53. package/dist/cli/{legacy-noops-XKSGZR7Q.js → legacy-noops-YSCIR2SD.js} +7 -7
  54. package/dist/cli/{monitors-FTBGNEFG.mjs → monitors-S4LOEL7W.mjs} +5 -4
  55. package/dist/cli/{monitors-NZ2DYNST.js → monitors-WMZ6HJZX.js} +86 -85
  56. package/dist/cli/{org-MCKDQXIV.js → org-PFHM5ZLY.js} +65 -64
  57. package/dist/cli/{org-V2J5RBCN.mjs → org-U3WA2NQM.mjs} +5 -4
  58. package/dist/cli/{play-AJFGME3B.mjs → play-AGSECQFN.mjs} +8 -7
  59. package/dist/cli/play-BR2LWGXK.js +159 -0
  60. package/dist/cli/{providers-I6RQJZFZ.mjs → providers-QBBRFBOH.mjs} +5 -4
  61. package/dist/cli/{providers-2JEZ2264.js → providers-XYMHLKCA.js} +8 -7
  62. package/dist/cli/{quickstart-BIDQDMO4.mjs → quickstart-5JTDGISY.mjs} +3 -3
  63. package/dist/cli/{quickstart-GJ2RPDU3.js → quickstart-IYGD6ZY3.js} +5 -5
  64. package/dist/cli/{search-ELRXFWG5.mjs → search-X6W6GRHS.mjs} +6 -5
  65. package/dist/cli/search-ZVSYH5GY.js +28 -0
  66. package/dist/cli/{secrets-SQXGZXIC.mjs → secrets-N55B67H6.mjs} +5 -4
  67. package/dist/cli/{secrets-53IT6VXD.js → secrets-UHG6OQFD.js} +14 -13
  68. package/dist/cli/{sessions-CAV5M77Y.js → sessions-57L5MGHN.js} +5 -5
  69. package/dist/cli/{sessions-2X5QF7SL.mjs → sessions-JTRSTDSS.mjs} +4 -4
  70. package/dist/cli/{settings-532WNAZO.js → settings-ATX4U5AS.js} +75 -74
  71. package/dist/cli/{settings-7P67VGCJ.mjs → settings-Q24HRAQI.mjs} +8 -7
  72. package/dist/cli/{setup-QGGBV2LE.mjs → setup-77ZWLVHT.mjs} +6 -6
  73. package/dist/cli/{setup-6L2VSUWJ.js → setup-EJCNOUCE.js} +41 -41
  74. package/dist/cli/skills-SPXUBLII.js +28 -0
  75. package/dist/cli/{skills-3FE62WBG.mjs → skills-XIS5AWQI.mjs} +4 -4
  76. package/dist/cli/tools-DBHUUZJX.js +42 -0
  77. package/dist/cli/{tools-DMR25DEF.mjs → tools-WCKLYEGQ.mjs} +7 -6
  78. package/dist/cli/{update-6RZMHJZP.mjs → update-UT5WANMV.mjs} +6 -6
  79. package/dist/cli/update-VSNFXRHJ.js +28 -0
  80. package/dist/cli/{workflow-TX4F2PIX.js → workflow-226QYUN2.js} +16 -15
  81. package/dist/cli/{workflow-L2DQRE6R.mjs → workflow-ZMX3L4ML.mjs} +6 -5
  82. package/dist/{client-C3O1Ipf3.d.ts → client-CivP-PAI.d.ts} +21 -12
  83. package/dist/{client-BktIPdIj.d.mts → client-hdFtwhTm.d.mts} +21 -12
  84. package/dist/index.d.mts +2 -2
  85. package/dist/index.d.ts +2 -2
  86. package/dist/index.js +7 -6
  87. package/dist/index.mjs +4 -3
  88. package/dist/install-integrity.json +81 -74
  89. package/dist/plays/play-description.d.mts +6 -0
  90. package/dist/plays/play-description.d.ts +6 -0
  91. package/dist/plays/play-description.js +9 -0
  92. package/dist/plays/play-description.mjs +9 -0
  93. package/dist/plays/run-request.d.mts +1 -1
  94. package/dist/plays/run-request.d.ts +1 -1
  95. package/dist/release.d.mts +1 -1
  96. package/dist/release.d.ts +1 -1
  97. package/dist/release.js +2 -2
  98. package/dist/release.mjs +1 -1
  99. package/package.json +6 -1
  100. package/dist/cli/auth-IHKISLJQ.js +0 -39
  101. package/dist/cli/git-MFFAWVVX.js +0 -23
  102. package/dist/cli/play-WLSN2EO2.js +0 -158
  103. package/dist/cli/search-5VN4YD4I.js +0 -27
  104. package/dist/cli/skills-S6NPZAN7.js +0 -28
  105. package/dist/cli/tools-647RLXQS.js +0 -41
  106. package/dist/cli/update-WVTSC3EM.js +0 -28
@@ -2,9 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkE23BQ5SCjs = require('./chunk-E23BQ5SC.js');
5
+ var _chunk36ML3YKAjs = require('./chunk-36ML3YKA.js');
6
6
  require('./chunk-S6R3OX7B.js');
7
7
  require('./chunk-UHNDVD3P.js');
8
+ require('./chunk-DRM3CMHL.js');
8
9
  require('./chunk-XDVT3GOM.js');
9
10
 
10
11
 
@@ -12,16 +13,16 @@ require('./chunk-XDVT3GOM.js');
12
13
 
13
14
 
14
15
 
15
- var _chunkKGNTKMRGjs = require('./chunk-KGNTKMRG.js');
16
+ var _chunkHRWUQJ4Kjs = require('./chunk-HRWUQJ4K.js');
16
17
 
17
18
 
18
19
 
19
- var _chunkCS6RAIVYjs = require('./chunk-CS6RAIVY.js');
20
+ var _chunk56IFFVIBjs = require('./chunk-56IFFVIB.js');
20
21
  require('./chunk-XNYIZMNQ.js');
21
22
 
22
23
 
23
24
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
24
- require('./chunk-6YAUMG27.js');
25
+ require('./chunk-TO2MWPGR.js');
25
26
  require('./chunk-OG64RBAC.js');
26
27
  require('./chunk-COGTRVWW.js');
27
28
 
@@ -36,7 +37,7 @@ var SUBSCRIPTION_CANCEL_PATH = "/api/v2/billing/subscription/cancel";
36
37
  var BILLING_TOP_UP_PATH = "/api/v2/billing/top-up";
37
38
  var DEFAULT_BALANCE_RECOVERY_CREDITS = 100;
38
39
  function billingFailureFromError(error, options) {
39
- if (error instanceof _chunkCS6RAIVYjs.AuthError) {
40
+ if (error instanceof _chunk56IFFVIBjs.AuthError) {
40
41
  return {
41
42
  exitCode: 3,
42
43
  code: "AUTH_ERROR",
@@ -70,7 +71,7 @@ function reportBillingFailure(failure, options) {
70
71
  if (failure.next) {
71
72
  textLines.push(`Next: ${failure.next}`);
72
73
  }
73
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
74
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
74
75
  {
75
76
  ok: false,
76
77
  exitCode: failure.exitCode,
@@ -91,7 +92,7 @@ function parseTopUpCredits(raw) {
91
92
  return parsed;
92
93
  }
93
94
  function topUpIdempotencyKey(raw) {
94
- return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunkE23BQ5SCjs.requireBillingIdempotencyKey.call(void 0, raw);
95
+ return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunk36ML3YKAjs.requireBillingIdempotencyKey.call(void 0, raw);
95
96
  }
96
97
  function targetBillingIdempotencyKey(raw) {
97
98
  return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
@@ -128,7 +129,7 @@ function apiErrorCode(error) {
128
129
  return _nullishCoalesce(error.code, () => ( "BILLING_API_ERROR"));
129
130
  }
130
131
  function billingTopUpFailureFromError(error, input) {
131
- if (error instanceof _chunkCS6RAIVYjs.AuthError || error instanceof _chunkCS6RAIVYjs.ConfigError) {
132
+ if (error instanceof _chunk56IFFVIBjs.AuthError || error instanceof _chunk56IFFVIBjs.ConfigError) {
132
133
  return {
133
134
  exitCode: 3,
134
135
  code: "AUTH_ERROR",
@@ -297,7 +298,7 @@ function defaultLedgerExportPath() {
297
298
  );
298
299
  }
299
300
  async function handleBalance(options) {
300
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
301
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
301
302
  const payload = await http.get(
302
303
  "/api/v2/billing/balance"
303
304
  );
@@ -365,7 +366,7 @@ async function handleBalance(options) {
365
366
  ...options.verbose ? detail : [],
366
367
  ...lines.slice(1)
367
368
  ];
368
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
369
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
369
370
  {
370
371
  ...payload,
371
372
  ...recovery ? { recovery } : {},
@@ -389,7 +390,7 @@ function quoteShellArgument(value) {
389
390
  return `'${value.replace(/'/g, `'\\''`)}'`;
390
391
  }
391
392
  async function handleUsage(options) {
392
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
393
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
393
394
  const params = new URLSearchParams();
394
395
  if (options.requestId !== void 0) {
395
396
  const requestId = options.requestId.trim();
@@ -470,7 +471,7 @@ async function handleUsage(options) {
470
471
  "No continuation is available for this view. Use deepline billing ledger export all for the full ledger."
471
472
  ] : []
472
473
  ];
473
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
474
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
474
475
  {
475
476
  ...payload,
476
477
  recent: {
@@ -484,7 +485,7 @@ async function handleUsage(options) {
484
485
  );
485
486
  }
486
487
  async function handleLimit(options) {
487
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
488
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
488
489
  const payload = await http.get(
489
490
  "/api/v2/billing/limit"
490
491
  );
@@ -492,7 +493,7 @@ async function handleLimit(options) {
492
493
  `Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
493
494
  "Enforcement: checked before new calls; in-flight work can exceed the cap."
494
495
  ] : ["Monthly usage cap: off"];
495
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
496
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
496
497
  {
497
498
  ...payload,
498
499
  render: { sections: [{ title: "billing limit", lines }] }
@@ -501,12 +502,12 @@ async function handleLimit(options) {
501
502
  );
502
503
  }
503
504
  async function handleSetLimit(credits, options) {
504
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
505
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
505
506
  const payload = await http.request("/api/v2/billing/limit", {
506
507
  method: "PUT",
507
508
  body: { monthly_credits_limit: Number.parseInt(credits, 10) }
508
509
  });
509
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
510
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
510
511
  {
511
512
  ...payload,
512
513
  render: {
@@ -522,11 +523,11 @@ async function handleSetLimit(credits, options) {
522
523
  );
523
524
  }
524
525
  async function handleLimitOff(options) {
525
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
526
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
526
527
  const payload = await http.request("/api/v2/billing/limit", {
527
528
  method: "DELETE"
528
529
  });
529
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
530
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
530
531
  {
531
532
  ...payload,
532
533
  render: {
@@ -546,7 +547,7 @@ async function exportLedger(http, outputPath, options) {
546
547
  let initialized = false;
547
548
  let pageNumber = 0;
548
549
  console.error(`Exporting billing ledger to ${outputPath}`);
549
- for await (const entries of _chunkE23BQ5SCjs.iterateCursorPages.call(void 0, async (cursor) => {
550
+ for await (const entries of _chunk36ML3YKAjs.iterateCursorPages.call(void 0, async (cursor) => {
550
551
  pageNumber += 1;
551
552
  console.error(
552
553
  `Fetching page ${pageNumber}; ${summary.row_count} rows written.`
@@ -585,7 +586,7 @@ async function exportLedger(http, outputPath, options) {
585
586
  return summary;
586
587
  }
587
588
  async function handleHistory(options) {
588
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
589
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
589
590
  const windows = {
590
591
  "1d": 86400,
591
592
  "1w": 604800,
@@ -597,10 +598,10 @@ async function handleHistory(options) {
597
598
  process.cwd(),
598
599
  "deepline",
599
600
  "data",
600
- _chunkKGNTKMRGjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
601
+ _chunkHRWUQJ4Kjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
601
602
  );
602
603
  const summary = await exportLedger(http, outputPath, { sinceAt });
603
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
604
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
604
605
  {
605
606
  output_path: outputPath,
606
607
  row_count: summary.row_count,
@@ -637,14 +638,14 @@ async function handleLedgerExportAll(options) {
637
638
  );
638
639
  return;
639
640
  }
640
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
641
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
641
642
  const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
642
643
  const summary = await exportLedger(http, outputPath, {
643
644
  sinceAt,
644
645
  runId: options.runId,
645
646
  operation: options.operation
646
647
  });
647
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
648
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
648
649
  {
649
650
  output_path: outputPath,
650
651
  row_count: summary.row_count,
@@ -683,7 +684,7 @@ function targetPlanLine(plan) {
683
684
  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"}`;
684
685
  }
685
686
  async function handlePlans(options) {
686
- const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
687
+ const client = new (0, _chunk36ML3YKAjs.DeeplineClient)();
687
688
  const payload = await client.billing.targetPlans();
688
689
  const listedCurrentPlan = payload.plans.find(
689
690
  (plan) => plan.sku === payload.current_plan_sku
@@ -696,8 +697,8 @@ async function handlePlans(options) {
696
697
  ...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
697
698
  "Change plan: deepline billing change-plan <plan_sku>"
698
699
  ];
699
- const legacyPayload = _chunkKGNTKMRGjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
700
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
700
+ const legacyPayload = _chunkHRWUQJ4Kjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
701
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
701
702
  {
702
703
  ..._nullishCoalesce(legacyPayload, () => ( payload)),
703
704
  ...legacyPayload ? { target_billing: payload } : {},
@@ -707,7 +708,7 @@ async function handlePlans(options) {
707
708
  );
708
709
  }
709
710
  async function handleSubscribe(planVersionId, options) {
710
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
711
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
711
712
  const payload = await http.request(
712
713
  "/api/v2/billing/subscription/checkout",
713
714
  {
@@ -716,8 +717,8 @@ async function handleSubscribe(planVersionId, options) {
716
717
  }
717
718
  );
718
719
  const url = String(payload.checkout_url || "");
719
- if (!options.json && options.open !== false && url) _chunkKGNTKMRGjs.openInBrowser.call(void 0, url);
720
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
720
+ if (!options.json && options.open !== false && url) _chunkHRWUQJ4Kjs.openInBrowser.call(void 0, url);
721
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
721
722
  {
722
723
  ...payload,
723
724
  render: {
@@ -733,7 +734,7 @@ async function handleSubscribe(planVersionId, options) {
733
734
  );
734
735
  }
735
736
  async function handleSubscriptionStatus(options) {
736
- const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
737
+ const client = new (0, _chunk36ML3YKAjs.DeeplineClient)();
737
738
  const payload = await client.billing.subscription.status();
738
739
  const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
739
740
  const lines = [
@@ -753,7 +754,7 @@ async function handleSubscriptionStatus(options) {
753
754
  ],
754
755
  `Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
755
756
  ];
756
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
757
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
757
758
  {
758
759
  ...payload,
759
760
  render: { sections: [{ title: "billing subscription", lines }] }
@@ -762,7 +763,7 @@ async function handleSubscriptionStatus(options) {
762
763
  );
763
764
  }
764
765
  async function handleSubscriptionCancel(options) {
765
- const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
766
+ const client = new (0, _chunk36ML3YKAjs.DeeplineClient)();
766
767
  const action = options.undo ? "undo_cancel" : "cancel";
767
768
  if (options.dryRun) {
768
769
  const status = await client.billing.subscription.status();
@@ -779,7 +780,7 @@ async function handleSubscriptionCancel(options) {
779
780
  return;
780
781
  }
781
782
  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.";
782
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
783
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
783
784
  {
784
785
  ok: true,
785
786
  dry_run: true,
@@ -834,7 +835,7 @@ async function handleSubscriptionCancel(options) {
834
835
  "Remaining credits are yours to keep \u2014 cancellation never removes credits.",
835
836
  "Undo with: deepline billing subscription cancel --undo"
836
837
  ];
837
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
838
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
838
839
  {
839
840
  ok: true,
840
841
  ...result,
@@ -888,7 +889,7 @@ async function handleInvoices(options) {
888
889
  return;
889
890
  }
890
891
  }
891
- const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
892
+ const client = new (0, _chunk36ML3YKAjs.DeeplineClient)();
892
893
  let payload;
893
894
  try {
894
895
  payload = await client.billing.invoices.list(
@@ -917,7 +918,7 @@ async function handleInvoices(options) {
917
918
  url: entry.url
918
919
  }))
919
920
  } : { ...payload, count: entries.length };
920
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
921
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
921
922
  {
922
923
  ...envelope,
923
924
  render: { sections: [{ title: "billing invoices", lines }] }
@@ -926,7 +927,7 @@ async function handleInvoices(options) {
926
927
  );
927
928
  }
928
929
  async function handleCheckout(options) {
929
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
930
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
930
931
  const payload = await http.post(
931
932
  "/api/v2/billing/checkout",
932
933
  {
@@ -936,8 +937,8 @@ async function handleCheckout(options) {
936
937
  }
937
938
  );
938
939
  const url = String(payload.url || payload.checkout_url || "");
939
- if (!options.json && !options.noOpen && url) _chunkKGNTKMRGjs.openInBrowser.call(void 0, url);
940
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
940
+ if (!options.json && !options.noOpen && url) _chunkHRWUQJ4Kjs.openInBrowser.call(void 0, url);
941
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
941
942
  {
942
943
  ...payload,
943
944
  render: {
@@ -982,7 +983,7 @@ async function handleTopUp(creditsRaw, options) {
982
983
  return;
983
984
  }
984
985
  if (options.dryRun) {
985
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
986
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
986
987
  {
987
988
  ok: true,
988
989
  dry_run: true,
@@ -1012,7 +1013,7 @@ async function handleTopUp(creditsRaw, options) {
1012
1013
  );
1013
1014
  return;
1014
1015
  }
1015
- const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
1016
+ const client = new (0, _chunk36ML3YKAjs.DeeplineClient)();
1016
1017
  let payload;
1017
1018
  try {
1018
1019
  payload = await client.billing.topUpWithReceipt({
@@ -1029,7 +1030,7 @@ async function handleTopUp(creditsRaw, options) {
1029
1030
  return;
1030
1031
  }
1031
1032
  if (payload.status === "pending") {
1032
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1033
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1033
1034
  {
1034
1035
  ok: true,
1035
1036
  ...payload,
@@ -1093,17 +1094,17 @@ async function handleTopUp(creditsRaw, options) {
1093
1094
  ]
1094
1095
  }
1095
1096
  };
1096
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
1097
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
1097
1098
  json: options.json
1098
1099
  });
1099
1100
  }
1100
1101
  async function handleTargetStatus(options) {
1101
- const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
1102
+ const client = new (0, _chunk36ML3YKAjs.DeeplineClient)();
1102
1103
  const payload = await client.billing.targetStatus();
1103
1104
  const balanceCommand = "deepline billing balance";
1104
1105
  const recentChargesCommand = "deepline billing usage --limit 5";
1105
1106
  const exactChargeCommand = "deepline billing usage --request-id <job_id>";
1106
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1107
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1107
1108
  {
1108
1109
  ok: true,
1109
1110
  ...payload,
@@ -1133,8 +1134,8 @@ async function handleTargetStatus(options) {
1133
1134
  );
1134
1135
  }
1135
1136
  async function handleEntitlements(options) {
1136
- const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.entitlements();
1137
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1137
+ const payload = await new (0, _chunk36ML3YKAjs.DeeplineClient)().billing.entitlements();
1138
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1138
1139
  {
1139
1140
  ok: true,
1140
1141
  ...payload,
@@ -1159,7 +1160,7 @@ async function handleEntitlements(options) {
1159
1160
  );
1160
1161
  }
1161
1162
  async function handleAutoRechargeStatus(options) {
1162
- const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.autoRecharge.get();
1163
+ const payload = await new (0, _chunk36ML3YKAjs.DeeplineClient)().billing.autoRecharge.get();
1163
1164
  const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
1164
1165
  const lines = [
1165
1166
  `State: ${state}`,
@@ -1169,7 +1170,7 @@ async function handleAutoRechargeStatus(options) {
1169
1170
  `Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
1170
1171
  ] : []
1171
1172
  ];
1172
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1173
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1173
1174
  {
1174
1175
  ok: true,
1175
1176
  ...payload,
@@ -1218,7 +1219,7 @@ async function handleAutoRechargeSet(options) {
1218
1219
  }
1219
1220
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1220
1221
  if (options.dryRun) {
1221
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1222
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1222
1223
  {
1223
1224
  ok: true,
1224
1225
  dry_run: true,
@@ -1239,7 +1240,7 @@ async function handleAutoRechargeSet(options) {
1239
1240
  );
1240
1241
  return;
1241
1242
  }
1242
- const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.autoRecharge.update({
1243
+ const payload = await new (0, _chunk36ML3YKAjs.DeeplineClient)().billing.autoRecharge.update({
1243
1244
  enabled: true,
1244
1245
  thresholdCredits,
1245
1246
  refillToCredits,
@@ -1247,7 +1248,7 @@ async function handleAutoRechargeSet(options) {
1247
1248
  ...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
1248
1249
  idempotencyKey
1249
1250
  });
1250
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1251
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1251
1252
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1252
1253
  { json: options.json }
1253
1254
  );
@@ -1255,7 +1256,7 @@ async function handleAutoRechargeSet(options) {
1255
1256
  async function handleAutoRechargeOff(options) {
1256
1257
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1257
1258
  if (options.dryRun) {
1258
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1259
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1259
1260
  {
1260
1261
  ok: true,
1261
1262
  dry_run: true,
@@ -1270,11 +1271,11 @@ async function handleAutoRechargeOff(options) {
1270
1271
  );
1271
1272
  return;
1272
1273
  }
1273
- const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.autoRecharge.update({
1274
+ const payload = await new (0, _chunk36ML3YKAjs.DeeplineClient)().billing.autoRecharge.update({
1274
1275
  enabled: false,
1275
1276
  idempotencyKey
1276
1277
  });
1277
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1278
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1278
1279
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1279
1280
  { json: options.json }
1280
1281
  );
@@ -1293,11 +1294,11 @@ async function handleBuyCredits(creditsRaw, options) {
1293
1294
  return;
1294
1295
  }
1295
1296
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1296
- const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.purchaseCredits({
1297
+ const payload = await new (0, _chunk36ML3YKAjs.DeeplineClient)().billing.purchaseCredits({
1297
1298
  credits,
1298
1299
  idempotencyKey
1299
1300
  });
1300
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1301
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1301
1302
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1302
1303
  { json: options.json }
1303
1304
  );
@@ -1333,7 +1334,7 @@ async function handleTopUpRecover(creditsRaw, options) {
1333
1334
  return;
1334
1335
  }
1335
1336
  if (options.dryRun) {
1336
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1337
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1337
1338
  {
1338
1339
  ok: true,
1339
1340
  dry_run: true,
@@ -1346,12 +1347,12 @@ async function handleTopUpRecover(creditsRaw, options) {
1346
1347
  );
1347
1348
  return;
1348
1349
  }
1349
- const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.recoverCreditPurchase({
1350
+ const payload = await new (0, _chunk36ML3YKAjs.DeeplineClient)().billing.recoverCreditPurchase({
1350
1351
  credits,
1351
1352
  orgId: options.orgId,
1352
1353
  idempotencyKey: options.idempotencyKey
1353
1354
  });
1354
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1355
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1355
1356
  { ok: true, idempotency_key: options.idempotencyKey, ...payload },
1356
1357
  { json: options.json }
1357
1358
  );
@@ -1371,37 +1372,37 @@ async function handleTargetPlan(planSku, options) {
1371
1372
  return;
1372
1373
  }
1373
1374
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1374
- const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.transitionPlan({
1375
+ const payload = await new (0, _chunk36ML3YKAjs.DeeplineClient)().billing.transitionPlan({
1375
1376
  action: "start_or_change",
1376
1377
  targetPlanSku: planSku,
1377
1378
  ...options.billingEmail ? { billingEmail: options.billingEmail } : {},
1378
1379
  idempotencyKey
1379
1380
  });
1380
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1381
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1381
1382
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1382
1383
  { json: options.json }
1383
1384
  );
1384
1385
  }
1385
1386
  async function handleTargetPlanCancellation(options) {
1386
1387
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1387
- const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.transitionPlan({
1388
+ const payload = await new (0, _chunk36ML3YKAjs.DeeplineClient)().billing.transitionPlan({
1388
1389
  action: options.undo ? "undo_cancel" : "cancel",
1389
1390
  idempotencyKey
1390
1391
  });
1391
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1392
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1392
1393
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1393
1394
  { json: options.json }
1394
1395
  );
1395
1396
  }
1396
1397
  async function handleTargetPortal(options) {
1397
- const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.portalSession(
1398
+ const payload = await new (0, _chunk36ML3YKAjs.DeeplineClient)().billing.portalSession(
1398
1399
  options.billingAddress ? { flow: "customer_update" } : void 0
1399
1400
  );
1400
- if (!options.json && !options.noOpen) _chunkKGNTKMRGjs.openInBrowser.call(void 0, payload.url);
1401
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
1401
+ if (!options.json && !options.noOpen) _chunkHRWUQJ4Kjs.openInBrowser.call(void 0, payload.url);
1402
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
1402
1403
  }
1403
1404
  async function handleRedeemCode(code, options) {
1404
- const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
1405
+ const { http } = _chunkHRWUQJ4Kjs.getAuthedHttpClient.call(void 0, );
1405
1406
  const payload = await http.post(
1406
1407
  "/api/v2/billing/checkout",
1407
1408
  {
@@ -1409,8 +1410,8 @@ async function handleRedeemCode(code, options) {
1409
1410
  }
1410
1411
  );
1411
1412
  const url = String(payload.url || payload.checkout_url || "");
1412
- if (!options.json && !options.noOpen && url) _chunkKGNTKMRGjs.openInBrowser.call(void 0, url);
1413
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1413
+ if (!options.json && !options.noOpen && url) _chunkHRWUQJ4Kjs.openInBrowser.call(void 0, url);
1414
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0,
1414
1415
  {
1415
1416
  ...payload,
1416
1417
  render: {
@@ -1468,14 +1469,14 @@ Examples:
1468
1469
  if (!Number.isSafeInteger(quantity) || quantity <= 0) {
1469
1470
  throw new Error("--quantity must be a positive safe integer.");
1470
1471
  }
1471
- const quote = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.quote({
1472
+ const quote = await new (0, _chunk36ML3YKAjs.DeeplineClient)().billing.quote({
1472
1473
  quantity,
1473
1474
  sandbox_runtime: {
1474
1475
  timeout: options.sandboxTimeout,
1475
1476
  size: "standard"
1476
1477
  }
1477
1478
  });
1478
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, quote, {
1479
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0, quote, {
1479
1480
  json: options.json,
1480
1481
  text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
1481
1482
  ${quote.explanation}
@@ -1706,8 +1707,8 @@ Examples:
1706
1707
  new (0, _commander.Command)("trigger").description(
1707
1708
  "Evaluate capped automatic recharge and resume any pending purchase."
1708
1709
  ).option("--json", "Emit JSON output").action(async (options) => {
1709
- const result = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.autoRecharge.trigger();
1710
- _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
1710
+ const result = await new (0, _chunk36ML3YKAjs.DeeplineClient)().billing.autoRecharge.trigger();
1711
+ _chunkHRWUQJ4Kjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
1711
1712
  })
1712
1713
  );
1713
1714
  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(