deepline 0.3.392 → 0.3.394

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 (153) hide show
  1. package/dist/bundling-sources/sdk/src/client.ts +156 -24
  2. package/dist/bundling-sources/sdk/src/compat.ts +9 -0
  3. package/dist/bundling-sources/sdk/src/http.ts +5 -1
  4. package/dist/bundling-sources/sdk/src/index.ts +5 -0
  5. package/dist/bundling-sources/sdk/src/plays/run-request.ts +182 -6
  6. package/dist/bundling-sources/sdk/src/release.ts +4 -1
  7. package/dist/bundling-sources/sdk/src/types.ts +13 -0
  8. package/dist/bundling-sources/shared_libs/integration-contracts/request-warnings.ts +64 -0
  9. package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +315 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +41 -8
  11. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +895 -54
  12. package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +41 -4
  13. package/dist/bundling-sources/shared_libs/play-runtime/durable-call-policy.ts +28 -0
  14. package/dist/bundling-sources/shared_libs/play-runtime/durable-invocation-fence.ts +36 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +251 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +11 -3
  17. package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/gateway-adapter.ts +1 -0
  18. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +30 -1
  19. package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +26 -0
  20. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +168 -10
  21. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +252 -10
  22. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +92 -58
  23. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +7 -1
  24. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +30 -7
  25. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +1161 -316
  26. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +28 -15
  27. package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +24 -3
  28. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +32 -0
  29. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +103 -23
  30. package/dist/bundling-sources/shared_libs/plays/core.ts +1 -1
  31. package/dist/bundling-sources/shared_libs/plays/dataset.ts +172 -79
  32. package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +173 -1
  33. package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +18 -0
  34. package/dist/cli/auth-IHKISLJQ.js +39 -0
  35. package/dist/cli/{auth-6JSA2ZCW.mjs → auth-OSXDAVCF.mjs} +4 -4
  36. package/dist/cli/{billing-Q5BLQHIU.js → billing-EKLYOXUY.js} +101 -74
  37. package/dist/cli/{billing-MRRO643H.mjs → billing-ZNNKX3UR.mjs} +32 -5
  38. package/dist/cli/{chunk-4SFPVW7A.js → chunk-2MDDA7A4.js} +26 -26
  39. package/dist/cli/{chunk-JOFPQGXW.js → chunk-354JCXA2.js} +50 -50
  40. package/dist/cli/{chunk-7E66A24V.mjs → chunk-3HU47EGZ.mjs} +71 -9
  41. package/dist/cli/{chunk-DSWSEHRX.mjs → chunk-3HWALOL2.mjs} +1 -1
  42. package/dist/cli/{chunk-T7OKJ2T6.js → chunk-4P27AXEA.js} +73 -63
  43. package/dist/cli/{chunk-24VEN5PQ.mjs → chunk-5BB2RGAX.mjs} +190 -18
  44. package/dist/cli/{chunk-JSLPHFP7.js → chunk-6YAUMG27.js} +3 -2
  45. package/dist/cli/{chunk-MU6M3URX.mjs → chunk-BP33SIZF.mjs} +1 -1
  46. package/dist/cli/{chunk-WMS5U6YB.js → chunk-CS6RAIVY.js} +20 -19
  47. package/dist/cli/{chunk-CVLM3WMJ.js → chunk-E23BQ5SC.js} +242 -183
  48. package/dist/cli/{chunk-2GAHHSLB.mjs → chunk-FJGW5GXU.mjs} +3 -2
  49. package/dist/cli/{chunk-YN6YA7ZZ.mjs → chunk-JHIJIHFB.mjs} +79 -20
  50. package/dist/cli/{chunk-Q6EOHNRH.mjs → chunk-JI2B4RZP.mjs} +119 -6
  51. package/dist/cli/{chunk-5O4B6AUN.js → chunk-KB4SDX5S.js} +71 -9
  52. package/dist/cli/{chunk-RV6ALZIX.js → chunk-KGNTKMRG.js} +32 -7
  53. package/dist/cli/{chunk-6DBOU7UH.js → chunk-KI635JN4.js} +176 -87
  54. package/dist/cli/{chunk-2FQG2HU4.js → chunk-KIUMEOM5.js} +8 -8
  55. package/dist/cli/{chunk-Y6VOGHF2.mjs → chunk-KZZC33PY.mjs} +0 -181
  56. package/dist/cli/{chunk-2Q3GEFL4.mjs → chunk-M57J2SK4.mjs} +2 -2
  57. package/dist/cli/{chunk-R3O2CZ4H.mjs → chunk-MFB2VKBO.mjs} +2 -2
  58. package/dist/cli/{chunk-QGKPTBRR.js → chunk-MH73HMPV.js} +3 -3
  59. package/dist/cli/{chunk-BB3FNYFY.js → chunk-MLPU5SMZ.js} +2 -2
  60. package/dist/cli/{chunk-2G7DXFHI.mjs → chunk-NR3DFKNF.mjs} +27 -2
  61. package/dist/cli/{chunk-EY7RFC6A.js → chunk-QIQBYKLB.js} +15 -15
  62. package/dist/cli/{chunk-RIV2GS5E.js → chunk-RBJYWRCF.js} +638 -466
  63. package/dist/cli/{chunk-3VN4FTE3.js → chunk-RDXFGPJU.js} +1 -182
  64. package/dist/cli/{chunk-YAZCDBXX.mjs → chunk-TJI2EN6K.mjs} +3 -2
  65. package/dist/cli/chunk-UBKA33KY.mjs +310 -0
  66. package/dist/cli/{chunk-PAIMOGCM.js → chunk-UHNDVD3P.js} +125 -12
  67. package/dist/cli/{chunk-4TCT77UF.js → chunk-URWF7NGQ.js} +6 -1
  68. package/dist/cli/{chunk-2QLML6G4.mjs → chunk-UXFSWG3Q.mjs} +4 -4
  69. package/dist/cli/{chunk-UCKJQG25.js → chunk-VK6FYZLP.js} +8 -8
  70. package/dist/cli/{chunk-ZTACINO5.mjs → chunk-X63FDZJZ.mjs} +13 -3
  71. package/dist/cli/chunk-XDVT3GOM.js +310 -0
  72. package/dist/cli/{chunk-A3APGZFP.mjs → chunk-XRQ2AQL7.mjs} +2 -2
  73. package/dist/cli/{chunk-3FV4GBRK.mjs → chunk-XXUDVEXK.mjs} +97 -8
  74. package/dist/cli/{chunk-PQSA443V.mjs → chunk-ZI2ZNDJK.mjs} +6 -1
  75. package/dist/cli/{chunk-HGYBEAQP.mjs → chunk-ZYBGA4AR.mjs} +3 -3
  76. package/dist/cli/command-docs.js +2 -2
  77. package/dist/cli/command-docs.mjs +1 -1
  78. package/dist/cli/{csv-E4QGUIGI.mjs → csv-5AXRB35H.mjs} +3 -3
  79. package/dist/cli/{csv-26U5T24Z.js → csv-LU7O75WE.js} +12 -12
  80. package/dist/cli/{db-JTRJIAQW.mjs → db-7XP5UWEW.mjs} +6 -5
  81. package/dist/cli/{db-QHBFLMVL.js → db-F7YTFKVM.js} +31 -30
  82. package/dist/cli/{describe-FDV2V74F.js → describe-FRH32RDV.js} +24 -23
  83. package/dist/cli/{describe-E3DE3ZK3.mjs → describe-K4ES5LIL.mjs} +17 -16
  84. package/dist/cli/{executions-B3GTNPRE.mjs → executions-IEHEHJUO.mjs} +6 -5
  85. package/dist/cli/{executions-VZYOGVQY.js → executions-RZV5XPT2.js} +8 -7
  86. package/dist/cli/{feedback-CR55FJA2.js → feedback-3P65QTX3.js} +7 -7
  87. package/dist/cli/{feedback-4CEBR3OV.mjs → feedback-FPUVZBAN.mjs} +3 -3
  88. package/dist/cli/{git-NM2PHHZ4.mjs → git-GLVVP7TY.mjs} +4 -4
  89. package/dist/cli/git-MFFAWVVX.js +23 -0
  90. package/dist/cli/index.js +100 -96
  91. package/dist/cli/index.mjs +47 -43
  92. package/dist/cli/{legacy-noops-A7MSW5ND.mjs → legacy-noops-3MOI6NBM.mjs} +4 -4
  93. package/dist/cli/{legacy-noops-ZUA4YFIH.js → legacy-noops-XKSGZR7Q.js} +7 -7
  94. package/dist/cli/{monitors-NVPRQYP3.mjs → monitors-FTBGNEFG.mjs} +6 -5
  95. package/dist/cli/{monitors-ZE3TLZ4H.js → monitors-NZ2DYNST.js} +87 -86
  96. package/dist/cli/{org-U7A6DV5D.js → org-MCKDQXIV.js} +66 -65
  97. package/dist/cli/{org-KUBILNQV.mjs → org-V2J5RBCN.mjs} +6 -5
  98. package/dist/cli/{play-HRDXQ4QE.mjs → play-AJFGME3B.mjs} +11 -10
  99. package/dist/cli/play-WLSN2EO2.js +158 -0
  100. package/dist/cli/{providers-VD6YTVQZ.js → providers-2JEZ2264.js} +9 -8
  101. package/dist/cli/{providers-OHIWI453.mjs → providers-I6RQJZFZ.mjs} +6 -5
  102. package/dist/cli/{quickstart-UBV2FONF.mjs → quickstart-BIDQDMO4.mjs} +3 -3
  103. package/dist/cli/{quickstart-ETTCWPA4.js → quickstart-GJ2RPDU3.js} +5 -5
  104. package/dist/cli/run-identity-G257GQED.js +25 -0
  105. package/dist/cli/run-identity-MRNCEGV2.mjs +25 -0
  106. package/dist/cli/search-5VN4YD4I.js +27 -0
  107. package/dist/cli/{search-F44IZRT7.mjs → search-ELRXFWG5.mjs} +7 -6
  108. package/dist/cli/{secrets-CAEMRORF.js → secrets-53IT6VXD.js} +15 -14
  109. package/dist/cli/{secrets-R6XOJZKU.mjs → secrets-SQXGZXIC.mjs} +6 -5
  110. package/dist/cli/{sessions-RLN6UQS3.mjs → sessions-2X5QF7SL.mjs} +4 -4
  111. package/dist/cli/{sessions-6GC7OFTT.js → sessions-CAV5M77Y.js} +5 -5
  112. package/dist/cli/{settings-DPNVUAV2.js → settings-532WNAZO.js} +76 -75
  113. package/dist/cli/{settings-KIPAMRPP.mjs → settings-7P67VGCJ.mjs} +9 -8
  114. package/dist/cli/{setup-DTL3L5SG.js → setup-6L2VSUWJ.js} +41 -41
  115. package/dist/cli/{setup-TU2F7PU5.mjs → setup-QGGBV2LE.mjs} +6 -6
  116. package/dist/cli/{skills-UV5MYJ46.mjs → skills-3FE62WBG.mjs} +4 -4
  117. package/dist/cli/skills-S6NPZAN7.js +28 -0
  118. package/dist/cli/tools-647RLXQS.js +41 -0
  119. package/dist/cli/{tools-QRRNDCQ7.mjs → tools-DMR25DEF.mjs} +10 -9
  120. package/dist/cli/{update-4426TF35.mjs → update-6RZMHJZP.mjs} +6 -6
  121. package/dist/cli/update-WVTSC3EM.js +28 -0
  122. package/dist/cli/{workflow-N4U5VLZ3.mjs → workflow-L2DQRE6R.mjs} +7 -6
  123. package/dist/cli/{workflow-HNLOVISB.js → workflow-TX4F2PIX.js} +17 -16
  124. package/dist/{client-e6Qh5ZIg.d.mts → client-BktIPdIj.d.mts} +153 -4
  125. package/dist/{client-Uxuy-xQ2.d.ts → client-C3O1Ipf3.d.ts} +153 -4
  126. package/dist/{compiler-manifest-CY2v8ab0.d.ts → compiler-manifest-DLxUY5kI.d.mts} +124 -10
  127. package/dist/{compiler-manifest-CY2v8ab0.d.mts → compiler-manifest-DLxUY5kI.d.ts} +124 -10
  128. package/dist/{index-BZ6uzZJl.d.ts → index-B_GM9E3q.d.ts} +1 -1
  129. package/dist/{index-B9fBZH1g.d.mts → index-SCb0NvDb.d.mts} +1 -1
  130. package/dist/index.d.mts +5 -5
  131. package/dist/index.d.ts +5 -5
  132. package/dist/index.js +120 -29
  133. package/dist/index.mjs +111 -20
  134. package/dist/install-integrity.json +94 -88
  135. package/dist/plays/bundle-play-file.d.mts +3 -3
  136. package/dist/plays/bundle-play-file.d.ts +3 -3
  137. package/dist/plays/bundle-play-file.mjs +2 -2
  138. package/dist/plays/run-request.d.mts +2 -2
  139. package/dist/plays/run-request.d.ts +2 -2
  140. package/dist/plays/run-request.js +5 -2
  141. package/dist/plays/run-request.mjs +4 -1
  142. package/dist/release.d.mts +4 -1
  143. package/dist/release.d.ts +4 -1
  144. package/dist/release.js +2 -2
  145. package/dist/release.mjs +1 -1
  146. package/package.json +1 -1
  147. package/dist/cli/auth-67TAELQL.js +0 -39
  148. package/dist/cli/git-I5JTK6YU.js +0 -23
  149. package/dist/cli/play-A2V7YDU7.js +0 -157
  150. package/dist/cli/search-WWXMBVPH.js +0 -26
  151. package/dist/cli/skills-SWOSEZLB.js +0 -28
  152. package/dist/cli/tools-IL2YCDQ6.js +0 -40
  153. package/dist/cli/update-BERDPEYR.js +0 -28
@@ -2,25 +2,26 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkCVLM3WMJjs = require('./chunk-CVLM3WMJ.js');
5
+ var _chunkE23BQ5SCjs = require('./chunk-E23BQ5SC.js');
6
6
  require('./chunk-S6R3OX7B.js');
7
- require('./chunk-PAIMOGCM.js');
7
+ require('./chunk-UHNDVD3P.js');
8
+ require('./chunk-XDVT3GOM.js');
8
9
 
9
10
 
10
11
 
11
12
 
12
13
 
13
14
 
14
- var _chunkRV6ALZIXjs = require('./chunk-RV6ALZIX.js');
15
+ var _chunkKGNTKMRGjs = require('./chunk-KGNTKMRG.js');
15
16
 
16
17
 
17
18
 
18
- var _chunkWMS5U6YBjs = require('./chunk-WMS5U6YB.js');
19
+ var _chunkCS6RAIVYjs = require('./chunk-CS6RAIVY.js');
19
20
  require('./chunk-XNYIZMNQ.js');
20
21
 
21
22
 
22
23
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
23
- require('./chunk-JSLPHFP7.js');
24
+ require('./chunk-6YAUMG27.js');
24
25
  require('./chunk-OG64RBAC.js');
25
26
  require('./chunk-COGTRVWW.js');
26
27
 
@@ -35,7 +36,7 @@ var SUBSCRIPTION_CANCEL_PATH = "/api/v2/billing/subscription/cancel";
35
36
  var BILLING_TOP_UP_PATH = "/api/v2/billing/top-up";
36
37
  var DEFAULT_BALANCE_RECOVERY_CREDITS = 100;
37
38
  function billingFailureFromError(error, options) {
38
- if (error instanceof _chunkWMS5U6YBjs.AuthError) {
39
+ if (error instanceof _chunkCS6RAIVYjs.AuthError) {
39
40
  return {
40
41
  exitCode: 3,
41
42
  code: "AUTH_ERROR",
@@ -69,7 +70,7 @@ function reportBillingFailure(failure, options) {
69
70
  if (failure.next) {
70
71
  textLines.push(`Next: ${failure.next}`);
71
72
  }
72
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
73
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
73
74
  {
74
75
  ok: false,
75
76
  exitCode: failure.exitCode,
@@ -90,7 +91,7 @@ function parseTopUpCredits(raw) {
90
91
  return parsed;
91
92
  }
92
93
  function topUpIdempotencyKey(raw) {
93
- return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunkCVLM3WMJjs.requireBillingIdempotencyKey.call(void 0, raw);
94
+ return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunkE23BQ5SCjs.requireBillingIdempotencyKey.call(void 0, raw);
94
95
  }
95
96
  function targetBillingIdempotencyKey(raw) {
96
97
  return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
@@ -127,7 +128,7 @@ function apiErrorCode(error) {
127
128
  return _nullishCoalesce(error.code, () => ( "BILLING_API_ERROR"));
128
129
  }
129
130
  function billingTopUpFailureFromError(error, input) {
130
- if (error instanceof _chunkWMS5U6YBjs.AuthError || error instanceof _chunkWMS5U6YBjs.ConfigError) {
131
+ if (error instanceof _chunkCS6RAIVYjs.AuthError || error instanceof _chunkCS6RAIVYjs.ConfigError) {
131
132
  return {
132
133
  exitCode: 3,
133
134
  code: "AUTH_ERROR",
@@ -296,7 +297,7 @@ function defaultLedgerExportPath() {
296
297
  );
297
298
  }
298
299
  async function handleBalance(options) {
299
- const { http } = _chunkRV6ALZIXjs.getAuthedHttpClient.call(void 0, );
300
+ const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
300
301
  const payload = await http.get(
301
302
  "/api/v2/billing/balance"
302
303
  );
@@ -364,7 +365,7 @@ async function handleBalance(options) {
364
365
  ...options.verbose ? detail : [],
365
366
  ...lines.slice(1)
366
367
  ];
367
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
368
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
368
369
  {
369
370
  ...payload,
370
371
  ...recovery ? { recovery } : {},
@@ -388,7 +389,7 @@ function quoteShellArgument(value) {
388
389
  return `'${value.replace(/'/g, `'\\''`)}'`;
389
390
  }
390
391
  async function handleUsage(options) {
391
- const { http } = _chunkRV6ALZIXjs.getAuthedHttpClient.call(void 0, );
392
+ const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
392
393
  const params = new URLSearchParams();
393
394
  if (options.requestId !== void 0) {
394
395
  const requestId = options.requestId.trim();
@@ -469,7 +470,7 @@ async function handleUsage(options) {
469
470
  "No continuation is available for this view. Use deepline billing ledger export all for the full ledger."
470
471
  ] : []
471
472
  ];
472
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
473
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
473
474
  {
474
475
  ...payload,
475
476
  recent: {
@@ -483,7 +484,7 @@ async function handleUsage(options) {
483
484
  );
484
485
  }
485
486
  async function handleLimit(options) {
486
- const { http } = _chunkRV6ALZIXjs.getAuthedHttpClient.call(void 0, );
487
+ const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
487
488
  const payload = await http.get(
488
489
  "/api/v2/billing/limit"
489
490
  );
@@ -491,7 +492,7 @@ async function handleLimit(options) {
491
492
  `Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
492
493
  "Enforcement: checked before new calls; in-flight work can exceed the cap."
493
494
  ] : ["Monthly usage cap: off"];
494
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
495
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
495
496
  {
496
497
  ...payload,
497
498
  render: { sections: [{ title: "billing limit", lines }] }
@@ -500,12 +501,12 @@ async function handleLimit(options) {
500
501
  );
501
502
  }
502
503
  async function handleSetLimit(credits, options) {
503
- const { http } = _chunkRV6ALZIXjs.getAuthedHttpClient.call(void 0, );
504
+ const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
504
505
  const payload = await http.request("/api/v2/billing/limit", {
505
506
  method: "PUT",
506
507
  body: { monthly_credits_limit: Number.parseInt(credits, 10) }
507
508
  });
508
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
509
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
509
510
  {
510
511
  ...payload,
511
512
  render: {
@@ -521,11 +522,11 @@ async function handleSetLimit(credits, options) {
521
522
  );
522
523
  }
523
524
  async function handleLimitOff(options) {
524
- const { http } = _chunkRV6ALZIXjs.getAuthedHttpClient.call(void 0, );
525
+ const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
525
526
  const payload = await http.request("/api/v2/billing/limit", {
526
527
  method: "DELETE"
527
528
  });
528
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
529
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
529
530
  {
530
531
  ...payload,
531
532
  render: {
@@ -545,7 +546,7 @@ async function exportLedger(http, outputPath, options) {
545
546
  let initialized = false;
546
547
  let pageNumber = 0;
547
548
  console.error(`Exporting billing ledger to ${outputPath}`);
548
- for await (const entries of _chunkCVLM3WMJjs.iterateCursorPages.call(void 0, async (cursor) => {
549
+ for await (const entries of _chunkE23BQ5SCjs.iterateCursorPages.call(void 0, async (cursor) => {
549
550
  pageNumber += 1;
550
551
  console.error(
551
552
  `Fetching page ${pageNumber}; ${summary.row_count} rows written.`
@@ -584,7 +585,7 @@ async function exportLedger(http, outputPath, options) {
584
585
  return summary;
585
586
  }
586
587
  async function handleHistory(options) {
587
- const { http } = _chunkRV6ALZIXjs.getAuthedHttpClient.call(void 0, );
588
+ const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
588
589
  const windows = {
589
590
  "1d": 86400,
590
591
  "1w": 604800,
@@ -596,10 +597,10 @@ async function handleHistory(options) {
596
597
  process.cwd(),
597
598
  "deepline",
598
599
  "data",
599
- _chunkRV6ALZIXjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
600
+ _chunkKGNTKMRGjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
600
601
  );
601
602
  const summary = await exportLedger(http, outputPath, { sinceAt });
602
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
603
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
603
604
  {
604
605
  output_path: outputPath,
605
606
  row_count: summary.row_count,
@@ -636,14 +637,14 @@ async function handleLedgerExportAll(options) {
636
637
  );
637
638
  return;
638
639
  }
639
- const { http } = _chunkRV6ALZIXjs.getAuthedHttpClient.call(void 0, );
640
+ const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
640
641
  const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
641
642
  const summary = await exportLedger(http, outputPath, {
642
643
  sinceAt,
643
644
  runId: options.runId,
644
645
  operation: options.operation
645
646
  });
646
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
647
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
647
648
  {
648
649
  output_path: outputPath,
649
650
  row_count: summary.row_count,
@@ -682,7 +683,7 @@ function targetPlanLine(plan) {
682
683
  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
684
  }
684
685
  async function handlePlans(options) {
685
- const client = new (0, _chunkCVLM3WMJjs.DeeplineClient)();
686
+ const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
686
687
  const payload = await client.billing.targetPlans();
687
688
  const listedCurrentPlan = payload.plans.find(
688
689
  (plan) => plan.sku === payload.current_plan_sku
@@ -695,8 +696,8 @@ async function handlePlans(options) {
695
696
  ...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
696
697
  "Change plan: deepline billing change-plan <plan_sku>"
697
698
  ];
698
- const legacyPayload = _chunkRV6ALZIXjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
699
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
699
+ const legacyPayload = _chunkKGNTKMRGjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
700
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
700
701
  {
701
702
  ..._nullishCoalesce(legacyPayload, () => ( payload)),
702
703
  ...legacyPayload ? { target_billing: payload } : {},
@@ -706,7 +707,7 @@ async function handlePlans(options) {
706
707
  );
707
708
  }
708
709
  async function handleSubscribe(planVersionId, options) {
709
- const { http } = _chunkRV6ALZIXjs.getAuthedHttpClient.call(void 0, );
710
+ const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
710
711
  const payload = await http.request(
711
712
  "/api/v2/billing/subscription/checkout",
712
713
  {
@@ -715,8 +716,8 @@ async function handleSubscribe(planVersionId, options) {
715
716
  }
716
717
  );
717
718
  const url = String(payload.checkout_url || "");
718
- if (!options.json && options.open !== false && url) _chunkRV6ALZIXjs.openInBrowser.call(void 0, url);
719
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
719
+ if (!options.json && options.open !== false && url) _chunkKGNTKMRGjs.openInBrowser.call(void 0, url);
720
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
720
721
  {
721
722
  ...payload,
722
723
  render: {
@@ -732,7 +733,7 @@ async function handleSubscribe(planVersionId, options) {
732
733
  );
733
734
  }
734
735
  async function handleSubscriptionStatus(options) {
735
- const client = new (0, _chunkCVLM3WMJjs.DeeplineClient)();
736
+ const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
736
737
  const payload = await client.billing.subscription.status();
737
738
  const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
738
739
  const lines = [
@@ -752,7 +753,7 @@ async function handleSubscriptionStatus(options) {
752
753
  ],
753
754
  `Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
754
755
  ];
755
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
756
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
756
757
  {
757
758
  ...payload,
758
759
  render: { sections: [{ title: "billing subscription", lines }] }
@@ -761,7 +762,7 @@ async function handleSubscriptionStatus(options) {
761
762
  );
762
763
  }
763
764
  async function handleSubscriptionCancel(options) {
764
- const client = new (0, _chunkCVLM3WMJjs.DeeplineClient)();
765
+ const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
765
766
  const action = options.undo ? "undo_cancel" : "cancel";
766
767
  if (options.dryRun) {
767
768
  const status = await client.billing.subscription.status();
@@ -778,7 +779,7 @@ async function handleSubscriptionCancel(options) {
778
779
  return;
779
780
  }
780
781
  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
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
782
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
782
783
  {
783
784
  ok: true,
784
785
  dry_run: true,
@@ -833,7 +834,7 @@ async function handleSubscriptionCancel(options) {
833
834
  "Remaining credits are yours to keep \u2014 cancellation never removes credits.",
834
835
  "Undo with: deepline billing subscription cancel --undo"
835
836
  ];
836
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
837
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
837
838
  {
838
839
  ok: true,
839
840
  ...result,
@@ -887,7 +888,7 @@ async function handleInvoices(options) {
887
888
  return;
888
889
  }
889
890
  }
890
- const client = new (0, _chunkCVLM3WMJjs.DeeplineClient)();
891
+ const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
891
892
  let payload;
892
893
  try {
893
894
  payload = await client.billing.invoices.list(
@@ -916,7 +917,7 @@ async function handleInvoices(options) {
916
917
  url: entry.url
917
918
  }))
918
919
  } : { ...payload, count: entries.length };
919
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
920
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
920
921
  {
921
922
  ...envelope,
922
923
  render: { sections: [{ title: "billing invoices", lines }] }
@@ -925,7 +926,7 @@ async function handleInvoices(options) {
925
926
  );
926
927
  }
927
928
  async function handleCheckout(options) {
928
- const { http } = _chunkRV6ALZIXjs.getAuthedHttpClient.call(void 0, );
929
+ const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
929
930
  const payload = await http.post(
930
931
  "/api/v2/billing/checkout",
931
932
  {
@@ -935,8 +936,8 @@ async function handleCheckout(options) {
935
936
  }
936
937
  );
937
938
  const url = String(payload.url || payload.checkout_url || "");
938
- if (!options.json && !options.noOpen && url) _chunkRV6ALZIXjs.openInBrowser.call(void 0, url);
939
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
939
+ if (!options.json && !options.noOpen && url) _chunkKGNTKMRGjs.openInBrowser.call(void 0, url);
940
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
940
941
  {
941
942
  ...payload,
942
943
  render: {
@@ -981,7 +982,7 @@ async function handleTopUp(creditsRaw, options) {
981
982
  return;
982
983
  }
983
984
  if (options.dryRun) {
984
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
985
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
985
986
  {
986
987
  ok: true,
987
988
  dry_run: true,
@@ -1011,7 +1012,7 @@ async function handleTopUp(creditsRaw, options) {
1011
1012
  );
1012
1013
  return;
1013
1014
  }
1014
- const client = new (0, _chunkCVLM3WMJjs.DeeplineClient)();
1015
+ const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
1015
1016
  let payload;
1016
1017
  try {
1017
1018
  payload = await client.billing.topUpWithReceipt({
@@ -1028,7 +1029,7 @@ async function handleTopUp(creditsRaw, options) {
1028
1029
  return;
1029
1030
  }
1030
1031
  if (payload.status === "pending") {
1031
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1032
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1032
1033
  {
1033
1034
  ok: true,
1034
1035
  ...payload,
@@ -1092,17 +1093,17 @@ async function handleTopUp(creditsRaw, options) {
1092
1093
  ]
1093
1094
  }
1094
1095
  };
1095
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
1096
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
1096
1097
  json: options.json
1097
1098
  });
1098
1099
  }
1099
1100
  async function handleTargetStatus(options) {
1100
- const client = new (0, _chunkCVLM3WMJjs.DeeplineClient)();
1101
+ const client = new (0, _chunkE23BQ5SCjs.DeeplineClient)();
1101
1102
  const payload = await client.billing.targetStatus();
1102
1103
  const balanceCommand = "deepline billing balance";
1103
1104
  const recentChargesCommand = "deepline billing usage --limit 5";
1104
1105
  const exactChargeCommand = "deepline billing usage --request-id <job_id>";
1105
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1106
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1106
1107
  {
1107
1108
  ok: true,
1108
1109
  ...payload,
@@ -1132,8 +1133,8 @@ async function handleTargetStatus(options) {
1132
1133
  );
1133
1134
  }
1134
1135
  async function handleEntitlements(options) {
1135
- const payload = await new (0, _chunkCVLM3WMJjs.DeeplineClient)().billing.entitlements();
1136
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1136
+ const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.entitlements();
1137
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1137
1138
  {
1138
1139
  ok: true,
1139
1140
  ...payload,
@@ -1158,7 +1159,7 @@ async function handleEntitlements(options) {
1158
1159
  );
1159
1160
  }
1160
1161
  async function handleAutoRechargeStatus(options) {
1161
- const payload = await new (0, _chunkCVLM3WMJjs.DeeplineClient)().billing.autoRecharge.get();
1162
+ const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.autoRecharge.get();
1162
1163
  const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
1163
1164
  const lines = [
1164
1165
  `State: ${state}`,
@@ -1168,7 +1169,7 @@ async function handleAutoRechargeStatus(options) {
1168
1169
  `Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
1169
1170
  ] : []
1170
1171
  ];
1171
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1172
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1172
1173
  {
1173
1174
  ok: true,
1174
1175
  ...payload,
@@ -1217,7 +1218,7 @@ async function handleAutoRechargeSet(options) {
1217
1218
  }
1218
1219
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1219
1220
  if (options.dryRun) {
1220
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1221
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1221
1222
  {
1222
1223
  ok: true,
1223
1224
  dry_run: true,
@@ -1238,7 +1239,7 @@ async function handleAutoRechargeSet(options) {
1238
1239
  );
1239
1240
  return;
1240
1241
  }
1241
- const payload = await new (0, _chunkCVLM3WMJjs.DeeplineClient)().billing.autoRecharge.update({
1242
+ const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.autoRecharge.update({
1242
1243
  enabled: true,
1243
1244
  thresholdCredits,
1244
1245
  refillToCredits,
@@ -1246,7 +1247,7 @@ async function handleAutoRechargeSet(options) {
1246
1247
  ...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
1247
1248
  idempotencyKey
1248
1249
  });
1249
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1250
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1250
1251
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1251
1252
  { json: options.json }
1252
1253
  );
@@ -1254,7 +1255,7 @@ async function handleAutoRechargeSet(options) {
1254
1255
  async function handleAutoRechargeOff(options) {
1255
1256
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1256
1257
  if (options.dryRun) {
1257
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1258
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1258
1259
  {
1259
1260
  ok: true,
1260
1261
  dry_run: true,
@@ -1269,11 +1270,11 @@ async function handleAutoRechargeOff(options) {
1269
1270
  );
1270
1271
  return;
1271
1272
  }
1272
- const payload = await new (0, _chunkCVLM3WMJjs.DeeplineClient)().billing.autoRecharge.update({
1273
+ const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.autoRecharge.update({
1273
1274
  enabled: false,
1274
1275
  idempotencyKey
1275
1276
  });
1276
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1277
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1277
1278
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1278
1279
  { json: options.json }
1279
1280
  );
@@ -1292,11 +1293,11 @@ async function handleBuyCredits(creditsRaw, options) {
1292
1293
  return;
1293
1294
  }
1294
1295
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1295
- const payload = await new (0, _chunkCVLM3WMJjs.DeeplineClient)().billing.purchaseCredits({
1296
+ const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.purchaseCredits({
1296
1297
  credits,
1297
1298
  idempotencyKey
1298
1299
  });
1299
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1300
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1300
1301
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1301
1302
  { json: options.json }
1302
1303
  );
@@ -1332,7 +1333,7 @@ async function handleTopUpRecover(creditsRaw, options) {
1332
1333
  return;
1333
1334
  }
1334
1335
  if (options.dryRun) {
1335
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1336
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1336
1337
  {
1337
1338
  ok: true,
1338
1339
  dry_run: true,
@@ -1345,12 +1346,12 @@ async function handleTopUpRecover(creditsRaw, options) {
1345
1346
  );
1346
1347
  return;
1347
1348
  }
1348
- const payload = await new (0, _chunkCVLM3WMJjs.DeeplineClient)().billing.recoverCreditPurchase({
1349
+ const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.recoverCreditPurchase({
1349
1350
  credits,
1350
1351
  orgId: options.orgId,
1351
1352
  idempotencyKey: options.idempotencyKey
1352
1353
  });
1353
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1354
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1354
1355
  { ok: true, idempotency_key: options.idempotencyKey, ...payload },
1355
1356
  { json: options.json }
1356
1357
  );
@@ -1370,37 +1371,37 @@ async function handleTargetPlan(planSku, options) {
1370
1371
  return;
1371
1372
  }
1372
1373
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1373
- const payload = await new (0, _chunkCVLM3WMJjs.DeeplineClient)().billing.transitionPlan({
1374
+ const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.transitionPlan({
1374
1375
  action: "start_or_change",
1375
1376
  targetPlanSku: planSku,
1376
1377
  ...options.billingEmail ? { billingEmail: options.billingEmail } : {},
1377
1378
  idempotencyKey
1378
1379
  });
1379
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1380
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1380
1381
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1381
1382
  { json: options.json }
1382
1383
  );
1383
1384
  }
1384
1385
  async function handleTargetPlanCancellation(options) {
1385
1386
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1386
- const payload = await new (0, _chunkCVLM3WMJjs.DeeplineClient)().billing.transitionPlan({
1387
+ const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.transitionPlan({
1387
1388
  action: options.undo ? "undo_cancel" : "cancel",
1388
1389
  idempotencyKey
1389
1390
  });
1390
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1391
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1391
1392
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1392
1393
  { json: options.json }
1393
1394
  );
1394
1395
  }
1395
1396
  async function handleTargetPortal(options) {
1396
- const payload = await new (0, _chunkCVLM3WMJjs.DeeplineClient)().billing.portalSession(
1397
+ const payload = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.portalSession(
1397
1398
  options.billingAddress ? { flow: "customer_update" } : void 0
1398
1399
  );
1399
- if (!options.json && !options.noOpen) _chunkRV6ALZIXjs.openInBrowser.call(void 0, payload.url);
1400
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
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
1402
  }
1402
1403
  async function handleRedeemCode(code, options) {
1403
- const { http } = _chunkRV6ALZIXjs.getAuthedHttpClient.call(void 0, );
1404
+ const { http } = _chunkKGNTKMRGjs.getAuthedHttpClient.call(void 0, );
1404
1405
  const payload = await http.post(
1405
1406
  "/api/v2/billing/checkout",
1406
1407
  {
@@ -1408,8 +1409,8 @@ async function handleRedeemCode(code, options) {
1408
1409
  }
1409
1410
  );
1410
1411
  const url = String(payload.url || payload.checkout_url || "");
1411
- if (!options.json && !options.noOpen && url) _chunkRV6ALZIXjs.openInBrowser.call(void 0, url);
1412
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0,
1412
+ if (!options.json && !options.noOpen && url) _chunkKGNTKMRGjs.openInBrowser.call(void 0, url);
1413
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0,
1413
1414
  {
1414
1415
  ...payload,
1415
1416
  render: {
@@ -1456,6 +1457,32 @@ Examples:
1456
1457
  deepline billing ledger export all
1457
1458
  `
1458
1459
  );
1460
+ billing.command("quote").description(
1461
+ "Quote a sandbox session in Deepline credits; excludes provider tools and Customer DB compute."
1462
+ ).requiredOption(
1463
+ "--sandbox-timeout <duration>",
1464
+ "Runtime timeout, such as 30m or 2h"
1465
+ ).option("--quantity <sessions>", "Number of sandbox sessions", "1").option("--json", "Emit the bounded component quotation as JSON").action(
1466
+ async (options) => {
1467
+ const quantity = Number(options.quantity);
1468
+ if (!Number.isSafeInteger(quantity) || quantity <= 0) {
1469
+ throw new Error("--quantity must be a positive safe integer.");
1470
+ }
1471
+ const quote = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.quote({
1472
+ quantity,
1473
+ sandbox_runtime: {
1474
+ timeout: options.sandboxTimeout,
1475
+ size: "standard"
1476
+ }
1477
+ });
1478
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, quote, {
1479
+ json: options.json,
1480
+ text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
1481
+ ${quote.explanation}
1482
+ `
1483
+ });
1484
+ }
1485
+ );
1459
1486
  billing.command("balance").description("Show current billing balance.").addHelpText(
1460
1487
  "after",
1461
1488
  `
@@ -1679,8 +1706,8 @@ Examples:
1679
1706
  new (0, _commander.Command)("trigger").description(
1680
1707
  "Evaluate capped automatic recharge and resume any pending purchase."
1681
1708
  ).option("--json", "Emit JSON output").action(async (options) => {
1682
- const result = await new (0, _chunkCVLM3WMJjs.DeeplineClient)().billing.autoRecharge.trigger();
1683
- _chunkRV6ALZIXjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
1709
+ const result = await new (0, _chunkE23BQ5SCjs.DeeplineClient)().billing.autoRecharge.trigger();
1710
+ _chunkKGNTKMRGjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
1684
1711
  })
1685
1712
  );
1686
1713
  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,25 +2,26 @@ import {
2
2
  DeeplineClient,
3
3
  iterateCursorPages,
4
4
  requireBillingIdempotencyKey
5
- } from "./chunk-YN6YA7ZZ.mjs";
5
+ } from "./chunk-JHIJIHFB.mjs";
6
6
  import "./chunk-6IKARAYD.mjs";
7
- import "./chunk-Q6EOHNRH.mjs";
7
+ import "./chunk-JI2B4RZP.mjs";
8
+ import "./chunk-UBKA33KY.mjs";
8
9
  import {
9
10
  createTimestampedName,
10
11
  getAuthedHttpClient,
11
12
  openInBrowser,
12
13
  printCommandEnvelope,
13
14
  shouldEmitJson
14
- } from "./chunk-2G7DXFHI.mjs";
15
+ } from "./chunk-NR3DFKNF.mjs";
15
16
  import {
16
17
  AuthError,
17
18
  ConfigError
18
- } from "./chunk-2GAHHSLB.mjs";
19
+ } from "./chunk-FJGW5GXU.mjs";
19
20
  import "./chunk-DLIRSHV6.mjs";
20
21
  import {
21
22
  DeeplineError
22
23
  } from "./chunk-NXGCO4JB.mjs";
23
- import "./chunk-YAZCDBXX.mjs";
24
+ import "./chunk-TJI2EN6K.mjs";
24
25
  import "./chunk-WZYKRD7T.mjs";
25
26
  import "./chunk-KRD6H754.mjs";
26
27
 
@@ -1456,6 +1457,32 @@ Examples:
1456
1457
  deepline billing ledger export all
1457
1458
  `
1458
1459
  );
1460
+ billing.command("quote").description(
1461
+ "Quote a sandbox session in Deepline credits; excludes provider tools and Customer DB compute."
1462
+ ).requiredOption(
1463
+ "--sandbox-timeout <duration>",
1464
+ "Runtime timeout, such as 30m or 2h"
1465
+ ).option("--quantity <sessions>", "Number of sandbox sessions", "1").option("--json", "Emit the bounded component quotation as JSON").action(
1466
+ async (options) => {
1467
+ const quantity = Number(options.quantity);
1468
+ if (!Number.isSafeInteger(quantity) || quantity <= 0) {
1469
+ throw new Error("--quantity must be a positive safe integer.");
1470
+ }
1471
+ const quote = await new DeeplineClient().billing.quote({
1472
+ quantity,
1473
+ sandbox_runtime: {
1474
+ timeout: options.sandboxTimeout,
1475
+ size: "standard"
1476
+ }
1477
+ });
1478
+ printCommandEnvelope(quote, {
1479
+ json: options.json,
1480
+ text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
1481
+ ${quote.explanation}
1482
+ `
1483
+ });
1484
+ }
1485
+ );
1459
1486
  billing.command("balance").description("Show current billing balance.").addHelpText(
1460
1487
  "after",
1461
1488
  `