deepline 0.3.395 → 0.3.396

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