deepline 0.3.547 → 0.3.549
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 +93 -11
- package/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/plays/check-local-play-graph.ts +3 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +11 -0
- package/dist/bundling-sources/shared_libs/monitors/action-actor.ts +203 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +20 -0
- package/dist/bundling-sources/shared_libs/monitors/package.json +2 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +33 -0
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +19 -3
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-failure-codes.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +83 -6
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +93 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +98 -1
- package/dist/bundling-sources/shared_libs/plays/play-check-compact.ts +636 -0
- package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +3 -0
- package/dist/bundling-sources/shared_libs/security/email-domain.ts +24 -0
- package/dist/cli/auth-UVEZIP3H.js +43 -0
- package/dist/cli/{auth-WJEY4IDX.mjs → auth-YENF525S.mjs} +5 -5
- package/dist/cli/{billing-IJITDDRQ.js → billing-52GAHIDZ.js} +95 -95
- package/dist/cli/{billing-PHJUDYF3.mjs → billing-XPXB27G7.mjs} +9 -9
- package/dist/cli/{chunk-2HPTLBNB.js → chunk-3IUQNHIG.js} +3 -3
- package/dist/cli/{chunk-IKYN6PLO.mjs → chunk-4AUV5QJF.mjs} +5 -5
- package/dist/cli/{chunk-GZFZZQL4.js → chunk-4DJNXAPH.js} +75 -37
- package/dist/cli/{chunk-DZC7LMYM.js → chunk-4HSSPT73.js} +6 -6
- package/dist/cli/{chunk-TNJG4ZPN.mjs → chunk-4QUWXUUJ.mjs} +35 -6
- package/dist/cli/{chunk-SAJWYN4B.js → chunk-5622PYAP.js} +4 -4
- package/dist/cli/{chunk-PBMO36BP.mjs → chunk-5CXE22BI.mjs} +2 -2
- package/dist/cli/{chunk-ESCVHDNY.mjs → chunk-5T37KQNG.mjs} +5 -5
- package/dist/cli/{chunk-YURGAKI3.js → chunk-7FY7AHR6.js} +2 -2
- package/dist/cli/{chunk-PVQCX6KQ.js → chunk-ADWMIZCB.js} +67 -9
- package/dist/cli/{chunk-FMQXAOVE.mjs → chunk-ANOTB6V3.mjs} +4 -4
- package/dist/cli/{chunk-VPF54TXQ.mjs → chunk-AZSVDAXT.mjs} +5 -5
- package/dist/cli/{chunk-G6XTCG3J.mjs → chunk-BDOLPGHD.mjs} +2 -2
- package/dist/cli/{chunk-N63U5CRG.js → chunk-BDUZJX4V.js} +26 -26
- package/dist/cli/{chunk-HFIFKP3A.js → chunk-BPBPY42E.js} +5 -5
- package/dist/cli/{chunk-ECUD4QPD.mjs → chunk-CX4KGWCH.mjs} +3 -3
- package/dist/cli/{chunk-REAFIEV5.js → chunk-CXFOYRI4.js} +99 -99
- package/dist/cli/{chunk-RXRC2COC.mjs → chunk-DCTEH6N5.mjs} +2 -2
- package/dist/cli/{chunk-ABLTVG3J.js → chunk-DIRLEJJX.js} +41 -41
- package/dist/cli/{chunk-VNOQEDVC.js → chunk-ETLEPHLT.js} +7 -7
- package/dist/cli/{chunk-QU3K3IY6.js → chunk-HPSCRVTM.js} +12 -12
- package/dist/cli/{chunk-MBQELFL7.js → chunk-HWCIU3KY.js} +22 -22
- package/dist/cli/{chunk-XMBVHJPR.mjs → chunk-J6FINSAK.mjs} +49 -11
- package/dist/cli/{chunk-K3GMDSUX.js → chunk-KBMBNUUW.js} +5 -5
- package/dist/cli/{chunk-D6OIEH47.js → chunk-KTZ3VU6S.js} +5 -5
- package/dist/cli/{chunk-XNTDTAKC.mjs → chunk-L6UMWAAY.mjs} +1 -1
- package/dist/cli/{chunk-ITLZBDSR.mjs → chunk-LMFTDDAM.mjs} +2 -2
- package/dist/cli/{chunk-56MEAGWA.mjs → chunk-LP2VNGG3.mjs} +2 -2
- package/dist/cli/{chunk-RMCCB3XY.mjs → chunk-MAE3AKDR.mjs} +67 -9
- package/dist/cli/{chunk-L5J6UJ2X.js → chunk-NVALIJQS.js} +15 -15
- package/dist/cli/{chunk-MO7TGNXB.js → chunk-OWX4AAJ4.js} +13 -13
- package/dist/cli/{chunk-DIUNDLSX.mjs → chunk-PLAJ6HPD.mjs} +2 -2
- package/dist/cli/{chunk-G6KW764N.mjs → chunk-PLJCY35C.mjs} +1 -1
- package/dist/cli/{chunk-L6QE2XVM.mjs → chunk-PQX4WTBY.mjs} +1 -1
- package/dist/cli/{chunk-GJOGFWX3.js → chunk-QGKX2WBZ.js} +52 -23
- package/dist/cli/{chunk-AEQ5VWZ5.mjs → chunk-QIZBUY2N.mjs} +4 -4
- package/dist/cli/{chunk-E2OIYPB4.js → chunk-QUELC3B2.js} +10 -10
- package/dist/cli/{chunk-OVYXYTEP.js → chunk-RMKRZJOS.js} +16 -16
- package/dist/cli/{chunk-GIGAYLY6.js → chunk-SVNAP2QI.js} +9 -9
- package/dist/cli/{chunk-2AHY47SI.js → chunk-TYOAOSDL.js} +3 -3
- package/dist/cli/{chunk-GPAWLXW3.mjs → chunk-U6KHWIAO.mjs} +1 -1
- package/dist/cli/{chunk-MOZEAGSR.mjs → chunk-UGVXHT62.mjs} +1 -1
- package/dist/cli/{chunk-QLE3QKJ2.mjs → chunk-V5WPYOAE.mjs} +5 -5
- package/dist/cli/{chunk-FFBXLFKV.js → chunk-V7WMNX4R.js} +1 -1
- package/dist/cli/{chunk-NBYFQZ6O.js → chunk-VLAJGF27.js} +2 -2
- package/dist/cli/{chunk-5SFHPMBY.mjs → chunk-W77LBYF3.mjs} +11 -11
- package/dist/cli/{chunk-DJI5CLLW.mjs → chunk-X4RGDE4J.mjs} +1 -1
- package/dist/cli/{chunk-IVFFCAV2.js → chunk-XPYCNA43.js} +44 -44
- package/dist/cli/{chunk-HARZ4AAX.mjs → chunk-XS72HELO.mjs} +1 -1
- package/dist/cli/{chunk-LMLSOHTU.js → chunk-Y5MDCPWA.js} +53 -53
- package/dist/cli/{chunk-CKIRKYW7.mjs → chunk-Y5SKYU5X.mjs} +3 -3
- package/dist/cli/{chunk-Z2YGQZWV.mjs → chunk-YX7BX2FA.mjs} +2 -2
- package/dist/cli/{chunk-YVKLF7RW.js → chunk-YZTS3XA7.js} +2 -2
- package/dist/cli/{chunk-IGAK22XO.mjs → chunk-Z3DKJOUL.mjs} +1 -1
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/concurrent-runs-help-74AFW3BD.js +21 -0
- package/dist/cli/{concurrent-runs-help-ZNGP563R.mjs → concurrent-runs-help-OYSLW55L.mjs} +6 -6
- package/dist/cli/{csv-X6D4ZELE.js → csv-FRO3UFMQ.js} +13 -13
- package/dist/cli/{csv-VAHQHYYV.mjs → csv-TFCTUYF2.mjs} +4 -4
- package/dist/cli/{db-4G4S2VOV.mjs → db-NHVZBT2H.mjs} +6 -6
- package/dist/cli/{db-YA5ZGVEX.js → db-SNFNRVZJ.js} +27 -27
- package/dist/cli/describe-2JCOC4AK.js +50 -0
- package/dist/cli/{describe-EVXEM2S6.mjs → describe-OVFPRJJL.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-HR6CTN5M.mjs → executions-HWMH2LTC.mjs} +6 -6
- package/dist/cli/{executions-5YC7ABF6.js → executions-RZLKKPZV.js} +8 -8
- package/dist/cli/{feedback-MJHSYLFF.js → feedback-3D5OROCI.js} +14 -14
- package/dist/cli/{feedback-GEU5SPLR.mjs → feedback-WD4JVF77.mjs} +6 -6
- package/dist/cli/git-GCCPCUWJ.js +25 -0
- package/dist/cli/{git-NPFF6QUS.mjs → git-RYUKBCUZ.mjs} +5 -5
- package/dist/cli/index.js +146 -146
- package/dist/cli/index.mjs +45 -45
- package/dist/cli/{integrations-Z7EGVBHF.mjs → integrations-KJPFCEXL.mjs} +7 -7
- package/dist/cli/{integrations-YPHFI77G.js → integrations-Y7OK23DW.js} +15 -15
- package/dist/cli/{legacy-noops-5IYCFWWX.mjs → legacy-noops-2PU2ZVEP.mjs} +6 -6
- package/dist/cli/{legacy-noops-246E3KKG.js → legacy-noops-G7ZY7K3K.js} +9 -9
- package/dist/cli/{mcp-WUYGZXPI.mjs → mcp-D7F2RSOI.mjs} +4 -4
- package/dist/cli/{mcp-YTYTW67G.js → mcp-GILBYX72.js} +24 -24
- package/dist/cli/{monitors-73DQKCU7.mjs → monitors-IK5KXY2H.mjs} +32 -8
- package/dist/cli/{monitors-SA6ILD6Z.js → monitors-OXNHOT3C.js} +125 -101
- package/dist/cli/{org-WVQRB2KX.mjs → org-L5D7EISU.mjs} +6 -6
- package/dist/cli/{org-X7ELDV7B.js → org-OYM3UNTP.js} +88 -88
- package/dist/cli/{play-QI6V2EUQ.mjs → play-PK6QO3WX.mjs} +837 -290
- package/dist/cli/{play-QTYOAJPE.js → play-YK22QPYO.js} +1423 -876
- package/dist/cli/{providers-XXFLVREV.js → providers-5CYP7P4N.js} +9 -9
- package/dist/cli/{providers-DPVMVDS4.mjs → providers-Z6MNJDCG.mjs} +6 -6
- package/dist/cli/{quickstart-YWGNHULM.mjs → quickstart-2I73XQXB.mjs} +4 -4
- package/dist/cli/{quickstart-33ISXQJU.js → quickstart-2YKETYJY.js} +6 -6
- package/dist/cli/{run-J6FCAKQC.mjs → run-KGQ6TUBB.mjs} +23 -23
- package/dist/cli/{run-BWHZXLTD.js → run-YVSEAVE5.js} +43 -43
- package/dist/cli/{search-Z3UU3WBB.mjs → search-V2HPN6FU.mjs} +7 -7
- package/dist/cli/search-YG3UIZ6A.js +32 -0
- package/dist/cli/{search-output-YIPV74ME.js → search-output-BUSANFRN.js} +6 -6
- package/dist/cli/{search-output-OJYY4J7E.mjs → search-output-OCTOSDEO.mjs} +4 -4
- package/dist/cli/{secrets-UXRJCEN4.js → secrets-VDKTHCVB.js} +15 -15
- package/dist/cli/{secrets-YZZN2WST.mjs → secrets-WZGRBWI5.mjs} +6 -6
- package/dist/cli/{sessions-ITCGPD7Z.mjs → sessions-5DTN55DZ.mjs} +6 -6
- package/dist/cli/sessions-NSPT6LHT.js +22 -0
- package/dist/cli/{settings-LAFYMILP.js → settings-A7VSNOLI.js} +85 -85
- package/dist/cli/{settings-ZP2LSVNM.mjs → settings-BK5FPQ3X.mjs} +12 -12
- package/dist/cli/{setup-WEQAQSYC.mjs → setup-LLQVPZTP.mjs} +9 -9
- package/dist/cli/{setup-4AL3XYM5.js → setup-NV27CYQ5.js} +49 -49
- package/dist/cli/{skills-NQH4HFW2.mjs → skills-IV6HK4XA.mjs} +7 -7
- package/dist/cli/skills-UA5E4DA3.js +36 -0
- package/dist/cli/{tools-CXK2GSI4.mjs → tools-4FKPCRD7.mjs} +17 -17
- package/dist/cli/tools-NJVPAG37.js +57 -0
- package/dist/cli/update-DKX27XZB.js +34 -0
- package/dist/cli/{update-3ROF3Z75.mjs → update-MH5M746E.mjs} +9 -9
- package/dist/cli/{views-XJFO5CEH.js → views-JW44TCGL.js} +21 -21
- package/dist/cli/{views-AOUHVGV2.mjs → views-KXC4JDT7.mjs} +6 -6
- package/dist/cli/{workflow-GY3DBHXX.js → workflow-F5AHL2ET.js} +17 -17
- package/dist/cli/{workflow-KBS2QJK6.mjs → workflow-FI4DL7ZI.mjs} +7 -7
- package/dist/{client-D1uWA2Vc.d.mts → client-BEJqhQAj.d.mts} +1 -1
- package/dist/{client-Hz7SsBXs.d.ts → client-Ceo295L2.d.ts} +1 -1
- package/dist/{client-core-D3Ad7Flt.d.ts → client-core-BPYuWfBC.d.ts} +49 -1
- package/dist/{client-core-Db_e63Hb.d.mts → client-core-BqetRxx-.d.mts} +49 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +118 -116
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +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/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-AC5277PI.js +0 -43
- package/dist/cli/concurrent-runs-help-ZYISYOQA.js +0 -21
- package/dist/cli/describe-GYYSLZLV.js +0 -50
- package/dist/cli/git-FZIQZNI4.js +0 -25
- package/dist/cli/search-JCWJX2XD.js +0 -32
- package/dist/cli/sessions-NA4SJH6Q.js +0 -22
- package/dist/cli/skills-XZ4Y6SZ7.js +0 -36
- package/dist/cli/tools-WJQ6Y7E4.js +0 -57
- package/dist/cli/update-ZLRLTBRD.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 _chunkKBMBNUUWjs = require('./chunk-KBMBNUUW.js');
|
|
5
|
+
require('./chunk-4DJNXAPH.js');
|
|
6
6
|
require('./chunk-4WAM6TLD.js');
|
|
7
7
|
require('./chunk-SL6MYJYM.js');
|
|
8
8
|
require('./chunk-PMH4GLMD.js');
|
|
@@ -18,15 +18,15 @@ require('./chunk-UNEMDKXN.js');
|
|
|
18
18
|
var _chunkU2LVWCTDjs = require('./chunk-U2LVWCTD.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkTYOAOSDLjs = require('./chunk-TYOAOSDL.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
28
|
-
require('./chunk-
|
|
29
|
-
require('./chunk-
|
|
27
|
+
var _chunkQGKX2WBZjs = require('./chunk-QGKX2WBZ.js');
|
|
28
|
+
require('./chunk-3IUQNHIG.js');
|
|
29
|
+
require('./chunk-5622PYAP.js');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
var _chunkEITMD3A5js = require('./chunk-EITMD3A5.js');
|
|
@@ -34,7 +34,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
var _chunkBBTKAASQjs = require('./chunk-BBTKAASQ.js');
|
|
37
|
-
require('./chunk-
|
|
37
|
+
require('./chunk-V7WMNX4R.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 = _chunkQGKX2WBZjs.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
116
116
|
if (wantsJson) {
|
|
117
|
-
const payload =
|
|
118
|
-
|
|
117
|
+
const payload = _chunkQGKX2WBZjs.errorToJsonPayload.call(void 0, error);
|
|
118
|
+
_chunkQGKX2WBZjs.printJson.call(void 0, {
|
|
119
119
|
ok: false,
|
|
120
120
|
exitCode,
|
|
121
121
|
...next ? { next } : {},
|
|
@@ -535,14 +535,14 @@ Preview the plan first with:
|
|
|
535
535
|
);
|
|
536
536
|
}
|
|
537
537
|
async function handleMonitorsStatus(options) {
|
|
538
|
-
const payload = await new (0,
|
|
538
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.status();
|
|
539
539
|
const hasAccess = payload.has_access === true;
|
|
540
540
|
const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
|
|
541
541
|
const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
|
|
542
542
|
${reason}` : ""}
|
|
543
543
|
` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
|
|
544
544
|
`;
|
|
545
|
-
|
|
545
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
546
546
|
{ has_access: hasAccess, ...reason ? { reason } : {} },
|
|
547
547
|
{ json: options.json, text }
|
|
548
548
|
);
|
|
@@ -608,14 +608,14 @@ async function handleMonitorsAvailable(toolId, options) {
|
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
const tool = _nullishCoalesce(toolId, () => ( options.tool));
|
|
611
|
-
const payload = await new (0,
|
|
611
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.available(tool, {
|
|
612
612
|
...options.provider ? { provider: options.provider } : {},
|
|
613
613
|
...options.search ? { search: options.search } : {},
|
|
614
614
|
...options.limit ? { limit: options.limit } : {},
|
|
615
615
|
...options.full ? { full: true } : {},
|
|
616
616
|
...options.compact ? { compact: true } : {}
|
|
617
617
|
});
|
|
618
|
-
|
|
618
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, {
|
|
619
619
|
json: options.json,
|
|
620
620
|
// Human list view shows id + name + deployed_count ("deployed: N") so
|
|
621
621
|
// can-deploy vs already-deployed is visible in one view. Describing a
|
|
@@ -722,14 +722,14 @@ async function handleMonitorsList(options) {
|
|
|
722
722
|
"`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
|
|
723
723
|
);
|
|
724
724
|
}
|
|
725
|
-
const payload = await new (0,
|
|
725
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.list({
|
|
726
726
|
...state ? { state } : {},
|
|
727
727
|
...options.status ? { status: options.status } : {},
|
|
728
728
|
...options.limit ? { limit: options.limit } : {},
|
|
729
729
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
730
730
|
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
731
731
|
});
|
|
732
|
-
|
|
732
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, {
|
|
733
733
|
json: options.json,
|
|
734
734
|
text: renderDeployedListText(
|
|
735
735
|
payload,
|
|
@@ -820,7 +820,7 @@ function renderMonitorLedgerText(payload) {
|
|
|
820
820
|
var LEDGER_SORTS = ["recent", "installed", "name", "findings"];
|
|
821
821
|
var LEDGER_WINDOWS = ["1d", "7d", "30d", "90d", "1y"];
|
|
822
822
|
async function handleMonitorsLedger(key, options) {
|
|
823
|
-
const client = new (0,
|
|
823
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
824
824
|
if (options.findings) {
|
|
825
825
|
if (!key) {
|
|
826
826
|
throw new MonitorsUsageError(
|
|
@@ -830,12 +830,12 @@ async function handleMonitorsLedger(key, options) {
|
|
|
830
830
|
const payload2 = await client.monitors.ledgerFindings(key, {
|
|
831
831
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
832
832
|
});
|
|
833
|
-
|
|
833
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
834
834
|
return;
|
|
835
835
|
}
|
|
836
836
|
if (key) {
|
|
837
837
|
const payload2 = await client.monitors.ledgerGet(key);
|
|
838
|
-
|
|
838
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
839
839
|
return;
|
|
840
840
|
}
|
|
841
841
|
if (options.sort !== void 0 && !LEDGER_SORTS.includes(options.sort)) {
|
|
@@ -859,7 +859,7 @@ async function handleMonitorsLedger(key, options) {
|
|
|
859
859
|
...options.limit ? { limit: options.limit } : {},
|
|
860
860
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
861
861
|
});
|
|
862
|
-
|
|
862
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, {
|
|
863
863
|
json: options.json,
|
|
864
864
|
text: renderMonitorLedgerText(payload)
|
|
865
865
|
});
|
|
@@ -871,10 +871,10 @@ async function handleMonitorsCheck(definition, options) {
|
|
|
871
871
|
argLabel: "<definition>",
|
|
872
872
|
command: "deepline monitors check"
|
|
873
873
|
});
|
|
874
|
-
const payload = await new (0,
|
|
874
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.check(
|
|
875
875
|
body
|
|
876
876
|
);
|
|
877
|
-
|
|
877
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
878
878
|
}
|
|
879
879
|
function previewText(value) {
|
|
880
880
|
return typeof value === "string" && value.trim() ? value.trim() : "-";
|
|
@@ -932,22 +932,22 @@ async function handleMonitorsPreview(definition, options) {
|
|
|
932
932
|
if (limit !== void 0 && !Number.isInteger(limit)) {
|
|
933
933
|
throw new MonitorsUsageError("--limit must be a whole number from 1 to 3.");
|
|
934
934
|
}
|
|
935
|
-
const wantsJson =
|
|
935
|
+
const wantsJson = _chunkQGKX2WBZjs.shouldEmitJson.call(void 0, options.json);
|
|
936
936
|
if (options.idempotencyKey === void 0 && wantsJson) {
|
|
937
937
|
throw new MonitorsUsageError(
|
|
938
938
|
"--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."
|
|
939
939
|
);
|
|
940
940
|
}
|
|
941
941
|
const idempotencyKey = _nullishCoalesce(options.idempotencyKey, () => ( `monitor-preview-${_crypto.randomUUID.call(void 0, )}`));
|
|
942
|
-
const progress =
|
|
942
|
+
const progress = _chunkTYOAOSDLjs.createCliProgress.call(void 0, !wantsJson);
|
|
943
943
|
progress.phase(`Preview key: ${idempotencyKey}`);
|
|
944
944
|
try {
|
|
945
|
-
const payload = await new (0,
|
|
945
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.preview(
|
|
946
946
|
body,
|
|
947
947
|
{ idempotencyKey, ...limit === void 0 ? {} : { limit } }
|
|
948
948
|
);
|
|
949
949
|
progress.complete();
|
|
950
|
-
|
|
950
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, {
|
|
951
951
|
json: options.json,
|
|
952
952
|
text: renderMonitorPreviewText(payload)
|
|
953
953
|
});
|
|
@@ -992,7 +992,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
992
992
|
argLabel: "<definition>",
|
|
993
993
|
command: "deepline monitors deploy"
|
|
994
994
|
});
|
|
995
|
-
const client = new (0,
|
|
995
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
996
996
|
const definitionArg = body;
|
|
997
997
|
if (options.dryRun) {
|
|
998
998
|
const payload2 = await client.monitors.deploy(definitionArg, {
|
|
@@ -1000,7 +1000,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
1000
1000
|
});
|
|
1001
1001
|
const valid = payload2.valid !== false;
|
|
1002
1002
|
const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _39 => _39(payload2), 'optionalAccess', _40 => _40.identity_conflict]));
|
|
1003
|
-
|
|
1003
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1004
1004
|
{ dry_run: true, ...payload2 },
|
|
1005
1005
|
{ json: options.json, text: renderMonitorDeployPlan(payload2) }
|
|
1006
1006
|
);
|
|
@@ -1010,7 +1010,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
1010
1010
|
return;
|
|
1011
1011
|
}
|
|
1012
1012
|
const payload = await client.monitors.deploy(definitionArg);
|
|
1013
|
-
|
|
1013
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, {
|
|
1014
1014
|
json: options.json,
|
|
1015
1015
|
text: renderMonitorDeployCompletion(payload)
|
|
1016
1016
|
});
|
|
@@ -1022,29 +1022,29 @@ async function handleMonitorsSync(definition, options) {
|
|
|
1022
1022
|
argLabel: "<definition>",
|
|
1023
1023
|
command: "deepline monitors sync"
|
|
1024
1024
|
});
|
|
1025
|
-
const payload = await new (0,
|
|
1025
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.sync(body, {
|
|
1026
1026
|
...options.dryRun ? { dryRun: true } : {},
|
|
1027
1027
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
|
|
1028
1028
|
});
|
|
1029
1029
|
if (options.dryRun) {
|
|
1030
1030
|
const plan = payload;
|
|
1031
|
-
|
|
1031
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1032
1032
|
{ dry_run: true, ...plan },
|
|
1033
1033
|
{ json: options.json, text: renderMonitorDeployPlan(plan) }
|
|
1034
1034
|
);
|
|
1035
1035
|
return;
|
|
1036
1036
|
}
|
|
1037
|
-
|
|
1037
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, {
|
|
1038
1038
|
json: options.json,
|
|
1039
1039
|
text: renderMonitorJob(payload)
|
|
1040
1040
|
});
|
|
1041
1041
|
}
|
|
1042
1042
|
async function handleScalarMonitorLifecycle(action, key, options) {
|
|
1043
|
-
const payload = await new (0,
|
|
1043
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors[action](key, {
|
|
1044
1044
|
...options.dryRun ? { dryRun: true } : {},
|
|
1045
1045
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
|
|
1046
1046
|
});
|
|
1047
|
-
|
|
1047
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, {
|
|
1048
1048
|
json: options.json,
|
|
1049
1049
|
text: options.dryRun ? void 0 : renderMonitorJob(payload)
|
|
1050
1050
|
});
|
|
@@ -1133,11 +1133,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
1133
1133
|
lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
|
|
1134
1134
|
);
|
|
1135
1135
|
}
|
|
1136
|
-
const payload = await new (0,
|
|
1136
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.batch.deploy(
|
|
1137
1137
|
lint.normalized.monitors,
|
|
1138
1138
|
{ idempotencyKey }
|
|
1139
1139
|
);
|
|
1140
|
-
|
|
1140
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1141
1141
|
{
|
|
1142
1142
|
...payload,
|
|
1143
1143
|
idempotency_key: idempotencyKey,
|
|
@@ -1170,7 +1170,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1170
1170
|
);
|
|
1171
1171
|
}
|
|
1172
1172
|
if (options.dryRun) {
|
|
1173
|
-
|
|
1173
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1174
1174
|
{
|
|
1175
1175
|
ok: true,
|
|
1176
1176
|
dry_run: true,
|
|
@@ -1187,7 +1187,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1187
1187
|
"sync",
|
|
1188
1188
|
options.idempotencyKey
|
|
1189
1189
|
);
|
|
1190
|
-
const payload = await new (0,
|
|
1190
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.batches.sync(
|
|
1191
1191
|
batchId,
|
|
1192
1192
|
lint.normalized.monitors,
|
|
1193
1193
|
{
|
|
@@ -1195,14 +1195,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1195
1195
|
...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
|
|
1196
1196
|
}
|
|
1197
1197
|
);
|
|
1198
|
-
|
|
1198
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1199
1199
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1200
1200
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1201
1201
|
);
|
|
1202
1202
|
}
|
|
1203
1203
|
async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
1204
1204
|
if (options.dryRun) {
|
|
1205
|
-
|
|
1205
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1206
1206
|
{
|
|
1207
1207
|
ok: true,
|
|
1208
1208
|
dry_run: true,
|
|
@@ -1218,17 +1218,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
|
1218
1218
|
intent,
|
|
1219
1219
|
options.idempotencyKey
|
|
1220
1220
|
);
|
|
1221
|
-
const payload = await new (0,
|
|
1221
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
1222
1222
|
idempotencyKey
|
|
1223
1223
|
});
|
|
1224
|
-
|
|
1224
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1225
1225
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1226
1226
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1227
1227
|
);
|
|
1228
1228
|
}
|
|
1229
1229
|
async function handleNamedMonitorBatchGet(batchId, options) {
|
|
1230
|
-
const payload = await new (0,
|
|
1231
|
-
|
|
1230
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.batches.get(batchId);
|
|
1231
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, {
|
|
1232
1232
|
json: options.json,
|
|
1233
1233
|
text: renderMonitorJob(payload)
|
|
1234
1234
|
});
|
|
@@ -1242,7 +1242,7 @@ async function handleMonitorBatchLint(options) {
|
|
|
1242
1242
|
const result = _chunkU2LVWCTDjs.lintMonitorBatchInput.call(void 0,
|
|
1243
1243
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1244
1244
|
);
|
|
1245
|
-
|
|
1245
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1246
1246
|
{
|
|
1247
1247
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1248
1248
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1262,7 +1262,7 @@ async function handleMonitorFleetLint(options) {
|
|
|
1262
1262
|
const result = _chunkWOQO3GV4js.lintMonitorFleetInput.call(void 0,
|
|
1263
1263
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1264
1264
|
);
|
|
1265
|
-
|
|
1265
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1266
1266
|
{
|
|
1267
1267
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1268
1268
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1274,32 +1274,32 @@ async function handleMonitorFleetLint(options) {
|
|
|
1274
1274
|
process.exitCode = 2;
|
|
1275
1275
|
}
|
|
1276
1276
|
async function handleMonitorJobGet(jobId, options) {
|
|
1277
|
-
const payload = await new (0,
|
|
1278
|
-
|
|
1277
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1278
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, {
|
|
1279
1279
|
json: options.json,
|
|
1280
1280
|
text: renderMonitorJob(payload)
|
|
1281
1281
|
});
|
|
1282
1282
|
}
|
|
1283
1283
|
async function handleMonitorJobWait(jobId, options) {
|
|
1284
|
-
const payload = await new (0,
|
|
1284
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1285
1285
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1286
1286
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1287
1287
|
});
|
|
1288
|
-
|
|
1288
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, {
|
|
1289
1289
|
json: options.json,
|
|
1290
1290
|
text: renderMonitorJob(payload)
|
|
1291
1291
|
});
|
|
1292
1292
|
}
|
|
1293
1293
|
async function handleMonitorJobLogs(jobId, options) {
|
|
1294
1294
|
const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
|
|
1295
|
-
const payload = await new (0,
|
|
1295
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1296
1296
|
...limit === void 0 ? {} : { limit }
|
|
1297
1297
|
});
|
|
1298
|
-
|
|
1298
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
1299
1299
|
}
|
|
1300
1300
|
async function handleMonitorJobCancel(jobId, options) {
|
|
1301
|
-
const payload = await new (0,
|
|
1302
|
-
|
|
1301
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1302
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, {
|
|
1303
1303
|
json: options.json,
|
|
1304
1304
|
text: renderMonitorJob(payload)
|
|
1305
1305
|
});
|
|
@@ -1641,7 +1641,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
|
|
|
1641
1641
|
`;
|
|
1642
1642
|
}
|
|
1643
1643
|
function reportFleetState(payload, error, options) {
|
|
1644
|
-
|
|
1644
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1645
1645
|
{
|
|
1646
1646
|
...payload,
|
|
1647
1647
|
code: error.code,
|
|
@@ -1775,7 +1775,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
|
|
|
1775
1775
|
_fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
|
|
1776
1776
|
`, "utf8");
|
|
1777
1777
|
const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
|
|
1778
|
-
|
|
1778
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
1779
1779
|
{ schemaVersion: 2, file, definition, next },
|
|
1780
1780
|
{
|
|
1781
1781
|
json: options.json,
|
|
@@ -1811,6 +1811,9 @@ function fleetSyncCommandLine(target, options) {
|
|
|
1811
1811
|
if (options.idempotencyKey) {
|
|
1812
1812
|
parts.push(`--idempotency-key ${fleetShellArg(options.idempotencyKey)}`);
|
|
1813
1813
|
}
|
|
1814
|
+
if (options.commitBudgetMs !== void 0) {
|
|
1815
|
+
parts.push(`--commit-budget-ms ${fleetShellArg(options.commitBudgetMs)}`);
|
|
1816
|
+
}
|
|
1814
1817
|
parts.push(...fleetJsonFlag(options));
|
|
1815
1818
|
return parts.join(" ");
|
|
1816
1819
|
}
|
|
@@ -1838,7 +1841,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1838
1841
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1839
1842
|
);
|
|
1840
1843
|
}
|
|
1841
|
-
const client = new (0,
|
|
1844
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
1842
1845
|
const payload = await client.monitors.fleets.sync(
|
|
1843
1846
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1844
1847
|
{
|
|
@@ -1850,7 +1853,22 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1850
1853
|
"--expected-generation"
|
|
1851
1854
|
)
|
|
1852
1855
|
} : {},
|
|
1853
|
-
idempotencyKey
|
|
1856
|
+
idempotencyKey,
|
|
1857
|
+
...options.commitBudgetMs !== void 0 ? {
|
|
1858
|
+
commitBudgetMs: fleetIntegerOption(
|
|
1859
|
+
options.commitBudgetMs,
|
|
1860
|
+
"--commit-budget-ms"
|
|
1861
|
+
)
|
|
1862
|
+
} : {},
|
|
1863
|
+
// A plan too large to commit in one request is committed over several;
|
|
1864
|
+
// the SDK re-sends the sync and this says how far it has got. stderr,
|
|
1865
|
+
// so --json stdout stays the one committed result.
|
|
1866
|
+
onCommitProgress: (progress2) => {
|
|
1867
|
+
process.stderr.write(
|
|
1868
|
+
`Committing Fleet ${progress2.fleetId} generation ${progress2.generation}: ${progress2.membersCommitted.toLocaleString("en-US")} of ${progress2.membersTotal.toLocaleString("en-US")} members so far; continuing (request ${progress2.attempt + 1}).
|
|
1869
|
+
`
|
|
1870
|
+
);
|
|
1871
|
+
}
|
|
1854
1872
|
}
|
|
1855
1873
|
);
|
|
1856
1874
|
if (options.dryRun) {
|
|
@@ -1861,7 +1879,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1861
1879
|
}
|
|
1862
1880
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1863
1881
|
if (!options.wait || options.dryRun) {
|
|
1864
|
-
|
|
1882
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1865
1883
|
json: options.json,
|
|
1866
1884
|
text: renderFleetSync(payload, {
|
|
1867
1885
|
fleetId,
|
|
@@ -1887,7 +1905,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1887
1905
|
const status = fleetStatus(final);
|
|
1888
1906
|
const summary = renderFleetGet(final);
|
|
1889
1907
|
if (status === "converged") {
|
|
1890
|
-
|
|
1908
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1891
1909
|
return;
|
|
1892
1910
|
}
|
|
1893
1911
|
if (status === "billing_suspended") {
|
|
@@ -1949,14 +1967,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1949
1967
|
`
|
|
1950
1968
|
);
|
|
1951
1969
|
}
|
|
1952
|
-
const client = new (0,
|
|
1970
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
1953
1971
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1954
1972
|
...options.drift ? { drift: true } : {},
|
|
1955
1973
|
...limit !== void 0 ? { limit } : {}
|
|
1956
1974
|
});
|
|
1957
1975
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1958
1976
|
if (!options.check) {
|
|
1959
|
-
|
|
1977
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1960
1978
|
return;
|
|
1961
1979
|
}
|
|
1962
1980
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -1964,7 +1982,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1964
1982
|
);
|
|
1965
1983
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
1966
1984
|
if (unconverged.length === 0) {
|
|
1967
|
-
|
|
1985
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1968
1986
|
return;
|
|
1969
1987
|
}
|
|
1970
1988
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -2129,7 +2147,7 @@ function renderFleetIssuePage(payload) {
|
|
|
2129
2147
|
}
|
|
2130
2148
|
async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
2131
2149
|
const window = fleetChoice(options.window, LEDGER_WINDOWS, "--window");
|
|
2132
|
-
const client = new (0,
|
|
2150
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
2133
2151
|
if (fleetId) {
|
|
2134
2152
|
const listOnly = [
|
|
2135
2153
|
options.q !== void 0 ? "--q" : "",
|
|
@@ -2144,7 +2162,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2144
2162
|
const payload2 = await client.monitors.fleets.overview(fleetId, {
|
|
2145
2163
|
...window ? { window } : {}
|
|
2146
2164
|
});
|
|
2147
|
-
|
|
2165
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2148
2166
|
json: options.json,
|
|
2149
2167
|
text: renderFleetOverviewDetail(payload2, window)
|
|
2150
2168
|
});
|
|
@@ -2160,7 +2178,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2160
2178
|
...sort ? { sort } : {},
|
|
2161
2179
|
...window ? { window } : {}
|
|
2162
2180
|
});
|
|
2163
|
-
|
|
2181
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, {
|
|
2164
2182
|
json: options.json,
|
|
2165
2183
|
text: renderFleetOverviewList(payload)
|
|
2166
2184
|
});
|
|
@@ -2171,13 +2189,13 @@ async function handleMonitorFleetsIssues(fleetId, options) {
|
|
|
2171
2189
|
if (limit !== void 0 && (limit < 1 || limit > 100)) {
|
|
2172
2190
|
throw new MonitorsUsageError("--limit must be an integer from 1 to 100.");
|
|
2173
2191
|
}
|
|
2174
|
-
const payload = await new (0,
|
|
2192
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.fleets.issues(fleetId, {
|
|
2175
2193
|
...group ? { group } : {},
|
|
2176
2194
|
...options.cause ? { cause: options.cause } : {},
|
|
2177
2195
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
2178
2196
|
...limit !== void 0 ? { limit } : {}
|
|
2179
2197
|
});
|
|
2180
|
-
|
|
2198
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, {
|
|
2181
2199
|
json: options.json,
|
|
2182
2200
|
text: renderFleetIssuePage(payload)
|
|
2183
2201
|
});
|
|
@@ -2206,13 +2224,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2206
2224
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
2207
2225
|
);
|
|
2208
2226
|
}
|
|
2209
|
-
const client = new (0,
|
|
2227
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
2210
2228
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
2211
2229
|
idempotencyKey
|
|
2212
2230
|
});
|
|
2213
2231
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2214
2232
|
if (!options.wait) {
|
|
2215
|
-
|
|
2233
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2216
2234
|
json: options.json,
|
|
2217
2235
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
2218
2236
|
idempotency key ${idempotencyKey}
|
|
@@ -2235,7 +2253,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2235
2253
|
const envelope = { ...accepted, ...final };
|
|
2236
2254
|
const text = renderFleetGet(final);
|
|
2237
2255
|
if (fleetStatus(final) === "converged") {
|
|
2238
|
-
|
|
2256
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
2239
2257
|
return;
|
|
2240
2258
|
}
|
|
2241
2259
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2284,7 +2302,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
2284
2302
|
}
|
|
2285
2303
|
}
|
|
2286
2304
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
2287
|
-
const client = new (0,
|
|
2305
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
2288
2306
|
if (options.dryRun) {
|
|
2289
2307
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
2290
2308
|
dryRun: true,
|
|
@@ -2294,7 +2312,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
2294
2312
|
command: "deepline monitors fleets deactivate",
|
|
2295
2313
|
mutation: "fleet deactivate"
|
|
2296
2314
|
});
|
|
2297
|
-
|
|
2315
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, plan, {
|
|
2298
2316
|
json: options.json,
|
|
2299
2317
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
2300
2318
|
});
|
|
@@ -2332,7 +2350,7 @@ Preview the blast radius first:
|
|
|
2332
2350
|
});
|
|
2333
2351
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2334
2352
|
if (payload.already === true) {
|
|
2335
|
-
|
|
2353
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2336
2354
|
json: options.json,
|
|
2337
2355
|
text: `Fleet ${fleetId} is already deactivated.
|
|
2338
2356
|
`
|
|
@@ -2344,7 +2362,7 @@ Preview the blast radius first:
|
|
|
2344
2362
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
2345
2363
|
` : "");
|
|
2346
2364
|
if (!options.wait) {
|
|
2347
|
-
|
|
2365
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2348
2366
|
json: options.json,
|
|
2349
2367
|
text: acceptedText
|
|
2350
2368
|
});
|
|
@@ -2366,7 +2384,7 @@ Preview the blast radius first:
|
|
|
2366
2384
|
const envelope = { ...accepted, ...final };
|
|
2367
2385
|
const summary = renderFleetGet(final);
|
|
2368
2386
|
if (fleetStatus(final) === "deactivated") {
|
|
2369
|
-
|
|
2387
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
2370
2388
|
return;
|
|
2371
2389
|
}
|
|
2372
2390
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2405,7 +2423,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
2405
2423
|
"Agent notes:",
|
|
2406
2424
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
2407
2425
|
];
|
|
2408
|
-
|
|
2426
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
2409
2427
|
{
|
|
2410
2428
|
schemaVersion: 1,
|
|
2411
2429
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2567,7 +2585,7 @@ function renderMonitorGet(payload) {
|
|
|
2567
2585
|
`;
|
|
2568
2586
|
}
|
|
2569
2587
|
async function handleMonitorsGet(key, options) {
|
|
2570
|
-
const client = new (0,
|
|
2588
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
2571
2589
|
const payload = await client.monitors.get(key);
|
|
2572
2590
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2573
2591
|
const dependents = boundPlays ? {
|
|
@@ -2575,24 +2593,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2575
2593
|
truncated: payload.consumer_health_truncated === true
|
|
2576
2594
|
} : await client.monitors.dependents(key);
|
|
2577
2595
|
const detail = { ...payload, dependents };
|
|
2578
|
-
|
|
2596
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, detail, {
|
|
2579
2597
|
json: options.json,
|
|
2580
2598
|
text: renderMonitorGet(detail)
|
|
2581
2599
|
});
|
|
2582
2600
|
}
|
|
2583
2601
|
async function handleMonitorsTest(key, payload, options) {
|
|
2584
2602
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2585
|
-
const result = await new (0,
|
|
2603
|
+
const result = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2586
2604
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2587
2605
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2588
2606
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2589
2607
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2590
2608
|
`;
|
|
2591
|
-
|
|
2609
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2592
2610
|
}
|
|
2593
2611
|
async function handleMonitorsValidate(key, options) {
|
|
2594
|
-
const result = await new (0,
|
|
2595
|
-
|
|
2612
|
+
const result = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.validate(key);
|
|
2613
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2596
2614
|
if (result.valid === false) process.exitCode = 7;
|
|
2597
2615
|
}
|
|
2598
2616
|
async function confirmMonitorDelete(key) {
|
|
@@ -2610,14 +2628,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2610
2628
|
}
|
|
2611
2629
|
}
|
|
2612
2630
|
async function handleMonitorsDelete(key, options) {
|
|
2613
|
-
const client = new (0,
|
|
2631
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
2614
2632
|
if (options.dryRun) {
|
|
2615
2633
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2616
2634
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2617
2635
|
command: "deepline monitors delete",
|
|
2618
2636
|
mutation: "delete"
|
|
2619
2637
|
});
|
|
2620
|
-
|
|
2638
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2621
2639
|
json: options.json,
|
|
2622
2640
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2623
2641
|
});
|
|
@@ -2637,7 +2655,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2637
2655
|
}
|
|
2638
2656
|
}
|
|
2639
2657
|
const payload = await client.monitors.delete(key);
|
|
2640
|
-
|
|
2658
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2641
2659
|
}
|
|
2642
2660
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2643
2661
|
const body = resolveMonitorJsonBody({
|
|
@@ -2646,25 +2664,25 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2646
2664
|
argLabel: "<patch>",
|
|
2647
2665
|
command: `deepline monitors update ${key}`
|
|
2648
2666
|
});
|
|
2649
|
-
const payload = await new (0,
|
|
2650
|
-
|
|
2667
|
+
const payload = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.update(key, body);
|
|
2668
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2651
2669
|
}
|
|
2652
2670
|
async function handleMonitorsReactivate(key, options) {
|
|
2653
|
-
const client = new (0,
|
|
2671
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
2654
2672
|
if (options.dryRun) {
|
|
2655
2673
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2656
2674
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2657
2675
|
command: "deepline monitors reactivate",
|
|
2658
2676
|
mutation: "reactivate"
|
|
2659
2677
|
});
|
|
2660
|
-
|
|
2678
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2661
2679
|
json: options.json,
|
|
2662
2680
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2663
2681
|
});
|
|
2664
2682
|
return;
|
|
2665
2683
|
}
|
|
2666
2684
|
const payload = await client.monitors.reactivate(key);
|
|
2667
|
-
|
|
2685
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2668
2686
|
}
|
|
2669
2687
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2670
2688
|
function monitorHealthLine(health) {
|
|
@@ -2797,7 +2815,7 @@ function monitorHealthText(health) {
|
|
|
2797
2815
|
`;
|
|
2798
2816
|
}
|
|
2799
2817
|
async function handleMonitorsAudit(options) {
|
|
2800
|
-
const client = new (0,
|
|
2818
|
+
const client = new (0, _chunkKBMBNUUWjs.DeeplineClient)();
|
|
2801
2819
|
const fleetId = _optionalChain([options, 'access', _106 => _106.fleet, 'optionalAccess', _107 => _107.trim, 'call', _108 => _108()]) || void 0;
|
|
2802
2820
|
const scope = fleetId ? { fleetId } : {};
|
|
2803
2821
|
let result = await client.monitors.audit(scope);
|
|
@@ -2841,7 +2859,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2841
2859
|
"",
|
|
2842
2860
|
monitorHealthText(health)
|
|
2843
2861
|
].join("\n");
|
|
2844
|
-
|
|
2862
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
2845
2863
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2846
2864
|
{ json: options.json, text }
|
|
2847
2865
|
);
|
|
@@ -2854,10 +2872,10 @@ async function handleMonitorsRepair(options) {
|
|
|
2854
2872
|
}
|
|
2855
2873
|
async function handleMonitorsHealth(options) {
|
|
2856
2874
|
const fleetId = _optionalChain([options, 'access', _112 => _112.fleet, 'optionalAccess', _113 => _113.trim, 'call', _114 => _114()]) || void 0;
|
|
2857
|
-
const health = await new (0,
|
|
2875
|
+
const health = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.health(
|
|
2858
2876
|
fleetId ? { fleetId } : {}
|
|
2859
2877
|
);
|
|
2860
|
-
|
|
2878
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, health, {
|
|
2861
2879
|
json: options.json,
|
|
2862
2880
|
text: monitorHealthText(health)
|
|
2863
2881
|
});
|
|
@@ -2931,14 +2949,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2931
2949
|
"deploy",
|
|
2932
2950
|
options.idempotencyKey
|
|
2933
2951
|
);
|
|
2934
|
-
const result = await new (0,
|
|
2952
|
+
const result = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.batch.submit({
|
|
2935
2953
|
kind: "deploy",
|
|
2936
2954
|
manifestNdjson,
|
|
2937
2955
|
dryRun: options.dryRun === true,
|
|
2938
2956
|
idempotencyKey
|
|
2939
2957
|
});
|
|
2940
2958
|
const operation = result.operation;
|
|
2941
|
-
|
|
2959
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
2942
2960
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2943
2961
|
{
|
|
2944
2962
|
json: options.json,
|
|
@@ -2966,7 +2984,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2966
2984
|
kind,
|
|
2967
2985
|
options.idempotencyKey
|
|
2968
2986
|
);
|
|
2969
|
-
const result = await new (0,
|
|
2987
|
+
const result = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.batch.submit({
|
|
2970
2988
|
kind,
|
|
2971
2989
|
scope,
|
|
2972
2990
|
dryRun: options.dryRun === true,
|
|
@@ -2979,14 +2997,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2979
2997
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
2980
2998
|
`inspect: deepline monitors batch get ${operation.runId}`
|
|
2981
2999
|
].join("\n");
|
|
2982
|
-
|
|
3000
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0,
|
|
2983
3001
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2984
3002
|
{ json: options.json, text: `${text}
|
|
2985
3003
|
` }
|
|
2986
3004
|
);
|
|
2987
3005
|
}
|
|
2988
3006
|
async function handleMonitorBatchGet(operationId, options) {
|
|
2989
|
-
const result = await new (0,
|
|
3007
|
+
const result = await new (0, _chunkKBMBNUUWjs.DeeplineClient)().monitors.batch.get(operationId, {
|
|
2990
3008
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
2991
3009
|
});
|
|
2992
3010
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -2998,7 +3016,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
2998
3016
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
2999
3017
|
] : []
|
|
3000
3018
|
].join("\n");
|
|
3001
|
-
|
|
3019
|
+
_chunkQGKX2WBZjs.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
3002
3020
|
` });
|
|
3003
3021
|
}
|
|
3004
3022
|
function registerMonitorsCommands(program) {
|
|
@@ -3699,6 +3717,9 @@ ${MONITOR_FLEET_HELP_EPILOG}`
|
|
|
3699
3717
|
).option("--wait", "Wait for the current Fleet generation to converge").option("--timeout <duration>", "How long --wait may poll (default 10m)").option(
|
|
3700
3718
|
"--expected-generation <generation>",
|
|
3701
3719
|
"Optimistic generation fence"
|
|
3720
|
+
).option(
|
|
3721
|
+
"--commit-budget-ms <ms>",
|
|
3722
|
+
"How long one request may commit before the CLI re-sends to continue (default and maximum 240000)"
|
|
3702
3723
|
).option("--idempotency-key <key>", "Stable retry key")
|
|
3703
3724
|
).action(
|
|
3704
3725
|
monitorsAction(
|
|
@@ -3806,6 +3827,9 @@ Examples:
|
|
|
3806
3827
|
).option(
|
|
3807
3828
|
"--expected-generation <generation>",
|
|
3808
3829
|
"Refuse the write unless the fleet is at this generation"
|
|
3830
|
+
).option(
|
|
3831
|
+
"--commit-budget-ms <ms>",
|
|
3832
|
+
"How long one request may commit before the CLI re-sends to continue (default and maximum 240000)"
|
|
3809
3833
|
).option(
|
|
3810
3834
|
"--idempotency-key <key>",
|
|
3811
3835
|
"Stable retry key (generated and returned when omitted)"
|