deepline 0.3.492 → 0.3.494

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 (185) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +11 -5
  2. package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -0
  3. package/dist/bundling-sources/sdk/src/release.ts +2 -2
  4. package/dist/bundling-sources/sdk/src/types.ts +11 -4
  5. package/dist/bundling-sources/shared_libs/monitors/fleets/verdict.ts +25 -9
  6. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +36 -0
  7. package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +5 -4
  8. package/dist/bundling-sources/shared_libs/play-runtime/crustdata-company-identify-batching.ts +162 -0
  9. package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-reaper.ts +19 -3
  10. package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-batching-registry.ts +2 -0
  11. package/dist/bundling-sources/shared_libs/play-runtime/receipt-sql.ts +17 -23
  12. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-modal-fallback.ts +28 -1
  13. package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-placement-policy.ts +75 -0
  14. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +20 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +412 -59
  16. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +38 -10
  17. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +19 -11
  18. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-operation.ts +165 -12
  19. package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +15 -0
  20. package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-state-machine.ts +358 -0
  21. package/dist/bundling-sources/shared_libs/plays/field-catalog.ts +101 -3
  22. package/dist/cli/{auth-4I6QY5WX.mjs → auth-6X5YXMFN.mjs} +5 -5
  23. package/dist/cli/auth-RWLCLMDY.js +43 -0
  24. package/dist/cli/{billing-2H4GOJZY.js → billing-5F5PZB77.js} +80 -80
  25. package/dist/cli/{billing-4F6L4JSI.mjs → billing-IN74SDSC.mjs} +7 -7
  26. package/dist/cli/{chunk-3RGWTKK3.mjs → chunk-2GEYN3H4.mjs} +89 -3
  27. package/dist/cli/{chunk-JJAHWKJ2.js → chunk-3KVFOKPR.js} +73 -59
  28. package/dist/cli/{chunk-NBL6JMIY.js → chunk-4A5WXQJK.js} +17 -17
  29. package/dist/cli/{chunk-YOCEY4EI.mjs → chunk-4RWH4LRQ.mjs} +5 -5
  30. package/dist/cli/{chunk-OGNIB64W.js → chunk-4ZKZS43N.js} +23 -15
  31. package/dist/cli/{chunk-TKLDKIJU.mjs → chunk-5JPKRDFC.mjs} +7 -5
  32. package/dist/cli/{chunk-3TISK5RQ.js → chunk-5WYH2LAP.js} +6 -6
  33. package/dist/cli/{chunk-MQ2LQOAM.mjs → chunk-65NMOP4T.mjs} +23 -9
  34. package/dist/cli/{chunk-O65HDVA7.mjs → chunk-6DMLWM7L.mjs} +5 -5
  35. package/dist/cli/{chunk-OTUT3XTX.mjs → chunk-6XZR2642.mjs} +8 -7
  36. package/dist/cli/{chunk-Q3CCCTRQ.js → chunk-7B7A36XZ.js} +14 -14
  37. package/dist/cli/{chunk-O3K22ZC7.js → chunk-AARXOBVD.js} +35 -11
  38. package/dist/cli/{chunk-DVGCPOEA.mjs → chunk-BLHQRETG.mjs} +187 -187
  39. package/dist/cli/{chunk-NPZBE64X.js → chunk-BLMB4N63.js} +89 -3
  40. package/dist/cli/{chunk-OTDX4A4W.js → chunk-BNI653WN.js} +21 -21
  41. package/dist/cli/{chunk-E47VAVAR.js → chunk-BU5Y7HOD.js} +5 -5
  42. package/dist/cli/{chunk-CGDUFVNE.mjs → chunk-C5R3UH5V.mjs} +29 -2
  43. package/dist/cli/{chunk-HFEJ7JJT.js → chunk-CAWOSHEC.js} +26 -26
  44. package/dist/cli/{chunk-TVUE4CPW.js → chunk-CK5MA6S6.js} +32 -32
  45. package/dist/cli/{chunk-Y7QCMOGZ.mjs → chunk-DKKAJ3U2.mjs} +6 -6
  46. package/dist/cli/{chunk-ONONSV2Q.mjs → chunk-DVQHG6AM.mjs} +1 -0
  47. package/dist/cli/{chunk-3BRDP4UP.mjs → chunk-EG3OSUBO.mjs} +1 -1
  48. package/dist/cli/{chunk-ZCKUNXXR.mjs → chunk-FAT6CUZK.mjs} +1 -1
  49. package/dist/cli/{chunk-YNWET57Z.js → chunk-GBICEYUA.js} +13 -13
  50. package/dist/cli/{chunk-42Z6VC2Q.js → chunk-GDNQXLBM.js} +2 -2
  51. package/dist/cli/{chunk-SE23YSBK.js → chunk-GLDBMKTV.js} +3 -3
  52. package/dist/cli/{chunk-OKHBAAJG.mjs → chunk-GNSGDIA4.mjs} +2 -2
  53. package/dist/cli/{chunk-W4FEX5ZF.js → chunk-GSCCDGGT.js} +261 -261
  54. package/dist/cli/{chunk-A7ZMG2QZ.mjs → chunk-H46X7YDU.mjs} +35 -11
  55. package/dist/cli/{chunk-3IBKEOL4.js → chunk-HINVMRGQ.js} +4 -4
  56. package/dist/cli/{chunk-HHTVRICE.js → chunk-I42EOZKQ.js} +44 -17
  57. package/dist/cli/{chunk-MPITIXW4.mjs → chunk-IPWYDANJ.mjs} +13 -5
  58. package/dist/cli/{chunk-YVOYZPMY.mjs → chunk-IZJSX3SZ.mjs} +2 -2
  59. package/dist/cli/{chunk-FFOJRD53.mjs → chunk-J2HOVZOE.mjs} +3 -3
  60. package/dist/cli/{chunk-EFFHRXKB.js → chunk-J3UHNUWI.js} +2 -2
  61. package/dist/cli/{chunk-4IP5MLWU.js → chunk-JO5FFSR7.js} +6 -1
  62. package/dist/cli/{chunk-PIC6M4X3.mjs → chunk-KR2XEI5T.mjs} +1 -1
  63. package/dist/cli/{chunk-FTXIJTV2.mjs → chunk-KSHAFYYG.mjs} +2 -2
  64. package/dist/cli/{chunk-6YO4OJPM.mjs → chunk-KVCQL6SP.mjs} +99 -24
  65. package/dist/cli/{chunk-RC366IJS.mjs → chunk-L2P2XRPO.mjs} +38 -6
  66. package/dist/cli/{chunk-R5MP3CIY.mjs → chunk-L4QPBQUX.mjs} +3 -3
  67. package/dist/cli/{chunk-4RB74KJX.js → chunk-L6KA4ENU.js} +47 -15
  68. package/dist/cli/{chunk-MJFVF5AW.mjs → chunk-L6L57RSG.mjs} +2 -2
  69. package/dist/cli/{chunk-F6EQWY4E.mjs → chunk-MWZNMWR2.mjs} +2 -2
  70. package/dist/cli/{chunk-LCCFGSV7.mjs → chunk-ODWTFVE4.mjs} +2 -2
  71. package/dist/cli/{chunk-AUQQVDAB.js → chunk-PKV5CD3W.js} +1 -0
  72. package/dist/cli/{chunk-UUH4GQRL.mjs → chunk-QOEI42IU.mjs} +2 -2
  73. package/dist/cli/{chunk-JHBRJDUC.js → chunk-QSRWBOPV.js} +11 -10
  74. package/dist/cli/{chunk-4OLXMJ2L.js → chunk-RLX5ZFNX.js} +8 -6
  75. package/dist/cli/{chunk-EANFUHRM.mjs → chunk-RPFNIMUO.mjs} +1 -1
  76. package/dist/cli/{chunk-DJOLMS2A.js → chunk-S3XQH7DW.js} +2 -2
  77. package/dist/cli/{chunk-DEJIN4DF.mjs → chunk-SAW3FBCA.mjs} +5 -0
  78. package/dist/cli/{chunk-GDSZWTJK.mjs → chunk-TLQXN4ZZ.mjs} +12 -12
  79. package/dist/cli/{chunk-O2FB42N2.js → chunk-USWLB4KV.js} +234 -234
  80. package/dist/cli/{chunk-BDUFZSUL.js → chunk-VMPM2FKT.js} +8 -8
  81. package/dist/cli/{chunk-4GJIJHRQ.mjs → chunk-WCZBIE5L.mjs} +1 -1
  82. package/dist/cli/{chunk-NF7NUKWF.js → chunk-WP45PUPW.js} +132 -57
  83. package/dist/cli/{chunk-FPLN7PHP.js → chunk-X6HIIHQO.js} +5 -5
  84. package/dist/cli/{chunk-B2JE3HD6.js → chunk-Y4GRL533.js} +3 -3
  85. package/dist/cli/{chunk-ZDTPSVGF.js → chunk-ZZD245Z2.js} +10 -10
  86. package/dist/cli/command-docs.js +2 -2
  87. package/dist/cli/command-docs.mjs +1 -1
  88. package/dist/cli/{csv-JGJNDRSA.js → csv-QD7JJGSP.js} +13 -13
  89. package/dist/cli/{csv-VGXGV7YM.mjs → csv-UBW4ID5D.mjs} +4 -4
  90. package/dist/cli/{db-W52WJ6E5.js → db-AARR3WYD.js} +28 -28
  91. package/dist/cli/{db-OYG27ZBM.mjs → db-QFDXKIVD.mjs} +7 -7
  92. package/dist/cli/describe-OBVIAC2H.mjs +50 -0
  93. package/dist/cli/describe-RYJ6HDYD.js +50 -0
  94. package/dist/cli/describe-core.d.mts +5 -11
  95. package/dist/cli/describe-core.d.ts +5 -11
  96. package/dist/cli/describe-core.js +5 -5
  97. package/dist/cli/describe-core.mjs +4 -4
  98. package/dist/cli/{executions-EVE4KUGL.mjs → executions-IZYUDYTZ.mjs} +7 -7
  99. package/dist/cli/{executions-LAJHZGPY.js → executions-KXY7KMZY.js} +9 -9
  100. package/dist/cli/{feedback-ZABCN7RT.js → feedback-3334HBPD.js} +8 -8
  101. package/dist/cli/{feedback-75QB7KVG.mjs → feedback-IVCVBERN.mjs} +4 -4
  102. package/dist/cli/getting-started.d.mts +12 -10
  103. package/dist/cli/getting-started.d.ts +12 -10
  104. package/dist/cli/getting-started.js +4 -2
  105. package/dist/cli/getting-started.mjs +3 -1
  106. package/dist/cli/git-4VLYFHNU.js +25 -0
  107. package/dist/cli/{git-QIFEYQGY.mjs → git-JHNVET5A.mjs} +5 -5
  108. package/dist/cli/index.js +143 -143
  109. package/dist/cli/index.mjs +43 -43
  110. package/dist/cli/{legacy-noops-2TBIAMCM.js → legacy-noops-DBA32JCV.js} +8 -8
  111. package/dist/cli/{legacy-noops-PNTWBBGY.mjs → legacy-noops-WGVBUOCC.mjs} +5 -5
  112. package/dist/cli/{monitors-UKBOEGBS.js → monitors-GHWZ5AZS.js} +169 -129
  113. package/dist/cli/{monitors-LOHUYJEI.mjs → monitors-ZGANC7JY.mjs} +49 -9
  114. package/dist/cli/{org-JRUKUOUF.mjs → org-CUS42N2T.mjs} +7 -7
  115. package/dist/cli/{org-E7A6QLBW.js → org-S7JWP264.js} +73 -73
  116. package/dist/cli/{pages-K76HA473.mjs → pages-IH56T6L6.mjs} +7 -7
  117. package/dist/cli/{pages-EUDFFLLD.js → pages-QXRZDEJW.js} +18 -18
  118. package/dist/cli/{play-UWHNUJRA.js → play-4C5PYS62.js} +661 -566
  119. package/dist/cli/{play-DG2N66SV.mjs → play-Z65ZFOQH.mjs} +147 -52
  120. package/dist/cli/{providers-RUTTPUZD.mjs → providers-FSZSJX4Z.mjs} +7 -7
  121. package/dist/cli/{providers-DZX6TTC6.js → providers-XYQGYF3O.js} +10 -10
  122. package/dist/cli/{quickstart-RGZZN2YE.mjs → quickstart-DHWVE32I.mjs} +5 -5
  123. package/dist/cli/{quickstart-U4NMD7KX.js → quickstart-ZA25RJT3.js} +13 -13
  124. package/dist/cli/{run-5UNF4FHG.js → run-5MP6LEHM.js} +45 -44
  125. package/dist/cli/{run-MOJWQYFQ.mjs → run-WRPPEPLG.mjs} +30 -29
  126. package/dist/cli/search-4SQFVNTB.js +32 -0
  127. package/dist/cli/{search-5B3ZDU7H.mjs → search-A6NVJPKX.mjs} +8 -8
  128. package/dist/cli/{search-output-QS4IWWHA.mjs → search-output-PAOUMVXY.mjs} +7 -4
  129. package/dist/cli/{search-output-VQWJS3FN.js → search-output-YA6TXWGO.js} +9 -6
  130. package/dist/cli/{secrets-S3PJMEAC.js → secrets-AZYOGH3I.js} +16 -16
  131. package/dist/cli/{secrets-V5XVDBIS.mjs → secrets-ZGF7JOBI.mjs} +7 -7
  132. package/dist/cli/{sessions-Y5QMEZ3D.js → sessions-GCIN5VXT.js} +6 -6
  133. package/dist/cli/{sessions-5V3X24XI.mjs → sessions-RNEAXZPV.mjs} +5 -5
  134. package/dist/cli/{settings-3U6RRO5F.js → settings-LMEZNLBB.js} +80 -80
  135. package/dist/cli/{settings-LHZYY5PT.mjs → settings-NO5KXQJF.mjs} +13 -13
  136. package/dist/cli/{setup-AJLWXYAN.mjs → setup-GCYB4IFS.mjs} +13 -13
  137. package/dist/cli/{setup-MLLIGO2S.js → setup-XKTZPYYH.js} +57 -57
  138. package/dist/cli/{skills-5O2MUWKK.mjs → skills-TY4HHIKH.mjs} +10 -10
  139. package/dist/cli/skills-V4APQA2I.js +36 -0
  140. package/dist/cli/tools-HKQLQ7HT.js +57 -0
  141. package/dist/cli/{tools-PWNMI5CD.mjs → tools-RDTHHYJ3.mjs} +21 -21
  142. package/dist/cli/{update-SXT4QW7S.mjs → update-BRLLTTCS.mjs} +10 -10
  143. package/dist/cli/update-Z4MUAHWM.js +34 -0
  144. package/dist/cli/{workflow-KPRM6ARO.mjs → workflow-F72EVZWM.mjs} +8 -8
  145. package/dist/cli/{workflow-3WTF5IYT.js → workflow-YHA4WE3K.js} +18 -18
  146. package/dist/{client-Cb1ej1Vr.d.ts → client-97yTcdLl.d.ts} +1 -1
  147. package/dist/{client-vWpbLNCB.d.mts → client-CFo9qalW.d.mts} +1 -1
  148. package/dist/{client-core-BmVs6SP0.d.ts → client-core-BRZrY13B.d.ts} +15 -8
  149. package/dist/{client-core-CoBTvsXG.d.mts → client-core-Dl6xgfLq.d.mts} +15 -8
  150. package/dist/{compiler-manifest-BFTwq1HI.d.mts → compiler-manifest-CPEF48NM.d.mts} +91 -0
  151. package/dist/{compiler-manifest-BFTwq1HI.d.ts → compiler-manifest-CPEF48NM.d.ts} +91 -0
  152. package/dist/{errors-c3pMsylw.d.ts → errors-B-PJXveg.d.ts} +1 -1
  153. package/dist/{errors-w31ybrQM.d.mts → errors-BWbPzqwo.d.mts} +1 -1
  154. package/dist/{index-DvNtxucX.d.mts → index-BJ8AA1F9.d.mts} +1 -1
  155. package/dist/{index-CQ-15-QL.d.ts → index-CvVxPpE8.d.ts} +1 -1
  156. package/dist/index.d.mts +7 -7
  157. package/dist/index.d.ts +7 -7
  158. package/dist/index.js +27 -19
  159. package/dist/index.mjs +16 -8
  160. package/dist/install-integrity.json +123 -122
  161. package/dist/plays/bundle-play-file.d.mts +3 -3
  162. package/dist/plays/bundle-play-file.d.ts +3 -3
  163. package/dist/plays/play-description.d.mts +2 -2
  164. package/dist/plays/play-description.d.ts +2 -2
  165. package/dist/plays/run-request.d.mts +2 -2
  166. package/dist/plays/run-request.d.ts +2 -2
  167. package/dist/plays/run-request.js +2 -2
  168. package/dist/plays/run-request.mjs +1 -1
  169. package/dist/release.d.mts +2 -2
  170. package/dist/release.d.ts +2 -2
  171. package/dist/release.js +2 -2
  172. package/dist/release.mjs +1 -1
  173. package/dist/server.d.mts +4 -4
  174. package/dist/server.d.ts +4 -4
  175. package/dist/server.js +6 -6
  176. package/dist/server.mjs +4 -4
  177. package/package.json +1 -1
  178. package/dist/cli/auth-7BCLZU6K.js +0 -43
  179. package/dist/cli/describe-FIXCRO5N.mjs +0 -50
  180. package/dist/cli/describe-G3O6OUBG.js +0 -50
  181. package/dist/cli/git-QBAR46NW.js +0 -25
  182. package/dist/cli/search-3DAEJL6S.js +0 -32
  183. package/dist/cli/skills-BBLIML5M.js +0 -36
  184. package/dist/cli/tools-X5SQXUMM.js +0 -57
  185. package/dist/cli/update-AEJ2ZSZQ.js +0 -34
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return 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; } var _class; var _class2;require('./chunk-I5YZLGMG.js');
2
2
 
3
3
 
4
- var _chunkE47VAVARjs = require('./chunk-E47VAVAR.js');
5
- require('./chunk-TVUE4CPW.js');
4
+ var _chunkBU5Y7HODjs = require('./chunk-BU5Y7HOD.js');
5
+ require('./chunk-CK5MA6S6.js');
6
6
  require('./chunk-E4CABWXL.js');
7
- require('./chunk-AUQQVDAB.js');
7
+ require('./chunk-PKV5CD3W.js');
8
8
  require('./chunk-NMU3VR5U.js');
9
9
  require('./chunk-XDVT3GOM.js');
10
10
 
@@ -17,15 +17,15 @@ require('./chunk-UNEMDKXN.js');
17
17
  var _chunkIF75RD6Ujs = require('./chunk-IF75RD6U.js');
18
18
 
19
19
 
20
- var _chunkSE23YSBKjs = require('./chunk-SE23YSBK.js');
20
+ var _chunkGLDBMKTVjs = require('./chunk-GLDBMKTV.js');
21
21
 
22
22
 
23
23
 
24
24
 
25
25
 
26
- var _chunkZDTPSVGFjs = require('./chunk-ZDTPSVGF.js');
27
- require('./chunk-B2JE3HD6.js');
28
- require('./chunk-3IBKEOL4.js');
26
+ var _chunkZZD245Z2js = require('./chunk-ZZD245Z2.js');
27
+ require('./chunk-Y4GRL533.js');
28
+ require('./chunk-HINVMRGQ.js');
29
29
 
30
30
 
31
31
  var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
@@ -33,7 +33,7 @@ require('./chunk-XNYIZMNQ.js');
33
33
 
34
34
 
35
35
  var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
36
- require('./chunk-DJOLMS2A.js');
36
+ require('./chunk-S3XQH7DW.js');
37
37
  require('./chunk-OG64RBAC.js');
38
38
  require('./chunk-COGTRVWW.js');
39
39
 
@@ -111,10 +111,10 @@ function reportMonitorsFailure(error, options) {
111
111
  const exitCode = monitorsErrorExitCode(error);
112
112
  const next = monitorsFailureNextCommand(error, exitCode, options);
113
113
  const retrySafe = exitCode === 5 && _optionalChain([options, 'optionalAccess', _9 => _9.retryCommand]) !== void 0;
114
- const wantsJson = _chunkZDTPSVGFjs.shouldEmitJson.call(void 0, process.argv.includes("--json"));
114
+ const wantsJson = _chunkZZD245Z2js.shouldEmitJson.call(void 0, process.argv.includes("--json"));
115
115
  if (wantsJson) {
116
- const payload = _chunkZDTPSVGFjs.errorToJsonPayload.call(void 0, error);
117
- _chunkZDTPSVGFjs.printJson.call(void 0, {
116
+ const payload = _chunkZZD245Z2js.errorToJsonPayload.call(void 0, error);
117
+ _chunkZZD245Z2js.printJson.call(void 0, {
118
118
  ok: false,
119
119
  exitCode,
120
120
  ...next ? { next } : {},
@@ -529,14 +529,14 @@ Preview the plan first with:
529
529
  );
530
530
  }
531
531
  async function handleMonitorsStatus(options) {
532
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.status();
532
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.status();
533
533
  const hasAccess = payload.has_access === true;
534
534
  const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
535
535
  const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
536
536
  ${reason}` : ""}
537
537
  ` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
538
538
  `;
539
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
539
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
540
540
  { has_access: hasAccess, ...reason ? { reason } : {} },
541
541
  { json: options.json, text }
542
542
  );
@@ -602,14 +602,14 @@ async function handleMonitorsAvailable(toolId, options) {
602
602
  }
603
603
  }
604
604
  const tool = _nullishCoalesce(toolId, () => ( options.tool));
605
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.available(tool, {
605
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.available(tool, {
606
606
  ...options.provider ? { provider: options.provider } : {},
607
607
  ...options.search ? { search: options.search } : {},
608
608
  ...options.limit ? { limit: options.limit } : {},
609
609
  ...options.full ? { full: true } : {},
610
610
  ...options.compact ? { compact: true } : {}
611
611
  });
612
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, {
612
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, {
613
613
  json: options.json,
614
614
  // Human list view shows id + name + deployed_count ("deployed: N") so
615
615
  // can-deploy vs already-deployed is visible in one view. Describing a
@@ -712,14 +712,14 @@ async function handleMonitorsList(options) {
712
712
  "`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
713
713
  );
714
714
  }
715
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.list({
715
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.list({
716
716
  ...state ? { state } : {},
717
717
  ...options.status ? { status: options.status } : {},
718
718
  ...options.limit ? { limit: options.limit } : {},
719
719
  ...options.cursor ? { cursor: options.cursor } : {},
720
720
  ...options.includeConsumers ? { includeConsumers: true } : {}
721
721
  });
722
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, {
722
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, {
723
723
  json: options.json,
724
724
  text: renderDeployedListText(
725
725
  payload,
@@ -735,10 +735,10 @@ async function handleMonitorsCheck(definition, options) {
735
735
  argLabel: "<definition>",
736
736
  command: "deepline monitors check"
737
737
  });
738
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.check(
738
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.check(
739
739
  body
740
740
  );
741
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
741
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, { json: options.json });
742
742
  }
743
743
  function previewText(value) {
744
744
  return typeof value === "string" && value.trim() ? value.trim() : "-";
@@ -796,22 +796,22 @@ async function handleMonitorsPreview(definition, options) {
796
796
  if (limit !== void 0 && !Number.isInteger(limit)) {
797
797
  throw new MonitorsUsageError("--limit must be a whole number from 1 to 3.");
798
798
  }
799
- const wantsJson = _chunkZDTPSVGFjs.shouldEmitJson.call(void 0, options.json);
799
+ const wantsJson = _chunkZZD245Z2js.shouldEmitJson.call(void 0, options.json);
800
800
  if (options.idempotencyKey === void 0 && wantsJson) {
801
801
  throw new MonitorsUsageError(
802
802
  "--json requires --idempotency-key <key>. Choose a new key for each new preview and keep it: rerunning with the same key returns the result without paying again."
803
803
  );
804
804
  }
805
805
  const idempotencyKey = _nullishCoalesce(options.idempotencyKey, () => ( `monitor-preview-${_crypto.randomUUID.call(void 0, )}`));
806
- const progress = _chunkSE23YSBKjs.createCliProgress.call(void 0, !wantsJson);
806
+ const progress = _chunkGLDBMKTVjs.createCliProgress.call(void 0, !wantsJson);
807
807
  progress.phase(`Preview key: ${idempotencyKey}`);
808
808
  try {
809
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.preview(
809
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.preview(
810
810
  body,
811
811
  { idempotencyKey, ...limit === void 0 ? {} : { limit } }
812
812
  );
813
813
  progress.complete();
814
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, {
814
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, {
815
815
  json: options.json,
816
816
  text: renderMonitorPreviewText(payload)
817
817
  });
@@ -856,7 +856,7 @@ async function handleMonitorsDeploy(definition, options) {
856
856
  argLabel: "<definition>",
857
857
  command: "deepline monitors deploy"
858
858
  });
859
- const client = new (0, _chunkE47VAVARjs.DeeplineClient)();
859
+ const client = new (0, _chunkBU5Y7HODjs.DeeplineClient)();
860
860
  const definitionArg = body;
861
861
  if (options.dryRun) {
862
862
  const payload2 = await client.monitors.deploy(definitionArg, {
@@ -864,7 +864,7 @@ async function handleMonitorsDeploy(definition, options) {
864
864
  });
865
865
  const valid = payload2.valid !== false;
866
866
  const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _23 => _23(payload2), 'optionalAccess', _24 => _24.identity_conflict]));
867
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
867
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
868
868
  { dry_run: true, ...payload2 },
869
869
  { json: options.json, text: renderMonitorDeployPlan(payload2) }
870
870
  );
@@ -874,7 +874,7 @@ async function handleMonitorsDeploy(definition, options) {
874
874
  return;
875
875
  }
876
876
  const payload = await client.monitors.deploy(definitionArg);
877
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, {
877
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, {
878
878
  json: options.json,
879
879
  text: renderMonitorDeployCompletion(payload)
880
880
  });
@@ -886,29 +886,29 @@ async function handleMonitorsSync(definition, options) {
886
886
  argLabel: "<definition>",
887
887
  command: "deepline monitors sync"
888
888
  });
889
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.sync(body, {
889
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.sync(body, {
890
890
  ...options.dryRun ? { dryRun: true } : {},
891
891
  idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
892
892
  });
893
893
  if (options.dryRun) {
894
894
  const plan = payload;
895
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
895
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
896
896
  { dry_run: true, ...plan },
897
897
  { json: options.json, text: renderMonitorDeployPlan(plan) }
898
898
  );
899
899
  return;
900
900
  }
901
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, {
901
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, {
902
902
  json: options.json,
903
903
  text: renderMonitorJob(payload)
904
904
  });
905
905
  }
906
906
  async function handleScalarMonitorLifecycle(action, key, options) {
907
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors[action](key, {
907
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors[action](key, {
908
908
  ...options.dryRun ? { dryRun: true } : {},
909
909
  idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
910
910
  });
911
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, {
911
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, {
912
912
  json: options.json,
913
913
  text: options.dryRun ? void 0 : renderMonitorJob(payload)
914
914
  });
@@ -997,11 +997,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
997
997
  lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
998
998
  );
999
999
  }
1000
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.batch.deploy(
1000
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.batch.deploy(
1001
1001
  lint.normalized.monitors,
1002
1002
  { idempotencyKey }
1003
1003
  );
1004
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
1004
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
1005
1005
  {
1006
1006
  ...payload,
1007
1007
  idempotency_key: idempotencyKey,
@@ -1034,7 +1034,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
1034
1034
  );
1035
1035
  }
1036
1036
  if (options.dryRun) {
1037
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
1037
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
1038
1038
  {
1039
1039
  ok: true,
1040
1040
  dry_run: true,
@@ -1051,7 +1051,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
1051
1051
  "sync",
1052
1052
  options.idempotencyKey
1053
1053
  );
1054
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.batches.sync(
1054
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.batches.sync(
1055
1055
  batchId,
1056
1056
  lint.normalized.monitors,
1057
1057
  {
@@ -1059,14 +1059,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
1059
1059
  ...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
1060
1060
  }
1061
1061
  );
1062
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
1062
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
1063
1063
  { ...payload, idempotency_key: idempotencyKey },
1064
1064
  { json: options.json, text: renderMonitorJob(payload) }
1065
1065
  );
1066
1066
  }
1067
1067
  async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
1068
1068
  if (options.dryRun) {
1069
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
1069
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
1070
1070
  {
1071
1071
  ok: true,
1072
1072
  dry_run: true,
@@ -1082,17 +1082,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
1082
1082
  intent,
1083
1083
  options.idempotencyKey
1084
1084
  );
1085
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.batches[intent](batchId, {
1085
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.batches[intent](batchId, {
1086
1086
  idempotencyKey
1087
1087
  });
1088
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
1088
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
1089
1089
  { ...payload, idempotency_key: idempotencyKey },
1090
1090
  { json: options.json, text: renderMonitorJob(payload) }
1091
1091
  );
1092
1092
  }
1093
1093
  async function handleNamedMonitorBatchGet(batchId, options) {
1094
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.batches.get(batchId);
1095
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, {
1094
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.batches.get(batchId);
1095
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, {
1096
1096
  json: options.json,
1097
1097
  text: renderMonitorJob(payload)
1098
1098
  });
@@ -1106,7 +1106,7 @@ async function handleMonitorBatchLint(options) {
1106
1106
  const result = _chunkIF75RD6Ujs.lintMonitorBatchInput.call(void 0,
1107
1107
  readMonitorDefinitionsJsonFile(options.file)
1108
1108
  );
1109
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
1109
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
1110
1110
  {
1111
1111
  ok: !result.issues.some((issue) => issue.severity === "error"),
1112
1112
  ...result.normalized ? { normalized: result.normalized } : {},
@@ -1126,7 +1126,7 @@ async function handleMonitorFleetLint(options) {
1126
1126
  const result = _chunkC374C22Yjs.lintMonitorFleetInput.call(void 0,
1127
1127
  readMonitorDefinitionsJsonFile(options.file)
1128
1128
  );
1129
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
1129
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
1130
1130
  {
1131
1131
  ok: !result.issues.some((issue) => issue.severity === "error"),
1132
1132
  ...result.normalized ? { normalized: result.normalized } : {},
@@ -1138,32 +1138,32 @@ async function handleMonitorFleetLint(options) {
1138
1138
  process.exitCode = 2;
1139
1139
  }
1140
1140
  async function handleMonitorJobGet(jobId, options) {
1141
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.jobs.get(jobId);
1142
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, {
1141
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.jobs.get(jobId);
1142
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, {
1143
1143
  json: options.json,
1144
1144
  text: renderMonitorJob(payload)
1145
1145
  });
1146
1146
  }
1147
1147
  async function handleMonitorJobWait(jobId, options) {
1148
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.jobs.wait(jobId, {
1148
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.jobs.wait(jobId, {
1149
1149
  timeoutMs: fleetTimeoutMs(options.timeout),
1150
1150
  pollIntervalMs: FLEET_POLL_INTERVAL_MS
1151
1151
  });
1152
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, {
1152
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, {
1153
1153
  json: options.json,
1154
1154
  text: renderMonitorJob(payload)
1155
1155
  });
1156
1156
  }
1157
1157
  async function handleMonitorJobLogs(jobId, options) {
1158
1158
  const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
1159
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.jobs.logs(jobId, {
1159
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.jobs.logs(jobId, {
1160
1160
  ...limit === void 0 ? {} : { limit }
1161
1161
  });
1162
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
1162
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, { json: options.json });
1163
1163
  }
1164
1164
  async function handleMonitorJobCancel(jobId, options) {
1165
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.jobs.cancel(jobId);
1166
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, {
1165
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.jobs.cancel(jobId);
1166
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, {
1167
1167
  json: options.json,
1168
1168
  text: renderMonitorJob(payload)
1169
1169
  });
@@ -1472,7 +1472,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
1472
1472
  `;
1473
1473
  }
1474
1474
  function reportFleetState(payload, error, options) {
1475
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
1475
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
1476
1476
  {
1477
1477
  ...payload,
1478
1478
  code: error.code,
@@ -1488,8 +1488,25 @@ Next: ${error.next}
1488
1488
  );
1489
1489
  process.exitCode = monitorsErrorExitCode(error);
1490
1490
  }
1491
+ function fleetBillingSuspendedError(fleetId, payload, options) {
1492
+ const reason = asString(_optionalChain([asRecord, 'call', _31 => _31(payload.billing_suspension), 'optionalAccess', _32 => _32.reason]));
1493
+ const suspended = `Fleet ${fleetId} is suspended for billing${reason ? ` (${reason})` : ""}: its monitors are stopped`;
1494
+ if (_optionalChain([options, 'optionalAccess', _33 => _33.deactivating])) {
1495
+ const deactivateCommand = `deepline monitors fleets deactivate ${fleetShellArg(fleetId)} --yes --wait`;
1496
+ return new MonitorFleetStateError({
1497
+ code: "MONITOR_FLEET_BILLING_SUSPENDED",
1498
+ message: `${suspended}, but it is not deactivated. To finish, run: ${deactivateCommand}`,
1499
+ next: _nullishCoalesce(fleetServerNext(payload), () => ( deactivateCommand))
1500
+ });
1501
+ }
1502
+ return new MonitorFleetStateError({
1503
+ code: "MONITOR_FLEET_BILLING_SUSPENDED",
1504
+ message: `${suspended}, and waiting will not restart them. Once the workspace can pay again, run: deepline monitors fleets reactivate ${fleetShellArg(fleetId)} --yes --wait`,
1505
+ next: _nullishCoalesce(fleetServerNext(payload), () => ( "deepline billing balance"))
1506
+ });
1507
+ }
1491
1508
  function fleetSourceTable(value) {
1492
- const [schema, table, extra] = _nullishCoalesce(_optionalChain([value, 'optionalAccess', _31 => _31.trim, 'call', _32 => _32(), 'access', _33 => _33.split, 'call', _34 => _34(".")]), () => ( []));
1509
+ const [schema, table, extra] = _nullishCoalesce(_optionalChain([value, 'optionalAccess', _34 => _34.trim, 'call', _35 => _35(), 'access', _36 => _36.split, 'call', _37 => _37(".")]), () => ( []));
1493
1510
  if (!schema || !table || extra || !/^[A-Za-z_][A-Za-z0-9_]*$/.test(schema) || !/^[A-Za-z_][A-Za-z0-9_]*$/.test(table)) {
1494
1511
  throw new MonitorsUsageError(
1495
1512
  "--source must be a Customer DB table in schema.table form."
@@ -1498,7 +1515,7 @@ function fleetSourceTable(value) {
1498
1515
  return { schema, table };
1499
1516
  }
1500
1517
  function fleetColumnName(value, flag) {
1501
- const name = _optionalChain([value, 'optionalAccess', _35 => _35.trim, 'call', _36 => _36()]);
1518
+ const name = _optionalChain([value, 'optionalAccess', _38 => _38.trim, 'call', _39 => _39()]);
1502
1519
  if (!name || !/^[A-Za-z_][A-Za-z0-9_]*$/.test(name)) {
1503
1520
  throw new MonitorsUsageError(`${flag} must be a SQL column identifier.`);
1504
1521
  }
@@ -1543,13 +1560,13 @@ async function handleMonitorFleetsInit(fleetId, options) {
1543
1560
  }
1544
1561
  const source = fleetSourceTable(options.source);
1545
1562
  const key = fleetColumnName(options.key, "--key");
1546
- const keyType = _nullishCoalesce(_optionalChain([options, 'access', _37 => _37.keyType, 'optionalAccess', _38 => _38.trim, 'call', _39 => _39()]), () => ( "text"));
1563
+ const keyType = _nullishCoalesce(_optionalChain([options, 'access', _40 => _40.keyType, 'optionalAccess', _41 => _41.trim, 'call', _42 => _42()]), () => ( "text"));
1547
1564
  if (!["text", "uuid", "int4", "int8"].includes(keyType)) {
1548
1565
  throw new MonitorsUsageError(
1549
1566
  "--key-type must be text, uuid, int4, or int8."
1550
1567
  );
1551
1568
  }
1552
- const tool = _optionalChain([options, 'access', _40 => _40.tool, 'optionalAccess', _41 => _41.trim, 'call', _42 => _42()]);
1569
+ const tool = _optionalChain([options, 'access', _43 => _43.tool, 'optionalAccess', _44 => _44.trim, 'call', _45 => _45()]);
1553
1570
  if (!tool) throw new MonitorsUsageError("--tool is required.");
1554
1571
  if (!options.payload) {
1555
1572
  throw new MonitorsUsageError(
@@ -1558,7 +1575,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
1558
1575
  }
1559
1576
  const payload = parseJsonObjectArg(options.payload, "--payload");
1560
1577
  const where = options.where ? parseJsonObjectArg(options.where, "--where") : void 0;
1561
- const out = _optionalChain([options, 'access', _43 => _43.out, 'optionalAccess', _44 => _44.trim, 'call', _45 => _45()]);
1578
+ const out = _optionalChain([options, 'access', _46 => _46.out, 'optionalAccess', _47 => _47.trim, 'call', _48 => _48()]);
1562
1579
  if (!out) throw new MonitorsUsageError("--out is required.");
1563
1580
  const authoredDefinition = {
1564
1581
  version: 2,
@@ -1587,7 +1604,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
1587
1604
  _fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
1588
1605
  `, "utf8");
1589
1606
  const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
1590
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
1607
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
1591
1608
  { schemaVersion: 2, file, definition, next },
1592
1609
  {
1593
1610
  json: options.json,
@@ -1627,8 +1644,8 @@ function fleetSyncCommandLine(target, options) {
1627
1644
  }
1628
1645
  async function handleMonitorFleetsSync(target, options, idempotencyKey) {
1629
1646
  const fileDefinitions = options.file ? readMonitorDefinitionsJsonFile(options.file) : void 0;
1630
- const usesDefinition = options.file !== void 0 || _optionalChain([target, 'optionalAccess', _46 => _46.trim, 'call', _47 => _47(), 'access', _48 => _48.startsWith, 'call', _49 => _49("{")]) === true;
1631
- if (!usesDefinition && !_optionalChain([target, 'optionalAccess', _50 => _50.trim, 'call', _51 => _51()])) {
1647
+ const usesDefinition = options.file !== void 0 || _optionalChain([target, 'optionalAccess', _49 => _49.trim, 'call', _50 => _50(), 'access', _51 => _51.startsWith, 'call', _52 => _52("{")]) === true;
1648
+ if (!usesDefinition && !_optionalChain([target, 'optionalAccess', _53 => _53.trim, 'call', _54 => _54()])) {
1632
1649
  throw new MonitorsUsageError(
1633
1650
  "sync needs a fleet: pass --file fleet.json to apply a definition, or <fleet-id> to re-plan the stored one.\n deepline monitors fleets sync --file fleet.json --dry-run\n deepline monitors fleets sync <fleet-id> --dry-run"
1634
1651
  );
@@ -1649,7 +1666,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
1649
1666
  'The Fleet definition has no id. Add a top-level "id" and re-run.'
1650
1667
  );
1651
1668
  }
1652
- const client = new (0, _chunkE47VAVARjs.DeeplineClient)();
1669
+ const client = new (0, _chunkBU5Y7HODjs.DeeplineClient)();
1653
1670
  const payload = await client.monitors.fleets.sync(
1654
1671
  _nullishCoalesce(definition, () => ( fleetId)),
1655
1672
  {
@@ -1671,7 +1688,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
1671
1688
  }
1672
1689
  const accepted = { ...payload, idempotency_key: idempotencyKey };
1673
1690
  if (!options.wait || options.dryRun) {
1674
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, accepted, {
1691
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, accepted, {
1675
1692
  json: options.json,
1676
1693
  text: renderFleetSync(payload, {
1677
1694
  fleetId,
@@ -1697,7 +1714,14 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
1697
1714
  const status = fleetStatus(final);
1698
1715
  const summary = renderFleetGet(final);
1699
1716
  if (status === "converged") {
1700
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
1717
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
1718
+ return;
1719
+ }
1720
+ if (status === "billing_suspended") {
1721
+ reportFleetState(envelope, fleetBillingSuspendedError(fleetId, final), {
1722
+ json: options.json,
1723
+ text: summary
1724
+ });
1701
1725
  return;
1702
1726
  }
1703
1727
  const driftCommand = `deepline monitors fleets get ${fleetShellArg(fleetId)} --drift`;
@@ -1730,14 +1754,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
1730
1754
  );
1731
1755
  }
1732
1756
  const limit = options.limit === void 0 ? void 0 : fleetIntegerOption(options.limit, "--limit");
1733
- const client = new (0, _chunkE47VAVARjs.DeeplineClient)();
1757
+ const client = new (0, _chunkBU5Y7HODjs.DeeplineClient)();
1734
1758
  const payload = await client.monitors.fleets.get(fleetId, {
1735
1759
  ...options.drift ? { drift: true } : {},
1736
1760
  ...limit !== void 0 ? { limit } : {}
1737
1761
  });
1738
1762
  const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
1739
1763
  if (!options.check) {
1740
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
1764
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
1741
1765
  return;
1742
1766
  }
1743
1767
  const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
@@ -1745,7 +1769,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
1745
1769
  );
1746
1770
  const unconverged = statuses.filter((status) => status !== "converged");
1747
1771
  if (unconverged.length === 0) {
1748
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
1772
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
1749
1773
  return;
1750
1774
  }
1751
1775
  const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
@@ -1784,13 +1808,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
1784
1808
  ${fleetReactivateCommandLine(fleetId, options)}`
1785
1809
  );
1786
1810
  }
1787
- const client = new (0, _chunkE47VAVARjs.DeeplineClient)();
1811
+ const client = new (0, _chunkBU5Y7HODjs.DeeplineClient)();
1788
1812
  const payload = await client.monitors.fleets.reactivate(fleetId, {
1789
1813
  idempotencyKey
1790
1814
  });
1791
1815
  const accepted = { ...payload, idempotency_key: idempotencyKey };
1792
1816
  if (!options.wait) {
1793
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, accepted, {
1817
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, accepted, {
1794
1818
  json: options.json,
1795
1819
  text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
1796
1820
  idempotency key ${idempotencyKey}
@@ -1813,7 +1837,14 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
1813
1837
  const envelope = { ...accepted, ...final };
1814
1838
  const text = renderFleetGet(final);
1815
1839
  if (fleetStatus(final) === "converged") {
1816
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
1840
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
1841
+ return;
1842
+ }
1843
+ if (fleetStatus(final) === "billing_suspended") {
1844
+ reportFleetState(envelope, fleetBillingSuspendedError(fleetId, final), {
1845
+ json: options.json,
1846
+ text
1847
+ });
1817
1848
  return;
1818
1849
  }
1819
1850
  reportFleetState(
@@ -1855,7 +1886,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
1855
1886
  }
1856
1887
  }
1857
1888
  async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
1858
- const client = new (0, _chunkE47VAVARjs.DeeplineClient)();
1889
+ const client = new (0, _chunkBU5Y7HODjs.DeeplineClient)();
1859
1890
  if (options.dryRun) {
1860
1891
  const plan = await client.monitors.fleets.deactivate(fleetId, {
1861
1892
  dryRun: true,
@@ -1865,7 +1896,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
1865
1896
  command: "deepline monitors fleets deactivate",
1866
1897
  mutation: "fleet deactivate"
1867
1898
  });
1868
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, plan, {
1899
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, plan, {
1869
1900
  json: options.json,
1870
1901
  text: renderFleetDeactivatePlan(plan, fleetId)
1871
1902
  });
@@ -1903,7 +1934,7 @@ Preview the blast radius first:
1903
1934
  });
1904
1935
  const accepted = { ...payload, idempotency_key: idempotencyKey };
1905
1936
  if (payload.already === true) {
1906
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, accepted, {
1937
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, accepted, {
1907
1938
  json: options.json,
1908
1939
  text: `Fleet ${fleetId} is already deactivated.
1909
1940
  `
@@ -1915,7 +1946,7 @@ Preview the blast radius first:
1915
1946
  ` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
1916
1947
  ` : "");
1917
1948
  if (!options.wait) {
1918
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, accepted, {
1949
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, accepted, {
1919
1950
  json: options.json,
1920
1951
  text: acceptedText
1921
1952
  });
@@ -1937,7 +1968,15 @@ Preview the blast radius first:
1937
1968
  const envelope = { ...accepted, ...final };
1938
1969
  const summary = renderFleetGet(final);
1939
1970
  if (fleetStatus(final) === "deactivated") {
1940
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
1971
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
1972
+ return;
1973
+ }
1974
+ if (fleetStatus(final) === "billing_suspended") {
1975
+ reportFleetState(
1976
+ envelope,
1977
+ fleetBillingSuspendedError(fleetId, final, { deactivating: true }),
1978
+ { json: options.json, text: summary }
1979
+ );
1941
1980
  return;
1942
1981
  }
1943
1982
  reportFleetState(
@@ -1968,7 +2007,7 @@ function handleMonitorFleetsOverview(options) {
1968
2007
  "Agent notes:",
1969
2008
  ...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
1970
2009
  ];
1971
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
2010
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
1972
2011
  {
1973
2012
  schemaVersion: 1,
1974
2013
  lifecycle: MONITOR_FLEET_LIFECYCLE,
@@ -2025,8 +2064,8 @@ function renderMonitorGet(payload) {
2025
2064
  }
2026
2065
  for (const raw of Array.isArray(guidance.documentation) ? guidance.documentation : []) {
2027
2066
  const doc = asRecord(raw);
2028
- const label = asString(_optionalChain([doc, 'optionalAccess', _52 => _52.label]));
2029
- const url = asString(_optionalChain([doc, 'optionalAccess', _53 => _53.url]));
2067
+ const label = asString(_optionalChain([doc, 'optionalAccess', _55 => _55.label]));
2068
+ const url = asString(_optionalChain([doc, 'optionalAccess', _56 => _56.url]));
2030
2069
  if (label && url) lines.push(` Docs: ${label} \u2014 ${url}`);
2031
2070
  }
2032
2071
  const payloadExample = asRecord(guidance.payload_example);
@@ -2043,20 +2082,20 @@ function renderMonitorGet(payload) {
2043
2082
  );
2044
2083
  }
2045
2084
  const monitorSpec = asRecord(payload.monitor_spec);
2046
- if (_optionalChain([monitorSpec, 'optionalAccess', _54 => _54.available]) === false) {
2085
+ if (_optionalChain([monitorSpec, 'optionalAccess', _57 => _57.available]) === false) {
2047
2086
  lines.push(
2048
2087
  "",
2049
2088
  `Monitor spec: unavailable \u2014 ${_nullishCoalesce(asString(monitorSpec.message), () => ( "use the stored definition and check before an update."))}`
2050
2089
  );
2051
2090
  }
2052
- const specFields = Array.isArray(_optionalChain([monitorSpec, 'optionalAccess', _55 => _55.fields])) ? monitorSpec.fields.flatMap((value) => {
2091
+ const specFields = Array.isArray(_optionalChain([monitorSpec, 'optionalAccess', _58 => _58.fields])) ? monitorSpec.fields.flatMap((value) => {
2053
2092
  const field = asRecord(value);
2054
- const path = asString(_optionalChain([field, 'optionalAccess', _56 => _56.path]));
2055
- const description = asString(_optionalChain([field, 'optionalAccess', _57 => _57.description]));
2056
- const semantics = asString(_optionalChain([field, 'optionalAccess', _58 => _58.semantics]));
2057
- const applicability = asString(_optionalChain([field, 'optionalAccess', _59 => _59.applicability]));
2058
- const grammar = asRecord(_optionalChain([field, 'optionalAccess', _60 => _60.grammar]));
2059
- const grammarSyntax = asString(_optionalChain([grammar, 'optionalAccess', _61 => _61.syntax]));
2093
+ const path = asString(_optionalChain([field, 'optionalAccess', _59 => _59.path]));
2094
+ const description = asString(_optionalChain([field, 'optionalAccess', _60 => _60.description]));
2095
+ const semantics = asString(_optionalChain([field, 'optionalAccess', _61 => _61.semantics]));
2096
+ const applicability = asString(_optionalChain([field, 'optionalAccess', _62 => _62.applicability]));
2097
+ const grammar = asRecord(_optionalChain([field, 'optionalAccess', _63 => _63.grammar]));
2098
+ const grammarSyntax = asString(_optionalChain([grammar, 'optionalAccess', _64 => _64.syntax]));
2060
2099
  return path ? [
2061
2100
  {
2062
2101
  path,
@@ -2092,10 +2131,10 @@ function renderMonitorGet(payload) {
2092
2131
  const name = _nullishCoalesce(asString(play.name), () => ( "unnamed Play"));
2093
2132
  const listener = asString(play.listener_key);
2094
2133
  const health = asRecord(play.consumer_health);
2095
- const runStatus = asString(_optionalChain([health, 'optionalAccess', _62 => _62.last_run_status]));
2096
- const lastDelivery = asFiniteNumber(_optionalChain([health, 'optionalAccess', _63 => _63.last_delivery_at]));
2097
- const runId = asString(_optionalChain([health, 'optionalAccess', _64 => _64.last_run_id]));
2098
- const error = asString(_optionalChain([health, 'optionalAccess', _65 => _65.last_error]));
2134
+ const runStatus = asString(_optionalChain([health, 'optionalAccess', _65 => _65.last_run_status]));
2135
+ const lastDelivery = asFiniteNumber(_optionalChain([health, 'optionalAccess', _66 => _66.last_delivery_at]));
2136
+ const runId = asString(_optionalChain([health, 'optionalAccess', _67 => _67.last_run_id]));
2137
+ const error = asString(_optionalChain([health, 'optionalAccess', _68 => _68.last_error]));
2099
2138
  lines.push(` ${name}${listener ? ` (listener: ${listener})` : ""}:`);
2100
2139
  lines.push(
2101
2140
  ` Latest delivered event: ${lastDelivery !== void 0 ? new Date(lastDelivery).toISOString() : "never"}`,
@@ -2122,14 +2161,14 @@ function renderMonitorGet(payload) {
2122
2161
  );
2123
2162
  }
2124
2163
  }
2125
- if (_optionalChain([dependents, 'optionalAccess', _66 => _66.truncated]) === true) {
2164
+ if (_optionalChain([dependents, 'optionalAccess', _69 => _69.truncated]) === true) {
2126
2165
  lines.push(" Results are truncated.");
2127
2166
  }
2128
2167
  return `${lines.join("\n")}
2129
2168
  `;
2130
2169
  }
2131
2170
  async function handleMonitorsGet(key, options) {
2132
- const client = new (0, _chunkE47VAVARjs.DeeplineClient)();
2171
+ const client = new (0, _chunkBU5Y7HODjs.DeeplineClient)();
2133
2172
  const payload = await client.monitors.get(key);
2134
2173
  const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
2135
2174
  const dependents = boundPlays ? {
@@ -2137,24 +2176,24 @@ async function handleMonitorsGet(key, options) {
2137
2176
  truncated: payload.consumer_health_truncated === true
2138
2177
  } : await client.monitors.dependents(key);
2139
2178
  const detail = { ...payload, dependents };
2140
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, detail, {
2179
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, detail, {
2141
2180
  json: options.json,
2142
2181
  text: renderMonitorGet(detail)
2143
2182
  });
2144
2183
  }
2145
2184
  async function handleMonitorsTest(key, payload, options) {
2146
2185
  const explicitPayload = parseJsonObjectArg(payload, "<payload>");
2147
- const result = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.test(key, explicitPayload);
2186
+ const result = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.test(key, explicitPayload);
2148
2187
  const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
2149
2188
  mode: validation_only (no rows written, credits spent, or Plays dispatched)
2150
2189
  persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
2151
2190
  dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
2152
2191
  `;
2153
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, result, { json: options.json, text });
2192
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, result, { json: options.json, text });
2154
2193
  }
2155
2194
  async function handleMonitorsValidate(key, options) {
2156
- const result = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.validate(key);
2157
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, result, { json: options.json });
2195
+ const result = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.validate(key);
2196
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, result, { json: options.json });
2158
2197
  if (result.valid === false) process.exitCode = 7;
2159
2198
  }
2160
2199
  async function confirmMonitorDelete(key) {
@@ -2172,14 +2211,14 @@ async function confirmMonitorDelete(key) {
2172
2211
  }
2173
2212
  }
2174
2213
  async function handleMonitorsDelete(key, options) {
2175
- const client = new (0, _chunkE47VAVARjs.DeeplineClient)();
2214
+ const client = new (0, _chunkBU5Y7HODjs.DeeplineClient)();
2176
2215
  if (options.dryRun) {
2177
2216
  const payload2 = await client.monitors.delete(key, { dryRun: true });
2178
2217
  assertMonitorDryRunAcknowledged(payload2, {
2179
2218
  command: "deepline monitors delete",
2180
2219
  mutation: "delete"
2181
2220
  });
2182
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload2, {
2221
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload2, {
2183
2222
  json: options.json,
2184
2223
  text: renderMonitorDeletePlan(payload2, key)
2185
2224
  });
@@ -2199,7 +2238,7 @@ async function handleMonitorsDelete(key, options) {
2199
2238
  }
2200
2239
  }
2201
2240
  const payload = await client.monitors.delete(key);
2202
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
2241
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, { json: options.json });
2203
2242
  }
2204
2243
  async function handleMonitorsUpdate(key, patch, options) {
2205
2244
  const body = resolveMonitorJsonBody({
@@ -2208,29 +2247,29 @@ async function handleMonitorsUpdate(key, patch, options) {
2208
2247
  argLabel: "<patch>",
2209
2248
  command: `deepline monitors update ${key}`
2210
2249
  });
2211
- const payload = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.update(key, body);
2212
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
2250
+ const payload = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.update(key, body);
2251
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, { json: options.json });
2213
2252
  }
2214
2253
  async function handleMonitorsReactivate(key, options) {
2215
- const client = new (0, _chunkE47VAVARjs.DeeplineClient)();
2254
+ const client = new (0, _chunkBU5Y7HODjs.DeeplineClient)();
2216
2255
  if (options.dryRun) {
2217
2256
  const payload2 = await client.monitors.reactivate(key, { dryRun: true });
2218
2257
  assertMonitorDryRunAcknowledged(payload2, {
2219
2258
  command: "deepline monitors reactivate",
2220
2259
  mutation: "reactivate"
2221
2260
  });
2222
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload2, {
2261
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload2, {
2223
2262
  json: options.json,
2224
2263
  text: renderMonitorReactivatePlan(payload2, key)
2225
2264
  });
2226
2265
  return;
2227
2266
  }
2228
2267
  const payload = await client.monitors.reactivate(key);
2229
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
2268
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, payload, { json: options.json });
2230
2269
  }
2231
2270
  var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
2232
2271
  function monitorHealthLine(health) {
2233
- if (_optionalChain([health, 'access', _67 => _67.refresh, 'optionalAccess', _68 => _68.state]) === "running") {
2272
+ if (_optionalChain([health, 'access', _70 => _70.refresh, 'optionalAccess', _71 => _71.state]) === "running") {
2234
2273
  return `refreshing whole scope \xB7 scanned ${health.scanned} so far`;
2235
2274
  }
2236
2275
  const alignmentRequired = _nullishCoalesce(health.alignment_required, () => ( 0));
@@ -2275,7 +2314,7 @@ async function watchMonitorHealth(input) {
2275
2314
  while (Date.now() < deadlineAt) {
2276
2315
  const unresolved = last.observed.unknown + last.observed.unset;
2277
2316
  const alignmentRequired = _nullishCoalesce(last.alignment_required, () => ( 0));
2278
- if (_optionalChain([last, 'access', _69 => _69.refresh, 'optionalAccess', _70 => _70.state]) !== "running" && !last.truncated && last.needs_repair === 0 && (unresolved === 0 || alignmentRequired === unresolved)) {
2317
+ if (_optionalChain([last, 'access', _72 => _72.refresh, 'optionalAccess', _73 => _73.state]) !== "running" && !last.truncated && last.needs_repair === 0 && (unresolved === 0 || alignmentRequired === unresolved)) {
2279
2318
  return last;
2280
2319
  }
2281
2320
  await new Promise(
@@ -2287,13 +2326,13 @@ async function watchMonitorHealth(input) {
2287
2326
  return last;
2288
2327
  }
2289
2328
  function monitorHealthText(health) {
2290
- const partial = _optionalChain([health, 'access', _71 => _71.refresh, 'optionalAccess', _72 => _72.state]) === "running" ? " (refreshing \u2014 counts below are not final)" : health.truncated ? " (partial \u2014 scope larger than one read)" : "";
2329
+ const partial = _optionalChain([health, 'access', _74 => _74.refresh, 'optionalAccess', _75 => _75.state]) === "running" ? " (refreshing \u2014 counts below are not final)" : health.truncated ? " (partial \u2014 scope larger than one read)" : "";
2291
2330
  const unauditedMonitors = _nullishCoalesce(health.unaudited_monitors, () => ( []));
2292
2331
  const lines = [
2293
2332
  `scope: ${_nullishCoalesce(health.scope.fleet_id, () => ( "workspace"))}${partial}`,
2294
2333
  monitorHealthLine(health)
2295
2334
  ];
2296
- if ((_nullishCoalesce(_optionalChain([health, 'access', _73 => _73.batch_operations, 'optionalAccess', _74 => _74.length]), () => ( 0))) > 0) {
2335
+ if ((_nullishCoalesce(_optionalChain([health, 'access', _76 => _76.batch_operations, 'optionalAccess', _77 => _77.length]), () => ( 0))) > 0) {
2297
2336
  lines.push("");
2298
2337
  lines.push("batch work in progress:");
2299
2338
  for (const operation of _nullishCoalesce(health.batch_operations, () => ( []))) {
@@ -2348,8 +2387,8 @@ function monitorHealthText(health) {
2348
2387
  `;
2349
2388
  }
2350
2389
  async function handleMonitorsAudit(options) {
2351
- const client = new (0, _chunkE47VAVARjs.DeeplineClient)();
2352
- const fleetId = _optionalChain([options, 'access', _75 => _75.fleet, 'optionalAccess', _76 => _76.trim, 'call', _77 => _77()]) || void 0;
2390
+ const client = new (0, _chunkBU5Y7HODjs.DeeplineClient)();
2391
+ const fleetId = _optionalChain([options, 'access', _78 => _78.fleet, 'optionalAccess', _79 => _79.trim, 'call', _80 => _80()]) || void 0;
2353
2392
  const scope = fleetId ? { fleetId } : {};
2354
2393
  let result = await client.monitors.audit(scope);
2355
2394
  const passes = [result.audit];
@@ -2392,7 +2431,7 @@ async function handleMonitorsAudit(options) {
2392
2431
  "",
2393
2432
  monitorHealthText(health)
2394
2433
  ].join("\n");
2395
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
2434
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
2396
2435
  { ...result, audit: { ...result.audit, totals }, health },
2397
2436
  { json: options.json, text }
2398
2437
  );
@@ -2400,15 +2439,15 @@ async function handleMonitorsAudit(options) {
2400
2439
  async function handleMonitorsRepair(options) {
2401
2440
  return await handleMonitorBatch("repair", {
2402
2441
  ...options,
2403
- ..._optionalChain([options, 'access', _78 => _78.fleet, 'optionalAccess', _79 => _79.trim, 'call', _80 => _80()]) ? {} : { target: "needs-repair" }
2442
+ ..._optionalChain([options, 'access', _81 => _81.fleet, 'optionalAccess', _82 => _82.trim, 'call', _83 => _83()]) ? {} : { target: "needs-repair" }
2404
2443
  });
2405
2444
  }
2406
2445
  async function handleMonitorsHealth(options) {
2407
- const fleetId = _optionalChain([options, 'access', _81 => _81.fleet, 'optionalAccess', _82 => _82.trim, 'call', _83 => _83()]) || void 0;
2408
- const health = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.health(
2446
+ const fleetId = _optionalChain([options, 'access', _84 => _84.fleet, 'optionalAccess', _85 => _85.trim, 'call', _86 => _86()]) || void 0;
2447
+ const health = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.health(
2409
2448
  fleetId ? { fleetId } : {}
2410
2449
  );
2411
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, health, {
2450
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, health, {
2412
2451
  json: options.json,
2413
2452
  text: monitorHealthText(health)
2414
2453
  });
@@ -2416,8 +2455,8 @@ async function handleMonitorsHealth(options) {
2416
2455
  function monitorBatchScope(options, kind) {
2417
2456
  const selectors = [
2418
2457
  options.target ? "target" : null,
2419
- _optionalChain([options, 'access', _84 => _84.fleet, 'optionalAccess', _85 => _85.trim, 'call', _86 => _86()]) ? "fleet" : null,
2420
- _optionalChain([options, 'access', _87 => _87.keys, 'optionalAccess', _88 => _88.trim, 'call', _89 => _89()]) ? "keys" : null
2458
+ _optionalChain([options, 'access', _87 => _87.fleet, 'optionalAccess', _88 => _88.trim, 'call', _89 => _89()]) ? "fleet" : null,
2459
+ _optionalChain([options, 'access', _90 => _90.keys, 'optionalAccess', _91 => _91.trim, 'call', _92 => _92()]) ? "keys" : null
2421
2460
  ].filter((value) => value !== null);
2422
2461
  if (selectors.length === 0 && kind === "audit") {
2423
2462
  return { kind: "target", target: "all" };
@@ -2428,7 +2467,7 @@ function monitorBatchScope(options, kind) {
2428
2467
  );
2429
2468
  }
2430
2469
  if (options.target) return { kind: "target", target: options.target };
2431
- if (_optionalChain([options, 'access', _90 => _90.fleet, 'optionalAccess', _91 => _91.trim, 'call', _92 => _92()]))
2470
+ if (_optionalChain([options, 'access', _93 => _93.fleet, 'optionalAccess', _94 => _94.trim, 'call', _95 => _95()]))
2432
2471
  return { kind: "fleet", fleetId: options.fleet.trim() };
2433
2472
  const monitorKeys = (_nullishCoalesce(options.keys, () => ( ""))).split(",").map((key) => key.trim()).filter(Boolean);
2434
2473
  if (monitorKeys.length === 0) {
@@ -2439,7 +2478,7 @@ function monitorBatchScope(options, kind) {
2439
2478
  return { kind: "keys", monitorKeys };
2440
2479
  }
2441
2480
  function monitorBatchIdempotencyKey(kind, value) {
2442
- return _optionalChain([value, 'optionalAccess', _93 => _93.trim, 'call', _94 => _94()]) || `monitor-batch-${kind}-${_crypto.randomUUID.call(void 0, )}`;
2481
+ return _optionalChain([value, 'optionalAccess', _96 => _96.trim, 'call', _97 => _97()]) || `monitor-batch-${kind}-${_crypto.randomUUID.call(void 0, )}`;
2443
2482
  }
2444
2483
  function isCanonicalBatchJsonDocument(raw) {
2445
2484
  try {
@@ -2452,7 +2491,7 @@ function isCanonicalBatchJsonDocument(raw) {
2452
2491
  }
2453
2492
  }
2454
2493
  async function handleMonitorBatchDeploy(options) {
2455
- if (!_optionalChain([options, 'access', _95 => _95.file, 'optionalAccess', _96 => _96.trim, 'call', _97 => _97()])) {
2494
+ if (!_optionalChain([options, 'access', _98 => _98.file, 'optionalAccess', _99 => _99.trim, 'call', _100 => _100()])) {
2456
2495
  throw new MonitorsUsageError(
2457
2496
  "monitors batch deploy requires --file <monitors.ndjson>."
2458
2497
  );
@@ -2482,14 +2521,14 @@ async function handleMonitorBatchDeploy(options) {
2482
2521
  "deploy",
2483
2522
  options.idempotencyKey
2484
2523
  );
2485
- const result = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.batch.submit({
2524
+ const result = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.batch.submit({
2486
2525
  kind: "deploy",
2487
2526
  manifestNdjson,
2488
2527
  dryRun: options.dryRun === true,
2489
2528
  idempotencyKey
2490
2529
  });
2491
2530
  const operation = result.operation;
2492
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
2531
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
2493
2532
  { ...result, idempotency_key: idempotencyKey },
2494
2533
  {
2495
2534
  json: options.json,
@@ -2508,7 +2547,7 @@ async function handleMonitorBatch(kind, options) {
2508
2547
  );
2509
2548
  }
2510
2549
  const scope = monitorBatchScope(options, kind);
2511
- if (kind === "deactivate" && scope.kind === "target" && !_optionalChain([options, 'access', _98 => _98.reason, 'optionalAccess', _99 => _99.trim, 'call', _100 => _100()])) {
2550
+ if (kind === "deactivate" && scope.kind === "target" && !_optionalChain([options, 'access', _101 => _101.reason, 'optionalAccess', _102 => _102.trim, 'call', _103 => _103()])) {
2512
2551
  throw new MonitorsUsageError(
2513
2552
  "monitors batch deactivate --target requires --reason (for example insufficient_balance or billing_failure). Omit --reason with --keys for a customer-requested teardown."
2514
2553
  );
@@ -2517,11 +2556,11 @@ async function handleMonitorBatch(kind, options) {
2517
2556
  kind,
2518
2557
  options.idempotencyKey
2519
2558
  );
2520
- const result = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.batch.submit({
2559
+ const result = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.batch.submit({
2521
2560
  kind,
2522
2561
  scope,
2523
2562
  dryRun: options.dryRun === true,
2524
- ..._optionalChain([options, 'access', _101 => _101.reason, 'optionalAccess', _102 => _102.trim, 'call', _103 => _103()]) ? { deactivationReason: options.reason.trim() } : {},
2563
+ ..._optionalChain([options, 'access', _104 => _104.reason, 'optionalAccess', _105 => _105.trim, 'call', _106 => _106()]) ? { deactivationReason: options.reason.trim() } : {},
2525
2564
  idempotencyKey
2526
2565
  });
2527
2566
  const operation = result.operation;
@@ -2530,14 +2569,14 @@ async function handleMonitorBatch(kind, options) {
2530
2569
  `state ${operation.state} \xB7 retry key ${idempotencyKey}`,
2531
2570
  `inspect: deepline monitors batch get ${operation.runId}`
2532
2571
  ].join("\n");
2533
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0,
2572
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0,
2534
2573
  { ...result, idempotency_key: idempotencyKey },
2535
2574
  { json: options.json, text: `${text}
2536
2575
  ` }
2537
2576
  );
2538
2577
  }
2539
2578
  async function handleMonitorBatchGet(operationId, options) {
2540
- const result = await new (0, _chunkE47VAVARjs.DeeplineClient)().monitors.batch.get(operationId, {
2579
+ const result = await new (0, _chunkBU5Y7HODjs.DeeplineClient)().monitors.batch.get(operationId, {
2541
2580
  ...options.cursor ? { cursor: options.cursor } : {}
2542
2581
  });
2543
2582
  const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
@@ -2549,7 +2588,7 @@ async function handleMonitorBatchGet(operationId, options) {
2549
2588
  `results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
2550
2589
  ] : []
2551
2590
  ].join("\n");
2552
- _chunkZDTPSVGFjs.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
2591
+ _chunkZZD245Z2js.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
2553
2592
  ` });
2554
2593
  }
2555
2594
  function registerMonitorsCommands(program) {
@@ -3235,7 +3274,8 @@ Notes:
3235
3274
  never becomes a request. A bare <fleet-id> re-plans the stored definition.
3236
3275
  The plan always shows blocked members; they are never hidden.
3237
3276
  --wait polls until Deepline reports a terminal status: converged exits 0,
3238
- degraded exits 6, and a timeout exits 6 without implying anything broke.
3277
+ degraded or billing_suspended exits 6 at once, and a timeout exits 6
3278
+ without implying anything broke.
3239
3279
  Progress goes to stderr, so stdout stays exactly one JSON object.
3240
3280
 
3241
3281
  Examples: