deepline 0.3.352 → 0.3.353
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/gtm.ts +1 -1
- package/dist/bundling-sources/sdk/src/index.ts +1 -20
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +2 -14
- package/dist/bundling-sources/shared_libs/integration-contracts/monitor-input-contract.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/tool-categories.ts +19 -0
- package/dist/bundling-sources/shared_libs/plays/tool-category-descriptions.ts +1 -1
- package/dist/cli/{auth-6ZAHOPUC.mjs → auth-FVIZVTCB.mjs} +4 -4
- package/dist/cli/auth-GJZ3S4QH.js +31 -0
- package/dist/cli/{billing-FTCAIIPO.js → billing-NWL7KQPZ.js} +73 -73
- package/dist/cli/{billing-KE6CAAO5.mjs → billing-PYTYGWPG.mjs} +4 -4
- package/dist/cli/{chunk-SM4G43FY.js → chunk-2UWRFDI4.js} +60 -60
- package/dist/cli/{chunk-YIO2PX4J.mjs → chunk-37F4EUJA.mjs} +161 -1848
- package/dist/cli/{chunk-5TQPSUU6.js → chunk-55XOA2VW.js} +8 -8
- package/dist/cli/{chunk-54IUI747.mjs → chunk-BVHUTDCW.mjs} +5 -5
- package/dist/cli/{chunk-J5NA2TTX.js → chunk-C374C22Y.js} +2 -2
- package/dist/cli/{chunk-SGFPTY4H.mjs → chunk-CQQ5N4YO.mjs} +2 -2
- package/dist/cli/{chunk-J5MZZVDK.mjs → chunk-CXMSK2VV.mjs} +2 -2
- package/dist/cli/{chunk-XK7AH232.mjs → chunk-D477W2OQ.mjs} +4 -4
- package/dist/cli/{chunk-HD2RKIVK.mjs → chunk-DY253DRK.mjs} +2 -2
- package/dist/cli/{chunk-27JIZEAJ.js → chunk-EDEO7NG4.js} +1 -1
- package/dist/cli/{chunk-GVESPYSY.mjs → chunk-ERFN2QY4.mjs} +1 -102
- package/dist/cli/{chunk-LVEDPCLJ.js → chunk-GEJDBXXM.js} +1 -102
- package/dist/cli/{chunk-HMN5SUFL.mjs → chunk-GFLHAA2O.mjs} +1 -1
- package/dist/cli/{chunk-2PQR43BD.js → chunk-HU4SUDWU.js} +567 -2254
- package/dist/cli/{chunk-WOHBA5PV.js → chunk-IF75RD6U.js} +1 -1
- package/dist/cli/{chunk-NNMGGD5Z.mjs → chunk-IVGFLYQ6.mjs} +1 -1
- package/dist/cli/{chunk-Q3CSXWFU.js → chunk-JHPVZR6F.js} +4 -4
- package/dist/cli/{chunk-2ULH52Q7.mjs → chunk-LLI4RITH.mjs} +3 -3
- package/dist/cli/{chunk-QOIXZWOE.js → chunk-M4UPRX3M.js} +8 -8
- package/dist/cli/{chunk-TAC3JIFE.mjs → chunk-MI6ZP7XI.mjs} +1 -1
- package/dist/cli/{chunk-P6CGAEDF.js → chunk-NFEQHNDQ.js} +26 -26
- package/dist/cli/{chunk-4W3B4CNE.js → chunk-NPU4SMKT.js} +9 -9
- package/dist/cli/{chunk-OWG4Y7JK.mjs → chunk-NZNUDZDW.mjs} +2 -2
- package/dist/cli/{chunk-V5JPRCQ2.js → chunk-R2T4HQ64.js} +6 -6
- package/dist/cli/{chunk-HUZXWOSK.mjs → chunk-R4RG4FV5.mjs} +1 -1
- package/dist/cli/{chunk-EHYJYOXF.mjs → chunk-RRDCBCRI.mjs} +1 -1
- package/dist/cli/{chunk-3EIK6KTE.mjs → chunk-U3FUXTIB.mjs} +1 -1
- package/dist/cli/{chunk-VQFBIGMU.js → chunk-VALAAQQM.js} +48 -48
- package/dist/cli/{chunk-2JXDY3LE.js → chunk-XI5IMY45.js} +2 -2
- package/dist/cli/{chunk-VLQPMYSU.js → chunk-Z6LVVOOJ.js} +15 -15
- package/dist/cli/{chunk-L6BHFEYM.js → chunk-ZCCXX55K.js} +45 -45
- package/dist/cli/{chunk-ULX7APDZ.mjs → chunk-ZDEO3EGW.mjs} +1 -1
- package/dist/cli/{client-25RBAXIY.mjs → client-IH7I5D7T.mjs} +3 -3
- package/dist/cli/client-Z6BCEGFA.js +20 -0
- package/dist/cli/{csv-7BOK5ZD7.mjs → csv-G5WXNCLQ.mjs} +3 -3
- package/dist/cli/{csv-7XXJZ736.js → csv-TJIWKUCX.js} +12 -12
- package/dist/cli/{db-TFPYJCZ5.js → db-3DCS2JXS.js} +29 -29
- package/dist/cli/{db-7Q7L5SKP.mjs → db-EBHV2MGE.mjs} +4 -4
- package/dist/cli/{describe-TQYXSFZ2.js → describe-5XKBPWD7.js} +16 -16
- package/dist/cli/{describe-JTEJNG67.mjs → describe-QUOLGZKH.mjs} +9 -9
- package/dist/cli/{executions-33MNWCXR.mjs → executions-EERWIJ5I.mjs} +4 -4
- package/dist/cli/{executions-XYCJEW5I.js → executions-NYIOENKH.js} +6 -6
- package/dist/cli/{feedback-LXSEEBNL.mjs → feedback-4RYJJCYL.mjs} +3 -3
- package/dist/cli/{feedback-D3RSQCQE.js → feedback-Z2I5MQYZ.js} +7 -7
- package/dist/cli/{git-IES2ZBYO.mjs → git-EMU7AKX3.mjs} +4 -4
- package/dist/cli/git-QYQ5ZFIG.js +23 -0
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-YIOGLZXX.js → legacy-noops-BEUYYRSU.js} +7 -7
- package/dist/cli/{legacy-noops-ILCWGUAR.mjs → legacy-noops-HHLNM523.mjs} +4 -4
- package/dist/cli/{monitors-R3CZHVU2.mjs → monitors-BVJSHUV4.mjs} +7 -7
- package/dist/cli/{monitors-MQSSH43U.js → monitors-KQXLMPZ4.js} +96 -96
- package/dist/cli/{org-62P7YRHW.js → org-HRYNVOUH.js} +60 -60
- package/dist/cli/{org-Z75A63SM.mjs → org-KSROOKSJ.mjs} +4 -4
- package/dist/cli/play-CRHUA45Q.js +153 -0
- package/dist/cli/{play-FUUFAV34.mjs → play-PGFW6PFE.mjs} +8 -8
- package/dist/cli/{providers-Q2VZF65A.js → providers-BJM725CV.js} +7 -7
- package/dist/cli/{providers-OQNPHTKA.mjs → providers-EUKJK6ZE.mjs} +4 -4
- package/dist/cli/{quickstart-7X6HUVWX.mjs → quickstart-72JYHUJC.mjs} +3 -3
- package/dist/cli/{quickstart-VZ7BYW4Y.js → quickstart-FEERYTYY.js} +5 -5
- package/dist/cli/{search-SJKLKSER.mjs → search-LUAIOM56.mjs} +5 -5
- package/dist/cli/search-X25S2U54.js +26 -0
- package/dist/cli/{secrets-EKH3FPAO.js → secrets-J65QCH57.js} +13 -13
- package/dist/cli/{secrets-JQUKCHON.mjs → secrets-YYFRYS2Z.mjs} +4 -4
- package/dist/cli/{sessions-NDLKL26C.js → sessions-FWUUEK6V.js} +5 -5
- package/dist/cli/{sessions-RSFW7OYD.mjs → sessions-WBA67YYT.mjs} +4 -4
- package/dist/cli/{settings-HPUE5C2G.js → settings-I7AZ4JVI.js} +74 -74
- package/dist/cli/{settings-DR4YKJTJ.mjs → settings-RUMTSUE5.mjs} +7 -7
- package/dist/cli/{setup-4FT6NMU6.mjs → setup-BHRRNT5C.mjs} +6 -6
- package/dist/cli/{setup-Y2HCWQ4D.js → setup-R3IUFNDP.js} +41 -41
- package/dist/cli/{skills-EQR5K67V.mjs → skills-EKD5O7GQ.mjs} +4 -4
- package/dist/cli/skills-OOZ5SDVB.js +28 -0
- package/dist/cli/{tools-ZRCNCMOO.mjs → tools-L5OA2343.mjs} +6 -6
- package/dist/cli/tools-MYH33NTL.js +40 -0
- package/dist/cli/update-EWNPE3NF.js +28 -0
- package/dist/cli/{update-UJNIMTRS.mjs → update-UUHL6FER.mjs} +6 -6
- package/dist/cli/{workflow-4M63OBSC.js → workflow-7NBSG5OT.js} +15 -15
- package/dist/cli/{workflow-EN3TQFKU.mjs → workflow-V24VHOQT.mjs} +5 -5
- package/dist/{client-4DbE-U6e.d.ts → client-Chzd2LFo.d.ts} +1 -25
- package/dist/{client-DIJpwhl-.d.mts → client-jV6bQunU.d.mts} +1 -25
- package/dist/helpers.d.mts +1 -1
- package/dist/helpers.d.ts +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +25 -39
- package/dist/index.mjs +23 -37
- package/dist/install-integrity.json +83 -83
- package/dist/monitor-fleet-contract.js +3 -3
- package/dist/monitor-fleet-contract.mjs +2 -2
- package/dist/monitor-input-contract.js +2 -2
- package/dist/monitor-input-contract.mjs +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- 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/package.json +1 -1
- package/dist/bundling-sources/shared_libs/plays/bootstrap-routes.ts +0 -127
- package/dist/cli/auth-ZYLA55Y2.js +0 -31
- package/dist/cli/client-AY2RSEDD.js +0 -20
- package/dist/cli/git-56MVO4Y5.js +0 -23
- package/dist/cli/play-K4RS3VMC.js +0 -153
- package/dist/cli/search-H3TNOWKP.js +0 -26
- package/dist/cli/skills-OGQZAKOB.js +0 -28
- package/dist/cli/tools-3HM7A7XQ.js +0 -40
- package/dist/cli/update-ZB6CXLCS.js +0 -28
|
@@ -1,27 +1,27 @@
|
|
|
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
|
|
4
|
+
var _chunkNPU4SMKTjs = require('./chunk-NPU4SMKT.js');
|
|
5
5
|
require('./chunk-LA46MMTL.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkC374C22Yjs = require('./chunk-C374C22Y.js');
|
|
10
10
|
require('./chunk-UNEMDKXN.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkIF75RD6Ujs = require('./chunk-IF75RD6U.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkR2T4HQ64js = require('./chunk-R2T4HQ64.js');
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkJHPVZR6Fjs = require('./chunk-JHPVZR6F.js');
|
|
23
23
|
require('./chunk-XNYIZMNQ.js');
|
|
24
|
-
require('./chunk-
|
|
24
|
+
require('./chunk-EDEO7NG4.js');
|
|
25
25
|
require('./chunk-S6R3OX7B.js');
|
|
26
26
|
|
|
27
27
|
|
|
@@ -56,7 +56,7 @@ var MonitorDryRunUnsupportedError = (_class2 = class extends Error {
|
|
|
56
56
|
function monitorsErrorExitCode(error) {
|
|
57
57
|
if (error instanceof MonitorsUsageError) return 2;
|
|
58
58
|
if (error instanceof MonitorFleetStateError) return 6;
|
|
59
|
-
if (error instanceof
|
|
59
|
+
if (error instanceof _chunkJHPVZR6Fjs.AuthError) return 3;
|
|
60
60
|
if (error instanceof _chunk7P5AA3SNjs.DeeplineError) {
|
|
61
61
|
const status = error.statusCode;
|
|
62
62
|
if (status === 401 || status === 403) return 3;
|
|
@@ -103,10 +103,10 @@ function reportMonitorsFailure(error, options) {
|
|
|
103
103
|
const exitCode = monitorsErrorExitCode(error);
|
|
104
104
|
const next = monitorsFailureNextCommand(error, exitCode, options);
|
|
105
105
|
const retrySafe = exitCode === 5 && _optionalChain([options, 'optionalAccess', _9 => _9.retryCommand]) !== void 0;
|
|
106
|
-
const wantsJson =
|
|
106
|
+
const wantsJson = _chunkR2T4HQ64js.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
107
107
|
if (wantsJson) {
|
|
108
|
-
const payload =
|
|
109
|
-
|
|
108
|
+
const payload = _chunkR2T4HQ64js.errorToJsonPayload.call(void 0, error);
|
|
109
|
+
_chunkR2T4HQ64js.printJson.call(void 0, {
|
|
110
110
|
ok: false,
|
|
111
111
|
exitCode,
|
|
112
112
|
...next ? { next } : {},
|
|
@@ -520,14 +520,14 @@ Preview the plan first with:
|
|
|
520
520
|
);
|
|
521
521
|
}
|
|
522
522
|
async function handleMonitorsStatus(options) {
|
|
523
|
-
const payload = await new (0,
|
|
523
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.status();
|
|
524
524
|
const hasAccess = payload.has_access === true;
|
|
525
525
|
const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
|
|
526
526
|
const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
|
|
527
527
|
${reason}` : ""}
|
|
528
528
|
` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
|
|
529
529
|
`;
|
|
530
|
-
|
|
530
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
531
531
|
{ has_access: hasAccess, ...reason ? { reason } : {} },
|
|
532
532
|
{ json: options.json, text }
|
|
533
533
|
);
|
|
@@ -593,14 +593,14 @@ async function handleMonitorsAvailable(toolId, options) {
|
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
595
|
const tool = _nullishCoalesce(toolId, () => ( options.tool));
|
|
596
|
-
const payload = await new (0,
|
|
596
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.available(tool, {
|
|
597
597
|
...options.provider ? { provider: options.provider } : {},
|
|
598
598
|
...options.search ? { search: options.search } : {},
|
|
599
599
|
...options.limit ? { limit: options.limit } : {},
|
|
600
600
|
...options.full ? { full: true } : {},
|
|
601
601
|
...options.compact ? { compact: true } : {}
|
|
602
602
|
});
|
|
603
|
-
|
|
603
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, {
|
|
604
604
|
json: options.json,
|
|
605
605
|
// Human list view shows id + name + deployed_count ("deployed: N") so
|
|
606
606
|
// can-deploy vs already-deployed is visible in one view. Describing a
|
|
@@ -703,14 +703,14 @@ async function handleMonitorsList(options) {
|
|
|
703
703
|
"`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
|
|
704
704
|
);
|
|
705
705
|
}
|
|
706
|
-
const payload = await new (0,
|
|
706
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.list({
|
|
707
707
|
...state ? { state } : {},
|
|
708
708
|
...options.status ? { status: options.status } : {},
|
|
709
709
|
...options.limit ? { limit: options.limit } : {},
|
|
710
710
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
711
711
|
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
712
712
|
});
|
|
713
|
-
|
|
713
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, {
|
|
714
714
|
json: options.json,
|
|
715
715
|
text: renderDeployedListText(
|
|
716
716
|
payload,
|
|
@@ -726,10 +726,10 @@ async function handleMonitorsCheck(definition, options) {
|
|
|
726
726
|
argLabel: "<definition>",
|
|
727
727
|
command: "deepline monitors check"
|
|
728
728
|
});
|
|
729
|
-
const payload = await new (0,
|
|
729
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.check(
|
|
730
730
|
body
|
|
731
731
|
);
|
|
732
|
-
|
|
732
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
733
733
|
}
|
|
734
734
|
async function handleMonitorsDeploy(definition, options) {
|
|
735
735
|
const body = resolveMonitorJsonBody({
|
|
@@ -738,7 +738,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
738
738
|
argLabel: "<definition>",
|
|
739
739
|
command: "deepline monitors deploy"
|
|
740
740
|
});
|
|
741
|
-
const client = new (0,
|
|
741
|
+
const client = new (0, _chunkNPU4SMKTjs.DeeplineClient)();
|
|
742
742
|
const definitionArg = body;
|
|
743
743
|
if (options.dryRun) {
|
|
744
744
|
const payload2 = await client.monitors.deploy(definitionArg, {
|
|
@@ -746,7 +746,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
746
746
|
});
|
|
747
747
|
const valid = payload2.valid !== false;
|
|
748
748
|
const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _21 => _21(payload2), 'optionalAccess', _22 => _22.identity_conflict]));
|
|
749
|
-
|
|
749
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
750
750
|
{ dry_run: true, ...payload2 },
|
|
751
751
|
{ json: options.json, text: renderMonitorDeployPlan(payload2) }
|
|
752
752
|
);
|
|
@@ -756,7 +756,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
756
756
|
return;
|
|
757
757
|
}
|
|
758
758
|
const payload = await client.monitors.deploy(definitionArg);
|
|
759
|
-
|
|
759
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, {
|
|
760
760
|
json: options.json,
|
|
761
761
|
text: renderMonitorDeployCompletion(payload)
|
|
762
762
|
});
|
|
@@ -768,29 +768,29 @@ async function handleMonitorsSync(definition, options) {
|
|
|
768
768
|
argLabel: "<definition>",
|
|
769
769
|
command: "deepline monitors sync"
|
|
770
770
|
});
|
|
771
|
-
const payload = await new (0,
|
|
771
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.sync(body, {
|
|
772
772
|
...options.dryRun ? { dryRun: true } : {},
|
|
773
773
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
|
|
774
774
|
});
|
|
775
775
|
if (options.dryRun) {
|
|
776
776
|
const plan = payload;
|
|
777
|
-
|
|
777
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
778
778
|
{ dry_run: true, ...plan },
|
|
779
779
|
{ json: options.json, text: renderMonitorDeployPlan(plan) }
|
|
780
780
|
);
|
|
781
781
|
return;
|
|
782
782
|
}
|
|
783
|
-
|
|
783
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, {
|
|
784
784
|
json: options.json,
|
|
785
785
|
text: renderMonitorJob(payload)
|
|
786
786
|
});
|
|
787
787
|
}
|
|
788
788
|
async function handleScalarMonitorLifecycle(action, key, options) {
|
|
789
|
-
const payload = await new (0,
|
|
789
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors[action](key, {
|
|
790
790
|
...options.dryRun ? { dryRun: true } : {},
|
|
791
791
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
|
|
792
792
|
});
|
|
793
|
-
|
|
793
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, {
|
|
794
794
|
json: options.json,
|
|
795
795
|
text: options.dryRun ? void 0 : renderMonitorJob(payload)
|
|
796
796
|
});
|
|
@@ -871,7 +871,7 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
871
871
|
"A Batch file is required. Pass --file batch.json (or --file - for stdin)."
|
|
872
872
|
);
|
|
873
873
|
}
|
|
874
|
-
const lint =
|
|
874
|
+
const lint = _chunkIF75RD6Ujs.lintMonitorBatchInput.call(void 0,
|
|
875
875
|
readMonitorDefinitionsJsonFile(options.file)
|
|
876
876
|
);
|
|
877
877
|
if (!lint.normalized) {
|
|
@@ -879,11 +879,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
879
879
|
lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
|
|
880
880
|
);
|
|
881
881
|
}
|
|
882
|
-
const payload = await new (0,
|
|
882
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.batch.deploy(
|
|
883
883
|
lint.normalized.monitors,
|
|
884
884
|
{ idempotencyKey }
|
|
885
885
|
);
|
|
886
|
-
|
|
886
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
887
887
|
{
|
|
888
888
|
...payload,
|
|
889
889
|
idempotency_key: idempotencyKey,
|
|
@@ -901,7 +901,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
901
901
|
"monitors batches sync requires --file <batch.json>."
|
|
902
902
|
);
|
|
903
903
|
}
|
|
904
|
-
const lint =
|
|
904
|
+
const lint = _chunkIF75RD6Ujs.lintMonitorBatchInput.call(void 0,
|
|
905
905
|
readMonitorDefinitionsJsonFile(options.file)
|
|
906
906
|
);
|
|
907
907
|
if (!lint.normalized) {
|
|
@@ -916,7 +916,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
916
916
|
);
|
|
917
917
|
}
|
|
918
918
|
if (options.dryRun) {
|
|
919
|
-
|
|
919
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
920
920
|
{
|
|
921
921
|
ok: true,
|
|
922
922
|
dry_run: true,
|
|
@@ -933,7 +933,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
933
933
|
"sync",
|
|
934
934
|
options.idempotencyKey
|
|
935
935
|
);
|
|
936
|
-
const payload = await new (0,
|
|
936
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.batches.sync(
|
|
937
937
|
batchId,
|
|
938
938
|
lint.normalized.monitors,
|
|
939
939
|
{
|
|
@@ -941,14 +941,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
941
941
|
...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
|
|
942
942
|
}
|
|
943
943
|
);
|
|
944
|
-
|
|
944
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
945
945
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
946
946
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
947
947
|
);
|
|
948
948
|
}
|
|
949
949
|
async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
950
950
|
if (options.dryRun) {
|
|
951
|
-
|
|
951
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
952
952
|
{
|
|
953
953
|
ok: true,
|
|
954
954
|
dry_run: true,
|
|
@@ -964,17 +964,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
|
964
964
|
intent,
|
|
965
965
|
options.idempotencyKey
|
|
966
966
|
);
|
|
967
|
-
const payload = await new (0,
|
|
967
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
968
968
|
idempotencyKey
|
|
969
969
|
});
|
|
970
|
-
|
|
970
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
971
971
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
972
972
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
973
973
|
);
|
|
974
974
|
}
|
|
975
975
|
async function handleNamedMonitorBatchGet(batchId, options) {
|
|
976
|
-
const payload = await new (0,
|
|
977
|
-
|
|
976
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.batches.get(batchId);
|
|
977
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, {
|
|
978
978
|
json: options.json,
|
|
979
979
|
text: renderMonitorJob(payload)
|
|
980
980
|
});
|
|
@@ -985,10 +985,10 @@ async function handleMonitorBatchLint(options) {
|
|
|
985
985
|
"monitors batch lint requires --file <batch.json>."
|
|
986
986
|
);
|
|
987
987
|
}
|
|
988
|
-
const result =
|
|
988
|
+
const result = _chunkIF75RD6Ujs.lintMonitorBatchInput.call(void 0,
|
|
989
989
|
readMonitorDefinitionsJsonFile(options.file)
|
|
990
990
|
);
|
|
991
|
-
|
|
991
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
992
992
|
{
|
|
993
993
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
994
994
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1005,10 +1005,10 @@ async function handleMonitorFleetLint(options) {
|
|
|
1005
1005
|
"monitors fleets lint requires --file <fleet.json>."
|
|
1006
1006
|
);
|
|
1007
1007
|
}
|
|
1008
|
-
const result =
|
|
1008
|
+
const result = _chunkC374C22Yjs.lintMonitorFleetInput.call(void 0,
|
|
1009
1009
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1010
1010
|
);
|
|
1011
|
-
|
|
1011
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
1012
1012
|
{
|
|
1013
1013
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1014
1014
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1020,32 +1020,32 @@ async function handleMonitorFleetLint(options) {
|
|
|
1020
1020
|
process.exitCode = 2;
|
|
1021
1021
|
}
|
|
1022
1022
|
async function handleMonitorJobGet(jobId, options) {
|
|
1023
|
-
const payload = await new (0,
|
|
1024
|
-
|
|
1023
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1024
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, {
|
|
1025
1025
|
json: options.json,
|
|
1026
1026
|
text: renderMonitorJob(payload)
|
|
1027
1027
|
});
|
|
1028
1028
|
}
|
|
1029
1029
|
async function handleMonitorJobWait(jobId, options) {
|
|
1030
|
-
const payload = await new (0,
|
|
1030
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1031
1031
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1032
1032
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1033
1033
|
});
|
|
1034
|
-
|
|
1034
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, {
|
|
1035
1035
|
json: options.json,
|
|
1036
1036
|
text: renderMonitorJob(payload)
|
|
1037
1037
|
});
|
|
1038
1038
|
}
|
|
1039
1039
|
async function handleMonitorJobLogs(jobId, options) {
|
|
1040
1040
|
const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
|
|
1041
|
-
const payload = await new (0,
|
|
1041
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1042
1042
|
...limit === void 0 ? {} : { limit }
|
|
1043
1043
|
});
|
|
1044
|
-
|
|
1044
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
1045
1045
|
}
|
|
1046
1046
|
async function handleMonitorJobCancel(jobId, options) {
|
|
1047
|
-
const payload = await new (0,
|
|
1048
|
-
|
|
1047
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1048
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, {
|
|
1049
1049
|
json: options.json,
|
|
1050
1050
|
text: renderMonitorJob(payload)
|
|
1051
1051
|
});
|
|
@@ -1343,7 +1343,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
|
|
|
1343
1343
|
`;
|
|
1344
1344
|
}
|
|
1345
1345
|
function reportFleetState(payload, error, options) {
|
|
1346
|
-
|
|
1346
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
1347
1347
|
{
|
|
1348
1348
|
...payload,
|
|
1349
1349
|
code: error.code,
|
|
@@ -1458,7 +1458,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
|
|
|
1458
1458
|
_fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
|
|
1459
1459
|
`, "utf8");
|
|
1460
1460
|
const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run --json`;
|
|
1461
|
-
|
|
1461
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
1462
1462
|
{ schemaVersion: 2, file, definition, next },
|
|
1463
1463
|
{
|
|
1464
1464
|
json: options.json,
|
|
@@ -1469,7 +1469,7 @@ Next: ${next}
|
|
|
1469
1469
|
);
|
|
1470
1470
|
}
|
|
1471
1471
|
function requireCompiledFleetDefinition(definition) {
|
|
1472
|
-
const result =
|
|
1472
|
+
const result = _chunkC374C22Yjs.lintMonitorFleetInput.call(void 0, definition);
|
|
1473
1473
|
if (result.normalized) return result.normalized;
|
|
1474
1474
|
const messages = result.issues.map((issue) => `${issue.path || "definition"}: ${issue.message}`).join("; ");
|
|
1475
1475
|
throw new MonitorsUsageError(
|
|
@@ -1520,7 +1520,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1520
1520
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1521
1521
|
);
|
|
1522
1522
|
}
|
|
1523
|
-
const client = new (0,
|
|
1523
|
+
const client = new (0, _chunkNPU4SMKTjs.DeeplineClient)();
|
|
1524
1524
|
const payload = await client.monitors.fleets.sync(
|
|
1525
1525
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1526
1526
|
{
|
|
@@ -1542,7 +1542,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1542
1542
|
}
|
|
1543
1543
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1544
1544
|
if (!options.wait || options.dryRun) {
|
|
1545
|
-
|
|
1545
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, accepted, {
|
|
1546
1546
|
json: options.json,
|
|
1547
1547
|
text: renderFleetSync(payload, {
|
|
1548
1548
|
fleetId,
|
|
@@ -1568,7 +1568,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1568
1568
|
const status = fleetStatus(final);
|
|
1569
1569
|
const summary = renderFleetGet(final);
|
|
1570
1570
|
if (status === "converged") {
|
|
1571
|
-
|
|
1571
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1572
1572
|
return;
|
|
1573
1573
|
}
|
|
1574
1574
|
const driftCommand = `deepline monitors fleets get ${fleetShellArg(fleetId)} --drift --json`;
|
|
@@ -1601,14 +1601,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1601
1601
|
);
|
|
1602
1602
|
}
|
|
1603
1603
|
const limit = options.limit === void 0 ? void 0 : fleetIntegerOption(options.limit, "--limit");
|
|
1604
|
-
const client = new (0,
|
|
1604
|
+
const client = new (0, _chunkNPU4SMKTjs.DeeplineClient)();
|
|
1605
1605
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1606
1606
|
...options.drift ? { drift: true } : {},
|
|
1607
1607
|
...limit !== void 0 ? { limit } : {}
|
|
1608
1608
|
});
|
|
1609
1609
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1610
1610
|
if (!options.check) {
|
|
1611
|
-
|
|
1611
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1612
1612
|
return;
|
|
1613
1613
|
}
|
|
1614
1614
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -1616,7 +1616,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1616
1616
|
);
|
|
1617
1617
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
1618
1618
|
if (unconverged.length === 0) {
|
|
1619
|
-
|
|
1619
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1620
1620
|
return;
|
|
1621
1621
|
}
|
|
1622
1622
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -1655,13 +1655,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
1655
1655
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
1656
1656
|
);
|
|
1657
1657
|
}
|
|
1658
|
-
const client = new (0,
|
|
1658
|
+
const client = new (0, _chunkNPU4SMKTjs.DeeplineClient)();
|
|
1659
1659
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
1660
1660
|
idempotencyKey
|
|
1661
1661
|
});
|
|
1662
1662
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1663
1663
|
if (!options.wait) {
|
|
1664
|
-
|
|
1664
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, accepted, {
|
|
1665
1665
|
json: options.json,
|
|
1666
1666
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
1667
1667
|
idempotency key ${idempotencyKey}
|
|
@@ -1684,7 +1684,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
1684
1684
|
const envelope = { ...accepted, ...final };
|
|
1685
1685
|
const text = renderFleetGet(final);
|
|
1686
1686
|
if (fleetStatus(final) === "converged") {
|
|
1687
|
-
|
|
1687
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
1688
1688
|
return;
|
|
1689
1689
|
}
|
|
1690
1690
|
reportFleetState(
|
|
@@ -1726,7 +1726,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
1726
1726
|
}
|
|
1727
1727
|
}
|
|
1728
1728
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
1729
|
-
const client = new (0,
|
|
1729
|
+
const client = new (0, _chunkNPU4SMKTjs.DeeplineClient)();
|
|
1730
1730
|
if (options.dryRun) {
|
|
1731
1731
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
1732
1732
|
dryRun: true,
|
|
@@ -1736,7 +1736,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
1736
1736
|
command: "deepline monitors fleets deactivate",
|
|
1737
1737
|
mutation: "fleet deactivate"
|
|
1738
1738
|
});
|
|
1739
|
-
|
|
1739
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, plan, {
|
|
1740
1740
|
json: options.json,
|
|
1741
1741
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
1742
1742
|
});
|
|
@@ -1774,7 +1774,7 @@ Preview the blast radius first:
|
|
|
1774
1774
|
});
|
|
1775
1775
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1776
1776
|
if (payload.already === true) {
|
|
1777
|
-
|
|
1777
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, accepted, {
|
|
1778
1778
|
json: options.json,
|
|
1779
1779
|
text: `Fleet ${fleetId} is already deactivated.
|
|
1780
1780
|
`
|
|
@@ -1786,7 +1786,7 @@ Preview the blast radius first:
|
|
|
1786
1786
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
1787
1787
|
` : "");
|
|
1788
1788
|
if (!options.wait) {
|
|
1789
|
-
|
|
1789
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, accepted, {
|
|
1790
1790
|
json: options.json,
|
|
1791
1791
|
text: acceptedText
|
|
1792
1792
|
});
|
|
@@ -1808,7 +1808,7 @@ Preview the blast radius first:
|
|
|
1808
1808
|
const envelope = { ...accepted, ...final };
|
|
1809
1809
|
const summary = renderFleetGet(final);
|
|
1810
1810
|
if (fleetStatus(final) === "deactivated") {
|
|
1811
|
-
|
|
1811
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1812
1812
|
return;
|
|
1813
1813
|
}
|
|
1814
1814
|
reportFleetState(
|
|
@@ -1839,7 +1839,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
1839
1839
|
"Agent notes:",
|
|
1840
1840
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
1841
1841
|
];
|
|
1842
|
-
|
|
1842
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
1843
1843
|
{
|
|
1844
1844
|
schemaVersion: 1,
|
|
1845
1845
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2000,7 +2000,7 @@ function renderMonitorGet(payload) {
|
|
|
2000
2000
|
`;
|
|
2001
2001
|
}
|
|
2002
2002
|
async function handleMonitorsGet(key, options) {
|
|
2003
|
-
const client = new (0,
|
|
2003
|
+
const client = new (0, _chunkNPU4SMKTjs.DeeplineClient)();
|
|
2004
2004
|
const payload = await client.monitors.get(key);
|
|
2005
2005
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2006
2006
|
const dependents = boundPlays ? {
|
|
@@ -2008,24 +2008,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2008
2008
|
truncated: payload.consumer_health_truncated === true
|
|
2009
2009
|
} : await client.monitors.dependents(key);
|
|
2010
2010
|
const detail = { ...payload, dependents };
|
|
2011
|
-
|
|
2011
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, detail, {
|
|
2012
2012
|
json: options.json,
|
|
2013
2013
|
text: renderMonitorGet(detail)
|
|
2014
2014
|
});
|
|
2015
2015
|
}
|
|
2016
2016
|
async function handleMonitorsTest(key, payload, options) {
|
|
2017
2017
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2018
|
-
const result = await new (0,
|
|
2018
|
+
const result = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2019
2019
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2020
2020
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2021
2021
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2022
2022
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2023
2023
|
`;
|
|
2024
|
-
|
|
2024
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2025
2025
|
}
|
|
2026
2026
|
async function handleMonitorsValidate(key, options) {
|
|
2027
|
-
const result = await new (0,
|
|
2028
|
-
|
|
2027
|
+
const result = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.validate(key);
|
|
2028
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2029
2029
|
if (result.valid === false) process.exitCode = 7;
|
|
2030
2030
|
}
|
|
2031
2031
|
async function confirmMonitorDelete(key) {
|
|
@@ -2043,14 +2043,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2043
2043
|
}
|
|
2044
2044
|
}
|
|
2045
2045
|
async function handleMonitorsDelete(key, options) {
|
|
2046
|
-
const client = new (0,
|
|
2046
|
+
const client = new (0, _chunkNPU4SMKTjs.DeeplineClient)();
|
|
2047
2047
|
if (options.dryRun) {
|
|
2048
2048
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2049
2049
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2050
2050
|
command: "deepline monitors delete",
|
|
2051
2051
|
mutation: "delete"
|
|
2052
2052
|
});
|
|
2053
|
-
|
|
2053
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload2, {
|
|
2054
2054
|
json: options.json,
|
|
2055
2055
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2056
2056
|
});
|
|
@@ -2070,7 +2070,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2070
2070
|
}
|
|
2071
2071
|
}
|
|
2072
2072
|
const payload = await client.monitors.delete(key);
|
|
2073
|
-
|
|
2073
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2074
2074
|
}
|
|
2075
2075
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2076
2076
|
const body = resolveMonitorJsonBody({
|
|
@@ -2079,25 +2079,25 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2079
2079
|
argLabel: "<patch>",
|
|
2080
2080
|
command: `deepline monitors update ${key}`
|
|
2081
2081
|
});
|
|
2082
|
-
const payload = await new (0,
|
|
2083
|
-
|
|
2082
|
+
const payload = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.update(key, body);
|
|
2083
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2084
2084
|
}
|
|
2085
2085
|
async function handleMonitorsReactivate(key, options) {
|
|
2086
|
-
const client = new (0,
|
|
2086
|
+
const client = new (0, _chunkNPU4SMKTjs.DeeplineClient)();
|
|
2087
2087
|
if (options.dryRun) {
|
|
2088
2088
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2089
2089
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2090
2090
|
command: "deepline monitors reactivate",
|
|
2091
2091
|
mutation: "reactivate"
|
|
2092
2092
|
});
|
|
2093
|
-
|
|
2093
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload2, {
|
|
2094
2094
|
json: options.json,
|
|
2095
2095
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2096
2096
|
});
|
|
2097
2097
|
return;
|
|
2098
2098
|
}
|
|
2099
2099
|
const payload = await client.monitors.reactivate(key);
|
|
2100
|
-
|
|
2100
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2101
2101
|
}
|
|
2102
2102
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2103
2103
|
function monitorHealthLine(health) {
|
|
@@ -2219,7 +2219,7 @@ function monitorHealthText(health) {
|
|
|
2219
2219
|
`;
|
|
2220
2220
|
}
|
|
2221
2221
|
async function handleMonitorsAudit(options) {
|
|
2222
|
-
const client = new (0,
|
|
2222
|
+
const client = new (0, _chunkNPU4SMKTjs.DeeplineClient)();
|
|
2223
2223
|
const fleetId = _optionalChain([options, 'access', _73 => _73.fleet, 'optionalAccess', _74 => _74.trim, 'call', _75 => _75()]) || void 0;
|
|
2224
2224
|
const scope = fleetId ? { fleetId } : {};
|
|
2225
2225
|
let result = await client.monitors.audit(scope);
|
|
@@ -2263,7 +2263,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2263
2263
|
"",
|
|
2264
2264
|
monitorHealthText(health)
|
|
2265
2265
|
].join("\n");
|
|
2266
|
-
|
|
2266
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
2267
2267
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2268
2268
|
{ json: options.json, text }
|
|
2269
2269
|
);
|
|
@@ -2276,10 +2276,10 @@ async function handleMonitorsRepair(options) {
|
|
|
2276
2276
|
}
|
|
2277
2277
|
async function handleMonitorsHealth(options) {
|
|
2278
2278
|
const fleetId = _optionalChain([options, 'access', _79 => _79.fleet, 'optionalAccess', _80 => _80.trim, 'call', _81 => _81()]) || void 0;
|
|
2279
|
-
const health = await new (0,
|
|
2279
|
+
const health = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.health(
|
|
2280
2280
|
fleetId ? { fleetId } : {}
|
|
2281
2281
|
);
|
|
2282
|
-
|
|
2282
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, health, {
|
|
2283
2283
|
json: options.json,
|
|
2284
2284
|
text: monitorHealthText(health)
|
|
2285
2285
|
});
|
|
@@ -2353,14 +2353,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2353
2353
|
"deploy",
|
|
2354
2354
|
options.idempotencyKey
|
|
2355
2355
|
);
|
|
2356
|
-
const result = await new (0,
|
|
2356
|
+
const result = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.batch.submit({
|
|
2357
2357
|
kind: "deploy",
|
|
2358
2358
|
manifestNdjson,
|
|
2359
2359
|
dryRun: options.dryRun === true,
|
|
2360
2360
|
idempotencyKey
|
|
2361
2361
|
});
|
|
2362
2362
|
const operation = result.operation;
|
|
2363
|
-
|
|
2363
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
2364
2364
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2365
2365
|
{
|
|
2366
2366
|
json: options.json,
|
|
@@ -2388,7 +2388,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2388
2388
|
kind,
|
|
2389
2389
|
options.idempotencyKey
|
|
2390
2390
|
);
|
|
2391
|
-
const result = await new (0,
|
|
2391
|
+
const result = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.batch.submit({
|
|
2392
2392
|
kind,
|
|
2393
2393
|
scope,
|
|
2394
2394
|
dryRun: options.dryRun === true,
|
|
@@ -2401,14 +2401,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2401
2401
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
2402
2402
|
`inspect: deepline monitors batch get ${operation.runId} --json`
|
|
2403
2403
|
].join("\n");
|
|
2404
|
-
|
|
2404
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0,
|
|
2405
2405
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2406
2406
|
{ json: options.json, text: `${text}
|
|
2407
2407
|
` }
|
|
2408
2408
|
);
|
|
2409
2409
|
}
|
|
2410
2410
|
async function handleMonitorBatchGet(operationId, options) {
|
|
2411
|
-
const result = await new (0,
|
|
2411
|
+
const result = await new (0, _chunkNPU4SMKTjs.DeeplineClient)().monitors.batch.get(operationId, {
|
|
2412
2412
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
2413
2413
|
});
|
|
2414
2414
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -2420,7 +2420,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
2420
2420
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
2421
2421
|
] : []
|
|
2422
2422
|
].join("\n");
|
|
2423
|
-
|
|
2423
|
+
_chunkR2T4HQ64js.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
2424
2424
|
` });
|
|
2425
2425
|
}
|
|
2426
2426
|
function registerMonitorsCommands(program) {
|
|
@@ -2430,7 +2430,7 @@ function registerMonitorsCommands(program) {
|
|
|
2430
2430
|
Notes:
|
|
2431
2431
|
Deepline monitors are Deepline-native signal feeds: a monitor writes events
|
|
2432
2432
|
into a Customer DB table; a play reacts to each new row via a
|
|
2433
|
-
sqlListeners trigger
|
|
2433
|
+
sqlListeners trigger declared in the Play.
|
|
2434
2434
|
Monitor JSON declares only what to watch (key, tool, optional name, payload).
|
|
2435
2435
|
Play bindings belong in the Play; monitor deployment never changes them.
|
|
2436
2436
|
The Monitors rollout controls access to the live provider catalog; use
|
|
@@ -3019,9 +3019,9 @@ ${MONITOR_FLEET_HELP_EPILOG}`
|
|
|
3019
3019
|
fleets.command("init <fleet-id>").description("Write an opinionated Fleet definition JSON file.").addHelpText(
|
|
3020
3020
|
"after",
|
|
3021
3021
|
`
|
|
3022
|
-
Creates a ready-to-review JSON definition. Fleets always sync ${
|
|
3023
|
-
a missing member for ${
|
|
3024
|
-
policies are not authored in the file. ${
|
|
3022
|
+
Creates a ready-to-review JSON definition. Fleets always sync ${_chunkC374C22Yjs.MONITOR_FLEET_DOCUMENTATION.fixedPolicy.cadence} and retain
|
|
3023
|
+
a missing member for ${_chunkC374C22Yjs.MONITOR_FLEET_DOCUMENTATION.fixedPolicy.removalGrace} before it is ${_chunkC374C22Yjs.MONITOR_FLEET_DOCUMENTATION.fixedPolicy.onRemoved}d; those
|
|
3024
|
+
policies are not authored in the file. ${_chunkC374C22Yjs.MONITOR_FLEET_DOCUMENTATION.stickyMembership} The payload remains the actual monitor payload for the chosen tool, so use
|
|
3025
3025
|
\`deepline tools list --categories monitors\` to discover a tool first.
|
|
3026
3026
|
|
|
3027
3027
|
Example:
|