deepline 0.3.542 → 0.3.544
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 +112 -2
- package/dist/bundling-sources/sdk/src/index.ts +7 -0
- package/dist/bundling-sources/sdk/src/integrations.ts +198 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +3 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +35 -11
- package/dist/bundling-sources/sdk/src/types.ts +10 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/calendar-delegation.ts +132 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/monitor-fleet-contract.ts +3 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/tool-connection.ts +13 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/plan.ts +108 -1
- package/dist/bundling-sources/shared_libs/monitors/package.json +1 -1
- package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
- package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +5 -5
- package/dist/bundling-sources/shared_libs/play-data-plane/sheet-contract.ts +34 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +11 -5
- package/dist/bundling-sources/shared_libs/play-runtime/baked-runner-image.ts +9 -7
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +235 -12
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +20 -1
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-janitor.ts +39 -30
- package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +29 -0
- package/dist/bundling-sources/shared_libs/play-runtime/event-wait-tools.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +10 -4
- package/dist/bundling-sources/shared_libs/play-runtime/fleet-sandbox-sweep.ts +209 -0
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +24 -1
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/contracts.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +6 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +37 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +43 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-tool-hooks.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-modal-fallback.ts +15 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +23 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +320 -836
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/vercel-sandbox.ts +1061 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +862 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +45 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/sandbox-create-outcome.ts +3 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +11 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-contract.ts +20 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-placement-policy.ts +71 -34
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-provider-profile.ts +286 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +4 -1
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +12 -3
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +49 -55
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-required-env.ts +127 -5
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +214 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/managed-sandbox-resource-sql.ts +118 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +229 -144
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +11 -13
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-operation.ts +42 -7
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/suspension.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/vercel-sandbox-runtime-config.ts +217 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +23 -0
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +1 -0
- package/dist/bundling-sources/shared_libs/plays/script-entry.ts +76 -6
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +1 -0
- package/dist/bundling-sources/shared_libs/security/credential-revision.ts +50 -0
- package/dist/bundling-sources/shared_libs/security/internal-actor.ts +2 -1
- package/dist/bundling-sources/shared_libs/security/receipt-admission-token.ts +37 -0
- package/dist/cli/auth-ENBXAKQS.js +43 -0
- package/dist/cli/{auth-IGBGOB4E.mjs → auth-IMWJAHPU.mjs} +5 -5
- package/dist/cli/{billing-IB2TWE74.js → billing-Y55PR2PV.js} +101 -101
- package/dist/cli/{billing-N37W2I62.mjs → billing-YQMW3QJI.mjs} +12 -12
- package/dist/cli/chunk-22OBDYHP.js +455 -0
- package/dist/cli/{chunk-GBAT5NMI.mjs → chunk-2HSZCQMT.mjs} +48 -6
- package/dist/cli/{chunk-VLEVVDWG.js → chunk-2JHYYB3F.js} +3 -3
- package/dist/cli/{chunk-D44DP4KJ.js → chunk-3I26HMJ7.js} +37 -17
- package/dist/cli/{chunk-B5NP3SHX.mjs → chunk-3JDA23NN.mjs} +2 -2
- package/dist/cli/{chunk-QXNOSCYL.js → chunk-3KGMM4KS.js} +1 -1
- package/dist/cli/{chunk-6WQDHEVF.mjs → chunk-456RRXAP.mjs} +5 -5
- package/dist/cli/{chunk-V4EYJKGJ.js → chunk-4JQEAYN3.js} +156 -17
- package/dist/cli/{chunk-FGGPCAGC.js → chunk-4PKHFW56.js} +18 -18
- package/dist/cli/{chunk-QONO7FRF.mjs → chunk-57G4NYOL.mjs} +1 -1
- package/dist/cli/{chunk-46V7QSJE.mjs → chunk-5PR4VLLL.mjs} +3 -3
- package/dist/cli/{chunk-OLH2PHMC.mjs → chunk-6P7TGCHQ.mjs} +1 -1
- package/dist/cli/{chunk-AKY7KZRJ.js → chunk-7GNZEOTH.js} +6 -6
- package/dist/cli/{chunk-LFMQVSEI.js → chunk-7HMMTSDA.js} +5 -5
- package/dist/cli/{chunk-ORA5TMML.mjs → chunk-BEQ7RQLT.mjs} +5 -5
- package/dist/cli/{chunk-KQSTV4MW.js → chunk-BLYW6FFB.js} +60 -18
- package/dist/cli/{chunk-GM73TZ2W.js → chunk-C4P2KLWT.js} +41 -41
- package/dist/cli/{chunk-DNGACHFX.js → chunk-COJHT2KF.js} +22 -22
- package/dist/cli/{chunk-6SLEHAXX.js → chunk-DF2X7GJG.js} +5 -5
- package/dist/cli/{chunk-TT4JUUC3.mjs → chunk-DVDWAC2M.mjs} +7 -3
- package/dist/cli/{chunk-5CAVURVS.js → chunk-DYDHLBSK.js} +53 -53
- package/dist/cli/{chunk-UNDLNT3V.js → chunk-ECWOIXAV.js} +1 -1
- package/dist/cli/{chunk-EHLCWGWN.js → chunk-G26VJCNT.js} +4 -4
- package/dist/cli/{chunk-WL2GUGNZ.js → chunk-GQHRGBHV.js} +7 -7
- package/dist/cli/{chunk-DADH3WPE.mjs → chunk-GV45TTI6.mjs} +2 -2
- package/dist/cli/{chunk-OVX3Q5Q3.mjs → chunk-GWNYLIF7.mjs} +1 -1
- package/dist/cli/{chunk-EGOCGWCI.mjs → chunk-H4SAHB3Q.mjs} +3 -3
- package/dist/cli/{chunk-FX4OWXKK.mjs → chunk-HAQRF6DJ.mjs} +2 -2
- package/dist/cli/{chunk-NLZHLEHD.mjs → chunk-HBSWATOU.mjs} +6 -6
- package/dist/cli/{chunk-ACVTMAW4.mjs → chunk-HVJQF5BI.mjs} +2 -2
- package/dist/cli/{chunk-L2VKAASU.mjs → chunk-HXIR3VQL.mjs} +21 -0
- package/dist/cli/{chunk-Z5YRKX7K.mjs → chunk-HXM2JUGD.mjs} +1 -1
- package/dist/cli/{chunk-JPT6VE54.js → chunk-IFIJ4DBJ.js} +2 -2
- package/dist/cli/{chunk-HAITCPCG.js → chunk-JBWOE6AP.js} +16 -16
- package/dist/cli/{chunk-AWLPERL3.js → chunk-JWVG7ZPX.js} +3 -3
- package/dist/cli/{chunk-3XXXMSSP.js → chunk-KE6CSCUF.js} +44 -44
- package/dist/cli/{chunk-2ZGSHVZE.mjs → chunk-LPUBBUKX.mjs} +24 -4
- package/dist/cli/{chunk-PLIKPGOO.mjs → chunk-LQ6RRYXN.mjs} +5 -5
- package/dist/cli/{chunk-FFDZT255.mjs → chunk-LW274RO7.mjs} +1 -1
- package/dist/cli/{chunk-Z2XA6YU4.mjs → chunk-LX35AXTN.mjs} +1 -0
- package/dist/cli/{chunk-FANIRW74.mjs → chunk-NIPLY25A.mjs} +0 -2
- package/dist/cli/{chunk-VHJUH3TB.js → chunk-ON56ISO6.js} +3 -3
- package/dist/cli/{chunk-4I47NCRI.js → chunk-PDJ4UDCO.js} +498 -328
- package/dist/cli/{chunk-SWO5QOXB.mjs → chunk-PFGOCUH3.mjs} +1 -1
- package/dist/cli/{chunk-Q7WDXLYO.js → chunk-PKRW76XG.js} +2 -2
- package/dist/cli/{chunk-YK7NNZD4.mjs → chunk-PMW5YP72.mjs} +37 -190
- package/dist/cli/{chunk-5APOJWJF.mjs → chunk-Q7ZOWNKR.mjs} +183 -13
- package/dist/cli/{chunk-WACIN4PR.mjs → chunk-REEOMNCO.mjs} +3 -3
- package/dist/cli/{chunk-DMXLZ57N.js → chunk-RG34YBDE.js} +2 -2
- package/dist/cli/{chunk-3LEUSRV3.mjs → chunk-RJPDCSTD.mjs} +4 -4
- package/dist/cli/{chunk-IPVRMYWT.js → chunk-RKF263LR.js} +5 -5
- package/dist/cli/{chunk-AUFE624T.js → chunk-RUFR4PUO.js} +10 -10
- package/dist/cli/{chunk-I5EAIFGO.mjs → chunk-SK3HPU2J.mjs} +1 -1
- package/dist/cli/{chunk-ZVNYBQ77.mjs → chunk-SKS53WM6.mjs} +4 -4
- package/dist/cli/{chunk-CQDQNZGH.js → chunk-SL6MYJYM.js} +1 -0
- package/dist/cli/{chunk-E4CABWXL.js → chunk-TI6DTURF.js} +22 -1
- package/dist/cli/{chunk-CFZCRM6R.js → chunk-UHIAQPVA.js} +26 -26
- package/dist/cli/{chunk-D7GWEBMF.js → chunk-UNMNGRPB.js} +7 -7
- package/dist/cli/{chunk-GWHA4DAC.js → chunk-UV4RU2TE.js} +0 -2
- package/dist/cli/{chunk-TTBHOMAA.js → chunk-W7X4KH45.js} +316 -469
- package/dist/cli/chunk-WBSGPLH5.mjs +455 -0
- package/dist/cli/{chunk-SCLP5H4P.mjs → chunk-WUEORIOY.mjs} +1 -1
- package/dist/cli/{chunk-IDDKNMFX.mjs → chunk-Y3T5GWYK.mjs} +153 -14
- package/dist/cli/{chunk-P4MDTBAA.mjs → chunk-YIRVKMON.mjs} +1 -1
- package/dist/cli/{chunk-NDNEARE3.js → chunk-Z44YTSTA.js} +13 -13
- package/dist/cli/{chunk-F6QV42MC.mjs → chunk-Z7SXGOIQ.mjs} +1 -1
- package/dist/cli/{chunk-2VRKBHMD.mjs → chunk-ZHY4T5M6.mjs} +1 -1
- package/dist/cli/{chunk-E7B73LGT.js → chunk-ZY6FL4O4.js} +24 -20
- package/dist/cli/command-docs.js +3 -3
- package/dist/cli/command-docs.mjs +2 -2
- package/dist/cli/{concurrent-runs-help-DIBGMEIN.mjs → concurrent-runs-help-KBWPKSTP.mjs} +7 -7
- package/dist/cli/concurrent-runs-help-TOMLCMV7.js +21 -0
- package/dist/cli/{csv-CAVA3EMS.mjs → csv-M5EBEMZH.mjs} +4 -4
- package/dist/cli/{csv-XZAM7EYZ.js → csv-XGGDZTQI.js} +13 -13
- package/dist/cli/{db-PPGEOBNG.js → db-CVPR54XK.js} +29 -29
- package/dist/cli/{db-HD332QI7.mjs → db-M6FJ6J6E.mjs} +8 -8
- package/dist/cli/describe-RUODIS6M.js +50 -0
- package/dist/cli/describe-X6QA2U3C.mjs +50 -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 +3 -3
- package/dist/cli/describe-core.mjs +2 -2
- package/dist/cli/{executions-AFEOLB4A.mjs → executions-EHTS2XJX.mjs} +8 -8
- package/dist/cli/{executions-4ZKBL7IC.js → executions-VJEEWN22.js} +10 -10
- package/dist/cli/{feedback-J2YPLKMF.mjs → feedback-76VGY4GP.mjs} +6 -6
- package/dist/cli/{feedback-M6Y33JKT.js → feedback-DQPUCUXO.js} +14 -14
- package/dist/cli/{git-632RYEF6.mjs → git-IY6DKKLR.mjs} +5 -5
- package/dist/cli/git-RLHTSYRY.js +25 -0
- package/dist/cli/index.js +150 -146
- package/dist/cli/index.mjs +49 -45
- package/dist/cli/integrations-242LE3TQ.mjs +98 -0
- package/dist/cli/integrations-CQSTIKFY.js +98 -0
- package/dist/cli/{legacy-noops-KWZMXYAU.mjs → legacy-noops-SWTSTMRY.mjs} +6 -6
- package/dist/cli/{legacy-noops-4Y62TKPC.js → legacy-noops-U72DO6ZF.js} +9 -9
- package/dist/cli/{mcp-PESLHAAC.mjs → mcp-JJH6JR52.mjs} +72 -15
- package/dist/cli/{mcp-35QA6YG7.js → mcp-L473BKLJ.js} +89 -32
- package/dist/cli/{monitors-4DTUZLAI.js → monitors-3TF2DOFD.js} +119 -104
- package/dist/cli/{monitors-YVBKBJBU.mjs → monitors-VSYHUBKC.mjs} +26 -11
- package/dist/cli/{org-DJNKMFCZ.mjs → org-S5VIKU2E.mjs} +8 -8
- package/dist/cli/{org-FWCBZMER.js → org-YKVI2ZTI.js} +90 -90
- package/dist/cli/{play-PHVQEEEZ.mjs → play-C7T5A3QM.mjs} +44 -25
- package/dist/cli/{play-FZ45M4KD.js → play-DOWEG45Y.js} +374 -355
- package/dist/cli/{providers-46E67QG7.mjs → providers-BMVVX3VD.mjs} +10 -9
- package/dist/cli/{providers-QJU6FMDD.js → providers-TAZPPFTB.js} +13 -12
- package/dist/cli/{quickstart-6HMJJ4RR.mjs → quickstart-A3WKMKTW.mjs} +4 -4
- package/dist/cli/{quickstart-HOL7H5FS.js → quickstart-HD6FQXGR.js} +6 -6
- package/dist/cli/{run-WKSIRXEC.js → run-BVVV2UX7.js} +49 -48
- package/dist/cli/{run-2W2TJ6QA.mjs → run-FV7TWNOC.mjs} +28 -27
- package/dist/cli/{search-Y2CFLSYB.mjs → search-MGK6WIKS.mjs} +9 -9
- package/dist/cli/search-VJFCWUZN.js +32 -0
- package/dist/cli/{search-output-2IK6ZZDY.js → search-output-6Y7KEPIE.js} +6 -6
- package/dist/cli/{search-output-FCZ35PHF.mjs → search-output-GM7LDZKE.mjs} +4 -4
- package/dist/cli/{secrets-PNPNUZLX.mjs → secrets-4RFAR7YI.mjs} +8 -8
- package/dist/cli/{secrets-JVJIHGU4.js → secrets-SISXIXSZ.js} +17 -17
- package/dist/cli/{sessions-GY5VVQGO.mjs → sessions-CE3OMEG7.mjs} +6 -6
- package/dist/cli/sessions-OWWZJZXH.js +22 -0
- package/dist/cli/{settings-5WHMFRNQ.js → settings-4HPM3K4A.js} +89 -89
- package/dist/cli/{settings-YQOPF3AI.mjs → settings-E22IDSX2.mjs} +16 -16
- package/dist/cli/{setup-3VJMKDEU.js → setup-BDRSNLKX.js} +49 -49
- package/dist/cli/{setup-O5U5IEVW.mjs → setup-BK65MDZ6.mjs} +9 -9
- package/dist/cli/{skills-G6J5PF35.mjs → skills-FI2GZMR4.mjs} +7 -7
- package/dist/cli/skills-ZLBFUAFR.js +36 -0
- package/dist/cli/tools-3K72VE33.js +57 -0
- package/dist/cli/{tools-AG7SWL5Y.mjs → tools-HMMWYUNW.mjs} +20 -19
- package/dist/cli/update-QZV6DH5V.js +34 -0
- package/dist/cli/{update-K73DD6CR.mjs → update-WDKBSXV5.mjs} +9 -9
- package/dist/cli/{views-4D2OTLIO.js → views-775AUDWQ.js} +23 -23
- package/dist/cli/{views-MO6DIOMR.mjs → views-JYIJCO23.mjs} +8 -8
- package/dist/cli/{workflow-ZEMFCS4Y.js → workflow-4H6KQRFQ.js} +19 -19
- package/dist/cli/{workflow-MMZMAELI.mjs → workflow-FKKHE3IU.mjs} +9 -9
- package/dist/{client-DLG9mHDh.d.mts → client-ANT3pyoa.d.mts} +1 -1
- package/dist/{client-X-FJD5Dp.d.ts → client-DD_FyJVd.d.ts} +1 -1
- package/dist/{client-core-WtnqyBwY.d.mts → client-core-Dg9tKhdB.d.mts} +339 -3
- package/dist/{client-core-0jmHfFBv.d.ts → client-core-QHmo73k1.d.ts} +339 -3
- package/dist/{compiler-manifest-Cys06iYg.d.mts → compiler-manifest-BWFtsQIC.d.mts} +21 -0
- package/dist/{compiler-manifest-Cys06iYg.d.ts → compiler-manifest-BWFtsQIC.d.ts} +21 -0
- package/dist/{errors-B6eMjKcr.d.mts → errors-CwKXXtuu.d.mts} +1 -1
- package/dist/{errors-rdOUqcU2.d.ts → errors-Lm9_vJHZ.d.ts} +1 -1
- package/dist/{index-ejWadAL5.d.ts → index-3vJ-V9yw.d.ts} +1 -1
- package/dist/{index-CZdYO81A.d.mts → index-DjwsAt82.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +12 -12
- package/dist/index.mjs +8 -8
- package/dist/install-integrity.json +147 -133
- 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 +23 -4
- 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 +2 -2
- package/dist/plays/run-request.mjs +1 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +7 -7
- package/dist/server.mjs +5 -5
- package/package.json +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal-resource-usage.ts +0 -222
- package/dist/cli/auth-2PH6RSKL.js +0 -43
- package/dist/cli/concurrent-runs-help-BNIDBKML.js +0 -21
- package/dist/cli/describe-5TFFB2PM.js +0 -49
- package/dist/cli/describe-THQU7N47.mjs +0 -49
- package/dist/cli/git-AQLQYWRI.js +0 -25
- package/dist/cli/search-YLJFCJTK.js +0 -32
- package/dist/cli/sessions-TZ33UCPS.js +0 -22
- package/dist/cli/skills-WZY3XDT3.js +0 -36
- package/dist/cli/tools-BXQBL72Q.js +0 -56
- package/dist/cli/update-XYP5EII6.js +0 -34
|
@@ -1,10 +1,10 @@
|
|
|
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-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
4
|
+
var _chunkDF2X7GJGjs = require('./chunk-DF2X7GJG.js');
|
|
5
|
+
require('./chunk-PDJ4UDCO.js');
|
|
6
|
+
require('./chunk-TI6DTURF.js');
|
|
7
|
+
require('./chunk-SL6MYJYM.js');
|
|
8
8
|
require('./chunk-PMH4GLMD.js');
|
|
9
9
|
require('./chunk-XDVT3GOM.js');
|
|
10
10
|
|
|
@@ -18,15 +18,15 @@ require('./chunk-UNEMDKXN.js');
|
|
|
18
18
|
var _chunkU2LVWCTDjs = require('./chunk-U2LVWCTD.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkJWVG7ZPXjs = require('./chunk-JWVG7ZPX.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
28
|
-
require('./chunk-
|
|
29
|
-
require('./chunk-
|
|
27
|
+
var _chunkZY6FL4O4js = require('./chunk-ZY6FL4O4.js');
|
|
28
|
+
require('./chunk-ON56ISO6.js');
|
|
29
|
+
require('./chunk-G26VJCNT.js');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
var _chunk2GJZLIKWjs = require('./chunk-2GJZLIKW.js');
|
|
@@ -34,7 +34,7 @@ require('./chunk-XNYIZMNQ.js');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
var _chunkBBTKAASQjs = require('./chunk-BBTKAASQ.js');
|
|
37
|
-
require('./chunk-
|
|
37
|
+
require('./chunk-3KGMM4KS.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 = _chunkZY6FL4O4js.shouldEmitJson.call(void 0, process.argv.includes("--json"));
|
|
116
116
|
if (wantsJson) {
|
|
117
|
-
const payload =
|
|
118
|
-
|
|
117
|
+
const payload = _chunkZY6FL4O4js.errorToJsonPayload.call(void 0, error);
|
|
118
|
+
_chunkZY6FL4O4js.printJson.call(void 0, {
|
|
119
119
|
ok: false,
|
|
120
120
|
exitCode,
|
|
121
121
|
...next ? { next } : {},
|
|
@@ -535,14 +535,14 @@ Preview the plan first with:
|
|
|
535
535
|
);
|
|
536
536
|
}
|
|
537
537
|
async function handleMonitorsStatus(options) {
|
|
538
|
-
const payload = await new (0,
|
|
538
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.status();
|
|
539
539
|
const hasAccess = payload.has_access === true;
|
|
540
540
|
const reason = typeof payload.reason === "string" && payload.reason.trim() ? payload.reason.trim() : void 0;
|
|
541
541
|
const text = hasAccess ? `\u2713 You have access to Deepline Monitors${reason ? `
|
|
542
542
|
${reason}` : ""}
|
|
543
543
|
` : `\u2717 No access to Deepline Monitors${reason ? ` \u2014 ${reason}` : ""}
|
|
544
544
|
`;
|
|
545
|
-
|
|
545
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
546
546
|
{ has_access: hasAccess, ...reason ? { reason } : {} },
|
|
547
547
|
{ json: options.json, text }
|
|
548
548
|
);
|
|
@@ -608,14 +608,14 @@ async function handleMonitorsAvailable(toolId, options) {
|
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
const tool = _nullishCoalesce(toolId, () => ( options.tool));
|
|
611
|
-
const payload = await new (0,
|
|
611
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.available(tool, {
|
|
612
612
|
...options.provider ? { provider: options.provider } : {},
|
|
613
613
|
...options.search ? { search: options.search } : {},
|
|
614
614
|
...options.limit ? { limit: options.limit } : {},
|
|
615
615
|
...options.full ? { full: true } : {},
|
|
616
616
|
...options.compact ? { compact: true } : {}
|
|
617
617
|
});
|
|
618
|
-
|
|
618
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, {
|
|
619
619
|
json: options.json,
|
|
620
620
|
// Human list view shows id + name + deployed_count ("deployed: N") so
|
|
621
621
|
// can-deploy vs already-deployed is visible in one view. Describing a
|
|
@@ -722,14 +722,14 @@ async function handleMonitorsList(options) {
|
|
|
722
722
|
"`--compact` is deprecated and now does nothing; returning the complete monitor records.\n"
|
|
723
723
|
);
|
|
724
724
|
}
|
|
725
|
-
const payload = await new (0,
|
|
725
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.list({
|
|
726
726
|
...state ? { state } : {},
|
|
727
727
|
...options.status ? { status: options.status } : {},
|
|
728
728
|
...options.limit ? { limit: options.limit } : {},
|
|
729
729
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
730
730
|
...options.includeConsumers ? { includeConsumers: true } : {}
|
|
731
731
|
});
|
|
732
|
-
|
|
732
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, {
|
|
733
733
|
json: options.json,
|
|
734
734
|
text: renderDeployedListText(
|
|
735
735
|
payload,
|
|
@@ -820,7 +820,7 @@ function renderMonitorLedgerText(payload) {
|
|
|
820
820
|
var LEDGER_SORTS = ["recent", "installed", "name", "findings"];
|
|
821
821
|
var LEDGER_WINDOWS = ["1d", "7d", "30d", "90d", "1y"];
|
|
822
822
|
async function handleMonitorsLedger(key, options) {
|
|
823
|
-
const client = new (0,
|
|
823
|
+
const client = new (0, _chunkDF2X7GJGjs.DeeplineClient)();
|
|
824
824
|
if (options.findings) {
|
|
825
825
|
if (!key) {
|
|
826
826
|
throw new MonitorsUsageError(
|
|
@@ -830,12 +830,12 @@ async function handleMonitorsLedger(key, options) {
|
|
|
830
830
|
const payload2 = await client.monitors.ledgerFindings(key, {
|
|
831
831
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
832
832
|
});
|
|
833
|
-
|
|
833
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
834
834
|
return;
|
|
835
835
|
}
|
|
836
836
|
if (key) {
|
|
837
837
|
const payload2 = await client.monitors.ledgerGet(key);
|
|
838
|
-
|
|
838
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload2, { json: options.json });
|
|
839
839
|
return;
|
|
840
840
|
}
|
|
841
841
|
if (options.sort !== void 0 && !LEDGER_SORTS.includes(options.sort)) {
|
|
@@ -859,7 +859,7 @@ async function handleMonitorsLedger(key, options) {
|
|
|
859
859
|
...options.limit ? { limit: options.limit } : {},
|
|
860
860
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
861
861
|
});
|
|
862
|
-
|
|
862
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, {
|
|
863
863
|
json: options.json,
|
|
864
864
|
text: renderMonitorLedgerText(payload)
|
|
865
865
|
});
|
|
@@ -871,10 +871,10 @@ async function handleMonitorsCheck(definition, options) {
|
|
|
871
871
|
argLabel: "<definition>",
|
|
872
872
|
command: "deepline monitors check"
|
|
873
873
|
});
|
|
874
|
-
const payload = await new (0,
|
|
874
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.check(
|
|
875
875
|
body
|
|
876
876
|
);
|
|
877
|
-
|
|
877
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
878
878
|
}
|
|
879
879
|
function previewText(value) {
|
|
880
880
|
return typeof value === "string" && value.trim() ? value.trim() : "-";
|
|
@@ -932,22 +932,22 @@ async function handleMonitorsPreview(definition, options) {
|
|
|
932
932
|
if (limit !== void 0 && !Number.isInteger(limit)) {
|
|
933
933
|
throw new MonitorsUsageError("--limit must be a whole number from 1 to 3.");
|
|
934
934
|
}
|
|
935
|
-
const wantsJson =
|
|
935
|
+
const wantsJson = _chunkZY6FL4O4js.shouldEmitJson.call(void 0, options.json);
|
|
936
936
|
if (options.idempotencyKey === void 0 && wantsJson) {
|
|
937
937
|
throw new MonitorsUsageError(
|
|
938
938
|
"--json requires --idempotency-key <key>. Choose a new key for each new preview and keep it: rerunning with the same key returns the result without paying again."
|
|
939
939
|
);
|
|
940
940
|
}
|
|
941
941
|
const idempotencyKey = _nullishCoalesce(options.idempotencyKey, () => ( `monitor-preview-${_crypto.randomUUID.call(void 0, )}`));
|
|
942
|
-
const progress =
|
|
942
|
+
const progress = _chunkJWVG7ZPXjs.createCliProgress.call(void 0, !wantsJson);
|
|
943
943
|
progress.phase(`Preview key: ${idempotencyKey}`);
|
|
944
944
|
try {
|
|
945
|
-
const payload = await new (0,
|
|
945
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.preview(
|
|
946
946
|
body,
|
|
947
947
|
{ idempotencyKey, ...limit === void 0 ? {} : { limit } }
|
|
948
948
|
);
|
|
949
949
|
progress.complete();
|
|
950
|
-
|
|
950
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, {
|
|
951
951
|
json: options.json,
|
|
952
952
|
text: renderMonitorPreviewText(payload)
|
|
953
953
|
});
|
|
@@ -992,7 +992,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
992
992
|
argLabel: "<definition>",
|
|
993
993
|
command: "deepline monitors deploy"
|
|
994
994
|
});
|
|
995
|
-
const client = new (0,
|
|
995
|
+
const client = new (0, _chunkDF2X7GJGjs.DeeplineClient)();
|
|
996
996
|
const definitionArg = body;
|
|
997
997
|
if (options.dryRun) {
|
|
998
998
|
const payload2 = await client.monitors.deploy(definitionArg, {
|
|
@@ -1000,7 +1000,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
1000
1000
|
});
|
|
1001
1001
|
const valid = payload2.valid !== false;
|
|
1002
1002
|
const hasIdentityConflict = Boolean(_optionalChain([asRecord, 'call', _39 => _39(payload2), 'optionalAccess', _40 => _40.identity_conflict]));
|
|
1003
|
-
|
|
1003
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
1004
1004
|
{ dry_run: true, ...payload2 },
|
|
1005
1005
|
{ json: options.json, text: renderMonitorDeployPlan(payload2) }
|
|
1006
1006
|
);
|
|
@@ -1010,7 +1010,7 @@ async function handleMonitorsDeploy(definition, options) {
|
|
|
1010
1010
|
return;
|
|
1011
1011
|
}
|
|
1012
1012
|
const payload = await client.monitors.deploy(definitionArg);
|
|
1013
|
-
|
|
1013
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, {
|
|
1014
1014
|
json: options.json,
|
|
1015
1015
|
text: renderMonitorDeployCompletion(payload)
|
|
1016
1016
|
});
|
|
@@ -1022,29 +1022,29 @@ async function handleMonitorsSync(definition, options) {
|
|
|
1022
1022
|
argLabel: "<definition>",
|
|
1023
1023
|
command: "deepline monitors sync"
|
|
1024
1024
|
});
|
|
1025
|
-
const payload = await new (0,
|
|
1025
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.sync(body, {
|
|
1026
1026
|
...options.dryRun ? { dryRun: true } : {},
|
|
1027
1027
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey("scalar-sync", void 0)))
|
|
1028
1028
|
});
|
|
1029
1029
|
if (options.dryRun) {
|
|
1030
1030
|
const plan = payload;
|
|
1031
|
-
|
|
1031
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
1032
1032
|
{ dry_run: true, ...plan },
|
|
1033
1033
|
{ json: options.json, text: renderMonitorDeployPlan(plan) }
|
|
1034
1034
|
);
|
|
1035
1035
|
return;
|
|
1036
1036
|
}
|
|
1037
|
-
|
|
1037
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, {
|
|
1038
1038
|
json: options.json,
|
|
1039
1039
|
text: renderMonitorJob(payload)
|
|
1040
1040
|
});
|
|
1041
1041
|
}
|
|
1042
1042
|
async function handleScalarMonitorLifecycle(action, key, options) {
|
|
1043
|
-
const payload = await new (0,
|
|
1043
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors[action](key, {
|
|
1044
1044
|
...options.dryRun ? { dryRun: true } : {},
|
|
1045
1045
|
idempotencyKey: _nullishCoalesce(options.idempotencyKey, () => ( monitorJobIdempotencyKey(`${action}-${key}`, void 0)))
|
|
1046
1046
|
});
|
|
1047
|
-
|
|
1047
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, {
|
|
1048
1048
|
json: options.json,
|
|
1049
1049
|
text: options.dryRun ? void 0 : renderMonitorJob(payload)
|
|
1050
1050
|
});
|
|
@@ -1133,11 +1133,11 @@ async function handleMonitorJobBatchDeploy(options, idempotencyKey) {
|
|
|
1133
1133
|
lint.issues.filter((issue) => issue.severity === "error").map((issue) => `${issue.path || "batch"}: ${issue.message}`).join("; ")
|
|
1134
1134
|
);
|
|
1135
1135
|
}
|
|
1136
|
-
const payload = await new (0,
|
|
1136
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.batch.deploy(
|
|
1137
1137
|
lint.normalized.monitors,
|
|
1138
1138
|
{ idempotencyKey }
|
|
1139
1139
|
);
|
|
1140
|
-
|
|
1140
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
1141
1141
|
{
|
|
1142
1142
|
...payload,
|
|
1143
1143
|
idempotency_key: idempotencyKey,
|
|
@@ -1170,7 +1170,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1170
1170
|
);
|
|
1171
1171
|
}
|
|
1172
1172
|
if (options.dryRun) {
|
|
1173
|
-
|
|
1173
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
1174
1174
|
{
|
|
1175
1175
|
ok: true,
|
|
1176
1176
|
dry_run: true,
|
|
@@ -1187,7 +1187,7 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1187
1187
|
"sync",
|
|
1188
1188
|
options.idempotencyKey
|
|
1189
1189
|
);
|
|
1190
|
-
const payload = await new (0,
|
|
1190
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.batches.sync(
|
|
1191
1191
|
batchId,
|
|
1192
1192
|
lint.normalized.monitors,
|
|
1193
1193
|
{
|
|
@@ -1195,14 +1195,14 @@ async function handleNamedMonitorBatchSync(batchId, options) {
|
|
|
1195
1195
|
...parsedGeneration === void 0 ? {} : { expectedGeneration: parsedGeneration }
|
|
1196
1196
|
}
|
|
1197
1197
|
);
|
|
1198
|
-
|
|
1198
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
1199
1199
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1200
1200
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1201
1201
|
);
|
|
1202
1202
|
}
|
|
1203
1203
|
async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
1204
1204
|
if (options.dryRun) {
|
|
1205
|
-
|
|
1205
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
1206
1206
|
{
|
|
1207
1207
|
ok: true,
|
|
1208
1208
|
dry_run: true,
|
|
@@ -1218,17 +1218,17 @@ async function handleNamedMonitorBatchLifecycle(batchId, intent, options) {
|
|
|
1218
1218
|
intent,
|
|
1219
1219
|
options.idempotencyKey
|
|
1220
1220
|
);
|
|
1221
|
-
const payload = await new (0,
|
|
1221
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.batches[intent](batchId, {
|
|
1222
1222
|
idempotencyKey
|
|
1223
1223
|
});
|
|
1224
|
-
|
|
1224
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
1225
1225
|
{ ...payload, idempotency_key: idempotencyKey },
|
|
1226
1226
|
{ json: options.json, text: renderMonitorJob(payload) }
|
|
1227
1227
|
);
|
|
1228
1228
|
}
|
|
1229
1229
|
async function handleNamedMonitorBatchGet(batchId, options) {
|
|
1230
|
-
const payload = await new (0,
|
|
1231
|
-
|
|
1230
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.batches.get(batchId);
|
|
1231
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, {
|
|
1232
1232
|
json: options.json,
|
|
1233
1233
|
text: renderMonitorJob(payload)
|
|
1234
1234
|
});
|
|
@@ -1242,7 +1242,7 @@ async function handleMonitorBatchLint(options) {
|
|
|
1242
1242
|
const result = _chunkU2LVWCTDjs.lintMonitorBatchInput.call(void 0,
|
|
1243
1243
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1244
1244
|
);
|
|
1245
|
-
|
|
1245
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
1246
1246
|
{
|
|
1247
1247
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1248
1248
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1262,7 +1262,7 @@ async function handleMonitorFleetLint(options) {
|
|
|
1262
1262
|
const result = _chunkWOQO3GV4js.lintMonitorFleetInput.call(void 0,
|
|
1263
1263
|
readMonitorDefinitionsJsonFile(options.file)
|
|
1264
1264
|
);
|
|
1265
|
-
|
|
1265
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
1266
1266
|
{
|
|
1267
1267
|
ok: !result.issues.some((issue) => issue.severity === "error"),
|
|
1268
1268
|
...result.normalized ? { normalized: result.normalized } : {},
|
|
@@ -1274,32 +1274,32 @@ async function handleMonitorFleetLint(options) {
|
|
|
1274
1274
|
process.exitCode = 2;
|
|
1275
1275
|
}
|
|
1276
1276
|
async function handleMonitorJobGet(jobId, options) {
|
|
1277
|
-
const payload = await new (0,
|
|
1278
|
-
|
|
1277
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.jobs.get(jobId);
|
|
1278
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, {
|
|
1279
1279
|
json: options.json,
|
|
1280
1280
|
text: renderMonitorJob(payload)
|
|
1281
1281
|
});
|
|
1282
1282
|
}
|
|
1283
1283
|
async function handleMonitorJobWait(jobId, options) {
|
|
1284
|
-
const payload = await new (0,
|
|
1284
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.jobs.wait(jobId, {
|
|
1285
1285
|
timeoutMs: fleetTimeoutMs(options.timeout),
|
|
1286
1286
|
pollIntervalMs: FLEET_POLL_INTERVAL_MS
|
|
1287
1287
|
});
|
|
1288
|
-
|
|
1288
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, {
|
|
1289
1289
|
json: options.json,
|
|
1290
1290
|
text: renderMonitorJob(payload)
|
|
1291
1291
|
});
|
|
1292
1292
|
}
|
|
1293
1293
|
async function handleMonitorJobLogs(jobId, options) {
|
|
1294
1294
|
const limit = options.limit ? fleetIntegerOption(options.limit, "--limit") : void 0;
|
|
1295
|
-
const payload = await new (0,
|
|
1295
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.jobs.logs(jobId, {
|
|
1296
1296
|
...limit === void 0 ? {} : { limit }
|
|
1297
1297
|
});
|
|
1298
|
-
|
|
1298
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
1299
1299
|
}
|
|
1300
1300
|
async function handleMonitorJobCancel(jobId, options) {
|
|
1301
|
-
const payload = await new (0,
|
|
1302
|
-
|
|
1301
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.jobs.cancel(jobId);
|
|
1302
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, {
|
|
1303
1303
|
json: options.json,
|
|
1304
1304
|
text: renderMonitorJob(payload)
|
|
1305
1305
|
});
|
|
@@ -1460,10 +1460,13 @@ function fleetPlanLine(payload) {
|
|
|
1460
1460
|
}).sort(([left], [right]) => left.localeCompare(right));
|
|
1461
1461
|
const blockedTotal = entries.reduce((sum, [, count]) => sum + count, 0);
|
|
1462
1462
|
const detail = entries.length === 0 ? "" : entries.length === 1 ? ` (${entries[0][0]})` : ` (${entries.map(([id, count]) => `${id}: ${count}`).join(", ")})`;
|
|
1463
|
+
const renames = _nullishCoalesce(asFiniteNumber(plan.renames), () => ( 0));
|
|
1464
|
+
const adopts = (_nullishCoalesce(asFiniteNumber(plan.adopts), () => ( 0))) + (_nullishCoalesce(asFiniteNumber(plan.adoptsWithUpdate), () => ( 0)));
|
|
1463
1465
|
return [
|
|
1464
1466
|
`creates ${_nullishCoalesce(asFiniteNumber(plan.creates), () => ( 0))}`,
|
|
1465
|
-
`updates ${_nullishCoalesce(asFiniteNumber(plan.updates), () => ( 0))}`,
|
|
1467
|
+
`updates ${_nullishCoalesce(asFiniteNumber(plan.updates), () => ( 0))}${renames > 0 ? ` (${renames} name only)` : ""}`,
|
|
1466
1468
|
`removes ${_nullishCoalesce(asFiniteNumber(plan.removes), () => ( 0))}`,
|
|
1469
|
+
...adopts > 0 ? [`adopts ${adopts}`] : [],
|
|
1467
1470
|
`blocked ${blockedTotal}${detail}`
|
|
1468
1471
|
].join(" \xB7 ");
|
|
1469
1472
|
}
|
|
@@ -1616,7 +1619,7 @@ function renderFleetDeactivatePlan(payload, fleetId) {
|
|
|
1616
1619
|
`;
|
|
1617
1620
|
}
|
|
1618
1621
|
function reportFleetState(payload, error, options) {
|
|
1619
|
-
|
|
1622
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
1620
1623
|
{
|
|
1621
1624
|
...payload,
|
|
1622
1625
|
code: error.code,
|
|
@@ -1750,7 +1753,7 @@ async function handleMonitorFleetsInit(fleetId, options) {
|
|
|
1750
1753
|
_fs.writeFileSync.call(void 0, file, `${JSON.stringify(definition, null, 2)}
|
|
1751
1754
|
`, "utf8");
|
|
1752
1755
|
const next = `deepline monitors fleets deploy --file ${fleetShellArg(file)} --dry-run`;
|
|
1753
|
-
|
|
1756
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
1754
1757
|
{ schemaVersion: 2, file, definition, next },
|
|
1755
1758
|
{
|
|
1756
1759
|
json: options.json,
|
|
@@ -1774,6 +1777,7 @@ function fleetSyncCommandLine(target, options) {
|
|
|
1774
1777
|
if (options.file) parts.push(`--file ${fleetShellArg(options.file)}`);
|
|
1775
1778
|
else if (target) parts.push(fleetShellArg(target));
|
|
1776
1779
|
if (options.dryRun) parts.push("--dry-run");
|
|
1780
|
+
if (options.adoptExisting) parts.push("--adopt-existing");
|
|
1777
1781
|
if (options.wait) parts.push("--wait");
|
|
1778
1782
|
if (options.timeout)
|
|
1779
1783
|
parts.push(`--timeout ${fleetShellArg(options.timeout)}`);
|
|
@@ -1812,11 +1816,12 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1812
1816
|
'The Fleet definition has no id. Add a top-level "id" and re-run.'
|
|
1813
1817
|
);
|
|
1814
1818
|
}
|
|
1815
|
-
const client = new (0,
|
|
1819
|
+
const client = new (0, _chunkDF2X7GJGjs.DeeplineClient)();
|
|
1816
1820
|
const payload = await client.monitors.fleets.sync(
|
|
1817
1821
|
_nullishCoalesce(definition, () => ( fleetId)),
|
|
1818
1822
|
{
|
|
1819
1823
|
...options.dryRun ? { dryRun: true } : {},
|
|
1824
|
+
...options.adoptExisting ? { adoptExisting: true } : {},
|
|
1820
1825
|
...options.expectedGeneration !== void 0 ? {
|
|
1821
1826
|
expectedGeneration: fleetIntegerOption(
|
|
1822
1827
|
options.expectedGeneration,
|
|
@@ -1834,7 +1839,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1834
1839
|
}
|
|
1835
1840
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
1836
1841
|
if (!options.wait || options.dryRun) {
|
|
1837
|
-
|
|
1842
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, accepted, {
|
|
1838
1843
|
json: options.json,
|
|
1839
1844
|
text: renderFleetSync(payload, {
|
|
1840
1845
|
fleetId,
|
|
@@ -1860,7 +1865,7 @@ async function handleMonitorFleetsSync(target, options, idempotencyKey) {
|
|
|
1860
1865
|
const status = fleetStatus(final);
|
|
1861
1866
|
const summary = renderFleetGet(final);
|
|
1862
1867
|
if (status === "converged") {
|
|
1863
|
-
|
|
1868
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
1864
1869
|
return;
|
|
1865
1870
|
}
|
|
1866
1871
|
if (status === "billing_suspended") {
|
|
@@ -1900,14 +1905,14 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1900
1905
|
);
|
|
1901
1906
|
}
|
|
1902
1907
|
const limit = options.limit === void 0 ? void 0 : fleetIntegerOption(options.limit, "--limit");
|
|
1903
|
-
const client = new (0,
|
|
1908
|
+
const client = new (0, _chunkDF2X7GJGjs.DeeplineClient)();
|
|
1904
1909
|
const payload = await client.monitors.fleets.get(fleetId, {
|
|
1905
1910
|
...options.drift ? { drift: true } : {},
|
|
1906
1911
|
...limit !== void 0 ? { limit } : {}
|
|
1907
1912
|
});
|
|
1908
1913
|
const text = fleetId ? renderFleetGet(payload) : renderFleetList(payload);
|
|
1909
1914
|
if (!options.check) {
|
|
1910
|
-
|
|
1915
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1911
1916
|
return;
|
|
1912
1917
|
}
|
|
1913
1918
|
const statuses = fleetId ? [fleetStatus(payload)] : (Array.isArray(payload.fleets) ? payload.fleets : []).map(
|
|
@@ -1915,7 +1920,7 @@ async function handleMonitorFleetsGet(fleetId, options) {
|
|
|
1915
1920
|
);
|
|
1916
1921
|
const unconverged = statuses.filter((status) => status !== "converged");
|
|
1917
1922
|
if (unconverged.length === 0) {
|
|
1918
|
-
|
|
1923
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, { json: options.json, text });
|
|
1919
1924
|
return;
|
|
1920
1925
|
}
|
|
1921
1926
|
const target = _nullishCoalesce(fleetId, () => ( "<fleet-id>"));
|
|
@@ -2078,7 +2083,7 @@ function renderFleetIssuePage(payload) {
|
|
|
2078
2083
|
}
|
|
2079
2084
|
async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
2080
2085
|
const window = fleetChoice(options.window, LEDGER_WINDOWS, "--window");
|
|
2081
|
-
const client = new (0,
|
|
2086
|
+
const client = new (0, _chunkDF2X7GJGjs.DeeplineClient)();
|
|
2082
2087
|
if (fleetId) {
|
|
2083
2088
|
const listOnly = [
|
|
2084
2089
|
options.q !== void 0 ? "--q" : "",
|
|
@@ -2093,7 +2098,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2093
2098
|
const payload2 = await client.monitors.fleets.overview(fleetId, {
|
|
2094
2099
|
...window ? { window } : {}
|
|
2095
2100
|
});
|
|
2096
|
-
|
|
2101
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload2, {
|
|
2097
2102
|
json: options.json,
|
|
2098
2103
|
text: renderFleetOverviewDetail(payload2, window)
|
|
2099
2104
|
});
|
|
@@ -2109,7 +2114,7 @@ async function handleMonitorFleetsOverviewRead(fleetId, options) {
|
|
|
2109
2114
|
...sort ? { sort } : {},
|
|
2110
2115
|
...window ? { window } : {}
|
|
2111
2116
|
});
|
|
2112
|
-
|
|
2117
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, {
|
|
2113
2118
|
json: options.json,
|
|
2114
2119
|
text: renderFleetOverviewList(payload)
|
|
2115
2120
|
});
|
|
@@ -2120,13 +2125,13 @@ async function handleMonitorFleetsIssues(fleetId, options) {
|
|
|
2120
2125
|
if (limit !== void 0 && (limit < 1 || limit > 100)) {
|
|
2121
2126
|
throw new MonitorsUsageError("--limit must be an integer from 1 to 100.");
|
|
2122
2127
|
}
|
|
2123
|
-
const payload = await new (0,
|
|
2128
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.fleets.issues(fleetId, {
|
|
2124
2129
|
...group ? { group } : {},
|
|
2125
2130
|
...options.cause ? { cause: options.cause } : {},
|
|
2126
2131
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
2127
2132
|
...limit !== void 0 ? { limit } : {}
|
|
2128
2133
|
});
|
|
2129
|
-
|
|
2134
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, {
|
|
2130
2135
|
json: options.json,
|
|
2131
2136
|
text: renderFleetIssuePage(payload)
|
|
2132
2137
|
});
|
|
@@ -2155,13 +2160,13 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2155
2160
|
${fleetReactivateCommandLine(fleetId, options)}`
|
|
2156
2161
|
);
|
|
2157
2162
|
}
|
|
2158
|
-
const client = new (0,
|
|
2163
|
+
const client = new (0, _chunkDF2X7GJGjs.DeeplineClient)();
|
|
2159
2164
|
const payload = await client.monitors.fleets.reactivate(fleetId, {
|
|
2160
2165
|
idempotencyKey
|
|
2161
2166
|
});
|
|
2162
2167
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2163
2168
|
if (!options.wait) {
|
|
2164
|
-
|
|
2169
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, accepted, {
|
|
2165
2170
|
json: options.json,
|
|
2166
2171
|
text: `Fleet ${fleetId} \u2014 ${readMonitorState(payload) ? `state ${readMonitorState(payload)}` : "reactivation accepted"}
|
|
2167
2172
|
idempotency key ${idempotencyKey}
|
|
@@ -2184,7 +2189,7 @@ async function handleMonitorFleetsReactivate(fleetId, options, idempotencyKey) {
|
|
|
2184
2189
|
const envelope = { ...accepted, ...final };
|
|
2185
2190
|
const text = renderFleetGet(final);
|
|
2186
2191
|
if (fleetStatus(final) === "converged") {
|
|
2187
|
-
|
|
2192
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text });
|
|
2188
2193
|
return;
|
|
2189
2194
|
}
|
|
2190
2195
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2233,7 +2238,7 @@ async function confirmFleetDeactivate(fleetId, plan) {
|
|
|
2233
2238
|
}
|
|
2234
2239
|
}
|
|
2235
2240
|
async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
2236
|
-
const client = new (0,
|
|
2241
|
+
const client = new (0, _chunkDF2X7GJGjs.DeeplineClient)();
|
|
2237
2242
|
if (options.dryRun) {
|
|
2238
2243
|
const plan = await client.monitors.fleets.deactivate(fleetId, {
|
|
2239
2244
|
dryRun: true,
|
|
@@ -2243,7 +2248,7 @@ async function handleMonitorFleetsDeactivate(fleetId, options, idempotencyKey) {
|
|
|
2243
2248
|
command: "deepline monitors fleets deactivate",
|
|
2244
2249
|
mutation: "fleet deactivate"
|
|
2245
2250
|
});
|
|
2246
|
-
|
|
2251
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, plan, {
|
|
2247
2252
|
json: options.json,
|
|
2248
2253
|
text: renderFleetDeactivatePlan(plan, fleetId)
|
|
2249
2254
|
});
|
|
@@ -2281,7 +2286,7 @@ Preview the blast radius first:
|
|
|
2281
2286
|
});
|
|
2282
2287
|
const accepted = { ...payload, idempotency_key: idempotencyKey };
|
|
2283
2288
|
if (payload.already === true) {
|
|
2284
|
-
|
|
2289
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, accepted, {
|
|
2285
2290
|
json: options.json,
|
|
2286
2291
|
text: `Fleet ${fleetId} is already deactivated.
|
|
2287
2292
|
`
|
|
@@ -2293,7 +2298,7 @@ Preview the blast radius first:
|
|
|
2293
2298
|
` + (fleetServerNext(payload) ? `Next: ${fleetServerNext(payload)}
|
|
2294
2299
|
` : "");
|
|
2295
2300
|
if (!options.wait) {
|
|
2296
|
-
|
|
2301
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, accepted, {
|
|
2297
2302
|
json: options.json,
|
|
2298
2303
|
text: acceptedText
|
|
2299
2304
|
});
|
|
@@ -2315,7 +2320,7 @@ Preview the blast radius first:
|
|
|
2315
2320
|
const envelope = { ...accepted, ...final };
|
|
2316
2321
|
const summary = renderFleetGet(final);
|
|
2317
2322
|
if (fleetStatus(final) === "deactivated") {
|
|
2318
|
-
|
|
2323
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, envelope, { json: options.json, text: summary });
|
|
2319
2324
|
return;
|
|
2320
2325
|
}
|
|
2321
2326
|
if (fleetStatus(final) === "billing_suspended") {
|
|
@@ -2354,7 +2359,7 @@ function handleMonitorFleetsOverview(options) {
|
|
|
2354
2359
|
"Agent notes:",
|
|
2355
2360
|
...MONITOR_FLEET_AGENT_NOTES.map((note) => ` ${note}`)
|
|
2356
2361
|
];
|
|
2357
|
-
|
|
2362
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
2358
2363
|
{
|
|
2359
2364
|
schemaVersion: 1,
|
|
2360
2365
|
lifecycle: MONITOR_FLEET_LIFECYCLE,
|
|
@@ -2516,7 +2521,7 @@ function renderMonitorGet(payload) {
|
|
|
2516
2521
|
`;
|
|
2517
2522
|
}
|
|
2518
2523
|
async function handleMonitorsGet(key, options) {
|
|
2519
|
-
const client = new (0,
|
|
2524
|
+
const client = new (0, _chunkDF2X7GJGjs.DeeplineClient)();
|
|
2520
2525
|
const payload = await client.monitors.get(key);
|
|
2521
2526
|
const boundPlays = Array.isArray(payload.bound_plays) ? payload.bound_plays : null;
|
|
2522
2527
|
const dependents = boundPlays ? {
|
|
@@ -2524,24 +2529,24 @@ async function handleMonitorsGet(key, options) {
|
|
|
2524
2529
|
truncated: payload.consumer_health_truncated === true
|
|
2525
2530
|
} : await client.monitors.dependents(key);
|
|
2526
2531
|
const detail = { ...payload, dependents };
|
|
2527
|
-
|
|
2532
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, detail, {
|
|
2528
2533
|
json: options.json,
|
|
2529
2534
|
text: renderMonitorGet(detail)
|
|
2530
2535
|
});
|
|
2531
2536
|
}
|
|
2532
2537
|
async function handleMonitorsTest(key, payload, options) {
|
|
2533
2538
|
const explicitPayload = parseJsonObjectArg(payload, "<payload>");
|
|
2534
|
-
const result = await new (0,
|
|
2539
|
+
const result = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.test(key, explicitPayload);
|
|
2535
2540
|
const text = `Monitor diagnostic for ${key}: ${result.accepted === true ? "accepted" : "rejected"}
|
|
2536
2541
|
mode: validation_only (no rows written, credits spent, or Plays dispatched)
|
|
2537
2542
|
persisted rows: ${_nullishCoalesce(asFiniteNumber(result.persisted_rows), () => ( 0))}
|
|
2538
2543
|
dispatched bound Plays: ${_nullishCoalesce(asFiniteNumber(result.dispatched_bound_plays), () => ( 0))}
|
|
2539
2544
|
`;
|
|
2540
|
-
|
|
2545
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, result, { json: options.json, text });
|
|
2541
2546
|
}
|
|
2542
2547
|
async function handleMonitorsValidate(key, options) {
|
|
2543
|
-
const result = await new (0,
|
|
2544
|
-
|
|
2548
|
+
const result = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.validate(key);
|
|
2549
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, result, { json: options.json });
|
|
2545
2550
|
if (result.valid === false) process.exitCode = 7;
|
|
2546
2551
|
}
|
|
2547
2552
|
async function confirmMonitorDelete(key) {
|
|
@@ -2559,14 +2564,14 @@ async function confirmMonitorDelete(key) {
|
|
|
2559
2564
|
}
|
|
2560
2565
|
}
|
|
2561
2566
|
async function handleMonitorsDelete(key, options) {
|
|
2562
|
-
const client = new (0,
|
|
2567
|
+
const client = new (0, _chunkDF2X7GJGjs.DeeplineClient)();
|
|
2563
2568
|
if (options.dryRun) {
|
|
2564
2569
|
const payload2 = await client.monitors.delete(key, { dryRun: true });
|
|
2565
2570
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2566
2571
|
command: "deepline monitors delete",
|
|
2567
2572
|
mutation: "delete"
|
|
2568
2573
|
});
|
|
2569
|
-
|
|
2574
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload2, {
|
|
2570
2575
|
json: options.json,
|
|
2571
2576
|
text: renderMonitorDeletePlan(payload2, key)
|
|
2572
2577
|
});
|
|
@@ -2586,7 +2591,7 @@ async function handleMonitorsDelete(key, options) {
|
|
|
2586
2591
|
}
|
|
2587
2592
|
}
|
|
2588
2593
|
const payload = await client.monitors.delete(key);
|
|
2589
|
-
|
|
2594
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2590
2595
|
}
|
|
2591
2596
|
async function handleMonitorsUpdate(key, patch, options) {
|
|
2592
2597
|
const body = resolveMonitorJsonBody({
|
|
@@ -2595,25 +2600,25 @@ async function handleMonitorsUpdate(key, patch, options) {
|
|
|
2595
2600
|
argLabel: "<patch>",
|
|
2596
2601
|
command: `deepline monitors update ${key}`
|
|
2597
2602
|
});
|
|
2598
|
-
const payload = await new (0,
|
|
2599
|
-
|
|
2603
|
+
const payload = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.update(key, body);
|
|
2604
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2600
2605
|
}
|
|
2601
2606
|
async function handleMonitorsReactivate(key, options) {
|
|
2602
|
-
const client = new (0,
|
|
2607
|
+
const client = new (0, _chunkDF2X7GJGjs.DeeplineClient)();
|
|
2603
2608
|
if (options.dryRun) {
|
|
2604
2609
|
const payload2 = await client.monitors.reactivate(key, { dryRun: true });
|
|
2605
2610
|
assertMonitorDryRunAcknowledged(payload2, {
|
|
2606
2611
|
command: "deepline monitors reactivate",
|
|
2607
2612
|
mutation: "reactivate"
|
|
2608
2613
|
});
|
|
2609
|
-
|
|
2614
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload2, {
|
|
2610
2615
|
json: options.json,
|
|
2611
2616
|
text: renderMonitorReactivatePlan(payload2, key)
|
|
2612
2617
|
});
|
|
2613
2618
|
return;
|
|
2614
2619
|
}
|
|
2615
2620
|
const payload = await client.monitors.reactivate(key);
|
|
2616
|
-
|
|
2621
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, payload, { json: options.json });
|
|
2617
2622
|
}
|
|
2618
2623
|
var MONITOR_VERB_POLL_INTERVAL_MS = 2e3;
|
|
2619
2624
|
function monitorHealthLine(health) {
|
|
@@ -2735,7 +2740,7 @@ function monitorHealthText(health) {
|
|
|
2735
2740
|
`;
|
|
2736
2741
|
}
|
|
2737
2742
|
async function handleMonitorsAudit(options) {
|
|
2738
|
-
const client = new (0,
|
|
2743
|
+
const client = new (0, _chunkDF2X7GJGjs.DeeplineClient)();
|
|
2739
2744
|
const fleetId = _optionalChain([options, 'access', _106 => _106.fleet, 'optionalAccess', _107 => _107.trim, 'call', _108 => _108()]) || void 0;
|
|
2740
2745
|
const scope = fleetId ? { fleetId } : {};
|
|
2741
2746
|
let result = await client.monitors.audit(scope);
|
|
@@ -2779,7 +2784,7 @@ async function handleMonitorsAudit(options) {
|
|
|
2779
2784
|
"",
|
|
2780
2785
|
monitorHealthText(health)
|
|
2781
2786
|
].join("\n");
|
|
2782
|
-
|
|
2787
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
2783
2788
|
{ ...result, audit: { ...result.audit, totals }, health },
|
|
2784
2789
|
{ json: options.json, text }
|
|
2785
2790
|
);
|
|
@@ -2792,10 +2797,10 @@ async function handleMonitorsRepair(options) {
|
|
|
2792
2797
|
}
|
|
2793
2798
|
async function handleMonitorsHealth(options) {
|
|
2794
2799
|
const fleetId = _optionalChain([options, 'access', _112 => _112.fleet, 'optionalAccess', _113 => _113.trim, 'call', _114 => _114()]) || void 0;
|
|
2795
|
-
const health = await new (0,
|
|
2800
|
+
const health = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.health(
|
|
2796
2801
|
fleetId ? { fleetId } : {}
|
|
2797
2802
|
);
|
|
2798
|
-
|
|
2803
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, health, {
|
|
2799
2804
|
json: options.json,
|
|
2800
2805
|
text: monitorHealthText(health)
|
|
2801
2806
|
});
|
|
@@ -2869,14 +2874,14 @@ async function handleMonitorBatchDeploy(options) {
|
|
|
2869
2874
|
"deploy",
|
|
2870
2875
|
options.idempotencyKey
|
|
2871
2876
|
);
|
|
2872
|
-
const result = await new (0,
|
|
2877
|
+
const result = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.batch.submit({
|
|
2873
2878
|
kind: "deploy",
|
|
2874
2879
|
manifestNdjson,
|
|
2875
2880
|
dryRun: options.dryRun === true,
|
|
2876
2881
|
idempotencyKey
|
|
2877
2882
|
});
|
|
2878
2883
|
const operation = result.operation;
|
|
2879
|
-
|
|
2884
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
2880
2885
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2881
2886
|
{
|
|
2882
2887
|
json: options.json,
|
|
@@ -2904,7 +2909,7 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2904
2909
|
kind,
|
|
2905
2910
|
options.idempotencyKey
|
|
2906
2911
|
);
|
|
2907
|
-
const result = await new (0,
|
|
2912
|
+
const result = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.batch.submit({
|
|
2908
2913
|
kind,
|
|
2909
2914
|
scope,
|
|
2910
2915
|
dryRun: options.dryRun === true,
|
|
@@ -2917,14 +2922,14 @@ async function handleMonitorBatch(kind, options) {
|
|
|
2917
2922
|
`state ${operation.state} \xB7 retry key ${idempotencyKey}`,
|
|
2918
2923
|
`inspect: deepline monitors batch get ${operation.runId}`
|
|
2919
2924
|
].join("\n");
|
|
2920
|
-
|
|
2925
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0,
|
|
2921
2926
|
{ ...result, idempotency_key: idempotencyKey },
|
|
2922
2927
|
{ json: options.json, text: `${text}
|
|
2923
2928
|
` }
|
|
2924
2929
|
);
|
|
2925
2930
|
}
|
|
2926
2931
|
async function handleMonitorBatchGet(operationId, options) {
|
|
2927
|
-
const result = await new (0,
|
|
2932
|
+
const result = await new (0, _chunkDF2X7GJGjs.DeeplineClient)().monitors.batch.get(operationId, {
|
|
2928
2933
|
...options.cursor ? { cursor: options.cursor } : {}
|
|
2929
2934
|
});
|
|
2930
2935
|
const summary = _nullishCoalesce(result.operation.summary, () => ( {}));
|
|
@@ -2936,7 +2941,7 @@ async function handleMonitorBatchGet(operationId, options) {
|
|
|
2936
2941
|
`results ${result.results.page.length}${result.results.isDone ? "" : " (more; pass --cursor)"}`
|
|
2937
2942
|
] : []
|
|
2938
2943
|
].join("\n");
|
|
2939
|
-
|
|
2944
|
+
_chunkZY6FL4O4js.printCommandEnvelope.call(void 0, result, { json: options.json, text: `${text}
|
|
2940
2945
|
` });
|
|
2941
2946
|
}
|
|
2942
2947
|
function registerMonitorsCommands(program) {
|
|
@@ -3631,7 +3636,10 @@ ${MONITOR_FLEET_HELP_EPILOG}`
|
|
|
3631
3636
|
withJsonOption(
|
|
3632
3637
|
fleets.command("deploy [fleet-id]").description(
|
|
3633
3638
|
"Apply a table-backed Fleet definition; sync remains an exact alias."
|
|
3634
|
-
).option("-f, --file <path>", "Fleet JSON file, or - for stdin").option("--dry-run", "Show the table-backed convergence plan").option(
|
|
3639
|
+
).option("-f, --file <path>", "Fleet JSON file, or - for stdin").option("--dry-run", "Show the table-backed convergence plan").option(
|
|
3640
|
+
"--adopt-existing",
|
|
3641
|
+
"Take over live monitors no Fleet owns whose key a row renders"
|
|
3642
|
+
).option("--wait", "Wait for the current Fleet generation to converge").option("--timeout <duration>", "How long --wait may poll (default 10m)").option(
|
|
3635
3643
|
"--expected-generation <generation>",
|
|
3636
3644
|
"Optimistic generation fence"
|
|
3637
3645
|
).option("--idempotency-key <key>", "Stable retry key")
|
|
@@ -3699,9 +3707,13 @@ Notes:
|
|
|
3699
3707
|
degraded or billing_suspended exits 6 at once, and a timeout exits 6
|
|
3700
3708
|
without implying anything broke.
|
|
3701
3709
|
Progress goes to stderr, so stdout stays exactly one JSON object.
|
|
3710
|
+
A live monitor a named Batch deployed is taken over with its radar kept
|
|
3711
|
+
("adopts" in the plan). Any other live monitor no Fleet owns is refused
|
|
3712
|
+
unless --adopt-existing is passed; preview it with --dry-run first.
|
|
3702
3713
|
|
|
3703
3714
|
Examples:
|
|
3704
3715
|
deepline monitors fleets sync --file fleet.json --dry-run
|
|
3716
|
+
deepline monitors fleets sync --file fleet.json --adopt-existing --dry-run
|
|
3705
3717
|
deepline monitors fleets sync --file fleet.json --wait --timeout 20m
|
|
3706
3718
|
deepline monitors fleets sync account-job-openings --wait
|
|
3707
3719
|
cat fleet.json | deepline monitors fleets sync --file - --dry-run
|
|
@@ -3712,6 +3724,9 @@ Examples:
|
|
|
3712
3724
|
).option(
|
|
3713
3725
|
"--dry-run",
|
|
3714
3726
|
"Show the plan and the credits due without changing state"
|
|
3727
|
+
).option(
|
|
3728
|
+
"--adopt-existing",
|
|
3729
|
+
"Take over live monitors no Fleet owns whose key a source row renders, keeping their radar (refused without it)"
|
|
3715
3730
|
).option("--wait", "Poll until the fleet reaches a terminal status").option(
|
|
3716
3731
|
"--timeout <duration>",
|
|
3717
3732
|
"How long --wait may poll: 500ms, 90s, 10m, 1h (default 10m)"
|