deepline 0.3.551 → 0.3.552
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 +23 -0
- package/dist/bundling-sources/sdk/src/http-core.ts +6 -2
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +58 -29
- package/dist/bundling-sources/shared_libs/monitors/package.json +2 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +80 -13
- package/dist/bundling-sources/shared_libs/monitors/tamradar-countries.ts +285 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +144 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +137 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +14 -2
- package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +20 -16
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +47 -14
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +48 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +32 -10
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +37 -7
- package/dist/cli/{auth-E7BH4GMJ.mjs → auth-KVSBJZOX.mjs} +5 -5
- package/dist/cli/auth-MMNVWATX.js +43 -0
- package/dist/cli/{billing-OXKU462W.mjs → billing-54RHFEBI.mjs} +19 -12
- package/dist/cli/{billing-DNQAZGX7.js → billing-FQREA7UA.js} +105 -98
- package/dist/cli/{chunk-5VVSEU67.js → chunk-3FD5EQ62.js} +6 -6
- package/dist/cli/{chunk-WKBHUB6R.js → chunk-45PVGZST.js} +99 -99
- package/dist/cli/{chunk-COGREZAO.js → chunk-4MK42735.js} +44 -44
- package/dist/cli/{chunk-T2B5BVZE.js → chunk-4NQF6KJ3.js} +13 -13
- package/dist/cli/{chunk-V6SCP4B7.mjs → chunk-4TALT2M3.mjs} +1 -1
- package/dist/cli/{chunk-C4CUZH57.js → chunk-4UUR4TCH.js} +2 -2
- package/dist/cli/{chunk-PM7MO62Y.mjs → chunk-57VZVF5D.mjs} +3 -3
- package/dist/cli/{chunk-VTGG2RT3.js → chunk-634ZDA3F.js} +1 -1
- package/dist/cli/{chunk-E64HFB4L.mjs → chunk-6O5HOODW.mjs} +11 -11
- package/dist/cli/{chunk-GGB3JYCW.mjs → chunk-6PRW5UBA.mjs} +2 -2
- package/dist/cli/{chunk-GVYLCCKN.mjs → chunk-6RZOWL2V.mjs} +1 -1
- package/dist/cli/{chunk-POLUE7D5.js → chunk-6YCA5NKJ.js} +7 -7
- package/dist/cli/{chunk-5LUF4LAR.mjs → chunk-6ZORHRKB.mjs} +1 -0
- package/dist/cli/{chunk-PPSDCN6C.js → chunk-77AAAGVB.js} +2 -2
- package/dist/cli/{chunk-UDXULACQ.js → chunk-7IKQKKNX.js} +3 -3
- package/dist/cli/{chunk-2ZYRBMQM.js → chunk-ADRC5I3R.js} +22 -22
- package/dist/cli/{chunk-2UXDHFSF.mjs → chunk-AQWQ2BFX.mjs} +1 -1
- package/dist/cli/{chunk-D6M5HFBB.mjs → chunk-AWJPDPMA.mjs} +1 -1
- package/dist/cli/{chunk-CLRAANWH.mjs → chunk-AZQ264ID.mjs} +1 -1
- package/dist/cli/{chunk-NMWGZD6Y.js → chunk-BAIST2BR.js} +26 -26
- package/dist/cli/{chunk-5S6PHKRV.mjs → chunk-DJ2JDK4O.mjs} +1 -1
- package/dist/cli/{chunk-MNSTCJMX.mjs → chunk-EOPEYCY7.mjs} +3 -3
- package/dist/cli/{chunk-HEHVGEZV.mjs → chunk-EUPVF4SU.mjs} +5 -5
- package/dist/cli/{chunk-3G6QZACZ.js → chunk-F2LH7TGF.js} +15 -15
- package/dist/cli/{chunk-BIIJATTX.mjs → chunk-FTJLJCE5.mjs} +1 -1
- package/dist/cli/{chunk-XYE5XPGF.js → chunk-G4O75EXF.js} +9 -9
- package/dist/cli/{chunk-Z2FIOG3V.js → chunk-GKYAYLRI.js} +12 -12
- package/dist/cli/{chunk-3KYBDAR3.js → chunk-HO3XK3R7.js} +5 -5
- package/dist/cli/{chunk-FOTGUFVK.mjs → chunk-HYC4MKGK.mjs} +2 -2
- package/dist/cli/{chunk-44I675YK.js → chunk-IDVVIXPJ.js} +41 -41
- package/dist/cli/{chunk-ZCDKE4UH.js → chunk-IHRKLXZN.js} +5 -5
- package/dist/cli/{chunk-6PWJKMFQ.mjs → chunk-IYSTRCLX.mjs} +4 -4
- package/dist/cli/{chunk-CQ6JYQSW.js → chunk-JWUAX6OP.js} +10 -10
- package/dist/cli/{chunk-W2ZWQUHT.js → chunk-MF2GHZDO.js} +2 -2
- package/dist/cli/{chunk-LPJPCGT3.js → chunk-PFO3ISXA.js} +26 -15
- package/dist/cli/{chunk-W425ERWN.mjs → chunk-PTVD2GVQ.mjs} +5 -5
- package/dist/cli/{chunk-5IL7SC45.mjs → chunk-QAORXEY3.mjs} +2 -2
- package/dist/cli/{chunk-RE5MJBEV.mjs → chunk-QILKGXYF.mjs} +2 -2
- package/dist/cli/{chunk-VWLHRZFG.mjs → chunk-QPKH23EC.mjs} +4 -4
- package/dist/cli/{chunk-7DOQ3OEX.mjs → chunk-QX7LFGJR.mjs} +1 -1
- package/dist/cli/{chunk-3T65J5RG.mjs → chunk-QY3ZNU6Z.mjs} +2 -2
- package/dist/cli/{chunk-PACD5DGC.js → chunk-RBEUVDZF.js} +10 -6
- package/dist/cli/{chunk-4OMAGJ6U.js → chunk-RQZQVFCJ.js} +2 -2
- package/dist/cli/{chunk-MR5LTVHD.js → chunk-S46HWQKO.js} +53 -53
- package/dist/cli/{chunk-44KSACJW.mjs → chunk-S5S355UY.mjs} +2 -2
- package/dist/cli/{chunk-QM6Y6S4E.js → chunk-SHLFOPD6.js} +5 -5
- package/dist/cli/{chunk-MXGA6JFI.mjs → chunk-U7QRMBIY.mjs} +2 -2
- package/dist/cli/{chunk-R7J7CJPZ.js → chunk-V436Z54K.js} +1 -0
- package/dist/cli/{chunk-ZDQFBJPO.js → chunk-VQALXEXO.js} +19 -19
- package/dist/cli/{chunk-7WQNWJQW.mjs → chunk-WE5HES3H.mjs} +5 -5
- package/dist/cli/{chunk-54EEYLTF.js → chunk-WLN3SUIA.js} +3 -3
- package/dist/cli/{chunk-7RSIFA72.js → chunk-XVB7V4N7.js} +16 -16
- package/dist/cli/{chunk-I4VKGNAQ.mjs → chunk-YJHE3O5M.mjs} +5 -5
- package/dist/cli/{chunk-4D3WIZST.mjs → chunk-YLTMXJFC.mjs} +7 -3
- package/dist/cli/{chunk-ZMNGZ6XS.mjs → chunk-Z5TSLLOW.mjs} +19 -8
- package/dist/cli/{chunk-S7IZWGUA.mjs → chunk-ZIAXDBXX.mjs} +2 -2
- package/dist/cli/command-docs.js +3 -3
- package/dist/cli/command-docs.mjs +2 -2
- package/dist/cli/concurrent-runs-help-FQAIHKKC.js +21 -0
- package/dist/cli/{concurrent-runs-help-C6L6I5OR.mjs → concurrent-runs-help-Q4KPAUJX.mjs} +6 -6
- package/dist/cli/{csv-SYSDXFEM.mjs → csv-2PTVDNO6.mjs} +4 -4
- package/dist/cli/{csv-QMF4FWE7.js → csv-F5VAGX4K.js} +13 -13
- package/dist/cli/{db-Q7HURWRZ.mjs → db-IEDXAUF7.mjs} +6 -6
- package/dist/cli/{db-YSHPPA4H.js → db-Z3OIUFMM.js} +27 -27
- package/dist/cli/{describe-YGMQBV44.mjs → describe-QDANCTS3.mjs} +18 -18
- package/dist/cli/describe-VUTT5ZKU.js +50 -0
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-MWBC5TAW.js → executions-H6H5655J.js} +8 -8
- package/dist/cli/{executions-G7U3VUXN.mjs → executions-R3LP74QN.mjs} +6 -6
- package/dist/cli/{feedback-SD55OY6H.js → feedback-VFOUR66B.js} +14 -14
- package/dist/cli/{feedback-GMHIFLBJ.mjs → feedback-WL3MRVT5.mjs} +6 -6
- package/dist/cli/git-ETB3GH3K.js +25 -0
- package/dist/cli/{git-HPE45OPD.mjs → git-YX2J4GCI.mjs} +5 -5
- package/dist/cli/index.js +147 -147
- package/dist/cli/index.mjs +46 -46
- package/dist/cli/{integrations-2W4MGIQR.mjs → integrations-5ZK5KLVP.mjs} +7 -7
- package/dist/cli/{integrations-HFKVBY6G.js → integrations-E2JZYKHS.js} +15 -15
- package/dist/cli/{legacy-noops-SXVNDEXN.js → legacy-noops-3VW4IJTH.js} +9 -9
- package/dist/cli/{legacy-noops-GZYKNU2Z.mjs → legacy-noops-SMN3GSXY.mjs} +6 -6
- package/dist/cli/{mcp-PJRHQHHU.js → mcp-UQV2K4EW.js} +24 -24
- package/dist/cli/{mcp-BWA6KULG.mjs → mcp-V6MGCYAG.mjs} +4 -4
- package/dist/cli/{monitors-SYQKCATO.mjs → monitors-GGKS5W6M.mjs} +7 -7
- package/dist/cli/{monitors-K2WSI6CR.js → monitors-R3BBDCRC.js} +100 -100
- package/dist/cli/{org-YQ2CR32B.js → org-GRYVMNSW.js} +88 -88
- package/dist/cli/{org-5KD7X7IA.mjs → org-Z37NGJV4.mjs} +6 -6
- package/dist/cli/{play-SZXY2F2S.js → play-2MVO27VO.js} +319 -319
- package/dist/cli/{play-TTMABJEI.mjs → play-MDWPR4XG.mjs} +18 -18
- package/dist/cli/{providers-YDHCTZAF.js → providers-2AACRUZH.js} +9 -9
- package/dist/cli/{providers-GQIOMRQO.mjs → providers-AKDYFZJZ.mjs} +6 -6
- package/dist/cli/{quickstart-BNYOXQXG.js → quickstart-H6IV3PV3.js} +6 -6
- package/dist/cli/{quickstart-PHSSMKCA.mjs → quickstart-QDGRJFZY.mjs} +4 -4
- package/dist/cli/{run-GFIAZXVL.js → run-2634REDK.js} +43 -43
- package/dist/cli/{run-74C3C75C.mjs → run-RTSQNGRD.mjs} +23 -23
- package/dist/cli/{search-3SWUB7KX.mjs → search-6AOJ4XPP.mjs} +7 -7
- package/dist/cli/search-VTW2YNBS.js +32 -0
- package/dist/cli/{search-output-K2SWHVHQ.mjs → search-output-6ADMTOU5.mjs} +4 -4
- package/dist/cli/{search-output-6JF3S4TP.js → search-output-S5ODBL5E.js} +6 -6
- package/dist/cli/{secrets-2SAKLH2H.js → secrets-LHCIIHMT.js} +15 -15
- package/dist/cli/{secrets-2M4XWEKE.mjs → secrets-TFIFBFB3.mjs} +6 -6
- package/dist/cli/sessions-CJ4FJ2WB.js +22 -0
- package/dist/cli/{sessions-A64BCXTO.mjs → sessions-WHBVUHVW.mjs} +6 -6
- package/dist/cli/{settings-HV64WIJF.js → settings-CP4FVK2W.js} +85 -85
- package/dist/cli/{settings-SVGEC3FI.mjs → settings-EBONWL5C.mjs} +12 -12
- package/dist/cli/{setup-EDC3NEJ3.mjs → setup-I5AZE3IU.mjs} +9 -9
- package/dist/cli/{setup-FHXOLQGQ.js → setup-LFGHTNLQ.js} +49 -49
- package/dist/cli/skills-R7EBXREW.js +36 -0
- package/dist/cli/{skills-3HGHZMXB.mjs → skills-W76AO5XE.mjs} +7 -7
- package/dist/cli/{tools-P2QS6A6Q.mjs → tools-7IJHGF6W.mjs} +17 -17
- package/dist/cli/tools-V7U2BDXM.js +57 -0
- package/dist/cli/update-4COPZETK.js +34 -0
- package/dist/cli/{update-552BYQM4.mjs → update-GFOPZTHY.mjs} +9 -9
- package/dist/cli/{views-PA25NAE3.js → views-BPL2TQJ4.js} +21 -21
- package/dist/cli/{views-LD5HXJYY.mjs → views-D4NX4SBG.mjs} +6 -6
- package/dist/cli/{workflow-LDYFGBYP.mjs → workflow-YXP42FUI.mjs} +7 -7
- package/dist/cli/{workflow-FIDBUQV6.js → workflow-ZYNAUCKC.js} +17 -17
- package/dist/{client-t9HZAkFD.d.ts → client-Bf3IpUKN.d.ts} +1 -1
- package/dist/{client-DuDFiJDU.d.mts → client-CyXGrO4D.d.mts} +1 -1
- package/dist/{client-core-CJRzLanv.d.ts → client-core-BWd0lX0Z.d.ts} +17 -0
- package/dist/{client-core-DydMQOft.d.mts → client-core-BxsLnXlm.d.mts} +17 -0
- 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 +119 -118
- 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-B4PI7GVY.js +0 -43
- package/dist/cli/concurrent-runs-help-JEFQZTJI.js +0 -21
- package/dist/cli/describe-PXTSBJTL.js +0 -50
- package/dist/cli/git-I3JV7IGH.js +0 -25
- package/dist/cli/search-2RRRF4LW.js +0 -32
- package/dist/cli/sessions-SBH27JNW.js +0 -22
- package/dist/cli/skills-Y3SRLOYD.js +0 -36
- package/dist/cli/tools-OFYPUPUV.js +0 -57
- package/dist/cli/update-SOUSCLB7.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 _chunkSHLFOPD6js = require('./chunk-SHLFOPD6.js');
|
|
5
|
+
require('./chunk-PFO3ISXA.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 _chunkWLN3SUIAjs = require('./chunk-WLN3SUIA.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
28
|
-
require('./chunk-
|
|
29
|
-
require('./chunk-
|
|
27
|
+
var _chunkVQALXEXOjs = require('./chunk-VQALXEXO.js');
|
|
28
|
+
require('./chunk-7IKQKKNX.js');
|
|
29
|
+
require('./chunk-RBEUVDZF.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-634ZDA3F.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 = _chunkVQALXEXOjs.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
116
116
|
if (wantsJson) {
|
|
117
|
-
const payload =
|
|
118
|
-
|
|
117
|
+
const payload = _chunkVQALXEXOjs.errorToJsonPayload.call(void 0, error);
|
|
118
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.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
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.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
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.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
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.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
|
+
_chunkVQALXEXOjs.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
|
+
_chunkVQALXEXOjs.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
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.DeeplineClient)().monitors.check(
|
|
875
875
|
body
|
|
876
876
|
);
|
|
877
|
-
|
|
877
|
+
_chunkVQALXEXOjs.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 = _chunkVQALXEXOjs.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 = _chunkWLN3SUIAjs.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, _chunkSHLFOPD6js.DeeplineClient)().monitors.preview(
|
|
946
946
|
body,
|
|
947
947
|
{ idempotencyKey, ...limit === void 0 ? {} : { limit } }
|
|
948
948
|
);
|
|
949
949
|
progress.complete();
|
|
950
|
-
|
|
950
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.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
|
+
_chunkVQALXEXOjs.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
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.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
|
+
_chunkVQALXEXOjs.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
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.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
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.DeeplineClient)().monitors.batch.deploy(
|
|
1137
1137
|
lint.normalized.monitors,
|
|
1138
1138
|
{ idempotencyKey }
|
|
1139
1139
|
);
|
|
1140
|
-
|
|
1140
|
+
_chunkVQALXEXOjs.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
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.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
|
+
_chunkVQALXEXOjs.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
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
1222
1222
|
idempotencyKey
|
|
1223
1223
|
});
|
|
1224
|
-
|
|
1224
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.DeeplineClient)().monitors.batches.get(batchId);
|
|
1231
|
+
_chunkVQALXEXOjs.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
|
+
_chunkVQALXEXOjs.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
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1278
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1285
1285
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1286
1286
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1287
1287
|
});
|
|
1288
|
-
|
|
1288
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1296
1296
|
...limit === void 0 ? {} : { limit }
|
|
1297
1297
|
});
|
|
1298
|
-
|
|
1298
|
+
_chunkVQALXEXOjs.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, _chunkSHLFOPD6js.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1302
|
+
_chunkVQALXEXOjs.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
|
+
_chunkVQALXEXOjs.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
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
|
|
1779
1779
|
{ schemaVersion: 2, file, definition, next },
|
|
1780
1780
|
{
|
|
1781
1781
|
json: options.json,
|
|
@@ -1841,7 +1841,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1841
1841
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1842
1842
|
);
|
|
1843
1843
|
}
|
|
1844
|
-
const client = new (0,
|
|
1844
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
1845
1845
|
const payload = await client.monitors.fleets.sync(
|
|
1846
1846
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1847
1847
|
{
|
|
@@ -1879,7 +1879,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1879
1879
|
}
|
|
1880
1880
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1881
1881
|
if (!options.wait || options.dryRun) {
|
|
1882
|
-
|
|
1882
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1883
1883
|
json: options.json,
|
|
1884
1884
|
text: renderFleetSync(payload, {
|
|
1885
1885
|
fleetId,
|
|
@@ -1905,7 +1905,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1905
1905
|
const status = fleetStatus(final);
|
|
1906
1906
|
const summary = renderFleetGet(final);
|
|
1907
1907
|
if (status === "converged") {
|
|
1908
|
-
|
|
1908
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1909
1909
|
return;
|
|
1910
1910
|
}
|
|
1911
1911
|
if (status === "billing_suspended") {
|
|
@@ -1967,14 +1967,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1967
1967
|
`
|
|
1968
1968
|
);
|
|
1969
1969
|
}
|
|
1970
|
-
const client = new (0,
|
|
1970
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
1971
1971
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1972
1972
|
...options.drift ? { drift: true } : {},
|
|
1973
1973
|
...limit !== void 0 ? { limit } : {}
|
|
1974
1974
|
});
|
|
1975
1975
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1976
1976
|
if (!options.check) {
|
|
1977
|
-
|
|
1977
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1978
1978
|
return;
|
|
1979
1979
|
}
|
|
1980
1980
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -1982,7 +1982,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1982
1982
|
);
|
|
1983
1983
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
1984
1984
|
if (unconverged.length === 0) {
|
|
1985
|
-
|
|
1985
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1986
1986
|
return;
|
|
1987
1987
|
}
|
|
1988
1988
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -2147,7 +2147,7 @@ function renderFleetIssuePage(payload) {
|
|
|
2147
2147
|
}
|
|
2148
2148
|
async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
2149
2149
|
const window = fleetChoice(options.window, LEDGER_WINDOWS, "--window");
|
|
2150
|
-
const client = new (0,
|
|
2150
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
2151
2151
|
if (fleetId) {
|
|
2152
2152
|
const listOnly = [
|
|
2153
2153
|
options.q !== void 0 ? "--q" : "",
|
|
@@ -2162,7 +2162,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2162
2162
|
const payload2 = await client.monitors.fleets.overview(fleetId, {
|
|
2163
2163
|
...window ? { window } : {}
|
|
2164
2164
|
});
|
|
2165
|
-
|
|
2165
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2166
2166
|
json: options.json,
|
|
2167
2167
|
text: renderFleetOverviewDetail(payload2, window)
|
|
2168
2168
|
});
|
|
@@ -2178,7 +2178,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2178
2178
|
...sort ? { sort } : {},
|
|
2179
2179
|
...window ? { window } : {}
|
|
2180
2180
|
});
|
|
2181
|
-
|
|
2181
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, payload, {
|
|
2182
2182
|
json: options.json,
|
|
2183
2183
|
text: renderFleetOverviewList(payload)
|
|
2184
2184
|
});
|
|
@@ -2189,13 +2189,13 @@ async function handleMonitorFleetsIssues(fleetId, options) {
|
|
|
2189
2189
|
if (limit !== void 0 && (limit < 1 || limit > 100)) {
|
|
2190
2190
|
throw new MonitorsUsageError("--limit must be an integer from 1 to 100.");
|
|
2191
2191
|
}
|
|
2192
|
-
const payload = await new (0,
|
|
2192
|
+
const payload = await new (0, _chunkSHLFOPD6js.DeeplineClient)().monitors.fleets.issues(fleetId, {
|
|
2193
2193
|
...group ? { group } : {},
|
|
2194
2194
|
...options.cause ? { cause: options.cause } : {},
|
|
2195
2195
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
2196
2196
|
...limit !== void 0 ? { limit } : {}
|
|
2197
2197
|
});
|
|
2198
|
-
|
|
2198
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, payload, {
|
|
2199
2199
|
json: options.json,
|
|
2200
2200
|
text: renderFleetIssuePage(payload)
|
|
2201
2201
|
});
|
|
@@ -2224,13 +2224,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2224
2224
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
2225
2225
|
);
|
|
2226
2226
|
}
|
|
2227
|
-
const client = new (0,
|
|
2227
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
2228
2228
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
2229
2229
|
idempotencyKey
|
|
2230
2230
|
});
|
|
2231
2231
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2232
2232
|
if (!options.wait) {
|
|
2233
|
-
|
|
2233
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2234
2234
|
json: options.json,
|
|
2235
2235
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
2236
2236
|
idempotency key ${idempotencyKey}
|
|
@@ -2253,7 +2253,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2253
2253
|
const envelope = { ...accepted, ...final };
|
|
2254
2254
|
const text = renderFleetGet(final);
|
|
2255
2255
|
if (fleetStatus(final) === "converged") {
|
|
2256
|
-
|
|
2256
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
2257
2257
|
return;
|
|
2258
2258
|
}
|
|
2259
2259
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2302,7 +2302,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
2302
2302
|
}
|
|
2303
2303
|
}
|
|
2304
2304
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
2305
|
-
const client = new (0,
|
|
2305
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
2306
2306
|
if (options.dryRun) {
|
|
2307
2307
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
2308
2308
|
dryRun: true,
|
|
@@ -2312,7 +2312,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
2312
2312
|
command: "deepline monitors fleets deactivate",
|
|
2313
2313
|
mutation: "fleet deactivate"
|
|
2314
2314
|
});
|
|
2315
|
-
|
|
2315
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, plan, {
|
|
2316
2316
|
json: options.json,
|
|
2317
2317
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
2318
2318
|
});
|
|
@@ -2350,7 +2350,7 @@ Preview the blast radius first:
|
|
|
2350
2350
|
});
|
|
2351
2351
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2352
2352
|
if (payload.already === true) {
|
|
2353
|
-
|
|
2353
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2354
2354
|
json: options.json,
|
|
2355
2355
|
text: `Fleet ${fleetId} is already deactivated.
|
|
2356
2356
|
`
|
|
@@ -2362,7 +2362,7 @@ Preview the blast radius first:
|
|
|
2362
2362
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
2363
2363
|
` : "");
|
|
2364
2364
|
if (!options.wait) {
|
|
2365
|
-
|
|
2365
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2366
2366
|
json: options.json,
|
|
2367
2367
|
text: acceptedText
|
|
2368
2368
|
});
|
|
@@ -2384,7 +2384,7 @@ Preview the blast radius first:
|
|
|
2384
2384
|
const envelope = { ...accepted, ...final };
|
|
2385
2385
|
const summary = renderFleetGet(final);
|
|
2386
2386
|
if (fleetStatus(final) === "deactivated") {
|
|
2387
|
-
|
|
2387
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
2388
2388
|
return;
|
|
2389
2389
|
}
|
|
2390
2390
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2423,7 +2423,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
2423
2423
|
"Agent notes:",
|
|
2424
2424
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
2425
2425
|
];
|
|
2426
|
-
|
|
2426
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
|
|
2427
2427
|
{
|
|
2428
2428
|
schemaVersion: 1,
|
|
2429
2429
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2585,7 +2585,7 @@ function renderMonitorGet(payload) {
|
|
|
2585
2585
|
`;
|
|
2586
2586
|
}
|
|
2587
2587
|
async function handleMonitorsGet(key, options) {
|
|
2588
|
-
const client = new (0,
|
|
2588
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
2589
2589
|
const payload = await client.monitors.get(key);
|
|
2590
2590
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2591
2591
|
const dependents = boundPlays ? {
|
|
@@ -2593,24 +2593,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2593
2593
|
truncated: payload.consumer_health_truncated === true
|
|
2594
2594
|
} : await client.monitors.dependents(key);
|
|
2595
2595
|
const detail = { ...payload, dependents };
|
|
2596
|
-
|
|
2596
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, detail, {
|
|
2597
2597
|
json: options.json,
|
|
2598
2598
|
text: renderMonitorGet(detail)
|
|
2599
2599
|
});
|
|
2600
2600
|
}
|
|
2601
2601
|
async function handleMonitorsTest(key, payload, options) {
|
|
2602
2602
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2603
|
-
const result = await new (0,
|
|
2603
|
+
const result = await new (0, _chunkSHLFOPD6js.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2604
2604
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2605
2605
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2606
2606
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2607
2607
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2608
2608
|
`;
|
|
2609
|
-
|
|
2609
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2610
2610
|
}
|
|
2611
2611
|
async function handleMonitorsValidate(key, options) {
|
|
2612
|
-
const result = await new (0,
|
|
2613
|
-
|
|
2612
|
+
const result = await new (0, _chunkSHLFOPD6js.DeeplineClient)().monitors.validate(key);
|
|
2613
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2614
2614
|
if (result.valid === false) process.exitCode = 7;
|
|
2615
2615
|
}
|
|
2616
2616
|
async function confirmMonitorDelete(key) {
|
|
@@ -2628,14 +2628,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2628
2628
|
}
|
|
2629
2629
|
}
|
|
2630
2630
|
async function handleMonitorsDelete(key, options) {
|
|
2631
|
-
const client = new (0,
|
|
2631
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
2632
2632
|
if (options.dryRun) {
|
|
2633
2633
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2634
2634
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2635
2635
|
command: "deepline monitors delete",
|
|
2636
2636
|
mutation: "delete"
|
|
2637
2637
|
});
|
|
2638
|
-
|
|
2638
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2639
2639
|
json: options.json,
|
|
2640
2640
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2641
2641
|
});
|
|
@@ -2655,7 +2655,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2655
2655
|
}
|
|
2656
2656
|
}
|
|
2657
2657
|
const payload = await client.monitors.delete(key);
|
|
2658
|
-
|
|
2658
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2659
2659
|
}
|
|
2660
2660
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2661
2661
|
const body = resolveMonitorJsonBody({
|
|
@@ -2664,25 +2664,25 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2664
2664
|
argLabel: "<patch>",
|
|
2665
2665
|
command: `deepline monitors update ${key}`
|
|
2666
2666
|
});
|
|
2667
|
-
const payload = await new (0,
|
|
2668
|
-
|
|
2667
|
+
const payload = await new (0, _chunkSHLFOPD6js.DeeplineClient)().monitors.update(key, body);
|
|
2668
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2669
2669
|
}
|
|
2670
2670
|
async function handleMonitorsReactivate(key, options) {
|
|
2671
|
-
const client = new (0,
|
|
2671
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
2672
2672
|
if (options.dryRun) {
|
|
2673
2673
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2674
2674
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2675
2675
|
command: "deepline monitors reactivate",
|
|
2676
2676
|
mutation: "reactivate"
|
|
2677
2677
|
});
|
|
2678
|
-
|
|
2678
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2679
2679
|
json: options.json,
|
|
2680
2680
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2681
2681
|
});
|
|
2682
2682
|
return;
|
|
2683
2683
|
}
|
|
2684
2684
|
const payload = await client.monitors.reactivate(key);
|
|
2685
|
-
|
|
2685
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2686
2686
|
}
|
|
2687
2687
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2688
2688
|
function monitorHealthLine(health) {
|
|
@@ -2815,7 +2815,7 @@ function monitorHealthText(health) {
|
|
|
2815
2815
|
`;
|
|
2816
2816
|
}
|
|
2817
2817
|
async function handleMonitorsAudit(options) {
|
|
2818
|
-
const client = new (0,
|
|
2818
|
+
const client = new (0, _chunkSHLFOPD6js.DeeplineClient)();
|
|
2819
2819
|
const fleetId = _optionalChain([options, 'access', _106 => _106.fleet, 'optionalAccess', _107 => _107.trim, 'call', _108 => _108()]) || void 0;
|
|
2820
2820
|
const scope = fleetId ? { fleetId } : {};
|
|
2821
2821
|
let result = await client.monitors.audit(scope);
|
|
@@ -2859,7 +2859,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2859
2859
|
"",
|
|
2860
2860
|
monitorHealthText(health)
|
|
2861
2861
|
].join("\n");
|
|
2862
|
-
|
|
2862
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
|
|
2863
2863
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2864
2864
|
{ json: options.json, text }
|
|
2865
2865
|
);
|
|
@@ -2872,10 +2872,10 @@ async function handleMonitorsRepair(options) {
|
|
|
2872
2872
|
}
|
|
2873
2873
|
async function handleMonitorsHealth(options) {
|
|
2874
2874
|
const fleetId = _optionalChain([options, 'access', _112 => _112.fleet, 'optionalAccess', _113 => _113.trim, 'call', _114 => _114()]) || void 0;
|
|
2875
|
-
const health = await new (0,
|
|
2875
|
+
const health = await new (0, _chunkSHLFOPD6js.DeeplineClient)().monitors.health(
|
|
2876
2876
|
fleetId ? { fleetId } : {}
|
|
2877
2877
|
);
|
|
2878
|
-
|
|
2878
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, health, {
|
|
2879
2879
|
json: options.json,
|
|
2880
2880
|
text: monitorHealthText(health)
|
|
2881
2881
|
});
|
|
@@ -2949,14 +2949,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2949
2949
|
"deploy",
|
|
2950
2950
|
options.idempotencyKey
|
|
2951
2951
|
);
|
|
2952
|
-
const result = await new (0,
|
|
2952
|
+
const result = await new (0, _chunkSHLFOPD6js.DeeplineClient)().monitors.batch.submit({
|
|
2953
2953
|
kind: "deploy",
|
|
2954
2954
|
manifestNdjson,
|
|
2955
2955
|
dryRun: options.dryRun === true,
|
|
2956
2956
|
idempotencyKey
|
|
2957
2957
|
});
|
|
2958
2958
|
const operation = result.operation;
|
|
2959
|
-
|
|
2959
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
|
|
2960
2960
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2961
2961
|
{
|
|
2962
2962
|
json: options.json,
|
|
@@ -2984,7 +2984,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2984
2984
|
kind,
|
|
2985
2985
|
options.idempotencyKey
|
|
2986
2986
|
);
|
|
2987
|
-
const result = await new (0,
|
|
2987
|
+
const result = await new (0, _chunkSHLFOPD6js.DeeplineClient)().monitors.batch.submit({
|
|
2988
2988
|
kind,
|
|
2989
2989
|
scope,
|
|
2990
2990
|
dryRun: options.dryRun === true,
|
|
@@ -2997,14 +2997,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2997
2997
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
2998
2998
|
`inspect: deepline monitors batch get ${operation.runId}`
|
|
2999
2999
|
].join("\n");
|
|
3000
|
-
|
|
3000
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0,
|
|
3001
3001
|
{ ...result, idempotency_key: idempotencyKey },
|
|
3002
3002
|
{ json: options.json, text: `${text}
|
|
3003
3003
|
` }
|
|
3004
3004
|
);
|
|
3005
3005
|
}
|
|
3006
3006
|
async function handleMonitorBatchGet(operationId, options) {
|
|
3007
|
-
const result = await new (0,
|
|
3007
|
+
const result = await new (0, _chunkSHLFOPD6js.DeeplineClient)().monitors.batch.get(operationId, {
|
|
3008
3008
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
3009
3009
|
});
|
|
3010
3010
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -3016,7 +3016,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
3016
3016
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
3017
3017
|
] : []
|
|
3018
3018
|
].join("\n");
|
|
3019
|
-
|
|
3019
|
+
_chunkVQALXEXOjs.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
3020
3020
|
` });
|
|
3021
3021
|
}
|
|
3022
3022
|
function registerMonitorsCommands(program) {
|