deepline 0.3.581 → 0.3.583
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +4 -4
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +14 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +53 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +14 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +69 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +33 -4
- package/dist/cli/{agents-VDQSVDSM.mjs → agents-G344SPW2.mjs} +68 -4
- package/dist/cli/{agents-UDTRMWPA.js → agents-ZPDXVPEE.js} +95 -31
- package/dist/cli/{auth-SRN5FXUQ.mjs → auth-V66RP2A6.mjs} +5 -5
- package/dist/cli/auth-VU6VIPVY.js +44 -0
- package/dist/cli/{billing-PR2SIEJM.mjs → billing-BTMGZJCR.mjs} +9 -9
- package/dist/cli/{billing-HGHIOFSA.js → billing-ROYUQF67.js} +105 -105
- package/dist/cli/{chunk-7VOSQARZ.js → chunk-23LYXVI4.js} +6 -6
- package/dist/cli/{chunk-JQK42HZQ.js → chunk-2D5YISAL.js} +2 -2
- package/dist/cli/{chunk-RA3BWUTD.mjs → chunk-2QIVGZKS.mjs} +5 -5
- package/dist/cli/{chunk-WS5ZX4RB.mjs → chunk-43MKV6E4.mjs} +3 -3
- package/dist/cli/{chunk-5XVDZVCR.js → chunk-6GYGMWQV.js} +8 -8
- package/dist/cli/{chunk-KDITCSPN.mjs → chunk-6S3OAJCJ.mjs} +19 -0
- package/dist/cli/{chunk-EHTD65FE.mjs → chunk-72MEXMSH.mjs} +1 -1
- package/dist/cli/{chunk-CN4MXBZ3.js → chunk-73IZARR5.js} +13 -13
- package/dist/cli/{chunk-ULU4MEXN.mjs → chunk-7AFTLM74.mjs} +2 -2
- package/dist/cli/{chunk-VTPMBOHZ.mjs → chunk-ACS6BYE5.mjs} +2 -2
- package/dist/cli/{chunk-MSCYYFLY.js → chunk-AHQDUMDM.js} +20 -20
- package/dist/cli/{chunk-CDIMI54H.mjs → chunk-AXKFZIXC.mjs} +2 -2
- package/dist/cli/{chunk-2MIJMDGF.mjs → chunk-AXOQ2FMS.mjs} +1 -1
- package/dist/cli/{chunk-6U3THMRI.js → chunk-BUMCOVBP.js} +5 -5
- package/dist/cli/{chunk-ZTKLJADJ.mjs → chunk-C233ZRNX.mjs} +4 -4
- package/dist/cli/{chunk-INRXX4SX.js → chunk-C7UCDL2K.js} +41 -41
- package/dist/cli/{chunk-ZAKNDIK7.js → chunk-CCC3NIYB.js} +9 -9
- package/dist/cli/{chunk-N5VJVVVV.mjs → chunk-DNYFNOWG.mjs} +5 -5
- package/dist/cli/{chunk-VVENTTSA.mjs → chunk-EHV52KUV.mjs} +1 -1
- package/dist/cli/{chunk-WCNJSZHC.mjs → chunk-GFX6CDAB.mjs} +5 -5
- package/dist/cli/{chunk-J6ITN2X6.js → chunk-GQHZV7EQ.js} +7 -7
- package/dist/cli/{chunk-SNYH4QY2.js → chunk-H4BYWEV5.js} +4 -4
- package/dist/cli/{chunk-DZMQV5FL.mjs → chunk-H7F3ROT3.mjs} +2 -2
- package/dist/cli/{chunk-3FMGBMT3.mjs → chunk-HOGRT5X6.mjs} +1 -1
- package/dist/cli/{chunk-LJZESBNY.js → chunk-HYT5B2NL.js} +2 -2
- package/dist/cli/{chunk-INXRW5AF.mjs → chunk-J54DMFV5.mjs} +2 -2
- package/dist/cli/{chunk-OVJWDFIL.mjs → chunk-JQT3SHXL.mjs} +1 -1
- package/dist/cli/{chunk-46EBSUZF.mjs → chunk-K6GDSCFL.mjs} +3 -3
- package/dist/cli/{chunk-YTPXKG4C.mjs → chunk-KSXBLXLV.mjs} +1 -1
- package/dist/cli/{chunk-Y36SQMSN.js → chunk-LHD3HOYN.js} +19 -0
- package/dist/cli/{chunk-WVFDPC4K.mjs → chunk-LVJAHM2I.mjs} +3 -3
- package/dist/cli/{chunk-CNRPE3AE.js → chunk-MEAWK5G7.js} +53 -53
- package/dist/cli/{chunk-3LP7J63L.js → chunk-MFPHCUHK.js} +5 -5
- package/dist/cli/{chunk-ALXIC5U5.mjs → chunk-N5RCXI3M.mjs} +5 -5
- package/dist/cli/{chunk-E5ITZIWK.js → chunk-N5XRUZRS.js} +16 -16
- package/dist/cli/{chunk-BDNQDWGI.mjs → chunk-P2YNTAGL.mjs} +2 -2
- package/dist/cli/{chunk-E2EGQNOS.js → chunk-PGUK5VPC.js} +2 -2
- package/dist/cli/{chunk-VWPM4OIC.js → chunk-PULU5YGX.js} +20 -20
- package/dist/cli/{chunk-P5ZZY4RM.mjs → chunk-PVDP3AZY.mjs} +4 -4
- package/dist/cli/{chunk-PLGJG5FX.js → chunk-QGOHEJVJ.js} +5 -5
- package/dist/cli/{chunk-BQL34VOQ.js → chunk-QPN662ZP.js} +100 -100
- package/dist/cli/{chunk-KO6OLYSD.js → chunk-RO2LTLJA.js} +48 -48
- package/dist/cli/{chunk-VNW454PP.mjs → chunk-ROWROMXD.mjs} +1 -1
- package/dist/cli/{chunk-Z3MJX3PP.mjs → chunk-U6BTY4WS.mjs} +1 -1
- package/dist/cli/{chunk-FXSDDEAR.js → chunk-VH45GV3T.js} +1 -1
- package/dist/cli/{chunk-2RLMHWXW.js → chunk-VXDKL434.js} +3 -3
- package/dist/cli/{chunk-SZ76UE7C.mjs → chunk-VXEZKZU4.mjs} +11 -11
- package/dist/cli/{chunk-A4IOPFEJ.js → chunk-W3ECB7GC.js} +3 -3
- package/dist/cli/{chunk-E5O4CMHZ.mjs → chunk-W5WLWRKL.mjs} +2 -2
- package/dist/cli/{chunk-O5FIWG2O.js → chunk-WAZR72D5.js} +26 -26
- package/dist/cli/{chunk-VJR4CKYJ.js → chunk-WUVDJSZE.js} +23 -23
- package/dist/cli/{chunk-BULUFFST.js → chunk-YRNWA2IL.js} +15 -15
- package/dist/cli/{chunk-IT3F7P6O.js → chunk-ZFJNIZHI.js} +10 -10
- package/dist/cli/{chunk-3I6GA5QW.mjs → chunk-ZHIJA4MW.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-6WUNDV77.js +22 -0
- package/dist/cli/{concurrent-runs-help-Z27MIIH3.mjs → concurrent-runs-help-A2Y33OQ5.mjs} +6 -6
- package/dist/cli/{csv-4YFTMVWQ.mjs → csv-PS74WVXE.mjs} +4 -4
- package/dist/cli/{csv-4TP36F5O.js → csv-TKSR2LFV.js} +13 -13
- package/dist/cli/{db-U5KR6SYI.mjs → db-EXLBRZ7K.mjs} +6 -6
- package/dist/cli/{db-L5EGGO72.js → db-R6GOM4VC.js} +27 -27
- package/dist/cli/describe-CA2FL2OS.js +50 -0
- package/dist/cli/{describe-LZXXSQ26.mjs → describe-JJBXFPVQ.mjs} +18 -18
- package/dist/cli/{executions-VZKRFDGM.js → executions-474U7R3Y.js} +8 -8
- package/dist/cli/{executions-ZWEC5DDR.mjs → executions-5PEODJQG.mjs} +6 -6
- package/dist/cli/{feedback-HXQTHXEZ.mjs → feedback-QUQVRDBD.mjs} +6 -6
- package/dist/cli/{feedback-BTJIJCQF.js → feedback-URTCAOXP.js} +14 -14
- package/dist/cli/{git-P6A45MMT.mjs → git-AQF23KKU.mjs} +5 -5
- package/dist/cli/git-WJ4V2B4T.js +26 -0
- package/dist/cli/index.js +148 -148
- package/dist/cli/index.mjs +47 -47
- package/dist/cli/{integrations-4POM2CJ3.mjs → integrations-5POBI72U.mjs} +7 -7
- package/dist/cli/{integrations-VSJQBRFS.js → integrations-NMFOOSS4.js} +29 -29
- package/dist/cli/{legacy-noops-I65MIKH2.mjs → legacy-noops-6YVCOSFO.mjs} +6 -6
- package/dist/cli/{legacy-noops-QOJGSGVO.js → legacy-noops-V75T5LHV.js} +9 -9
- package/dist/cli/{mcp-TGY6SRAC.mjs → mcp-7WEYQ5V7.mjs} +4 -4
- package/dist/cli/{mcp-WTKBSLSD.js → mcp-N6GYXCUQ.js} +24 -24
- package/dist/cli/{monitors-TLWVEXW6.js → monitors-HW4H4PE5.js} +100 -100
- package/dist/cli/{monitors-E2ENT4RY.mjs → monitors-TAK4M5Y4.mjs} +7 -7
- package/dist/cli/{org-J2LGW5ZR.mjs → org-3C2RN36N.mjs} +6 -6
- package/dist/cli/{org-PZPJJU7K.js → org-FULXOXNE.js} +121 -121
- package/dist/cli/{outcomes-TMJDASU5.mjs → outcomes-4KRZL6OL.mjs} +6 -6
- package/dist/cli/{outcomes-Z6ZNBJ3U.js → outcomes-O3HDQWGN.js} +14 -14
- package/dist/cli/{play-ZOOC57X4.js → play-HA4RGX7T.js} +336 -336
- package/dist/cli/{play-S3Z24HUS.mjs → play-ZTRWUODW.mjs} +19 -19
- package/dist/cli/{providers-O4Y2YBS7.js → providers-DXMKWBZN.js} +9 -9
- package/dist/cli/{providers-ETD6YLFL.mjs → providers-FAKWWJE2.mjs} +6 -6
- package/dist/cli/{quickstart-NZALIRBP.js → quickstart-MA74UPNI.js} +6 -6
- package/dist/cli/{quickstart-QZX32Y5T.mjs → quickstart-YWGBTW77.mjs} +4 -4
- package/dist/cli/{run-5UXSWJ7N.js → run-4DXSGXRB.js} +44 -44
- package/dist/cli/{run-HCVBRE2P.mjs → run-QHCYMSBP.mjs} +23 -23
- package/dist/cli/{search-Z247K76U.mjs → search-N4ZOK5XX.mjs} +7 -7
- package/dist/cli/search-V765JH2H.js +32 -0
- package/dist/cli/{search-output-XFKEGUJA.js → search-output-D5VAC52B.js} +6 -6
- package/dist/cli/{search-output-XCJI3XRA.mjs → search-output-F2OYLVK2.mjs} +4 -4
- package/dist/cli/{secrets-VUQLTUTM.js → secrets-3KETOTDS.js} +15 -15
- package/dist/cli/{secrets-7JZXHLRU.mjs → secrets-LD4FVAQI.mjs} +6 -6
- package/dist/cli/{sessions-UNGJ342N.mjs → sessions-LPLI4Z4O.mjs} +6 -6
- package/dist/cli/sessions-XC65OMDS.js +23 -0
- package/dist/cli/{settings-67TIT4MZ.mjs → settings-NCGPJG3Z.mjs} +12 -12
- package/dist/cli/{settings-WG5YNHC5.js → settings-NFBTCOMB.js} +85 -85
- package/dist/cli/{setup-IYUNW5ZP.js → setup-ATBSUSH4.js} +49 -49
- package/dist/cli/{setup-KMAAJOZM.mjs → setup-NH6MRYXZ.mjs} +9 -9
- package/dist/cli/skills-4NQBTGOL.js +37 -0
- package/dist/cli/{skills-UVS4DODN.mjs → skills-ITPBPIXD.mjs} +7 -7
- package/dist/cli/{tools-B42JY4BX.mjs → tools-2XZPR65V.mjs} +17 -17
- package/dist/cli/tools-ZVOFATX2.js +57 -0
- package/dist/cli/update-QME3KPOP.js +37 -0
- package/dist/cli/{update-EBYZZ7BW.mjs → update-VFB22FWO.mjs} +9 -9
- package/dist/cli/{views-QK3AFD2D.mjs → views-MRN3HWTG.mjs} +6 -6
- package/dist/cli/{views-DOUEKLEV.js → views-WJUZOQM2.js} +21 -21
- package/dist/cli/{workflow-UBJPGRKF.mjs → workflow-A6P7YV5W.mjs} +42 -18
- package/dist/cli/{workflow-TAKT2T7A.js → workflow-Q4JFBTVH.js} +53 -29
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +116 -116
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-UYQHRHYR.js +0 -44
- package/dist/cli/concurrent-runs-help-QWDTLZUX.js +0 -22
- package/dist/cli/describe-G3SUS76P.js +0 -50
- package/dist/cli/git-QU673DBV.js +0 -26
- package/dist/cli/search-T3SLR55O.js +0 -32
- package/dist/cli/sessions-GHW2H7N2.js +0 -23
- package/dist/cli/skills-JVLCEUBF.js +0 -37
- package/dist/cli/tools-ETA3BJNM.js +0 -57
- package/dist/cli/update-XZEBQCEY.js +0 -37
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2;require('./chunk-I5YZLGMG.js');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkMFPHCUHKjs = require('./chunk-MFPHCUHK.js');
|
|
5
|
+
require('./chunk-6GYGMWQV.js');
|
|
6
6
|
require('./chunk-4WAM6TLD.js');
|
|
7
7
|
require('./chunk-MJTVX4QK.js');
|
|
8
8
|
require('./chunk-PMH4GLMD.js');
|
|
@@ -17,15 +17,15 @@ require('./chunk-UNEMDKXN.js');
|
|
|
17
17
|
var _chunkU2LVWCTDjs = require('./chunk-U2LVWCTD.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkW3ECB7GCjs = require('./chunk-W3ECB7GC.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
require('./chunk-
|
|
28
|
-
require('./chunk-
|
|
26
|
+
var _chunkPULU5YGXjs = require('./chunk-PULU5YGX.js');
|
|
27
|
+
require('./chunk-VXDKL434.js');
|
|
28
|
+
require('./chunk-H4BYWEV5.js');
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
var _chunk6VLFQZK6js = require('./chunk-6VLFQZK6.js');
|
|
@@ -34,7 +34,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
34
34
|
|
|
35
35
|
var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.js');
|
|
36
36
|
require('./chunk-CFJFUVX2.js');
|
|
37
|
-
require('./chunk-
|
|
37
|
+
require('./chunk-VH45GV3T.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 = _chunkPULU5YGXjs.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
116
116
|
if (wantsJson) {
|
|
117
|
-
const payload =
|
|
118
|
-
|
|
117
|
+
const payload = _chunkPULU5YGXjs.errorToJsonPayload.call(void 0, error);
|
|
118
|
+
_chunkPULU5YGXjs.printJson.call(void 0, {
|
|
119
119
|
ok: false,
|
|
120
120
|
exitCode,
|
|
121
121
|
...next ? { next } : {},
|
|
@@ -537,14 +537,14 @@ Preview the plan first with:
|
|
|
537
537
|
);
|
|
538
538
|
}
|
|
539
539
|
async function handleMonitorsStatus(options) {
|
|
540
|
-
const payload = await new (0,
|
|
540
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.status();
|
|
541
541
|
const hasAccess = payload.has_access === true;
|
|
542
542
|
const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
|
|
543
543
|
const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
|
|
544
544
|
${reason}` : ""}
|
|
545
545
|
` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
|
|
546
546
|
`;
|
|
547
|
-
|
|
547
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
548
548
|
{ has_access: hasAccess, ...reason ? { reason } : {} },
|
|
549
549
|
{ json: options.json, text }
|
|
550
550
|
);
|
|
@@ -615,14 +615,14 @@ async function handleMonitorsAvailable(toolId, options, command) {
|
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
const tool = _nullishCoalesce(toolId, () => ( options.tool));
|
|
618
|
-
const payload = await new (0,
|
|
618
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.available(tool, {
|
|
619
619
|
...options.provider ? { provider: options.provider } : {},
|
|
620
620
|
...options.search ? { search: options.search } : {},
|
|
621
621
|
...options.limit ? { limit: options.limit } : {},
|
|
622
622
|
...options.full ? { full: true } : {},
|
|
623
623
|
...options.compact ? { compact: true } : {}
|
|
624
624
|
});
|
|
625
|
-
|
|
625
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, {
|
|
626
626
|
json: options.json,
|
|
627
627
|
// Human list view shows id + name + deployed_count ("deployed: N") so
|
|
628
628
|
// can-deploy vs already-deployed is visible in one view. Describing a
|
|
@@ -729,14 +729,14 @@ async function handleMonitorsList(options) {
|
|
|
729
729
|
"`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
|
|
730
730
|
);
|
|
731
731
|
}
|
|
732
|
-
const payload = await new (0,
|
|
732
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.list({
|
|
733
733
|
...state ? { state } : {},
|
|
734
734
|
...options.status ? { status: options.status } : {},
|
|
735
735
|
...options.limit ? { limit: options.limit } : {},
|
|
736
736
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
737
737
|
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
738
738
|
});
|
|
739
|
-
|
|
739
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, {
|
|
740
740
|
json: options.json,
|
|
741
741
|
text: renderDeployedListText(
|
|
742
742
|
payload,
|
|
@@ -837,7 +837,7 @@ function renderMonitorLedgerText(payload) {
|
|
|
837
837
|
var LEDGER_SORTS = ["recent", "installed", "name", "findings"];
|
|
838
838
|
var LEDGER_WINDOWS = ["1d", "7d", "30d", "90d", "1y"];
|
|
839
839
|
async function handleMonitorsLedger(key, options) {
|
|
840
|
-
const client = new (0,
|
|
840
|
+
const client = new (0, _chunkMFPHCUHKjs.DeeplineClient)();
|
|
841
841
|
if (options.findings) {
|
|
842
842
|
if (!key) {
|
|
843
843
|
throw new MonitorsUsageError(
|
|
@@ -847,12 +847,12 @@ async function handleMonitorsLedger(key, options) {
|
|
|
847
847
|
const payload2 = await client.monitors.ledgerFindings(key, {
|
|
848
848
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
849
849
|
});
|
|
850
|
-
|
|
850
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
851
851
|
return;
|
|
852
852
|
}
|
|
853
853
|
if (key) {
|
|
854
854
|
const payload2 = await client.monitors.ledgerGet(key);
|
|
855
|
-
|
|
855
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
856
856
|
return;
|
|
857
857
|
}
|
|
858
858
|
if (options.sort !== void 0 && !LEDGER_SORTS.includes(options.sort)) {
|
|
@@ -876,7 +876,7 @@ async function handleMonitorsLedger(key, options) {
|
|
|
876
876
|
...options.limit ? { limit: options.limit } : {},
|
|
877
877
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
878
878
|
});
|
|
879
|
-
|
|
879
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, {
|
|
880
880
|
json: options.json,
|
|
881
881
|
text: renderMonitorLedgerText(payload)
|
|
882
882
|
});
|
|
@@ -888,10 +888,10 @@ async function handleMonitorsCheck(definition, options) {
|
|
|
888
888
|
argLabel: "<definition>",
|
|
889
889
|
command: "deepline monitors check"
|
|
890
890
|
});
|
|
891
|
-
const payload = await new (0,
|
|
891
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.check(
|
|
892
892
|
body
|
|
893
893
|
);
|
|
894
|
-
|
|
894
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
895
895
|
}
|
|
896
896
|
function previewText(value) {
|
|
897
897
|
return typeof value === "string" && value.trim() ? value.trim() : "-";
|
|
@@ -951,22 +951,22 @@ async function handleMonitorsPreview(definition, options) {
|
|
|
951
951
|
if (limit !== void 0 && !Number.isInteger(limit)) {
|
|
952
952
|
throw new MonitorsUsageError("--limit must be a whole number from 1 to 3.");
|
|
953
953
|
}
|
|
954
|
-
const wantsJson =
|
|
954
|
+
const wantsJson = _chunkPULU5YGXjs.shouldEmitJson.call(void 0, options.json);
|
|
955
955
|
if (options.idempotencyKey === void 0 && wantsJson) {
|
|
956
956
|
throw new MonitorsUsageError(
|
|
957
957
|
"--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."
|
|
958
958
|
);
|
|
959
959
|
}
|
|
960
960
|
const idempotencyKey = _nullishCoalesce(options.idempotencyKey, () => ( `monitor-preview-${_crypto.randomUUID.call(void 0, )}`));
|
|
961
|
-
const progress =
|
|
961
|
+
const progress = _chunkW3ECB7GCjs.createCliProgress.call(void 0, !wantsJson);
|
|
962
962
|
progress.phase(`Preview key: ${idempotencyKey}`);
|
|
963
963
|
try {
|
|
964
|
-
const payload = await new (0,
|
|
964
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.preview(
|
|
965
965
|
body,
|
|
966
966
|
{ idempotencyKey, ...limit === void 0 ? {} : { limit } }
|
|
967
967
|
);
|
|
968
968
|
progress.complete();
|
|
969
|
-
|
|
969
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, {
|
|
970
970
|
json: options.json,
|
|
971
971
|
text: renderMonitorPreviewText(payload)
|
|
972
972
|
});
|
|
@@ -1011,7 +1011,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
1011
1011
|
argLabel: "<definition>",
|
|
1012
1012
|
command: "deepline monitors deploy"
|
|
1013
1013
|
});
|
|
1014
|
-
const client = new (0,
|
|
1014
|
+
const client = new (0, _chunkMFPHCUHKjs.DeeplineClient)();
|
|
1015
1015
|
const definitionArg = body;
|
|
1016
1016
|
if (options.dryRun) {
|
|
1017
1017
|
const payload2 = await client.monitors.deploy(definitionArg, {
|
|
@@ -1019,7 +1019,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
1019
1019
|
});
|
|
1020
1020
|
const valid = payload2.valid !== false;
|
|
1021
1021
|
const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _42 => _42(payload2), 'optionalAccess', _43 => _43.identity_conflict]));
|
|
1022
|
-
|
|
1022
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
1023
1023
|
{ dry_run: true, ...payload2 },
|
|
1024
1024
|
{ json: options.json, text: renderMonitorDeployPlan(payload2) }
|
|
1025
1025
|
);
|
|
@@ -1029,7 +1029,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
1029
1029
|
return;
|
|
1030
1030
|
}
|
|
1031
1031
|
const payload = await client.monitors.deploy(definitionArg);
|
|
1032
|
-
|
|
1032
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, {
|
|
1033
1033
|
json: options.json,
|
|
1034
1034
|
text: renderMonitorDeployCompletion(payload)
|
|
1035
1035
|
});
|
|
@@ -1041,29 +1041,29 @@ async function handleMonitorsSync(definition, options) {
|
|
|
1041
1041
|
argLabel: "<definition>",
|
|
1042
1042
|
command: "deepline monitors sync"
|
|
1043
1043
|
});
|
|
1044
|
-
const payload = await new (0,
|
|
1044
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.sync(body, {
|
|
1045
1045
|
...options.dryRun ? { dryRun: true } : {},
|
|
1046
1046
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
|
|
1047
1047
|
});
|
|
1048
1048
|
if (options.dryRun) {
|
|
1049
1049
|
const plan = payload;
|
|
1050
|
-
|
|
1050
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
1051
1051
|
{ dry_run: true, ...plan },
|
|
1052
1052
|
{ json: options.json, text: renderMonitorDeployPlan(plan) }
|
|
1053
1053
|
);
|
|
1054
1054
|
return;
|
|
1055
1055
|
}
|
|
1056
|
-
|
|
1056
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, {
|
|
1057
1057
|
json: options.json,
|
|
1058
1058
|
text: renderMonitorJob(payload)
|
|
1059
1059
|
});
|
|
1060
1060
|
}
|
|
1061
1061
|
async function handleScalarMonitorLifecycle(action, key, options) {
|
|
1062
|
-
const payload = await new (0,
|
|
1062
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors[action](key, {
|
|
1063
1063
|
...options.dryRun ? { dryRun: true } : {},
|
|
1064
1064
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
|
|
1065
1065
|
});
|
|
1066
|
-
|
|
1066
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, {
|
|
1067
1067
|
json: options.json,
|
|
1068
1068
|
text: options.dryRun ? void 0 : renderMonitorJob(payload)
|
|
1069
1069
|
});
|
|
@@ -1152,11 +1152,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
1152
1152
|
lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
|
|
1153
1153
|
);
|
|
1154
1154
|
}
|
|
1155
|
-
const payload = await new (0,
|
|
1155
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.batch.deploy(
|
|
1156
1156
|
lint.normalized.monitors,
|
|
1157
1157
|
{ idempotencyKey }
|
|
1158
1158
|
);
|
|
1159
|
-
|
|
1159
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
1160
1160
|
{
|
|
1161
1161
|
...payload,
|
|
1162
1162
|
idempotency_key: idempotencyKey,
|
|
@@ -1189,7 +1189,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1189
1189
|
);
|
|
1190
1190
|
}
|
|
1191
1191
|
if (options.dryRun) {
|
|
1192
|
-
|
|
1192
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
1193
1193
|
{
|
|
1194
1194
|
ok: true,
|
|
1195
1195
|
dry_run: true,
|
|
@@ -1206,7 +1206,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1206
1206
|
"sync",
|
|
1207
1207
|
options.idempotencyKey
|
|
1208
1208
|
);
|
|
1209
|
-
const payload = await new (0,
|
|
1209
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.batches.sync(
|
|
1210
1210
|
batchId,
|
|
1211
1211
|
lint.normalized.monitors,
|
|
1212
1212
|
{
|
|
@@ -1214,14 +1214,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1214
1214
|
...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
|
|
1215
1215
|
}
|
|
1216
1216
|
);
|
|
1217
|
-
|
|
1217
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
1218
1218
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1219
1219
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1220
1220
|
);
|
|
1221
1221
|
}
|
|
1222
1222
|
async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
1223
1223
|
if (options.dryRun) {
|
|
1224
|
-
|
|
1224
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
1225
1225
|
{
|
|
1226
1226
|
ok: true,
|
|
1227
1227
|
dry_run: true,
|
|
@@ -1237,17 +1237,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
|
1237
1237
|
intent,
|
|
1238
1238
|
options.idempotencyKey
|
|
1239
1239
|
);
|
|
1240
|
-
const payload = await new (0,
|
|
1240
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
1241
1241
|
idempotencyKey
|
|
1242
1242
|
});
|
|
1243
|
-
|
|
1243
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
1244
1244
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1245
1245
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1246
1246
|
);
|
|
1247
1247
|
}
|
|
1248
1248
|
async function handleNamedMonitorBatchGet(batchId, options) {
|
|
1249
|
-
const payload = await new (0,
|
|
1250
|
-
|
|
1249
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.batches.get(batchId);
|
|
1250
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, {
|
|
1251
1251
|
json: options.json,
|
|
1252
1252
|
text: renderMonitorJob(payload)
|
|
1253
1253
|
});
|
|
@@ -1261,7 +1261,7 @@ async function handleMonitorBatchLint(options) {
|
|
|
1261
1261
|
const result = _chunkU2LVWCTDjs.lintMonitorBatchInput.call(void 0,
|
|
1262
1262
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1263
1263
|
);
|
|
1264
|
-
|
|
1264
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
1265
1265
|
{
|
|
1266
1266
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1267
1267
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1281,7 +1281,7 @@ async function handleMonitorFleetLint(options) {
|
|
|
1281
1281
|
const result = _chunkWOQO3GV4js.lintMonitorFleetInput.call(void 0,
|
|
1282
1282
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1283
1283
|
);
|
|
1284
|
-
|
|
1284
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
1285
1285
|
{
|
|
1286
1286
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1287
1287
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1293,32 +1293,32 @@ async function handleMonitorFleetLint(options) {
|
|
|
1293
1293
|
process.exitCode = 2;
|
|
1294
1294
|
}
|
|
1295
1295
|
async function handleMonitorJobGet(jobId, options) {
|
|
1296
|
-
const payload = await new (0,
|
|
1297
|
-
|
|
1296
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1297
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, {
|
|
1298
1298
|
json: options.json,
|
|
1299
1299
|
text: renderMonitorJob(payload)
|
|
1300
1300
|
});
|
|
1301
1301
|
}
|
|
1302
1302
|
async function handleMonitorJobWait(jobId, options) {
|
|
1303
|
-
const payload = await new (0,
|
|
1303
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1304
1304
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1305
1305
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1306
1306
|
});
|
|
1307
|
-
|
|
1307
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, {
|
|
1308
1308
|
json: options.json,
|
|
1309
1309
|
text: renderMonitorJob(payload)
|
|
1310
1310
|
});
|
|
1311
1311
|
}
|
|
1312
1312
|
async function handleMonitorJobLogs(jobId, options) {
|
|
1313
1313
|
const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
|
|
1314
|
-
const payload = await new (0,
|
|
1314
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1315
1315
|
...limit === void 0 ? {} : { limit }
|
|
1316
1316
|
});
|
|
1317
|
-
|
|
1317
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
1318
1318
|
}
|
|
1319
1319
|
async function handleMonitorJobCancel(jobId, options) {
|
|
1320
|
-
const payload = await new (0,
|
|
1321
|
-
|
|
1320
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1321
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, {
|
|
1322
1322
|
json: options.json,
|
|
1323
1323
|
text: renderMonitorJob(payload)
|
|
1324
1324
|
});
|
|
@@ -1661,7 +1661,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
|
|
|
1661
1661
|
`;
|
|
1662
1662
|
}
|
|
1663
1663
|
function reportFleetState(payload, error, options) {
|
|
1664
|
-
|
|
1664
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
1665
1665
|
{
|
|
1666
1666
|
...payload,
|
|
1667
1667
|
code: error.code,
|
|
@@ -1795,7 +1795,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
|
|
|
1795
1795
|
_fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
|
|
1796
1796
|
`, "utf8");
|
|
1797
1797
|
const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
|
|
1798
|
-
|
|
1798
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
1799
1799
|
{ schemaVersion: 2, file, definition, next },
|
|
1800
1800
|
{
|
|
1801
1801
|
json: options.json,
|
|
@@ -1861,7 +1861,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1861
1861
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1862
1862
|
);
|
|
1863
1863
|
}
|
|
1864
|
-
const client = new (0,
|
|
1864
|
+
const client = new (0, _chunkMFPHCUHKjs.DeeplineClient)();
|
|
1865
1865
|
const payload = await client.monitors.fleets.sync(
|
|
1866
1866
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1867
1867
|
{
|
|
@@ -1899,7 +1899,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1899
1899
|
}
|
|
1900
1900
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1901
1901
|
if (!options.wait || options.dryRun) {
|
|
1902
|
-
|
|
1902
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1903
1903
|
json: options.json,
|
|
1904
1904
|
text: renderFleetSync(payload, {
|
|
1905
1905
|
fleetId,
|
|
@@ -1925,7 +1925,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1925
1925
|
const status = fleetStatus(final);
|
|
1926
1926
|
const summary = renderFleetGet(final);
|
|
1927
1927
|
if (status === "converged") {
|
|
1928
|
-
|
|
1928
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1929
1929
|
return;
|
|
1930
1930
|
}
|
|
1931
1931
|
if (status === "billing_suspended") {
|
|
@@ -1987,14 +1987,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1987
1987
|
`
|
|
1988
1988
|
);
|
|
1989
1989
|
}
|
|
1990
|
-
const client = new (0,
|
|
1990
|
+
const client = new (0, _chunkMFPHCUHKjs.DeeplineClient)();
|
|
1991
1991
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1992
1992
|
...options.drift ? { drift: true } : {},
|
|
1993
1993
|
...limit !== void 0 ? { limit } : {}
|
|
1994
1994
|
});
|
|
1995
1995
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1996
1996
|
if (!options.check) {
|
|
1997
|
-
|
|
1997
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1998
1998
|
return;
|
|
1999
1999
|
}
|
|
2000
2000
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -2002,7 +2002,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
2002
2002
|
);
|
|
2003
2003
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
2004
2004
|
if (unconverged.length === 0) {
|
|
2005
|
-
|
|
2005
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
2006
2006
|
return;
|
|
2007
2007
|
}
|
|
2008
2008
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -2167,7 +2167,7 @@ function renderFleetIssuePage(payload) {
|
|
|
2167
2167
|
}
|
|
2168
2168
|
async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
2169
2169
|
const window = fleetChoice(options.window, LEDGER_WINDOWS, "--window");
|
|
2170
|
-
const client = new (0,
|
|
2170
|
+
const client = new (0, _chunkMFPHCUHKjs.DeeplineClient)();
|
|
2171
2171
|
if (fleetId) {
|
|
2172
2172
|
const listOnly = [
|
|
2173
2173
|
options.q !== void 0 ? "--q" : "",
|
|
@@ -2182,7 +2182,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2182
2182
|
const payload2 = await client.monitors.fleets.overview(fleetId, {
|
|
2183
2183
|
...window ? { window } : {}
|
|
2184
2184
|
});
|
|
2185
|
-
|
|
2185
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2186
2186
|
json: options.json,
|
|
2187
2187
|
text: renderFleetOverviewDetail(payload2, window)
|
|
2188
2188
|
});
|
|
@@ -2198,7 +2198,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2198
2198
|
...sort ? { sort } : {},
|
|
2199
2199
|
...window ? { window } : {}
|
|
2200
2200
|
});
|
|
2201
|
-
|
|
2201
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, {
|
|
2202
2202
|
json: options.json,
|
|
2203
2203
|
text: renderFleetOverviewList(payload)
|
|
2204
2204
|
});
|
|
@@ -2209,13 +2209,13 @@ async function handleMonitorFleetsIssues(fleetId, options) {
|
|
|
2209
2209
|
if (limit !== void 0 && (limit < 1 || limit > 100)) {
|
|
2210
2210
|
throw new MonitorsUsageError("--limit must be an integer from 1 to 100.");
|
|
2211
2211
|
}
|
|
2212
|
-
const payload = await new (0,
|
|
2212
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.fleets.issues(fleetId, {
|
|
2213
2213
|
...group ? { group } : {},
|
|
2214
2214
|
...options.cause ? { cause: options.cause } : {},
|
|
2215
2215
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
2216
2216
|
...limit !== void 0 ? { limit } : {}
|
|
2217
2217
|
});
|
|
2218
|
-
|
|
2218
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, {
|
|
2219
2219
|
json: options.json,
|
|
2220
2220
|
text: renderFleetIssuePage(payload)
|
|
2221
2221
|
});
|
|
@@ -2244,13 +2244,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2244
2244
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
2245
2245
|
);
|
|
2246
2246
|
}
|
|
2247
|
-
const client = new (0,
|
|
2247
|
+
const client = new (0, _chunkMFPHCUHKjs.DeeplineClient)();
|
|
2248
2248
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
2249
2249
|
idempotencyKey
|
|
2250
2250
|
});
|
|
2251
2251
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2252
2252
|
if (!options.wait) {
|
|
2253
|
-
|
|
2253
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2254
2254
|
json: options.json,
|
|
2255
2255
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
2256
2256
|
idempotency key ${idempotencyKey}
|
|
@@ -2273,7 +2273,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2273
2273
|
const envelope = { ...accepted, ...final };
|
|
2274
2274
|
const text = renderFleetGet(final);
|
|
2275
2275
|
if (fleetStatus(final) === "converged") {
|
|
2276
|
-
|
|
2276
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
2277
2277
|
return;
|
|
2278
2278
|
}
|
|
2279
2279
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2322,7 +2322,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
2322
2322
|
}
|
|
2323
2323
|
}
|
|
2324
2324
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
2325
|
-
const client = new (0,
|
|
2325
|
+
const client = new (0, _chunkMFPHCUHKjs.DeeplineClient)();
|
|
2326
2326
|
if (options.dryRun) {
|
|
2327
2327
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
2328
2328
|
dryRun: true,
|
|
@@ -2332,7 +2332,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
2332
2332
|
command: "deepline monitors fleets deactivate",
|
|
2333
2333
|
mutation: "fleet deactivate"
|
|
2334
2334
|
});
|
|
2335
|
-
|
|
2335
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, plan, {
|
|
2336
2336
|
json: options.json,
|
|
2337
2337
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
2338
2338
|
});
|
|
@@ -2370,7 +2370,7 @@ Preview the blast radius first:
|
|
|
2370
2370
|
});
|
|
2371
2371
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2372
2372
|
if (payload.already === true) {
|
|
2373
|
-
|
|
2373
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2374
2374
|
json: options.json,
|
|
2375
2375
|
text: `Fleet ${fleetId} is already deactivated.
|
|
2376
2376
|
`
|
|
@@ -2382,7 +2382,7 @@ Preview the blast radius first:
|
|
|
2382
2382
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
2383
2383
|
` : "");
|
|
2384
2384
|
if (!options.wait) {
|
|
2385
|
-
|
|
2385
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2386
2386
|
json: options.json,
|
|
2387
2387
|
text: acceptedText
|
|
2388
2388
|
});
|
|
@@ -2404,7 +2404,7 @@ Preview the blast radius first:
|
|
|
2404
2404
|
const envelope = { ...accepted, ...final };
|
|
2405
2405
|
const summary = renderFleetGet(final);
|
|
2406
2406
|
if (fleetStatus(final) === "deactivated") {
|
|
2407
|
-
|
|
2407
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
2408
2408
|
return;
|
|
2409
2409
|
}
|
|
2410
2410
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2443,7 +2443,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
2443
2443
|
"Agent notes:",
|
|
2444
2444
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
2445
2445
|
];
|
|
2446
|
-
|
|
2446
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
2447
2447
|
{
|
|
2448
2448
|
schemaVersion: 1,
|
|
2449
2449
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2620,7 +2620,7 @@ function renderMonitorGet(payload) {
|
|
|
2620
2620
|
`;
|
|
2621
2621
|
}
|
|
2622
2622
|
async function handleMonitorsGet(key, options) {
|
|
2623
|
-
const client = new (0,
|
|
2623
|
+
const client = new (0, _chunkMFPHCUHKjs.DeeplineClient)();
|
|
2624
2624
|
const payload = await client.monitors.get(key);
|
|
2625
2625
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2626
2626
|
const dependents = boundPlays ? {
|
|
@@ -2628,24 +2628,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2628
2628
|
truncated: payload.consumer_health_truncated === true
|
|
2629
2629
|
} : await client.monitors.dependents(key);
|
|
2630
2630
|
const detail = { ...payload, dependents };
|
|
2631
|
-
|
|
2631
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, detail, {
|
|
2632
2632
|
json: options.json,
|
|
2633
2633
|
text: renderMonitorGet(detail)
|
|
2634
2634
|
});
|
|
2635
2635
|
}
|
|
2636
2636
|
async function handleMonitorsTest(key, payload, options) {
|
|
2637
2637
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2638
|
-
const result = await new (0,
|
|
2638
|
+
const result = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2639
2639
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2640
2640
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2641
2641
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2642
2642
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2643
2643
|
`;
|
|
2644
|
-
|
|
2644
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2645
2645
|
}
|
|
2646
2646
|
async function handleMonitorsValidate(key, options) {
|
|
2647
|
-
const result = await new (0,
|
|
2648
|
-
|
|
2647
|
+
const result = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.validate(key);
|
|
2648
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2649
2649
|
if (result.valid === false) process.exitCode = 7;
|
|
2650
2650
|
}
|
|
2651
2651
|
async function confirmMonitorDelete(key) {
|
|
@@ -2663,14 +2663,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2663
2663
|
}
|
|
2664
2664
|
}
|
|
2665
2665
|
async function handleMonitorsDelete(key, options) {
|
|
2666
|
-
const client = new (0,
|
|
2666
|
+
const client = new (0, _chunkMFPHCUHKjs.DeeplineClient)();
|
|
2667
2667
|
if (options.dryRun) {
|
|
2668
2668
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2669
2669
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2670
2670
|
command: "deepline monitors delete",
|
|
2671
2671
|
mutation: "delete"
|
|
2672
2672
|
});
|
|
2673
|
-
|
|
2673
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2674
2674
|
json: options.json,
|
|
2675
2675
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2676
2676
|
});
|
|
@@ -2690,7 +2690,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2690
2690
|
}
|
|
2691
2691
|
}
|
|
2692
2692
|
const payload = await client.monitors.delete(key);
|
|
2693
|
-
|
|
2693
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2694
2694
|
}
|
|
2695
2695
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2696
2696
|
const body = resolveMonitorJsonBody({
|
|
@@ -2699,25 +2699,25 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2699
2699
|
argLabel: "<patch>",
|
|
2700
2700
|
command: `deepline monitors update ${key}`
|
|
2701
2701
|
});
|
|
2702
|
-
const payload = await new (0,
|
|
2703
|
-
|
|
2702
|
+
const payload = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.update(key, body);
|
|
2703
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2704
2704
|
}
|
|
2705
2705
|
async function handleMonitorsReactivate(key, options) {
|
|
2706
|
-
const client = new (0,
|
|
2706
|
+
const client = new (0, _chunkMFPHCUHKjs.DeeplineClient)();
|
|
2707
2707
|
if (options.dryRun) {
|
|
2708
2708
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2709
2709
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2710
2710
|
command: "deepline monitors reactivate",
|
|
2711
2711
|
mutation: "reactivate"
|
|
2712
2712
|
});
|
|
2713
|
-
|
|
2713
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2714
2714
|
json: options.json,
|
|
2715
2715
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2716
2716
|
});
|
|
2717
2717
|
return;
|
|
2718
2718
|
}
|
|
2719
2719
|
const payload = await client.monitors.reactivate(key);
|
|
2720
|
-
|
|
2720
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2721
2721
|
}
|
|
2722
2722
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2723
2723
|
function monitorHealthLine(health) {
|
|
@@ -2850,7 +2850,7 @@ function monitorHealthText(health) {
|
|
|
2850
2850
|
`;
|
|
2851
2851
|
}
|
|
2852
2852
|
async function handleMonitorsAudit(options) {
|
|
2853
|
-
const client = new (0,
|
|
2853
|
+
const client = new (0, _chunkMFPHCUHKjs.DeeplineClient)();
|
|
2854
2854
|
const fleetId = _optionalChain([options, 'access', _109 => _109.fleet, 'optionalAccess', _110 => _110.trim, 'call', _111 => _111()]) || void 0;
|
|
2855
2855
|
const scope = fleetId ? { fleetId } : {};
|
|
2856
2856
|
let result = await client.monitors.audit(scope);
|
|
@@ -2894,7 +2894,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2894
2894
|
"",
|
|
2895
2895
|
monitorHealthText(health)
|
|
2896
2896
|
].join("\n");
|
|
2897
|
-
|
|
2897
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
2898
2898
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2899
2899
|
{ json: options.json, text }
|
|
2900
2900
|
);
|
|
@@ -2907,10 +2907,10 @@ async function handleMonitorsRepair(options) {
|
|
|
2907
2907
|
}
|
|
2908
2908
|
async function handleMonitorsHealth(options) {
|
|
2909
2909
|
const fleetId = _optionalChain([options, 'access', _115 => _115.fleet, 'optionalAccess', _116 => _116.trim, 'call', _117 => _117()]) || void 0;
|
|
2910
|
-
const health = await new (0,
|
|
2910
|
+
const health = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.health(
|
|
2911
2911
|
fleetId ? { fleetId } : {}
|
|
2912
2912
|
);
|
|
2913
|
-
|
|
2913
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, health, {
|
|
2914
2914
|
json: options.json,
|
|
2915
2915
|
text: monitorHealthText(health)
|
|
2916
2916
|
});
|
|
@@ -2984,14 +2984,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2984
2984
|
"deploy",
|
|
2985
2985
|
options.idempotencyKey
|
|
2986
2986
|
);
|
|
2987
|
-
const result = await new (0,
|
|
2987
|
+
const result = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.batch.submit({
|
|
2988
2988
|
kind: "deploy",
|
|
2989
2989
|
manifestNdjson,
|
|
2990
2990
|
dryRun: options.dryRun === true,
|
|
2991
2991
|
idempotencyKey
|
|
2992
2992
|
});
|
|
2993
2993
|
const operation = result.operation;
|
|
2994
|
-
|
|
2994
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
2995
2995
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2996
2996
|
{
|
|
2997
2997
|
json: options.json,
|
|
@@ -3019,7 +3019,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
3019
3019
|
kind,
|
|
3020
3020
|
options.idempotencyKey
|
|
3021
3021
|
);
|
|
3022
|
-
const result = await new (0,
|
|
3022
|
+
const result = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.batch.submit({
|
|
3023
3023
|
kind,
|
|
3024
3024
|
scope,
|
|
3025
3025
|
dryRun: options.dryRun === true,
|
|
@@ -3032,14 +3032,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
3032
3032
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
3033
3033
|
`inspect: deepline monitors batch get ${operation.runId}`
|
|
3034
3034
|
].join("\n");
|
|
3035
|
-
|
|
3035
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0,
|
|
3036
3036
|
{ ...result, idempotency_key: idempotencyKey },
|
|
3037
3037
|
{ json: options.json, text: `${text}
|
|
3038
3038
|
` }
|
|
3039
3039
|
);
|
|
3040
3040
|
}
|
|
3041
3041
|
async function handleMonitorBatchGet(operationId, options) {
|
|
3042
|
-
const result = await new (0,
|
|
3042
|
+
const result = await new (0, _chunkMFPHCUHKjs.DeeplineClient)().monitors.batch.get(operationId, {
|
|
3043
3043
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
3044
3044
|
});
|
|
3045
3045
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -3051,7 +3051,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
3051
3051
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
3052
3052
|
] : []
|
|
3053
3053
|
].join("\n");
|
|
3054
|
-
|
|
3054
|
+
_chunkPULU5YGXjs.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
3055
3055
|
` });
|
|
3056
3056
|
}
|
|
3057
3057
|
function registerMonitorsCommands(program) {
|