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
  import "./chunk-EXMLR72R.mjs";
2
2
  import {
3
3
  DeeplineClient
4
- } from "./chunk-52FPW2RD.mjs";
5
- import "./chunk-4OFSAZN6.mjs";
4
+ } from "./chunk-NJRJGXVF.mjs";
5
+ import "./chunk-RTLWYERT.mjs";
6
6
  import "./chunk-L2VKAASU.mjs";
7
7
  import "./chunk-N4TR6QRI.mjs";
8
8
  import "./chunk-S3A4IXBQ.mjs";
@@ -17,15 +17,15 @@ import {
17
17
  } from "./chunk-MI6ZP7XI.mjs";
18
18
  import {
19
19
  createCliProgress
20
- } from "./chunk-QGNNAZ5M.mjs";
20
+ } from "./chunk-5A66OJZD.mjs";
21
21
  import {
22
22
  errorToJsonPayload,
23
23
  printCommandEnvelope,
24
24
  printJson,
25
25
  shouldEmitJson
26
- } from "./chunk-PZN24YQQ.mjs";
27
- import "./chunk-SHKRL7CW.mjs";
28
- import "./chunk-7AD565DO.mjs";
26
+ } from "./chunk-H334EFON.mjs";
27
+ import "./chunk-IWZRQ6YW.mjs";
28
+ import "./chunk-YAAJHS6W.mjs";
29
29
  import {
30
30
  AuthError
31
31
  } from "./chunk-4QF2K7TM.mjs";
@@ -33,7 +33,7 @@ import "./chunk-DLIRSHV6.mjs";
33
33
  import {
34
34
  DeeplineError
35
35
  } from "./chunk-HBL4PM5Q.mjs";
36
- import "./chunk-6U3AGJWI.mjs";
36
+ import "./chunk-XKGNEN4P.mjs";
37
37
  import "./chunk-WZYKRD7T.mjs";
38
38
  import "./chunk-KRD6H754.mjs";
39
39
 
@@ -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;
@@ -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) {
@@ -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
  `! ${asString(play.name) ?? "A Play"} is failing: ${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 = asFiniteNumber(fleetScope.issues) ?? 0;
789
+ lines.push(
790
+ `Fleet ${asString(fleetScope.id) ?? "unknown"} \xB7 ${fleetOverviewStatusLabel(
791
+ asString(fleetScope.status)
792
+ )} \xB7 ${asFiniteNumber(fleetScope.live) ?? 0} of ${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}):`
@@ -833,6 +852,7 @@ async function handleMonitorsLedger(key, options) {
833
852
  ...options.state?.length ? { states: options.state } : {},
834
853
  ...options.signal?.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 } : {},
@@ -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."
@@ -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 ? 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 asFiniteNumber(asRecord(fleet.issues)?.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 = asString(asRecord(payload.applied)?.window) ?? "30d";
1979
+ const windowLabel = 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, (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
+ ` ${(asString(fleet.id) ?? "-").padEnd(idWidth)} ${fleetOverviewStatusLabel(
1999
+ asString(fleet.status)
2000
+ ).padEnd(statusWidth)} ${asFiniteNumber(fleet.live) ?? 0} of ${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 = asRecord(group?.causes) ?? {};
2011
+ return Object.entries(causes).flatMap(([cause, raw]) => {
2012
+ const count = 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 = asString(payload.id) ?? "unknown";
2020
+ const windowLabel = LEDGER_WINDOW_LABELS[window ?? "30d"] ?? window ?? "30d";
2021
+ const settingUp = asFiniteNumber(payload.setting_up) ?? 0;
2022
+ const missing = asFiniteNumber(payload.missing_at_provider) ?? 0;
2023
+ const lines = [
2024
+ `Fleet ${id} \u2014 ${fleetOverviewStatusLabel(asString(payload.status))}`,
2025
+ ` monitors ${asFiniteNumber(payload.live) ?? 0} of ${asFiniteNumber(payload.owned) ?? asFiniteNumber(payload.expected) ?? 0} live${settingUp ? ` \xB7 ${settingUp} setting up` : ""}${missing ? ` \xB7 ${missing} missing at provider` : ""}`,
2026
+ ` last sync ${asString(payload.last_sync_attempt_at) ?? "never"} (attempt)`,
2027
+ ` findings ${fleetFindingsText(payload, windowLabel)}`
2028
+ ];
2029
+ const issues = asRecord(payload.issues) ?? {};
2030
+ const total = 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 = asFiniteNumber(record?.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 = asFiniteNumber(asRecord(issues.waiting)?.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 = 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
+ `- ${asString(issue.source_key) ?? "(no source row)"} [${asString(issue.monitor_key) ?? "-"}] \xB7 ${asString(issue.group) ?? "unknown"} \xB7 ${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 DeeplineClient();
2079
+ if (fleetId) {
2080
+ const listOnly = [
2081
+ options.q !== void 0 ? "--q" : "",
2082
+ options.state?.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
+ printCommandEnvelope(payload2, {
2094
+ json: options.json,
2095
+ text: renderFleetOverviewDetail(payload2, window)
2096
+ });
2097
+ return;
2098
+ }
2099
+ for (const state of 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
+ ...options.state?.length ? { states: options.state } : {},
2106
+ ...sort ? { sort } : {},
2107
+ ...window ? { window } : {}
2108
+ });
2109
+ printCommandEnvelope(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 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
+ printCommandEnvelope(payload, {
2127
+ json: options.json,
2128
+ text: renderFleetIssuePage(payload)
2129
+ });
2130
+ }
1902
2131
  function fleetReactivateCommandLine(fleetId, options) {
1903
2132
  const parts = [
1904
2133
  "deepline",
@@ -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: ${lastReceivedEvent ?? "never"}`] : [],
2163
2393
  ...pricingLine ? [`Pricing: ${pricingLine}`] : [],
2164
2394
  ...nextRenewalAt ? [`Next renewal: ${nextRenewalAt}`] : []
@@ -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)"
@@ -3638,6 +3947,9 @@ export {
3638
3947
  registerMonitorsCommands,
3639
3948
  renderAvailableToolsText,
3640
3949
  renderDeployedListText,
3950
+ renderFleetIssuePage,
3951
+ renderFleetOverviewDetail,
3952
+ renderFleetOverviewList,
3641
3953
  renderMonitorDeletePlan,
3642
3954
  renderMonitorDeployCompletion,
3643
3955
  renderMonitorDeployPlan,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  DeeplineClient
3
- } from "./chunk-52FPW2RD.mjs";
4
- import "./chunk-4OFSAZN6.mjs";
3
+ } from "./chunk-NJRJGXVF.mjs";
4
+ import "./chunk-RTLWYERT.mjs";
5
5
  import "./chunk-L2VKAASU.mjs";
6
6
  import "./chunk-N4TR6QRI.mjs";
7
7
  import "./chunk-S3A4IXBQ.mjs";
8
8
  import "./chunk-BMCRTI6Z.mjs";
9
9
  import {
10
10
  printCommandEnvelope
11
- } from "./chunk-PZN24YQQ.mjs";
11
+ } from "./chunk-H334EFON.mjs";
12
12
  import {
13
13
  ACTIVE_ORG_ID_ENV,
14
14
  ACTIVE_ORG_NAME_ENV,
@@ -28,14 +28,14 @@ import {
28
28
  saveProjectDeeplineEnvValues,
29
29
  sdkCliStateDirPath,
30
30
  storedHostFeatures
31
- } from "./chunk-SHKRL7CW.mjs";
31
+ } from "./chunk-IWZRQ6YW.mjs";
32
32
  import {
33
33
  detectAgentRuntime
34
- } from "./chunk-7AD565DO.mjs";
34
+ } from "./chunk-YAAJHS6W.mjs";
35
35
  import "./chunk-4QF2K7TM.mjs";
36
36
  import "./chunk-DLIRSHV6.mjs";
37
37
  import "./chunk-HBL4PM5Q.mjs";
38
- import "./chunk-6U3AGJWI.mjs";
38
+ import "./chunk-XKGNEN4P.mjs";
39
39
  import "./chunk-WZYKRD7T.mjs";
40
40
  import "./chunk-KRD6H754.mjs";
41
41