deepline 0.3.578 → 0.3.580

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 (175) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +20 -2
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/shared_libs/monitors/billing/public-pricing.ts +470 -15
  4. package/dist/bundling-sources/shared_libs/monitors/billing/tamradar.ts +12 -0
  5. package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +59 -0
  6. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +5 -3
  7. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +3 -1
  8. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +18 -0
  9. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +124 -57
  10. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +4 -0
  11. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +182 -80
  12. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +39 -2
  13. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +25 -0
  14. package/dist/bundling-sources/shared_libs/plays/sandbox-runtime-limits.ts +83 -0
  15. package/dist/cli/{agents-MCU3ITQZ.js → agents-BF5VX5ZB.js} +31 -31
  16. package/dist/cli/{agents-LRBANBZH.mjs → agents-JRFTZE7G.mjs} +4 -4
  17. package/dist/cli/auth-25MVD7TK.js +44 -0
  18. package/dist/cli/{auth-5BJKVYMQ.mjs → auth-XJXZ64R4.mjs} +5 -5
  19. package/dist/cli/{billing-EBBI4MVL.mjs → billing-TXJBGP2I.mjs} +69 -64
  20. package/dist/cli/{billing-NT57POHH.js → billing-VGMTJI7W.js} +158 -153
  21. package/dist/cli/{chunk-XBO4ERH6.js → chunk-2ZCFAUCV.js} +3 -3
  22. package/dist/cli/{chunk-P35YQAUC.js → chunk-3OSNEWGR.js} +281 -275
  23. package/dist/cli/{chunk-7J473OJ5.mjs → chunk-3P4QZIJ5.mjs} +1 -1
  24. package/dist/cli/{chunk-SKHUWQZE.js → chunk-3S5KFHQH.js} +17 -7
  25. package/dist/cli/{chunk-4LMTY4RQ.mjs → chunk-3ZBPXNSW.mjs} +2 -2
  26. package/dist/cli/{chunk-H7DY5NQ3.mjs → chunk-5BPJW6X5.mjs} +5 -5
  27. package/dist/cli/{chunk-A7NKOXBV.js → chunk-6VSUP4WN.js} +4 -4
  28. package/dist/cli/{chunk-4KNRCUKY.mjs → chunk-7HOG3JZE.mjs} +21 -15
  29. package/dist/cli/{chunk-OAQYLTUN.mjs → chunk-7ORX33JX.mjs} +5 -5
  30. package/dist/cli/{chunk-24FGR73C.js → chunk-ANX3PYLT.js} +13 -13
  31. package/dist/cli/{chunk-VVZ7JZMQ.js → chunk-APJ7IPRT.js} +15 -15
  32. package/dist/cli/{chunk-MXPCTF57.js → chunk-AZTQJJH7.js} +17 -2
  33. package/dist/cli/{chunk-3GF33QJJ.mjs → chunk-BAXLPQTM.mjs} +4 -4
  34. package/dist/cli/{chunk-DDJN4RR6.mjs → chunk-BK4Z62CF.mjs} +4 -4
  35. package/dist/cli/{chunk-IFWB4BYZ.mjs → chunk-C6YXUGX2.mjs} +3 -3
  36. package/dist/cli/{chunk-J7PCSLRY.js → chunk-COAAKSFX.js} +5 -5
  37. package/dist/cli/{chunk-Y2TK7OXN.js → chunk-D6I7QWOZ.js} +2 -2
  38. package/dist/cli/{chunk-W47SXEWQ.js → chunk-DQEHBAHL.js} +9 -9
  39. package/dist/cli/{chunk-ITYSPUKD.mjs → chunk-EI7KTESB.mjs} +2 -2
  40. package/dist/cli/{chunk-HZXF2HFF.mjs → chunk-FCJJPEKN.mjs} +5 -5
  41. package/dist/cli/{chunk-NEH7NZFT.js → chunk-GDBNH57Z.js} +10 -10
  42. package/dist/cli/{chunk-CFG3ZM7M.mjs → chunk-GE4ZEMMA.mjs} +2 -2
  43. package/dist/cli/{chunk-4YSJOSBG.mjs → chunk-GIZIWNL5.mjs} +1 -1
  44. package/dist/cli/{chunk-PJXPHUAR.mjs → chunk-H3B6QM6V.mjs} +3 -3
  45. package/dist/cli/{chunk-25SSGQJJ.js → chunk-HEZ24K5F.js} +2 -2
  46. package/dist/cli/{chunk-LYZPGP3P.mjs → chunk-HLMF53HZ.mjs} +1 -1
  47. package/dist/cli/{chunk-T2CCLYHV.mjs → chunk-IERWFFDB.mjs} +7 -7
  48. package/dist/cli/{chunk-CFLAGRWL.mjs → chunk-IG3CXIJY.mjs} +1 -1
  49. package/dist/cli/{chunk-ALXYCC4K.mjs → chunk-IM322G7M.mjs} +1 -1
  50. package/dist/cli/{chunk-RW3URFZK.mjs → chunk-KLBIHDZB.mjs} +2 -2
  51. package/dist/cli/{chunk-VMCJKGZS.mjs → chunk-LC4ETCOA.mjs} +2 -2
  52. package/dist/cli/{chunk-CS36W3RL.js → chunk-LHV3HPAY.js} +26 -26
  53. package/dist/cli/{chunk-CPNTDIJK.js → chunk-MBOPKQJF.js} +1 -1
  54. package/dist/cli/{chunk-BPMA4S3O.js → chunk-MCYZO3RB.js} +21 -21
  55. package/dist/cli/{chunk-JQPFICW3.mjs → chunk-MEDA3STC.mjs} +1 -1
  56. package/dist/cli/{chunk-ZO65VJRJ.js → chunk-MOZDEYQC.js} +11 -1
  57. package/dist/cli/{chunk-6UFTWNC5.mjs → chunk-MP6XUVAJ.mjs} +2 -2
  58. package/dist/cli/{chunk-HGQT6EGK.js → chunk-NNWEQDZR.js} +20 -20
  59. package/dist/cli/{chunk-AZFSCPYK.mjs → chunk-NV5IJ3NY.mjs} +17 -2
  60. package/dist/cli/{chunk-QPOJLAFT.mjs → chunk-O7AWGIDD.mjs} +2 -2
  61. package/dist/cli/{chunk-G7PH2QVM.js → chunk-PFNYLTCZ.js} +5 -5
  62. package/dist/cli/{chunk-DWUESXDD.mjs → chunk-QXQBTTRD.mjs} +11 -1
  63. package/dist/cli/{chunk-5IMWXYVB.js → chunk-R77IVVEZ.js} +53 -53
  64. package/dist/cli/{chunk-MXK4M7HP.js → chunk-S2YKIWCD.js} +17 -17
  65. package/dist/cli/{chunk-FYKHAT2F.mjs → chunk-SECFDB27.mjs} +10 -0
  66. package/dist/cli/{chunk-NTHN7ODR.mjs → chunk-SQBSK74D.mjs} +7 -3
  67. package/dist/cli/{chunk-M3ITWEGS.js → chunk-TSOXJZSW.js} +41 -41
  68. package/dist/cli/{chunk-CSPOWVWS.mjs → chunk-U4VCAECC.mjs} +8 -3
  69. package/dist/cli/{chunk-RLPPLS6A.js → chunk-URZPR54R.js} +6 -6
  70. package/dist/cli/{chunk-27HAQRGH.js → chunk-V5NDHTBB.js} +23 -23
  71. package/dist/cli/{chunk-HKZN33F2.mjs → chunk-VF3EGTHU.mjs} +3 -3
  72. package/dist/cli/{chunk-5LCV36BR.js → chunk-VOQWPUIF.js} +20 -20
  73. package/dist/cli/{chunk-3ZUKYLC6.js → chunk-WJUAVMQC.js} +217 -213
  74. package/dist/cli/{chunk-W66GXHYR.mjs → chunk-X5RXG6VS.mjs} +1 -1
  75. package/dist/cli/{chunk-UKSOIH2P.js → chunk-XFVJ3JNA.js} +5 -5
  76. package/dist/cli/{chunk-RWDYULX2.js → chunk-XQUVLYOL.js} +17 -12
  77. package/dist/cli/{chunk-XE66BGLB.js → chunk-YY6EB252.js} +2 -2
  78. package/dist/cli/{chunk-XX7TZM4N.js → chunk-Z6DERGHY.js} +48 -48
  79. package/dist/cli/{chunk-PXMCPEE2.js → chunk-ZADJC22U.js} +3 -3
  80. package/dist/cli/{chunk-4CNHOBUO.mjs → chunk-ZR7PDXIA.mjs} +2 -2
  81. package/dist/cli/command-docs.js +2 -2
  82. package/dist/cli/command-docs.mjs +1 -1
  83. package/dist/cli/concurrent-runs-help-DEN63DUM.js +22 -0
  84. package/dist/cli/{concurrent-runs-help-2MHLIUC6.mjs → concurrent-runs-help-DSUQRWZQ.mjs} +6 -6
  85. package/dist/cli/{csv-RYYDAC76.js → csv-HSHF6JYZ.js} +13 -13
  86. package/dist/cli/{csv-J6SRBMOT.mjs → csv-QNXJBT5T.mjs} +4 -4
  87. package/dist/cli/{db-WK226TM7.mjs → db-RAWY3SWS.mjs} +6 -6
  88. package/dist/cli/{db-5QLH6QK5.js → db-VHYWVLLU.js} +27 -27
  89. package/dist/cli/{describe-UBSCFPH5.mjs → describe-WZOVHWAM.mjs} +21 -21
  90. package/dist/cli/describe-YHZ2EGBQ.js +50 -0
  91. package/dist/cli/describe-core.d.mts +4 -2
  92. package/dist/cli/describe-core.d.ts +4 -2
  93. package/dist/cli/describe-core.js +4 -4
  94. package/dist/cli/describe-core.mjs +3 -3
  95. package/dist/cli/{executions-AGV5V7SD.js → executions-DQIFH4Z6.js} +8 -8
  96. package/dist/cli/{executions-XF5BNCFS.mjs → executions-QABOXV4K.mjs} +6 -6
  97. package/dist/cli/{feedback-3RDEZE2M.js → feedback-6IER2W4G.js} +14 -14
  98. package/dist/cli/{feedback-LT3PDK72.mjs → feedback-DW4O63DG.mjs} +6 -6
  99. package/dist/cli/{git-7VBTCCBV.mjs → git-3NAPGZGR.mjs} +5 -5
  100. package/dist/cli/git-SQ2MAKAH.js +26 -0
  101. package/dist/cli/index.js +148 -148
  102. package/dist/cli/index.mjs +47 -47
  103. package/dist/cli/{integrations-JP732FQB.js → integrations-5LHIBBXB.js} +29 -29
  104. package/dist/cli/{integrations-E7QRWMKZ.mjs → integrations-TSRUTENK.mjs} +7 -7
  105. package/dist/cli/{legacy-noops-UFNQBPIT.mjs → legacy-noops-4N63A6H7.mjs} +6 -6
  106. package/dist/cli/{legacy-noops-UTL4W5WE.js → legacy-noops-S22XGYGN.js} +9 -9
  107. package/dist/cli/{mcp-YHETA3AU.mjs → mcp-4EJHRRFV.mjs} +4 -4
  108. package/dist/cli/{mcp-5X4XFB4V.js → mcp-JERBGJYE.js} +24 -24
  109. package/dist/cli/{monitors-WFVZ42OQ.mjs → monitors-7BTLBD6S.mjs} +16 -11
  110. package/dist/cli/{monitors-AN6KH4XY.js → monitors-FF35CGC4.js} +109 -104
  111. package/dist/cli/{org-CN3XJZLA.js → org-ADCDO7KU.js} +121 -121
  112. package/dist/cli/{org-OMDV7WDF.mjs → org-QYIIBKA2.mjs} +6 -6
  113. package/dist/cli/{outcomes-7HCZ6K3Q.js → outcomes-2LW4GK2L.js} +14 -14
  114. package/dist/cli/{outcomes-I4ZTG5ND.mjs → outcomes-C5DIBG4Q.mjs} +6 -6
  115. package/dist/cli/{play-TSNBSHGA.mjs → play-DTTDTISL.mjs} +20 -20
  116. package/dist/cli/{play-45VXZ57A.js → play-S5MZ2GRA.js} +349 -349
  117. package/dist/cli/{providers-4TB56ZLK.mjs → providers-AXOEFQ6Q.mjs} +6 -6
  118. package/dist/cli/{providers-RB3TT7AE.js → providers-N2IWEJBW.js} +9 -9
  119. package/dist/cli/{quickstart-XHZ3PG5I.mjs → quickstart-ADWSZBV6.mjs} +4 -4
  120. package/dist/cli/{quickstart-ZNDM6VUD.js → quickstart-UC5AJZWU.js} +6 -6
  121. package/dist/cli/{run-XNEJGAKV.js → run-6TDYUL7L.js} +49 -48
  122. package/dist/cli/{run-7PY4G6GB.mjs → run-R2FVH3K6.mjs} +27 -26
  123. package/dist/cli/{search-BG7KCIOG.mjs → search-GRHUFSLY.mjs} +7 -7
  124. package/dist/cli/search-V7ANBX3J.js +32 -0
  125. package/dist/cli/{search-output-3ZBNTHGO.js → search-output-O7NY3VMD.js} +8 -8
  126. package/dist/cli/{search-output-TWKKP2BE.mjs → search-output-UPQNAFAF.mjs} +5 -5
  127. package/dist/cli/{secrets-FNR6MX6A.js → secrets-72GJHFER.js} +15 -15
  128. package/dist/cli/{secrets-AZZCE7E3.mjs → secrets-NKAEJLIQ.mjs} +6 -6
  129. package/dist/cli/sessions-EO6RTMUC.js +23 -0
  130. package/dist/cli/{sessions-ZAMKN3AF.mjs → sessions-VIMF3UF5.mjs} +6 -6
  131. package/dist/cli/{settings-QGASFWV3.js → settings-HFAW5HIF.js} +85 -85
  132. package/dist/cli/{settings-WKWOOOI2.mjs → settings-KCQHBFNZ.mjs} +12 -12
  133. package/dist/cli/{setup-KUZDCR3F.js → setup-2MHWGEAD.js} +49 -49
  134. package/dist/cli/{setup-U36W42LE.mjs → setup-2ZD5ZIUH.mjs} +9 -9
  135. package/dist/cli/skills-ID6KKDLH.js +37 -0
  136. package/dist/cli/{skills-25CSZQIK.mjs → skills-X2DZZG5P.mjs} +7 -7
  137. package/dist/cli/tools-7UY7GERW.js +57 -0
  138. package/dist/cli/{tools-4NZQ22AA.mjs → tools-KPTOWKD4.mjs} +19 -19
  139. package/dist/cli/{update-CJYP36TG.mjs → update-6PMQCEUP.mjs} +9 -9
  140. package/dist/cli/update-T2RDLLSY.js +37 -0
  141. package/dist/cli/{views-76UIPWJD.js → views-MNBHNO6C.js} +37 -24
  142. package/dist/cli/{views-GYGE7FSV.mjs → views-VRZ5CTFL.mjs} +21 -8
  143. package/dist/cli/{workflow-LZSWALZS.mjs → workflow-7JUJWA5S.mjs} +7 -7
  144. package/dist/cli/{workflow-NCVXBATM.js → workflow-SSMFO7YE.js} +17 -17
  145. package/dist/{client-CF-bsrtI.d.mts → client-CmG8MT0x.d.mts} +1 -1
  146. package/dist/{client-BrdMPFCM.d.ts → client-QznpkWrk.d.ts} +1 -1
  147. package/dist/{client-core-rMoUWSYM.d.ts → client-core-CXDqfeiB.d.ts} +12 -1
  148. package/dist/{client-core-DM1ZedOG.d.mts → client-core-CY0jNW0e.d.mts} +12 -1
  149. package/dist/index.d.mts +3 -3
  150. package/dist/index.d.ts +3 -3
  151. package/dist/index.js +9 -9
  152. package/dist/index.mjs +6 -6
  153. package/dist/install-integrity.json +126 -126
  154. package/dist/plays/play-description.d.mts +1 -1
  155. package/dist/plays/play-description.d.ts +1 -1
  156. package/dist/plays/run-request.d.mts +1 -1
  157. package/dist/plays/run-request.d.ts +1 -1
  158. package/dist/release.d.mts +1 -1
  159. package/dist/release.d.ts +1 -1
  160. package/dist/release.js +2 -2
  161. package/dist/release.mjs +1 -1
  162. package/dist/server.d.mts +2 -2
  163. package/dist/server.d.ts +2 -2
  164. package/dist/server.js +5 -5
  165. package/dist/server.mjs +3 -3
  166. package/package.json +1 -1
  167. package/dist/cli/auth-VSW3MTFO.js +0 -44
  168. package/dist/cli/concurrent-runs-help-ATT2GVTQ.js +0 -22
  169. package/dist/cli/describe-Q27SRQWM.js +0 -50
  170. package/dist/cli/git-BBTP3H7J.js +0 -26
  171. package/dist/cli/search-ZBU5GW4W.js +0 -32
  172. package/dist/cli/sessions-GCY62GAW.js +0 -23
  173. package/dist/cli/skills-43DHMLRW.js +0 -37
  174. package/dist/cli/tools-5BGKNMFU.js +0 -57
  175. package/dist/cli/update-CUO2MTB6.js +0 -37
@@ -1,21 +1,26 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkG7PH2QVMjs = require('./chunk-G7PH2QVM.js');
4
- require('./chunk-5IMWXYVB.js');
3
+ var _chunkPFNYLTCZjs = require('./chunk-PFNYLTCZ.js');
5
4
 
6
5
 
7
- var _chunkUKSOIH2Pjs = require('./chunk-UKSOIH2P.js');
6
+ var _chunkMOZDEYQCjs = require('./chunk-MOZDEYQC.js');
7
+ require('./chunk-BVXIGOBZ.js');
8
+ require('./chunk-R77IVVEZ.js');
8
9
 
9
10
 
11
+ var _chunkXFVJ3JNAjs = require('./chunk-XFVJ3JNA.js');
10
12
 
11
13
 
12
- var _chunk3ZUKYLC6js = require('./chunk-3ZUKYLC6.js');
14
+
15
+
16
+
17
+ var _chunkWJUAVMQCjs = require('./chunk-WJUAVMQC.js');
13
18
  require('./chunk-4WAM6TLD.js');
14
19
  require('./chunk-MJTVX4QK.js');
15
20
  require('./chunk-PMH4GLMD.js');
16
21
 
17
22
 
18
- var _chunkMXPCTF57js = require('./chunk-MXPCTF57.js');
23
+ var _chunkAZTQJJH7js = require('./chunk-AZTQJJH7.js');
19
24
 
20
25
 
21
26
  var _chunkTJCENACZjs = require('./chunk-TJCENACZ.js');
@@ -32,9 +37,12 @@ var _chunkYGCKMI5Pjs = require('./chunk-YGCKMI5P.js');
32
37
 
33
38
 
34
39
 
35
- var _chunkHGQT6EGKjs = require('./chunk-HGQT6EGK.js');
36
- require('./chunk-XBO4ERH6.js');
37
- require('./chunk-A7NKOXBV.js');
40
+ var _chunkNNWEQDZRjs = require('./chunk-NNWEQDZR.js');
41
+
42
+
43
+
44
+ var _chunk2ZCFAUCVjs = require('./chunk-2ZCFAUCV.js');
45
+ require('./chunk-6VSUP4WN.js');
38
46
 
39
47
 
40
48
 
@@ -44,7 +52,7 @@ require('./chunk-XNYIZMNQ.js');
44
52
 
45
53
  var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.js');
46
54
  require('./chunk-CFJFUVX2.js');
47
- require('./chunk-CPNTDIJK.js');
55
+ require('./chunk-MBOPKQJF.js');
48
56
  require('./chunk-OG64RBAC.js');
49
57
  require('./chunk-COGTRVWW.js');
50
58
 
@@ -140,7 +148,7 @@ function reportBillingFailure(failure, options) {
140
148
  if (failure.next) {
141
149
  textLines.push(`Next: ${failure.next}`);
142
150
  }
143
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
151
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
144
152
  {
145
153
  ok: false,
146
154
  exitCode: failure.exitCode,
@@ -161,7 +169,7 @@ function parseTopUpCredits(raw) {
161
169
  return parsed;
162
170
  }
163
171
  function topUpIdempotencyKey(raw) {
164
- return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunk3ZUKYLC6js.requireBillingIdempotencyKey.call(void 0, raw);
172
+ return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunkWJUAVMQCjs.requireBillingIdempotencyKey.call(void 0, raw);
165
173
  }
166
174
  function targetBillingIdempotencyKey(raw) {
167
175
  return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
@@ -299,6 +307,8 @@ function recentUsageLines(entries) {
299
307
  const auditBits = [
300
308
  entry.outcome ? `outcome=${entry.outcome}` : null,
301
309
  entry.pricing_basis ? `priced_by=${entry.pricing_basis}` : null,
310
+ // managed: Deepline's provider key; user: the workspace's own key.
311
+ entry.credential_source && entry.credential_source !== "unknown" ? `key=${entry.credential_source}` : null,
302
312
  entry.run_id ? `run=${entry.run_id}` : null,
303
313
  entry.play_run_id || entry.execution_run_id ? `play_run=${_nullishCoalesce(entry.play_run_id, () => ( entry.execution_run_id))}` : null,
304
314
  entry.billing_run_id ? `billing_run=${entry.billing_run_id}` : null,
@@ -380,7 +390,7 @@ function defaultLedgerExportPath() {
380
390
  );
381
391
  }
382
392
  async function handleBalance(options) {
383
- const { http } = _chunkHGQT6EGKjs.getAuthedHttpClient.call(void 0, );
393
+ const { http } = _chunkNNWEQDZRjs.getAuthedHttpClient.call(void 0, );
384
394
  const payload = await http.get(
385
395
  "/api/v2/billing/balance"
386
396
  );
@@ -470,7 +480,7 @@ async function handleBalance(options) {
470
480
  ...options.verbose ? detail : [],
471
481
  ...lines.slice(1)
472
482
  ];
473
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
483
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
474
484
  {
475
485
  ...payload,
476
486
  ...recovery ? { recovery } : {},
@@ -506,7 +516,7 @@ async function handleUsageEvents(options) {
506
516
  );
507
517
  return;
508
518
  }
509
- const client = new (0, _chunkUKSOIH2Pjs.DeeplineClient)();
519
+ const client = new (0, _chunkXFVJ3JNAjs.DeeplineClient)();
510
520
  let payload;
511
521
  try {
512
522
  payload = await client.billing.usageEvents({
@@ -537,7 +547,7 @@ async function handleUsageEvents(options) {
537
547
  ),
538
548
  ...nextPage ? [`Next page: ${nextPage}`] : []
539
549
  ];
540
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
550
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
541
551
  {
542
552
  ...payload,
543
553
  next: { page: nextPage },
@@ -559,7 +569,7 @@ async function handleUsage(options) {
559
569
  return;
560
570
  }
561
571
  if (options.events) return handleUsageEvents(options);
562
- const { http } = _chunkHGQT6EGKjs.getAuthedHttpClient.call(void 0, );
572
+ const { http } = _chunkNNWEQDZRjs.getAuthedHttpClient.call(void 0, );
563
573
  const params = new URLSearchParams();
564
574
  if (options.requestId !== void 0) {
565
575
  const requestId = options.requestId.trim();
@@ -643,7 +653,7 @@ async function handleUsage(options) {
643
653
  "No continuation is available for this view. Use deepline billing ledger export all for the full ledger."
644
654
  ] : []
645
655
  ];
646
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
656
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
647
657
  {
648
658
  ...payload,
649
659
  recent: {
@@ -657,7 +667,7 @@ async function handleUsage(options) {
657
667
  );
658
668
  }
659
669
  async function handleLimit(options) {
660
- const { http } = _chunkHGQT6EGKjs.getAuthedHttpClient.call(void 0, );
670
+ const { http } = _chunkNNWEQDZRjs.getAuthedHttpClient.call(void 0, );
661
671
  const payload = await http.get(
662
672
  "/api/v2/billing/limit"
663
673
  );
@@ -665,7 +675,7 @@ async function handleLimit(options) {
665
675
  `Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
666
676
  "Enforcement: checked before new calls; in-flight work can exceed the cap."
667
677
  ] : ["Monthly usage cap: off"];
668
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
678
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
669
679
  {
670
680
  ...payload,
671
681
  render: { sections: [{ title: "billing limit", lines }] }
@@ -674,12 +684,12 @@ async function handleLimit(options) {
674
684
  );
675
685
  }
676
686
  async function handleSetLimit(credits, options) {
677
- const { http } = _chunkHGQT6EGKjs.getAuthedHttpClient.call(void 0, );
687
+ const { http } = _chunkNNWEQDZRjs.getAuthedHttpClient.call(void 0, );
678
688
  const payload = await http.request("/api/v2/billing/limit", {
679
689
  method: "PUT",
680
690
  body: { monthly_credits_limit: Number.parseInt(credits, 10) }
681
691
  });
682
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
692
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
683
693
  {
684
694
  ...payload,
685
695
  render: {
@@ -695,11 +705,11 @@ async function handleSetLimit(credits, options) {
695
705
  );
696
706
  }
697
707
  async function handleLimitOff(options) {
698
- const { http } = _chunkHGQT6EGKjs.getAuthedHttpClient.call(void 0, );
708
+ const { http } = _chunkNNWEQDZRjs.getAuthedHttpClient.call(void 0, );
699
709
  const payload = await http.request("/api/v2/billing/limit", {
700
710
  method: "DELETE"
701
711
  });
702
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
712
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
703
713
  {
704
714
  ...payload,
705
715
  render: {
@@ -719,7 +729,7 @@ async function exportLedger(http, outputPath, options) {
719
729
  let initialized = false;
720
730
  let pageNumber = 0;
721
731
  console.error(`Exporting billing ledger to ${outputPath}`);
722
- for await (const entries of _chunk3ZUKYLC6js.iterateCursorPages.call(void 0, async (cursor) => {
732
+ for await (const entries of _chunkWJUAVMQCjs.iterateCursorPages.call(void 0, async (cursor) => {
723
733
  pageNumber += 1;
724
734
  console.error(
725
735
  `Fetching page ${pageNumber}; ${summary.row_count} rows written.`
@@ -758,7 +768,7 @@ async function exportLedger(http, outputPath, options) {
758
768
  return summary;
759
769
  }
760
770
  async function handleHistory(options) {
761
- const { http } = _chunkHGQT6EGKjs.getAuthedHttpClient.call(void 0, );
771
+ const { http } = _chunkNNWEQDZRjs.getAuthedHttpClient.call(void 0, );
762
772
  const windows = {
763
773
  "1d": 86400,
764
774
  "1w": 604800,
@@ -770,10 +780,10 @@ async function handleHistory(options) {
770
780
  process.cwd(),
771
781
  "deepline",
772
782
  "data",
773
- _chunkHGQT6EGKjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
783
+ _chunkNNWEQDZRjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
774
784
  );
775
785
  const summary = await exportLedger(http, outputPath, { sinceAt });
776
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
786
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
777
787
  {
778
788
  output_path: outputPath,
779
789
  row_count: summary.row_count,
@@ -810,14 +820,14 @@ async function handleLedgerExportAll(options) {
810
820
  );
811
821
  return;
812
822
  }
813
- const { http } = _chunkHGQT6EGKjs.getAuthedHttpClient.call(void 0, );
823
+ const { http } = _chunkNNWEQDZRjs.getAuthedHttpClient.call(void 0, );
814
824
  const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
815
825
  const summary = await exportLedger(http, outputPath, {
816
826
  sinceAt,
817
827
  runId: options.runId,
818
828
  operation: options.operation
819
829
  });
820
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
830
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
821
831
  {
822
832
  output_path: outputPath,
823
833
  row_count: summary.row_count,
@@ -855,11 +865,11 @@ function planPriceText(priceUsd, priceInterval) {
855
865
  function targetPlanLine(plan) {
856
866
  const firstMonth = plan.first_month_price_usd != null ? ` (first month $${plan.first_month_price_usd})` : "";
857
867
  const bonus = plan.bonus_credits != null ? ` (+${plan.bonus_credits} bonus credits once paid)` : "";
858
- const annual = plan.annual_price_usd != null ? ` (or $${plan.annual_price_usd}/year with --annual${plan.annual_offer_label ? `, ${plan.annual_offer_label}` : ""})` : "";
868
+ const annual = plan.annual_price_usd != null ? ` (or $${plan.annual_price_usd}/year paid annually${plan.annual_offer_label ? `, ${plan.annual_offer_label}` : ""})` : "";
859
869
  return `${_nullishCoalesce(plan.display_name, () => ( plan.name))} (${_nullishCoalesce(plan.public_sku, () => ( plan.sku))}) | ${planPriceText(plan.recurring_price_usd, plan.interval)}${firstMonth}${bonus}${annual} | ${plan.included_credits} included credits/month | $${plan.purchased_credit_price_usd}/purchased credit | ${plan.acquisition_enabled ? "available" : "unavailable"}`;
860
870
  }
861
871
  async function handlePlans(options) {
862
- const client = new (0, _chunkUKSOIH2Pjs.DeeplineClient)();
872
+ const client = new (0, _chunkXFVJ3JNAjs.DeeplineClient)();
863
873
  const payload = await client.billing.targetPlans(
864
874
  options.promoCode ? { promoCode: options.promoCode } : void 0
865
875
  );
@@ -883,10 +893,10 @@ async function handlePlans(options) {
883
893
  promo.status === "applied" ? `Promo code ${promo.code}: applied to ${promoPlanSkus.join(", ")}${promo.expires_at ? ` (until ${promo.expires_at})` : ""}` : `Promo code ${promo.code}: ${promo.status.replaceAll("_", " ")}`
884
894
  ] : [],
885
895
  ...plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...plans.map(targetPlanLine)],
886
- _optionalChain([promo, 'optionalAccess', _15 => _15.status]) === "applied" ? `Change plan: deepline billing change-plan <plan_sku> --promo-code ${promo.code}` : "Change plan: deepline billing change-plan <plan_sku>"
896
+ _optionalChain([promo, 'optionalAccess', _15 => _15.status]) === "applied" ? `Change plan: deepline billing change-plan <plan_sku>, then enter promo code ${promo.code} in the browser` : "Change plan: deepline billing change-plan <plan_sku>"
887
897
  ];
888
- const legacyPayload = _chunkHGQT6EGKjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
889
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
898
+ const legacyPayload = _chunkNNWEQDZRjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
899
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
890
900
  {
891
901
  ..._nullishCoalesce(legacyPayload, () => ( payload)),
892
902
  ...legacyPayload ? { target_billing: payload } : {},
@@ -896,7 +906,7 @@ async function handlePlans(options) {
896
906
  );
897
907
  }
898
908
  async function handleSubscribe(planVersionId, options) {
899
- const { http } = _chunkHGQT6EGKjs.getAuthedHttpClient.call(void 0, );
909
+ const { http } = _chunkNNWEQDZRjs.getAuthedHttpClient.call(void 0, );
900
910
  const payload = await http.request(
901
911
  "/api/v2/billing/subscription/checkout",
902
912
  {
@@ -905,8 +915,8 @@ async function handleSubscribe(planVersionId, options) {
905
915
  }
906
916
  );
907
917
  const url = String(payload.checkout_url || "");
908
- if (!options.json && options.open !== false && url) _chunkHGQT6EGKjs.openInBrowser.call(void 0, url);
909
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
918
+ if (!options.json && options.open !== false && url) _chunkNNWEQDZRjs.openInBrowser.call(void 0, url);
919
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
910
920
  {
911
921
  ...payload,
912
922
  render: {
@@ -922,7 +932,7 @@ async function handleSubscribe(planVersionId, options) {
922
932
  );
923
933
  }
924
934
  async function handleSubscriptionStatus(options) {
925
- const client = new (0, _chunkUKSOIH2Pjs.DeeplineClient)();
935
+ const client = new (0, _chunkXFVJ3JNAjs.DeeplineClient)();
926
936
  const payload = await client.billing.subscription.status();
927
937
  const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
928
938
  const lines = [
@@ -942,7 +952,7 @@ async function handleSubscriptionStatus(options) {
942
952
  ],
943
953
  `Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
944
954
  ];
945
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
955
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
946
956
  {
947
957
  ...payload,
948
958
  render: { sections: [{ title: "billing subscription", lines }] }
@@ -951,7 +961,7 @@ async function handleSubscriptionStatus(options) {
951
961
  );
952
962
  }
953
963
  async function handleSubscriptionCancel(options) {
954
- const client = new (0, _chunkUKSOIH2Pjs.DeeplineClient)();
964
+ const client = new (0, _chunkXFVJ3JNAjs.DeeplineClient)();
955
965
  const action = options.undo ? "undo_cancel" : "cancel";
956
966
  if (options.dryRun) {
957
967
  const status = await client.billing.subscription.status();
@@ -968,7 +978,7 @@ async function handleSubscriptionCancel(options) {
968
978
  return;
969
979
  }
970
980
  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.";
971
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
981
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
972
982
  {
973
983
  ok: true,
974
984
  dry_run: true,
@@ -1024,7 +1034,7 @@ async function handleSubscriptionCancel(options) {
1024
1034
  "Remaining credits are yours to keep \u2014 cancellation never removes credits.",
1025
1035
  "Undo with: deepline billing subscription cancel --undo"
1026
1036
  ];
1027
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1037
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1028
1038
  {
1029
1039
  ok: true,
1030
1040
  ...result,
@@ -1078,7 +1088,7 @@ async function handleInvoices(options) {
1078
1088
  return;
1079
1089
  }
1080
1090
  }
1081
- const client = new (0, _chunkUKSOIH2Pjs.DeeplineClient)();
1091
+ const client = new (0, _chunkXFVJ3JNAjs.DeeplineClient)();
1082
1092
  let payload;
1083
1093
  try {
1084
1094
  payload = await client.billing.invoices.list(
@@ -1107,7 +1117,7 @@ async function handleInvoices(options) {
1107
1117
  url: entry.url
1108
1118
  }))
1109
1119
  } : { ...payload, count: entries.length };
1110
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1120
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1111
1121
  {
1112
1122
  ...envelope,
1113
1123
  render: { sections: [{ title: "billing invoices", lines }] }
@@ -1116,7 +1126,7 @@ async function handleInvoices(options) {
1116
1126
  );
1117
1127
  }
1118
1128
  async function handleCheckout(options) {
1119
- const { http } = _chunkHGQT6EGKjs.getAuthedHttpClient.call(void 0, );
1129
+ const { http } = _chunkNNWEQDZRjs.getAuthedHttpClient.call(void 0, );
1120
1130
  const payload = await http.post(
1121
1131
  "/api/v2/billing/checkout",
1122
1132
  {
@@ -1126,8 +1136,8 @@ async function handleCheckout(options) {
1126
1136
  }
1127
1137
  );
1128
1138
  const url = String(payload.url || payload.checkout_url || "");
1129
- if (!options.json && !options.noOpen && url) _chunkHGQT6EGKjs.openInBrowser.call(void 0, url);
1130
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1139
+ if (!options.json && !options.noOpen && url) _chunkNNWEQDZRjs.openInBrowser.call(void 0, url);
1140
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1131
1141
  {
1132
1142
  ...payload,
1133
1143
  render: {
@@ -1172,7 +1182,7 @@ async function handleTopUp(creditsRaw, options) {
1172
1182
  return;
1173
1183
  }
1174
1184
  if (options.dryRun) {
1175
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1185
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1176
1186
  {
1177
1187
  ok: true,
1178
1188
  dry_run: true,
@@ -1202,7 +1212,7 @@ async function handleTopUp(creditsRaw, options) {
1202
1212
  );
1203
1213
  return;
1204
1214
  }
1205
- const client = new (0, _chunkUKSOIH2Pjs.DeeplineClient)();
1215
+ const client = new (0, _chunkXFVJ3JNAjs.DeeplineClient)();
1206
1216
  let payload;
1207
1217
  try {
1208
1218
  payload = await client.billing.topUpWithReceipt({
@@ -1219,7 +1229,7 @@ async function handleTopUp(creditsRaw, options) {
1219
1229
  return;
1220
1230
  }
1221
1231
  if (payload.status === "pending") {
1222
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1232
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1223
1233
  {
1224
1234
  ok: true,
1225
1235
  ...payload,
@@ -1283,17 +1293,17 @@ async function handleTopUp(creditsRaw, options) {
1283
1293
  ]
1284
1294
  }
1285
1295
  };
1286
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
1296
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
1287
1297
  json: options.json
1288
1298
  });
1289
1299
  }
1290
1300
  async function handleTargetStatus(options) {
1291
- const client = new (0, _chunkUKSOIH2Pjs.DeeplineClient)();
1301
+ const client = new (0, _chunkXFVJ3JNAjs.DeeplineClient)();
1292
1302
  const payload = await client.billing.targetStatus();
1293
1303
  const balanceCommand = "deepline billing balance";
1294
1304
  const recentChargesCommand = "deepline billing usage --limit 5";
1295
1305
  const exactChargeCommand = "deepline billing usage --request-id <job_id>";
1296
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1306
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1297
1307
  {
1298
1308
  ok: true,
1299
1309
  ...payload,
@@ -1331,13 +1341,13 @@ function formatComputeAmount(minutes, credits) {
1331
1341
  return `${time} ${minutes === 1 ? "minute" : "minutes"} (${cost} ${credits === 1 ? "credit" : "credits"})`;
1332
1342
  }
1333
1343
  async function handleIncludedCompute(options) {
1334
- const client = new (0, _chunkUKSOIH2Pjs.DeeplineClient)();
1344
+ const client = new (0, _chunkXFVJ3JNAjs.DeeplineClient)();
1335
1345
  const payload = options.enable ? await client.billing.enableIncludedCompute({ includeOverage: true }) : await client.billing.includedCompute({ includeOverage: true });
1336
1346
  const rate = _nullishCoalesce(payload.credits_per_minute, () => ( 0));
1337
1347
  const includedCredits = _nullishCoalesce(payload.included_credits_used, () => ( payload.included_minutes_used * rate));
1338
1348
  const includedMinutes = payload.included_credits_used !== void 0 && rate > 0 ? includedCredits / rate : payload.included_minutes_used;
1339
1349
  const overage = payload.overage_credits;
1340
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1350
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1341
1351
  {
1342
1352
  ok: true,
1343
1353
  ...payload,
@@ -1355,7 +1365,7 @@ async function handleIncludedCompute(options) {
1355
1365
  ] : [],
1356
1366
  `Standard sandbox price: ${formatComputeAmount(60, Math.round(rate * 60))}`,
1357
1367
  `Allowance resets: ${payload.period_end_at.slice(0, 10)} (UTC)`,
1358
- _chunkMXPCTF57js.PLAY_RUNTIME_PRICING_NOTE,
1368
+ _chunkAZTQJJH7js.PLAY_RUNTIME_PRICING_NOTE,
1359
1369
  _chunkTJCENACZjs.PRICING_PAGE_NOTE
1360
1370
  ] : payload.status === "off" ? [
1361
1371
  ..._optionalChain([payload, 'access', _21 => _21.database, 'optionalAccess', _22 => _22.enabled]) ? [
@@ -1364,7 +1374,7 @@ async function handleIncludedCompute(options) {
1364
1374
  "Included compute: off; Play compute is billed at provider cost.",
1365
1375
  `Allowance if enabled: ${formatComputeAmount(payload.plan.included_minutes, payload.plan.included_minutes * payload.plan.credits_per_minute)} per month`,
1366
1376
  `Standard sandbox price if enabled: ${formatComputeAmount(60, Math.round(payload.plan.credits_per_minute * 60))}`,
1367
- _chunkMXPCTF57js.PLAY_RUNTIME_PRICING_NOTE,
1377
+ _chunkAZTQJJH7js.PLAY_RUNTIME_PRICING_NOTE,
1368
1378
  "Run deepline billing compute --enable to turn on included compute. It cannot be turned off again.",
1369
1379
  _chunkTJCENACZjs.PRICING_PAGE_NOTE
1370
1380
  ] : ["Included compute is not available for this org yet."]
@@ -1376,8 +1386,8 @@ async function handleIncludedCompute(options) {
1376
1386
  );
1377
1387
  }
1378
1388
  async function handleEntitlements(options) {
1379
- const payload = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.entitlements();
1380
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1389
+ const payload = await new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.entitlements();
1390
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1381
1391
  {
1382
1392
  ok: true,
1383
1393
  ...payload,
@@ -1387,7 +1397,7 @@ async function handleEntitlements(options) {
1387
1397
  title: "billing entitlements",
1388
1398
  lines: [
1389
1399
  `Plan: ${_nullishCoalesce(_optionalChain([payload, 'access', _23 => _23.plan, 'optionalAccess', _24 => _24.name]), () => ( "Legacy billing"))}`,
1390
- ..._chunkG7PH2QVMjs.concurrentRunsLine.call(void 0, payload) ? [`Concurrent runs: ${_chunkG7PH2QVMjs.concurrentRunsLine.call(void 0, payload)}`] : [],
1400
+ ..._chunkPFNYLTCZjs.concurrentRunsLine.call(void 0, payload) ? [`Concurrent runs: ${_chunkPFNYLTCZjs.concurrentRunsLine.call(void 0, payload)}`] : [],
1391
1401
  ...Object.entries(payload.benefits).flatMap(
1392
1402
  ([key, grant]) => "value" in grant ? [
1393
1403
  `${key}: ${grant.status}, ${JSON.stringify(grant.value)}${grant.expiresAt === void 0 ? "" : `, expires ${new Date(grant.expiresAt).toISOString()}`}`
@@ -1412,7 +1422,7 @@ async function handleEntitlements(options) {
1412
1422
  );
1413
1423
  }
1414
1424
  async function handleAutoRechargeStatus(options) {
1415
- const payload = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.autoRecharge.get();
1425
+ const payload = await new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.autoRecharge.get();
1416
1426
  const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
1417
1427
  const lines = [
1418
1428
  `State: ${state}`,
@@ -1422,7 +1432,7 @@ async function handleAutoRechargeStatus(options) {
1422
1432
  `Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
1423
1433
  ] : []
1424
1434
  ];
1425
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1435
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1426
1436
  {
1427
1437
  ok: true,
1428
1438
  ...payload,
@@ -1471,7 +1481,7 @@ async function handleAutoRechargeSet(options) {
1471
1481
  }
1472
1482
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1473
1483
  if (options.dryRun) {
1474
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1484
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1475
1485
  {
1476
1486
  ok: true,
1477
1487
  dry_run: true,
@@ -1492,7 +1502,7 @@ async function handleAutoRechargeSet(options) {
1492
1502
  );
1493
1503
  return;
1494
1504
  }
1495
- const payload = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.autoRecharge.update({
1505
+ const payload = await new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.autoRecharge.update({
1496
1506
  enabled: true,
1497
1507
  thresholdCredits,
1498
1508
  refillToCredits,
@@ -1500,7 +1510,7 @@ async function handleAutoRechargeSet(options) {
1500
1510
  ...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
1501
1511
  idempotencyKey
1502
1512
  });
1503
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1513
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1504
1514
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1505
1515
  { json: options.json }
1506
1516
  );
@@ -1508,7 +1518,7 @@ async function handleAutoRechargeSet(options) {
1508
1518
  async function handleAutoRechargeOff(options) {
1509
1519
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1510
1520
  if (options.dryRun) {
1511
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1521
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1512
1522
  {
1513
1523
  ok: true,
1514
1524
  dry_run: true,
@@ -1523,11 +1533,11 @@ async function handleAutoRechargeOff(options) {
1523
1533
  );
1524
1534
  return;
1525
1535
  }
1526
- const payload = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.autoRecharge.update({
1536
+ const payload = await new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.autoRecharge.update({
1527
1537
  enabled: false,
1528
1538
  idempotencyKey
1529
1539
  });
1530
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1540
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1531
1541
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1532
1542
  { json: options.json }
1533
1543
  );
@@ -1553,18 +1563,18 @@ function savedCardLines(cards, hasMore) {
1553
1563
  async function handleCardsList(options) {
1554
1564
  const limit = options.limit === void 0 ? void 0 : Number(options.limit);
1555
1565
  if (limit !== void 0 && (!Number.isInteger(limit) || limit < 1 || limit > 100)) {
1556
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1566
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1557
1567
  { ok: false, error: "--limit must be a whole number from 1 to 100." },
1558
1568
  { json: options.json }
1559
1569
  );
1560
1570
  process.exitCode = 1;
1561
1571
  return;
1562
1572
  }
1563
- const payload = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.cards.list({
1573
+ const payload = await new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.cards.list({
1564
1574
  ...limit !== void 0 ? { limit } : {},
1565
1575
  ...options.cursor ? { cursor: options.cursor } : {}
1566
1576
  });
1567
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1577
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1568
1578
  {
1569
1579
  ok: true,
1570
1580
  ...payload,
@@ -1582,8 +1592,8 @@ async function handleCardsList(options) {
1582
1592
  }
1583
1593
  async function handleCardsAdd(options) {
1584
1594
  const makeDefault = options.makeDefault === true;
1585
- const payload = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.cards.add({ makeDefault });
1586
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1595
+ const payload = await new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.cards.add({ makeDefault });
1596
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1587
1597
  {
1588
1598
  ok: true,
1589
1599
  make_default: makeDefault,
@@ -1608,7 +1618,7 @@ async function handleCardChange(action, cardId, options) {
1608
1618
  const changeId = _nullishCoalesce(options.changeId, () => ( _crypto.randomUUID.call(void 0, )));
1609
1619
  const path = `/api/v2/billing/payment-methods/${action}`;
1610
1620
  if (options.dryRun) {
1611
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1621
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1612
1622
  {
1613
1623
  ok: true,
1614
1624
  dry_run: true,
@@ -1623,9 +1633,9 @@ async function handleCardChange(action, cardId, options) {
1623
1633
  );
1624
1634
  return;
1625
1635
  }
1626
- const cards = new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.cards;
1636
+ const cards = new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.cards;
1627
1637
  const payload = action === "default" ? await cards.setDefault({ cardId, changeId }) : await cards.remove({ cardId, changeId });
1628
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1638
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1629
1639
  {
1630
1640
  ...payload,
1631
1641
  render: {
@@ -1659,11 +1669,11 @@ async function handleBuyCredits(creditsRaw, options) {
1659
1669
  return;
1660
1670
  }
1661
1671
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1662
- const payload = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.purchaseCredits({
1672
+ const payload = await new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.purchaseCredits({
1663
1673
  credits,
1664
1674
  idempotencyKey
1665
1675
  });
1666
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1676
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1667
1677
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1668
1678
  { json: options.json }
1669
1679
  );
@@ -1699,7 +1709,7 @@ async function handleTopUpRecover(creditsRaw, options) {
1699
1709
  return;
1700
1710
  }
1701
1711
  if (options.dryRun) {
1702
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1712
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1703
1713
  {
1704
1714
  ok: true,
1705
1715
  dry_run: true,
@@ -1712,62 +1722,57 @@ async function handleTopUpRecover(creditsRaw, options) {
1712
1722
  );
1713
1723
  return;
1714
1724
  }
1715
- const payload = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.recoverCreditPurchase({
1725
+ const payload = await new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.recoverCreditPurchase({
1716
1726
  credits,
1717
1727
  orgId: options.orgId,
1718
1728
  idempotencyKey: options.idempotencyKey
1719
1729
  });
1720
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1730
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1721
1731
  { ok: true, idempotency_key: options.idempotencyKey, ...payload },
1722
1732
  { json: options.json }
1723
1733
  );
1724
1734
  }
1725
1735
  async function handleTargetPlan(planSku, options) {
1726
- if (options.invoice && !options.billingEmail) {
1727
- reportBillingFailure(
1728
- {
1729
- exitCode: 2,
1730
- code: "INVALID_REQUEST",
1731
- message: "--invoice needs --billing-email <email>."
1732
- },
1733
- options
1734
- );
1735
- return;
1736
- }
1737
- const targetPlanSku = _nullishCoalesce([..._chunk3ZUKYLC6js.PUBLIC_PLAN_SKUS, ...COMPATIBLE_PLAN_SKUS].find(
1736
+ const targetPlanSku = planSku === void 0 ? void 0 : [..._chunkWJUAVMQCjs.PUBLIC_PLAN_SKUS, ...COMPATIBLE_PLAN_SKUS].find(
1738
1737
  (sku) => sku === planSku
1739
- ), () => ( // Retained Canary requests may replay their original operation. The API
1740
- // rejects new acquisition even when a caller supplies an idempotency key.
1741
- (planSku === "growth-canary-v1" && options.idempotencyKey ? planSku : void 0)));
1742
- if (!targetPlanSku) {
1738
+ );
1739
+ if (planSku !== void 0 && !targetPlanSku) {
1743
1740
  reportBillingFailure(
1744
1741
  {
1745
1742
  exitCode: 2,
1746
1743
  code: "INVALID_PLAN",
1747
- message: `Plan must be one of ${_chunk3ZUKYLC6js.PUBLIC_PLAN_SKUS.join(", ")}. Run deepline billing plans to see workspace availability.`
1744
+ message: `Plan must be one of ${_chunkWJUAVMQCjs.PUBLIC_PLAN_SKUS.join(", ")}. Run deepline billing plans to see workspace availability.`
1748
1745
  },
1749
1746
  options
1750
1747
  );
1751
1748
  return;
1752
1749
  }
1753
- const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1754
- const payload = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.transitionPlan({
1755
- action: "start_or_change",
1756
- targetPlanSku,
1757
- ...options.billingEmail ? { billingEmail: options.billingEmail } : {},
1758
- ...options.promoCode ? { promoCode: options.promoCode } : {},
1759
- ...options.annual ? { billingInterval: "year" } : {},
1760
- ...options.invoice ? { paymentMethod: "invoice" } : {},
1761
- idempotencyKey
1762
- });
1763
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1764
- { ok: true, idempotency_key: idempotencyKey, ...payload },
1750
+ const baseUrl = _chunk2ZCFAUCVjs.resolveBaseUrlOnly.call(void 0, );
1751
+ const link = _chunkMOZDEYQCjs.buildDashboardUrl.call(void 0,
1752
+ baseUrl,
1753
+ targetPlanSku ? `/dashboard/billing?plan=${encodeURIComponent(_chunkWJUAVMQCjs.resolvePublicPlanSku.call(void 0, targetPlanSku))}` : "/dashboard/billing?plan",
1754
+ _chunk2ZCFAUCVjs.resolveCliDashboardOrgId.call(void 0, baseUrl)
1755
+ );
1756
+ if (!options.json && options.open !== false) _chunkNNWEQDZRjs.openInBrowser.call(void 0, link);
1757
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1758
+ {
1759
+ ok: true,
1760
+ url: link,
1761
+ render: {
1762
+ sections: [
1763
+ {
1764
+ title: "billing change-plan",
1765
+ lines: [`Open this link to choose and confirm the plan: ${link}`]
1766
+ }
1767
+ ]
1768
+ }
1769
+ },
1765
1770
  { json: options.json }
1766
1771
  );
1767
1772
  }
1768
1773
  async function handleBillingDetailsShow(options) {
1769
- const payload = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.getDetails();
1770
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
1774
+ const payload = await new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.getDetails();
1775
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
1771
1776
  }
1772
1777
  async function handleBillingDetailsSet(options) {
1773
1778
  const separator = _nullishCoalesce(_optionalChain([options, 'access', _28 => _28.taxId, 'optionalAccess', _29 => _29.indexOf, 'call', _30 => _30(":")]), () => ( -1));
@@ -1784,7 +1789,7 @@ async function handleBillingDetailsSet(options) {
1784
1789
  );
1785
1790
  return;
1786
1791
  }
1787
- const payload = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.setDetails({
1792
+ const payload = await new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.setDetails({
1788
1793
  ...options.name !== void 0 ? { name: options.name } : {},
1789
1794
  ...options.line1 !== void 0 ? {
1790
1795
  address: {
@@ -1803,28 +1808,28 @@ async function handleBillingDetailsSet(options) {
1803
1808
  }
1804
1809
  } : {}
1805
1810
  });
1806
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
1811
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
1807
1812
  }
1808
1813
  async function handleTargetPlanCancellation(options) {
1809
1814
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1810
- const payload = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.transitionPlan({
1815
+ const payload = await new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.transitionPlan({
1811
1816
  action: options.undo ? "undo_cancel" : "cancel",
1812
1817
  idempotencyKey
1813
1818
  });
1814
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1819
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1815
1820
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1816
1821
  { json: options.json }
1817
1822
  );
1818
1823
  }
1819
1824
  async function handleTargetPortal(options) {
1820
- const payload = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.portalSession(
1825
+ const payload = await new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.portalSession(
1821
1826
  options.billingAddress ? { flow: "customer_update" } : void 0
1822
1827
  );
1823
- if (!options.json && !options.noOpen) _chunkHGQT6EGKjs.openInBrowser.call(void 0, payload.url);
1824
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
1828
+ if (!options.json && !options.noOpen) _chunkNNWEQDZRjs.openInBrowser.call(void 0, payload.url);
1829
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
1825
1830
  }
1826
1831
  async function handleRedeemCode(code, options) {
1827
- const { http } = _chunkHGQT6EGKjs.getAuthedHttpClient.call(void 0, );
1832
+ const { http } = _chunkNNWEQDZRjs.getAuthedHttpClient.call(void 0, );
1828
1833
  const payload = await http.post(
1829
1834
  "/api/v2/billing/checkout",
1830
1835
  {
@@ -1832,8 +1837,8 @@ async function handleRedeemCode(code, options) {
1832
1837
  }
1833
1838
  );
1834
1839
  const url = String(payload.url || payload.checkout_url || "");
1835
- if (!options.json && !options.noOpen && url) _chunkHGQT6EGKjs.openInBrowser.call(void 0, url);
1836
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1840
+ if (!options.json && !options.noOpen && url) _chunkNNWEQDZRjs.openInBrowser.call(void 0, url);
1841
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1837
1842
  {
1838
1843
  ...payload,
1839
1844
  render: {
@@ -1894,14 +1899,14 @@ Examples:
1894
1899
  if (!Number.isSafeInteger(quantity) || quantity <= 0) {
1895
1900
  throw new Error("--quantity must be a positive safe integer.");
1896
1901
  }
1897
- const quote = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.quote({
1902
+ const quote = await new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.quote({
1898
1903
  quantity,
1899
1904
  sandbox_runtime: {
1900
1905
  timeout: options.sandboxTimeout,
1901
1906
  size: options.sandboxSize
1902
1907
  }
1903
1908
  });
1904
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0, quote, {
1909
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0, quote, {
1905
1910
  json: options.json,
1906
1911
  text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
1907
1912
  ${quote.explanation}
@@ -1930,9 +1935,9 @@ Examples:
1930
1935
  billing.command("reuse").description(
1931
1936
  "Show recorded reused tool results for this org; no credit estimate."
1932
1937
  ).option("--json", "Return the org reuse summary as JSON").action(async (options) => {
1933
- const { http } = _chunkHGQT6EGKjs.getAuthedHttpClient.call(void 0, );
1938
+ const { http } = _chunkNNWEQDZRjs.getAuthedHttpClient.call(void 0, );
1934
1939
  const payload = await http.get("/api/v2/usage/reuse");
1935
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0,
1940
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0,
1936
1941
  {
1937
1942
  status: "ok",
1938
1943
  data: payload,
@@ -2173,8 +2178,8 @@ Examples:
2173
2178
  new (0, _commander.Command)("trigger").description(
2174
2179
  "Evaluate capped automatic recharge and resume any pending purchase."
2175
2180
  ).option("--json", "Emit JSON output").action(async (options) => {
2176
- const result = await new (0, _chunkUKSOIH2Pjs.DeeplineClient)().billing.autoRecharge.trigger();
2177
- _chunkHGQT6EGKjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
2181
+ const result = await new (0, _chunkXFVJ3JNAjs.DeeplineClient)().billing.autoRecharge.trigger();
2182
+ _chunkNNWEQDZRjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
2178
2183
  })
2179
2184
  );
2180
2185
  billing.command("cards").description("List, add, choose the default of, and remove saved cards.").addHelpText(
@@ -2206,22 +2211,25 @@ Examples:
2206
2211
  (cardId, options) => handleCardChange("remove", cardId, options)
2207
2212
  )
2208
2213
  );
2209
- billing.command("change-plan").description("Start or change the target billing plan.").argument(
2210
- "<plan_sku>",
2211
- `${_chunk3ZUKYLC6js.PUBLIC_PLAN_SKUS.join(", ")}. Run deepline billing plans to see workspace availability.`
2212
- ).option(
2213
- "--billing-email <email>",
2214
- "Invoice recipient: required with --invoice, otherwise used when the account has no billing email"
2215
- ).option(
2216
- "--promo-code <code>",
2217
- "Plan promo code; an unknown, expired, or used code refuses the change"
2218
- ).option(
2219
- "--annual",
2220
- "Pay for a year up front where `billing plans` shows an annual price; credits stay monthly and a cancellation takes effect at the end of the paid year"
2221
- ).option(
2222
- "--invoice",
2223
- "Email an invoice to --billing-email instead of charging a card (monthly or with --annual, starting from Solo); the plan starts once it is paid (due in 27 days). Set company name, address and tax ID first with `billing details set`"
2224
- ).option("--idempotency-key <key>", "Stable retry key").option("--json", "Emit JSON output").action(handleTargetPlan);
2214
+ billing.command("change-plan").description(
2215
+ "Print and open a billing page link with the plan dialog open; the plan changes only once you confirm it in the browser."
2216
+ ).addHelpText(
2217
+ "after",
2218
+ `
2219
+ Notes:
2220
+ Makes no change itself. A named plan opens its confirmation in the browser;
2221
+ without one, the plan picker opens. Annual billing and promo codes are
2222
+ chosen in the browser. Agents: give the user the printed link.
2223
+
2224
+ Examples:
2225
+ deepline billing change-plan
2226
+ deepline billing change-plan team
2227
+ deepline billing change-plan scale --no-open
2228
+ `
2229
+ ).argument(
2230
+ "[plan_sku]",
2231
+ `${_chunkWJUAVMQCjs.PUBLIC_PLAN_SKUS.join(", ")}. Opens that plan's confirmation; omit to open the plan picker.`
2232
+ ).option("--no-open", "Print the link without opening a browser").option("--json", "Emit JSON output").action(handleTargetPlan);
2225
2233
  const details = billing.command("details").description(
2226
2234
  "Show the company name, billing address and tax ID printed on invoices."
2227
2235
  ).option("--json", "Emit JSON output").action(handleBillingDetailsShow);
@@ -2240,15 +2248,12 @@ Notes:
2240
2248
  Read-only. Shows the current target billing plan, pending plan, and every
2241
2249
  visible plan's recurring price, included credits, purchased-credit price,
2242
2250
  and current acquisition availability. All amounts are Deepline credits and
2243
- Deepline-facing USD, never raw provider spend. Change to an available plan
2244
- with: deepline billing change-plan <plan_sku>. A first-month price or bonus
2245
- credits appear on a plan when the org is offered them. An annual
2246
- price appears when the org may pay for a year up front; buy it with
2247
- change-plan <plan_sku> --annual. Where offered, any plan can be invoiced
2248
- instead of charged: add --invoice --billing-email <email> (billing details set adds the company
2249
- name, address and tax ID). With
2250
- --promo-code, prices are quoted with that code and its outcome is shown;
2251
- pass the same code to change-plan.
2251
+ Deepline-facing USD, never raw provider spend. Get a link to change to an
2252
+ available plan with: deepline billing change-plan <plan_sku>. A first-month
2253
+ price or bonus credits appear on a plan when the org is offered them. An
2254
+ annual price appears when the org may pay for a year up front; choose it in
2255
+ the browser. With --promo-code, prices are quoted with that code and its
2256
+ outcome is shown; enter the same code in the browser.
2252
2257
 
2253
2258
  Examples:
2254
2259
  deepline billing plans