deepline 0.3.504 → 0.3.506
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.
- package/dist/bundling-sources/sdk/src/client-core.ts +121 -5
- package/dist/bundling-sources/sdk/src/index.ts +3 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +5 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +176 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +17 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/overview.ts +118 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +29 -1
- package/dist/bundling-sources/shared_libs/monitors/legacy-radar-retirement.ts +29 -10
- package/dist/bundling-sources/shared_libs/monitors/package.json +4 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +9 -9
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +52 -5
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +48 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +157 -47
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +36 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-egress.ts +55 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +66 -0
- package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +18 -0
- package/dist/bundling-sources/shared_libs/product-notifications/onboarding-unsubscribe.ts +23 -0
- package/dist/cli/auth-MMHG2OFE.js +43 -0
- package/dist/cli/{auth-3L5AA5AX.mjs → auth-ZHFONT2D.mjs} +5 -5
- package/dist/cli/{billing-HOGXVE2V.js → billing-3Z7N4WTL.js} +101 -91
- package/dist/cli/{billing-E7EASVPO.mjs → billing-B2YEMNHE.mjs} +27 -17
- package/dist/cli/{chunk-UXQQPMYO.js → chunk-26DJ4BDY.js} +2 -2
- package/dist/cli/{chunk-3MLFFWDM.mjs → chunk-2CFTDVEP.mjs} +2 -2
- package/dist/cli/{chunk-QOLX2O2S.mjs → chunk-2IXXB7OA.mjs} +93 -34
- package/dist/cli/{chunk-6JNBMTCZ.js → chunk-2OY5DXTC.js} +1 -1
- package/dist/cli/{chunk-SVFTZTCI.mjs → chunk-3BFZEHBH.mjs} +1 -1
- package/dist/cli/{chunk-67OI26OE.js → chunk-3F676QXJ.js} +96 -37
- package/dist/cli/{chunk-KCKAFTPY.js → chunk-5ARG7J7A.js} +6 -6
- package/dist/cli/{chunk-5CHBIJIM.mjs → chunk-6RYVIZRP.mjs} +2 -2
- package/dist/cli/{chunk-QKKU2FH4.js → chunk-75NAFY36.js} +7 -7
- package/dist/cli/{chunk-7P2QVMBP.js → chunk-AD2WJUZA.js} +91 -48
- package/dist/cli/{chunk-UFYJTRSF.mjs → chunk-AFSYNOG4.mjs} +42 -7
- package/dist/cli/{chunk-VJVJWZ6I.mjs → chunk-BJ5OX62J.mjs} +5 -5
- package/dist/cli/{chunk-HUX5DZO6.mjs → chunk-BQBPVUFJ.mjs} +3 -3
- package/dist/cli/{chunk-MLMWM5DV.mjs → chunk-CHGRURBN.mjs} +5 -5
- package/dist/cli/{chunk-22OCKCYS.mjs → chunk-D7OCORZ7.mjs} +1 -1
- package/dist/cli/{chunk-SMSQVRHE.js → chunk-DB54ROPH.js} +5 -5
- package/dist/cli/{chunk-KGUGNEKL.js → chunk-E554XCJI.js} +96 -96
- package/dist/cli/{chunk-GGBXNQCR.mjs → chunk-EN7GXLFX.mjs} +4 -4
- package/dist/cli/{chunk-2W77YCKH.js → chunk-F53SGS3C.js} +5 -5
- package/dist/cli/{chunk-6SMR7LU7.js → chunk-F7IQQYKV.js} +2 -2
- package/dist/cli/chunk-FFGQR5J3.mjs +405 -0
- package/dist/cli/{chunk-UJMBG5JU.js → chunk-FWSEGIT6.js} +4 -4
- package/dist/cli/{chunk-GJ2DA35C.js → chunk-GDHLL5EQ.js} +42 -7
- package/dist/cli/{chunk-XHZSPMNC.mjs → chunk-GJNIC2CO.mjs} +84 -441
- package/dist/cli/chunk-GRESJ3H3.js +405 -0
- package/dist/cli/{chunk-WZSFIJMG.js → chunk-HINTYT5H.js} +113 -470
- package/dist/cli/{chunk-A6LA42JY.js → chunk-LRSRJJPD.js} +16 -16
- package/dist/cli/{chunk-WBIDPDKJ.js → chunk-MHRR47VQ.js} +3 -3
- package/dist/cli/{chunk-FTRVCIGC.js → chunk-N7G36GXB.js} +26 -26
- package/dist/cli/{chunk-BTWUNKKX.mjs → chunk-ND4WPLTE.mjs} +2 -2
- package/dist/cli/{chunk-NZ7Z7WNM.mjs → chunk-O4DZG4VA.mjs} +2 -2
- package/dist/cli/{chunk-LHXYCZYO.js → chunk-OD6TASBP.js} +8 -8
- package/dist/cli/{chunk-GRAGUYIE.js → chunk-OHNMJ5XQ.js} +41 -41
- package/dist/cli/{chunk-OX2D6BG4.mjs → chunk-ONBXTEFQ.mjs} +46 -3
- package/dist/cli/{chunk-7F4OEHQK.mjs → chunk-OPBXKB57.mjs} +1 -1
- package/dist/cli/{chunk-Y7VEHKID.mjs → chunk-OUGJUM5X.mjs} +6 -6
- package/dist/cli/{chunk-USTJEEND.js → chunk-PRIHD5XS.js} +9 -9
- package/dist/cli/{chunk-IGNQKOWT.mjs → chunk-QAY5AS2H.mjs} +12 -12
- package/dist/cli/{chunk-5Z6EULD5.js → chunk-QP333GFE.js} +7 -7
- package/dist/cli/{chunk-JPR2546F.js → chunk-SUJIVF6L.js} +16 -16
- package/dist/cli/{chunk-DEAJVQEG.mjs → chunk-TEMORCEE.mjs} +1 -1
- package/dist/cli/{chunk-YOQ2NNDO.mjs → chunk-TS4KFQKS.mjs} +1 -1
- package/dist/cli/{chunk-4CC67XH5.mjs → chunk-XUY7WQ2R.mjs} +3 -3
- package/dist/cli/{chunk-Z6FXUDIL.mjs → chunk-YEX6RPUO.mjs} +1 -1
- package/dist/cli/{chunk-MJTK6Q3G.js → chunk-YJKKOSXS.js} +3 -3
- package/dist/cli/{chunk-Y6XKCEPK.mjs → chunk-YVOS5KSG.mjs} +1 -1
- package/dist/cli/{chunk-2ABRDH3B.mjs → chunk-YWZEBPXK.mjs} +2 -2
- package/dist/cli/{chunk-BX45XMXZ.mjs → chunk-Z7EHY2MF.mjs} +2 -2
- package/dist/cli/{chunk-FISP4LCK.js → chunk-ZM5BJ5MP.js} +53 -53
- package/dist/cli/{chunk-IPAMOMGP.js → chunk-ZZDTWVCQ.js} +21 -21
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-2XWGPITO.js → csv-7K7LK63Y.js} +13 -13
- package/dist/cli/{csv-433JEHLQ.mjs → csv-ARHQ54HA.mjs} +4 -4
- package/dist/cli/{db-K747DH43.mjs → db-JBX24NJY.mjs} +6 -6
- package/dist/cli/{db-PJJMD4VH.js → db-V4Z2I6DY.js} +27 -27
- package/dist/cli/describe-AYXVS6DZ.js +50 -0
- package/dist/cli/{describe-VEDDYW4P.mjs → describe-RBDSGSZ7.mjs} +18 -17
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/{executions-JWRX3XCT.mjs → executions-BAZEU63W.mjs} +6 -6
- package/dist/cli/{executions-HM5T72H6.js → executions-XEZKV5QU.js} +8 -8
- package/dist/cli/{feedback-34UG4BO3.js → feedback-LOERESRU.js} +8 -8
- package/dist/cli/{feedback-MNSIA63Y.mjs → feedback-YDSWBHCO.mjs} +4 -4
- package/dist/cli/{git-ZKEOXV3A.mjs → git-4Z3W2CQU.mjs} +5 -5
- package/dist/cli/git-T6WKO7EA.js +25 -0
- package/dist/cli/index.js +146 -148
- package/dist/cli/index.mjs +53 -55
- package/dist/cli/{legacy-noops-YXSI4FVU.js → legacy-noops-4QIQPVE5.js} +8 -8
- package/dist/cli/{legacy-noops-5M4T4ZVT.mjs → legacy-noops-E4HH7S5O.mjs} +5 -5
- package/dist/cli/{monitors-C65OC4AW.mjs → monitors-FPDW5DDM.mjs} +305 -8
- package/dist/cli/{monitors-O25GDOYE.js → monitors-QBHDSDA7.js} +423 -126
- package/dist/cli/{org-2GSPLY2A.js → org-JO4GGSAH.js} +72 -72
- package/dist/cli/{org-ZRMG5NS2.mjs → org-UCDHIHAD.mjs} +6 -6
- package/dist/cli/{pages-TZZUFBRO.mjs → pages-6V52IZXY.mjs} +6 -6
- package/dist/cli/{pages-45DPADK6.js → pages-FJAAXAWO.js} +18 -18
- package/dist/cli/{play-RCGMND6X.js → play-F3AENS6W.js} +317 -316
- package/dist/cli/{play-3D7HH273.mjs → play-MF4DWROJ.mjs} +18 -17
- package/dist/cli/{providers-PSAKV6CJ.mjs → providers-NJJLTECA.mjs} +6 -6
- package/dist/cli/{providers-3N3ECMTY.js → providers-XXOQLPX7.js} +9 -9
- package/dist/cli/{quickstart-6R6AIXM6.js → quickstart-JCE3XGQG.js} +6 -6
- package/dist/cli/{quickstart-2A35SMGC.mjs → quickstart-Z5MSMI7S.mjs} +4 -4
- package/dist/cli/{run-F3TLDGUO.mjs → run-56UGPIRL.mjs} +23 -22
- package/dist/cli/{run-F6ZXTASZ.js → run-X2DNIW3F.js} +41 -40
- package/dist/cli/search-B753RTKC.js +33 -0
- package/dist/cli/{search-CZLCY3D2.mjs → search-SZYI4NBB.mjs} +8 -7
- package/dist/cli/{search-output-R5XDNILW.js → search-output-7UNT6EMP.js} +6 -6
- package/dist/cli/{search-output-MQTSTLN5.mjs → search-output-T35QNZUF.mjs} +4 -4
- package/dist/cli/{secrets-DCJYHDSY.js → secrets-JMUAVIVC.js} +15 -15
- package/dist/cli/{secrets-D3GF4B2Z.mjs → secrets-Q36VC35L.mjs} +6 -6
- package/dist/cli/{sessions-QGEQ2UYZ.mjs → sessions-HG6I3HMY.mjs} +5 -5
- package/dist/cli/{sessions-Z4JYJSDP.js → sessions-SUXU7OM7.js} +6 -6
- package/dist/cli/{settings-UVXXAT4A.js → settings-UIELQ5CV.js} +106 -78
- package/dist/cli/{settings-G7QEXA4N.mjs → settings-Z76XW4KF.mjs} +39 -11
- package/dist/cli/{setup-5I42W7D4.js → setup-2L7H5P2O.js} +50 -49
- package/dist/cli/{setup-QHJU3DUI.mjs → setup-OXNYAOQ4.mjs} +10 -9
- package/dist/cli/skills-DEVXYGYH.js +37 -0
- package/dist/cli/{skills-5LRF4UKX.mjs → skills-XSNLXJGI.mjs} +8 -7
- package/dist/cli/tools-SCGHABDL.js +57 -0
- package/dist/cli/{tools-PUT6STVG.mjs → tools-SUSFAYFH.mjs} +17 -16
- package/dist/cli/update-BSIILGO3.js +35 -0
- package/dist/cli/{update-CJ2GA64X.mjs → update-ENSTG3QO.mjs} +10 -9
- package/dist/cli/{workflow-O67MEBCP.js → workflow-FMBZNY4F.js} +17 -17
- package/dist/cli/{workflow-HVEWRTXD.mjs → workflow-Z33QE6VT.mjs} +7 -7
- package/dist/{client-DYAfJpaN.d.mts → client-BDbouy3Y.d.mts} +1 -1
- package/dist/{client-CIwenMFS.d.ts → client-Cx0420fs.d.ts} +1 -1
- package/dist/{client-core-CRjtyMAI.d.ts → client-core-B4hq0-m2.d.ts} +56 -4
- package/dist/{client-core-DlzP8vEs.d.mts → client-core-CwiVaMZ5.d.mts} +56 -4
- package/dist/{compiler-manifest-DaJrA2KV.d.mts → compiler-manifest-BeURaD5Y.d.mts} +2 -0
- package/dist/{compiler-manifest-DaJrA2KV.d.ts → compiler-manifest-BeURaD5Y.d.ts} +2 -0
- package/dist/{errors-KLga4bLr.d.ts → errors-BoPXPrSy.d.ts} +1 -1
- package/dist/{errors-BKnSYueU.d.mts → errors-kBuT4kGK.d.mts} +1 -1
- package/dist/{index-C5nAZ-VS.d.ts → index-D0crdGM1.d.ts} +1 -1
- package/dist/{index-C-8AFpWy.d.mts → index-DC7oRAAC.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +116 -110
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-UPK4IIIN.js +0 -43
- package/dist/cli/describe-OYS7LZJD.js +0 -49
- package/dist/cli/git-5YQJSJFR.js +0 -25
- package/dist/cli/search-R5VEWJO2.js +0 -32
- package/dist/cli/skills-FB6TV52O.js +0 -36
- package/dist/cli/tools-L2364RPA.js +0 -56
- package/dist/cli/update-ESYJGYVZ.js +0 -34
|
@@ -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
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkDB54ROPHjs = require('./chunk-DB54ROPH.js');
|
|
5
|
+
require('./chunk-AD2WJUZA.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
|
|
20
|
+
var _chunkYJKKOSXSjs = require('./chunk-YJKKOSXS.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
require('./chunk-
|
|
28
|
-
require('./chunk-
|
|
26
|
+
var _chunk75NAFY36js = require('./chunk-75NAFY36.js');
|
|
27
|
+
require('./chunk-MHRR47VQ.js');
|
|
28
|
+
require('./chunk-FWSEGIT6.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-
|
|
36
|
+
require('./chunk-2OY5DXTC.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 =
|
|
114
|
+
const wantsJson = _chunk75NAFY36js.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
115
115
|
if (wantsJson) {
|
|
116
|
-
const payload =
|
|
117
|
-
|
|
116
|
+
const payload = _chunk75NAFY36js.errorToJsonPayload.call(void 0, error);
|
|
117
|
+
_chunk75NAFY36js.printJson.call(void 0, {
|
|
118
118
|
ok: false,
|
|
119
119
|
exitCode,
|
|
120
120
|
...next ? { next } : {},
|
|
@@ -529,14 +529,14 @@ Preview the plan first with:
|
|
|
529
529
|
);
|
|
530
530
|
}
|
|
531
531
|
async function handleMonitorsStatus(options) {
|
|
532
|
-
const payload = await new (0,
|
|
532
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.status();
|
|
533
533
|
const hasAccess = payload.has_access === true;
|
|
534
534
|
const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
|
|
535
535
|
const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
|
|
536
536
|
${reason}` : ""}
|
|
537
537
|
` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
|
|
538
538
|
`;
|
|
539
|
-
|
|
539
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
540
540
|
{ has_access: hasAccess, ...reason ? { reason } : {} },
|
|
541
541
|
{ json: options.json, text }
|
|
542
542
|
);
|
|
@@ -602,14 +602,14 @@ async function handleMonitorsAvailable(toolId, options) {
|
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
const tool = _nullishCoalesce(toolId, () => ( options.tool));
|
|
605
|
-
const payload = await new (0,
|
|
605
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.available(tool, {
|
|
606
606
|
...options.provider ? { provider: options.provider } : {},
|
|
607
607
|
...options.search ? { search: options.search } : {},
|
|
608
608
|
...options.limit ? { limit: options.limit } : {},
|
|
609
609
|
...options.full ? { full: true } : {},
|
|
610
610
|
...options.compact ? { compact: true } : {}
|
|
611
611
|
});
|
|
612
|
-
|
|
612
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, {
|
|
613
613
|
json: options.json,
|
|
614
614
|
// Human list view shows id + name + deployed_count ("deployed: N") so
|
|
615
615
|
// can-deploy vs already-deployed is visible in one view. Describing a
|
|
@@ -712,14 +712,14 @@ async function handleMonitorsList(options) {
|
|
|
712
712
|
"`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
|
|
713
713
|
);
|
|
714
714
|
}
|
|
715
|
-
const payload = await new (0,
|
|
715
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.list({
|
|
716
716
|
...state ? { state } : {},
|
|
717
717
|
...options.status ? { status: options.status } : {},
|
|
718
718
|
...options.limit ? { limit: options.limit } : {},
|
|
719
719
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
720
720
|
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
721
721
|
});
|
|
722
|
-
|
|
722
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, {
|
|
723
723
|
json: options.json,
|
|
724
724
|
text: renderDeployedListText(
|
|
725
725
|
payload,
|
|
@@ -773,6 +773,15 @@ function renderMonitorLedgerText(payload) {
|
|
|
773
773
|
`! ${_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
774
|
);
|
|
775
775
|
}
|
|
776
|
+
const fleetScope = asRecord(payload.fleet_scope);
|
|
777
|
+
if (fleetScope) {
|
|
778
|
+
const issues = _nullishCoalesce(asFiniteNumber(fleetScope.issues), () => ( 0));
|
|
779
|
+
lines.push(
|
|
780
|
+
`Fleet ${_nullishCoalesce(asString(fleetScope.id), () => ( "unknown"))} \xB7 ${fleetOverviewStatusLabel(
|
|
781
|
+
asString(fleetScope.status)
|
|
782
|
+
)} \xB7 ${_nullishCoalesce(asFiniteNumber(fleetScope.live), () => ( 0))} of ${_nullishCoalesce(_nullishCoalesce(asFiniteNumber(fleetScope.owned), () => ( asFiniteNumber(fleetScope.expected))), () => ( 0))} live \xB7 ${issues} ${issues === 1 ? "issue" : "issues"}`
|
|
783
|
+
);
|
|
784
|
+
}
|
|
776
785
|
const total = asFiniteNumber(payload.total);
|
|
777
786
|
lines.push(
|
|
778
787
|
monitors.length === 0 ? "No monitors matched." : total !== void 0 && total > monitors.length ? `Monitors (${monitors.length} of ${total}):` : `Monitors (${monitors.length}):`
|
|
@@ -800,7 +809,7 @@ function renderMonitorLedgerText(payload) {
|
|
|
800
809
|
var LEDGER_SORTS = ["recent", "installed", "name", "findings"];
|
|
801
810
|
var LEDGER_WINDOWS = ["1d", "7d", "30d", "90d", "1y"];
|
|
802
811
|
async function handleMonitorsLedger(key, options) {
|
|
803
|
-
const client = new (0,
|
|
812
|
+
const client = new (0, _chunkDB54ROPHjs.DeeplineClient)();
|
|
804
813
|
if (options.findings) {
|
|
805
814
|
if (!key) {
|
|
806
815
|
throw new MonitorsUsageError(
|
|
@@ -810,12 +819,12 @@ async function handleMonitorsLedger(key, options) {
|
|
|
810
819
|
const payload2 = await client.monitors.ledgerFindings(key, {
|
|
811
820
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
812
821
|
});
|
|
813
|
-
|
|
822
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
814
823
|
return;
|
|
815
824
|
}
|
|
816
825
|
if (key) {
|
|
817
826
|
const payload2 = await client.monitors.ledgerGet(key);
|
|
818
|
-
|
|
827
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
819
828
|
return;
|
|
820
829
|
}
|
|
821
830
|
if (options.sort !== void 0 && !LEDGER_SORTS.includes(options.sort)) {
|
|
@@ -833,12 +842,13 @@ async function handleMonitorsLedger(key, options) {
|
|
|
833
842
|
..._optionalChain([options, 'access', _33 => _33.state, 'optionalAccess', _34 => _34.length]) ? { states: options.state } : {},
|
|
834
843
|
..._optionalChain([options, 'access', _35 => _35.signal, 'optionalAccess', _36 => _36.length]) ? { signals: options.signal } : {},
|
|
835
844
|
...options.play ? { play: options.play } : {},
|
|
845
|
+
...options.fleet ? { fleet: options.fleet } : {},
|
|
836
846
|
...options.sort ? { sort: options.sort } : {},
|
|
837
847
|
...options.window ? { window: options.window } : {},
|
|
838
848
|
...options.limit ? { limit: options.limit } : {},
|
|
839
849
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
840
850
|
});
|
|
841
|
-
|
|
851
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, {
|
|
842
852
|
json: options.json,
|
|
843
853
|
text: renderMonitorLedgerText(payload)
|
|
844
854
|
});
|
|
@@ -850,10 +860,10 @@ async function handleMonitorsCheck(definition, options) {
|
|
|
850
860
|
argLabel: "<definition>",
|
|
851
861
|
command: "deepline monitors check"
|
|
852
862
|
});
|
|
853
|
-
const payload = await new (0,
|
|
863
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.check(
|
|
854
864
|
body
|
|
855
865
|
);
|
|
856
|
-
|
|
866
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
857
867
|
}
|
|
858
868
|
function previewText(value) {
|
|
859
869
|
return typeof value === "string" && value.trim() ? value.trim() : "-";
|
|
@@ -911,22 +921,22 @@ async function handleMonitorsPreview(definition, options) {
|
|
|
911
921
|
if (limit !== void 0 && !Number.isInteger(limit)) {
|
|
912
922
|
throw new MonitorsUsageError("--limit must be a whole number from 1 to 3.");
|
|
913
923
|
}
|
|
914
|
-
const wantsJson =
|
|
924
|
+
const wantsJson = _chunk75NAFY36js.shouldEmitJson.call(void 0, options.json);
|
|
915
925
|
if (options.idempotencyKey === void 0 && wantsJson) {
|
|
916
926
|
throw new MonitorsUsageError(
|
|
917
927
|
"--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
928
|
);
|
|
919
929
|
}
|
|
920
930
|
const idempotencyKey = _nullishCoalesce(options.idempotencyKey, () => ( `monitor-preview-${_crypto.randomUUID.call(void 0, )}`));
|
|
921
|
-
const progress =
|
|
931
|
+
const progress = _chunkYJKKOSXSjs.createCliProgress.call(void 0, !wantsJson);
|
|
922
932
|
progress.phase(`Preview key: ${idempotencyKey}`);
|
|
923
933
|
try {
|
|
924
|
-
const payload = await new (0,
|
|
934
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.preview(
|
|
925
935
|
body,
|
|
926
936
|
{ idempotencyKey, ...limit === void 0 ? {} : { limit } }
|
|
927
937
|
);
|
|
928
938
|
progress.complete();
|
|
929
|
-
|
|
939
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, {
|
|
930
940
|
json: options.json,
|
|
931
941
|
text: renderMonitorPreviewText(payload)
|
|
932
942
|
});
|
|
@@ -971,7 +981,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
971
981
|
argLabel: "<definition>",
|
|
972
982
|
command: "deepline monitors deploy"
|
|
973
983
|
});
|
|
974
|
-
const client = new (0,
|
|
984
|
+
const client = new (0, _chunkDB54ROPHjs.DeeplineClient)();
|
|
975
985
|
const definitionArg = body;
|
|
976
986
|
if (options.dryRun) {
|
|
977
987
|
const payload2 = await client.monitors.deploy(definitionArg, {
|
|
@@ -979,7 +989,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
979
989
|
});
|
|
980
990
|
const valid = payload2.valid !== false;
|
|
981
991
|
const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _39 => _39(payload2), 'optionalAccess', _40 => _40.identity_conflict]));
|
|
982
|
-
|
|
992
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
983
993
|
{ dry_run: true, ...payload2 },
|
|
984
994
|
{ json: options.json, text: renderMonitorDeployPlan(payload2) }
|
|
985
995
|
);
|
|
@@ -989,7 +999,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
989
999
|
return;
|
|
990
1000
|
}
|
|
991
1001
|
const payload = await client.monitors.deploy(definitionArg);
|
|
992
|
-
|
|
1002
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, {
|
|
993
1003
|
json: options.json,
|
|
994
1004
|
text: renderMonitorDeployCompletion(payload)
|
|
995
1005
|
});
|
|
@@ -1001,29 +1011,29 @@ async function handleMonitorsSync(definition, options) {
|
|
|
1001
1011
|
argLabel: "<definition>",
|
|
1002
1012
|
command: "deepline monitors sync"
|
|
1003
1013
|
});
|
|
1004
|
-
const payload = await new (0,
|
|
1014
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.sync(body, {
|
|
1005
1015
|
...options.dryRun ? { dryRun: true } : {},
|
|
1006
1016
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
|
|
1007
1017
|
});
|
|
1008
1018
|
if (options.dryRun) {
|
|
1009
1019
|
const plan = payload;
|
|
1010
|
-
|
|
1020
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
1011
1021
|
{ dry_run: true, ...plan },
|
|
1012
1022
|
{ json: options.json, text: renderMonitorDeployPlan(plan) }
|
|
1013
1023
|
);
|
|
1014
1024
|
return;
|
|
1015
1025
|
}
|
|
1016
|
-
|
|
1026
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, {
|
|
1017
1027
|
json: options.json,
|
|
1018
1028
|
text: renderMonitorJob(payload)
|
|
1019
1029
|
});
|
|
1020
1030
|
}
|
|
1021
1031
|
async function handleScalarMonitorLifecycle(action, key, options) {
|
|
1022
|
-
const payload = await new (0,
|
|
1032
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors[action](key, {
|
|
1023
1033
|
...options.dryRun ? { dryRun: true } : {},
|
|
1024
1034
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
|
|
1025
1035
|
});
|
|
1026
|
-
|
|
1036
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, {
|
|
1027
1037
|
json: options.json,
|
|
1028
1038
|
text: options.dryRun ? void 0 : renderMonitorJob(payload)
|
|
1029
1039
|
});
|
|
@@ -1112,11 +1122,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
1112
1122
|
lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
|
|
1113
1123
|
);
|
|
1114
1124
|
}
|
|
1115
|
-
const payload = await new (0,
|
|
1125
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.batch.deploy(
|
|
1116
1126
|
lint.normalized.monitors,
|
|
1117
1127
|
{ idempotencyKey }
|
|
1118
1128
|
);
|
|
1119
|
-
|
|
1129
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
1120
1130
|
{
|
|
1121
1131
|
...payload,
|
|
1122
1132
|
idempotency_key: idempotencyKey,
|
|
@@ -1149,7 +1159,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1149
1159
|
);
|
|
1150
1160
|
}
|
|
1151
1161
|
if (options.dryRun) {
|
|
1152
|
-
|
|
1162
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
1153
1163
|
{
|
|
1154
1164
|
ok: true,
|
|
1155
1165
|
dry_run: true,
|
|
@@ -1166,7 +1176,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1166
1176
|
"sync",
|
|
1167
1177
|
options.idempotencyKey
|
|
1168
1178
|
);
|
|
1169
|
-
const payload = await new (0,
|
|
1179
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.batches.sync(
|
|
1170
1180
|
batchId,
|
|
1171
1181
|
lint.normalized.monitors,
|
|
1172
1182
|
{
|
|
@@ -1174,14 +1184,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1174
1184
|
...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
|
|
1175
1185
|
}
|
|
1176
1186
|
);
|
|
1177
|
-
|
|
1187
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
1178
1188
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1179
1189
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1180
1190
|
);
|
|
1181
1191
|
}
|
|
1182
1192
|
async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
1183
1193
|
if (options.dryRun) {
|
|
1184
|
-
|
|
1194
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
1185
1195
|
{
|
|
1186
1196
|
ok: true,
|
|
1187
1197
|
dry_run: true,
|
|
@@ -1197,17 +1207,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
|
1197
1207
|
intent,
|
|
1198
1208
|
options.idempotencyKey
|
|
1199
1209
|
);
|
|
1200
|
-
const payload = await new (0,
|
|
1210
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
1201
1211
|
idempotencyKey
|
|
1202
1212
|
});
|
|
1203
|
-
|
|
1213
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
1204
1214
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1205
1215
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1206
1216
|
);
|
|
1207
1217
|
}
|
|
1208
1218
|
async function handleNamedMonitorBatchGet(batchId, options) {
|
|
1209
|
-
const payload = await new (0,
|
|
1210
|
-
|
|
1219
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.batches.get(batchId);
|
|
1220
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, {
|
|
1211
1221
|
json: options.json,
|
|
1212
1222
|
text: renderMonitorJob(payload)
|
|
1213
1223
|
});
|
|
@@ -1221,7 +1231,7 @@ async function handleMonitorBatchLint(options) {
|
|
|
1221
1231
|
const result = _chunkIF75RD6Ujs.lintMonitorBatchInput.call(void 0,
|
|
1222
1232
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1223
1233
|
);
|
|
1224
|
-
|
|
1234
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
1225
1235
|
{
|
|
1226
1236
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1227
1237
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1241,7 +1251,7 @@ async function handleMonitorFleetLint(options) {
|
|
|
1241
1251
|
const result = _chunkC374C22Yjs.lintMonitorFleetInput.call(void 0,
|
|
1242
1252
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1243
1253
|
);
|
|
1244
|
-
|
|
1254
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
1245
1255
|
{
|
|
1246
1256
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1247
1257
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1253,32 +1263,32 @@ async function handleMonitorFleetLint(options) {
|
|
|
1253
1263
|
process.exitCode = 2;
|
|
1254
1264
|
}
|
|
1255
1265
|
async function handleMonitorJobGet(jobId, options) {
|
|
1256
|
-
const payload = await new (0,
|
|
1257
|
-
|
|
1266
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1267
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, {
|
|
1258
1268
|
json: options.json,
|
|
1259
1269
|
text: renderMonitorJob(payload)
|
|
1260
1270
|
});
|
|
1261
1271
|
}
|
|
1262
1272
|
async function handleMonitorJobWait(jobId, options) {
|
|
1263
|
-
const payload = await new (0,
|
|
1273
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1264
1274
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1265
1275
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1266
1276
|
});
|
|
1267
|
-
|
|
1277
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, {
|
|
1268
1278
|
json: options.json,
|
|
1269
1279
|
text: renderMonitorJob(payload)
|
|
1270
1280
|
});
|
|
1271
1281
|
}
|
|
1272
1282
|
async function handleMonitorJobLogs(jobId, options) {
|
|
1273
1283
|
const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
|
|
1274
|
-
const payload = await new (0,
|
|
1284
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1275
1285
|
...limit === void 0 ? {} : { limit }
|
|
1276
1286
|
});
|
|
1277
|
-
|
|
1287
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
1278
1288
|
}
|
|
1279
1289
|
async function handleMonitorJobCancel(jobId, options) {
|
|
1280
|
-
const payload = await new (0,
|
|
1281
|
-
|
|
1290
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1291
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, {
|
|
1282
1292
|
json: options.json,
|
|
1283
1293
|
text: renderMonitorJob(payload)
|
|
1284
1294
|
});
|
|
@@ -1332,6 +1342,14 @@ var MONITOR_FLEET_COMMANDS = [
|
|
|
1332
1342
|
name: "get",
|
|
1333
1343
|
summary: "Read one fleet, list every fleet, or inspect drift."
|
|
1334
1344
|
},
|
|
1345
|
+
{
|
|
1346
|
+
name: "overview",
|
|
1347
|
+
summary: "List fleets by status, issues and findings, or read one fleet\u2019s issues by cause."
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
name: "issues",
|
|
1351
|
+
summary: "Page through a fleet\u2019s members that are not live, with each cause and message."
|
|
1352
|
+
},
|
|
1335
1353
|
{
|
|
1336
1354
|
name: "deactivate",
|
|
1337
1355
|
summary: "Deactivate a fleet and the monitors it owns."
|
|
@@ -1587,7 +1605,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
|
|
|
1587
1605
|
`;
|
|
1588
1606
|
}
|
|
1589
1607
|
function reportFleetState(payload, error, options) {
|
|
1590
|
-
|
|
1608
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
1591
1609
|
{
|
|
1592
1610
|
...payload,
|
|
1593
1611
|
code: error.code,
|
|
@@ -1719,7 +1737,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
|
|
|
1719
1737
|
_fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
|
|
1720
1738
|
`, "utf8");
|
|
1721
1739
|
const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
|
|
1722
|
-
|
|
1740
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
1723
1741
|
{ schemaVersion: 2, file, definition, next },
|
|
1724
1742
|
{
|
|
1725
1743
|
json: options.json,
|
|
@@ -1781,7 +1799,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1781
1799
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1782
1800
|
);
|
|
1783
1801
|
}
|
|
1784
|
-
const client = new (0,
|
|
1802
|
+
const client = new (0, _chunkDB54ROPHjs.DeeplineClient)();
|
|
1785
1803
|
const payload = await client.monitors.fleets.sync(
|
|
1786
1804
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1787
1805
|
{
|
|
@@ -1803,7 +1821,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1803
1821
|
}
|
|
1804
1822
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1805
1823
|
if (!options.wait || options.dryRun) {
|
|
1806
|
-
|
|
1824
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, accepted, {
|
|
1807
1825
|
json: options.json,
|
|
1808
1826
|
text: renderFleetSync(payload, {
|
|
1809
1827
|
fleetId,
|
|
@@ -1829,7 +1847,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1829
1847
|
const status = fleetStatus(final);
|
|
1830
1848
|
const summary = renderFleetGet(final);
|
|
1831
1849
|
if (status === "converged") {
|
|
1832
|
-
|
|
1850
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1833
1851
|
return;
|
|
1834
1852
|
}
|
|
1835
1853
|
if (status === "billing_suspended") {
|
|
@@ -1869,14 +1887,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1869
1887
|
);
|
|
1870
1888
|
}
|
|
1871
1889
|
const limit = options.limit === void 0 ? void 0 : fleetIntegerOption(options.limit, "--limit");
|
|
1872
|
-
const client = new (0,
|
|
1890
|
+
const client = new (0, _chunkDB54ROPHjs.DeeplineClient)();
|
|
1873
1891
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1874
1892
|
...options.drift ? { drift: true } : {},
|
|
1875
1893
|
...limit !== void 0 ? { limit } : {}
|
|
1876
1894
|
});
|
|
1877
1895
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1878
1896
|
if (!options.check) {
|
|
1879
|
-
|
|
1897
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1880
1898
|
return;
|
|
1881
1899
|
}
|
|
1882
1900
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -1884,7 +1902,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1884
1902
|
);
|
|
1885
1903
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
1886
1904
|
if (unconverged.length === 0) {
|
|
1887
|
-
|
|
1905
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1888
1906
|
return;
|
|
1889
1907
|
}
|
|
1890
1908
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -1899,6 +1917,207 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1899
1917
|
{ json: options.json, text }
|
|
1900
1918
|
);
|
|
1901
1919
|
}
|
|
1920
|
+
var FLEET_OVERVIEW_STATUSES = [
|
|
1921
|
+
"needs_attention",
|
|
1922
|
+
"paused_credits",
|
|
1923
|
+
"paused_cap",
|
|
1924
|
+
"paused_billing",
|
|
1925
|
+
"setting_up",
|
|
1926
|
+
"running",
|
|
1927
|
+
"deactivated"
|
|
1928
|
+
];
|
|
1929
|
+
var FLEET_OVERVIEW_SORTS = [
|
|
1930
|
+
"attention",
|
|
1931
|
+
"findings",
|
|
1932
|
+
"newest",
|
|
1933
|
+
"name"
|
|
1934
|
+
];
|
|
1935
|
+
var FLEET_ISSUE_GROUPS = ["failed", "blocked", "waiting"];
|
|
1936
|
+
var FLEET_OVERVIEW_STATUS_LABELS = {
|
|
1937
|
+
needs_attention: "needs attention",
|
|
1938
|
+
paused_credits: "paused \xB7 out of credits",
|
|
1939
|
+
paused_cap: "paused \xB7 spending cap",
|
|
1940
|
+
paused_billing: "paused \xB7 billing issue",
|
|
1941
|
+
setting_up: "setting up",
|
|
1942
|
+
running: "running",
|
|
1943
|
+
deactivated: "deactivated"
|
|
1944
|
+
};
|
|
1945
|
+
function fleetOverviewStatusLabel(status) {
|
|
1946
|
+
return status ? _nullishCoalesce(FLEET_OVERVIEW_STATUS_LABELS[status], () => ( status)) : "unknown";
|
|
1947
|
+
}
|
|
1948
|
+
function fleetChoice(value, allowed, flag) {
|
|
1949
|
+
if (value === void 0) return void 0;
|
|
1950
|
+
if (allowed.includes(value)) return value;
|
|
1951
|
+
throw new MonitorsUsageError(
|
|
1952
|
+
`${flag} must be ${allowed.join(", ")}; received ${value}.`
|
|
1953
|
+
);
|
|
1954
|
+
}
|
|
1955
|
+
function fleetIssueTotal(fleet) {
|
|
1956
|
+
return _nullishCoalesce(asFiniteNumber(_optionalChain([asRecord, 'call', _71 => _71(fleet.issues), 'optionalAccess', _72 => _72.total])), () => ( 0));
|
|
1957
|
+
}
|
|
1958
|
+
function fleetFindingsText(fleet, windowLabel) {
|
|
1959
|
+
return ledgerFindingsText(asRecord(fleet.findings), windowLabel);
|
|
1960
|
+
}
|
|
1961
|
+
function renderFleetOverviewList(payload) {
|
|
1962
|
+
const fleets = (Array.isArray(payload.fleets) ? payload.fleets : []).flatMap(
|
|
1963
|
+
(raw) => {
|
|
1964
|
+
const fleet = asRecord(raw);
|
|
1965
|
+
return fleet ? [fleet] : [];
|
|
1966
|
+
}
|
|
1967
|
+
);
|
|
1968
|
+
const window = _nullishCoalesce(asString(_optionalChain([asRecord, 'call', _73 => _73(payload.applied), 'optionalAccess', _74 => _74.window])), () => ( "30d"));
|
|
1969
|
+
const windowLabel = _nullishCoalesce(LEDGER_WINDOW_LABELS[window], () => ( window));
|
|
1970
|
+
if (fleets.length === 0) {
|
|
1971
|
+
return "No fleets matched.\nNext: deepline monitors fleets overview --state deactivated\n";
|
|
1972
|
+
}
|
|
1973
|
+
const idWidth = fleets.reduce(
|
|
1974
|
+
(max, fleet) => Math.max(max, (_nullishCoalesce(asString(fleet.id), () => ( "-"))).length),
|
|
1975
|
+
0
|
|
1976
|
+
);
|
|
1977
|
+
const statusWidth = fleets.reduce(
|
|
1978
|
+
(max, fleet) => Math.max(max, fleetOverviewStatusLabel(asString(fleet.status)).length),
|
|
1979
|
+
0
|
|
1980
|
+
);
|
|
1981
|
+
const total = asFiniteNumber(payload.total);
|
|
1982
|
+
const lines = [
|
|
1983
|
+
total !== void 0 && total > fleets.length ? `Fleets (${fleets.length} of ${total})` : `Fleets (${fleets.length})`
|
|
1984
|
+
];
|
|
1985
|
+
for (const fleet of fleets) {
|
|
1986
|
+
const issues = fleetIssueTotal(fleet);
|
|
1987
|
+
lines.push(
|
|
1988
|
+
` ${(_nullishCoalesce(asString(fleet.id), () => ( "-"))).padEnd(idWidth)} ${fleetOverviewStatusLabel(
|
|
1989
|
+
asString(fleet.status)
|
|
1990
|
+
).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(
|
|
1991
|
+
fleet,
|
|
1992
|
+
windowLabel
|
|
1993
|
+
)}`
|
|
1994
|
+
);
|
|
1995
|
+
}
|
|
1996
|
+
return `${lines.join("\n")}
|
|
1997
|
+
`;
|
|
1998
|
+
}
|
|
1999
|
+
function fleetIssueCauses(group) {
|
|
2000
|
+
const causes = _nullishCoalesce(asRecord(_optionalChain([group, 'optionalAccess', _75 => _75.causes])), () => ( {}));
|
|
2001
|
+
return Object.entries(causes).flatMap(([cause, raw]) => {
|
|
2002
|
+
const count = _nullishCoalesce(asFiniteNumber(raw), () => ( 0));
|
|
2003
|
+
return count > 0 ? [[cause, count]] : [];
|
|
2004
|
+
}).sort(
|
|
2005
|
+
(left, right) => right[1] - left[1] || left[0].localeCompare(right[0])
|
|
2006
|
+
);
|
|
2007
|
+
}
|
|
2008
|
+
function renderFleetOverviewDetail(payload, window) {
|
|
2009
|
+
const id = _nullishCoalesce(asString(payload.id), () => ( "unknown"));
|
|
2010
|
+
const windowLabel = _nullishCoalesce(_nullishCoalesce(LEDGER_WINDOW_LABELS[_nullishCoalesce(window, () => ( "30d"))], () => ( window)), () => ( "30d"));
|
|
2011
|
+
const settingUp = _nullishCoalesce(asFiniteNumber(payload.setting_up), () => ( 0));
|
|
2012
|
+
const missing = _nullishCoalesce(asFiniteNumber(payload.missing_at_provider), () => ( 0));
|
|
2013
|
+
const lines = [
|
|
2014
|
+
`Fleet ${id} \u2014 ${fleetOverviewStatusLabel(asString(payload.status))}`,
|
|
2015
|
+
` 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` : ""}`,
|
|
2016
|
+
` last sync ${_nullishCoalesce(asString(payload.last_sync_attempt_at), () => ( "never"))} (attempt)`,
|
|
2017
|
+
` findings ${fleetFindingsText(payload, windowLabel)}`
|
|
2018
|
+
];
|
|
2019
|
+
const issues = _nullishCoalesce(asRecord(payload.issues), () => ( {}));
|
|
2020
|
+
const total = _nullishCoalesce(asFiniteNumber(issues.total), () => ( 0));
|
|
2021
|
+
lines.push("", `Issues (${total}):`);
|
|
2022
|
+
for (const group of ["failed", "blocked"]) {
|
|
2023
|
+
const record = asRecord(issues[group]);
|
|
2024
|
+
const count = _nullishCoalesce(asFiniteNumber(_optionalChain([record, 'optionalAccess', _76 => _76.total])), () => ( 0));
|
|
2025
|
+
if (count === 0) continue;
|
|
2026
|
+
lines.push(` ${group} ${count}`);
|
|
2027
|
+
for (const [cause, causeCount] of fleetIssueCauses(record)) {
|
|
2028
|
+
lines.push(` ${cause} ${causeCount}`);
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
const waiting = _nullishCoalesce(asFiniteNumber(_optionalChain([asRecord, 'call', _77 => _77(issues.waiting), 'optionalAccess', _78 => _78.total])), () => ( 0));
|
|
2032
|
+
if (waiting > 0) {
|
|
2033
|
+
lines.push(` waiting ${waiting} (rate limited; retries on its own)`);
|
|
2034
|
+
}
|
|
2035
|
+
if (total === 0 && waiting === 0) lines.push(" none");
|
|
2036
|
+
const shellId = fleetShellArg(id);
|
|
2037
|
+
if (total > 0) lines.push(`Next: deepline monitors fleets issues ${shellId}`);
|
|
2038
|
+
lines.push(`Resync: deepline monitors fleets sync ${shellId} --dry-run`);
|
|
2039
|
+
return `${lines.join("\n")}
|
|
2040
|
+
`;
|
|
2041
|
+
}
|
|
2042
|
+
function renderFleetIssuePage(payload) {
|
|
2043
|
+
const issues = (Array.isArray(payload.issues) ? payload.issues : []).flatMap(
|
|
2044
|
+
(raw) => {
|
|
2045
|
+
const issue = asRecord(raw);
|
|
2046
|
+
return issue ? [issue] : [];
|
|
2047
|
+
}
|
|
2048
|
+
);
|
|
2049
|
+
const fleetId = _nullishCoalesce(asString(payload.fleet_id), () => ( "unknown"));
|
|
2050
|
+
const total = asFiniteNumber(payload.total);
|
|
2051
|
+
const lines = [
|
|
2052
|
+
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}):`
|
|
2053
|
+
];
|
|
2054
|
+
for (const issue of issues) {
|
|
2055
|
+
lines.push(
|
|
2056
|
+
`- ${_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"))}`
|
|
2057
|
+
);
|
|
2058
|
+
const message = asString(issue.message);
|
|
2059
|
+
if (message) lines.push(` ${message}`);
|
|
2060
|
+
}
|
|
2061
|
+
const next = asString(payload.next_cursor);
|
|
2062
|
+
if (next) lines.push(`More: --cursor ${next}`);
|
|
2063
|
+
return `${lines.join("\n")}
|
|
2064
|
+
`;
|
|
2065
|
+
}
|
|
2066
|
+
async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
2067
|
+
const window = fleetChoice(options.window, LEDGER_WINDOWS, "--window");
|
|
2068
|
+
const client = new (0, _chunkDB54ROPHjs.DeeplineClient)();
|
|
2069
|
+
if (fleetId) {
|
|
2070
|
+
const listOnly = [
|
|
2071
|
+
options.q !== void 0 ? "--q" : "",
|
|
2072
|
+
_optionalChain([options, 'access', _79 => _79.state, 'optionalAccess', _80 => _80.length]) ? "--state" : "",
|
|
2073
|
+
options.sort !== void 0 ? "--sort" : ""
|
|
2074
|
+
].filter(Boolean);
|
|
2075
|
+
if (listOnly.length > 0) {
|
|
2076
|
+
throw new MonitorsUsageError(
|
|
2077
|
+
`${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)}).`
|
|
2078
|
+
);
|
|
2079
|
+
}
|
|
2080
|
+
const payload2 = await client.monitors.fleets.overview(fleetId, {
|
|
2081
|
+
...window ? { window } : {}
|
|
2082
|
+
});
|
|
2083
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload2, {
|
|
2084
|
+
json: options.json,
|
|
2085
|
+
text: renderFleetOverviewDetail(payload2, window)
|
|
2086
|
+
});
|
|
2087
|
+
return;
|
|
2088
|
+
}
|
|
2089
|
+
for (const state of _nullishCoalesce(options.state, () => ( []))) {
|
|
2090
|
+
fleetChoice(state, FLEET_OVERVIEW_STATUSES, "--state");
|
|
2091
|
+
}
|
|
2092
|
+
const sort = fleetChoice(options.sort, FLEET_OVERVIEW_SORTS, "--sort");
|
|
2093
|
+
const payload = await client.monitors.fleets.overview(void 0, {
|
|
2094
|
+
...options.q ? { q: options.q } : {},
|
|
2095
|
+
..._optionalChain([options, 'access', _81 => _81.state, 'optionalAccess', _82 => _82.length]) ? { states: options.state } : {},
|
|
2096
|
+
...sort ? { sort } : {},
|
|
2097
|
+
...window ? { window } : {}
|
|
2098
|
+
});
|
|
2099
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, {
|
|
2100
|
+
json: options.json,
|
|
2101
|
+
text: renderFleetOverviewList(payload)
|
|
2102
|
+
});
|
|
2103
|
+
}
|
|
2104
|
+
async function handleMonitorFleetsIssues(fleetId, options) {
|
|
2105
|
+
const group = fleetChoice(options.group, FLEET_ISSUE_GROUPS, "--group");
|
|
2106
|
+
const limit = fleetIntegerOption(options.limit, "--limit");
|
|
2107
|
+
if (limit !== void 0 && (limit < 1 || limit > 100)) {
|
|
2108
|
+
throw new MonitorsUsageError("--limit must be an integer from 1 to 100.");
|
|
2109
|
+
}
|
|
2110
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.fleets.issues(fleetId, {
|
|
2111
|
+
...group ? { group } : {},
|
|
2112
|
+
...options.cause ? { cause: options.cause } : {},
|
|
2113
|
+
...options.cursor ? { cursor: options.cursor } : {},
|
|
2114
|
+
...limit !== void 0 ? { limit } : {}
|
|
2115
|
+
});
|
|
2116
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, {
|
|
2117
|
+
json: options.json,
|
|
2118
|
+
text: renderFleetIssuePage(payload)
|
|
2119
|
+
});
|
|
2120
|
+
}
|
|
1902
2121
|
function fleetReactivateCommandLine(fleetId, options) {
|
|
1903
2122
|
const parts = [
|
|
1904
2123
|
"deepline",
|
|
@@ -1923,13 +2142,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
1923
2142
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
1924
2143
|
);
|
|
1925
2144
|
}
|
|
1926
|
-
const client = new (0,
|
|
2145
|
+
const client = new (0, _chunkDB54ROPHjs.DeeplineClient)();
|
|
1927
2146
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
1928
2147
|
idempotencyKey
|
|
1929
2148
|
});
|
|
1930
2149
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1931
2150
|
if (!options.wait) {
|
|
1932
|
-
|
|
2151
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, accepted, {
|
|
1933
2152
|
json: options.json,
|
|
1934
2153
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
1935
2154
|
idempotency key ${idempotencyKey}
|
|
@@ -1952,7 +2171,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
1952
2171
|
const envelope = { ...accepted, ...final };
|
|
1953
2172
|
const text = renderFleetGet(final);
|
|
1954
2173
|
if (fleetStatus(final) === "converged") {
|
|
1955
|
-
|
|
2174
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
1956
2175
|
return;
|
|
1957
2176
|
}
|
|
1958
2177
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2001,7 +2220,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
2001
2220
|
}
|
|
2002
2221
|
}
|
|
2003
2222
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
2004
|
-
const client = new (0,
|
|
2223
|
+
const client = new (0, _chunkDB54ROPHjs.DeeplineClient)();
|
|
2005
2224
|
if (options.dryRun) {
|
|
2006
2225
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
2007
2226
|
dryRun: true,
|
|
@@ -2011,7 +2230,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
2011
2230
|
command: "deepline monitors fleets deactivate",
|
|
2012
2231
|
mutation: "fleet deactivate"
|
|
2013
2232
|
});
|
|
2014
|
-
|
|
2233
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, plan, {
|
|
2015
2234
|
json: options.json,
|
|
2016
2235
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
2017
2236
|
});
|
|
@@ -2049,7 +2268,7 @@ Preview the blast radius first:
|
|
|
2049
2268
|
});
|
|
2050
2269
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2051
2270
|
if (payload.already === true) {
|
|
2052
|
-
|
|
2271
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, accepted, {
|
|
2053
2272
|
json: options.json,
|
|
2054
2273
|
text: `Fleet ${fleetId} is already deactivated.
|
|
2055
2274
|
`
|
|
@@ -2061,7 +2280,7 @@ Preview the blast radius first:
|
|
|
2061
2280
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
2062
2281
|
` : "");
|
|
2063
2282
|
if (!options.wait) {
|
|
2064
|
-
|
|
2283
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, accepted, {
|
|
2065
2284
|
json: options.json,
|
|
2066
2285
|
text: acceptedText
|
|
2067
2286
|
});
|
|
@@ -2083,7 +2302,7 @@ Preview the blast radius first:
|
|
|
2083
2302
|
const envelope = { ...accepted, ...final };
|
|
2084
2303
|
const summary = renderFleetGet(final);
|
|
2085
2304
|
if (fleetStatus(final) === "deactivated") {
|
|
2086
|
-
|
|
2305
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
2087
2306
|
return;
|
|
2088
2307
|
}
|
|
2089
2308
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2122,7 +2341,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
2122
2341
|
"Agent notes:",
|
|
2123
2342
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
2124
2343
|
];
|
|
2125
|
-
|
|
2344
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
2126
2345
|
{
|
|
2127
2346
|
schemaVersion: 1,
|
|
2128
2347
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2179,8 +2398,8 @@ function renderMonitorGet(payload) {
|
|
|
2179
2398
|
}
|
|
2180
2399
|
for (const raw of Array.isArray(guidance.documentation) ? guidance.documentation : []) {
|
|
2181
2400
|
const doc = asRecord(raw);
|
|
2182
|
-
const label = asString(_optionalChain([doc, 'optionalAccess',
|
|
2183
|
-
const url = asString(_optionalChain([doc, 'optionalAccess',
|
|
2401
|
+
const label = asString(_optionalChain([doc, 'optionalAccess', _83 => _83.label]));
|
|
2402
|
+
const url = asString(_optionalChain([doc, 'optionalAccess', _84 => _84.url]));
|
|
2184
2403
|
if (label && url) lines.push(` Docs: ${label} \u2014 ${url}`);
|
|
2185
2404
|
}
|
|
2186
2405
|
const payloadExample = asRecord(guidance.payload_example);
|
|
@@ -2197,20 +2416,20 @@ function renderMonitorGet(payload) {
|
|
|
2197
2416
|
);
|
|
2198
2417
|
}
|
|
2199
2418
|
const monitorSpec = asRecord(payload.monitor_spec);
|
|
2200
|
-
if (_optionalChain([monitorSpec, 'optionalAccess',
|
|
2419
|
+
if (_optionalChain([monitorSpec, 'optionalAccess', _85 => _85.available]) === false) {
|
|
2201
2420
|
lines.push(
|
|
2202
2421
|
"",
|
|
2203
2422
|
`Monitor spec: unavailable \u2014 ${_nullishCoalesce(asString(monitorSpec.message), () => ( "use the stored definition and check before an update."))}`
|
|
2204
2423
|
);
|
|
2205
2424
|
}
|
|
2206
|
-
const specFields = Array.isArray(_optionalChain([monitorSpec, 'optionalAccess',
|
|
2425
|
+
const specFields = Array.isArray(_optionalChain([monitorSpec, 'optionalAccess', _86 => _86.fields])) ? monitorSpec.fields.flatMap((value) => {
|
|
2207
2426
|
const field = asRecord(value);
|
|
2208
|
-
const path = asString(_optionalChain([field, 'optionalAccess',
|
|
2209
|
-
const description = asString(_optionalChain([field, 'optionalAccess',
|
|
2210
|
-
const semantics = asString(_optionalChain([field, 'optionalAccess',
|
|
2211
|
-
const applicability = asString(_optionalChain([field, 'optionalAccess',
|
|
2212
|
-
const grammar = asRecord(_optionalChain([field, 'optionalAccess',
|
|
2213
|
-
const grammarSyntax = asString(_optionalChain([grammar, 'optionalAccess',
|
|
2427
|
+
const path = asString(_optionalChain([field, 'optionalAccess', _87 => _87.path]));
|
|
2428
|
+
const description = asString(_optionalChain([field, 'optionalAccess', _88 => _88.description]));
|
|
2429
|
+
const semantics = asString(_optionalChain([field, 'optionalAccess', _89 => _89.semantics]));
|
|
2430
|
+
const applicability = asString(_optionalChain([field, 'optionalAccess', _90 => _90.applicability]));
|
|
2431
|
+
const grammar = asRecord(_optionalChain([field, 'optionalAccess', _91 => _91.grammar]));
|
|
2432
|
+
const grammarSyntax = asString(_optionalChain([grammar, 'optionalAccess', _92 => _92.syntax]));
|
|
2214
2433
|
return path ? [
|
|
2215
2434
|
{
|
|
2216
2435
|
path,
|
|
@@ -2246,10 +2465,10 @@ function renderMonitorGet(payload) {
|
|
|
2246
2465
|
const name = _nullishCoalesce(asString(play.name), () => ( "unnamed Play"));
|
|
2247
2466
|
const listener = asString(play.listener_key);
|
|
2248
2467
|
const health = asRecord(play.consumer_health);
|
|
2249
|
-
const runStatus = asString(_optionalChain([health, 'optionalAccess',
|
|
2250
|
-
const lastDelivery = asFiniteNumber(_optionalChain([health, 'optionalAccess',
|
|
2251
|
-
const runId = asString(_optionalChain([health, 'optionalAccess',
|
|
2252
|
-
const error = asString(_optionalChain([health, 'optionalAccess',
|
|
2468
|
+
const runStatus = asString(_optionalChain([health, 'optionalAccess', _93 => _93.last_run_status]));
|
|
2469
|
+
const lastDelivery = asFiniteNumber(_optionalChain([health, 'optionalAccess', _94 => _94.last_delivery_at]));
|
|
2470
|
+
const runId = asString(_optionalChain([health, 'optionalAccess', _95 => _95.last_run_id]));
|
|
2471
|
+
const error = asString(_optionalChain([health, 'optionalAccess', _96 => _96.last_error]));
|
|
2253
2472
|
lines.push(` ${name}${listener ? ` (listener: ${listener})` : ""}:`);
|
|
2254
2473
|
lines.push(
|
|
2255
2474
|
` Latest delivered event: ${lastDelivery !== void 0 ? new Date(lastDelivery).toISOString() : "never"}`,
|
|
@@ -2276,14 +2495,14 @@ function renderMonitorGet(payload) {
|
|
|
2276
2495
|
);
|
|
2277
2496
|
}
|
|
2278
2497
|
}
|
|
2279
|
-
if (_optionalChain([dependents, 'optionalAccess',
|
|
2498
|
+
if (_optionalChain([dependents, 'optionalAccess', _97 => _97.truncated]) === true) {
|
|
2280
2499
|
lines.push(" Results are truncated.");
|
|
2281
2500
|
}
|
|
2282
2501
|
return `${lines.join("\n")}
|
|
2283
2502
|
`;
|
|
2284
2503
|
}
|
|
2285
2504
|
async function handleMonitorsGet(key, options) {
|
|
2286
|
-
const client = new (0,
|
|
2505
|
+
const client = new (0, _chunkDB54ROPHjs.DeeplineClient)();
|
|
2287
2506
|
const payload = await client.monitors.get(key);
|
|
2288
2507
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2289
2508
|
const dependents = boundPlays ? {
|
|
@@ -2291,24 +2510,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2291
2510
|
truncated: payload.consumer_health_truncated === true
|
|
2292
2511
|
} : await client.monitors.dependents(key);
|
|
2293
2512
|
const detail = { ...payload, dependents };
|
|
2294
|
-
|
|
2513
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, detail, {
|
|
2295
2514
|
json: options.json,
|
|
2296
2515
|
text: renderMonitorGet(detail)
|
|
2297
2516
|
});
|
|
2298
2517
|
}
|
|
2299
2518
|
async function handleMonitorsTest(key, payload, options) {
|
|
2300
2519
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2301
|
-
const result = await new (0,
|
|
2520
|
+
const result = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2302
2521
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2303
2522
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2304
2523
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2305
2524
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2306
2525
|
`;
|
|
2307
|
-
|
|
2526
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2308
2527
|
}
|
|
2309
2528
|
async function handleMonitorsValidate(key, options) {
|
|
2310
|
-
const result = await new (0,
|
|
2311
|
-
|
|
2529
|
+
const result = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.validate(key);
|
|
2530
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2312
2531
|
if (result.valid === false) process.exitCode = 7;
|
|
2313
2532
|
}
|
|
2314
2533
|
async function confirmMonitorDelete(key) {
|
|
@@ -2326,14 +2545,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2326
2545
|
}
|
|
2327
2546
|
}
|
|
2328
2547
|
async function handleMonitorsDelete(key, options) {
|
|
2329
|
-
const client = new (0,
|
|
2548
|
+
const client = new (0, _chunkDB54ROPHjs.DeeplineClient)();
|
|
2330
2549
|
if (options.dryRun) {
|
|
2331
2550
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2332
2551
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2333
2552
|
command: "deepline monitors delete",
|
|
2334
2553
|
mutation: "delete"
|
|
2335
2554
|
});
|
|
2336
|
-
|
|
2555
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload2, {
|
|
2337
2556
|
json: options.json,
|
|
2338
2557
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2339
2558
|
});
|
|
@@ -2353,7 +2572,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2353
2572
|
}
|
|
2354
2573
|
}
|
|
2355
2574
|
const payload = await client.monitors.delete(key);
|
|
2356
|
-
|
|
2575
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2357
2576
|
}
|
|
2358
2577
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2359
2578
|
const body = resolveMonitorJsonBody({
|
|
@@ -2362,29 +2581,29 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2362
2581
|
argLabel: "<patch>",
|
|
2363
2582
|
command: `deepline monitors update ${key}`
|
|
2364
2583
|
});
|
|
2365
|
-
const payload = await new (0,
|
|
2366
|
-
|
|
2584
|
+
const payload = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.update(key, body);
|
|
2585
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2367
2586
|
}
|
|
2368
2587
|
async function handleMonitorsReactivate(key, options) {
|
|
2369
|
-
const client = new (0,
|
|
2588
|
+
const client = new (0, _chunkDB54ROPHjs.DeeplineClient)();
|
|
2370
2589
|
if (options.dryRun) {
|
|
2371
2590
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2372
2591
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2373
2592
|
command: "deepline monitors reactivate",
|
|
2374
2593
|
mutation: "reactivate"
|
|
2375
2594
|
});
|
|
2376
|
-
|
|
2595
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload2, {
|
|
2377
2596
|
json: options.json,
|
|
2378
2597
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2379
2598
|
});
|
|
2380
2599
|
return;
|
|
2381
2600
|
}
|
|
2382
2601
|
const payload = await client.monitors.reactivate(key);
|
|
2383
|
-
|
|
2602
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2384
2603
|
}
|
|
2385
2604
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2386
2605
|
function monitorHealthLine(health) {
|
|
2387
|
-
if (_optionalChain([health, 'access',
|
|
2606
|
+
if (_optionalChain([health, 'access', _98 => _98.refresh, 'optionalAccess', _99 => _99.state]) === "running") {
|
|
2388
2607
|
return `refreshing whole scope \xB7 scanned ${health.scanned} so far`;
|
|
2389
2608
|
}
|
|
2390
2609
|
const alignmentRequired = _nullishCoalesce(health.alignment_required, () => ( 0));
|
|
@@ -2429,7 +2648,7 @@ async function watchMonitorHealth(input) {
|
|
|
2429
2648
|
while (Date.now() < deadlineAt) {
|
|
2430
2649
|
const unresolved = last.observed.unknown + last.observed.unset;
|
|
2431
2650
|
const alignmentRequired = _nullishCoalesce(last.alignment_required, () => ( 0));
|
|
2432
|
-
if (_optionalChain([last, 'access',
|
|
2651
|
+
if (_optionalChain([last, 'access', _100 => _100.refresh, 'optionalAccess', _101 => _101.state]) !== "running" && !last.truncated && last.needs_repair === 0 && (unresolved === 0 || alignmentRequired === unresolved)) {
|
|
2433
2652
|
return last;
|
|
2434
2653
|
}
|
|
2435
2654
|
await new Promise(
|
|
@@ -2441,13 +2660,13 @@ async function watchMonitorHealth(input) {
|
|
|
2441
2660
|
return last;
|
|
2442
2661
|
}
|
|
2443
2662
|
function monitorHealthText(health) {
|
|
2444
|
-
const partial = _optionalChain([health, 'access',
|
|
2663
|
+
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
2664
|
const unauditedMonitors = _nullishCoalesce(health.unaudited_monitors, () => ( []));
|
|
2446
2665
|
const lines = [
|
|
2447
2666
|
`scope: ${_nullishCoalesce(health.scope.fleet_id, () => ( "workspace"))}${partial}`,
|
|
2448
2667
|
monitorHealthLine(health)
|
|
2449
2668
|
];
|
|
2450
|
-
if ((_nullishCoalesce(_optionalChain([health, 'access',
|
|
2669
|
+
if ((_nullishCoalesce(_optionalChain([health, 'access', _104 => _104.batch_operations, 'optionalAccess', _105 => _105.length]), () => ( 0))) > 0) {
|
|
2451
2670
|
lines.push("");
|
|
2452
2671
|
lines.push("batch work in progress:");
|
|
2453
2672
|
for (const operation of _nullishCoalesce(health.batch_operations, () => ( []))) {
|
|
@@ -2502,8 +2721,8 @@ function monitorHealthText(health) {
|
|
|
2502
2721
|
`;
|
|
2503
2722
|
}
|
|
2504
2723
|
async function handleMonitorsAudit(options) {
|
|
2505
|
-
const client = new (0,
|
|
2506
|
-
const fleetId = _optionalChain([options, 'access',
|
|
2724
|
+
const client = new (0, _chunkDB54ROPHjs.DeeplineClient)();
|
|
2725
|
+
const fleetId = _optionalChain([options, 'access', _106 => _106.fleet, 'optionalAccess', _107 => _107.trim, 'call', _108 => _108()]) || void 0;
|
|
2507
2726
|
const scope = fleetId ? { fleetId } : {};
|
|
2508
2727
|
let result = await client.monitors.audit(scope);
|
|
2509
2728
|
const passes = [result.audit];
|
|
@@ -2546,7 +2765,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2546
2765
|
"",
|
|
2547
2766
|
monitorHealthText(health)
|
|
2548
2767
|
].join("\n");
|
|
2549
|
-
|
|
2768
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
2550
2769
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2551
2770
|
{ json: options.json, text }
|
|
2552
2771
|
);
|
|
@@ -2554,15 +2773,15 @@ async function handleMonitorsAudit(options) {
|
|
|
2554
2773
|
async function handleMonitorsRepair(options) {
|
|
2555
2774
|
return await handleMonitorBatch("repair", {
|
|
2556
2775
|
...options,
|
|
2557
|
-
..._optionalChain([options, 'access',
|
|
2776
|
+
..._optionalChain([options, 'access', _109 => _109.fleet, 'optionalAccess', _110 => _110.trim, 'call', _111 => _111()]) ? {} : { target: "needs-repair" }
|
|
2558
2777
|
});
|
|
2559
2778
|
}
|
|
2560
2779
|
async function handleMonitorsHealth(options) {
|
|
2561
|
-
const fleetId = _optionalChain([options, 'access',
|
|
2562
|
-
const health = await new (0,
|
|
2780
|
+
const fleetId = _optionalChain([options, 'access', _112 => _112.fleet, 'optionalAccess', _113 => _113.trim, 'call', _114 => _114()]) || void 0;
|
|
2781
|
+
const health = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.health(
|
|
2563
2782
|
fleetId ? { fleetId } : {}
|
|
2564
2783
|
);
|
|
2565
|
-
|
|
2784
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, health, {
|
|
2566
2785
|
json: options.json,
|
|
2567
2786
|
text: monitorHealthText(health)
|
|
2568
2787
|
});
|
|
@@ -2570,8 +2789,8 @@ async function handleMonitorsHealth(options) {
|
|
|
2570
2789
|
function monitorBatchScope(options, kind) {
|
|
2571
2790
|
const selectors = [
|
|
2572
2791
|
options.target ? "target" : null,
|
|
2573
|
-
_optionalChain([options, 'access',
|
|
2574
|
-
_optionalChain([options, 'access',
|
|
2792
|
+
_optionalChain([options, 'access', _115 => _115.fleet, 'optionalAccess', _116 => _116.trim, 'call', _117 => _117()]) ? "fleet" : null,
|
|
2793
|
+
_optionalChain([options, 'access', _118 => _118.keys, 'optionalAccess', _119 => _119.trim, 'call', _120 => _120()]) ? "keys" : null
|
|
2575
2794
|
].filter((value) => value !== null);
|
|
2576
2795
|
if (selectors.length === 0 && kind === "audit") {
|
|
2577
2796
|
return { kind: "target", target: "all" };
|
|
@@ -2582,7 +2801,7 @@ function monitorBatchScope(options, kind) {
|
|
|
2582
2801
|
);
|
|
2583
2802
|
}
|
|
2584
2803
|
if (options.target) return { kind: "target", target: options.target };
|
|
2585
|
-
if (_optionalChain([options, 'access',
|
|
2804
|
+
if (_optionalChain([options, 'access', _121 => _121.fleet, 'optionalAccess', _122 => _122.trim, 'call', _123 => _123()]))
|
|
2586
2805
|
return { kind: "fleet", fleetId: options.fleet.trim() };
|
|
2587
2806
|
const monitorKeys = (_nullishCoalesce(options.keys, () => ( ""))).split(",").map((key) => key.trim()).filter(Boolean);
|
|
2588
2807
|
if (monitorKeys.length === 0) {
|
|
@@ -2593,7 +2812,7 @@ function monitorBatchScope(options, kind) {
|
|
|
2593
2812
|
return { kind: "keys", monitorKeys };
|
|
2594
2813
|
}
|
|
2595
2814
|
function monitorBatchIdempotencyKey(kind, value) {
|
|
2596
|
-
return _optionalChain([value, 'optionalAccess',
|
|
2815
|
+
return _optionalChain([value, 'optionalAccess', _124 => _124.trim, 'call', _125 => _125()]) || `monitor-batch-${kind}-${_crypto.randomUUID.call(void 0, )}`;
|
|
2597
2816
|
}
|
|
2598
2817
|
function isCanonicalBatchJsonDocument(raw) {
|
|
2599
2818
|
try {
|
|
@@ -2606,7 +2825,7 @@ function isCanonicalBatchJsonDocument(raw) {
|
|
|
2606
2825
|
}
|
|
2607
2826
|
}
|
|
2608
2827
|
async function handleMonitorBatchDeploy(options) {
|
|
2609
|
-
if (!_optionalChain([options, 'access',
|
|
2828
|
+
if (!_optionalChain([options, 'access', _126 => _126.file, 'optionalAccess', _127 => _127.trim, 'call', _128 => _128()])) {
|
|
2610
2829
|
throw new MonitorsUsageError(
|
|
2611
2830
|
"monitors batch deploy requires --file <monitors.ndjson>."
|
|
2612
2831
|
);
|
|
@@ -2636,14 +2855,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2636
2855
|
"deploy",
|
|
2637
2856
|
options.idempotencyKey
|
|
2638
2857
|
);
|
|
2639
|
-
const result = await new (0,
|
|
2858
|
+
const result = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.batch.submit({
|
|
2640
2859
|
kind: "deploy",
|
|
2641
2860
|
manifestNdjson,
|
|
2642
2861
|
dryRun: options.dryRun === true,
|
|
2643
2862
|
idempotencyKey
|
|
2644
2863
|
});
|
|
2645
2864
|
const operation = result.operation;
|
|
2646
|
-
|
|
2865
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
2647
2866
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2648
2867
|
{
|
|
2649
2868
|
json: options.json,
|
|
@@ -2662,7 +2881,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2662
2881
|
);
|
|
2663
2882
|
}
|
|
2664
2883
|
const scope = monitorBatchScope(options, kind);
|
|
2665
|
-
if (kind === "deactivate" && scope.kind === "target" && !_optionalChain([options, 'access',
|
|
2884
|
+
if (kind === "deactivate" && scope.kind === "target" && !_optionalChain([options, 'access', _129 => _129.reason, 'optionalAccess', _130 => _130.trim, 'call', _131 => _131()])) {
|
|
2666
2885
|
throw new MonitorsUsageError(
|
|
2667
2886
|
"monitors batch deactivate --target requires --reason (for example insufficient_balance or billing_failure). Omit --reason with --keys for a customer-requested teardown."
|
|
2668
2887
|
);
|
|
@@ -2671,11 +2890,11 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2671
2890
|
kind,
|
|
2672
2891
|
options.idempotencyKey
|
|
2673
2892
|
);
|
|
2674
|
-
const result = await new (0,
|
|
2893
|
+
const result = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.batch.submit({
|
|
2675
2894
|
kind,
|
|
2676
2895
|
scope,
|
|
2677
2896
|
dryRun: options.dryRun === true,
|
|
2678
|
-
..._optionalChain([options, 'access',
|
|
2897
|
+
..._optionalChain([options, 'access', _132 => _132.reason, 'optionalAccess', _133 => _133.trim, 'call', _134 => _134()]) ? { deactivationReason: options.reason.trim() } : {},
|
|
2679
2898
|
idempotencyKey
|
|
2680
2899
|
});
|
|
2681
2900
|
const operation = result.operation;
|
|
@@ -2684,14 +2903,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2684
2903
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
2685
2904
|
`inspect: deepline monitors batch get ${operation.runId}`
|
|
2686
2905
|
].join("\n");
|
|
2687
|
-
|
|
2906
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0,
|
|
2688
2907
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2689
2908
|
{ json: options.json, text: `${text}
|
|
2690
2909
|
` }
|
|
2691
2910
|
);
|
|
2692
2911
|
}
|
|
2693
2912
|
async function handleMonitorBatchGet(operationId, options) {
|
|
2694
|
-
const result = await new (0,
|
|
2913
|
+
const result = await new (0, _chunkDB54ROPHjs.DeeplineClient)().monitors.batch.get(operationId, {
|
|
2695
2914
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
2696
2915
|
});
|
|
2697
2916
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -2703,7 +2922,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
2703
2922
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
2704
2923
|
] : []
|
|
2705
2924
|
].join("\n");
|
|
2706
|
-
|
|
2925
|
+
_chunk75NAFY36js.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
2707
2926
|
` });
|
|
2708
2927
|
}
|
|
2709
2928
|
function registerMonitorsCommands(program) {
|
|
@@ -3059,6 +3278,9 @@ Notes:
|
|
|
3059
3278
|
window, so the count is partial; a null count means the monitor has not
|
|
3060
3279
|
been counted yet.
|
|
3061
3280
|
|
|
3281
|
+
--fleet lists only the monitors one Monitor Fleet owns; fleet_scope then
|
|
3282
|
+
carries that fleet's status, live of expected, and issue count.
|
|
3283
|
+
|
|
3062
3284
|
Filters apply before paging, so total is the filtered count. Page with
|
|
3063
3285
|
--cursor <next_cursor> until next_cursor is null.
|
|
3064
3286
|
|
|
@@ -3069,6 +3291,7 @@ Examples:
|
|
|
3069
3291
|
deepline monitors ledger --search halcyon --sort installed
|
|
3070
3292
|
deepline monitors ledger --sort findings --window 7d
|
|
3071
3293
|
deepline monitors ledger --play none
|
|
3294
|
+
deepline monitors ledger --fleet account-job-openings
|
|
3072
3295
|
deepline monitors ledger halcyon-openings --json
|
|
3073
3296
|
deepline monitors ledger halcyon-openings --findings --json
|
|
3074
3297
|
`
|
|
@@ -3086,7 +3309,7 @@ Examples:
|
|
|
3086
3309
|
).option(
|
|
3087
3310
|
"--play <play>",
|
|
3088
3311
|
'Only monitors triggering this Play definition id, or "none" for monitors no Play listens to'
|
|
3089
|
-
).option(
|
|
3312
|
+
).option("--fleet <fleet-id>", "Only the monitors this Monitor Fleet owns").option(
|
|
3090
3313
|
"--sort <sort>",
|
|
3091
3314
|
"recent (default; newest finding first), installed, name, or findings (most in --window first)"
|
|
3092
3315
|
).option(
|
|
@@ -3521,6 +3744,77 @@ Examples:
|
|
|
3521
3744
|
"Exit 0 when converged and 6 otherwise, for scripts and agents"
|
|
3522
3745
|
)
|
|
3523
3746
|
).action(monitorsAction(handleMonitorFleetsGet));
|
|
3747
|
+
withJsonOption(
|
|
3748
|
+
fleets.command("overview [fleet-id]").description(
|
|
3749
|
+
"List fleets as the Fleets page does, or read one fleet\u2019s overview."
|
|
3750
|
+
).addHelpText(
|
|
3751
|
+
"after",
|
|
3752
|
+
`
|
|
3753
|
+
Notes:
|
|
3754
|
+
Read-only. Without an id, lists every fleet with its status, live of
|
|
3755
|
+
expected monitors, issue count, and findings in --window, ordered by --sort.
|
|
3756
|
+
Statuses: needs_attention, paused_credits, paused_cap, paused_billing,
|
|
3757
|
+
setting_up, running, deactivated. Every status except deactivated is shown
|
|
3758
|
+
by default; repeat --state to choose. --q, --state, and --sort apply only to
|
|
3759
|
+
the list and are refused with an id.
|
|
3760
|
+
|
|
3761
|
+
With an id, reads that fleet: status, live of expected, the last sync
|
|
3762
|
+
attempt (an attempt, not proof it succeeded), findings, source table and
|
|
3763
|
+
filters, member tool, the Plays its output triggers, and its issues counted
|
|
3764
|
+
by group and cause. Issues count failed and blocked members; waiting
|
|
3765
|
+
members are rate limited and retry on their own. Page the members behind
|
|
3766
|
+
each count with \`deepline monitors fleets issues <fleet-id>\`.
|
|
3767
|
+
|
|
3768
|
+
--json prints the server response as one JSON object.
|
|
3769
|
+
|
|
3770
|
+
Examples:
|
|
3771
|
+
deepline monitors fleets overview
|
|
3772
|
+
deepline monitors fleets overview --state needs_attention --sort findings
|
|
3773
|
+
deepline monitors fleets overview --q accounts --window 7d
|
|
3774
|
+
deepline monitors fleets overview account-job-openings
|
|
3775
|
+
deepline monitors fleets overview account-job-openings --json
|
|
3776
|
+
`
|
|
3777
|
+
).option(
|
|
3778
|
+
"--q <text>",
|
|
3779
|
+
"Search fleet ids, source tables, member tools and signals"
|
|
3780
|
+
).option(
|
|
3781
|
+
"--state <status>",
|
|
3782
|
+
"Include a status (repeatable): needs_attention, paused_credits, paused_cap, paused_billing, setting_up, running, deactivated",
|
|
3783
|
+
(value, previous = []) => [...previous, value]
|
|
3784
|
+
).option(
|
|
3785
|
+
"--sort <sort>",
|
|
3786
|
+
"attention (default; most attention first), findings, newest, or name"
|
|
3787
|
+
).option(
|
|
3788
|
+
"--window <window>",
|
|
3789
|
+
"Findings window: 1d, 7d, 30d (default), 90d, or 1y"
|
|
3790
|
+
)
|
|
3791
|
+
).action(monitorsAction(handleMonitorFleetsOverviewRead));
|
|
3792
|
+
withJsonOption(
|
|
3793
|
+
fleets.command("issues <fleet-id>").description(
|
|
3794
|
+
"Page through a fleet\u2019s members that are not live, with cause and message."
|
|
3795
|
+
).addHelpText(
|
|
3796
|
+
"after",
|
|
3797
|
+
`
|
|
3798
|
+
Notes:
|
|
3799
|
+
Read-only. Each row is one member that is not live: its source row key,
|
|
3800
|
+
monitor key, group (failed, blocked, or waiting), cause, and the provider's
|
|
3801
|
+
own message. The causes are the ones \`fleets overview <fleet-id>\` counts.
|
|
3802
|
+
Page with --cursor <next_cursor> until next_cursor is null.
|
|
3803
|
+
|
|
3804
|
+
After fixing a cause, resync with
|
|
3805
|
+
\`deepline monitors fleets sync <fleet-id> --dry-run\`.
|
|
3806
|
+
|
|
3807
|
+
Examples:
|
|
3808
|
+
deepline monitors fleets issues account-job-openings
|
|
3809
|
+
deepline monitors fleets issues account-job-openings --group failed
|
|
3810
|
+
deepline monitors fleets issues account-job-openings --cause watched_accounts_limit --limit 100
|
|
3811
|
+
deepline monitors fleets issues account-job-openings --cursor <next_cursor> --json
|
|
3812
|
+
`
|
|
3813
|
+
).option("--group <group>", "Only failed, blocked, or waiting members").option(
|
|
3814
|
+
"--cause <cause>",
|
|
3815
|
+
"Only one cause, as the fleet overview names it (for example provider_rejected)"
|
|
3816
|
+
).option("--cursor <cursor>", "Continue from a prior next_cursor").option("--limit <n>", "Rows per page, 1 to 100 (default 25)")
|
|
3817
|
+
).action(monitorsAction(handleMonitorFleetsIssues));
|
|
3524
3818
|
withJsonOption(
|
|
3525
3819
|
fleets.command("deactivate <fleet-id>").alias("stop").description("Deactivate a fleet and the monitors it owns.").addHelpText(
|
|
3526
3820
|
"after",
|
|
@@ -3645,4 +3939,7 @@ Example:
|
|
|
3645
3939
|
|
|
3646
3940
|
|
|
3647
3941
|
|
|
3648
|
-
|
|
3942
|
+
|
|
3943
|
+
|
|
3944
|
+
|
|
3945
|
+
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;
|