deepline 0.3.505 → 0.3.507

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 (168) hide show
  1. package/dist/bundling-sources/sdk/src/client-core.ts +148 -11
  2. package/dist/bundling-sources/sdk/src/index.ts +3 -0
  3. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  4. package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +2 -0
  5. package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +38 -1
  6. package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +176 -0
  7. package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +17 -0
  8. package/dist/bundling-sources/shared_libs/monitors/fleets/overview.ts +118 -0
  9. package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +29 -1
  10. package/dist/bundling-sources/shared_libs/monitors/fleets/verdict.ts +4 -2
  11. package/dist/bundling-sources/shared_libs/monitors/legacy-radar-retirement.ts +29 -10
  12. package/dist/bundling-sources/shared_libs/monitors/package.json +6 -0
  13. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +15 -0
  14. package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +24 -4
  15. package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +405 -0
  16. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +8 -8
  17. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +52 -5
  18. package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +6 -1
  19. package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +48 -5
  20. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +13 -40
  21. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +36 -3
  22. package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-egress.ts +55 -0
  23. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +66 -0
  24. package/dist/cli/auth-6PJ4G5PC.js +43 -0
  25. package/dist/cli/{auth-AHE2EDQA.mjs → auth-BNP3M27C.mjs} +5 -5
  26. package/dist/cli/{billing-JOIZPHON.js → billing-7HIVX4YJ.js} +101 -91
  27. package/dist/cli/{billing-7CPWTGGI.mjs → billing-JKJ2AEZ6.mjs} +27 -17
  28. package/dist/cli/{chunk-PDLOPF5L.mjs → chunk-2OKEMB5A.mjs} +1 -1
  29. package/dist/cli/{chunk-HASFFOSU.js → chunk-2ZINJVWW.js} +16 -16
  30. package/dist/cli/{chunk-MHZAG2ZQ.js → chunk-3D5ZNYYI.js} +93 -60
  31. package/dist/cli/{chunk-7DDACLMX.js → chunk-56SRWY5F.js} +16 -16
  32. package/dist/cli/{chunk-QGNNAZ5M.mjs → chunk-5A66OJZD.mjs} +1 -1
  33. package/dist/cli/{chunk-UZ24SF7N.mjs → chunk-5I2XKXLS.mjs} +5 -5
  34. package/dist/cli/{chunk-SPN7U3MV.js → chunk-5PXGAA2M.js} +4 -4
  35. package/dist/cli/{chunk-EMUFF6EU.js → chunk-6AQO5OJ5.js} +7 -7
  36. package/dist/cli/{chunk-WTQLUULB.js → chunk-76R5I7HR.js} +6 -6
  37. package/dist/cli/{chunk-OMEDQ77C.mjs → chunk-7TZA6LJI.mjs} +5 -5
  38. package/dist/cli/{chunk-JVKEZT7L.mjs → chunk-AFSYNOG4.mjs} +22 -1
  39. package/dist/cli/{chunk-OORPAQVC.js → chunk-AXYLMDU3.js} +8 -8
  40. package/dist/cli/{chunk-FIQ5UEIF.mjs → chunk-D2T4W5LR.mjs} +2 -2
  41. package/dist/cli/{chunk-Y52XY56V.js → chunk-E5HGDYU3.js} +41 -41
  42. package/dist/cli/{chunk-3YEOOXD4.js → chunk-E7YIIEZU.js} +11 -11
  43. package/dist/cli/{chunk-NARJWXBR.mjs → chunk-EEJLV77L.mjs} +2 -2
  44. package/dist/cli/{chunk-7DDKLFOY.mjs → chunk-EYZJDHXA.mjs} +3 -3
  45. package/dist/cli/{chunk-K26YOPDO.js → chunk-GDHLL5EQ.js} +22 -1
  46. package/dist/cli/{chunk-WTUC5VKB.mjs → chunk-GMRWVXU2.mjs} +2 -2
  47. package/dist/cli/{chunk-PZN24YQQ.mjs → chunk-H334EFON.mjs} +2 -2
  48. package/dist/cli/{chunk-RT3HJBIH.mjs → chunk-H6PABDS4.mjs} +10 -10
  49. package/dist/cli/{chunk-7QLK2GHL.js → chunk-HPZONIDF.js} +5 -5
  50. package/dist/cli/{chunk-5XT4DZQL.mjs → chunk-IBKWVFWP.mjs} +2 -2
  51. package/dist/cli/{chunk-45XYW477.js → chunk-ILUZ7IHP.js} +21 -21
  52. package/dist/cli/{chunk-SHKRL7CW.mjs → chunk-IWZRQ6YW.mjs} +1 -1
  53. package/dist/cli/{chunk-ACI6CUDX.mjs → chunk-JCE2JNGD.mjs} +78 -45
  54. package/dist/cli/{chunk-XHPB6RGY.js → chunk-JPN6OBPW.js} +1 -1
  55. package/dist/cli/{chunk-W6I4N4JN.mjs → chunk-LSONU2E2.mjs} +6 -6
  56. package/dist/cli/{chunk-VXKWF3AD.js → chunk-MN5HO2PN.js} +9 -9
  57. package/dist/cli/{chunk-6FEN6VWZ.js → chunk-MQRT5NYP.js} +26 -26
  58. package/dist/cli/{chunk-52FPW2RD.mjs → chunk-NJRJGXVF.mjs} +2 -2
  59. package/dist/cli/{chunk-BWAYMJ23.js → chunk-OBATCFZO.js} +91 -48
  60. package/dist/cli/{chunk-YBIVVAL7.mjs → chunk-OPEJASMJ.mjs} +3 -3
  61. package/dist/cli/{chunk-GXMNOUHP.js → chunk-QWRSWQ7Z.js} +7 -7
  62. package/dist/cli/{chunk-GAUNJCXQ.js → chunk-REFT4DMJ.js} +96 -96
  63. package/dist/cli/{chunk-QYGYVCRI.js → chunk-RFJANXCC.js} +14 -14
  64. package/dist/cli/{chunk-4OFSAZN6.mjs → chunk-RTLWYERT.mjs} +46 -3
  65. package/dist/cli/{chunk-CSLLQWAB.mjs → chunk-T6FUNWXX.mjs} +1 -1
  66. package/dist/cli/{chunk-JA7YBRP4.mjs → chunk-TVR4R2E6.mjs} +1 -1
  67. package/dist/cli/{chunk-ZLN2B5YA.js → chunk-TZ7APOBM.js} +3 -3
  68. package/dist/cli/{chunk-JSTKLYYD.js → chunk-V2K34NAO.js} +2 -2
  69. package/dist/cli/{chunk-WPCF7C6B.js → chunk-V4GGTOCX.js} +3 -3
  70. package/dist/cli/{chunk-IZYOYXG7.mjs → chunk-VGEBRTHF.mjs} +4 -4
  71. package/dist/cli/{chunk-OA6U5NVB.mjs → chunk-VQLD5M43.mjs} +5 -5
  72. package/dist/cli/{chunk-LC4FG34E.js → chunk-WOPWSAGS.js} +53 -53
  73. package/dist/cli/{chunk-MAFZ64RN.mjs → chunk-WQAHMVBT.mjs} +2 -2
  74. package/dist/cli/{chunk-IDAE5VDH.js → chunk-WTY2R4R3.js} +5 -5
  75. package/dist/cli/{chunk-6U3AGJWI.mjs → chunk-XKGNEN4P.mjs} +1 -1
  76. package/dist/cli/{chunk-7AD565DO.mjs → chunk-YAAJHS6W.mjs} +1 -1
  77. package/dist/cli/{chunk-CA3SYXCS.js → chunk-ZCNGMQVD.js} +2 -2
  78. package/dist/cli/command-docs.js +2 -2
  79. package/dist/cli/command-docs.mjs +1 -1
  80. package/dist/cli/{csv-WTPI6ZON.mjs → csv-LZTQOPP2.mjs} +4 -4
  81. package/dist/cli/{csv-DZHVIW3G.js → csv-WYJVU5HV.js} +13 -13
  82. package/dist/cli/{db-NR4PJ6AF.mjs → db-D6XFOQP3.mjs} +6 -6
  83. package/dist/cli/{db-D7LPPNCC.js → db-UCUXPY7S.js} +27 -27
  84. package/dist/cli/{describe-NCKAJPUG.mjs → describe-HKL2XK67.mjs} +18 -18
  85. package/dist/cli/describe-XS4OIASD.js +50 -0
  86. package/dist/cli/describe-core.d.mts +3 -3
  87. package/dist/cli/describe-core.d.ts +3 -3
  88. package/dist/cli/{executions-UQG6LWEN.js → executions-5CF5NM7V.js} +8 -8
  89. package/dist/cli/{executions-RQVJ4LAB.mjs → executions-AFHYXH73.mjs} +6 -6
  90. package/dist/cli/{feedback-TCHA67IA.js → feedback-GJAX3JZE.js} +8 -8
  91. package/dist/cli/{feedback-RD4Y3YQR.mjs → feedback-MLKQ572F.mjs} +4 -4
  92. package/dist/cli/{git-Z7434B7Y.mjs → git-BMLROZOU.mjs} +5 -5
  93. package/dist/cli/git-RIXUHRDL.js +25 -0
  94. package/dist/cli/index.js +145 -149
  95. package/dist/cli/index.mjs +46 -50
  96. package/dist/cli/{legacy-noops-23WRA7DH.js → legacy-noops-FHRDF7MC.js} +8 -8
  97. package/dist/cli/{legacy-noops-LQJU4UIV.mjs → legacy-noops-Y7JSQVLQ.mjs} +5 -5
  98. package/dist/cli/{monitors-KOWN7M3V.js → monitors-Z6RPIQIH.js} +450 -138
  99. package/dist/cli/{monitors-Z6VYUZ2W.mjs → monitors-ZEVK3UD7.mjs} +332 -20
  100. package/dist/cli/{org-UBNRO5XO.mjs → org-PFLVANIN.mjs} +6 -6
  101. package/dist/cli/{org-2T5K2VP5.js → org-TXJ3RES5.js} +72 -72
  102. package/dist/cli/{pages-GHPJBVV3.mjs → pages-BKEMQ2J7.mjs} +6 -6
  103. package/dist/cli/{pages-SRXTU7XO.js → pages-ESKKBK5Y.js} +18 -18
  104. package/dist/cli/{play-HRQKGTXA.mjs → play-4Z6Z7KVY.mjs} +18 -18
  105. package/dist/cli/{play-2HMZ57EZ.js → play-AAFOZJKQ.js} +317 -317
  106. package/dist/cli/{providers-JWJRFRR5.mjs → providers-KYP2UWDV.mjs} +6 -6
  107. package/dist/cli/{providers-P5O676MZ.js → providers-WEU4UNKY.js} +9 -9
  108. package/dist/cli/{quickstart-S7NZUQRO.mjs → quickstart-7EUDF4IL.mjs} +4 -4
  109. package/dist/cli/{quickstart-YCY72TAO.js → quickstart-DXYZCOJY.js} +6 -6
  110. package/dist/cli/{run-MHLLGF4G.js → run-3YN6P26W.js} +41 -41
  111. package/dist/cli/{run-QWMRIUIU.mjs → run-MB2R5PQ7.mjs} +23 -23
  112. package/dist/cli/{search-4BFTQUEP.mjs → search-MIFBESRE.mjs} +8 -8
  113. package/dist/cli/search-Z7GUKVFE.js +33 -0
  114. package/dist/cli/{search-output-LIYHDTBP.mjs → search-output-2IR3UA4W.mjs} +4 -4
  115. package/dist/cli/{search-output-62LBVZHN.js → search-output-NUWL47SR.js} +6 -6
  116. package/dist/cli/{secrets-KKKHVSOO.js → secrets-6UT6BIDJ.js} +15 -15
  117. package/dist/cli/{secrets-GW27V77E.mjs → secrets-E6WIYONW.mjs} +6 -6
  118. package/dist/cli/{sessions-R75LBGIL.mjs → sessions-AP7L6YCL.mjs} +5 -5
  119. package/dist/cli/{sessions-R3OEINAR.js → sessions-NF2RBXMJ.js} +6 -6
  120. package/dist/cli/{settings-MQIHAEZN.js → settings-FZWXYP4W.js} +106 -79
  121. package/dist/cli/{settings-I3AQZSYG.mjs → settings-MMLHJ5E5.mjs} +39 -12
  122. package/dist/cli/{setup-2YA5MYMS.mjs → setup-WJNN2CZZ.mjs} +10 -10
  123. package/dist/cli/{setup-X3QRJERP.js → setup-YHXAAJNZ.js} +50 -50
  124. package/dist/cli/skills-4YYUFNMS.js +37 -0
  125. package/dist/cli/{skills-7252FOOI.mjs → skills-KXZ5PJU2.mjs} +8 -8
  126. package/dist/cli/{tools-SKQTSVGE.mjs → tools-K6S7RX7B.mjs} +17 -17
  127. package/dist/cli/tools-OCYEMMUP.js +57 -0
  128. package/dist/cli/{update-GNBBSKTB.mjs → update-2SFWEVM6.mjs} +10 -10
  129. package/dist/cli/update-WQIPUQ4K.js +35 -0
  130. package/dist/cli/{workflow-OJSAL5FO.mjs → workflow-IR3RCVHZ.mjs} +7 -7
  131. package/dist/cli/{workflow-QB7YYWPP.js → workflow-SM3Q45X5.js} +17 -17
  132. package/dist/{client-B3GSaSFn.d.ts → client-BlwD-G4v.d.ts} +1 -1
  133. package/dist/{client-DEJg0CZn.d.mts → client-DMpsMNH9.d.mts} +1 -1
  134. package/dist/{client-core-C404E33V.d.mts → client-core-CITtRTbB.d.mts} +77 -11
  135. package/dist/{client-core-GQmy3N8y.d.ts → client-core-DwBLuEkm.d.ts} +77 -11
  136. package/dist/{compiler-manifest-DaJrA2KV.d.mts → compiler-manifest-BeURaD5Y.d.mts} +2 -0
  137. package/dist/{compiler-manifest-DaJrA2KV.d.ts → compiler-manifest-BeURaD5Y.d.ts} +2 -0
  138. package/dist/{errors-KLga4bLr.d.ts → errors-BoPXPrSy.d.ts} +1 -1
  139. package/dist/{errors-BKnSYueU.d.mts → errors-kBuT4kGK.d.mts} +1 -1
  140. package/dist/{index-C5nAZ-VS.d.ts → index-D0crdGM1.d.ts} +1 -1
  141. package/dist/{index-C-8AFpWy.d.mts → index-DC7oRAAC.d.mts} +1 -1
  142. package/dist/index.d.mts +7 -7
  143. package/dist/index.d.ts +7 -7
  144. package/dist/index.js +9 -9
  145. package/dist/index.mjs +6 -6
  146. package/dist/install-integrity.json +116 -112
  147. package/dist/plays/bundle-play-file.d.mts +3 -3
  148. package/dist/plays/bundle-play-file.d.ts +3 -3
  149. package/dist/plays/play-description.d.mts +2 -2
  150. package/dist/plays/play-description.d.ts +2 -2
  151. package/dist/plays/run-request.d.mts +2 -2
  152. package/dist/plays/run-request.d.ts +2 -2
  153. package/dist/release.d.mts +1 -1
  154. package/dist/release.d.ts +1 -1
  155. package/dist/release.js +2 -2
  156. package/dist/release.mjs +1 -1
  157. package/dist/server.d.mts +4 -4
  158. package/dist/server.d.ts +4 -4
  159. package/dist/server.js +5 -5
  160. package/dist/server.mjs +3 -3
  161. package/package.json +1 -1
  162. package/dist/cli/auth-SEPKNRHV.js +0 -43
  163. package/dist/cli/describe-HVQBTKFM.js +0 -50
  164. package/dist/cli/git-TUB2ZUEH.js +0 -25
  165. package/dist/cli/search-QPUHOEIL.js +0 -33
  166. package/dist/cli/skills-BPZWMZSL.js +0 -37
  167. package/dist/cli/tools-F7RVQ3IK.js +0 -57
  168. package/dist/cli/update-TLSY6LC2.js +0 -35
@@ -1,8 +1,8 @@
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 _chunkIDAE5VDHjs = require('./chunk-IDAE5VDH.js');
5
- require('./chunk-BWAYMJ23.js');
4
+ var _chunkWTY2R4R3js = require('./chunk-WTY2R4R3.js');
5
+ require('./chunk-OBATCFZO.js');
6
6
  require('./chunk-E4CABWXL.js');
7
7
  require('./chunk-RNSHCJME.js');
8
8
  require('./chunk-NMU3VR5U.js');
@@ -17,15 +17,15 @@ require('./chunk-UNEMDKXN.js');
17
17
  var _chunkIF75RD6Ujs = require('./chunk-IF75RD6U.js');
18
18
 
19
19
 
20
- var _chunkWPCF7C6Bjs = require('./chunk-WPCF7C6B.js');
20
+ var _chunkV4GGTOCXjs = require('./chunk-V4GGTOCX.js');
21
21
 
22
22
 
23
23
 
24
24
 
25
25
 
26
- var _chunkEMUFF6EUjs = require('./chunk-EMUFF6EU.js');
27
- require('./chunk-ZLN2B5YA.js');
28
- require('./chunk-SPN7U3MV.js');
26
+ var _chunk6AQO5OJ5js = require('./chunk-6AQO5OJ5.js');
27
+ require('./chunk-TZ7APOBM.js');
28
+ require('./chunk-5PXGAA2M.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-XHPB6RGY.js');
36
+ require('./chunk-JPN6OBPW.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 = _chunkEMUFF6EUjs.shouldEmitJson.call(void 0, process.argv.includes("--json"));
114
+ const wantsJson = _chunk6AQO5OJ5js.shouldEmitJson.call(void 0, process.argv.includes("--json"));
115
115
  if (wantsJson) {
116
- const payload = _chunkEMUFF6EUjs.errorToJsonPayload.call(void 0, error);
117
- _chunkEMUFF6EUjs.printJson.call(void 0, {
116
+ const payload = _chunk6AQO5OJ5js.errorToJsonPayload.call(void 0, error);
117
+ _chunk6AQO5OJ5js.printJson.call(void 0, {
118
118
  ok: false,
119
119
  exitCode,
120
120
  ...next ? { next } : {},
@@ -206,8 +206,13 @@ var MONITOR_STATES = /* @__PURE__ */ new Set([
206
206
  "active",
207
207
  "provisioning",
208
208
  "billing_suspended",
209
+ "errored",
209
210
  "disabled"
210
211
  ]);
212
+ function monitorFailureMessage(record) {
213
+ const failure = asRecord(record.failure);
214
+ return failure ? asString(failure.message) : void 0;
215
+ }
211
216
  function customerMonitorState(value) {
212
217
  if (typeof value === "string" && MONITOR_STATES.has(value)) {
213
218
  return value;
@@ -529,14 +534,14 @@ Preview the plan first with:
529
534
  );
530
535
  }
531
536
  async function handleMonitorsStatus(options) {
532
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.status();
537
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.status();
533
538
  const hasAccess = payload.has_access === true;
534
539
  const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
535
540
  const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
536
541
  ${reason}` : ""}
537
542
  ` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
538
543
  `;
539
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
544
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
540
545
  { has_access: hasAccess, ...reason ? { reason } : {} },
541
546
  { json: options.json, text }
542
547
  );
@@ -602,14 +607,14 @@ async function handleMonitorsAvailable(toolId, options) {
602
607
  }
603
608
  }
604
609
  const tool = _nullishCoalesce(toolId, () => ( options.tool));
605
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.available(tool, {
610
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.available(tool, {
606
611
  ...options.provider ? { provider: options.provider } : {},
607
612
  ...options.search ? { search: options.search } : {},
608
613
  ...options.limit ? { limit: options.limit } : {},
609
614
  ...options.full ? { full: true } : {},
610
615
  ...options.compact ? { compact: true } : {}
611
616
  });
612
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, {
617
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, {
613
618
  json: options.json,
614
619
  // Human list view shows id + name + deployed_count ("deployed: N") so
615
620
  // can-deploy vs already-deployed is visible in one view. Describing a
@@ -640,6 +645,10 @@ function renderDeployedListText(payload, requestedStatus, filterKind = "status")
640
645
  lines.push(
641
646
  ` ${key}${state ? ` ${state}` : ""}${tool ? ` ${tool}` : ""}${name ? ` (${name})` : ""}`
642
647
  );
648
+ const failureMessage = monitorFailureMessage(entry);
649
+ if (state === "errored" && failureMessage) {
650
+ lines.push(` error: ${failureMessage}`);
651
+ }
643
652
  if (outputTable || monitorType || webhookState || executionType || boundPlays !== void 0) {
644
653
  lines.push(
645
654
  ` ${[
@@ -704,7 +713,7 @@ async function handleMonitorsList(options) {
704
713
  const state = options.state ? monitorStateFilter(options.state) : void 0;
705
714
  if (options.state !== void 0 && !state) {
706
715
  throw new MonitorsUsageError(
707
- `--state must be active, provisioning, billing_suspended, disabled, or all; received ${options.state}.`
716
+ `--state must be active, provisioning, billing_suspended, errored, disabled, or all; received ${options.state}.`
708
717
  );
709
718
  }
710
719
  if (options.compact) {
@@ -712,14 +721,14 @@ async function handleMonitorsList(options) {
712
721
  "`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
713
722
  );
714
723
  }
715
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.list({
724
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.list({
716
725
  ...state ? { state } : {},
717
726
  ...options.status ? { status: options.status } : {},
718
727
  ...options.limit ? { limit: options.limit } : {},
719
728
  ...options.cursor ? { cursor: options.cursor } : {},
720
729
  ...options.includeConsumers ? { includeConsumers: true } : {}
721
730
  });
722
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, {
731
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, {
723
732
  json: options.json,
724
733
  text: renderDeployedListText(
725
734
  payload,
@@ -734,6 +743,7 @@ var LEDGER_STATUS_LABELS = {
734
743
  paused_credits: "Paused \xB7 out of credits",
735
744
  paused_cap: "Paused \xB7 spending cap",
736
745
  paused_billing: "Paused \xB7 billing issue",
746
+ errored: "Errored \xB7 update or remove",
737
747
  stopped: "Stopped"
738
748
  };
739
749
  function ledgerPlayLabel(play) {
@@ -773,6 +783,15 @@ function renderMonitorLedgerText(payload) {
773
783
  `! ${_nullishCoalesce(asString(play.name), () => ( "A Play"))} is failing: ${_nullishCoalesce(asString(play.error), () => ( "latest run failed"))}${asString(play.run_id) ? ` (run ${asString(play.run_id)})` : ""}`
774
784
  );
775
785
  }
786
+ const fleetScope = asRecord(payload.fleet_scope);
787
+ if (fleetScope) {
788
+ const issues = _nullishCoalesce(asFiniteNumber(fleetScope.issues), () => ( 0));
789
+ lines.push(
790
+ `Fleet ${_nullishCoalesce(asString(fleetScope.id), () => ( "unknown"))} \xB7 ${fleetOverviewStatusLabel(
791
+ asString(fleetScope.status)
792
+ )} \xB7 ${_nullishCoalesce(asFiniteNumber(fleetScope.live), () => ( 0))} of ${_nullishCoalesce(_nullishCoalesce(asFiniteNumber(fleetScope.owned), () => ( asFiniteNumber(fleetScope.expected))), () => ( 0))} live \xB7 ${issues} ${issues === 1 ? "issue" : "issues"}`
793
+ );
794
+ }
776
795
  const total = asFiniteNumber(payload.total);
777
796
  lines.push(
778
797
  monitors.length === 0 ? "No monitors matched." : total !== void 0 && total > monitors.length ? `Monitors (${monitors.length} of ${total}):` : `Monitors (${monitors.length}):`
@@ -800,7 +819,7 @@ function renderMonitorLedgerText(payload) {
800
819
  var LEDGER_SORTS = ["recent", "installed", "name", "findings"];
801
820
  var LEDGER_WINDOWS = ["1d", "7d", "30d", "90d", "1y"];
802
821
  async function handleMonitorsLedger(key, options) {
803
- const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
822
+ const client = new (0, _chunkWTY2R4R3js.DeeplineClient)();
804
823
  if (options.findings) {
805
824
  if (!key) {
806
825
  throw new MonitorsUsageError(
@@ -810,12 +829,12 @@ async function handleMonitorsLedger(key, options) {
810
829
  const payload2 = await client.monitors.ledgerFindings(key, {
811
830
  ...options.cursor ? { cursor: options.cursor } : {}
812
831
  });
813
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload2, { json: options.json });
832
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload2, { json: options.json });
814
833
  return;
815
834
  }
816
835
  if (key) {
817
836
  const payload2 = await client.monitors.ledgerGet(key);
818
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload2, { json: options.json });
837
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload2, { json: options.json });
819
838
  return;
820
839
  }
821
840
  if (options.sort !== void 0 && !LEDGER_SORTS.includes(options.sort)) {
@@ -833,12 +852,13 @@ async function handleMonitorsLedger(key, options) {
833
852
  ..._optionalChain([options, 'access', _33 => _33.state, 'optionalAccess', _34 => _34.length]) ? { states: options.state } : {},
834
853
  ..._optionalChain([options, 'access', _35 => _35.signal, 'optionalAccess', _36 => _36.length]) ? { signals: options.signal } : {},
835
854
  ...options.play ? { play: options.play } : {},
855
+ ...options.fleet ? { fleet: options.fleet } : {},
836
856
  ...options.sort ? { sort: options.sort } : {},
837
857
  ...options.window ? { window: options.window } : {},
838
858
  ...options.limit ? { limit: options.limit } : {},
839
859
  ...options.cursor ? { cursor: options.cursor } : {}
840
860
  });
841
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, {
861
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, {
842
862
  json: options.json,
843
863
  text: renderMonitorLedgerText(payload)
844
864
  });
@@ -850,10 +870,10 @@ async function handleMonitorsCheck(definition, options) {
850
870
  argLabel: "<definition>",
851
871
  command: "deepline monitors check"
852
872
  });
853
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.check(
873
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.check(
854
874
  body
855
875
  );
856
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
876
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, { json: options.json });
857
877
  }
858
878
  function previewText(value) {
859
879
  return typeof value === "string" && value.trim() ? value.trim() : "-";
@@ -911,22 +931,22 @@ async function handleMonitorsPreview(definition, options) {
911
931
  if (limit !== void 0 && !Number.isInteger(limit)) {
912
932
  throw new MonitorsUsageError("--limit must be a whole number from 1 to 3.");
913
933
  }
914
- const wantsJson = _chunkEMUFF6EUjs.shouldEmitJson.call(void 0, options.json);
934
+ const wantsJson = _chunk6AQO5OJ5js.shouldEmitJson.call(void 0, options.json);
915
935
  if (options.idempotencyKey === void 0 && wantsJson) {
916
936
  throw new MonitorsUsageError(
917
937
  "--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."
918
938
  );
919
939
  }
920
940
  const idempotencyKey = _nullishCoalesce(options.idempotencyKey, () => ( `monitor-preview-${_crypto.randomUUID.call(void 0, )}`));
921
- const progress = _chunkWPCF7C6Bjs.createCliProgress.call(void 0, !wantsJson);
941
+ const progress = _chunkV4GGTOCXjs.createCliProgress.call(void 0, !wantsJson);
922
942
  progress.phase(`Preview key: ${idempotencyKey}`);
923
943
  try {
924
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.preview(
944
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.preview(
925
945
  body,
926
946
  { idempotencyKey, ...limit === void 0 ? {} : { limit } }
927
947
  );
928
948
  progress.complete();
929
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, {
949
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, {
930
950
  json: options.json,
931
951
  text: renderMonitorPreviewText(payload)
932
952
  });
@@ -971,7 +991,7 @@ async function handleMonitorsDeploy(definition, options) {
971
991
  argLabel: "<definition>",
972
992
  command: "deepline monitors deploy"
973
993
  });
974
- const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
994
+ const client = new (0, _chunkWTY2R4R3js.DeeplineClient)();
975
995
  const definitionArg = body;
976
996
  if (options.dryRun) {
977
997
  const payload2 = await client.monitors.deploy(definitionArg, {
@@ -979,7 +999,7 @@ async function handleMonitorsDeploy(definition, options) {
979
999
  });
980
1000
  const valid = payload2.valid !== false;
981
1001
  const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _39 => _39(payload2), 'optionalAccess', _40 => _40.identity_conflict]));
982
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
1002
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
983
1003
  { dry_run: true, ...payload2 },
984
1004
  { json: options.json, text: renderMonitorDeployPlan(payload2) }
985
1005
  );
@@ -989,7 +1009,7 @@ async function handleMonitorsDeploy(definition, options) {
989
1009
  return;
990
1010
  }
991
1011
  const payload = await client.monitors.deploy(definitionArg);
992
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, {
1012
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, {
993
1013
  json: options.json,
994
1014
  text: renderMonitorDeployCompletion(payload)
995
1015
  });
@@ -1001,29 +1021,29 @@ async function handleMonitorsSync(definition, options) {
1001
1021
  argLabel: "<definition>",
1002
1022
  command: "deepline monitors sync"
1003
1023
  });
1004
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.sync(body, {
1024
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.sync(body, {
1005
1025
  ...options.dryRun ? { dryRun: true } : {},
1006
1026
  idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
1007
1027
  });
1008
1028
  if (options.dryRun) {
1009
1029
  const plan = payload;
1010
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
1030
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
1011
1031
  { dry_run: true, ...plan },
1012
1032
  { json: options.json, text: renderMonitorDeployPlan(plan) }
1013
1033
  );
1014
1034
  return;
1015
1035
  }
1016
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, {
1036
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, {
1017
1037
  json: options.json,
1018
1038
  text: renderMonitorJob(payload)
1019
1039
  });
1020
1040
  }
1021
1041
  async function handleScalarMonitorLifecycle(action, key, options) {
1022
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors[action](key, {
1042
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors[action](key, {
1023
1043
  ...options.dryRun ? { dryRun: true } : {},
1024
1044
  idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
1025
1045
  });
1026
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, {
1046
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, {
1027
1047
  json: options.json,
1028
1048
  text: options.dryRun ? void 0 : renderMonitorJob(payload)
1029
1049
  });
@@ -1112,11 +1132,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
1112
1132
  lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
1113
1133
  );
1114
1134
  }
1115
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.batch.deploy(
1135
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.batch.deploy(
1116
1136
  lint.normalized.monitors,
1117
1137
  { idempotencyKey }
1118
1138
  );
1119
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
1139
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
1120
1140
  {
1121
1141
  ...payload,
1122
1142
  idempotency_key: idempotencyKey,
@@ -1149,7 +1169,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
1149
1169
  );
1150
1170
  }
1151
1171
  if (options.dryRun) {
1152
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
1172
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
1153
1173
  {
1154
1174
  ok: true,
1155
1175
  dry_run: true,
@@ -1166,7 +1186,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
1166
1186
  "sync",
1167
1187
  options.idempotencyKey
1168
1188
  );
1169
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.batches.sync(
1189
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.batches.sync(
1170
1190
  batchId,
1171
1191
  lint.normalized.monitors,
1172
1192
  {
@@ -1174,14 +1194,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
1174
1194
  ...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
1175
1195
  }
1176
1196
  );
1177
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
1197
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
1178
1198
  { ...payload, idempotency_key: idempotencyKey },
1179
1199
  { json: options.json, text: renderMonitorJob(payload) }
1180
1200
  );
1181
1201
  }
1182
1202
  async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
1183
1203
  if (options.dryRun) {
1184
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
1204
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
1185
1205
  {
1186
1206
  ok: true,
1187
1207
  dry_run: true,
@@ -1197,17 +1217,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
1197
1217
  intent,
1198
1218
  options.idempotencyKey
1199
1219
  );
1200
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.batches[intent](batchId, {
1220
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.batches[intent](batchId, {
1201
1221
  idempotencyKey
1202
1222
  });
1203
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
1223
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
1204
1224
  { ...payload, idempotency_key: idempotencyKey },
1205
1225
  { json: options.json, text: renderMonitorJob(payload) }
1206
1226
  );
1207
1227
  }
1208
1228
  async function handleNamedMonitorBatchGet(batchId, options) {
1209
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.batches.get(batchId);
1210
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, {
1229
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.batches.get(batchId);
1230
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, {
1211
1231
  json: options.json,
1212
1232
  text: renderMonitorJob(payload)
1213
1233
  });
@@ -1221,7 +1241,7 @@ async function handleMonitorBatchLint(options) {
1221
1241
  const result = _chunkIF75RD6Ujs.lintMonitorBatchInput.call(void 0,
1222
1242
  readMonitorDefinitionsJsonFile(options.file)
1223
1243
  );
1224
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
1244
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
1225
1245
  {
1226
1246
  ok: !result.issues.some((issue) => issue.severity === "error"),
1227
1247
  ...result.normalized ? { normalized: result.normalized } : {},
@@ -1241,7 +1261,7 @@ async function handleMonitorFleetLint(options) {
1241
1261
  const result = _chunkC374C22Yjs.lintMonitorFleetInput.call(void 0,
1242
1262
  readMonitorDefinitionsJsonFile(options.file)
1243
1263
  );
1244
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
1264
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
1245
1265
  {
1246
1266
  ok: !result.issues.some((issue) => issue.severity === "error"),
1247
1267
  ...result.normalized ? { normalized: result.normalized } : {},
@@ -1253,32 +1273,32 @@ async function handleMonitorFleetLint(options) {
1253
1273
  process.exitCode = 2;
1254
1274
  }
1255
1275
  async function handleMonitorJobGet(jobId, options) {
1256
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.jobs.get(jobId);
1257
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, {
1276
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.jobs.get(jobId);
1277
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, {
1258
1278
  json: options.json,
1259
1279
  text: renderMonitorJob(payload)
1260
1280
  });
1261
1281
  }
1262
1282
  async function handleMonitorJobWait(jobId, options) {
1263
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.jobs.wait(jobId, {
1283
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.jobs.wait(jobId, {
1264
1284
  timeoutMs: fleetTimeoutMs(options.timeout),
1265
1285
  pollIntervalMs: FLEET_POLL_INTERVAL_MS
1266
1286
  });
1267
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, {
1287
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, {
1268
1288
  json: options.json,
1269
1289
  text: renderMonitorJob(payload)
1270
1290
  });
1271
1291
  }
1272
1292
  async function handleMonitorJobLogs(jobId, options) {
1273
1293
  const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
1274
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.jobs.logs(jobId, {
1294
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.jobs.logs(jobId, {
1275
1295
  ...limit === void 0 ? {} : { limit }
1276
1296
  });
1277
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
1297
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, { json: options.json });
1278
1298
  }
1279
1299
  async function handleMonitorJobCancel(jobId, options) {
1280
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.jobs.cancel(jobId);
1281
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, {
1300
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.jobs.cancel(jobId);
1301
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, {
1282
1302
  json: options.json,
1283
1303
  text: renderMonitorJob(payload)
1284
1304
  });
@@ -1332,6 +1352,14 @@ var MONITOR_FLEET_COMMANDS = [
1332
1352
  name: "get",
1333
1353
  summary: "Read one fleet, list every fleet, or inspect drift."
1334
1354
  },
1355
+ {
1356
+ name: "overview",
1357
+ summary: "List fleets by status, issues and findings, or read one fleet\u2019s issues by cause."
1358
+ },
1359
+ {
1360
+ name: "issues",
1361
+ summary: "Page through a fleet\u2019s members that are not live, with each cause and message."
1362
+ },
1335
1363
  {
1336
1364
  name: "deactivate",
1337
1365
  summary: "Deactivate a fleet and the monitors it owns."
@@ -1587,7 +1615,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
1587
1615
  `;
1588
1616
  }
1589
1617
  function reportFleetState(payload, error, options) {
1590
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
1618
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
1591
1619
  {
1592
1620
  ...payload,
1593
1621
  code: error.code,
@@ -1719,7 +1747,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
1719
1747
  _fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
1720
1748
  `, "utf8");
1721
1749
  const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
1722
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
1750
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
1723
1751
  { schemaVersion: 2, file, definition, next },
1724
1752
  {
1725
1753
  json: options.json,
@@ -1781,7 +1809,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
1781
1809
  'The Fleet definition has no id. Add a top-level "id" and re-run.'
1782
1810
  );
1783
1811
  }
1784
- const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
1812
+ const client = new (0, _chunkWTY2R4R3js.DeeplineClient)();
1785
1813
  const payload = await client.monitors.fleets.sync(
1786
1814
  _nullishCoalesce(definition, () => ( fleetId)),
1787
1815
  {
@@ -1803,7 +1831,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
1803
1831
  }
1804
1832
  const accepted = { ...payload, idempotency_key: idempotencyKey };
1805
1833
  if (!options.wait || options.dryRun) {
1806
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, accepted, {
1834
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, accepted, {
1807
1835
  json: options.json,
1808
1836
  text: renderFleetSync(payload, {
1809
1837
  fleetId,
@@ -1829,7 +1857,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
1829
1857
  const status = fleetStatus(final);
1830
1858
  const summary = renderFleetGet(final);
1831
1859
  if (status === "converged") {
1832
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
1860
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
1833
1861
  return;
1834
1862
  }
1835
1863
  if (status === "billing_suspended") {
@@ -1869,14 +1897,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
1869
1897
  );
1870
1898
  }
1871
1899
  const limit = options.limit === void 0 ? void 0 : fleetIntegerOption(options.limit, "--limit");
1872
- const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
1900
+ const client = new (0, _chunkWTY2R4R3js.DeeplineClient)();
1873
1901
  const payload = await client.monitors.fleets.get(fleetId, {
1874
1902
  ...options.drift ? { drift: true } : {},
1875
1903
  ...limit !== void 0 ? { limit } : {}
1876
1904
  });
1877
1905
  const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
1878
1906
  if (!options.check) {
1879
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
1907
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
1880
1908
  return;
1881
1909
  }
1882
1910
  const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
@@ -1884,7 +1912,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
1884
1912
  );
1885
1913
  const unconverged = statuses.filter((status) => status !== "converged");
1886
1914
  if (unconverged.length === 0) {
1887
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
1915
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
1888
1916
  return;
1889
1917
  }
1890
1918
  const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
@@ -1899,6 +1927,207 @@ async function handleMonitorFleetsGet(fleetId, options) {
1899
1927
  { json: options.json, text }
1900
1928
  );
1901
1929
  }
1930
+ var FLEET_OVERVIEW_STATUSES = [
1931
+ "needs_attention",
1932
+ "paused_credits",
1933
+ "paused_cap",
1934
+ "paused_billing",
1935
+ "setting_up",
1936
+ "running",
1937
+ "deactivated"
1938
+ ];
1939
+ var FLEET_OVERVIEW_SORTS = [
1940
+ "attention",
1941
+ "findings",
1942
+ "newest",
1943
+ "name"
1944
+ ];
1945
+ var FLEET_ISSUE_GROUPS = ["failed", "blocked", "waiting"];
1946
+ var FLEET_OVERVIEW_STATUS_LABELS = {
1947
+ needs_attention: "needs attention",
1948
+ paused_credits: "paused \xB7 out of credits",
1949
+ paused_cap: "paused \xB7 spending cap",
1950
+ paused_billing: "paused \xB7 billing issue",
1951
+ setting_up: "setting up",
1952
+ running: "running",
1953
+ deactivated: "deactivated"
1954
+ };
1955
+ function fleetOverviewStatusLabel(status) {
1956
+ return status ? _nullishCoalesce(FLEET_OVERVIEW_STATUS_LABELS[status], () => ( status)) : "unknown";
1957
+ }
1958
+ function fleetChoice(value, allowed, flag) {
1959
+ if (value === void 0) return void 0;
1960
+ if (allowed.includes(value)) return value;
1961
+ throw new MonitorsUsageError(
1962
+ `${flag} must be ${allowed.join(", ")}; received ${value}.`
1963
+ );
1964
+ }
1965
+ function fleetIssueTotal(fleet) {
1966
+ return _nullishCoalesce(asFiniteNumber(_optionalChain([asRecord, 'call', _71 => _71(fleet.issues), 'optionalAccess', _72 => _72.total])), () => ( 0));
1967
+ }
1968
+ function fleetFindingsText(fleet, windowLabel) {
1969
+ return ledgerFindingsText(asRecord(fleet.findings), windowLabel);
1970
+ }
1971
+ function renderFleetOverviewList(payload) {
1972
+ const fleets = (Array.isArray(payload.fleets) ? payload.fleets : []).flatMap(
1973
+ (raw) => {
1974
+ const fleet = asRecord(raw);
1975
+ return fleet ? [fleet] : [];
1976
+ }
1977
+ );
1978
+ const window = _nullishCoalesce(asString(_optionalChain([asRecord, 'call', _73 => _73(payload.applied), 'optionalAccess', _74 => _74.window])), () => ( "30d"));
1979
+ const windowLabel = _nullishCoalesce(LEDGER_WINDOW_LABELS[window], () => ( window));
1980
+ if (fleets.length === 0) {
1981
+ return "No fleets matched.\nNext: deepline monitors fleets overview --state deactivated\n";
1982
+ }
1983
+ const idWidth = fleets.reduce(
1984
+ (max, fleet) => Math.max(max, (_nullishCoalesce(asString(fleet.id), () => ( "-"))).length),
1985
+ 0
1986
+ );
1987
+ const statusWidth = fleets.reduce(
1988
+ (max, fleet) => Math.max(max, fleetOverviewStatusLabel(asString(fleet.status)).length),
1989
+ 0
1990
+ );
1991
+ const total = asFiniteNumber(payload.total);
1992
+ const lines = [
1993
+ total !== void 0 && total > fleets.length ? `Fleets (${fleets.length} of ${total})` : `Fleets (${fleets.length})`
1994
+ ];
1995
+ for (const fleet of fleets) {
1996
+ const issues = fleetIssueTotal(fleet);
1997
+ lines.push(
1998
+ ` ${(_nullishCoalesce(asString(fleet.id), () => ( "-"))).padEnd(idWidth)} ${fleetOverviewStatusLabel(
1999
+ asString(fleet.status)
2000
+ ).padEnd(statusWidth)} ${_nullishCoalesce(asFiniteNumber(fleet.live), () => ( 0))} of ${_nullishCoalesce(_nullishCoalesce(asFiniteNumber(fleet.owned), () => ( asFiniteNumber(fleet.expected))), () => ( 0))} live \xB7 ${issues} ${issues === 1 ? "issue" : "issues"} \xB7 ${fleetFindingsText(
2001
+ fleet,
2002
+ windowLabel
2003
+ )}`
2004
+ );
2005
+ }
2006
+ return `${lines.join("\n")}
2007
+ `;
2008
+ }
2009
+ function fleetIssueCauses(group) {
2010
+ const causes = _nullishCoalesce(asRecord(_optionalChain([group, 'optionalAccess', _75 => _75.causes])), () => ( {}));
2011
+ return Object.entries(causes).flatMap(([cause, raw]) => {
2012
+ const count = _nullishCoalesce(asFiniteNumber(raw), () => ( 0));
2013
+ return count > 0 ? [[cause, count]] : [];
2014
+ }).sort(
2015
+ (left, right) => right[1] - left[1] || left[0].localeCompare(right[0])
2016
+ );
2017
+ }
2018
+ function renderFleetOverviewDetail(payload, window) {
2019
+ const id = _nullishCoalesce(asString(payload.id), () => ( "unknown"));
2020
+ const windowLabel = _nullishCoalesce(_nullishCoalesce(LEDGER_WINDOW_LABELS[_nullishCoalesce(window, () => ( "30d"))], () => ( window)), () => ( "30d"));
2021
+ const settingUp = _nullishCoalesce(asFiniteNumber(payload.setting_up), () => ( 0));
2022
+ const missing = _nullishCoalesce(asFiniteNumber(payload.missing_at_provider), () => ( 0));
2023
+ const lines = [
2024
+ `Fleet ${id} \u2014 ${fleetOverviewStatusLabel(asString(payload.status))}`,
2025
+ ` monitors ${_nullishCoalesce(asFiniteNumber(payload.live), () => ( 0))} of ${_nullishCoalesce(_nullishCoalesce(asFiniteNumber(payload.owned), () => ( asFiniteNumber(payload.expected))), () => ( 0))} live${settingUp ? ` \xB7 ${settingUp} setting up` : ""}${missing ? ` \xB7 ${missing} missing at provider` : ""}`,
2026
+ ` last sync ${_nullishCoalesce(asString(payload.last_sync_attempt_at), () => ( "never"))} (attempt)`,
2027
+ ` findings ${fleetFindingsText(payload, windowLabel)}`
2028
+ ];
2029
+ const issues = _nullishCoalesce(asRecord(payload.issues), () => ( {}));
2030
+ const total = _nullishCoalesce(asFiniteNumber(issues.total), () => ( 0));
2031
+ lines.push("", `Issues (${total}):`);
2032
+ for (const group of ["failed", "blocked"]) {
2033
+ const record = asRecord(issues[group]);
2034
+ const count = _nullishCoalesce(asFiniteNumber(_optionalChain([record, 'optionalAccess', _76 => _76.total])), () => ( 0));
2035
+ if (count === 0) continue;
2036
+ lines.push(` ${group} ${count}`);
2037
+ for (const [cause, causeCount] of fleetIssueCauses(record)) {
2038
+ lines.push(` ${cause} ${causeCount}`);
2039
+ }
2040
+ }
2041
+ const waiting = _nullishCoalesce(asFiniteNumber(_optionalChain([asRecord, 'call', _77 => _77(issues.waiting), 'optionalAccess', _78 => _78.total])), () => ( 0));
2042
+ if (waiting > 0) {
2043
+ lines.push(` waiting ${waiting} (rate limited; retries on its own)`);
2044
+ }
2045
+ if (total === 0 && waiting === 0) lines.push(" none");
2046
+ const shellId = fleetShellArg(id);
2047
+ if (total > 0) lines.push(`Next: deepline monitors fleets issues ${shellId}`);
2048
+ lines.push(`Resync: deepline monitors fleets sync ${shellId} --dry-run`);
2049
+ return `${lines.join("\n")}
2050
+ `;
2051
+ }
2052
+ function renderFleetIssuePage(payload) {
2053
+ const issues = (Array.isArray(payload.issues) ? payload.issues : []).flatMap(
2054
+ (raw) => {
2055
+ const issue = asRecord(raw);
2056
+ return issue ? [issue] : [];
2057
+ }
2058
+ );
2059
+ const fleetId = _nullishCoalesce(asString(payload.fleet_id), () => ( "unknown"));
2060
+ const total = asFiniteNumber(payload.total);
2061
+ const lines = [
2062
+ issues.length === 0 ? `Fleet ${fleetId} has no matching issues.` : total !== void 0 && total > issues.length ? `Fleet ${fleetId} issues (${issues.length} of ${total}):` : `Fleet ${fleetId} issues (${issues.length}):`
2063
+ ];
2064
+ for (const issue of issues) {
2065
+ lines.push(
2066
+ `- ${_nullishCoalesce(asString(issue.source_key), () => ( "(no source row)"))} [${_nullishCoalesce(asString(issue.monitor_key), () => ( "-"))}] \xB7 ${_nullishCoalesce(asString(issue.group), () => ( "unknown"))} \xB7 ${_nullishCoalesce(asString(issue.cause), () => ( "unknown"))}`
2067
+ );
2068
+ const message = asString(issue.message);
2069
+ if (message) lines.push(` ${message}`);
2070
+ }
2071
+ const next = asString(payload.next_cursor);
2072
+ if (next) lines.push(`More: --cursor ${next}`);
2073
+ return `${lines.join("\n")}
2074
+ `;
2075
+ }
2076
+ async function handleMonitorFleetsOverviewRead(fleetId, options) {
2077
+ const window = fleetChoice(options.window, LEDGER_WINDOWS, "--window");
2078
+ const client = new (0, _chunkWTY2R4R3js.DeeplineClient)();
2079
+ if (fleetId) {
2080
+ const listOnly = [
2081
+ options.q !== void 0 ? "--q" : "",
2082
+ _optionalChain([options, 'access', _79 => _79.state, 'optionalAccess', _80 => _80.length]) ? "--state" : "",
2083
+ options.sort !== void 0 ? "--sort" : ""
2084
+ ].filter(Boolean);
2085
+ if (listOnly.length > 0) {
2086
+ throw new MonitorsUsageError(
2087
+ `${listOnly.join(", ")} filter the Fleets list and cannot be combined with a fleet id. Drop the id to filter the list (deepline monitors fleets overview --state needs_attention), or drop ${listOnly.join(", ")} to read one fleet (deepline monitors fleets overview ${fleetShellArg(fleetId)}).`
2088
+ );
2089
+ }
2090
+ const payload2 = await client.monitors.fleets.overview(fleetId, {
2091
+ ...window ? { window } : {}
2092
+ });
2093
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload2, {
2094
+ json: options.json,
2095
+ text: renderFleetOverviewDetail(payload2, window)
2096
+ });
2097
+ return;
2098
+ }
2099
+ for (const state of _nullishCoalesce(options.state, () => ( []))) {
2100
+ fleetChoice(state, FLEET_OVERVIEW_STATUSES, "--state");
2101
+ }
2102
+ const sort = fleetChoice(options.sort, FLEET_OVERVIEW_SORTS, "--sort");
2103
+ const payload = await client.monitors.fleets.overview(void 0, {
2104
+ ...options.q ? { q: options.q } : {},
2105
+ ..._optionalChain([options, 'access', _81 => _81.state, 'optionalAccess', _82 => _82.length]) ? { states: options.state } : {},
2106
+ ...sort ? { sort } : {},
2107
+ ...window ? { window } : {}
2108
+ });
2109
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, {
2110
+ json: options.json,
2111
+ text: renderFleetOverviewList(payload)
2112
+ });
2113
+ }
2114
+ async function handleMonitorFleetsIssues(fleetId, options) {
2115
+ const group = fleetChoice(options.group, FLEET_ISSUE_GROUPS, "--group");
2116
+ const limit = fleetIntegerOption(options.limit, "--limit");
2117
+ if (limit !== void 0 && (limit < 1 || limit > 100)) {
2118
+ throw new MonitorsUsageError("--limit must be an integer from 1 to 100.");
2119
+ }
2120
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.fleets.issues(fleetId, {
2121
+ ...group ? { group } : {},
2122
+ ...options.cause ? { cause: options.cause } : {},
2123
+ ...options.cursor ? { cursor: options.cursor } : {},
2124
+ ...limit !== void 0 ? { limit } : {}
2125
+ });
2126
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, {
2127
+ json: options.json,
2128
+ text: renderFleetIssuePage(payload)
2129
+ });
2130
+ }
1902
2131
  function fleetReactivateCommandLine(fleetId, options) {
1903
2132
  const parts = [
1904
2133
  "deepline",
@@ -1923,13 +2152,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
1923
2152
  ${fleetReactivateCommandLine(fleetId, options)}`
1924
2153
  );
1925
2154
  }
1926
- const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
2155
+ const client = new (0, _chunkWTY2R4R3js.DeeplineClient)();
1927
2156
  const payload = await client.monitors.fleets.reactivate(fleetId, {
1928
2157
  idempotencyKey
1929
2158
  });
1930
2159
  const accepted = { ...payload, idempotency_key: idempotencyKey };
1931
2160
  if (!options.wait) {
1932
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, accepted, {
2161
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, accepted, {
1933
2162
  json: options.json,
1934
2163
  text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
1935
2164
  idempotency key ${idempotencyKey}
@@ -1952,7 +2181,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
1952
2181
  const envelope = { ...accepted, ...final };
1953
2182
  const text = renderFleetGet(final);
1954
2183
  if (fleetStatus(final) === "converged") {
1955
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
2184
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
1956
2185
  return;
1957
2186
  }
1958
2187
  if (fleetStatus(final) === "billing_suspended") {
@@ -2001,7 +2230,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
2001
2230
  }
2002
2231
  }
2003
2232
  async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
2004
- const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
2233
+ const client = new (0, _chunkWTY2R4R3js.DeeplineClient)();
2005
2234
  if (options.dryRun) {
2006
2235
  const plan = await client.monitors.fleets.deactivate(fleetId, {
2007
2236
  dryRun: true,
@@ -2011,7 +2240,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
2011
2240
  command: "deepline monitors fleets deactivate",
2012
2241
  mutation: "fleet deactivate"
2013
2242
  });
2014
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, plan, {
2243
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, plan, {
2015
2244
  json: options.json,
2016
2245
  text: renderFleetDeactivatePlan(plan, fleetId)
2017
2246
  });
@@ -2049,7 +2278,7 @@ Preview the blast radius first:
2049
2278
  });
2050
2279
  const accepted = { ...payload, idempotency_key: idempotencyKey };
2051
2280
  if (payload.already === true) {
2052
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, accepted, {
2281
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, accepted, {
2053
2282
  json: options.json,
2054
2283
  text: `Fleet ${fleetId} is already deactivated.
2055
2284
  `
@@ -2061,7 +2290,7 @@ Preview the blast radius first:
2061
2290
  ` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
2062
2291
  ` : "");
2063
2292
  if (!options.wait) {
2064
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, accepted, {
2293
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, accepted, {
2065
2294
  json: options.json,
2066
2295
  text: acceptedText
2067
2296
  });
@@ -2083,7 +2312,7 @@ Preview the blast radius first:
2083
2312
  const envelope = { ...accepted, ...final };
2084
2313
  const summary = renderFleetGet(final);
2085
2314
  if (fleetStatus(final) === "deactivated") {
2086
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
2315
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
2087
2316
  return;
2088
2317
  }
2089
2318
  if (fleetStatus(final) === "billing_suspended") {
@@ -2122,7 +2351,7 @@ function handleMonitorFleetsOverview(options) {
2122
2351
  "Agent notes:",
2123
2352
  ...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
2124
2353
  ];
2125
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
2354
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
2126
2355
  {
2127
2356
  schemaVersion: 1,
2128
2357
  lifecycle: MONITOR_FLEET_LIFECYCLE,
@@ -2159,6 +2388,7 @@ function renderMonitorGet(payload) {
2159
2388
  `Tool: ${tool}`,
2160
2389
  ...monitorType ? [`Type: ${monitorType}`] : [],
2161
2390
  ...state ? [`Status: ${state}`] : [],
2391
+ ...state === "errored" && monitorFailureMessage(payload) ? [`Error: ${monitorFailureMessage(payload)}`] : [],
2162
2392
  ...hasLastReceivedEvent ? [`Latest inbound event: ${_nullishCoalesce(lastReceivedEvent, () => ( "never"))}`] : [],
2163
2393
  ...pricingLine ? [`Pricing: ${pricingLine}`] : [],
2164
2394
  ...nextRenewalAt ? [`Next renewal: ${nextRenewalAt}`] : []
@@ -2179,8 +2409,8 @@ function renderMonitorGet(payload) {
2179
2409
  }
2180
2410
  for (const raw of Array.isArray(guidance.documentation) ? guidance.documentation : []) {
2181
2411
  const doc = asRecord(raw);
2182
- const label = asString(_optionalChain([doc, 'optionalAccess', _71 => _71.label]));
2183
- const url = asString(_optionalChain([doc, 'optionalAccess', _72 => _72.url]));
2412
+ const label = asString(_optionalChain([doc, 'optionalAccess', _83 => _83.label]));
2413
+ const url = asString(_optionalChain([doc, 'optionalAccess', _84 => _84.url]));
2184
2414
  if (label && url) lines.push(` Docs: ${label} \u2014 ${url}`);
2185
2415
  }
2186
2416
  const payloadExample = asRecord(guidance.payload_example);
@@ -2197,20 +2427,20 @@ function renderMonitorGet(payload) {
2197
2427
  );
2198
2428
  }
2199
2429
  const monitorSpec = asRecord(payload.monitor_spec);
2200
- if (_optionalChain([monitorSpec, 'optionalAccess', _73 => _73.available]) === false) {
2430
+ if (_optionalChain([monitorSpec, 'optionalAccess', _85 => _85.available]) === false) {
2201
2431
  lines.push(
2202
2432
  "",
2203
2433
  `Monitor spec: unavailable \u2014 ${_nullishCoalesce(asString(monitorSpec.message), () => ( "use the stored definition and check before an update."))}`
2204
2434
  );
2205
2435
  }
2206
- const specFields = Array.isArray(_optionalChain([monitorSpec, 'optionalAccess', _74 => _74.fields])) ? monitorSpec.fields.flatMap((value) => {
2436
+ const specFields = Array.isArray(_optionalChain([monitorSpec, 'optionalAccess', _86 => _86.fields])) ? monitorSpec.fields.flatMap((value) => {
2207
2437
  const field = asRecord(value);
2208
- const path = asString(_optionalChain([field, 'optionalAccess', _75 => _75.path]));
2209
- const description = asString(_optionalChain([field, 'optionalAccess', _76 => _76.description]));
2210
- const semantics = asString(_optionalChain([field, 'optionalAccess', _77 => _77.semantics]));
2211
- const applicability = asString(_optionalChain([field, 'optionalAccess', _78 => _78.applicability]));
2212
- const grammar = asRecord(_optionalChain([field, 'optionalAccess', _79 => _79.grammar]));
2213
- const grammarSyntax = asString(_optionalChain([grammar, 'optionalAccess', _80 => _80.syntax]));
2438
+ const path = asString(_optionalChain([field, 'optionalAccess', _87 => _87.path]));
2439
+ const description = asString(_optionalChain([field, 'optionalAccess', _88 => _88.description]));
2440
+ const semantics = asString(_optionalChain([field, 'optionalAccess', _89 => _89.semantics]));
2441
+ const applicability = asString(_optionalChain([field, 'optionalAccess', _90 => _90.applicability]));
2442
+ const grammar = asRecord(_optionalChain([field, 'optionalAccess', _91 => _91.grammar]));
2443
+ const grammarSyntax = asString(_optionalChain([grammar, 'optionalAccess', _92 => _92.syntax]));
2214
2444
  return path ? [
2215
2445
  {
2216
2446
  path,
@@ -2246,10 +2476,10 @@ function renderMonitorGet(payload) {
2246
2476
  const name = _nullishCoalesce(asString(play.name), () => ( "unnamed Play"));
2247
2477
  const listener = asString(play.listener_key);
2248
2478
  const health = asRecord(play.consumer_health);
2249
- const runStatus = asString(_optionalChain([health, 'optionalAccess', _81 => _81.last_run_status]));
2250
- const lastDelivery = asFiniteNumber(_optionalChain([health, 'optionalAccess', _82 => _82.last_delivery_at]));
2251
- const runId = asString(_optionalChain([health, 'optionalAccess', _83 => _83.last_run_id]));
2252
- const error = asString(_optionalChain([health, 'optionalAccess', _84 => _84.last_error]));
2479
+ const runStatus = asString(_optionalChain([health, 'optionalAccess', _93 => _93.last_run_status]));
2480
+ const lastDelivery = asFiniteNumber(_optionalChain([health, 'optionalAccess', _94 => _94.last_delivery_at]));
2481
+ const runId = asString(_optionalChain([health, 'optionalAccess', _95 => _95.last_run_id]));
2482
+ const error = asString(_optionalChain([health, 'optionalAccess', _96 => _96.last_error]));
2253
2483
  lines.push(` ${name}${listener ? ` (listener: ${listener})` : ""}:`);
2254
2484
  lines.push(
2255
2485
  ` Latest delivered event: ${lastDelivery !== void 0 ? new Date(lastDelivery).toISOString() : "never"}`,
@@ -2276,14 +2506,14 @@ function renderMonitorGet(payload) {
2276
2506
  );
2277
2507
  }
2278
2508
  }
2279
- if (_optionalChain([dependents, 'optionalAccess', _85 => _85.truncated]) === true) {
2509
+ if (_optionalChain([dependents, 'optionalAccess', _97 => _97.truncated]) === true) {
2280
2510
  lines.push(" Results are truncated.");
2281
2511
  }
2282
2512
  return `${lines.join("\n")}
2283
2513
  `;
2284
2514
  }
2285
2515
  async function handleMonitorsGet(key, options) {
2286
- const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
2516
+ const client = new (0, _chunkWTY2R4R3js.DeeplineClient)();
2287
2517
  const payload = await client.monitors.get(key);
2288
2518
  const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
2289
2519
  const dependents = boundPlays ? {
@@ -2291,24 +2521,24 @@ async function handleMonitorsGet(key, options) {
2291
2521
  truncated: payload.consumer_health_truncated === true
2292
2522
  } : await client.monitors.dependents(key);
2293
2523
  const detail = { ...payload, dependents };
2294
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, detail, {
2524
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, detail, {
2295
2525
  json: options.json,
2296
2526
  text: renderMonitorGet(detail)
2297
2527
  });
2298
2528
  }
2299
2529
  async function handleMonitorsTest(key, payload, options) {
2300
2530
  const explicitPayload = parseJsonObjectArg(payload, "<payload>");
2301
- const result = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.test(key, explicitPayload);
2531
+ const result = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.test(key, explicitPayload);
2302
2532
  const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
2303
2533
  mode: validation_only (no rows written, credits spent, or Plays dispatched)
2304
2534
  persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
2305
2535
  dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
2306
2536
  `;
2307
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, result, { json: options.json, text });
2537
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, result, { json: options.json, text });
2308
2538
  }
2309
2539
  async function handleMonitorsValidate(key, options) {
2310
- const result = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.validate(key);
2311
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, result, { json: options.json });
2540
+ const result = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.validate(key);
2541
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, result, { json: options.json });
2312
2542
  if (result.valid === false) process.exitCode = 7;
2313
2543
  }
2314
2544
  async function confirmMonitorDelete(key) {
@@ -2326,14 +2556,14 @@ async function confirmMonitorDelete(key) {
2326
2556
  }
2327
2557
  }
2328
2558
  async function handleMonitorsDelete(key, options) {
2329
- const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
2559
+ const client = new (0, _chunkWTY2R4R3js.DeeplineClient)();
2330
2560
  if (options.dryRun) {
2331
2561
  const payload2 = await client.monitors.delete(key, { dryRun: true });
2332
2562
  assertMonitorDryRunAcknowledged(payload2, {
2333
2563
  command: "deepline monitors delete",
2334
2564
  mutation: "delete"
2335
2565
  });
2336
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload2, {
2566
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload2, {
2337
2567
  json: options.json,
2338
2568
  text: renderMonitorDeletePlan(payload2, key)
2339
2569
  });
@@ -2353,7 +2583,7 @@ async function handleMonitorsDelete(key, options) {
2353
2583
  }
2354
2584
  }
2355
2585
  const payload = await client.monitors.delete(key);
2356
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
2586
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, { json: options.json });
2357
2587
  }
2358
2588
  async function handleMonitorsUpdate(key, patch, options) {
2359
2589
  const body = resolveMonitorJsonBody({
@@ -2362,29 +2592,29 @@ async function handleMonitorsUpdate(key, patch, options) {
2362
2592
  argLabel: "<patch>",
2363
2593
  command: `deepline monitors update ${key}`
2364
2594
  });
2365
- const payload = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.update(key, body);
2366
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
2595
+ const payload = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.update(key, body);
2596
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, { json: options.json });
2367
2597
  }
2368
2598
  async function handleMonitorsReactivate(key, options) {
2369
- const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
2599
+ const client = new (0, _chunkWTY2R4R3js.DeeplineClient)();
2370
2600
  if (options.dryRun) {
2371
2601
  const payload2 = await client.monitors.reactivate(key, { dryRun: true });
2372
2602
  assertMonitorDryRunAcknowledged(payload2, {
2373
2603
  command: "deepline monitors reactivate",
2374
2604
  mutation: "reactivate"
2375
2605
  });
2376
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload2, {
2606
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload2, {
2377
2607
  json: options.json,
2378
2608
  text: renderMonitorReactivatePlan(payload2, key)
2379
2609
  });
2380
2610
  return;
2381
2611
  }
2382
2612
  const payload = await client.monitors.reactivate(key);
2383
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
2613
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, payload, { json: options.json });
2384
2614
  }
2385
2615
  var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
2386
2616
  function monitorHealthLine(health) {
2387
- if (_optionalChain([health, 'access', _86 => _86.refresh, 'optionalAccess', _87 => _87.state]) === "running") {
2617
+ if (_optionalChain([health, 'access', _98 => _98.refresh, 'optionalAccess', _99 => _99.state]) === "running") {
2388
2618
  return `refreshing whole scope \xB7 scanned ${health.scanned} so far`;
2389
2619
  }
2390
2620
  const alignmentRequired = _nullishCoalesce(health.alignment_required, () => ( 0));
@@ -2429,7 +2659,7 @@ async function watchMonitorHealth(input) {
2429
2659
  while (Date.now() < deadlineAt) {
2430
2660
  const unresolved = last.observed.unknown + last.observed.unset;
2431
2661
  const alignmentRequired = _nullishCoalesce(last.alignment_required, () => ( 0));
2432
- if (_optionalChain([last, 'access', _88 => _88.refresh, 'optionalAccess', _89 => _89.state]) !== "running" && !last.truncated && last.needs_repair === 0 && (unresolved === 0 || alignmentRequired === unresolved)) {
2662
+ if (_optionalChain([last, 'access', _100 => _100.refresh, 'optionalAccess', _101 => _101.state]) !== "running" && !last.truncated && last.needs_repair === 0 && (unresolved === 0 || alignmentRequired === unresolved)) {
2433
2663
  return last;
2434
2664
  }
2435
2665
  await new Promise(
@@ -2441,13 +2671,13 @@ async function watchMonitorHealth(input) {
2441
2671
  return last;
2442
2672
  }
2443
2673
  function monitorHealthText(health) {
2444
- const partial = _optionalChain([health, 'access', _90 => _90.refresh, 'optionalAccess', _91 => _91.state]) === "running" ? " (refreshing \u2014 counts below are not final)" : health.truncated ? " (partial \u2014 scope larger than one read)" : "";
2674
+ const partial = _optionalChain([health, 'access', _102 => _102.refresh, 'optionalAccess', _103 => _103.state]) === "running" ? " (refreshing \u2014 counts below are not final)" : health.truncated ? " (partial \u2014 scope larger than one read)" : "";
2445
2675
  const unauditedMonitors = _nullishCoalesce(health.unaudited_monitors, () => ( []));
2446
2676
  const lines = [
2447
2677
  `scope: ${_nullishCoalesce(health.scope.fleet_id, () => ( "workspace"))}${partial}`,
2448
2678
  monitorHealthLine(health)
2449
2679
  ];
2450
- if ((_nullishCoalesce(_optionalChain([health, 'access', _92 => _92.batch_operations, 'optionalAccess', _93 => _93.length]), () => ( 0))) > 0) {
2680
+ if ((_nullishCoalesce(_optionalChain([health, 'access', _104 => _104.batch_operations, 'optionalAccess', _105 => _105.length]), () => ( 0))) > 0) {
2451
2681
  lines.push("");
2452
2682
  lines.push("batch work in progress:");
2453
2683
  for (const operation of _nullishCoalesce(health.batch_operations, () => ( []))) {
@@ -2502,8 +2732,8 @@ function monitorHealthText(health) {
2502
2732
  `;
2503
2733
  }
2504
2734
  async function handleMonitorsAudit(options) {
2505
- const client = new (0, _chunkIDAE5VDHjs.DeeplineClient)();
2506
- const fleetId = _optionalChain([options, 'access', _94 => _94.fleet, 'optionalAccess', _95 => _95.trim, 'call', _96 => _96()]) || void 0;
2735
+ const client = new (0, _chunkWTY2R4R3js.DeeplineClient)();
2736
+ const fleetId = _optionalChain([options, 'access', _106 => _106.fleet, 'optionalAccess', _107 => _107.trim, 'call', _108 => _108()]) || void 0;
2507
2737
  const scope = fleetId ? { fleetId } : {};
2508
2738
  let result = await client.monitors.audit(scope);
2509
2739
  const passes = [result.audit];
@@ -2546,7 +2776,7 @@ async function handleMonitorsAudit(options) {
2546
2776
  "",
2547
2777
  monitorHealthText(health)
2548
2778
  ].join("\n");
2549
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
2779
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
2550
2780
  { ...result, audit: { ...result.audit, totals }, health },
2551
2781
  { json: options.json, text }
2552
2782
  );
@@ -2554,15 +2784,15 @@ async function handleMonitorsAudit(options) {
2554
2784
  async function handleMonitorsRepair(options) {
2555
2785
  return await handleMonitorBatch("repair", {
2556
2786
  ...options,
2557
- ..._optionalChain([options, 'access', _97 => _97.fleet, 'optionalAccess', _98 => _98.trim, 'call', _99 => _99()]) ? {} : { target: "needs-repair" }
2787
+ ..._optionalChain([options, 'access', _109 => _109.fleet, 'optionalAccess', _110 => _110.trim, 'call', _111 => _111()]) ? {} : { target: "needs-repair" }
2558
2788
  });
2559
2789
  }
2560
2790
  async function handleMonitorsHealth(options) {
2561
- const fleetId = _optionalChain([options, 'access', _100 => _100.fleet, 'optionalAccess', _101 => _101.trim, 'call', _102 => _102()]) || void 0;
2562
- const health = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.health(
2791
+ const fleetId = _optionalChain([options, 'access', _112 => _112.fleet, 'optionalAccess', _113 => _113.trim, 'call', _114 => _114()]) || void 0;
2792
+ const health = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.health(
2563
2793
  fleetId ? { fleetId } : {}
2564
2794
  );
2565
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, health, {
2795
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, health, {
2566
2796
  json: options.json,
2567
2797
  text: monitorHealthText(health)
2568
2798
  });
@@ -2570,8 +2800,8 @@ async function handleMonitorsHealth(options) {
2570
2800
  function monitorBatchScope(options, kind) {
2571
2801
  const selectors = [
2572
2802
  options.target ? "target" : null,
2573
- _optionalChain([options, 'access', _103 => _103.fleet, 'optionalAccess', _104 => _104.trim, 'call', _105 => _105()]) ? "fleet" : null,
2574
- _optionalChain([options, 'access', _106 => _106.keys, 'optionalAccess', _107 => _107.trim, 'call', _108 => _108()]) ? "keys" : null
2803
+ _optionalChain([options, 'access', _115 => _115.fleet, 'optionalAccess', _116 => _116.trim, 'call', _117 => _117()]) ? "fleet" : null,
2804
+ _optionalChain([options, 'access', _118 => _118.keys, 'optionalAccess', _119 => _119.trim, 'call', _120 => _120()]) ? "keys" : null
2575
2805
  ].filter((value) => value !== null);
2576
2806
  if (selectors.length === 0 && kind === "audit") {
2577
2807
  return { kind: "target", target: "all" };
@@ -2582,7 +2812,7 @@ function monitorBatchScope(options, kind) {
2582
2812
  );
2583
2813
  }
2584
2814
  if (options.target) return { kind: "target", target: options.target };
2585
- if (_optionalChain([options, 'access', _109 => _109.fleet, 'optionalAccess', _110 => _110.trim, 'call', _111 => _111()]))
2815
+ if (_optionalChain([options, 'access', _121 => _121.fleet, 'optionalAccess', _122 => _122.trim, 'call', _123 => _123()]))
2586
2816
  return { kind: "fleet", fleetId: options.fleet.trim() };
2587
2817
  const monitorKeys = (_nullishCoalesce(options.keys, () => ( ""))).split(",").map((key) => key.trim()).filter(Boolean);
2588
2818
  if (monitorKeys.length === 0) {
@@ -2593,7 +2823,7 @@ function monitorBatchScope(options, kind) {
2593
2823
  return { kind: "keys", monitorKeys };
2594
2824
  }
2595
2825
  function monitorBatchIdempotencyKey(kind, value) {
2596
- return _optionalChain([value, 'optionalAccess', _112 => _112.trim, 'call', _113 => _113()]) || `monitor-batch-${kind}-${_crypto.randomUUID.call(void 0, )}`;
2826
+ return _optionalChain([value, 'optionalAccess', _124 => _124.trim, 'call', _125 => _125()]) || `monitor-batch-${kind}-${_crypto.randomUUID.call(void 0, )}`;
2597
2827
  }
2598
2828
  function isCanonicalBatchJsonDocument(raw) {
2599
2829
  try {
@@ -2606,7 +2836,7 @@ function isCanonicalBatchJsonDocument(raw) {
2606
2836
  }
2607
2837
  }
2608
2838
  async function handleMonitorBatchDeploy(options) {
2609
- if (!_optionalChain([options, 'access', _114 => _114.file, 'optionalAccess', _115 => _115.trim, 'call', _116 => _116()])) {
2839
+ if (!_optionalChain([options, 'access', _126 => _126.file, 'optionalAccess', _127 => _127.trim, 'call', _128 => _128()])) {
2610
2840
  throw new MonitorsUsageError(
2611
2841
  "monitors batch deploy requires --file <monitors.ndjson>."
2612
2842
  );
@@ -2636,14 +2866,14 @@ async function handleMonitorBatchDeploy(options) {
2636
2866
  "deploy",
2637
2867
  options.idempotencyKey
2638
2868
  );
2639
- const result = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.batch.submit({
2869
+ const result = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.batch.submit({
2640
2870
  kind: "deploy",
2641
2871
  manifestNdjson,
2642
2872
  dryRun: options.dryRun === true,
2643
2873
  idempotencyKey
2644
2874
  });
2645
2875
  const operation = result.operation;
2646
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
2876
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
2647
2877
  { ...result, idempotency_key: idempotencyKey },
2648
2878
  {
2649
2879
  json: options.json,
@@ -2662,7 +2892,7 @@ async function handleMonitorBatch(kind, options) {
2662
2892
  );
2663
2893
  }
2664
2894
  const scope = monitorBatchScope(options, kind);
2665
- if (kind === "deactivate" && scope.kind === "target" && !_optionalChain([options, 'access', _117 => _117.reason, 'optionalAccess', _118 => _118.trim, 'call', _119 => _119()])) {
2895
+ if (kind === "deactivate" && scope.kind === "target" && !_optionalChain([options, 'access', _129 => _129.reason, 'optionalAccess', _130 => _130.trim, 'call', _131 => _131()])) {
2666
2896
  throw new MonitorsUsageError(
2667
2897
  "monitors batch deactivate --target requires --reason (for example insufficient_balance or billing_failure). Omit --reason with --keys for a customer-requested teardown."
2668
2898
  );
@@ -2671,11 +2901,11 @@ async function handleMonitorBatch(kind, options) {
2671
2901
  kind,
2672
2902
  options.idempotencyKey
2673
2903
  );
2674
- const result = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.batch.submit({
2904
+ const result = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.batch.submit({
2675
2905
  kind,
2676
2906
  scope,
2677
2907
  dryRun: options.dryRun === true,
2678
- ..._optionalChain([options, 'access', _120 => _120.reason, 'optionalAccess', _121 => _121.trim, 'call', _122 => _122()]) ? { deactivationReason: options.reason.trim() } : {},
2908
+ ..._optionalChain([options, 'access', _132 => _132.reason, 'optionalAccess', _133 => _133.trim, 'call', _134 => _134()]) ? { deactivationReason: options.reason.trim() } : {},
2679
2909
  idempotencyKey
2680
2910
  });
2681
2911
  const operation = result.operation;
@@ -2684,14 +2914,14 @@ async function handleMonitorBatch(kind, options) {
2684
2914
  `state ${operation.state} \xB7 retry key ${idempotencyKey}`,
2685
2915
  `inspect: deepline monitors batch get ${operation.runId}`
2686
2916
  ].join("\n");
2687
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0,
2917
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0,
2688
2918
  { ...result, idempotency_key: idempotencyKey },
2689
2919
  { json: options.json, text: `${text}
2690
2920
  ` }
2691
2921
  );
2692
2922
  }
2693
2923
  async function handleMonitorBatchGet(operationId, options) {
2694
- const result = await new (0, _chunkIDAE5VDHjs.DeeplineClient)().monitors.batch.get(operationId, {
2924
+ const result = await new (0, _chunkWTY2R4R3js.DeeplineClient)().monitors.batch.get(operationId, {
2695
2925
  ...options.cursor ? { cursor: options.cursor } : {}
2696
2926
  });
2697
2927
  const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
@@ -2703,7 +2933,7 @@ async function handleMonitorBatchGet(operationId, options) {
2703
2933
  `results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
2704
2934
  ] : []
2705
2935
  ].join("\n");
2706
- _chunkEMUFF6EUjs.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
2936
+ _chunk6AQO5OJ5js.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
2707
2937
  ` });
2708
2938
  }
2709
2939
  function registerMonitorsCommands(program) {
@@ -2990,12 +3220,15 @@ Examples:
2990
3220
  "after",
2991
3221
  `
2992
3222
  Notes:
2993
- Read-only. A monitor has one of four customer states: active, provisioning,
2994
- billing_suspended, or disabled. provisioning means the create was recorded
2995
- but the provider has not confirmed the monitor yet; it delivers no events and
2996
- does not bill until it becomes active. Cleanup, retries, and failures
2997
- are reported by Monitor Jobs; provider disagreement is reported separately by
2998
- audit/health. The output echoes the canonical state filter that was applied.
3223
+ Read-only. A monitor has one of five customer states: active, provisioning,
3224
+ billing_suspended, errored, or disabled. provisioning means the create was
3225
+ recorded but the provider has not confirmed the monitor yet; it delivers no
3226
+ events and does not bill until it becomes active. errored means the provider
3227
+ stopped the monitor after it was created (for example its LinkedIn URL no
3228
+ longer resolves); its failure.message says what to do. Fix it by updating the
3229
+ monitor's payload, which creates a fresh monitor, or delete it. Resubmitting
3230
+ the same payload leaves it errored. Cleanup and retries are reported by
3231
+ Monitor Jobs; provider disagreement is reported separately by audit/health. The output echoes the canonical state filter that was applied.
2999
3232
  The legacy --status flag remains accepted for installed clients. The response reports
3000
3233
  total (the true registry count, not the page size), returned, has_more, and
3001
3234
  next_cursor. When has_more is true, page with --cursor <next_cursor> until it
@@ -3016,7 +3249,7 @@ Examples:
3016
3249
  `
3017
3250
  ).option(
3018
3251
  "--state <state>",
3019
- "Filter by customer state: active (default), provisioning, billing_suspended, disabled, or all"
3252
+ "Filter by customer state: active (default), provisioning, billing_suspended, errored, disabled, or all"
3020
3253
  ).option(
3021
3254
  "--status <status>",
3022
3255
  "Deprecated compatibility filter; use --state (active, provisioning, billing_suspended, disabled, or all)"
@@ -3048,8 +3281,9 @@ Notes:
3048
3281
  one monitor with every Play it can trigger and that monitor's latest run.
3049
3282
 
3050
3283
  Statuses: active, setting_up, paused_credits, paused_cap, paused_billing,
3051
- stopped. Every status except stopped is shown by default; repeat --state to
3052
- choose. A Play is listed when a finding can trigger it: "some findings" means
3284
+ errored, stopped. Every status except stopped is shown by default; repeat
3285
+ --state to choose. errored means the provider stopped the monitor; update
3286
+ its payload or remove it. A Play is listed when a finding can trigger it: "some findings" means
3053
3287
  its own where filter decides per finding, and it is omitted only when a
3054
3288
  _dl_monitor_id filter excludes this monitor. Failing Plays (their latest
3055
3289
  completed monitor-triggered run failed) are listed first.
@@ -3059,6 +3293,9 @@ Notes:
3059
3293
  window, so the count is partial; a null count means the monitor has not
3060
3294
  been counted yet.
3061
3295
 
3296
+ --fleet lists only the monitors one Monitor Fleet owns; fleet_scope then
3297
+ carries that fleet's status, live of expected, and issue count.
3298
+
3062
3299
  Filters apply before paging, so total is the filtered count. Page with
3063
3300
  --cursor <next_cursor> until next_cursor is null.
3064
3301
 
@@ -3069,6 +3306,7 @@ Examples:
3069
3306
  deepline monitors ledger --search halcyon --sort installed
3070
3307
  deepline monitors ledger --sort findings --window 7d
3071
3308
  deepline monitors ledger --play none
3309
+ deepline monitors ledger --fleet account-job-openings
3072
3310
  deepline monitors ledger halcyon-openings --json
3073
3311
  deepline monitors ledger halcyon-openings --findings --json
3074
3312
  `
@@ -3077,7 +3315,7 @@ Examples:
3077
3315
  "Search name, key, subject, signal and deploy filters"
3078
3316
  ).option(
3079
3317
  "--state <state>",
3080
- "Include a status (repeatable): active, setting_up, paused_credits, paused_cap, paused_billing, stopped",
3318
+ "Include a status (repeatable): active, setting_up, paused_credits, paused_cap, paused_billing, errored, stopped",
3081
3319
  collect
3082
3320
  ).option(
3083
3321
  "--signal <key>",
@@ -3086,7 +3324,7 @@ Examples:
3086
3324
  ).option(
3087
3325
  "--play <play>",
3088
3326
  'Only monitors triggering this Play definition id, or "none" for monitors no Play listens to'
3089
- ).option(
3327
+ ).option("--fleet <fleet-id>", "Only the monitors this Monitor Fleet owns").option(
3090
3328
  "--sort <sort>",
3091
3329
  "recent (default; newest finding first), installed, name, or findings (most in --window first)"
3092
3330
  ).option(
@@ -3521,6 +3759,77 @@ Examples:
3521
3759
  "Exit 0 when converged and 6 otherwise, for scripts and agents"
3522
3760
  )
3523
3761
  ).action(monitorsAction(handleMonitorFleetsGet));
3762
+ withJsonOption(
3763
+ fleets.command("overview [fleet-id]").description(
3764
+ "List fleets as the Fleets page does, or read one fleet\u2019s overview."
3765
+ ).addHelpText(
3766
+ "after",
3767
+ `
3768
+ Notes:
3769
+ Read-only. Without an id, lists every fleet with its status, live of
3770
+ expected monitors, issue count, and findings in --window, ordered by --sort.
3771
+ Statuses: needs_attention, paused_credits, paused_cap, paused_billing,
3772
+ setting_up, running, deactivated. Every status except deactivated is shown
3773
+ by default; repeat --state to choose. --q, --state, and --sort apply only to
3774
+ the list and are refused with an id.
3775
+
3776
+ With an id, reads that fleet: status, live of expected, the last sync
3777
+ attempt (an attempt, not proof it succeeded), findings, source table and
3778
+ filters, member tool, the Plays its output triggers, and its issues counted
3779
+ by group and cause. Issues count failed and blocked members; waiting
3780
+ members are rate limited and retry on their own. Page the members behind
3781
+ each count with \`deepline monitors fleets issues <fleet-id>\`.
3782
+
3783
+ --json prints the server response as one JSON object.
3784
+
3785
+ Examples:
3786
+ deepline monitors fleets overview
3787
+ deepline monitors fleets overview --state needs_attention --sort findings
3788
+ deepline monitors fleets overview --q accounts --window 7d
3789
+ deepline monitors fleets overview account-job-openings
3790
+ deepline monitors fleets overview account-job-openings --json
3791
+ `
3792
+ ).option(
3793
+ "--q <text>",
3794
+ "Search fleet ids, source tables, member tools and signals"
3795
+ ).option(
3796
+ "--state <status>",
3797
+ "Include a status (repeatable): needs_attention, paused_credits, paused_cap, paused_billing, setting_up, running, deactivated",
3798
+ (value, previous = []) => [...previous, value]
3799
+ ).option(
3800
+ "--sort <sort>",
3801
+ "attention (default; most attention first), findings, newest, or name"
3802
+ ).option(
3803
+ "--window <window>",
3804
+ "Findings window: 1d, 7d, 30d (default), 90d, or 1y"
3805
+ )
3806
+ ).action(monitorsAction(handleMonitorFleetsOverviewRead));
3807
+ withJsonOption(
3808
+ fleets.command("issues <fleet-id>").description(
3809
+ "Page through a fleet\u2019s members that are not live, with cause and message."
3810
+ ).addHelpText(
3811
+ "after",
3812
+ `
3813
+ Notes:
3814
+ Read-only. Each row is one member that is not live: its source row key,
3815
+ monitor key, group (failed, blocked, or waiting), cause, and the provider's
3816
+ own message. The causes are the ones \`fleets overview <fleet-id>\` counts.
3817
+ Page with --cursor <next_cursor> until next_cursor is null.
3818
+
3819
+ After fixing a cause, resync with
3820
+ \`deepline monitors fleets sync <fleet-id> --dry-run\`.
3821
+
3822
+ Examples:
3823
+ deepline monitors fleets issues account-job-openings
3824
+ deepline monitors fleets issues account-job-openings --group failed
3825
+ deepline monitors fleets issues account-job-openings --cause watched_accounts_limit --limit 100
3826
+ deepline monitors fleets issues account-job-openings --cursor <next_cursor> --json
3827
+ `
3828
+ ).option("--group <group>", "Only failed, blocked, or waiting members").option(
3829
+ "--cause <cause>",
3830
+ "Only one cause, as the fleet overview names it (for example provider_rejected)"
3831
+ ).option("--cursor <cursor>", "Continue from a prior next_cursor").option("--limit <n>", "Rows per page, 1 to 100 (default 25)")
3832
+ ).action(monitorsAction(handleMonitorFleetsIssues));
3524
3833
  withJsonOption(
3525
3834
  fleets.command("deactivate <fleet-id>").alias("stop").description("Deactivate a fleet and the monitors it owns.").addHelpText(
3526
3835
  "after",
@@ -3597,7 +3906,7 @@ Example:
3597
3906
  const deployed = withJsonOption(
3598
3907
  monitors.command("deployed", { hidden: true }).description("Alias of `monitors list` (plus get/update/delete aliases).").option(
3599
3908
  "--state <state>",
3600
- "Filter by customer state: active (default), provisioning, billing_suspended, disabled, or all"
3909
+ "Filter by customer state: active (default), provisioning, billing_suspended, errored, disabled, or all"
3601
3910
  ).option(
3602
3911
  "--status <status>",
3603
3912
  "Deprecated compatibility filter; use --state (active, provisioning, billing_suspended, disabled, or all)"
@@ -3645,4 +3954,7 @@ Example:
3645
3954
 
3646
3955
 
3647
3956
 
3648
- exports.MonitorDryRunUnsupportedError = MonitorDryRunUnsupportedError; exports.MonitorFleetStateError = MonitorFleetStateError; exports.MonitorsUsageError = MonitorsUsageError; exports.assertMonitorDryRunAcknowledged = assertMonitorDryRunAcknowledged; exports.monitorDeleteRequiresYesError = monitorDeleteRequiresYesError; exports.monitorsErrorExitCode = monitorsErrorExitCode; exports.registerMonitorsCommands = registerMonitorsCommands; exports.renderAvailableToolsText = renderAvailableToolsText; exports.renderDeployedListText = renderDeployedListText; exports.renderMonitorDeletePlan = renderMonitorDeletePlan; exports.renderMonitorDeployCompletion = renderMonitorDeployCompletion; exports.renderMonitorDeployPlan = renderMonitorDeployPlan; exports.renderMonitorGet = renderMonitorGet; exports.renderMonitorLedgerText = renderMonitorLedgerText; exports.renderMonitorReactivatePlan = renderMonitorReactivatePlan; exports.resolveMonitorJsonBody = resolveMonitorJsonBody;
3957
+
3958
+
3959
+
3960
+ exports.MonitorDryRunUnsupportedError = MonitorDryRunUnsupportedError; exports.MonitorFleetStateError = MonitorFleetStateError; exports.MonitorsUsageError = MonitorsUsageError; exports.assertMonitorDryRunAcknowledged = assertMonitorDryRunAcknowledged; exports.monitorDeleteRequiresYesError = monitorDeleteRequiresYesError; exports.monitorsErrorExitCode = monitorsErrorExitCode; exports.registerMonitorsCommands = registerMonitorsCommands; exports.renderAvailableToolsText = renderAvailableToolsText; exports.renderDeployedListText = renderDeployedListText; exports.renderFleetIssuePage = renderFleetIssuePage; exports.renderFleetOverviewDetail = renderFleetOverviewDetail; exports.renderFleetOverviewList = renderFleetOverviewList; exports.renderMonitorDeletePlan = renderMonitorDeletePlan; exports.renderMonitorDeployCompletion = renderMonitorDeployCompletion; exports.renderMonitorDeployPlan = renderMonitorDeployPlan; exports.renderMonitorGet = renderMonitorGet; exports.renderMonitorLedgerText = renderMonitorLedgerText; exports.renderMonitorReactivatePlan = renderMonitorReactivatePlan; exports.resolveMonitorJsonBody = resolveMonitorJsonBody;