deepline 0.3.560 → 0.3.562
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/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +16 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox-egress.ts +57 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +24 -2
- package/dist/cli/auth-FM3JO6FN.js +44 -0
- package/dist/cli/{auth-5DIOQ3MO.mjs → auth-OFHWBJ2W.mjs} +5 -5
- package/dist/cli/{billing-N5NS5CU6.js → billing-BORJ3ZHJ.js} +99 -99
- package/dist/cli/{billing-K7EJAM55.mjs → billing-PPOC7TAY.mjs} +8 -8
- package/dist/cli/{chunk-4CQ7LVRT.js → chunk-3BV2OD25.js} +48 -48
- package/dist/cli/{chunk-SCM6BR4Q.mjs → chunk-3OJLUVOS.mjs} +1 -1
- package/dist/cli/{chunk-5VC6K4NJ.js → chunk-4O47WP3B.js} +26 -26
- package/dist/cli/{chunk-ZXB2Y3SG.js → chunk-5COJEZSB.js} +4 -4
- package/dist/cli/{chunk-4PBYS3PS.mjs → chunk-5KMZR36E.mjs} +1 -1
- package/dist/cli/{chunk-V7ZOAXZ4.js → chunk-5NGS4RLF.js} +23 -23
- package/dist/cli/{chunk-GKONGPVW.mjs → chunk-5VXK34DQ.mjs} +5 -5
- package/dist/cli/{chunk-JQDVX3D4.mjs → chunk-5XS5BTMC.mjs} +4 -4
- package/dist/cli/{chunk-BQ2Z6PSE.mjs → chunk-5YQVEV7I.mjs} +5 -5
- package/dist/cli/{chunk-Q77PM7U2.js → chunk-6BGEW3KU.js} +20 -20
- package/dist/cli/{chunk-A62A73U6.mjs → chunk-7DRCIDPW.mjs} +3 -3
- package/dist/cli/{chunk-I7CQJ7JP.js → chunk-7HFWEQ6Y.js} +2 -2
- package/dist/cli/{chunk-OPT36HX4.js → chunk-7IHSJ3RD.js} +53 -53
- package/dist/cli/{chunk-V7OFUYMO.mjs → chunk-AAIYXQRJ.mjs} +2 -2
- package/dist/cli/{chunk-JYT6P2M2.js → chunk-AASSDBQ3.js} +2 -2
- package/dist/cli/{chunk-CQS5E6D2.js → chunk-CIEMDAJE.js} +100 -100
- package/dist/cli/{chunk-NNKZ4JYP.mjs → chunk-EHUUHKWY.mjs} +5 -5
- package/dist/cli/{chunk-7ZE6DF6B.js → chunk-EVZDU7CF.js} +3 -3
- package/dist/cli/{chunk-DOAD7ZCA.mjs → chunk-GAMCJW6E.mjs} +1 -1
- package/dist/cli/{chunk-LMY7CGI7.js → chunk-GAN6UYEN.js} +5 -5
- package/dist/cli/{chunk-UTPANENL.js → chunk-GH5R65SB.js} +12 -12
- package/dist/cli/{chunk-GTRGJITW.mjs → chunk-GWJ4EOW2.mjs} +11 -11
- package/dist/cli/{chunk-Y5CZWGO4.js → chunk-IQJQB7J6.js} +1 -1
- package/dist/cli/{chunk-E76MM3SC.js → chunk-J5P7VGV5.js} +20 -20
- package/dist/cli/{chunk-4MAY2TA3.mjs → chunk-J7XEUV5W.mjs} +2 -2
- package/dist/cli/{chunk-GR5WG72L.mjs → chunk-KJDS2X5S.mjs} +2 -2
- package/dist/cli/{chunk-AMUMEL4C.mjs → chunk-L4KUAJFR.mjs} +1 -1
- package/dist/cli/{chunk-4GRIMNDO.js → chunk-LJXFCEP2.js} +41 -41
- package/dist/cli/{chunk-JHS7WKRS.mjs → chunk-LK4LR4K7.mjs} +3 -3
- package/dist/cli/{chunk-F5CZ3Q2I.mjs → chunk-LXL7OZOG.mjs} +1 -1
- package/dist/cli/{chunk-24GZT76F.js → chunk-P6XJRHLF.js} +7 -7
- package/dist/cli/{chunk-YDWFE7MX.js → chunk-PDHLHEUL.js} +2 -2
- package/dist/cli/{chunk-UI7BBF2O.mjs → chunk-QC3NTBF7.mjs} +5 -5
- package/dist/cli/{chunk-KP4B3JOT.js → chunk-QWB4VW4T.js} +13 -13
- package/dist/cli/{chunk-TE2NSUT5.js → chunk-R5PPP3JU.js} +5 -5
- package/dist/cli/{chunk-5QMEJPN5.js → chunk-RFB52LP5.js} +8 -8
- package/dist/cli/{chunk-G33LSF4T.mjs → chunk-RKB536LB.mjs} +2 -2
- package/dist/cli/{chunk-BW4NVW5T.js → chunk-RYWWBTDB.js} +3 -3
- package/dist/cli/{chunk-OS3FDGKX.mjs → chunk-SQFWIUNP.mjs} +4 -4
- package/dist/cli/{chunk-A4X2O75M.mjs → chunk-UC2ATYB3.mjs} +2 -2
- package/dist/cli/{chunk-ZSDZ3Q5P.mjs → chunk-USA6QRDO.mjs} +1 -1
- package/dist/cli/{chunk-MBLPUJ5I.js → chunk-UVZQR7I6.js} +5 -5
- package/dist/cli/{chunk-ZJJUVUP6.mjs → chunk-UZ4ELBHM.mjs} +2 -2
- package/dist/cli/{chunk-WOZKGI6H.mjs → chunk-WDKU7NOR.mjs} +1 -1
- package/dist/cli/{chunk-XLM7L4UY.mjs → chunk-WFVL6A7I.mjs} +1 -1
- package/dist/cli/{chunk-CQJMFUMK.mjs → chunk-XHZFA67G.mjs} +1 -1
- package/dist/cli/{chunk-RQKCNQ5Q.mjs → chunk-YAXYFPBF.mjs} +2 -2
- package/dist/cli/{chunk-ZY64JRBV.js → chunk-YB6N6WKX.js} +10 -10
- package/dist/cli/{chunk-FW2WRBZO.js → chunk-YT4WIYFT.js} +9 -9
- package/dist/cli/{chunk-MCGR7NG3.js → chunk-YX47WHVT.js} +6 -6
- package/dist/cli/{chunk-Z4FWF237.js → chunk-Z2FC6UQQ.js} +15 -15
- package/dist/cli/{chunk-5XMABMQU.mjs → chunk-ZQLEEOZR.mjs} +2 -2
- package/dist/cli/{concurrent-runs-help-TCB2EKTR.mjs → concurrent-runs-help-IRM4PNIE.mjs} +6 -6
- package/dist/cli/concurrent-runs-help-RGKC4GDM.js +22 -0
- package/dist/cli/{csv-R45YJYUO.mjs → csv-6T4CONXY.mjs} +4 -4
- package/dist/cli/{csv-DWC44DLD.js → csv-UEFHJV5P.js} +13 -13
- package/dist/cli/{db-XZXNKW7B.mjs → db-P6SN3JUE.mjs} +6 -6
- package/dist/cli/{db-XIN3KF47.js → db-PNDYQRRC.js} +27 -27
- package/dist/cli/describe-DDP4Q7SK.js +50 -0
- package/dist/cli/{describe-6KSAHJBD.mjs → describe-U2ZIQ4JH.mjs} +18 -18
- package/dist/cli/{executions-C3UZLR7Y.js → executions-7AOZES2Z.js} +8 -8
- package/dist/cli/{executions-RSPQRWYL.mjs → executions-WELIUVIV.mjs} +6 -6
- package/dist/cli/{feedback-7RCSKLW4.mjs → feedback-66WWUWIR.mjs} +6 -6
- package/dist/cli/{feedback-A7WP67XL.js → feedback-XTTK5GLD.js} +14 -14
- package/dist/cli/git-53OSBVPB.js +26 -0
- package/dist/cli/{git-JE6TFEK4.mjs → git-S23WMQAB.mjs} +5 -5
- package/dist/cli/index.js +143 -143
- package/dist/cli/index.mjs +45 -45
- package/dist/cli/{integrations-DEU3ZW5P.mjs → integrations-DEHG2ILN.mjs} +7 -7
- package/dist/cli/{integrations-L2D3EY3H.js → integrations-MPKN5JRT.js} +20 -20
- package/dist/cli/{legacy-noops-TL5PBCVQ.mjs → legacy-noops-7TU2COQH.mjs} +6 -6
- package/dist/cli/{legacy-noops-AHTEO6EF.js → legacy-noops-IKVIOTDJ.js} +9 -9
- package/dist/cli/{mcp-KXR7YJEG.js → mcp-5ZFZKBX2.js} +24 -24
- package/dist/cli/{mcp-PVRF5CGK.mjs → mcp-BGUKF2AA.mjs} +4 -4
- package/dist/cli/{monitors-BMGSROH3.mjs → monitors-2QZUTM7K.mjs} +7 -7
- package/dist/cli/{monitors-YHF6RQGU.js → monitors-EUSWYOUL.js} +100 -100
- package/dist/cli/{org-OO6LQPS6.mjs → org-FDA5EGQC.mjs} +6 -6
- package/dist/cli/{org-IQJO6DJ7.js → org-W4S2QIOX.js} +121 -121
- package/dist/cli/{outcomes-6QO6NEKO.mjs → outcomes-KZ7SM5TM.mjs} +6 -6
- package/dist/cli/{outcomes-NAEAOCNT.js → outcomes-WF34PZAX.js} +14 -14
- package/dist/cli/{play-MZQSOYVV.mjs → play-XHHJYBBZ.mjs} +19 -19
- package/dist/cli/{play-TYIBTW4E.js → play-XYJBKWRX.js} +324 -324
- package/dist/cli/{providers-JDSSPMWH.js → providers-SCT2LUCO.js} +9 -9
- package/dist/cli/{providers-JR4OWXRX.mjs → providers-WHPZMDA6.mjs} +6 -6
- package/dist/cli/{quickstart-T363ASLH.js → quickstart-IXLB34QZ.js} +6 -6
- package/dist/cli/{quickstart-JBX6BKGZ.mjs → quickstart-L45XFREM.mjs} +4 -4
- package/dist/cli/{run-J3KWBIXA.js → run-EZCUNFI7.js} +44 -44
- package/dist/cli/{run-6PWTGRJI.mjs → run-SAWTV6NP.mjs} +23 -23
- package/dist/cli/{search-XQG7UXAE.mjs → search-GW2P4KNN.mjs} +7 -7
- package/dist/cli/search-S5KQIDCG.js +32 -0
- package/dist/cli/{search-output-DNONJFPF.mjs → search-output-ASU6D6XX.mjs} +4 -4
- package/dist/cli/{search-output-YZYLNDU6.js → search-output-WRDJJFBW.js} +6 -6
- package/dist/cli/{secrets-SCKPXIT7.js → secrets-AAV7JKPF.js} +15 -15
- package/dist/cli/{secrets-MR7VXG74.mjs → secrets-N5EAETGP.mjs} +6 -6
- package/dist/cli/sessions-H33DKDTF.js +23 -0
- package/dist/cli/{sessions-MPIJTGWQ.mjs → sessions-WYISBB4D.mjs} +6 -6
- package/dist/cli/{settings-YPKR5JFF.js → settings-WOIN3AIB.js} +85 -85
- package/dist/cli/{settings-Y5NW74ER.mjs → settings-X7BTX2N3.mjs} +12 -12
- package/dist/cli/{setup-5RJCLRZI.mjs → setup-APLGF5BY.mjs} +9 -9
- package/dist/cli/{setup-673Q3LGR.js → setup-J3RS6UKU.js} +49 -49
- package/dist/cli/skills-7PT2KDQN.js +37 -0
- package/dist/cli/{skills-2QVBD4LD.mjs → skills-UGPVOIYQ.mjs} +7 -7
- package/dist/cli/{tools-627KG34F.mjs → tools-6WNR75VQ.mjs} +17 -17
- package/dist/cli/tools-Q2PVYNUE.js +57 -0
- package/dist/cli/update-C64JFIMU.js +37 -0
- package/dist/cli/{update-535TTARD.mjs → update-XG2EJRAG.mjs} +9 -9
- package/dist/cli/{views-FQNWZUWB.js → views-FSB6OV5N.js} +21 -21
- package/dist/cli/{views-3M24ZTXA.mjs → views-LUNVYDBY.mjs} +6 -6
- package/dist/cli/{workflow-H6F7WAOE.js → workflow-RWTUI4GA.js} +17 -17
- package/dist/cli/{workflow-CN46XZPG.mjs → workflow-TEJ7J2EQ.mjs} +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +112 -112
- 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.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-R2S7KYAA.js +0 -44
- package/dist/cli/concurrent-runs-help-TKAZVMA4.js +0 -22
- package/dist/cli/describe-WLRAQDYC.js +0 -50
- package/dist/cli/git-E6XV5MEY.js +0 -26
- package/dist/cli/search-DPVHT5MJ.js +0 -32
- package/dist/cli/sessions-VNWLXJR2.js +0 -23
- package/dist/cli/skills-YGFFPGCR.js +0 -37
- package/dist/cli/tools-2BC7K3ZU.js +0 -57
- package/dist/cli/update-HWEOSPDS.js +0 -37
|
@@ -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 _chunkGAN6UYENjs = require('./chunk-GAN6UYEN.js');
|
|
5
|
+
require('./chunk-RFB52LP5.js');
|
|
6
6
|
require('./chunk-4WAM6TLD.js');
|
|
7
7
|
require('./chunk-MJTVX4QK.js');
|
|
8
8
|
require('./chunk-PMH4GLMD.js');
|
|
@@ -17,15 +17,15 @@ require('./chunk-UNEMDKXN.js');
|
|
|
17
17
|
var _chunkU2LVWCTDjs = require('./chunk-U2LVWCTD.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkRYWWBTDBjs = require('./chunk-RYWWBTDB.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
require('./chunk-
|
|
28
|
-
require('./chunk-
|
|
26
|
+
var _chunkJ5P7VGV5js = require('./chunk-J5P7VGV5.js');
|
|
27
|
+
require('./chunk-EVZDU7CF.js');
|
|
28
|
+
require('./chunk-5COJEZSB.js');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
var _chunk6VLFQZK6js = require('./chunk-6VLFQZK6.js');
|
|
@@ -34,7 +34,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
34
34
|
|
|
35
35
|
var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.js');
|
|
36
36
|
require('./chunk-CFJFUVX2.js');
|
|
37
|
-
require('./chunk-
|
|
37
|
+
require('./chunk-IQJQB7J6.js');
|
|
38
38
|
require('./chunk-OG64RBAC.js');
|
|
39
39
|
require('./chunk-COGTRVWW.js');
|
|
40
40
|
|
|
@@ -112,10 +112,10 @@ function reportMonitorsFailure(error, options) {
|
|
|
112
112
|
const exitCode = monitorsErrorExitCode(error);
|
|
113
113
|
const next = monitorsFailureNextCommand(error, exitCode, options);
|
|
114
114
|
const retrySafe = exitCode === 5 && _optionalChain([options, 'optionalAccess', _9 => _9.retryCommand]) !== void 0;
|
|
115
|
-
const wantsJson =
|
|
115
|
+
const wantsJson = _chunkJ5P7VGV5js.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
116
116
|
if (wantsJson) {
|
|
117
|
-
const payload =
|
|
118
|
-
|
|
117
|
+
const payload = _chunkJ5P7VGV5js.errorToJsonPayload.call(void 0, error);
|
|
118
|
+
_chunkJ5P7VGV5js.printJson.call(void 0, {
|
|
119
119
|
ok: false,
|
|
120
120
|
exitCode,
|
|
121
121
|
...next ? { next } : {},
|
|
@@ -537,14 +537,14 @@ Preview the plan first with:
|
|
|
537
537
|
);
|
|
538
538
|
}
|
|
539
539
|
async function handleMonitorsStatus(options) {
|
|
540
|
-
const payload = await new (0,
|
|
540
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.status();
|
|
541
541
|
const hasAccess = payload.has_access === true;
|
|
542
542
|
const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
|
|
543
543
|
const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
|
|
544
544
|
${reason}` : ""}
|
|
545
545
|
` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
|
|
546
546
|
`;
|
|
547
|
-
|
|
547
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
548
548
|
{ has_access: hasAccess, ...reason ? { reason } : {} },
|
|
549
549
|
{ json: options.json, text }
|
|
550
550
|
);
|
|
@@ -615,14 +615,14 @@ async function handleMonitorsAvailable(toolId, options, command) {
|
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
const tool = _nullishCoalesce(toolId, () => ( options.tool));
|
|
618
|
-
const payload = await new (0,
|
|
618
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.available(tool, {
|
|
619
619
|
...options.provider ? { provider: options.provider } : {},
|
|
620
620
|
...options.search ? { search: options.search } : {},
|
|
621
621
|
...options.limit ? { limit: options.limit } : {},
|
|
622
622
|
...options.full ? { full: true } : {},
|
|
623
623
|
...options.compact ? { compact: true } : {}
|
|
624
624
|
});
|
|
625
|
-
|
|
625
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, {
|
|
626
626
|
json: options.json,
|
|
627
627
|
// Human list view shows id + name + deployed_count ("deployed: N") so
|
|
628
628
|
// can-deploy vs already-deployed is visible in one view. Describing a
|
|
@@ -729,14 +729,14 @@ async function handleMonitorsList(options) {
|
|
|
729
729
|
"`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
|
|
730
730
|
);
|
|
731
731
|
}
|
|
732
|
-
const payload = await new (0,
|
|
732
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.list({
|
|
733
733
|
...state ? { state } : {},
|
|
734
734
|
...options.status ? { status: options.status } : {},
|
|
735
735
|
...options.limit ? { limit: options.limit } : {},
|
|
736
736
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
737
737
|
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
738
738
|
});
|
|
739
|
-
|
|
739
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, {
|
|
740
740
|
json: options.json,
|
|
741
741
|
text: renderDeployedListText(
|
|
742
742
|
payload,
|
|
@@ -837,7 +837,7 @@ function renderMonitorLedgerText(payload) {
|
|
|
837
837
|
var LEDGER_SORTS = ["recent", "installed", "name", "findings"];
|
|
838
838
|
var LEDGER_WINDOWS = ["1d", "7d", "30d", "90d", "1y"];
|
|
839
839
|
async function handleMonitorsLedger(key, options) {
|
|
840
|
-
const client = new (0,
|
|
840
|
+
const client = new (0, _chunkGAN6UYENjs.DeeplineClient)();
|
|
841
841
|
if (options.findings) {
|
|
842
842
|
if (!key) {
|
|
843
843
|
throw new MonitorsUsageError(
|
|
@@ -847,12 +847,12 @@ async function handleMonitorsLedger(key, options) {
|
|
|
847
847
|
const payload2 = await client.monitors.ledgerFindings(key, {
|
|
848
848
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
849
849
|
});
|
|
850
|
-
|
|
850
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
851
851
|
return;
|
|
852
852
|
}
|
|
853
853
|
if (key) {
|
|
854
854
|
const payload2 = await client.monitors.ledgerGet(key);
|
|
855
|
-
|
|
855
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
856
856
|
return;
|
|
857
857
|
}
|
|
858
858
|
if (options.sort !== void 0 && !LEDGER_SORTS.includes(options.sort)) {
|
|
@@ -876,7 +876,7 @@ async function handleMonitorsLedger(key, options) {
|
|
|
876
876
|
...options.limit ? { limit: options.limit } : {},
|
|
877
877
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
878
878
|
});
|
|
879
|
-
|
|
879
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, {
|
|
880
880
|
json: options.json,
|
|
881
881
|
text: renderMonitorLedgerText(payload)
|
|
882
882
|
});
|
|
@@ -888,10 +888,10 @@ async function handleMonitorsCheck(definition, options) {
|
|
|
888
888
|
argLabel: "<definition>",
|
|
889
889
|
command: "deepline monitors check"
|
|
890
890
|
});
|
|
891
|
-
const payload = await new (0,
|
|
891
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.check(
|
|
892
892
|
body
|
|
893
893
|
);
|
|
894
|
-
|
|
894
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
895
895
|
}
|
|
896
896
|
function previewText(value) {
|
|
897
897
|
return typeof value === "string" && value.trim() ? value.trim() : "-";
|
|
@@ -949,22 +949,22 @@ async function handleMonitorsPreview(definition, options) {
|
|
|
949
949
|
if (limit !== void 0 && !Number.isInteger(limit)) {
|
|
950
950
|
throw new MonitorsUsageError("--limit must be a whole number from 1 to 3.");
|
|
951
951
|
}
|
|
952
|
-
const wantsJson =
|
|
952
|
+
const wantsJson = _chunkJ5P7VGV5js.shouldEmitJson.call(void 0, options.json);
|
|
953
953
|
if (options.idempotencyKey === void 0 && wantsJson) {
|
|
954
954
|
throw new MonitorsUsageError(
|
|
955
955
|
"--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."
|
|
956
956
|
);
|
|
957
957
|
}
|
|
958
958
|
const idempotencyKey = _nullishCoalesce(options.idempotencyKey, () => ( `monitor-preview-${_crypto.randomUUID.call(void 0, )}`));
|
|
959
|
-
const progress =
|
|
959
|
+
const progress = _chunkRYWWBTDBjs.createCliProgress.call(void 0, !wantsJson);
|
|
960
960
|
progress.phase(`Preview key: ${idempotencyKey}`);
|
|
961
961
|
try {
|
|
962
|
-
const payload = await new (0,
|
|
962
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.preview(
|
|
963
963
|
body,
|
|
964
964
|
{ idempotencyKey, ...limit === void 0 ? {} : { limit } }
|
|
965
965
|
);
|
|
966
966
|
progress.complete();
|
|
967
|
-
|
|
967
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, {
|
|
968
968
|
json: options.json,
|
|
969
969
|
text: renderMonitorPreviewText(payload)
|
|
970
970
|
});
|
|
@@ -1009,7 +1009,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
1009
1009
|
argLabel: "<definition>",
|
|
1010
1010
|
command: "deepline monitors deploy"
|
|
1011
1011
|
});
|
|
1012
|
-
const client = new (0,
|
|
1012
|
+
const client = new (0, _chunkGAN6UYENjs.DeeplineClient)();
|
|
1013
1013
|
const definitionArg = body;
|
|
1014
1014
|
if (options.dryRun) {
|
|
1015
1015
|
const payload2 = await client.monitors.deploy(definitionArg, {
|
|
@@ -1017,7 +1017,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
1017
1017
|
});
|
|
1018
1018
|
const valid = payload2.valid !== false;
|
|
1019
1019
|
const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _42 => _42(payload2), 'optionalAccess', _43 => _43.identity_conflict]));
|
|
1020
|
-
|
|
1020
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
1021
1021
|
{ dry_run: true, ...payload2 },
|
|
1022
1022
|
{ json: options.json, text: renderMonitorDeployPlan(payload2) }
|
|
1023
1023
|
);
|
|
@@ -1027,7 +1027,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
1027
1027
|
return;
|
|
1028
1028
|
}
|
|
1029
1029
|
const payload = await client.monitors.deploy(definitionArg);
|
|
1030
|
-
|
|
1030
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, {
|
|
1031
1031
|
json: options.json,
|
|
1032
1032
|
text: renderMonitorDeployCompletion(payload)
|
|
1033
1033
|
});
|
|
@@ -1039,29 +1039,29 @@ async function handleMonitorsSync(definition, options) {
|
|
|
1039
1039
|
argLabel: "<definition>",
|
|
1040
1040
|
command: "deepline monitors sync"
|
|
1041
1041
|
});
|
|
1042
|
-
const payload = await new (0,
|
|
1042
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.sync(body, {
|
|
1043
1043
|
...options.dryRun ? { dryRun: true } : {},
|
|
1044
1044
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
|
|
1045
1045
|
});
|
|
1046
1046
|
if (options.dryRun) {
|
|
1047
1047
|
const plan = payload;
|
|
1048
|
-
|
|
1048
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
1049
1049
|
{ dry_run: true, ...plan },
|
|
1050
1050
|
{ json: options.json, text: renderMonitorDeployPlan(plan) }
|
|
1051
1051
|
);
|
|
1052
1052
|
return;
|
|
1053
1053
|
}
|
|
1054
|
-
|
|
1054
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, {
|
|
1055
1055
|
json: options.json,
|
|
1056
1056
|
text: renderMonitorJob(payload)
|
|
1057
1057
|
});
|
|
1058
1058
|
}
|
|
1059
1059
|
async function handleScalarMonitorLifecycle(action, key, options) {
|
|
1060
|
-
const payload = await new (0,
|
|
1060
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors[action](key, {
|
|
1061
1061
|
...options.dryRun ? { dryRun: true } : {},
|
|
1062
1062
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
|
|
1063
1063
|
});
|
|
1064
|
-
|
|
1064
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, {
|
|
1065
1065
|
json: options.json,
|
|
1066
1066
|
text: options.dryRun ? void 0 : renderMonitorJob(payload)
|
|
1067
1067
|
});
|
|
@@ -1150,11 +1150,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
1150
1150
|
lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
|
|
1151
1151
|
);
|
|
1152
1152
|
}
|
|
1153
|
-
const payload = await new (0,
|
|
1153
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.batch.deploy(
|
|
1154
1154
|
lint.normalized.monitors,
|
|
1155
1155
|
{ idempotencyKey }
|
|
1156
1156
|
);
|
|
1157
|
-
|
|
1157
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
1158
1158
|
{
|
|
1159
1159
|
...payload,
|
|
1160
1160
|
idempotency_key: idempotencyKey,
|
|
@@ -1187,7 +1187,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1187
1187
|
);
|
|
1188
1188
|
}
|
|
1189
1189
|
if (options.dryRun) {
|
|
1190
|
-
|
|
1190
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
1191
1191
|
{
|
|
1192
1192
|
ok: true,
|
|
1193
1193
|
dry_run: true,
|
|
@@ -1204,7 +1204,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1204
1204
|
"sync",
|
|
1205
1205
|
options.idempotencyKey
|
|
1206
1206
|
);
|
|
1207
|
-
const payload = await new (0,
|
|
1207
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.batches.sync(
|
|
1208
1208
|
batchId,
|
|
1209
1209
|
lint.normalized.monitors,
|
|
1210
1210
|
{
|
|
@@ -1212,14 +1212,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1212
1212
|
...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
|
|
1213
1213
|
}
|
|
1214
1214
|
);
|
|
1215
|
-
|
|
1215
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
1216
1216
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1217
1217
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1218
1218
|
);
|
|
1219
1219
|
}
|
|
1220
1220
|
async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
1221
1221
|
if (options.dryRun) {
|
|
1222
|
-
|
|
1222
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
1223
1223
|
{
|
|
1224
1224
|
ok: true,
|
|
1225
1225
|
dry_run: true,
|
|
@@ -1235,17 +1235,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
|
1235
1235
|
intent,
|
|
1236
1236
|
options.idempotencyKey
|
|
1237
1237
|
);
|
|
1238
|
-
const payload = await new (0,
|
|
1238
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
1239
1239
|
idempotencyKey
|
|
1240
1240
|
});
|
|
1241
|
-
|
|
1241
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
1242
1242
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1243
1243
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1244
1244
|
);
|
|
1245
1245
|
}
|
|
1246
1246
|
async function handleNamedMonitorBatchGet(batchId, options) {
|
|
1247
|
-
const payload = await new (0,
|
|
1248
|
-
|
|
1247
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.batches.get(batchId);
|
|
1248
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, {
|
|
1249
1249
|
json: options.json,
|
|
1250
1250
|
text: renderMonitorJob(payload)
|
|
1251
1251
|
});
|
|
@@ -1259,7 +1259,7 @@ async function handleMonitorBatchLint(options) {
|
|
|
1259
1259
|
const result = _chunkU2LVWCTDjs.lintMonitorBatchInput.call(void 0,
|
|
1260
1260
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1261
1261
|
);
|
|
1262
|
-
|
|
1262
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
1263
1263
|
{
|
|
1264
1264
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1265
1265
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1279,7 +1279,7 @@ async function handleMonitorFleetLint(options) {
|
|
|
1279
1279
|
const result = _chunkWOQO3GV4js.lintMonitorFleetInput.call(void 0,
|
|
1280
1280
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1281
1281
|
);
|
|
1282
|
-
|
|
1282
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
1283
1283
|
{
|
|
1284
1284
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1285
1285
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1291,32 +1291,32 @@ async function handleMonitorFleetLint(options) {
|
|
|
1291
1291
|
process.exitCode = 2;
|
|
1292
1292
|
}
|
|
1293
1293
|
async function handleMonitorJobGet(jobId, options) {
|
|
1294
|
-
const payload = await new (0,
|
|
1295
|
-
|
|
1294
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1295
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, {
|
|
1296
1296
|
json: options.json,
|
|
1297
1297
|
text: renderMonitorJob(payload)
|
|
1298
1298
|
});
|
|
1299
1299
|
}
|
|
1300
1300
|
async function handleMonitorJobWait(jobId, options) {
|
|
1301
|
-
const payload = await new (0,
|
|
1301
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1302
1302
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1303
1303
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1304
1304
|
});
|
|
1305
|
-
|
|
1305
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, {
|
|
1306
1306
|
json: options.json,
|
|
1307
1307
|
text: renderMonitorJob(payload)
|
|
1308
1308
|
});
|
|
1309
1309
|
}
|
|
1310
1310
|
async function handleMonitorJobLogs(jobId, options) {
|
|
1311
1311
|
const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
|
|
1312
|
-
const payload = await new (0,
|
|
1312
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1313
1313
|
...limit === void 0 ? {} : { limit }
|
|
1314
1314
|
});
|
|
1315
|
-
|
|
1315
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
1316
1316
|
}
|
|
1317
1317
|
async function handleMonitorJobCancel(jobId, options) {
|
|
1318
|
-
const payload = await new (0,
|
|
1319
|
-
|
|
1318
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1319
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, {
|
|
1320
1320
|
json: options.json,
|
|
1321
1321
|
text: renderMonitorJob(payload)
|
|
1322
1322
|
});
|
|
@@ -1659,7 +1659,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
|
|
|
1659
1659
|
`;
|
|
1660
1660
|
}
|
|
1661
1661
|
function reportFleetState(payload, error, options) {
|
|
1662
|
-
|
|
1662
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
1663
1663
|
{
|
|
1664
1664
|
...payload,
|
|
1665
1665
|
code: error.code,
|
|
@@ -1793,7 +1793,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
|
|
|
1793
1793
|
_fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
|
|
1794
1794
|
`, "utf8");
|
|
1795
1795
|
const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
|
|
1796
|
-
|
|
1796
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
1797
1797
|
{ schemaVersion: 2, file, definition, next },
|
|
1798
1798
|
{
|
|
1799
1799
|
json: options.json,
|
|
@@ -1859,7 +1859,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1859
1859
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1860
1860
|
);
|
|
1861
1861
|
}
|
|
1862
|
-
const client = new (0,
|
|
1862
|
+
const client = new (0, _chunkGAN6UYENjs.DeeplineClient)();
|
|
1863
1863
|
const payload = await client.monitors.fleets.sync(
|
|
1864
1864
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1865
1865
|
{
|
|
@@ -1897,7 +1897,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1897
1897
|
}
|
|
1898
1898
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1899
1899
|
if (!options.wait || options.dryRun) {
|
|
1900
|
-
|
|
1900
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, accepted, {
|
|
1901
1901
|
json: options.json,
|
|
1902
1902
|
text: renderFleetSync(payload, {
|
|
1903
1903
|
fleetId,
|
|
@@ -1923,7 +1923,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1923
1923
|
const status = fleetStatus(final);
|
|
1924
1924
|
const summary = renderFleetGet(final);
|
|
1925
1925
|
if (status === "converged") {
|
|
1926
|
-
|
|
1926
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1927
1927
|
return;
|
|
1928
1928
|
}
|
|
1929
1929
|
if (status === "billing_suspended") {
|
|
@@ -1985,14 +1985,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1985
1985
|
`
|
|
1986
1986
|
);
|
|
1987
1987
|
}
|
|
1988
|
-
const client = new (0,
|
|
1988
|
+
const client = new (0, _chunkGAN6UYENjs.DeeplineClient)();
|
|
1989
1989
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1990
1990
|
...options.drift ? { drift: true } : {},
|
|
1991
1991
|
...limit !== void 0 ? { limit } : {}
|
|
1992
1992
|
});
|
|
1993
1993
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1994
1994
|
if (!options.check) {
|
|
1995
|
-
|
|
1995
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1996
1996
|
return;
|
|
1997
1997
|
}
|
|
1998
1998
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -2000,7 +2000,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
2000
2000
|
);
|
|
2001
2001
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
2002
2002
|
if (unconverged.length === 0) {
|
|
2003
|
-
|
|
2003
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
2004
2004
|
return;
|
|
2005
2005
|
}
|
|
2006
2006
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -2165,7 +2165,7 @@ function renderFleetIssuePage(payload) {
|
|
|
2165
2165
|
}
|
|
2166
2166
|
async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
2167
2167
|
const window = fleetChoice(options.window, LEDGER_WINDOWS, "--window");
|
|
2168
|
-
const client = new (0,
|
|
2168
|
+
const client = new (0, _chunkGAN6UYENjs.DeeplineClient)();
|
|
2169
2169
|
if (fleetId) {
|
|
2170
2170
|
const listOnly = [
|
|
2171
2171
|
options.q !== void 0 ? "--q" : "",
|
|
@@ -2180,7 +2180,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2180
2180
|
const payload2 = await client.monitors.fleets.overview(fleetId, {
|
|
2181
2181
|
...window ? { window } : {}
|
|
2182
2182
|
});
|
|
2183
|
-
|
|
2183
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload2, {
|
|
2184
2184
|
json: options.json,
|
|
2185
2185
|
text: renderFleetOverviewDetail(payload2, window)
|
|
2186
2186
|
});
|
|
@@ -2196,7 +2196,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2196
2196
|
...sort ? { sort } : {},
|
|
2197
2197
|
...window ? { window } : {}
|
|
2198
2198
|
});
|
|
2199
|
-
|
|
2199
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, {
|
|
2200
2200
|
json: options.json,
|
|
2201
2201
|
text: renderFleetOverviewList(payload)
|
|
2202
2202
|
});
|
|
@@ -2207,13 +2207,13 @@ async function handleMonitorFleetsIssues(fleetId, options) {
|
|
|
2207
2207
|
if (limit !== void 0 && (limit < 1 || limit > 100)) {
|
|
2208
2208
|
throw new MonitorsUsageError("--limit must be an integer from 1 to 100.");
|
|
2209
2209
|
}
|
|
2210
|
-
const payload = await new (0,
|
|
2210
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.fleets.issues(fleetId, {
|
|
2211
2211
|
...group ? { group } : {},
|
|
2212
2212
|
...options.cause ? { cause: options.cause } : {},
|
|
2213
2213
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
2214
2214
|
...limit !== void 0 ? { limit } : {}
|
|
2215
2215
|
});
|
|
2216
|
-
|
|
2216
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, {
|
|
2217
2217
|
json: options.json,
|
|
2218
2218
|
text: renderFleetIssuePage(payload)
|
|
2219
2219
|
});
|
|
@@ -2242,13 +2242,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2242
2242
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
2243
2243
|
);
|
|
2244
2244
|
}
|
|
2245
|
-
const client = new (0,
|
|
2245
|
+
const client = new (0, _chunkGAN6UYENjs.DeeplineClient)();
|
|
2246
2246
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
2247
2247
|
idempotencyKey
|
|
2248
2248
|
});
|
|
2249
2249
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2250
2250
|
if (!options.wait) {
|
|
2251
|
-
|
|
2251
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, accepted, {
|
|
2252
2252
|
json: options.json,
|
|
2253
2253
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
2254
2254
|
idempotency key ${idempotencyKey}
|
|
@@ -2271,7 +2271,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2271
2271
|
const envelope = { ...accepted, ...final };
|
|
2272
2272
|
const text = renderFleetGet(final);
|
|
2273
2273
|
if (fleetStatus(final) === "converged") {
|
|
2274
|
-
|
|
2274
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
2275
2275
|
return;
|
|
2276
2276
|
}
|
|
2277
2277
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2320,7 +2320,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
2320
2320
|
}
|
|
2321
2321
|
}
|
|
2322
2322
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
2323
|
-
const client = new (0,
|
|
2323
|
+
const client = new (0, _chunkGAN6UYENjs.DeeplineClient)();
|
|
2324
2324
|
if (options.dryRun) {
|
|
2325
2325
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
2326
2326
|
dryRun: true,
|
|
@@ -2330,7 +2330,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
2330
2330
|
command: "deepline monitors fleets deactivate",
|
|
2331
2331
|
mutation: "fleet deactivate"
|
|
2332
2332
|
});
|
|
2333
|
-
|
|
2333
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, plan, {
|
|
2334
2334
|
json: options.json,
|
|
2335
2335
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
2336
2336
|
});
|
|
@@ -2368,7 +2368,7 @@ Preview the blast radius first:
|
|
|
2368
2368
|
});
|
|
2369
2369
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2370
2370
|
if (payload.already === true) {
|
|
2371
|
-
|
|
2371
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, accepted, {
|
|
2372
2372
|
json: options.json,
|
|
2373
2373
|
text: `Fleet ${fleetId} is already deactivated.
|
|
2374
2374
|
`
|
|
@@ -2380,7 +2380,7 @@ Preview the blast radius first:
|
|
|
2380
2380
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
2381
2381
|
` : "");
|
|
2382
2382
|
if (!options.wait) {
|
|
2383
|
-
|
|
2383
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, accepted, {
|
|
2384
2384
|
json: options.json,
|
|
2385
2385
|
text: acceptedText
|
|
2386
2386
|
});
|
|
@@ -2402,7 +2402,7 @@ Preview the blast radius first:
|
|
|
2402
2402
|
const envelope = { ...accepted, ...final };
|
|
2403
2403
|
const summary = renderFleetGet(final);
|
|
2404
2404
|
if (fleetStatus(final) === "deactivated") {
|
|
2405
|
-
|
|
2405
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
2406
2406
|
return;
|
|
2407
2407
|
}
|
|
2408
2408
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2441,7 +2441,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
2441
2441
|
"Agent notes:",
|
|
2442
2442
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
2443
2443
|
];
|
|
2444
|
-
|
|
2444
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
2445
2445
|
{
|
|
2446
2446
|
schemaVersion: 1,
|
|
2447
2447
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2618,7 +2618,7 @@ function renderMonitorGet(payload) {
|
|
|
2618
2618
|
`;
|
|
2619
2619
|
}
|
|
2620
2620
|
async function handleMonitorsGet(key, options) {
|
|
2621
|
-
const client = new (0,
|
|
2621
|
+
const client = new (0, _chunkGAN6UYENjs.DeeplineClient)();
|
|
2622
2622
|
const payload = await client.monitors.get(key);
|
|
2623
2623
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2624
2624
|
const dependents = boundPlays ? {
|
|
@@ -2626,24 +2626,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2626
2626
|
truncated: payload.consumer_health_truncated === true
|
|
2627
2627
|
} : await client.monitors.dependents(key);
|
|
2628
2628
|
const detail = { ...payload, dependents };
|
|
2629
|
-
|
|
2629
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, detail, {
|
|
2630
2630
|
json: options.json,
|
|
2631
2631
|
text: renderMonitorGet(detail)
|
|
2632
2632
|
});
|
|
2633
2633
|
}
|
|
2634
2634
|
async function handleMonitorsTest(key, payload, options) {
|
|
2635
2635
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2636
|
-
const result = await new (0,
|
|
2636
|
+
const result = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2637
2637
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2638
2638
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2639
2639
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2640
2640
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2641
2641
|
`;
|
|
2642
|
-
|
|
2642
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2643
2643
|
}
|
|
2644
2644
|
async function handleMonitorsValidate(key, options) {
|
|
2645
|
-
const result = await new (0,
|
|
2646
|
-
|
|
2645
|
+
const result = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.validate(key);
|
|
2646
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2647
2647
|
if (result.valid === false) process.exitCode = 7;
|
|
2648
2648
|
}
|
|
2649
2649
|
async function confirmMonitorDelete(key) {
|
|
@@ -2661,14 +2661,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2661
2661
|
}
|
|
2662
2662
|
}
|
|
2663
2663
|
async function handleMonitorsDelete(key, options) {
|
|
2664
|
-
const client = new (0,
|
|
2664
|
+
const client = new (0, _chunkGAN6UYENjs.DeeplineClient)();
|
|
2665
2665
|
if (options.dryRun) {
|
|
2666
2666
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2667
2667
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2668
2668
|
command: "deepline monitors delete",
|
|
2669
2669
|
mutation: "delete"
|
|
2670
2670
|
});
|
|
2671
|
-
|
|
2671
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload2, {
|
|
2672
2672
|
json: options.json,
|
|
2673
2673
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2674
2674
|
});
|
|
@@ -2688,7 +2688,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2688
2688
|
}
|
|
2689
2689
|
}
|
|
2690
2690
|
const payload = await client.monitors.delete(key);
|
|
2691
|
-
|
|
2691
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2692
2692
|
}
|
|
2693
2693
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2694
2694
|
const body = resolveMonitorJsonBody({
|
|
@@ -2697,25 +2697,25 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2697
2697
|
argLabel: "<patch>",
|
|
2698
2698
|
command: `deepline monitors update ${key}`
|
|
2699
2699
|
});
|
|
2700
|
-
const payload = await new (0,
|
|
2701
|
-
|
|
2700
|
+
const payload = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.update(key, body);
|
|
2701
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2702
2702
|
}
|
|
2703
2703
|
async function handleMonitorsReactivate(key, options) {
|
|
2704
|
-
const client = new (0,
|
|
2704
|
+
const client = new (0, _chunkGAN6UYENjs.DeeplineClient)();
|
|
2705
2705
|
if (options.dryRun) {
|
|
2706
2706
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2707
2707
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2708
2708
|
command: "deepline monitors reactivate",
|
|
2709
2709
|
mutation: "reactivate"
|
|
2710
2710
|
});
|
|
2711
|
-
|
|
2711
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload2, {
|
|
2712
2712
|
json: options.json,
|
|
2713
2713
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2714
2714
|
});
|
|
2715
2715
|
return;
|
|
2716
2716
|
}
|
|
2717
2717
|
const payload = await client.monitors.reactivate(key);
|
|
2718
|
-
|
|
2718
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2719
2719
|
}
|
|
2720
2720
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2721
2721
|
function monitorHealthLine(health) {
|
|
@@ -2848,7 +2848,7 @@ function monitorHealthText(health) {
|
|
|
2848
2848
|
`;
|
|
2849
2849
|
}
|
|
2850
2850
|
async function handleMonitorsAudit(options) {
|
|
2851
|
-
const client = new (0,
|
|
2851
|
+
const client = new (0, _chunkGAN6UYENjs.DeeplineClient)();
|
|
2852
2852
|
const fleetId = _optionalChain([options, 'access', _109 => _109.fleet, 'optionalAccess', _110 => _110.trim, 'call', _111 => _111()]) || void 0;
|
|
2853
2853
|
const scope = fleetId ? { fleetId } : {};
|
|
2854
2854
|
let result = await client.monitors.audit(scope);
|
|
@@ -2892,7 +2892,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2892
2892
|
"",
|
|
2893
2893
|
monitorHealthText(health)
|
|
2894
2894
|
].join("\n");
|
|
2895
|
-
|
|
2895
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
2896
2896
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2897
2897
|
{ json: options.json, text }
|
|
2898
2898
|
);
|
|
@@ -2905,10 +2905,10 @@ async function handleMonitorsRepair(options) {
|
|
|
2905
2905
|
}
|
|
2906
2906
|
async function handleMonitorsHealth(options) {
|
|
2907
2907
|
const fleetId = _optionalChain([options, 'access', _115 => _115.fleet, 'optionalAccess', _116 => _116.trim, 'call', _117 => _117()]) || void 0;
|
|
2908
|
-
const health = await new (0,
|
|
2908
|
+
const health = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.health(
|
|
2909
2909
|
fleetId ? { fleetId } : {}
|
|
2910
2910
|
);
|
|
2911
|
-
|
|
2911
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, health, {
|
|
2912
2912
|
json: options.json,
|
|
2913
2913
|
text: monitorHealthText(health)
|
|
2914
2914
|
});
|
|
@@ -2982,14 +2982,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2982
2982
|
"deploy",
|
|
2983
2983
|
options.idempotencyKey
|
|
2984
2984
|
);
|
|
2985
|
-
const result = await new (0,
|
|
2985
|
+
const result = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.batch.submit({
|
|
2986
2986
|
kind: "deploy",
|
|
2987
2987
|
manifestNdjson,
|
|
2988
2988
|
dryRun: options.dryRun === true,
|
|
2989
2989
|
idempotencyKey
|
|
2990
2990
|
});
|
|
2991
2991
|
const operation = result.operation;
|
|
2992
|
-
|
|
2992
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
2993
2993
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2994
2994
|
{
|
|
2995
2995
|
json: options.json,
|
|
@@ -3017,7 +3017,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
3017
3017
|
kind,
|
|
3018
3018
|
options.idempotencyKey
|
|
3019
3019
|
);
|
|
3020
|
-
const result = await new (0,
|
|
3020
|
+
const result = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.batch.submit({
|
|
3021
3021
|
kind,
|
|
3022
3022
|
scope,
|
|
3023
3023
|
dryRun: options.dryRun === true,
|
|
@@ -3030,14 +3030,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
3030
3030
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
3031
3031
|
`inspect: deepline monitors batch get ${operation.runId}`
|
|
3032
3032
|
].join("\n");
|
|
3033
|
-
|
|
3033
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0,
|
|
3034
3034
|
{ ...result, idempotency_key: idempotencyKey },
|
|
3035
3035
|
{ json: options.json, text: `${text}
|
|
3036
3036
|
` }
|
|
3037
3037
|
);
|
|
3038
3038
|
}
|
|
3039
3039
|
async function handleMonitorBatchGet(operationId, options) {
|
|
3040
|
-
const result = await new (0,
|
|
3040
|
+
const result = await new (0, _chunkGAN6UYENjs.DeeplineClient)().monitors.batch.get(operationId, {
|
|
3041
3041
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
3042
3042
|
});
|
|
3043
3043
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -3049,7 +3049,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
3049
3049
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
3050
3050
|
] : []
|
|
3051
3051
|
].join("\n");
|
|
3052
|
-
|
|
3052
|
+
_chunkJ5P7VGV5js.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
3053
3053
|
` });
|
|
3054
3054
|
}
|
|
3055
3055
|
function registerMonitorsCommands(program) {
|