deepline 0.3.537 → 0.3.539

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 (205) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +22 -5
  2. package/dist/bundling-sources/sdk/src/index.ts +2 -0
  3. package/dist/bundling-sources/sdk/src/plays/client-core.ts +18 -1
  4. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  5. package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +33 -4
  6. package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +1 -1
  7. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
  8. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +9 -1
  9. package/dist/bundling-sources/shared_libs/play-runtime/baked-runner-image.ts +392 -0
  10. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +717 -133
  11. package/dist/bundling-sources/shared_libs/play-runtime/coordinator-headers.ts +7 -0
  12. package/dist/bundling-sources/shared_libs/play-runtime/daytona-payload-contract.ts +22 -1
  13. package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +123 -0
  14. package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +480 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/fixture-egress-fetch.ts +24 -16
  16. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +293 -53
  17. package/dist/bundling-sources/shared_libs/play-runtime/governor/block-reserving-budget-state-backend.ts +57 -2
  18. package/dist/bundling-sources/shared_libs/play-runtime/governor/budget-state-backend.ts +43 -0
  19. package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +141 -9
  20. package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +4 -0
  21. package/dist/bundling-sources/shared_libs/play-runtime/modal-runtime-config.ts +6 -0
  22. package/dist/bundling-sources/shared_libs/play-runtime/modal-supervisor-sidecar.ts +556 -0
  23. package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +27 -0
  24. package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +19 -0
  25. package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +54 -0
  26. package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +5 -0
  27. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +155 -7
  28. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/relay-connection-counter.ts +103 -0
  29. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +75 -6
  30. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +59 -0
  31. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +544 -73
  32. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-runtime-watchdog.ts +8 -1
  33. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/detached-runner-readiness-pacing.ts +19 -1
  34. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +2399 -110
  35. package/dist/bundling-sources/shared_libs/play-runtime/runtime-flow.ts +42 -8
  36. package/dist/bundling-sources/shared_libs/play-runtime/runtime-read-through.ts +287 -0
  37. package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-finish.ts +606 -0
  38. package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-writer.ts +274 -119
  39. package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +136 -0
  40. package/dist/bundling-sources/shared_libs/play-runtime/runtime-traffic-policy.ts +54 -0
  41. package/dist/bundling-sources/shared_libs/play-runtime/runtime-work-counters.ts +10 -1
  42. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +22 -0
  43. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-play-run-task.ts +18 -1
  44. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +18 -4
  45. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +219 -7
  46. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +3 -0
  47. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-claim-affinity.ts +340 -0
  48. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +1 -0
  49. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +10 -1
  50. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +623 -7
  51. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +340 -5
  52. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runner-push.ts +61 -0
  53. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +2 -1
  54. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +269 -2
  55. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +238 -5
  56. package/dist/bundling-sources/shared_libs/play-runtime/startup-read-tool-ids.ts +47 -0
  57. package/dist/bundling-sources/shared_libs/play-runtime/tool-call/runtime-step-receipts-adapter.ts +5 -4
  58. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +6 -0
  59. package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +11 -0
  60. package/dist/cli/auth-O5Y2VYXK.js +43 -0
  61. package/dist/cli/{auth-4SUPGDIM.mjs → auth-QD7QGD3B.mjs} +5 -5
  62. package/dist/cli/{billing-5JUA3ZM3.mjs → billing-FIZXMHBW.mjs} +31 -7
  63. package/dist/cli/{billing-SQU726P7.js → billing-KOQAF6WS.js} +114 -90
  64. package/dist/cli/{chunk-R7JYG6XO.mjs → chunk-2XMFT44N.mjs} +1 -1
  65. package/dist/cli/{chunk-XDS26J7Z.js → chunk-3YDI2PTN.js} +10 -10
  66. package/dist/cli/{chunk-KH27B2HJ.mjs → chunk-55ITVU2V.mjs} +2 -2
  67. package/dist/cli/{chunk-2Q7VXTMS.js → chunk-5QL4GJB2.js} +2 -2
  68. package/dist/cli/{chunk-D77W6Q67.js → chunk-5RUB53KG.js} +26 -26
  69. package/dist/cli/{chunk-JS2SBCWD.js → chunk-5YF35HAV.js} +6 -6
  70. package/dist/cli/{chunk-C37VELBR.mjs → chunk-6KG4KVTH.mjs} +5 -5
  71. package/dist/cli/{chunk-AX2OAXDL.mjs → chunk-6NZBLFL4.mjs} +1 -1
  72. package/dist/cli/{chunk-C3XD2WHM.mjs → chunk-6V3LNYK5.mjs} +2 -2
  73. package/dist/cli/{chunk-GPMS6OPX.mjs → chunk-ADV2IB2C.mjs} +5 -5
  74. package/dist/cli/{chunk-ZUAMXZXC.mjs → chunk-APKZGUTU.mjs} +4 -4
  75. package/dist/cli/{chunk-IQOIT6E3.js → chunk-CQJCLHBE.js} +41 -41
  76. package/dist/cli/{chunk-W3J3LT22.mjs → chunk-DZFVVP3S.mjs} +5 -5
  77. package/dist/cli/{chunk-V5IIBG2E.mjs → chunk-E4QHTDPF.mjs} +1 -1
  78. package/dist/cli/{chunk-CXTW7SRW.mjs → chunk-E7D37PLM.mjs} +8 -0
  79. package/dist/cli/{chunk-KULT6O5K.js → chunk-EAZS52DL.js} +15 -15
  80. package/dist/cli/{chunk-L3JVGNAT.mjs → chunk-F43MXIN3.mjs} +2 -2
  81. package/dist/cli/{chunk-WBTYWJLN.js → chunk-FH3P3E4S.js} +2 -2
  82. package/dist/cli/{chunk-K4WJ4BYO.mjs → chunk-FIRV7BXJ.mjs} +1 -1
  83. package/dist/cli/{chunk-NXGLJGPB.js → chunk-FSQCB5SJ.js} +2 -2
  84. package/dist/cli/{chunk-AVQET3NR.js → chunk-FTBWFDF3.js} +7 -7
  85. package/dist/cli/{chunk-QDBGPRR2.mjs → chunk-G3UFDUYU.mjs} +3 -1
  86. package/dist/cli/{chunk-ZHPSJ3LJ.mjs → chunk-GEO2EMM7.mjs} +29 -16
  87. package/dist/cli/{chunk-CGDW2CRR.mjs → chunk-GLEGINSP.mjs} +2 -2
  88. package/dist/cli/{chunk-EEFSUCYP.mjs → chunk-GLKUC5PO.mjs} +2 -2
  89. package/dist/cli/{chunk-BFHR7IC2.mjs → chunk-GNCIMHO2.mjs} +10 -10
  90. package/dist/cli/{chunk-PU42VOBI.js → chunk-ISXX5DUD.js} +3 -3
  91. package/dist/cli/{chunk-Y6AMMXWS.mjs → chunk-JBCQFG7G.mjs} +3 -3
  92. package/dist/cli/{chunk-Z2PPB3IO.mjs → chunk-JHEZQMOM.mjs} +1 -1
  93. package/dist/cli/{chunk-WBFOV5HT.js → chunk-K22EKW6L.js} +5 -5
  94. package/dist/cli/{chunk-CHIGEDAE.js → chunk-K5MZHTK7.js} +3 -3
  95. package/dist/cli/{chunk-L6QAIZNZ.js → chunk-KAEVL62Q.js} +44 -44
  96. package/dist/cli/{chunk-PJ4ZGZAN.js → chunk-KQTX545E.js} +13 -13
  97. package/dist/cli/{chunk-VP2K5B3R.mjs → chunk-LE5KN7CZ.mjs} +3 -3
  98. package/dist/cli/{chunk-BGXEMTIG.js → chunk-LEREPTAE.js} +19 -19
  99. package/dist/cli/{chunk-QPDLG7DQ.js → chunk-MI53W4DN.js} +53 -53
  100. package/dist/cli/{chunk-RMVZTBI5.mjs → chunk-MKESK3SW.mjs} +4 -4
  101. package/dist/cli/{chunk-NU7B5X6J.mjs → chunk-N3LPGGWD.mjs} +1 -1
  102. package/dist/cli/{chunk-VRYX2BR4.js → chunk-NR5PLMNG.js} +107 -107
  103. package/dist/cli/{chunk-JMHYDDBQ.js → chunk-Q4HNK7JX.js} +292 -279
  104. package/dist/cli/{chunk-37AZHCTP.mjs → chunk-RULRGMMM.mjs} +5 -5
  105. package/dist/cli/{chunk-GI3V4D7K.mjs → chunk-SDAP5MCO.mjs} +2 -2
  106. package/dist/cli/{chunk-5EOEJKSV.js → chunk-TZBCJHV6.js} +1 -1
  107. package/dist/cli/{chunk-3PMCQ3LK.js → chunk-V7DEGIYO.js} +7 -5
  108. package/dist/cli/{chunk-ALHKB3AE.js → chunk-VK5UTS5B.js} +9 -9
  109. package/dist/cli/{chunk-ZFSB7GXF.js → chunk-W32KT6LM.js} +5 -5
  110. package/dist/cli/{chunk-6BBGUQJJ.js → chunk-XTYHZEJ2.js} +8 -0
  111. package/dist/cli/{chunk-UGA5KI4A.js → chunk-XZBXQCRJ.js} +22 -22
  112. package/dist/cli/{chunk-BRRCWUOW.mjs → chunk-Y66ZMOJI.mjs} +1 -1
  113. package/dist/cli/{chunk-CFND2ACL.js → chunk-YMQFQO3K.js} +16 -16
  114. package/dist/cli/command-docs.js +2 -2
  115. package/dist/cli/command-docs.mjs +1 -1
  116. package/dist/cli/{csv-JITYN27L.js → csv-BWWJYV2C.js} +13 -13
  117. package/dist/cli/{csv-HZP6QMG7.mjs → csv-G5RQQ74W.mjs} +4 -4
  118. package/dist/cli/{db-FYSRB7O4.js → db-5KNDLADE.js} +27 -27
  119. package/dist/cli/{db-QRIRTOMM.mjs → db-AJZHWB3V.mjs} +6 -6
  120. package/dist/cli/describe-B6CN6CFJ.js +49 -0
  121. package/dist/cli/{describe-REXJVJC3.mjs → describe-QY5TKWVD.mjs} +17 -17
  122. package/dist/cli/describe-core.d.mts +3 -3
  123. package/dist/cli/describe-core.d.ts +3 -3
  124. package/dist/cli/{executions-BSTF4DDS.js → executions-BCCW76BI.js} +8 -8
  125. package/dist/cli/{executions-53KJAFOW.mjs → executions-SJPH3MZT.mjs} +6 -6
  126. package/dist/cli/{feedback-6MW3QOXX.js → feedback-GF65JKK6.js} +14 -14
  127. package/dist/cli/{feedback-CWUJJF3J.mjs → feedback-S6SZOFGK.mjs} +6 -6
  128. package/dist/cli/git-DX6NB7VF.js +25 -0
  129. package/dist/cli/{git-CKVZTJFS.mjs → git-F5FT5YVB.mjs} +5 -5
  130. package/dist/cli/index.js +143 -143
  131. package/dist/cli/index.mjs +42 -42
  132. package/dist/cli/{legacy-noops-QBL4PNGB.js → legacy-noops-ECR6FS6U.js} +9 -9
  133. package/dist/cli/{legacy-noops-USTBRFRX.mjs → legacy-noops-NOA4P5NE.mjs} +6 -6
  134. package/dist/cli/{monitors-6UCG5D7W.mjs → monitors-CTYSAGP4.mjs} +7 -7
  135. package/dist/cli/{monitors-VCR6SUZD.js → monitors-DEWBSURN.js} +100 -100
  136. package/dist/cli/{org-GSRBOJVO.mjs → org-EKSKKT7H.mjs} +6 -6
  137. package/dist/cli/{org-HPILTEG4.js → org-ZM2UUMZZ.js} +86 -86
  138. package/dist/cli/{play-TK7WOP5H.js → play-6JQOM6DE.js} +317 -317
  139. package/dist/cli/{play-QRTYQNG4.mjs → play-R2BH374J.mjs} +17 -17
  140. package/dist/cli/{providers-HEXNJ5QC.js → providers-CMIYHEMN.js} +9 -9
  141. package/dist/cli/{providers-OAQJWVBS.mjs → providers-X7WMIWO4.mjs} +6 -6
  142. package/dist/cli/{quickstart-PYZTFXZX.js → quickstart-6HVPAMSW.js} +6 -6
  143. package/dist/cli/{quickstart-FFVHTPSP.mjs → quickstart-ZZ7L6VZJ.mjs} +4 -4
  144. package/dist/cli/{run-HLN6YYZH.mjs → run-FP32RKBU.mjs} +22 -22
  145. package/dist/cli/{run-4DWJXJRO.js → run-OOHYH3GI.js} +42 -42
  146. package/dist/cli/search-34C6LFOJ.js +32 -0
  147. package/dist/cli/{search-ZHRCXGEL.mjs → search-BDDNC23Z.mjs} +7 -7
  148. package/dist/cli/{search-output-2KY6PFDH.js → search-output-5VZIQQAM.js} +6 -6
  149. package/dist/cli/{search-output-N7QXACVK.mjs → search-output-QXJ6CV5G.mjs} +4 -4
  150. package/dist/cli/{secrets-WXQ7XO5C.js → secrets-EN2HQCO3.js} +15 -15
  151. package/dist/cli/{secrets-FKMWBLHU.mjs → secrets-Z7CQSQGC.mjs} +6 -6
  152. package/dist/cli/{sessions-3YDTEDA5.mjs → sessions-I2H37OTJ.mjs} +6 -6
  153. package/dist/cli/sessions-RYQX3NDD.js +22 -0
  154. package/dist/cli/{settings-67TWLQ6E.js → settings-CTRAPFNZ.js} +85 -85
  155. package/dist/cli/{settings-JTPASUZN.mjs → settings-IYSC5PPQ.mjs} +12 -12
  156. package/dist/cli/{setup-VYNGXUJ6.mjs → setup-PU3HOVI3.mjs} +9 -9
  157. package/dist/cli/{setup-KUERQJUX.js → setup-XIN53GEW.js} +49 -49
  158. package/dist/cli/skills-576CX7DK.js +36 -0
  159. package/dist/cli/{skills-KI4KYHH6.mjs → skills-TYBML2ZO.mjs} +7 -7
  160. package/dist/cli/tools-EXMUWA3Z.js +56 -0
  161. package/dist/cli/{tools-UQDJS2RS.mjs → tools-ZVNE6M6J.mjs} +16 -16
  162. package/dist/cli/{update-7FQQUBOD.mjs → update-54WENBNT.mjs} +9 -9
  163. package/dist/cli/update-RAHETNL2.js +34 -0
  164. package/dist/cli/{views-MJK7JGZG.js → views-7L75EZOJ.js} +21 -21
  165. package/dist/cli/{views-JAM4MNNV.mjs → views-EUBB4ONT.mjs} +6 -6
  166. package/dist/cli/{workflow-AQPRIWQX.js → workflow-EZVYCR6Y.js} +17 -17
  167. package/dist/cli/{workflow-TQRV5FGO.mjs → workflow-GUKGFJ72.mjs} +7 -7
  168. package/dist/{client-BlLYQDNo.d.mts → client-D0uDBybG.d.mts} +1 -1
  169. package/dist/{client-DSQlkIDO.d.ts → client-DZTnAv4B.d.ts} +1 -1
  170. package/dist/{client-core-rX7n2H8U.d.mts → client-core-BhWf8Y1b.d.mts} +15 -2
  171. package/dist/{client-core-CDwapXy5.d.ts → client-core-og3AP1LL.d.ts} +15 -2
  172. package/dist/{compiler-manifest-BHNC4RL-.d.ts → compiler-manifest-Bes3OVA3.d.mts} +1 -1
  173. package/dist/{compiler-manifest-BHNC4RL-.d.mts → compiler-manifest-Bes3OVA3.d.ts} +1 -1
  174. package/dist/{errors-lhtIWG5Z.d.ts → errors-BJm4lLWc.d.ts} +1 -1
  175. package/dist/{errors-D7sPXrvB.d.mts → errors-Dc5r42ks.d.mts} +1 -1
  176. package/dist/{index-CQTBHXHr.d.ts → index-BfV7mRPF.d.ts} +1 -1
  177. package/dist/{index-NaDZq2xf.d.mts → index-DTkiz_Ur.d.mts} +1 -1
  178. package/dist/index.d.mts +7 -7
  179. package/dist/index.d.ts +7 -7
  180. package/dist/index.js +9 -9
  181. package/dist/index.mjs +6 -6
  182. package/dist/install-integrity.json +121 -112
  183. package/dist/plays/bundle-play-file.d.mts +3 -3
  184. package/dist/plays/bundle-play-file.d.ts +3 -3
  185. package/dist/plays/play-description.d.mts +2 -2
  186. package/dist/plays/play-description.d.ts +2 -2
  187. package/dist/plays/run-request.d.mts +2 -2
  188. package/dist/plays/run-request.d.ts +2 -2
  189. package/dist/release.d.mts +1 -1
  190. package/dist/release.d.ts +1 -1
  191. package/dist/release.js +2 -2
  192. package/dist/release.mjs +1 -1
  193. package/dist/server.d.mts +4 -4
  194. package/dist/server.d.ts +4 -4
  195. package/dist/server.js +5 -5
  196. package/dist/server.mjs +3 -3
  197. package/package.json +1 -1
  198. package/dist/cli/auth-Y2K2ZYYA.js +0 -43
  199. package/dist/cli/describe-LSOHOLFI.js +0 -49
  200. package/dist/cli/git-S7SWUZ3T.js +0 -25
  201. package/dist/cli/search-WERQBC6V.js +0 -32
  202. package/dist/cli/sessions-LXQ4Q6BS.js +0 -22
  203. package/dist/cli/skills-EFRLHY3F.js +0 -36
  204. package/dist/cli/tools-C3EIGFFP.js +0 -56
  205. package/dist/cli/update-KCY72RXH.js +0 -34
@@ -1,17 +1,17 @@
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 _chunkZFSB7GXFjs = require('./chunk-ZFSB7GXF.js');
3
+ var _chunkW32KT6LMjs = require('./chunk-W32KT6LM.js');
4
4
 
5
5
 
6
6
 
7
- var _chunkJMHYDDBQjs = require('./chunk-JMHYDDBQ.js');
7
+ var _chunkQ4HNK7JXjs = require('./chunk-Q4HNK7JX.js');
8
8
  require('./chunk-E4CABWXL.js');
9
9
  require('./chunk-CQDQNZGH.js');
10
10
  require('./chunk-PMH4GLMD.js');
11
11
  require('./chunk-XDVT3GOM.js');
12
12
 
13
13
 
14
- var _chunk6BBGUQJJjs = require('./chunk-6BBGUQJJ.js');
14
+ var _chunkXTYHZEJ2js = require('./chunk-XTYHZEJ2.js');
15
15
  require('./chunk-R7J7CJPZ.js');
16
16
 
17
17
 
@@ -22,9 +22,9 @@ var _chunkYGCKMI5Pjs = require('./chunk-YGCKMI5P.js');
22
22
 
23
23
 
24
24
 
25
- var _chunkBGXEMTIGjs = require('./chunk-BGXEMTIG.js');
26
- require('./chunk-PU42VOBI.js');
27
- require('./chunk-3PMCQ3LK.js');
25
+ var _chunkLEREPTAEjs = require('./chunk-LEREPTAE.js');
26
+ require('./chunk-ISXX5DUD.js');
27
+ require('./chunk-V7DEGIYO.js');
28
28
 
29
29
 
30
30
 
@@ -33,7 +33,7 @@ require('./chunk-XNYIZMNQ.js');
33
33
 
34
34
 
35
35
  var _chunkBBTKAASQjs = require('./chunk-BBTKAASQ.js');
36
- require('./chunk-5EOEJKSV.js');
36
+ require('./chunk-TZBCJHV6.js');
37
37
  require('./chunk-OG64RBAC.js');
38
38
  require('./chunk-COGTRVWW.js');
39
39
 
@@ -82,7 +82,7 @@ function reportBillingFailure(failure, options) {
82
82
  if (failure.next) {
83
83
  textLines.push(`Next: ${failure.next}`);
84
84
  }
85
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
85
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
86
86
  {
87
87
  ok: false,
88
88
  exitCode: failure.exitCode,
@@ -103,7 +103,7 @@ function parseTopUpCredits(raw) {
103
103
  return parsed;
104
104
  }
105
105
  function topUpIdempotencyKey(raw) {
106
- return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunkJMHYDDBQjs.requireBillingIdempotencyKey.call(void 0, raw);
106
+ return raw === void 0 ? `cli_topup:${Date.now()}:${_crypto.randomUUID.call(void 0, )}` : _chunkQ4HNK7JXjs.requireBillingIdempotencyKey.call(void 0, raw);
107
107
  }
108
108
  function targetBillingIdempotencyKey(raw) {
109
109
  return typeof raw === "string" ? raw : `cli_target_billing:${Date.now()}:${_crypto.randomUUID.call(void 0, )}`;
@@ -322,7 +322,7 @@ function defaultLedgerExportPath() {
322
322
  );
323
323
  }
324
324
  async function handleBalance(options) {
325
- const { http } = _chunkBGXEMTIGjs.getAuthedHttpClient.call(void 0, );
325
+ const { http } = _chunkLEREPTAEjs.getAuthedHttpClient.call(void 0, );
326
326
  const payload = await http.get(
327
327
  "/api/v2/billing/balance"
328
328
  );
@@ -406,7 +406,7 @@ async function handleBalance(options) {
406
406
  ...options.verbose ? detail : [],
407
407
  ...lines.slice(1)
408
408
  ];
409
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
409
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
410
410
  {
411
411
  ...payload,
412
412
  ...recovery ? { recovery } : {},
@@ -442,7 +442,7 @@ async function handleUsageEvents(options) {
442
442
  );
443
443
  return;
444
444
  }
445
- const client = new (0, _chunkZFSB7GXFjs.DeeplineClient)();
445
+ const client = new (0, _chunkW32KT6LMjs.DeeplineClient)();
446
446
  let payload;
447
447
  try {
448
448
  payload = await client.billing.usageEvents({
@@ -473,7 +473,7 @@ async function handleUsageEvents(options) {
473
473
  ),
474
474
  ...nextPage ? [`Next page: ${nextPage}`] : []
475
475
  ];
476
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
476
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
477
477
  {
478
478
  ...payload,
479
479
  next: { page: nextPage },
@@ -495,7 +495,7 @@ async function handleUsage(options) {
495
495
  return;
496
496
  }
497
497
  if (options.events) return handleUsageEvents(options);
498
- const { http } = _chunkBGXEMTIGjs.getAuthedHttpClient.call(void 0, );
498
+ const { http } = _chunkLEREPTAEjs.getAuthedHttpClient.call(void 0, );
499
499
  const params = new URLSearchParams();
500
500
  if (options.requestId !== void 0) {
501
501
  const requestId = options.requestId.trim();
@@ -579,7 +579,7 @@ async function handleUsage(options) {
579
579
  "No continuation is available for this view. Use deepline billing ledger export all for the full ledger."
580
580
  ] : []
581
581
  ];
582
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
582
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
583
583
  {
584
584
  ...payload,
585
585
  recent: {
@@ -593,7 +593,7 @@ async function handleUsage(options) {
593
593
  );
594
594
  }
595
595
  async function handleLimit(options) {
596
- const { http } = _chunkBGXEMTIGjs.getAuthedHttpClient.call(void 0, );
596
+ const { http } = _chunkLEREPTAEjs.getAuthedHttpClient.call(void 0, );
597
597
  const payload = await http.get(
598
598
  "/api/v2/billing/limit"
599
599
  );
@@ -601,7 +601,7 @@ async function handleLimit(options) {
601
601
  `Monthly usage cap: ${_nullishCoalesce(payload.monthly_credits_limit, () => ( "(unknown)"))}`,
602
602
  "Enforcement: checked before new calls; in-flight work can exceed the cap."
603
603
  ] : ["Monthly usage cap: off"];
604
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
604
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
605
605
  {
606
606
  ...payload,
607
607
  render: { sections: [{ title: "billing limit", lines }] }
@@ -610,12 +610,12 @@ async function handleLimit(options) {
610
610
  );
611
611
  }
612
612
  async function handleSetLimit(credits, options) {
613
- const { http } = _chunkBGXEMTIGjs.getAuthedHttpClient.call(void 0, );
613
+ const { http } = _chunkLEREPTAEjs.getAuthedHttpClient.call(void 0, );
614
614
  const payload = await http.request("/api/v2/billing/limit", {
615
615
  method: "PUT",
616
616
  body: { monthly_credits_limit: Number.parseInt(credits, 10) }
617
617
  });
618
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
618
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
619
619
  {
620
620
  ...payload,
621
621
  render: {
@@ -631,11 +631,11 @@ async function handleSetLimit(credits, options) {
631
631
  );
632
632
  }
633
633
  async function handleLimitOff(options) {
634
- const { http } = _chunkBGXEMTIGjs.getAuthedHttpClient.call(void 0, );
634
+ const { http } = _chunkLEREPTAEjs.getAuthedHttpClient.call(void 0, );
635
635
  const payload = await http.request("/api/v2/billing/limit", {
636
636
  method: "DELETE"
637
637
  });
638
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
638
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
639
639
  {
640
640
  ...payload,
641
641
  render: {
@@ -655,7 +655,7 @@ async function exportLedger(http, outputPath, options) {
655
655
  let initialized = false;
656
656
  let pageNumber = 0;
657
657
  console.error(`Exporting billing ledger to ${outputPath}`);
658
- for await (const entries of _chunkJMHYDDBQjs.iterateCursorPages.call(void 0, async (cursor) => {
658
+ for await (const entries of _chunkQ4HNK7JXjs.iterateCursorPages.call(void 0, async (cursor) => {
659
659
  pageNumber += 1;
660
660
  console.error(
661
661
  `Fetching page ${pageNumber}; ${summary.row_count} rows written.`
@@ -694,7 +694,7 @@ async function exportLedger(http, outputPath, options) {
694
694
  return summary;
695
695
  }
696
696
  async function handleHistory(options) {
697
- const { http } = _chunkBGXEMTIGjs.getAuthedHttpClient.call(void 0, );
697
+ const { http } = _chunkLEREPTAEjs.getAuthedHttpClient.call(void 0, );
698
698
  const windows = {
699
699
  "1d": 86400,
700
700
  "1w": 604800,
@@ -706,10 +706,10 @@ async function handleHistory(options) {
706
706
  process.cwd(),
707
707
  "deepline",
708
708
  "data",
709
- _chunkBGXEMTIGjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
709
+ _chunkLEREPTAEjs.createTimestampedName.call(void 0, `billing-history-${options.time}`, "csv")
710
710
  );
711
711
  const summary = await exportLedger(http, outputPath, { sinceAt });
712
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
712
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
713
713
  {
714
714
  output_path: outputPath,
715
715
  row_count: summary.row_count,
@@ -746,14 +746,14 @@ async function handleLedgerExportAll(options) {
746
746
  );
747
747
  return;
748
748
  }
749
- const { http } = _chunkBGXEMTIGjs.getAuthedHttpClient.call(void 0, );
749
+ const { http } = _chunkLEREPTAEjs.getAuthedHttpClient.call(void 0, );
750
750
  const outputPath = options.output ? _path.resolve.call(void 0, String(options.output)) : defaultLedgerExportPath();
751
751
  const summary = await exportLedger(http, outputPath, {
752
752
  sinceAt,
753
753
  runId: options.runId,
754
754
  operation: options.operation
755
755
  });
756
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
756
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
757
757
  {
758
758
  output_path: outputPath,
759
759
  row_count: summary.row_count,
@@ -794,7 +794,7 @@ function targetPlanLine(plan) {
794
794
  return `${_nullishCoalesce(plan.display_name, () => ( plan.name))} (${plan.sku}) | ${planPriceText(plan.recurring_price_usd, plan.interval)}${firstMonth}${bonus} | ${plan.included_credits} included credits/month | $${plan.purchased_credit_price_usd}/purchased credit | ${plan.acquisition_enabled ? "available" : "unavailable"}`;
795
795
  }
796
796
  async function handlePlans(options) {
797
- const client = new (0, _chunkZFSB7GXFjs.DeeplineClient)();
797
+ const client = new (0, _chunkW32KT6LMjs.DeeplineClient)();
798
798
  const payload = await client.billing.targetPlans(
799
799
  options.promoCode ? { promoCode: options.promoCode } : void 0
800
800
  );
@@ -814,8 +814,8 @@ async function handlePlans(options) {
814
814
  ...payload.plans.length === 0 ? ["Plans: none available"] : ["Plans:", ...payload.plans.map(targetPlanLine)],
815
815
  _optionalChain([promo, 'optionalAccess', _8 => _8.status]) === "applied" ? `Change plan: deepline billing change-plan <plan_sku> --promo-code ${promo.code}` : "Change plan: deepline billing change-plan <plan_sku>"
816
816
  ];
817
- const legacyPayload = _chunkBGXEMTIGjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
818
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
817
+ const legacyPayload = _chunkLEREPTAEjs.shouldEmitJson.call(void 0, options.json) ? await client.billing.plans() : null;
818
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
819
819
  {
820
820
  ..._nullishCoalesce(legacyPayload, () => ( payload)),
821
821
  ...legacyPayload ? { target_billing: payload } : {},
@@ -825,7 +825,7 @@ async function handlePlans(options) {
825
825
  );
826
826
  }
827
827
  async function handleSubscribe(planVersionId, options) {
828
- const { http } = _chunkBGXEMTIGjs.getAuthedHttpClient.call(void 0, );
828
+ const { http } = _chunkLEREPTAEjs.getAuthedHttpClient.call(void 0, );
829
829
  const payload = await http.request(
830
830
  "/api/v2/billing/subscription/checkout",
831
831
  {
@@ -834,8 +834,8 @@ async function handleSubscribe(planVersionId, options) {
834
834
  }
835
835
  );
836
836
  const url = String(payload.checkout_url || "");
837
- if (!options.json && options.open !== false && url) _chunkBGXEMTIGjs.openInBrowser.call(void 0, url);
838
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
837
+ if (!options.json && options.open !== false && url) _chunkLEREPTAEjs.openInBrowser.call(void 0, url);
838
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
839
839
  {
840
840
  ...payload,
841
841
  render: {
@@ -851,7 +851,7 @@ async function handleSubscribe(planVersionId, options) {
851
851
  );
852
852
  }
853
853
  async function handleSubscriptionStatus(options) {
854
- const client = new (0, _chunkZFSB7GXFjs.DeeplineClient)();
854
+ const client = new (0, _chunkW32KT6LMjs.DeeplineClient)();
855
855
  const payload = await client.billing.subscription.status();
856
856
  const pools = _nullishCoalesce(payload.credit_pools, () => ( []));
857
857
  const lines = [
@@ -871,7 +871,7 @@ async function handleSubscriptionStatus(options) {
871
871
  ],
872
872
  `Assigned by: ${_nullishCoalesce(payload.assigned_by, () => ( "default"))}`
873
873
  ];
874
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
874
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
875
875
  {
876
876
  ...payload,
877
877
  render: { sections: [{ title: "billing subscription", lines }] }
@@ -880,7 +880,7 @@ async function handleSubscriptionStatus(options) {
880
880
  );
881
881
  }
882
882
  async function handleSubscriptionCancel(options) {
883
- const client = new (0, _chunkZFSB7GXFjs.DeeplineClient)();
883
+ const client = new (0, _chunkW32KT6LMjs.DeeplineClient)();
884
884
  const action = options.undo ? "undo_cancel" : "cancel";
885
885
  if (options.dryRun) {
886
886
  const status = await client.billing.subscription.status();
@@ -897,7 +897,7 @@ async function handleSubscriptionCancel(options) {
897
897
  return;
898
898
  }
899
899
  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.";
900
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
900
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
901
901
  {
902
902
  ok: true,
903
903
  dry_run: true,
@@ -953,7 +953,7 @@ async function handleSubscriptionCancel(options) {
953
953
  "Remaining credits are yours to keep \u2014 cancellation never removes credits.",
954
954
  "Undo with: deepline billing subscription cancel --undo"
955
955
  ];
956
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
956
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
957
957
  {
958
958
  ok: true,
959
959
  ...result,
@@ -1007,7 +1007,7 @@ async function handleInvoices(options) {
1007
1007
  return;
1008
1008
  }
1009
1009
  }
1010
- const client = new (0, _chunkZFSB7GXFjs.DeeplineClient)();
1010
+ const client = new (0, _chunkW32KT6LMjs.DeeplineClient)();
1011
1011
  let payload;
1012
1012
  try {
1013
1013
  payload = await client.billing.invoices.list(
@@ -1036,7 +1036,7 @@ async function handleInvoices(options) {
1036
1036
  url: entry.url
1037
1037
  }))
1038
1038
  } : { ...payload, count: entries.length };
1039
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1039
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1040
1040
  {
1041
1041
  ...envelope,
1042
1042
  render: { sections: [{ title: "billing invoices", lines }] }
@@ -1045,7 +1045,7 @@ async function handleInvoices(options) {
1045
1045
  );
1046
1046
  }
1047
1047
  async function handleCheckout(options) {
1048
- const { http } = _chunkBGXEMTIGjs.getAuthedHttpClient.call(void 0, );
1048
+ const { http } = _chunkLEREPTAEjs.getAuthedHttpClient.call(void 0, );
1049
1049
  const payload = await http.post(
1050
1050
  "/api/v2/billing/checkout",
1051
1051
  {
@@ -1055,8 +1055,8 @@ async function handleCheckout(options) {
1055
1055
  }
1056
1056
  );
1057
1057
  const url = String(payload.url || payload.checkout_url || "");
1058
- if (!options.json && !options.noOpen && url) _chunkBGXEMTIGjs.openInBrowser.call(void 0, url);
1059
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1058
+ if (!options.json && !options.noOpen && url) _chunkLEREPTAEjs.openInBrowser.call(void 0, url);
1059
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1060
1060
  {
1061
1061
  ...payload,
1062
1062
  render: {
@@ -1101,7 +1101,7 @@ async function handleTopUp(creditsRaw, options) {
1101
1101
  return;
1102
1102
  }
1103
1103
  if (options.dryRun) {
1104
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1104
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1105
1105
  {
1106
1106
  ok: true,
1107
1107
  dry_run: true,
@@ -1131,7 +1131,7 @@ async function handleTopUp(creditsRaw, options) {
1131
1131
  );
1132
1132
  return;
1133
1133
  }
1134
- const client = new (0, _chunkZFSB7GXFjs.DeeplineClient)();
1134
+ const client = new (0, _chunkW32KT6LMjs.DeeplineClient)();
1135
1135
  let payload;
1136
1136
  try {
1137
1137
  payload = await client.billing.topUpWithReceipt({
@@ -1148,7 +1148,7 @@ async function handleTopUp(creditsRaw, options) {
1148
1148
  return;
1149
1149
  }
1150
1150
  if (payload.status === "pending") {
1151
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1151
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1152
1152
  {
1153
1153
  ok: true,
1154
1154
  ...payload,
@@ -1212,17 +1212,17 @@ async function handleTopUp(creditsRaw, options) {
1212
1212
  ]
1213
1213
  }
1214
1214
  };
1215
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
1215
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0, options.compact ? compactEnvelope : fullEnvelope, {
1216
1216
  json: options.json
1217
1217
  });
1218
1218
  }
1219
1219
  async function handleTargetStatus(options) {
1220
- const client = new (0, _chunkZFSB7GXFjs.DeeplineClient)();
1220
+ const client = new (0, _chunkW32KT6LMjs.DeeplineClient)();
1221
1221
  const payload = await client.billing.targetStatus();
1222
1222
  const balanceCommand = "deepline billing balance";
1223
1223
  const recentChargesCommand = "deepline billing usage --limit 5";
1224
1224
  const exactChargeCommand = "deepline billing usage --request-id <job_id>";
1225
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1225
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1226
1226
  {
1227
1227
  ok: true,
1228
1228
  ...payload,
@@ -1260,13 +1260,13 @@ function formatComputeAmount(minutes, credits) {
1260
1260
  return `${time} ${minutes === 1 ? "minute" : "minutes"} (${cost} ${credits === 1 ? "credit" : "credits"})`;
1261
1261
  }
1262
1262
  async function handleIncludedCompute(options) {
1263
- const client = new (0, _chunkZFSB7GXFjs.DeeplineClient)();
1263
+ const client = new (0, _chunkW32KT6LMjs.DeeplineClient)();
1264
1264
  const payload = options.enable ? await client.billing.enableIncludedCompute({ includeOverage: true }) : await client.billing.includedCompute({ includeOverage: true });
1265
1265
  const rate = _nullishCoalesce(payload.credits_per_minute, () => ( 0));
1266
1266
  const includedCredits = _nullishCoalesce(payload.included_credits_used, () => ( payload.included_minutes_used * rate));
1267
1267
  const includedMinutes = payload.included_credits_used !== void 0 && rate > 0 ? includedCredits / rate : payload.included_minutes_used;
1268
1268
  const overage = payload.overage_credits;
1269
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1269
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1270
1270
  {
1271
1271
  ok: true,
1272
1272
  ...payload,
@@ -1281,12 +1281,12 @@ async function handleIncludedCompute(options) {
1281
1281
  ] : [],
1282
1282
  `Standard sandbox price: ${formatComputeAmount(60, Math.round(rate * 60))}`,
1283
1283
  `Allowance resets: ${payload.period_end_at.slice(0, 10)} (UTC)`,
1284
- _chunk6BBGUQJJjs.PLAY_RUNTIME_PRICING_NOTE
1284
+ _chunkXTYHZEJ2js.PLAY_RUNTIME_PRICING_NOTE
1285
1285
  ] : payload.status === "off" ? [
1286
1286
  "Included compute: off; Play compute is billed at provider cost.",
1287
1287
  `Allowance if enabled: ${formatComputeAmount(payload.plan.included_minutes, payload.plan.included_minutes * payload.plan.credits_per_minute)} per month`,
1288
1288
  `Standard sandbox price if enabled: ${formatComputeAmount(60, Math.round(payload.plan.credits_per_minute * 60))}`,
1289
- _chunk6BBGUQJJjs.PLAY_RUNTIME_PRICING_NOTE,
1289
+ _chunkXTYHZEJ2js.PLAY_RUNTIME_PRICING_NOTE,
1290
1290
  "Run deepline billing compute --enable to turn on included compute. It cannot be turned off again."
1291
1291
  ] : [
1292
1292
  "Included compute is not available for this workspace yet."
@@ -1299,8 +1299,8 @@ async function handleIncludedCompute(options) {
1299
1299
  );
1300
1300
  }
1301
1301
  async function handleEntitlements(options) {
1302
- const payload = await new (0, _chunkZFSB7GXFjs.DeeplineClient)().billing.entitlements();
1303
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1302
+ const payload = await new (0, _chunkW32KT6LMjs.DeeplineClient)().billing.entitlements();
1303
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1304
1304
  {
1305
1305
  ok: true,
1306
1306
  ...payload,
@@ -1333,7 +1333,7 @@ async function handleEntitlements(options) {
1333
1333
  );
1334
1334
  }
1335
1335
  async function handleAutoRechargeStatus(options) {
1336
- const payload = await new (0, _chunkZFSB7GXFjs.DeeplineClient)().billing.autoRecharge.get();
1336
+ const payload = await new (0, _chunkW32KT6LMjs.DeeplineClient)().billing.autoRecharge.get();
1337
1337
  const state = payload.available ? payload.enabled ? "on" : "off" : "unavailable";
1338
1338
  const lines = [
1339
1339
  `State: ${state}`,
@@ -1343,7 +1343,7 @@ async function handleAutoRechargeStatus(options) {
1343
1343
  `Automatic credit purchase cap: ${payload.purchase_limit_credits} credits per rolling 30 days`
1344
1344
  ] : []
1345
1345
  ];
1346
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1346
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1347
1347
  {
1348
1348
  ok: true,
1349
1349
  ...payload,
@@ -1392,7 +1392,7 @@ async function handleAutoRechargeSet(options) {
1392
1392
  }
1393
1393
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1394
1394
  if (options.dryRun) {
1395
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1395
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1396
1396
  {
1397
1397
  ok: true,
1398
1398
  dry_run: true,
@@ -1413,7 +1413,7 @@ async function handleAutoRechargeSet(options) {
1413
1413
  );
1414
1414
  return;
1415
1415
  }
1416
- const payload = await new (0, _chunkZFSB7GXFjs.DeeplineClient)().billing.autoRecharge.update({
1416
+ const payload = await new (0, _chunkW32KT6LMjs.DeeplineClient)().billing.autoRecharge.update({
1417
1417
  enabled: true,
1418
1418
  thresholdCredits,
1419
1419
  refillToCredits,
@@ -1421,7 +1421,7 @@ async function handleAutoRechargeSet(options) {
1421
1421
  ...rollingLimitCredits !== void 0 ? { purchaseLimitCredits: rollingLimitCredits } : {},
1422
1422
  idempotencyKey
1423
1423
  });
1424
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1424
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1425
1425
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1426
1426
  { json: options.json }
1427
1427
  );
@@ -1429,7 +1429,7 @@ async function handleAutoRechargeSet(options) {
1429
1429
  async function handleAutoRechargeOff(options) {
1430
1430
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1431
1431
  if (options.dryRun) {
1432
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1432
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1433
1433
  {
1434
1434
  ok: true,
1435
1435
  dry_run: true,
@@ -1444,11 +1444,11 @@ async function handleAutoRechargeOff(options) {
1444
1444
  );
1445
1445
  return;
1446
1446
  }
1447
- const payload = await new (0, _chunkZFSB7GXFjs.DeeplineClient)().billing.autoRecharge.update({
1447
+ const payload = await new (0, _chunkW32KT6LMjs.DeeplineClient)().billing.autoRecharge.update({
1448
1448
  enabled: false,
1449
1449
  idempotencyKey
1450
1450
  });
1451
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1451
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1452
1452
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1453
1453
  { json: options.json }
1454
1454
  );
@@ -1474,18 +1474,18 @@ function savedCardLines(cards, hasMore) {
1474
1474
  async function handleCardsList(options) {
1475
1475
  const limit = options.limit === void 0 ? void 0 : Number(options.limit);
1476
1476
  if (limit !== void 0 && (!Number.isInteger(limit) || limit < 1 || limit > 100)) {
1477
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1477
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1478
1478
  { ok: false, error: "--limit must be a whole number from 1 to 100." },
1479
1479
  { json: options.json }
1480
1480
  );
1481
1481
  process.exitCode = 1;
1482
1482
  return;
1483
1483
  }
1484
- const payload = await new (0, _chunkZFSB7GXFjs.DeeplineClient)().billing.cards.list({
1484
+ const payload = await new (0, _chunkW32KT6LMjs.DeeplineClient)().billing.cards.list({
1485
1485
  ...limit !== void 0 ? { limit } : {},
1486
1486
  ...options.cursor ? { cursor: options.cursor } : {}
1487
1487
  });
1488
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1488
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1489
1489
  {
1490
1490
  ok: true,
1491
1491
  ...payload,
@@ -1503,8 +1503,8 @@ async function handleCardsList(options) {
1503
1503
  }
1504
1504
  async function handleCardsAdd(options) {
1505
1505
  const makeDefault = options.makeDefault === true;
1506
- const payload = await new (0, _chunkZFSB7GXFjs.DeeplineClient)().billing.cards.add({ makeDefault });
1507
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1506
+ const payload = await new (0, _chunkW32KT6LMjs.DeeplineClient)().billing.cards.add({ makeDefault });
1507
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1508
1508
  {
1509
1509
  ok: true,
1510
1510
  make_default: makeDefault,
@@ -1529,7 +1529,7 @@ async function handleCardChange(action, cardId, options) {
1529
1529
  const changeId = _nullishCoalesce(options.changeId, () => ( _crypto.randomUUID.call(void 0, )));
1530
1530
  const path = `/api/v2/billing/payment-methods/${action}`;
1531
1531
  if (options.dryRun) {
1532
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1532
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1533
1533
  {
1534
1534
  ok: true,
1535
1535
  dry_run: true,
@@ -1544,9 +1544,9 @@ async function handleCardChange(action, cardId, options) {
1544
1544
  );
1545
1545
  return;
1546
1546
  }
1547
- const cards = new (0, _chunkZFSB7GXFjs.DeeplineClient)().billing.cards;
1547
+ const cards = new (0, _chunkW32KT6LMjs.DeeplineClient)().billing.cards;
1548
1548
  const payload = action === "default" ? await cards.setDefault({ cardId, changeId }) : await cards.remove({ cardId, changeId });
1549
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1549
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1550
1550
  {
1551
1551
  ...payload,
1552
1552
  render: {
@@ -1580,11 +1580,11 @@ async function handleBuyCredits(creditsRaw, options) {
1580
1580
  return;
1581
1581
  }
1582
1582
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1583
- const payload = await new (0, _chunkZFSB7GXFjs.DeeplineClient)().billing.purchaseCredits({
1583
+ const payload = await new (0, _chunkW32KT6LMjs.DeeplineClient)().billing.purchaseCredits({
1584
1584
  credits,
1585
1585
  idempotencyKey
1586
1586
  });
1587
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1587
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1588
1588
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1589
1589
  { json: options.json }
1590
1590
  );
@@ -1620,7 +1620,7 @@ async function handleTopUpRecover(creditsRaw, options) {
1620
1620
  return;
1621
1621
  }
1622
1622
  if (options.dryRun) {
1623
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1623
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1624
1624
  {
1625
1625
  ok: true,
1626
1626
  dry_run: true,
@@ -1633,12 +1633,12 @@ async function handleTopUpRecover(creditsRaw, options) {
1633
1633
  );
1634
1634
  return;
1635
1635
  }
1636
- const payload = await new (0, _chunkZFSB7GXFjs.DeeplineClient)().billing.recoverCreditPurchase({
1636
+ const payload = await new (0, _chunkW32KT6LMjs.DeeplineClient)().billing.recoverCreditPurchase({
1637
1637
  credits,
1638
1638
  orgId: options.orgId,
1639
1639
  idempotencyKey: options.idempotencyKey
1640
1640
  });
1641
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1641
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1642
1642
  { ok: true, idempotency_key: options.idempotencyKey, ...payload },
1643
1643
  { json: options.json }
1644
1644
  );
@@ -1658,38 +1658,38 @@ async function handleTargetPlan(planSku, options) {
1658
1658
  return;
1659
1659
  }
1660
1660
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1661
- const payload = await new (0, _chunkZFSB7GXFjs.DeeplineClient)().billing.transitionPlan({
1661
+ const payload = await new (0, _chunkW32KT6LMjs.DeeplineClient)().billing.transitionPlan({
1662
1662
  action: "start_or_change",
1663
1663
  targetPlanSku: planSku,
1664
1664
  ...options.billingEmail ? { billingEmail: options.billingEmail } : {},
1665
1665
  ...options.promoCode ? { promoCode: options.promoCode } : {},
1666
1666
  idempotencyKey
1667
1667
  });
1668
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1668
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1669
1669
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1670
1670
  { json: options.json }
1671
1671
  );
1672
1672
  }
1673
1673
  async function handleTargetPlanCancellation(options) {
1674
1674
  const idempotencyKey = targetBillingIdempotencyKey(options.idempotencyKey);
1675
- const payload = await new (0, _chunkZFSB7GXFjs.DeeplineClient)().billing.transitionPlan({
1675
+ const payload = await new (0, _chunkW32KT6LMjs.DeeplineClient)().billing.transitionPlan({
1676
1676
  action: options.undo ? "undo_cancel" : "cancel",
1677
1677
  idempotencyKey
1678
1678
  });
1679
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1679
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1680
1680
  { ok: true, idempotency_key: idempotencyKey, ...payload },
1681
1681
  { json: options.json }
1682
1682
  );
1683
1683
  }
1684
1684
  async function handleTargetPortal(options) {
1685
- const payload = await new (0, _chunkZFSB7GXFjs.DeeplineClient)().billing.portalSession(
1685
+ const payload = await new (0, _chunkW32KT6LMjs.DeeplineClient)().billing.portalSession(
1686
1686
  options.billingAddress ? { flow: "customer_update" } : void 0
1687
1687
  );
1688
- if (!options.json && !options.noOpen) _chunkBGXEMTIGjs.openInBrowser.call(void 0, payload.url);
1689
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
1688
+ if (!options.json && !options.noOpen) _chunkLEREPTAEjs.openInBrowser.call(void 0, payload.url);
1689
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0, { ok: true, ...payload }, { json: options.json });
1690
1690
  }
1691
1691
  async function handleRedeemCode(code, options) {
1692
- const { http } = _chunkBGXEMTIGjs.getAuthedHttpClient.call(void 0, );
1692
+ const { http } = _chunkLEREPTAEjs.getAuthedHttpClient.call(void 0, );
1693
1693
  const payload = await http.post(
1694
1694
  "/api/v2/billing/checkout",
1695
1695
  {
@@ -1697,8 +1697,8 @@ async function handleRedeemCode(code, options) {
1697
1697
  }
1698
1698
  );
1699
1699
  const url = String(payload.url || payload.checkout_url || "");
1700
- if (!options.json && !options.noOpen && url) _chunkBGXEMTIGjs.openInBrowser.call(void 0, url);
1701
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0,
1700
+ if (!options.json && !options.noOpen && url) _chunkLEREPTAEjs.openInBrowser.call(void 0, url);
1701
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1702
1702
  {
1703
1703
  ...payload,
1704
1704
  render: {
@@ -1759,14 +1759,14 @@ Examples:
1759
1759
  if (!Number.isSafeInteger(quantity) || quantity <= 0) {
1760
1760
  throw new Error("--quantity must be a positive safe integer.");
1761
1761
  }
1762
- const quote = await new (0, _chunkZFSB7GXFjs.DeeplineClient)().billing.quote({
1762
+ const quote = await new (0, _chunkW32KT6LMjs.DeeplineClient)().billing.quote({
1763
1763
  quantity,
1764
1764
  sandbox_runtime: {
1765
1765
  timeout: options.sandboxTimeout,
1766
1766
  size: options.sandboxSize
1767
1767
  }
1768
1768
  });
1769
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0, quote, {
1769
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0, quote, {
1770
1770
  json: options.json,
1771
1771
  text: `Sandbox session ceiling: ${quote.maximum_credits} Deepline credits (${quote.quantity} session${quote.quantity === 1 ? "" : "s"}).
1772
1772
  ${quote.explanation}
@@ -1792,6 +1792,30 @@ Examples:
1792
1792
  deepline billing balance
1793
1793
  `
1794
1794
  ).option("--json", "Emit the full balance record as JSON").option("--verbose", "Add reservations and usage awaiting settlement").action(handleBalance);
1795
+ billing.command("reuse").description(
1796
+ "Show recorded reused tool results for this workspace; no credit estimate."
1797
+ ).option("--json", "Return the workspace reuse summary as JSON").action(async (options) => {
1798
+ const { http } = _chunkLEREPTAEjs.getAuthedHttpClient.call(void 0, );
1799
+ const payload = await http.get("/api/v2/usage/reuse");
1800
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0,
1801
+ {
1802
+ status: "ok",
1803
+ data: payload,
1804
+ render: {
1805
+ sections: [
1806
+ {
1807
+ title: "Result reuse",
1808
+ lines: [
1809
+ payload.reuse ? `${payload.reuse.reused_result_calls} results reused across ${payload.reuse.confirmed_runs} fully reported runs.` : "Not recorded yet. Counts appear after a supported run reuses results and its final summary is processed.",
1810
+ "Historical and incomplete runs are excluded. This is not a credit savings estimate."
1811
+ ]
1812
+ }
1813
+ ]
1814
+ }
1815
+ },
1816
+ options
1817
+ );
1818
+ });
1795
1819
  billing.command("usage").description("Show current usage plus recent calls.").addHelpText(
1796
1820
  "after",
1797
1821
  `
@@ -2014,8 +2038,8 @@ Examples:
2014
2038
  new (0, _commander.Command)("trigger").description(
2015
2039
  "Evaluate capped automatic recharge and resume any pending purchase."
2016
2040
  ).option("--json", "Emit JSON output").action(async (options) => {
2017
- const result = await new (0, _chunkZFSB7GXFjs.DeeplineClient)().billing.autoRecharge.trigger();
2018
- _chunkBGXEMTIGjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
2041
+ const result = await new (0, _chunkW32KT6LMjs.DeeplineClient)().billing.autoRecharge.trigger();
2042
+ _chunkLEREPTAEjs.printCommandEnvelope.call(void 0, { ok: true, ...result }, { json: options.json });
2019
2043
  })
2020
2044
  );
2021
2045
  billing.command("cards").description("List, add, choose the default of, and remove saved cards.").addHelpText(