deepline 0.3.534 → 0.3.536
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 +254 -147
- package/dist/bundling-sources/sdk/src/index.ts +4 -0
- package/dist/bundling-sources/sdk/src/plays/local-file-discovery.ts +27 -1
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +16 -5
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +2 -23
- package/dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts +26 -14
- package/dist/bundling-sources/shared_libs/integration-contracts/monitor-input-contract.ts +33 -8
- package/dist/bundling-sources/shared_libs/monitors/fleets/count-drift-alert.ts +121 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +8 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +14 -82
- package/dist/bundling-sources/shared_libs/monitors/package.json +1 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +4 -4
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +0 -26
- package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +21 -31
- package/dist/bundling-sources/shared_libs/play-runtime/call-requeue-state-machine.ts +420 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +727 -102
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +26 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-retry-policy.ts +624 -0
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +12 -10
- package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +71 -2
- package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +60 -1
- package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +372 -10
- package/dist/bundling-sources/shared_libs/play-runtime/memory-ledger.ts +15 -2
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/prebuilt-result-quality.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/fixture-capacity-simulator.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/gradient2-concurrency-controller.ts +41 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/provider-capacity-policy.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-capacity/provider-concurrency-policy.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/provider-no-progress.ts +6 -2
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +5 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +63 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-compute-usage.ts +31 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +26 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +11 -4
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +73 -18
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +169 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +26 -4
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +90 -49
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +136 -30
- package/dist/bundling-sources/shared_libs/plays/launch/input-contract.ts +13 -1
- package/dist/bundling-sources/shared_libs/plays/local-file-discovery.ts +68 -1
- package/dist/bundling-sources/shared_libs/plays/share/static-pipeline-summary.ts +63 -13
- package/dist/bundling-sources/shared_libs/product-notifications/configuration-draft.ts +57 -1
- package/dist/bundling-sources/shared_libs/product-notifications/configuration.ts +22 -9
- package/dist/cli/auth-6XQKFOLG.js +43 -0
- package/dist/cli/{auth-MHQYIMVX.mjs → auth-KCTCUO7P.mjs} +7 -7
- package/dist/cli/{billing-YQLNP4S5.js → billing-4VBGZ3CT.js} +273 -112
- package/dist/cli/{billing-LX2PSBJ4.mjs → billing-OOJHKLNS.mjs} +185 -24
- package/dist/cli/{chunk-DGKTHWWH.js → chunk-2B4IOGFD.js} +406 -382
- package/dist/cli/{chunk-MQORQ7WL.js → chunk-2FCSUOYN.js} +55 -55
- package/dist/cli/{chunk-T2N3B7IQ.js → chunk-2GJZLIKW.js} +8 -8
- package/dist/cli/{chunk-6IFZPEJE.mjs → chunk-2YWJS76L.mjs} +1 -1
- package/dist/cli/{chunk-E7TP25I2.mjs → chunk-3PCYV6ZJ.mjs} +2 -2
- package/dist/cli/{chunk-LGRZCHKC.js → chunk-4E5JXZ3W.js} +18 -20
- package/dist/cli/{chunk-R4RG4FV5.mjs → chunk-4KWD3MX2.mjs} +13 -10
- package/dist/cli/{chunk-SUWTLXCV.js → chunk-6BBGUQJJ.js} +67 -146
- package/dist/cli/{chunk-JBBJDFUJ.js → chunk-6VUGBQZQ.js} +5 -5
- package/dist/cli/{chunk-2P3NVX65.mjs → chunk-AB2GBOD4.mjs} +40 -27
- package/dist/cli/{chunk-62SOZ67Y.mjs → chunk-ANUKBZ6W.mjs} +475 -11
- package/dist/cli/{chunk-MG6YL4M7.mjs → chunk-BASLYGXK.mjs} +101 -77
- package/dist/cli/{chunk-SQWET4SL.js → chunk-BBTKAASQ.js} +2 -1
- package/dist/cli/{chunk-NRO3NTVO.js → chunk-CBV7AKWM.js} +5 -5
- package/dist/cli/{chunk-RH3YRMUY.js → chunk-CIDN5K23.js} +1 -1
- package/dist/cli/{chunk-QNHHZ63P.mjs → chunk-CQBIO6HW.mjs} +1 -1
- package/dist/cli/{chunk-2KHUFWTK.js → chunk-CQDQNZGH.js} +42 -37
- package/dist/cli/{chunk-UWNVFAFN.js → chunk-CWSLUNA6.js} +33 -33
- package/dist/cli/{chunk-5FXMEEF4.mjs → chunk-CXTW7SRW.mjs} +67 -146
- package/dist/cli/{chunk-O53LHONF.mjs → chunk-DA2I2M7D.mjs} +2 -2
- package/dist/cli/{chunk-EYXUAJAU.mjs → chunk-DQHUJMCL.mjs} +5 -5
- package/dist/cli/{chunk-7GFR5Y4J.mjs → chunk-DUYAMLOC.mjs} +1 -1
- package/dist/cli/{chunk-OMVVHX4U.mjs → chunk-E24UGPGG.mjs} +13 -15
- package/dist/cli/{chunk-STR5LXK4.mjs → chunk-FSIVF2SI.mjs} +1 -1
- package/dist/cli/{chunk-KJVY7V2X.mjs → chunk-GF32SBST.mjs} +1 -1
- package/dist/cli/{chunk-AK622KIG.mjs → chunk-GHLDCLSC.mjs} +1 -1
- package/dist/cli/{chunk-A6HNT4EE.js → chunk-GTVZKY3F.js} +2 -2
- package/dist/cli/{chunk-BXIUZM5N.mjs → chunk-HAJQGP5V.mjs} +2 -2
- package/dist/cli/{chunk-6CEUQYMB.js → chunk-HWDKRN7L.js} +3 -3
- package/dist/cli/{chunk-5YAJGRWB.js → chunk-IPVRMYWT.js} +7 -7
- package/dist/cli/{chunk-ZPGGW27Q.mjs → chunk-JL2OTMSG.mjs} +1 -0
- package/dist/cli/{chunk-WR4WETRU.mjs → chunk-JUHDJNSI.mjs} +4 -4
- package/dist/cli/{chunk-TQH3533L.mjs → chunk-KPQHUVYW.mjs} +5 -5
- package/dist/cli/{chunk-V7SCRUFQ.js → chunk-KWYGWO4Y.js} +9 -6
- package/dist/cli/{chunk-DZS4JC7I.js → chunk-LDGZFDUB.js} +2 -2
- package/dist/cli/{chunk-EGTUOYYG.js → chunk-LN6RXDTB.js} +523 -59
- package/dist/cli/{chunk-DQ5ADV2J.mjs → chunk-LZXZQPA2.mjs} +4 -1
- package/dist/cli/{chunk-MYSKWJMA.js → chunk-MSP4DTSD.js} +13 -13
- package/dist/cli/{chunk-BNH4Y35W.mjs → chunk-OLH2PHMC.mjs} +2 -2
- package/dist/cli/{chunk-NNAE7E23.mjs → chunk-OUDTOMZC.mjs} +7 -9
- package/dist/cli/{chunk-GESIFFQX.mjs → chunk-OVX3Q5Q3.mjs} +1 -1
- package/dist/cli/{chunk-ENCA6O2D.mjs → chunk-PNY3BWHP.mjs} +2 -2
- package/dist/cli/{chunk-KSA2XE4T.js → chunk-Q4MNUOS4.js} +316 -303
- package/dist/cli/{chunk-GTXSUPCJ.js → chunk-Q5CXV3E3.js} +2 -2
- package/dist/cli/{chunk-VAG5YKP6.mjs → chunk-RVSSQPQO.mjs} +1 -1
- package/dist/cli/{chunk-VE7ZPLN2.js → chunk-SLPJ3LXI.js} +22 -22
- package/dist/cli/{chunk-IX45S5VC.js → chunk-TX5TUHJN.js} +17 -19
- package/dist/cli/{chunk-IF75RD6U.js → chunk-U2LVWCTD.js} +18 -6
- package/dist/cli/{chunk-ZS2WHWWL.js → chunk-UNDLNT3V.js} +1 -1
- package/dist/cli/{chunk-NDFNBJGL.js → chunk-VBDZIMWD.js} +26 -26
- package/dist/cli/{chunk-GVGQ6NZW.js → chunk-W7AEIGZR.js} +41 -41
- package/dist/cli/{chunk-WDNRPZED.mjs → chunk-WC5M3JXE.mjs} +2 -2
- package/dist/cli/{chunk-C374C22Y.js → chunk-WOQO3GV4.js} +14 -11
- package/dist/cli/{chunk-MQX363YF.js → chunk-XBAH3TKU.js} +5 -5
- package/dist/cli/{chunk-BDWZBMGV.mjs → chunk-XJD2GYUP.mjs} +5 -5
- package/dist/cli/{chunk-XRZJKHUA.mjs → chunk-XVZRJJDS.mjs} +4 -4
- package/dist/cli/{chunk-TVINIDHB.js → chunk-Y2NTPYGS.js} +17 -17
- package/dist/cli/{chunk-6GTGWZJG.mjs → chunk-YBMHOH6H.mjs} +4 -4
- package/dist/cli/{chunk-TG2UB3A5.mjs → chunk-YRLAUGQY.mjs} +3 -3
- package/dist/cli/{chunk-FKD3KL5Q.mjs → chunk-Z2XA6YU4.mjs} +10 -5
- package/dist/cli/{chunk-KXQCUX3X.mjs → chunk-Z7UIOGW4.mjs} +3 -3
- package/dist/cli/{chunk-HCD36BP6.js → chunk-ZEV2Y56V.js} +44 -44
- package/dist/cli/{chunk-MI6ZP7XI.mjs → chunk-ZG7BOECV.mjs} +18 -6
- package/dist/cli/{chunk-XBK6WCVA.js → chunk-ZILSRDIN.js} +8 -8
- package/dist/cli/{chunk-B2AS3R5W.js → chunk-ZISEH7OL.js} +16 -16
- package/dist/cli/{chunk-HPJAE6PP.js → chunk-ZZ4MF2GI.js} +6 -6
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-U3M2G76R.js → csv-2V2DIFNG.js} +15 -15
- package/dist/cli/{csv-4ID4E5W3.mjs → csv-P3HLK4GO.mjs} +6 -6
- package/dist/cli/{db-IHAQIKEQ.js → db-MREAQVW6.js} +36 -36
- package/dist/cli/{db-LHX5BBCZ.mjs → db-ZYOY3QRQ.mjs} +9 -9
- package/dist/cli/describe-IKZFOADR.mjs +49 -0
- package/dist/cli/describe-WW3OQRLP.js +49 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +5 -5
- package/dist/cli/describe-core.mjs +4 -4
- package/dist/cli/{executions-CJ5LV23G.js → executions-H5IJ7QSQ.js} +11 -11
- package/dist/cli/{executions-UJ6JZUL5.mjs → executions-KTSY5M34.mjs} +9 -9
- package/dist/cli/{feedback-TGUBVGRP.js → feedback-724QK3Z5.js} +16 -16
- package/dist/cli/{feedback-YGTPJBRJ.mjs → feedback-WWJRIXEU.mjs} +8 -8
- package/dist/cli/git-PHYRD56H.js +25 -0
- package/dist/cli/{git-3DOTQHJO.mjs → git-R5VRG7X6.mjs} +7 -7
- package/dist/cli/index.js +151 -157
- package/dist/cli/index.mjs +51 -57
- package/dist/cli/{legacy-noops-BHEHVFHI.js → legacy-noops-C6GDEGPU.js} +11 -11
- package/dist/cli/{legacy-noops-RBBYRVLG.mjs → legacy-noops-PWZ5XLAO.mjs} +8 -8
- package/dist/cli/{monitors-XECKLAXA.js → monitors-VAVQ4WCE.js} +125 -122
- package/dist/cli/{monitors-5AJCG6IV.mjs → monitors-WQSKMHAP.mjs} +19 -16
- package/dist/cli/{org-DOBAIYWG.js → org-CWWRWXZQ.js} +89 -89
- package/dist/cli/{org-ZAAIEZKB.mjs → org-MAL4QPVF.mjs} +9 -9
- package/dist/cli/{play-KLYRMQPF.mjs → play-ILW6MSNG.mjs} +174 -80
- package/dist/cli/{play-E74VN6B7.js → play-WJOWK5PQ.js} +690 -596
- package/dist/cli/{providers-XTQXV5LB.mjs → providers-4V2NMLZZ.mjs} +9 -9
- package/dist/cli/{providers-APZ6SOSK.js → providers-W662ANCH.js} +12 -12
- package/dist/cli/{quickstart-S6WN6NWW.js → quickstart-BW6EBUYX.js} +8 -8
- package/dist/cli/{quickstart-X7RHHQCH.mjs → quickstart-C22BR743.mjs} +6 -6
- package/dist/cli/{run-3YLIJJ57.js → run-KW7KW4FX.js} +50 -53
- package/dist/cli/{run-TZPBBSPX.mjs → run-SPAU5IMW.mjs} +31 -34
- package/dist/cli/search-HLE54W5G.js +32 -0
- package/dist/cli/{search-VLHE2CMZ.mjs → search-XPC75HLM.mjs} +10 -11
- package/dist/cli/{search-output-73BYB7UE.mjs → search-output-JKYJSEPM.mjs} +6 -6
- package/dist/cli/{search-output-GCT7PQIT.js → search-output-VJYE7USJ.js} +8 -8
- package/dist/cli/{secrets-RLOTGKQZ.mjs → secrets-OJG73GXQ.mjs} +9 -9
- package/dist/cli/{secrets-J6CEKXKQ.js → secrets-YB57KGSB.js} +18 -18
- package/dist/cli/{sessions-7HZ7OZ62.mjs → sessions-7ZL37BW4.mjs} +8 -8
- package/dist/cli/sessions-VEBYZIEU.js +22 -0
- package/dist/cli/{settings-WRV5XEZC.js → settings-A7DD2ZYE.js} +88 -89
- package/dist/cli/{settings-72K5YCIS.mjs → settings-RKSQB7FA.mjs} +15 -16
- package/dist/cli/{setup-KQFY6WT4.mjs → setup-NXDUTITY.mjs} +11 -12
- package/dist/cli/{setup-QVXWT2EQ.js → setup-S3K5YU62.js} +51 -52
- package/dist/cli/skills-NVQ744CN.js +36 -0
- package/dist/cli/{skills-C3K3E473.mjs → skills-VMFAIDO6.mjs} +9 -10
- package/dist/cli/{tools-4A2OH6MB.mjs → tools-52NTHBSJ.mjs} +20 -21
- package/dist/cli/tools-SBDUL3WB.js +56 -0
- package/dist/cli/update-HHVFZPCV.js +34 -0
- package/dist/cli/{update-BS6USKPR.mjs → update-SAKBEKMV.mjs} +11 -12
- package/dist/cli/{views-WB6GFTRX.mjs → views-ACRV7MD6.mjs} +54 -10
- package/dist/cli/{views-4NZGAXHL.js → views-C3GJOBDG.js} +66 -22
- package/dist/cli/{workflow-2D4WX55R.mjs → workflow-CS22E7TC.mjs} +10 -10
- package/dist/cli/{workflow-L2QTQZYV.js → workflow-ZNWCZEGN.js} +20 -20
- package/dist/{client-DoUVSkqC.d.mts → client-BlLYQDNo.d.mts} +1 -1
- package/dist/{client-DQm56zMs.d.ts → client-DSQlkIDO.d.ts} +1 -1
- package/dist/{client-core-C7KkUIE_.d.ts → client-core-CDwapXy5.d.ts} +167 -108
- package/dist/{client-core-CPlwsC1Q.d.mts → client-core-rX7n2H8U.d.mts} +167 -108
- package/dist/{compiler-manifest-DsxsQP-T.d.mts → compiler-manifest-BHNC4RL-.d.mts} +58 -21
- package/dist/{compiler-manifest-DsxsQP-T.d.ts → compiler-manifest-BHNC4RL-.d.ts} +58 -21
- package/dist/{errors-qdJUVQ3g.d.mts → errors-D7sPXrvB.d.mts} +1 -1
- package/dist/{errors-Bk5h1D-C.d.ts → errors-lhtIWG5Z.d.ts} +1 -1
- package/dist/{index-bL66eHYz.d.ts → index-CQTBHXHr.d.ts} +1 -1
- package/dist/{index-PaupwX1B.d.mts → index-NaDZq2xf.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +15 -15
- package/dist/index.mjs +11 -11
- package/dist/install-integrity.json +131 -132
- package/dist/monitor-fleet-contract.d.mts +17 -11
- package/dist/monitor-fleet-contract.d.ts +17 -11
- package/dist/monitor-fleet-contract.js +3 -3
- package/dist/monitor-fleet-contract.mjs +2 -2
- package/dist/monitor-input-contract.js +2 -2
- package/dist/monitor-input-contract.mjs +1 -1
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +67 -3
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +3 -3
- package/dist/plays/run-request.mjs +2 -2
- 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 +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +12 -12
- package/dist/server.mjs +6 -6
- package/package.json +1 -1
- package/dist/cli/auth-UP2RGPI6.js +0 -43
- package/dist/cli/chunk-5LZ5VSOK.mjs +0 -405
- package/dist/cli/chunk-D3J2Y2BP.js +0 -405
- package/dist/cli/describe-CI4MREFF.mjs +0 -50
- package/dist/cli/describe-IVTSD7ST.js +0 -50
- package/dist/cli/git-R3W25XIF.js +0 -25
- package/dist/cli/pages-FUOSF6BE.mjs +0 -266
- package/dist/cli/pages-TLC2N6L7.js +0 -266
- package/dist/cli/search-NB5CBALV.js +0 -33
- package/dist/cli/sessions-SFCZSB77.js +0 -22
- package/dist/cli/skills-WIJEHVLA.js +0 -37
- package/dist/cli/tools-VMMERMLO.js +0 -57
- package/dist/cli/update-54WZQDTS.js +0 -35
|
@@ -1,39 +1,40 @@
|
|
|
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 _chunkXBAH3TKUjs = require('./chunk-XBAH3TKU.js');
|
|
5
|
+
require('./chunk-2B4IOGFD.js');
|
|
6
6
|
require('./chunk-E4CABWXL.js');
|
|
7
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-CQDQNZGH.js');
|
|
8
8
|
require('./chunk-PMH4GLMD.js');
|
|
9
9
|
require('./chunk-XDVT3GOM.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
var _chunkWOQO3GV4js = require('./chunk-WOQO3GV4.js');
|
|
14
15
|
require('./chunk-UNEMDKXN.js');
|
|
15
16
|
|
|
16
17
|
|
|
17
|
-
var
|
|
18
|
+
var _chunkU2LVWCTDjs = require('./chunk-U2LVWCTD.js');
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
var
|
|
21
|
+
var _chunkHWDKRN7Ljs = require('./chunk-HWDKRN7L.js');
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
|
|
26
|
-
var
|
|
27
|
-
require('./chunk-
|
|
28
|
-
require('./chunk-
|
|
27
|
+
var _chunkLN6RXDTBjs = require('./chunk-LN6RXDTB.js');
|
|
28
|
+
require('./chunk-ZILSRDIN.js');
|
|
29
|
+
require('./chunk-CWSLUNA6.js');
|
|
29
30
|
|
|
30
31
|
|
|
31
|
-
var
|
|
32
|
+
var _chunk2GJZLIKWjs = require('./chunk-2GJZLIKW.js');
|
|
32
33
|
require('./chunk-XNYIZMNQ.js');
|
|
33
34
|
|
|
34
35
|
|
|
35
|
-
var
|
|
36
|
-
require('./chunk-
|
|
36
|
+
var _chunkBBTKAASQjs = require('./chunk-BBTKAASQ.js');
|
|
37
|
+
require('./chunk-CIDN5K23.js');
|
|
37
38
|
require('./chunk-OG64RBAC.js');
|
|
38
39
|
require('./chunk-COGTRVWW.js');
|
|
39
40
|
|
|
@@ -64,8 +65,8 @@ var MonitorDryRunUnsupportedError = (_class2 = class extends Error {
|
|
|
64
65
|
function monitorsErrorExitCode(error) {
|
|
65
66
|
if (error instanceof MonitorsUsageError) return 2;
|
|
66
67
|
if (error instanceof MonitorFleetStateError) return 6;
|
|
67
|
-
if (error instanceof
|
|
68
|
-
if (error instanceof
|
|
68
|
+
if (error instanceof _chunk2GJZLIKWjs.AuthError) return 3;
|
|
69
|
+
if (error instanceof _chunkBBTKAASQjs.DeeplineError) {
|
|
69
70
|
const status = error.statusCode;
|
|
70
71
|
if (status === 401 || status === 403) return 3;
|
|
71
72
|
if (status === 404) return 4;
|
|
@@ -76,16 +77,16 @@ function monitorsErrorExitCode(error) {
|
|
|
76
77
|
}
|
|
77
78
|
function monitorsFailureNextCommand(error, exitCode, options) {
|
|
78
79
|
if (error instanceof MonitorFleetStateError) return error.next;
|
|
79
|
-
if (error instanceof
|
|
80
|
+
if (error instanceof _chunkBBTKAASQjs.DeeplineError) {
|
|
80
81
|
const response = asRecord(_optionalChain([asRecord, 'call', _ => _(error.details), 'optionalAccess', _2 => _2.response]));
|
|
81
82
|
const serverNext = _nullishCoalesce(asString(_optionalChain([response, 'optionalAccess', _3 => _3.next])), () => ( asString(_optionalChain([response, 'optionalAccess', _4 => _4.next_action]))));
|
|
82
83
|
if (serverNext) return serverNext;
|
|
83
84
|
}
|
|
84
85
|
if (exitCode === 5 && _optionalChain([options, 'optionalAccess', _5 => _5.retryCommand])) return options.retryCommand;
|
|
85
|
-
if (error instanceof
|
|
86
|
+
if (error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "monitor_access_required") {
|
|
86
87
|
return "deepline monitors status";
|
|
87
88
|
}
|
|
88
|
-
if (error instanceof
|
|
89
|
+
if (error instanceof _chunkBBTKAASQjs.DeeplineError && error.code === "monitor_tool_not_found") {
|
|
89
90
|
return "deepline tools list --categories monitors";
|
|
90
91
|
}
|
|
91
92
|
if (exitCode === 3) return "deepline auth status";
|
|
@@ -93,7 +94,7 @@ function monitorsFailureNextCommand(error, exitCode, options) {
|
|
|
93
94
|
return void 0;
|
|
94
95
|
}
|
|
95
96
|
function readValidationIssues(error) {
|
|
96
|
-
if (!(error instanceof
|
|
97
|
+
if (!(error instanceof _chunkBBTKAASQjs.DeeplineError)) return [];
|
|
97
98
|
const response = asRecord(_optionalChain([asRecord, 'call', _6 => _6(error.details), 'optionalAccess', _7 => _7.response]));
|
|
98
99
|
const issues = Array.isArray(_optionalChain([response, 'optionalAccess', _8 => _8.issues])) ? response.issues : [];
|
|
99
100
|
return issues.flatMap((raw) => {
|
|
@@ -111,10 +112,10 @@ function reportMonitorsFailure(error, options) {
|
|
|
111
112
|
const exitCode = monitorsErrorExitCode(error);
|
|
112
113
|
const next = monitorsFailureNextCommand(error, exitCode, options);
|
|
113
114
|
const retrySafe = exitCode === 5 && _optionalChain([options, 'optionalAccess', _9 => _9.retryCommand]) !== void 0;
|
|
114
|
-
const wantsJson =
|
|
115
|
+
const wantsJson = _chunkLN6RXDTBjs.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
115
116
|
if (wantsJson) {
|
|
116
|
-
const payload =
|
|
117
|
-
|
|
117
|
+
const payload = _chunkLN6RXDTBjs.errorToJsonPayload.call(void 0, error);
|
|
118
|
+
_chunkLN6RXDTBjs.printJson.call(void 0, {
|
|
118
119
|
ok: false,
|
|
119
120
|
exitCode,
|
|
120
121
|
...next ? { next } : {},
|
|
@@ -534,14 +535,14 @@ Preview the plan first with:
|
|
|
534
535
|
);
|
|
535
536
|
}
|
|
536
537
|
async function handleMonitorsStatus(options) {
|
|
537
|
-
const payload = await new (0,
|
|
538
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.status();
|
|
538
539
|
const hasAccess = payload.has_access === true;
|
|
539
540
|
const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
|
|
540
541
|
const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
|
|
541
542
|
${reason}` : ""}
|
|
542
543
|
` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
|
|
543
544
|
`;
|
|
544
|
-
|
|
545
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
545
546
|
{ has_access: hasAccess, ...reason ? { reason } : {} },
|
|
546
547
|
{ json: options.json, text }
|
|
547
548
|
);
|
|
@@ -607,14 +608,14 @@ async function handleMonitorsAvailable(toolId, options) {
|
|
|
607
608
|
}
|
|
608
609
|
}
|
|
609
610
|
const tool = _nullishCoalesce(toolId, () => ( options.tool));
|
|
610
|
-
const payload = await new (0,
|
|
611
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.available(tool, {
|
|
611
612
|
...options.provider ? { provider: options.provider } : {},
|
|
612
613
|
...options.search ? { search: options.search } : {},
|
|
613
614
|
...options.limit ? { limit: options.limit } : {},
|
|
614
615
|
...options.full ? { full: true } : {},
|
|
615
616
|
...options.compact ? { compact: true } : {}
|
|
616
617
|
});
|
|
617
|
-
|
|
618
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
|
|
618
619
|
json: options.json,
|
|
619
620
|
// Human list view shows id + name + deployed_count ("deployed: N") so
|
|
620
621
|
// can-deploy vs already-deployed is visible in one view. Describing a
|
|
@@ -721,14 +722,14 @@ async function handleMonitorsList(options) {
|
|
|
721
722
|
"`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
|
|
722
723
|
);
|
|
723
724
|
}
|
|
724
|
-
const payload = await new (0,
|
|
725
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.list({
|
|
725
726
|
...state ? { state } : {},
|
|
726
727
|
...options.status ? { status: options.status } : {},
|
|
727
728
|
...options.limit ? { limit: options.limit } : {},
|
|
728
729
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
729
730
|
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
730
731
|
});
|
|
731
|
-
|
|
732
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
|
|
732
733
|
json: options.json,
|
|
733
734
|
text: renderDeployedListText(
|
|
734
735
|
payload,
|
|
@@ -819,7 +820,7 @@ function renderMonitorLedgerText(payload) {
|
|
|
819
820
|
var LEDGER_SORTS = ["recent", "installed", "name", "findings"];
|
|
820
821
|
var LEDGER_WINDOWS = ["1d", "7d", "30d", "90d", "1y"];
|
|
821
822
|
async function handleMonitorsLedger(key, options) {
|
|
822
|
-
const client = new (0,
|
|
823
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
823
824
|
if (options.findings) {
|
|
824
825
|
if (!key) {
|
|
825
826
|
throw new MonitorsUsageError(
|
|
@@ -829,12 +830,12 @@ async function handleMonitorsLedger(key, options) {
|
|
|
829
830
|
const payload2 = await client.monitors.ledgerFindings(key, {
|
|
830
831
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
831
832
|
});
|
|
832
|
-
|
|
833
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
833
834
|
return;
|
|
834
835
|
}
|
|
835
836
|
if (key) {
|
|
836
837
|
const payload2 = await client.monitors.ledgerGet(key);
|
|
837
|
-
|
|
838
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
838
839
|
return;
|
|
839
840
|
}
|
|
840
841
|
if (options.sort !== void 0 && !LEDGER_SORTS.includes(options.sort)) {
|
|
@@ -858,7 +859,7 @@ async function handleMonitorsLedger(key, options) {
|
|
|
858
859
|
...options.limit ? { limit: options.limit } : {},
|
|
859
860
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
860
861
|
});
|
|
861
|
-
|
|
862
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
|
|
862
863
|
json: options.json,
|
|
863
864
|
text: renderMonitorLedgerText(payload)
|
|
864
865
|
});
|
|
@@ -870,10 +871,10 @@ async function handleMonitorsCheck(definition, options) {
|
|
|
870
871
|
argLabel: "<definition>",
|
|
871
872
|
command: "deepline monitors check"
|
|
872
873
|
});
|
|
873
|
-
const payload = await new (0,
|
|
874
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.check(
|
|
874
875
|
body
|
|
875
876
|
);
|
|
876
|
-
|
|
877
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
877
878
|
}
|
|
878
879
|
function previewText(value) {
|
|
879
880
|
return typeof value === "string" && value.trim() ? value.trim() : "-";
|
|
@@ -931,22 +932,22 @@ async function handleMonitorsPreview(definition, options) {
|
|
|
931
932
|
if (limit !== void 0 && !Number.isInteger(limit)) {
|
|
932
933
|
throw new MonitorsUsageError("--limit must be a whole number from 1 to 3.");
|
|
933
934
|
}
|
|
934
|
-
const wantsJson =
|
|
935
|
+
const wantsJson = _chunkLN6RXDTBjs.shouldEmitJson.call(void 0, options.json);
|
|
935
936
|
if (options.idempotencyKey === void 0 && wantsJson) {
|
|
936
937
|
throw new MonitorsUsageError(
|
|
937
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."
|
|
938
939
|
);
|
|
939
940
|
}
|
|
940
941
|
const idempotencyKey = _nullishCoalesce(options.idempotencyKey, () => ( `monitor-preview-${_crypto.randomUUID.call(void 0, )}`));
|
|
941
|
-
const progress =
|
|
942
|
+
const progress = _chunkHWDKRN7Ljs.createCliProgress.call(void 0, !wantsJson);
|
|
942
943
|
progress.phase(`Preview key: ${idempotencyKey}`);
|
|
943
944
|
try {
|
|
944
|
-
const payload = await new (0,
|
|
945
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.preview(
|
|
945
946
|
body,
|
|
946
947
|
{ idempotencyKey, ...limit === void 0 ? {} : { limit } }
|
|
947
948
|
);
|
|
948
949
|
progress.complete();
|
|
949
|
-
|
|
950
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
|
|
950
951
|
json: options.json,
|
|
951
952
|
text: renderMonitorPreviewText(payload)
|
|
952
953
|
});
|
|
@@ -973,7 +974,7 @@ var MONITOR_PREVIEW_NEW_KEY_CODES = /* @__PURE__ */ new Set([
|
|
|
973
974
|
"monitor_preview_outcome_unknown"
|
|
974
975
|
]);
|
|
975
976
|
function previewRetryableWithSameKey(error) {
|
|
976
|
-
if (!(error instanceof
|
|
977
|
+
if (!(error instanceof _chunkBBTKAASQjs.DeeplineError)) return true;
|
|
977
978
|
const code = error.code;
|
|
978
979
|
if (code !== void 0 && MONITOR_PREVIEW_NEW_KEY_CODES.has(code)) {
|
|
979
980
|
return false;
|
|
@@ -991,7 +992,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
991
992
|
argLabel: "<definition>",
|
|
992
993
|
command: "deepline monitors deploy"
|
|
993
994
|
});
|
|
994
|
-
const client = new (0,
|
|
995
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
995
996
|
const definitionArg = body;
|
|
996
997
|
if (options.dryRun) {
|
|
997
998
|
const payload2 = await client.monitors.deploy(definitionArg, {
|
|
@@ -999,7 +1000,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
999
1000
|
});
|
|
1000
1001
|
const valid = payload2.valid !== false;
|
|
1001
1002
|
const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _39 => _39(payload2), 'optionalAccess', _40 => _40.identity_conflict]));
|
|
1002
|
-
|
|
1003
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
1003
1004
|
{ dry_run: true, ...payload2 },
|
|
1004
1005
|
{ json: options.json, text: renderMonitorDeployPlan(payload2) }
|
|
1005
1006
|
);
|
|
@@ -1009,7 +1010,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
1009
1010
|
return;
|
|
1010
1011
|
}
|
|
1011
1012
|
const payload = await client.monitors.deploy(definitionArg);
|
|
1012
|
-
|
|
1013
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
|
|
1013
1014
|
json: options.json,
|
|
1014
1015
|
text: renderMonitorDeployCompletion(payload)
|
|
1015
1016
|
});
|
|
@@ -1021,29 +1022,29 @@ async function handleMonitorsSync(definition, options) {
|
|
|
1021
1022
|
argLabel: "<definition>",
|
|
1022
1023
|
command: "deepline monitors sync"
|
|
1023
1024
|
});
|
|
1024
|
-
const payload = await new (0,
|
|
1025
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.sync(body, {
|
|
1025
1026
|
...options.dryRun ? { dryRun: true } : {},
|
|
1026
1027
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
|
|
1027
1028
|
});
|
|
1028
1029
|
if (options.dryRun) {
|
|
1029
1030
|
const plan = payload;
|
|
1030
|
-
|
|
1031
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
1031
1032
|
{ dry_run: true, ...plan },
|
|
1032
1033
|
{ json: options.json, text: renderMonitorDeployPlan(plan) }
|
|
1033
1034
|
);
|
|
1034
1035
|
return;
|
|
1035
1036
|
}
|
|
1036
|
-
|
|
1037
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
|
|
1037
1038
|
json: options.json,
|
|
1038
1039
|
text: renderMonitorJob(payload)
|
|
1039
1040
|
});
|
|
1040
1041
|
}
|
|
1041
1042
|
async function handleScalarMonitorLifecycle(action, key, options) {
|
|
1042
|
-
const payload = await new (0,
|
|
1043
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors[action](key, {
|
|
1043
1044
|
...options.dryRun ? { dryRun: true } : {},
|
|
1044
1045
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
|
|
1045
1046
|
});
|
|
1046
|
-
|
|
1047
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
|
|
1047
1048
|
json: options.json,
|
|
1048
1049
|
text: options.dryRun ? void 0 : renderMonitorJob(payload)
|
|
1049
1050
|
});
|
|
@@ -1124,7 +1125,7 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
1124
1125
|
"A Batch file is required. Pass --file batch.json (or --file - for stdin)."
|
|
1125
1126
|
);
|
|
1126
1127
|
}
|
|
1127
|
-
const lint =
|
|
1128
|
+
const lint = _chunkU2LVWCTDjs.lintMonitorBatchInput.call(void 0,
|
|
1128
1129
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1129
1130
|
);
|
|
1130
1131
|
if (!lint.normalized) {
|
|
@@ -1132,11 +1133,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
1132
1133
|
lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
|
|
1133
1134
|
);
|
|
1134
1135
|
}
|
|
1135
|
-
const payload = await new (0,
|
|
1136
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.batch.deploy(
|
|
1136
1137
|
lint.normalized.monitors,
|
|
1137
1138
|
{ idempotencyKey }
|
|
1138
1139
|
);
|
|
1139
|
-
|
|
1140
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
1140
1141
|
{
|
|
1141
1142
|
...payload,
|
|
1142
1143
|
idempotency_key: idempotencyKey,
|
|
@@ -1154,7 +1155,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1154
1155
|
"monitors batches sync requires --file <batch.json>."
|
|
1155
1156
|
);
|
|
1156
1157
|
}
|
|
1157
|
-
const lint =
|
|
1158
|
+
const lint = _chunkU2LVWCTDjs.lintMonitorBatchInput.call(void 0,
|
|
1158
1159
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1159
1160
|
);
|
|
1160
1161
|
if (!lint.normalized) {
|
|
@@ -1169,7 +1170,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1169
1170
|
);
|
|
1170
1171
|
}
|
|
1171
1172
|
if (options.dryRun) {
|
|
1172
|
-
|
|
1173
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
1173
1174
|
{
|
|
1174
1175
|
ok: true,
|
|
1175
1176
|
dry_run: true,
|
|
@@ -1186,7 +1187,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1186
1187
|
"sync",
|
|
1187
1188
|
options.idempotencyKey
|
|
1188
1189
|
);
|
|
1189
|
-
const payload = await new (0,
|
|
1190
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.batches.sync(
|
|
1190
1191
|
batchId,
|
|
1191
1192
|
lint.normalized.monitors,
|
|
1192
1193
|
{
|
|
@@ -1194,14 +1195,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1194
1195
|
...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
|
|
1195
1196
|
}
|
|
1196
1197
|
);
|
|
1197
|
-
|
|
1198
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
1198
1199
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1199
1200
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1200
1201
|
);
|
|
1201
1202
|
}
|
|
1202
1203
|
async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
1203
1204
|
if (options.dryRun) {
|
|
1204
|
-
|
|
1205
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
1205
1206
|
{
|
|
1206
1207
|
ok: true,
|
|
1207
1208
|
dry_run: true,
|
|
@@ -1217,17 +1218,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
|
1217
1218
|
intent,
|
|
1218
1219
|
options.idempotencyKey
|
|
1219
1220
|
);
|
|
1220
|
-
const payload = await new (0,
|
|
1221
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
1221
1222
|
idempotencyKey
|
|
1222
1223
|
});
|
|
1223
|
-
|
|
1224
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
1224
1225
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1225
1226
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1226
1227
|
);
|
|
1227
1228
|
}
|
|
1228
1229
|
async function handleNamedMonitorBatchGet(batchId, options) {
|
|
1229
|
-
const payload = await new (0,
|
|
1230
|
-
|
|
1230
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.batches.get(batchId);
|
|
1231
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
|
|
1231
1232
|
json: options.json,
|
|
1232
1233
|
text: renderMonitorJob(payload)
|
|
1233
1234
|
});
|
|
@@ -1238,10 +1239,10 @@ async function handleMonitorBatchLint(options) {
|
|
|
1238
1239
|
"monitors batch lint requires --file <batch.json>."
|
|
1239
1240
|
);
|
|
1240
1241
|
}
|
|
1241
|
-
const result =
|
|
1242
|
+
const result = _chunkU2LVWCTDjs.lintMonitorBatchInput.call(void 0,
|
|
1242
1243
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1243
1244
|
);
|
|
1244
|
-
|
|
1245
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
1245
1246
|
{
|
|
1246
1247
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1247
1248
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1258,10 +1259,10 @@ async function handleMonitorFleetLint(options) {
|
|
|
1258
1259
|
"monitors fleets lint requires --file <fleet.json>."
|
|
1259
1260
|
);
|
|
1260
1261
|
}
|
|
1261
|
-
const result =
|
|
1262
|
+
const result = _chunkWOQO3GV4js.lintMonitorFleetInput.call(void 0,
|
|
1262
1263
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1263
1264
|
);
|
|
1264
|
-
|
|
1265
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
1265
1266
|
{
|
|
1266
1267
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1267
1268
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1273,32 +1274,32 @@ async function handleMonitorFleetLint(options) {
|
|
|
1273
1274
|
process.exitCode = 2;
|
|
1274
1275
|
}
|
|
1275
1276
|
async function handleMonitorJobGet(jobId, options) {
|
|
1276
|
-
const payload = await new (0,
|
|
1277
|
-
|
|
1277
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1278
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
|
|
1278
1279
|
json: options.json,
|
|
1279
1280
|
text: renderMonitorJob(payload)
|
|
1280
1281
|
});
|
|
1281
1282
|
}
|
|
1282
1283
|
async function handleMonitorJobWait(jobId, options) {
|
|
1283
|
-
const payload = await new (0,
|
|
1284
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1284
1285
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1285
1286
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1286
1287
|
});
|
|
1287
|
-
|
|
1288
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
|
|
1288
1289
|
json: options.json,
|
|
1289
1290
|
text: renderMonitorJob(payload)
|
|
1290
1291
|
});
|
|
1291
1292
|
}
|
|
1292
1293
|
async function handleMonitorJobLogs(jobId, options) {
|
|
1293
1294
|
const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
|
|
1294
|
-
const payload = await new (0,
|
|
1295
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1295
1296
|
...limit === void 0 ? {} : { limit }
|
|
1296
1297
|
});
|
|
1297
|
-
|
|
1298
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
1298
1299
|
}
|
|
1299
1300
|
async function handleMonitorJobCancel(jobId, options) {
|
|
1300
|
-
const payload = await new (0,
|
|
1301
|
-
|
|
1301
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1302
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
|
|
1302
1303
|
json: options.json,
|
|
1303
1304
|
text: renderMonitorJob(payload)
|
|
1304
1305
|
});
|
|
@@ -1615,7 +1616,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
|
|
|
1615
1616
|
`;
|
|
1616
1617
|
}
|
|
1617
1618
|
function reportFleetState(payload, error, options) {
|
|
1618
|
-
|
|
1619
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
1619
1620
|
{
|
|
1620
1621
|
...payload,
|
|
1621
1622
|
code: error.code,
|
|
@@ -1667,8 +1668,10 @@ function fleetColumnName(value, flag) {
|
|
|
1667
1668
|
function fleetMemberLimit(value) {
|
|
1668
1669
|
if (value === void 0) return 1e3;
|
|
1669
1670
|
const limit = fleetIntegerOption(value, "--limit");
|
|
1670
|
-
if (!limit || limit >
|
|
1671
|
-
throw new MonitorsUsageError(
|
|
1671
|
+
if (!limit || limit > _chunkWOQO3GV4js.MONITOR_FLEET_MAX_MEMBERS) {
|
|
1672
|
+
throw new MonitorsUsageError(
|
|
1673
|
+
`--limit must be between 1 and ${_chunkWOQO3GV4js.MONITOR_FLEET_MAX_MEMBERS.toLocaleString("en-US")}.`
|
|
1674
|
+
);
|
|
1672
1675
|
}
|
|
1673
1676
|
return limit;
|
|
1674
1677
|
}
|
|
@@ -1747,7 +1750,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
|
|
|
1747
1750
|
_fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
|
|
1748
1751
|
`, "utf8");
|
|
1749
1752
|
const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
|
|
1750
|
-
|
|
1753
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
1751
1754
|
{ schemaVersion: 2, file, definition, next },
|
|
1752
1755
|
{
|
|
1753
1756
|
json: options.json,
|
|
@@ -1758,7 +1761,7 @@ Next: ${next}
|
|
|
1758
1761
|
);
|
|
1759
1762
|
}
|
|
1760
1763
|
function requireCompiledFleetDefinition(definition) {
|
|
1761
|
-
const result =
|
|
1764
|
+
const result = _chunkWOQO3GV4js.lintMonitorFleetInput.call(void 0, definition);
|
|
1762
1765
|
if (result.normalized) return result.normalized;
|
|
1763
1766
|
const messages = result.issues.map((issue) => `${issue.path || "definition"}: ${issue.message}`).join("; ");
|
|
1764
1767
|
throw new MonitorsUsageError(
|
|
@@ -1809,7 +1812,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1809
1812
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1810
1813
|
);
|
|
1811
1814
|
}
|
|
1812
|
-
const client = new (0,
|
|
1815
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
1813
1816
|
const payload = await client.monitors.fleets.sync(
|
|
1814
1817
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1815
1818
|
{
|
|
@@ -1831,7 +1834,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1831
1834
|
}
|
|
1832
1835
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1833
1836
|
if (!options.wait || options.dryRun) {
|
|
1834
|
-
|
|
1837
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, accepted, {
|
|
1835
1838
|
json: options.json,
|
|
1836
1839
|
text: renderFleetSync(payload, {
|
|
1837
1840
|
fleetId,
|
|
@@ -1857,7 +1860,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1857
1860
|
const status = fleetStatus(final);
|
|
1858
1861
|
const summary = renderFleetGet(final);
|
|
1859
1862
|
if (status === "converged") {
|
|
1860
|
-
|
|
1863
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1861
1864
|
return;
|
|
1862
1865
|
}
|
|
1863
1866
|
if (status === "billing_suspended") {
|
|
@@ -1897,14 +1900,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1897
1900
|
);
|
|
1898
1901
|
}
|
|
1899
1902
|
const limit = options.limit === void 0 ? void 0 : fleetIntegerOption(options.limit, "--limit");
|
|
1900
|
-
const client = new (0,
|
|
1903
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
1901
1904
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1902
1905
|
...options.drift ? { drift: true } : {},
|
|
1903
1906
|
...limit !== void 0 ? { limit } : {}
|
|
1904
1907
|
});
|
|
1905
1908
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1906
1909
|
if (!options.check) {
|
|
1907
|
-
|
|
1910
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1908
1911
|
return;
|
|
1909
1912
|
}
|
|
1910
1913
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -1912,7 +1915,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1912
1915
|
);
|
|
1913
1916
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
1914
1917
|
if (unconverged.length === 0) {
|
|
1915
|
-
|
|
1918
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1916
1919
|
return;
|
|
1917
1920
|
}
|
|
1918
1921
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -2075,7 +2078,7 @@ function renderFleetIssuePage(payload) {
|
|
|
2075
2078
|
}
|
|
2076
2079
|
async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
2077
2080
|
const window = fleetChoice(options.window, LEDGER_WINDOWS, "--window");
|
|
2078
|
-
const client = new (0,
|
|
2081
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
2079
2082
|
if (fleetId) {
|
|
2080
2083
|
const listOnly = [
|
|
2081
2084
|
options.q !== void 0 ? "--q" : "",
|
|
@@ -2090,7 +2093,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2090
2093
|
const payload2 = await client.monitors.fleets.overview(fleetId, {
|
|
2091
2094
|
...window ? { window } : {}
|
|
2092
2095
|
});
|
|
2093
|
-
|
|
2096
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2094
2097
|
json: options.json,
|
|
2095
2098
|
text: renderFleetOverviewDetail(payload2, window)
|
|
2096
2099
|
});
|
|
@@ -2106,7 +2109,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2106
2109
|
...sort ? { sort } : {},
|
|
2107
2110
|
...window ? { window } : {}
|
|
2108
2111
|
});
|
|
2109
|
-
|
|
2112
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
|
|
2110
2113
|
json: options.json,
|
|
2111
2114
|
text: renderFleetOverviewList(payload)
|
|
2112
2115
|
});
|
|
@@ -2117,13 +2120,13 @@ async function handleMonitorFleetsIssues(fleetId, options) {
|
|
|
2117
2120
|
if (limit !== void 0 && (limit < 1 || limit > 100)) {
|
|
2118
2121
|
throw new MonitorsUsageError("--limit must be an integer from 1 to 100.");
|
|
2119
2122
|
}
|
|
2120
|
-
const payload = await new (0,
|
|
2123
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.fleets.issues(fleetId, {
|
|
2121
2124
|
...group ? { group } : {},
|
|
2122
2125
|
...options.cause ? { cause: options.cause } : {},
|
|
2123
2126
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
2124
2127
|
...limit !== void 0 ? { limit } : {}
|
|
2125
2128
|
});
|
|
2126
|
-
|
|
2129
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, {
|
|
2127
2130
|
json: options.json,
|
|
2128
2131
|
text: renderFleetIssuePage(payload)
|
|
2129
2132
|
});
|
|
@@ -2152,13 +2155,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2152
2155
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
2153
2156
|
);
|
|
2154
2157
|
}
|
|
2155
|
-
const client = new (0,
|
|
2158
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
2156
2159
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
2157
2160
|
idempotencyKey
|
|
2158
2161
|
});
|
|
2159
2162
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2160
2163
|
if (!options.wait) {
|
|
2161
|
-
|
|
2164
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2162
2165
|
json: options.json,
|
|
2163
2166
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
2164
2167
|
idempotency key ${idempotencyKey}
|
|
@@ -2181,7 +2184,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2181
2184
|
const envelope = { ...accepted, ...final };
|
|
2182
2185
|
const text = renderFleetGet(final);
|
|
2183
2186
|
if (fleetStatus(final) === "converged") {
|
|
2184
|
-
|
|
2187
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
2185
2188
|
return;
|
|
2186
2189
|
}
|
|
2187
2190
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2230,7 +2233,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
2230
2233
|
}
|
|
2231
2234
|
}
|
|
2232
2235
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
2233
|
-
const client = new (0,
|
|
2236
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
2234
2237
|
if (options.dryRun) {
|
|
2235
2238
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
2236
2239
|
dryRun: true,
|
|
@@ -2240,7 +2243,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
2240
2243
|
command: "deepline monitors fleets deactivate",
|
|
2241
2244
|
mutation: "fleet deactivate"
|
|
2242
2245
|
});
|
|
2243
|
-
|
|
2246
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, plan, {
|
|
2244
2247
|
json: options.json,
|
|
2245
2248
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
2246
2249
|
});
|
|
@@ -2278,7 +2281,7 @@ Preview the blast radius first:
|
|
|
2278
2281
|
});
|
|
2279
2282
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2280
2283
|
if (payload.already === true) {
|
|
2281
|
-
|
|
2284
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2282
2285
|
json: options.json,
|
|
2283
2286
|
text: `Fleet ${fleetId} is already deactivated.
|
|
2284
2287
|
`
|
|
@@ -2290,7 +2293,7 @@ Preview the blast radius first:
|
|
|
2290
2293
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
2291
2294
|
` : "");
|
|
2292
2295
|
if (!options.wait) {
|
|
2293
|
-
|
|
2296
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, accepted, {
|
|
2294
2297
|
json: options.json,
|
|
2295
2298
|
text: acceptedText
|
|
2296
2299
|
});
|
|
@@ -2312,7 +2315,7 @@ Preview the blast radius first:
|
|
|
2312
2315
|
const envelope = { ...accepted, ...final };
|
|
2313
2316
|
const summary = renderFleetGet(final);
|
|
2314
2317
|
if (fleetStatus(final) === "deactivated") {
|
|
2315
|
-
|
|
2318
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
2316
2319
|
return;
|
|
2317
2320
|
}
|
|
2318
2321
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2351,7 +2354,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
2351
2354
|
"Agent notes:",
|
|
2352
2355
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
2353
2356
|
];
|
|
2354
|
-
|
|
2357
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
2355
2358
|
{
|
|
2356
2359
|
schemaVersion: 1,
|
|
2357
2360
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2513,7 +2516,7 @@ function renderMonitorGet(payload) {
|
|
|
2513
2516
|
`;
|
|
2514
2517
|
}
|
|
2515
2518
|
async function handleMonitorsGet(key, options) {
|
|
2516
|
-
const client = new (0,
|
|
2519
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
2517
2520
|
const payload = await client.monitors.get(key);
|
|
2518
2521
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2519
2522
|
const dependents = boundPlays ? {
|
|
@@ -2521,24 +2524,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2521
2524
|
truncated: payload.consumer_health_truncated === true
|
|
2522
2525
|
} : await client.monitors.dependents(key);
|
|
2523
2526
|
const detail = { ...payload, dependents };
|
|
2524
|
-
|
|
2527
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, detail, {
|
|
2525
2528
|
json: options.json,
|
|
2526
2529
|
text: renderMonitorGet(detail)
|
|
2527
2530
|
});
|
|
2528
2531
|
}
|
|
2529
2532
|
async function handleMonitorsTest(key, payload, options) {
|
|
2530
2533
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2531
|
-
const result = await new (0,
|
|
2534
|
+
const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2532
2535
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2533
2536
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2534
2537
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2535
2538
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2536
2539
|
`;
|
|
2537
|
-
|
|
2540
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2538
2541
|
}
|
|
2539
2542
|
async function handleMonitorsValidate(key, options) {
|
|
2540
|
-
const result = await new (0,
|
|
2541
|
-
|
|
2543
|
+
const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.validate(key);
|
|
2544
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2542
2545
|
if (result.valid === false) process.exitCode = 7;
|
|
2543
2546
|
}
|
|
2544
2547
|
async function confirmMonitorDelete(key) {
|
|
@@ -2556,14 +2559,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2556
2559
|
}
|
|
2557
2560
|
}
|
|
2558
2561
|
async function handleMonitorsDelete(key, options) {
|
|
2559
|
-
const client = new (0,
|
|
2562
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
2560
2563
|
if (options.dryRun) {
|
|
2561
2564
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2562
2565
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2563
2566
|
command: "deepline monitors delete",
|
|
2564
2567
|
mutation: "delete"
|
|
2565
2568
|
});
|
|
2566
|
-
|
|
2569
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2567
2570
|
json: options.json,
|
|
2568
2571
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2569
2572
|
});
|
|
@@ -2583,7 +2586,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2583
2586
|
}
|
|
2584
2587
|
}
|
|
2585
2588
|
const payload = await client.monitors.delete(key);
|
|
2586
|
-
|
|
2589
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2587
2590
|
}
|
|
2588
2591
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2589
2592
|
const body = resolveMonitorJsonBody({
|
|
@@ -2592,25 +2595,25 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2592
2595
|
argLabel: "<patch>",
|
|
2593
2596
|
command: `deepline monitors update ${key}`
|
|
2594
2597
|
});
|
|
2595
|
-
const payload = await new (0,
|
|
2596
|
-
|
|
2598
|
+
const payload = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.update(key, body);
|
|
2599
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2597
2600
|
}
|
|
2598
2601
|
async function handleMonitorsReactivate(key, options) {
|
|
2599
|
-
const client = new (0,
|
|
2602
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
2600
2603
|
if (options.dryRun) {
|
|
2601
2604
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2602
2605
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2603
2606
|
command: "deepline monitors reactivate",
|
|
2604
2607
|
mutation: "reactivate"
|
|
2605
2608
|
});
|
|
2606
|
-
|
|
2609
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload2, {
|
|
2607
2610
|
json: options.json,
|
|
2608
2611
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2609
2612
|
});
|
|
2610
2613
|
return;
|
|
2611
2614
|
}
|
|
2612
2615
|
const payload = await client.monitors.reactivate(key);
|
|
2613
|
-
|
|
2616
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2614
2617
|
}
|
|
2615
2618
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2616
2619
|
function monitorHealthLine(health) {
|
|
@@ -2732,7 +2735,7 @@ function monitorHealthText(health) {
|
|
|
2732
2735
|
`;
|
|
2733
2736
|
}
|
|
2734
2737
|
async function handleMonitorsAudit(options) {
|
|
2735
|
-
const client = new (0,
|
|
2738
|
+
const client = new (0, _chunkXBAH3TKUjs.DeeplineClient)();
|
|
2736
2739
|
const fleetId = _optionalChain([options, 'access', _106 => _106.fleet, 'optionalAccess', _107 => _107.trim, 'call', _108 => _108()]) || void 0;
|
|
2737
2740
|
const scope = fleetId ? { fleetId } : {};
|
|
2738
2741
|
let result = await client.monitors.audit(scope);
|
|
@@ -2776,7 +2779,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2776
2779
|
"",
|
|
2777
2780
|
monitorHealthText(health)
|
|
2778
2781
|
].join("\n");
|
|
2779
|
-
|
|
2782
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
2780
2783
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2781
2784
|
{ json: options.json, text }
|
|
2782
2785
|
);
|
|
@@ -2789,10 +2792,10 @@ async function handleMonitorsRepair(options) {
|
|
|
2789
2792
|
}
|
|
2790
2793
|
async function handleMonitorsHealth(options) {
|
|
2791
2794
|
const fleetId = _optionalChain([options, 'access', _112 => _112.fleet, 'optionalAccess', _113 => _113.trim, 'call', _114 => _114()]) || void 0;
|
|
2792
|
-
const health = await new (0,
|
|
2795
|
+
const health = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.health(
|
|
2793
2796
|
fleetId ? { fleetId } : {}
|
|
2794
2797
|
);
|
|
2795
|
-
|
|
2798
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, health, {
|
|
2796
2799
|
json: options.json,
|
|
2797
2800
|
text: monitorHealthText(health)
|
|
2798
2801
|
});
|
|
@@ -2866,14 +2869,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2866
2869
|
"deploy",
|
|
2867
2870
|
options.idempotencyKey
|
|
2868
2871
|
);
|
|
2869
|
-
const result = await new (0,
|
|
2872
|
+
const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.batch.submit({
|
|
2870
2873
|
kind: "deploy",
|
|
2871
2874
|
manifestNdjson,
|
|
2872
2875
|
dryRun: options.dryRun === true,
|
|
2873
2876
|
idempotencyKey
|
|
2874
2877
|
});
|
|
2875
2878
|
const operation = result.operation;
|
|
2876
|
-
|
|
2879
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
2877
2880
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2878
2881
|
{
|
|
2879
2882
|
json: options.json,
|
|
@@ -2901,7 +2904,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2901
2904
|
kind,
|
|
2902
2905
|
options.idempotencyKey
|
|
2903
2906
|
);
|
|
2904
|
-
const result = await new (0,
|
|
2907
|
+
const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.batch.submit({
|
|
2905
2908
|
kind,
|
|
2906
2909
|
scope,
|
|
2907
2910
|
dryRun: options.dryRun === true,
|
|
@@ -2914,14 +2917,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2914
2917
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
2915
2918
|
`inspect: deepline monitors batch get ${operation.runId}`
|
|
2916
2919
|
].join("\n");
|
|
2917
|
-
|
|
2920
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0,
|
|
2918
2921
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2919
2922
|
{ json: options.json, text: `${text}
|
|
2920
2923
|
` }
|
|
2921
2924
|
);
|
|
2922
2925
|
}
|
|
2923
2926
|
async function handleMonitorBatchGet(operationId, options) {
|
|
2924
|
-
const result = await new (0,
|
|
2927
|
+
const result = await new (0, _chunkXBAH3TKUjs.DeeplineClient)().monitors.batch.get(operationId, {
|
|
2925
2928
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
2926
2929
|
});
|
|
2927
2930
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -2933,7 +2936,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
2933
2936
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
2934
2937
|
] : []
|
|
2935
2938
|
].join("\n");
|
|
2936
|
-
|
|
2939
|
+
_chunkLN6RXDTBjs.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
2937
2940
|
` });
|
|
2938
2941
|
}
|
|
2939
2942
|
function registerMonitorsCommands(program) {
|
|
@@ -3652,9 +3655,9 @@ ${MONITOR_FLEET_HELP_EPILOG}`
|
|
|
3652
3655
|
fleets.command("init <fleet-id>").description("Write an opinionated Fleet definition JSON file.").addHelpText(
|
|
3653
3656
|
"after",
|
|
3654
3657
|
`
|
|
3655
|
-
Creates a ready-to-review JSON definition. Fleets always sync ${
|
|
3656
|
-
|
|
3657
|
-
policies are not authored in the file. ${
|
|
3658
|
+
Creates a ready-to-review JSON definition. Fleets always sync on a ${_chunkWOQO3GV4js.MONITOR_FLEET_DOCUMENTATION.fixedPolicy.cadence} and
|
|
3659
|
+
${_chunkWOQO3GV4js.MONITOR_FLEET_DOCUMENTATION.fixedPolicy.onRemoved} a member as soon as the source no longer returns its row; those
|
|
3660
|
+
policies are not authored in the file. ${_chunkWOQO3GV4js.MONITOR_FLEET_DOCUMENTATION.stickyMembership} The payload remains the actual monitor payload for the chosen tool, so use
|
|
3658
3661
|
\`deepline tools list --categories monitors\` to discover a tool first.
|
|
3659
3662
|
|
|
3660
3663
|
Example:
|