@outerlayer/cli 0.36.0-next.20261102124202 → 0.36.0-next.20261102135508
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/agent-setup-Q3HDN23U.js +39 -0
- package/dist/agent-subcommand-Z6SOLWZW.js +25 -0
- package/dist/{bridge-DFG2GTXQ.js → bridge-4KPODDN7.js} +6 -4
- package/dist/{build-THAD3B4Q.js → build-KYXFZQ33.js} +13 -11
- package/dist/{build-disk-HO2VPIBJ.js → build-disk-W6AL5WHI.js} +11 -9
- package/dist/build-info.json +1 -1
- package/dist/{builder-AXJNIF4S.js → builder-IMNOEYV7.js} +10 -8
- package/dist/caller-NLRE272L.js +22 -0
- package/dist/{check-SF2OVZXB.js → check-WWX32IGY.js} +60 -58
- package/dist/{chunk-KN4VIK53.js → chunk-2YC3TXWX.js} +1 -1
- package/dist/{chunk-4TNUQLXH.js → chunk-3UFX6KH2.js} +12 -11
- package/dist/{chunk-5FIOUQGC.js → chunk-3YEPLVNW.js} +8 -8
- package/dist/chunk-4DLJ343I.js +38 -0
- package/dist/{chunk-5WYT3PPE.js → chunk-4OD45RBP.js} +4 -1
- package/dist/{chunk-OYKAOHX5.js → chunk-4XXBV37R.js} +6 -6
- package/dist/{chunk-RSRZDF3K.js → chunk-6B3V6EGQ.js} +11 -9
- package/dist/{chunk-XABJMU5A.js → chunk-6HDXRDC5.js} +2 -2
- package/dist/{chunk-TWYHSMHM.js → chunk-6JLYU322.js} +3 -2
- package/dist/{chunk-5GHJFETA.js → chunk-6KH3NMIT.js} +3010 -1196
- package/dist/{chunk-QJDX6VJS.js → chunk-AQE6E54X.js} +10 -9
- package/dist/{chunk-564Q2STF.js → chunk-ATKCHMFD.js} +1 -1
- package/dist/{chunk-PQDFW422.js → chunk-B2P72DAE.js} +1 -1
- package/dist/{chunk-GZ75FRLB.js → chunk-B36NSEUM.js} +1 -1
- package/dist/{chunk-XHFSBSIA.js → chunk-B5SWBFVE.js} +3 -2
- package/dist/{chunk-NC3QAHOS.js → chunk-BSPJI5T7.js} +4 -2
- package/dist/{chunk-I6FRCBMU.js → chunk-BUYXEU7J.js} +8 -8
- package/dist/{chunk-A5Y2HBVU.js → chunk-BZSJ77MO.js} +1 -1
- package/dist/{chunk-C3JWWPLC.js → chunk-CDG475ZP.js} +8 -7
- package/dist/{chunk-TYCZVJTB.js → chunk-CSBW4LGL.js} +5 -5
- package/dist/{chunk-EUDG754F.js → chunk-CSVJGW3I.js} +2 -2
- package/dist/{chunk-M2NIHHQI.js → chunk-CXJC3JLN.js} +3 -2
- package/dist/{chunk-XE3DIJJT.js → chunk-D4VGJQY7.js} +1 -1
- package/dist/{chunk-PKO5IDW4.js → chunk-D5I5SSPU.js} +7 -7
- package/dist/{chunk-WDQPBAFV.js → chunk-D6EXW4EB.js} +2 -1
- package/dist/{chunk-GSXGA6KF.js → chunk-DG3M5DZU.js} +1 -1
- package/dist/{chunk-GD6KIHOS.js → chunk-DTCTXDJP.js} +1 -1
- package/dist/{chunk-J7Y3PCO2.js → chunk-DTQPDMHG.js} +2 -1
- package/dist/{chunk-PT34C6SU.js → chunk-E3TP4QTM.js} +1 -1
- package/dist/{chunk-NWBB2SQ4.js → chunk-ENBOAE2W.js} +24 -24
- package/dist/{chunk-LSXHTBAM.js → chunk-ENMX3VQ7.js} +7 -7
- package/dist/{chunk-XLOM2BNL.js → chunk-FOSYM7TQ.js} +1 -1
- package/dist/{chunk-4CTVN3C5.js → chunk-FRMAQ3C4.js} +5 -5
- package/dist/{chunk-PTPF36Q7.js → chunk-FTP7SE6Y.js} +3 -3
- package/dist/{chunk-IP7BIBXJ.js → chunk-FWSVWPMS.js} +16 -7
- package/dist/{chunk-K3X3L5YW.js → chunk-GFZ7PELR.js} +6 -6
- package/dist/{chunk-WLMAGMTU.js → chunk-H2NJG3TE.js} +4 -3
- package/dist/{chunk-T5Z22NA6.js → chunk-HRHWA6TZ.js} +1 -1
- package/dist/chunk-HTRDL42C.js +45 -0
- package/dist/{chunk-YBAVN6WS.js → chunk-I4DM7SNX.js} +7 -7
- package/dist/{chunk-CKPQOQFC.js → chunk-I6U6QPN6.js} +769 -101
- package/dist/{chunk-6JJITHBI.js → chunk-IKFAJTLZ.js} +1 -1
- package/dist/{chunk-FIO6PIZ6.js → chunk-J2OMKFYB.js} +3 -3
- package/dist/{chunk-Q42K6XZ6.js → chunk-K2G3VB7W.js} +1 -1
- package/dist/{chunk-L3JXQDVH.js → chunk-K7N6LAPC.js} +4 -4
- package/dist/{chunk-RK4JQRVT.js → chunk-KRCU66AM.js} +9 -9
- package/dist/{chunk-RPZIHELI.js → chunk-LHHDX7FB.js} +5 -5
- package/dist/{chunk-FUJUFLDC.js → chunk-LO4CK734.js} +8 -14
- package/dist/chunk-LSLK4RS4.js +82 -0
- package/dist/{chunk-I626B72C.js → chunk-LSZUTI6O.js} +1 -1
- package/dist/{chunk-H2FFONRY.js → chunk-MVPOYQQY.js} +1 -1
- package/dist/{chunk-JVCQZDQ6.js → chunk-NXQK2I3G.js} +1 -1
- package/dist/{chunk-EBIYRRJW.js → chunk-O3MJAHLI.js} +80 -94
- package/dist/{chunk-VRQM4A64.js → chunk-PBGNX3PS.js} +1 -1
- package/dist/{chunk-CJJDJ7AT.js → chunk-PIZA7OG2.js} +5 -3
- package/dist/{chunk-772ILTCK.js → chunk-PMA67TIN.js} +3 -3
- package/dist/{chunk-GDZTL6BI.js → chunk-QKOJ22OV.js} +123 -277
- package/dist/{chunk-WNYH42PF.js → chunk-RF4JHGGB.js} +7 -7
- package/dist/{chunk-WQB3XOEP.js → chunk-SJJXDU2J.js} +6 -6
- package/dist/chunk-T5QBWM6M.js +113 -0
- package/dist/{chunk-LYFLUNWK.js → chunk-TJIFYV2Z.js} +7 -7
- package/dist/{chunk-OZOATEK3.js → chunk-TKY3SDXH.js} +6 -6
- package/dist/{chunk-CVGQ3BNF.js → chunk-ULBYRPAP.js} +1 -1
- package/dist/{chunk-LVXR37OG.js → chunk-URHS76GV.js} +9 -8
- package/dist/{chunk-J7TCTARR.js → chunk-VAYVTUU4.js} +5 -5
- package/dist/{chunk-5FND4PIU.js → chunk-VUH7KKVD.js} +3 -3
- package/dist/{chunk-NTMRMBLM.js → chunk-WACPWYMH.js} +4 -4
- package/dist/{chunk-AAGU5FJF.js → chunk-WGC7UFRM.js} +1 -1
- package/dist/{chunk-XAOIHYPS.js → chunk-WVAXJOWG.js} +5 -4
- package/dist/{chunk-6LO62EQ5.js → chunk-XEWG4AB2.js} +28 -28
- package/dist/{chunk-AYLYAOHH.js → chunk-XIDDJSQU.js} +3 -2
- package/dist/{chunk-ESSJPSJ2.js → chunk-Y4E7IS7H.js} +2 -2
- package/dist/{chunk-HIN4BMRW.js → chunk-YJQ7YA7J.js} +5 -5
- package/dist/{chunk-LCOQN6NR.js → chunk-YMVRCSKD.js} +4 -4
- package/dist/{chunk-JXXHLQQR.js → chunk-YYQ5NOT5.js} +3 -3
- package/dist/chunk-ZHQC43NH.js +130 -0
- package/dist/{chunk-3FSKTGM6.js → chunk-ZSRMJOAK.js} +3 -3
- package/dist/{claude-launcher-LXZPTDNC.js → claude-launcher-LGKJZH33.js} +82 -108
- package/dist/{cli-QFUT3UQS.js → cli-Q5L64EEG.js} +323 -293
- package/dist/{command-45RZT4CK.js → command-CGEFJZNC.js} +55 -53
- package/dist/{config-WYQPXLOP.js → config-T22KVOOT.js} +12 -10
- package/dist/{connect-cmd-LUCQ7FSV.js → connect-cmd-RUBP466E.js} +12 -10
- package/dist/{container-start-T776VI3M.js → container-start-JRF3SBUA.js} +53 -51
- package/dist/{context-cleanup-QE2MIO2Q.js → context-cleanup-3K2AOECJ.js} +4 -2
- package/dist/{context-show-cmd-7QEHUOEL.js → context-show-cmd-4UXO5WQJ.js} +13 -11
- package/dist/{control-plane-launch-THUH6YU5.js → control-plane-launch-AAH4YH56.js} +25 -21
- package/dist/{demo-record-cmd-SBERRQNW.js → demo-record-cmd-2OKCGST7.js} +7 -5
- package/dist/{demo-voice-cmd-VM3FITZU.js → demo-voice-cmd-GEPX7GIG.js} +24 -22
- package/dist/{dist-6KGTCWKR.js → dist-VVZIGSAF.js} +1 -1
- package/dist/{docker-MQNLK4OO.js → docker-5VWK335X.js} +10 -8
- package/dist/{doctor-NQOSPJGS.js → doctor-EQM3JRZI.js} +55 -53
- package/dist/emit-artifact-cmd-TA3MPHLU.js +43 -0
- package/dist/{emit-cmd-ZPFCPVSR.js → emit-cmd-RO4L4PFZ.js} +7 -5
- package/dist/emit-criteria-cmd-NMTUV2KM.js +34 -0
- package/dist/{emit-demo-cmd-PMQGNNVX.js → emit-demo-cmd-Y2Y6LEL7.js} +24 -22
- package/dist/{emit-finding-cmd-MYWQN5WW.js → emit-finding-cmd-VECM64UR.js} +17 -15
- package/dist/{emit-result-cmd-GXK3KMAP.js → emit-result-cmd-2ERWFDUN.js} +22 -20
- package/dist/{emit-step-cmd-ZV2XTUVT.js → emit-step-cmd-V2ET66N4.js} +17 -15
- package/dist/{exec-client-P7RFRUCK.js → exec-client-54XKNPTI.js} +7 -5
- package/dist/find-unit-CNAPU7XQ.js +23 -0
- package/dist/{findings-cmd-OGMBVVSM.js → findings-cmd-QJPPF6BY.js} +17 -15
- package/dist/{fleet-readiness-4RBKLXBQ.js → fleet-readiness-DKAPHAZN.js} +13 -11
- package/dist/{governing-source-XJMXFSAR.js → governing-source-7PZ6DAJU.js} +21 -19
- package/dist/{guest-init-XZHRPIMG.js → guest-init-5QZRGP62.js} +8 -6
- package/dist/{hook-fast-ZOWGWCPO.js → hook-fast-VXROB4KF.js} +4 -2
- package/dist/{pending-YU2GE2UV.js → hook-install-GDNRMML4.js} +5 -5
- package/dist/{hook-wrap-fast-545QJSBJ.js → hook-wrap-fast-LWWKKPGK.js} +4 -2
- package/dist/host-checks-WAPO5X7X.js +78 -0
- package/dist/host-key-HLLV37NV.js +16 -0
- package/dist/{image-tag-E4JK2APF.js → image-tag-PBWQBATH.js} +7 -5
- package/dist/index.js +8 -9
- package/dist/init-EK3PUU6W.js +78 -0
- package/dist/{init-LO6U7YTW.js → init-Y2URPVVY.js} +51 -49
- package/dist/{init-cmd-2JANO5EN.js → init-cmd-XNANUDIW.js} +35 -29
- package/dist/{init-update-D6PRTGNE.js → init-update-EFCTKF6D.js} +24 -22
- package/dist/{install-cmd-SJMBNQEH.js → install-cmd-RHFUZFV4.js} +9 -7
- package/dist/{layout-AQHIMJMO.js → layout-7XMC7S6K.js} +4 -2
- package/dist/{logs-NE55HOET.js → logs-E7MGQINH.js} +6 -4
- package/dist/loop-L6TX6OR4.js +89 -0
- package/dist/machine-VJKAY2GX.js +78 -0
- package/dist/{machine-skills-KK2HXYMR.js → machine-skills-HR4RNRNR.js} +4 -2
- package/dist/{mcp-install-cmd-2QAS3AQZ.js → mcp-install-cmd-SMPLT43Q.js} +4 -2
- package/dist/{mcp-serve-cmd-U6USKHYR.js → mcp-serve-cmd-XXERT673.js} +8 -6
- package/dist/{paths-O7LCWY33.js → paths-F2ZR2EKC.js} +6 -4
- package/dist/pending-VOFQRXP4.js +16 -0
- package/dist/{pidfile-5GDCQ5HA.js → pidfile-7M7O2M7T.js} +7 -5
- package/dist/{record-NETSDAO6.js → record-YCJ6DZOY.js} +7 -5
- package/dist/{relay-VZ733BVJ.js → relay-I2T43PPB.js} +4 -2
- package/dist/{relay-protocol-24GEUGCO.js → relay-protocol-GI2GC2AM.js} +4 -2
- package/dist/runner-env-YW55JVU7.js +23 -0
- package/dist/{runner-identity-PSCZBILD.js → runner-identity-Y5ZFCC7V.js} +10 -8
- package/dist/{runner-key-VM2LYVRK.js → runner-key-R47C6374.js} +51 -49
- package/dist/{session-sender-P2RHDM6U.js → session-sender-UPACLRGG.js} +23 -21
- package/dist/{shell-function-NRD4KVUK.js → shell-function-GYD2ZQQG.js} +2 -1
- package/dist/{spec-cmd-LGKP6MT7.js → spec-cmd-7QRE2SZK.js} +18 -16
- package/dist/{starter-pack-SMK6UPRL.js → starter-pack-IMKIUA56.js} +5 -3
- package/dist/state-VAHBIMS5.js +16 -0
- package/dist/{status-HEHCNIDS.js → status-BQEYEG2V.js} +51 -49
- package/dist/{statusline-fast-E7RWVREA.js → statusline-fast-NUVHCNRX.js} +4 -2
- package/dist/{sync-cmd-HKN45HXL.js → sync-cmd-NBLYEPQG.js} +22 -20
- package/dist/update-steps-VGKNGWTZ.js +79 -0
- package/dist/{watch-RGZCUCR3.js → watch-IHV4V3HZ.js} +22 -20
- package/dist/{work-claim-cmd-6DSPGCZE.js → work-claim-cmd-WGTSU5IT.js} +21 -19
- package/dist/{work-cmd-GPLYLWY7.js → work-cmd-HKOJU5FJ.js} +15 -13
- package/dist/{work-comment-cmd-V5WM7LAW.js → work-comment-cmd-H3JCWQ2J.js} +18 -16
- package/dist/{work-demo-cmd-SWWI6AGD.js → work-demo-cmd-J4AZAIVP.js} +15 -13
- package/dist/{work-launch-TTGSHLY4.js → work-launch-LWDQXLGI.js} +1 -1
- package/dist/{work-logs-cmd-CTFBOPCI.js → work-logs-cmd-UOO4JVLG.js} +15 -13
- package/dist/{work-open-pr-cmd-HX2U3YBR.js → work-open-pr-cmd-QFRDDBAM.js} +17 -15
- package/dist/{work-pr-cmd-EI2R4FQG.js → work-pr-cmd-3Q2D5RQT.js} +16 -14
- package/dist/{work-proofs-cmd-QXNPHLYC.js → work-proofs-cmd-7Y3HGT7C.js} +18 -16
- package/dist/{work-proofs-record-72OKWEES.js → work-proofs-record-QPUM6DY4.js} +28 -26
- package/dist/{work-stop-cmd-7M7ZYUN2.js → work-stop-cmd-SD2ZRMSY.js} +15 -13
- package/package.json +1 -1
- package/dist/agent-setup-AOB76EDJ.js +0 -37
- package/dist/caller-GOY2X6QT.js +0 -20
- package/dist/chunk-KYDEBGJG.js +0 -402
- package/dist/emit-artifact-cmd-6E365VBQ.js +0 -41
- package/dist/emit-criteria-cmd-HWQOYZZ4.js +0 -32
- package/dist/find-unit-63SXQ7IM.js +0 -21
- package/dist/host-checks-WHW24PJR.js +0 -76
- package/dist/host-key-MWLXB5U5.js +0 -14
- package/dist/init-EZIAHBMH.js +0 -76
- package/dist/loop-2E34CGCX.js +0 -87
- package/dist/machine-6ALGG4IO.js +0 -76
- package/dist/runner-env-KHCONH2R.js +0 -21
- package/dist/settings-XB2HYBKO.js +0 -7
- package/dist/state-RJR4PMMX.js +0 -14
- package/dist/update-steps-7E4RD47J.js +0 -77
|
@@ -1,43 +1,47 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { gatherDoctorChecks, doctorExitCode, summarizeChecks, renderDoctorText, recordWrapped, recordUnwrapped, recordRemoval, readManifest, recordInstall, recordStatusline } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
3
|
+
import { gatherDoctorChecks, doctorExitCode, summarizeChecks, renderDoctorText, recordWrapped, recordUnwrapped, recordRemoval, readManifest, recordInstall, recordStatusline } from './chunk-QKOJ22OV.js';
|
|
4
|
+
import './chunk-LHHDX7FB.js';
|
|
5
|
+
import './chunk-SJJXDU2J.js';
|
|
6
|
+
import './chunk-MVPOYQQY.js';
|
|
7
|
+
import './chunk-B5SWBFVE.js';
|
|
8
|
+
import { verifiedTrackerNames, TRACKERS } from './chunk-AQE6E54X.js';
|
|
9
|
+
import './chunk-FWSVWPMS.js';
|
|
10
|
+
import './chunk-VUH7KKVD.js';
|
|
11
|
+
import './chunk-FRMAQ3C4.js';
|
|
12
|
+
import './chunk-P6PHY33P.js';
|
|
13
|
+
import './chunk-6KH3NMIT.js';
|
|
14
|
+
import { FIRST_VERSION_READING_AGENTS_SKILLS } from './chunk-D6EXW4EB.js';
|
|
11
15
|
import './chunk-TPMLB3VZ.js';
|
|
12
16
|
import './chunk-A2LHHKTT.js';
|
|
13
17
|
import { C, warnDeprecated, API_KEY_FLAG_DEPRECATION, NO_COLOR_FLAG, stripNoColor } from './chunk-2AM6Z5BP.js';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
-
import { FIRST_VERSION_READING_AGENTS_SKILLS } from './chunk-WDQPBAFV.js';
|
|
17
|
-
import './chunk-GZ75FRLB.js';
|
|
18
|
-
import './chunk-JVCQZDQ6.js';
|
|
18
|
+
import './chunk-B36NSEUM.js';
|
|
19
|
+
import './chunk-NXQK2I3G.js';
|
|
19
20
|
import './chunk-HWVMRETT.js';
|
|
20
|
-
import './chunk-
|
|
21
|
-
import { hookFiredMarkerPath, installedCliDistDir } from './chunk-
|
|
21
|
+
import './chunk-IKFAJTLZ.js';
|
|
22
|
+
import { hookFiredMarkerPath, installedCliDistDir } from './chunk-O3MJAHLI.js';
|
|
22
23
|
import './chunk-545P7JY7.js';
|
|
23
|
-
import './chunk-
|
|
24
|
+
import './chunk-I4DM7SNX.js';
|
|
24
25
|
import './chunk-BKO6JEZI.js';
|
|
25
|
-
import './chunk-
|
|
26
|
+
import './chunk-4DLJ343I.js';
|
|
27
|
+
import './chunk-BSPJI5T7.js';
|
|
26
28
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
27
|
-
import './chunk-
|
|
28
|
-
import './chunk-5GHJFETA.js';
|
|
29
|
+
import './chunk-LSZUTI6O.js';
|
|
29
30
|
import './chunk-NFZMENCY.js';
|
|
30
31
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
31
32
|
import { cliInvocation, packageRunnerOf } from './chunk-FZKNTIOJ.js';
|
|
32
|
-
import {
|
|
33
|
-
import './chunk-
|
|
33
|
+
import { installAgents, settingsFileOf, withSettingsText } from './chunk-HTRDL42C.js';
|
|
34
|
+
import { cliForInstall, SettingsParseError, PORTABLE_BIN, writeSettingsText, cliBinResolvable } from './chunk-ZHQC43NH.js';
|
|
35
|
+
import './chunk-PBGNX3PS.js';
|
|
34
36
|
import { cloneIsGoverned } from './chunk-YQR6E6OV.js';
|
|
35
37
|
import { removeJournalHooks, removePreCommitGuardHook } from './chunk-CJPTUU2E.js';
|
|
36
|
-
import './chunk-
|
|
37
|
-
import './chunk-
|
|
38
|
-
import './chunk-
|
|
39
|
-
import './chunk-
|
|
38
|
+
import './chunk-DTCTXDJP.js';
|
|
39
|
+
import './chunk-CXJC3JLN.js';
|
|
40
|
+
import './chunk-DTQPDMHG.js';
|
|
41
|
+
import { defaultAgents, legacyAgent } from './chunk-I6U6QPN6.js';
|
|
40
42
|
import './chunk-WUKLQWGY.js';
|
|
43
|
+
import './chunk-T5QBWM6M.js';
|
|
44
|
+
import './chunk-LSLK4RS4.js';
|
|
41
45
|
import './chunk-CDDED64E.js';
|
|
42
46
|
import { resolveVersion, resolvePackageVersion } from './chunk-RA3O54FC.js';
|
|
43
47
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
@@ -3485,21 +3489,34 @@ function installCliCopy(opts) {
|
|
|
3485
3489
|
}
|
|
3486
3490
|
function runInit(opts) {
|
|
3487
3491
|
const scope = opts.scope ?? "user";
|
|
3488
|
-
const
|
|
3489
|
-
const
|
|
3492
|
+
const list = opts.agents ?? defaultAgents();
|
|
3493
|
+
const [first, ...rest] = installAgents(list);
|
|
3494
|
+
if (first === void 0 || first.entry.descriptor.id !== legacyAgent(list).descriptor.id) throw new Error("the legacy agent has no hook settings");
|
|
3495
|
+
const where = { home: opts.home ?? homeFromEnv(), cwd: opts.cwd ?? process.cwd() };
|
|
3496
|
+
const path2 = first.install.settingsFile(scope, where);
|
|
3497
|
+
const cli = cliForInstall(opts.cliBin);
|
|
3490
3498
|
const manifestHome = opts.home ?? homeFromEnv();
|
|
3491
3499
|
if (opts.remove) {
|
|
3492
|
-
const
|
|
3493
|
-
const
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3500
|
+
const result = withSettingsText(path2, (text) => first.install.remove(text, cli));
|
|
3501
|
+
const otherResults = rest.map((agent) => {
|
|
3502
|
+
const file = agent.install.settingsFile(scope, where);
|
|
3503
|
+
return { agent, file, result: withSettingsText(file, (text) => agent.install.remove(text, cli)) };
|
|
3504
|
+
});
|
|
3505
|
+
const backupPath2 = result.changed ? writeSettingsText(path2, result.text) : void 0;
|
|
3506
|
+
const others2 = otherResults.map(({ agent, file, result: removed }) => ({
|
|
3507
|
+
agent: agent.entry.descriptor.id,
|
|
3508
|
+
path: file,
|
|
3509
|
+
changed: removed.changed,
|
|
3510
|
+
backupPath: removed.changed ? writeSettingsText(file, removed.text) : void 0,
|
|
3511
|
+
events: agent.events,
|
|
3512
|
+
removed: true
|
|
3513
|
+
}));
|
|
3497
3514
|
const gitHookRemoval2 = removeJournalHooks(opts.cwd ?? process.cwd());
|
|
3498
3515
|
const guardHookRemoval = removePreCommitGuardHook(opts.cwd ?? process.cwd());
|
|
3499
|
-
recordRemoval(manifestHome,
|
|
3516
|
+
for (const file of [path2, ...others2.map((other) => other.path)]) recordRemoval(manifestHome, file);
|
|
3500
3517
|
const remaining = readManifest(manifestHome);
|
|
3501
3518
|
if (!remaining || Object.keys(remaining.installs).length === 0) {
|
|
3502
|
-
for (const event of
|
|
3519
|
+
for (const event of new Set([first, ...rest].flatMap((agent) => agent.events))) {
|
|
3503
3520
|
try {
|
|
3504
3521
|
unlinkSync(hookFiredMarkerPath(event, manifestHome));
|
|
3505
3522
|
} catch {
|
|
@@ -3508,49 +3525,30 @@ function runInit(opts) {
|
|
|
3508
3525
|
}
|
|
3509
3526
|
return {
|
|
3510
3527
|
path: path2,
|
|
3511
|
-
changed:
|
|
3528
|
+
changed: result.changed,
|
|
3512
3529
|
backupPath: backupPath2,
|
|
3513
|
-
events:
|
|
3530
|
+
events: first.events,
|
|
3514
3531
|
removed: true,
|
|
3515
3532
|
gitHookRemoved: gitHookRemoval2.removed,
|
|
3516
3533
|
guardHookRemoved: guardHookRemoval.removed,
|
|
3517
3534
|
wrapped: [],
|
|
3518
|
-
unwrappedCount:
|
|
3519
|
-
...
|
|
3535
|
+
unwrappedCount: result.unwrapped,
|
|
3536
|
+
...result.restoredStatusline ? { statuslineWrappedCommand: result.restoredStatusline } : {},
|
|
3537
|
+
...others2.length > 0 ? { others: others2 } : {}
|
|
3520
3538
|
};
|
|
3521
3539
|
}
|
|
3540
|
+
const options = { wrap: opts.wrapHooks ?? true, statusline: opts.statusline ?? true };
|
|
3541
|
+
const installed = withSettingsText(path2, (text) => first.install.install(text, cli, options));
|
|
3522
3542
|
if (!cliBinResolvable(opts.cliBin)) {
|
|
3523
|
-
return { path: path2, changed: false, events:
|
|
3524
|
-
}
|
|
3525
|
-
const
|
|
3526
|
-
const
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
if (opts.wrapHooks ?? true) {
|
|
3531
|
-
const wrapResult = wrapHooks(next, opts.cliBin, { events: [...AUTO_WRAP_EVENTS] });
|
|
3532
|
-
if (wrapResult.changed) {
|
|
3533
|
-
next = wrapResult.next;
|
|
3534
|
-
changed = true;
|
|
3535
|
-
wrapped = wrapResult.wrapped;
|
|
3536
|
-
}
|
|
3537
|
-
}
|
|
3538
|
-
let statusline;
|
|
3539
|
-
let statuslineWrappedCommand;
|
|
3540
|
-
if (opts.statusline ?? true) {
|
|
3541
|
-
const slotResult = mergeStatusline(next, opts.cliBin);
|
|
3542
|
-
statusline = slotResult.outcome;
|
|
3543
|
-
statuslineWrappedCommand = slotResult.wrappedCommand;
|
|
3544
|
-
if (slotResult.changed) {
|
|
3545
|
-
next = slotResult.next;
|
|
3546
|
-
changed = true;
|
|
3547
|
-
}
|
|
3548
|
-
}
|
|
3549
|
-
const backupPath = changed ? writeSettings(path2, next) : void 0;
|
|
3550
|
-
recordInstall(manifestHome, path2, { cliBin: opts.cliBin, events: REGISTERED_EVENTS });
|
|
3551
|
-
recordWrapped(manifestHome, path2, wrapped.map((c) => ({ event: c.event, original: c.command })));
|
|
3543
|
+
return { path: path2, changed: false, events: first.events, wrapped: [], cliBinUnresolved: true };
|
|
3544
|
+
}
|
|
3545
|
+
const others = rest.map((agent) => installOther(agent, scope, where, cli, options, opts.cliBin, manifestHome));
|
|
3546
|
+
const backupPath = installed.changed ? writeSettingsText(path2, installed.text) : void 0;
|
|
3547
|
+
recordInstall(manifestHome, path2, { cliBin: opts.cliBin, events: [...first.events] });
|
|
3548
|
+
recordWrapped(manifestHome, path2, installed.wrapped.map((c) => ({ event: c.event, original: c.command })));
|
|
3549
|
+
const statusline = installed.statusline;
|
|
3552
3550
|
if (statusline && statusline !== "skipped") {
|
|
3553
|
-
recordStatusline(manifestHome, path2, statuslineWrappedCommand !== void 0 ? "wrapped" : "installed", statuslineWrappedCommand);
|
|
3551
|
+
recordStatusline(manifestHome, path2, installed.statuslineWrappedCommand !== void 0 ? "wrapped" : "installed", installed.statuslineWrappedCommand);
|
|
3554
3552
|
}
|
|
3555
3553
|
const gitHookRemoval = removeJournalHooks(opts.cwd ?? process.cwd());
|
|
3556
3554
|
let gitignoreUpdated = false;
|
|
@@ -3559,16 +3557,25 @@ function runInit(opts) {
|
|
|
3559
3557
|
}
|
|
3560
3558
|
return {
|
|
3561
3559
|
path: path2,
|
|
3562
|
-
changed,
|
|
3560
|
+
changed: installed.changed,
|
|
3563
3561
|
backupPath,
|
|
3564
|
-
events:
|
|
3562
|
+
events: first.events,
|
|
3565
3563
|
gitignoreUpdated,
|
|
3566
3564
|
...gitHookRemoval.removed ? { gitHookRemoved: true } : {},
|
|
3567
|
-
wrapped,
|
|
3565
|
+
wrapped: installed.wrapped,
|
|
3568
3566
|
...statusline ? { statusline } : {},
|
|
3569
|
-
...statuslineWrappedCommand ? { statuslineWrappedCommand } : {}
|
|
3567
|
+
...installed.statuslineWrappedCommand ? { statuslineWrappedCommand: installed.statuslineWrappedCommand } : {},
|
|
3568
|
+
...others.length > 0 ? { others } : {}
|
|
3570
3569
|
};
|
|
3571
3570
|
}
|
|
3571
|
+
function installOther(agent, scope, where, cli, options, cliBin, manifestHome) {
|
|
3572
|
+
const file = agent.install.settingsFile(scope, where);
|
|
3573
|
+
const installed = withSettingsText(file, (text) => agent.install.install(text, cli, options));
|
|
3574
|
+
const backupPath = installed.changed ? writeSettingsText(file, installed.text) : void 0;
|
|
3575
|
+
recordInstall(manifestHome, file, { cliBin, events: [...agent.events] });
|
|
3576
|
+
recordWrapped(manifestHome, file, installed.wrapped.map((c) => ({ event: c.event, original: c.command })));
|
|
3577
|
+
return { agent: agent.entry.descriptor.id, path: file, changed: installed.changed, backupPath, events: agent.events };
|
|
3578
|
+
}
|
|
3572
3579
|
function tracksOwnOuterlayerDir(cwd) {
|
|
3573
3580
|
try {
|
|
3574
3581
|
const out = execFileSync("git", ["-C", cwd, "ls-files", "--", ".outerlayer"], {
|
|
@@ -3601,22 +3608,16 @@ function ensureGitignore(cwd) {
|
|
|
3601
3608
|
`);
|
|
3602
3609
|
return true;
|
|
3603
3610
|
}
|
|
3604
|
-
function orgRolloutSnippet() {
|
|
3605
|
-
const
|
|
3606
|
-
|
|
3607
|
-
hooks[event] = [{ hooks: [{ type: "command", command: `${PORTABLE_BIN} hook ${event}` }] }];
|
|
3608
|
-
}
|
|
3609
|
-
const managed = JSON.stringify({ hooks }, null, 2);
|
|
3611
|
+
function orgRolloutSnippet(agents = defaultAgents()) {
|
|
3612
|
+
const { install } = installAgents(agents)[0];
|
|
3613
|
+
const managed = JSON.stringify(install.managedSettings.document((event) => `${PORTABLE_BIN} hook ${event}`), null, 2);
|
|
3610
3614
|
return [
|
|
3611
3615
|
"# Org-wide rollout (managed settings)",
|
|
3612
3616
|
"",
|
|
3613
3617
|
"Deploy this managed-settings.json to every developer machine via MDM/GPO.",
|
|
3614
3618
|
"It cannot be overridden by users, guaranteeing fleet-wide capture.",
|
|
3615
3619
|
"",
|
|
3616
|
-
|
|
3617
|
-
" (domain com.anthropic.claudecode)",
|
|
3618
|
-
" Linux: /etc/claude-code/managed-settings.json",
|
|
3619
|
-
" Windows (GPO): HKLM\\SOFTWARE\\Policies\\ClaudeCode, as a REG_SZ value named Settings",
|
|
3620
|
+
...install.managedSettings.locations,
|
|
3620
3621
|
"",
|
|
3621
3622
|
"managed-settings.json:",
|
|
3622
3623
|
managed,
|
|
@@ -3657,14 +3658,14 @@ function apiKeyOption() {
|
|
|
3657
3658
|
return new Option("--api-key <key>", `deprecated: use \`${cliInvocation()} login\` or OUTERLAYER_API_KEY`).hideHelp();
|
|
3658
3659
|
}
|
|
3659
3660
|
async function installStarterPackInRepo() {
|
|
3660
|
-
const { installStarterPack, formatStarterPackOutput } = await import('./starter-pack-
|
|
3661
|
+
const { installStarterPack, formatStarterPackOutput } = await import('./starter-pack-IMKIUA56.js');
|
|
3661
3662
|
const cwd = process.cwd();
|
|
3662
3663
|
let repoRoot = cwd;
|
|
3663
3664
|
try {
|
|
3664
3665
|
repoRoot = execFileSync("git", ["rev-parse", "--show-toplevel"], { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim() || cwd;
|
|
3665
3666
|
} catch {
|
|
3666
3667
|
}
|
|
3667
|
-
const { declareAgentsMdLayout, isAgentsMdLayout, skillsBaseFor } = await import('./layout-
|
|
3668
|
+
const { declareAgentsMdLayout, isAgentsMdLayout, skillsBaseFor } = await import('./layout-7XMC7S6K.js');
|
|
3668
3669
|
const fresh = !isAgentsMdLayout(repoRoot) && !existsSync(join(repoRoot, ".outerlayer/skills")) && !existsSync(join(repoRoot, ".outerlayer/AGENTS.md"));
|
|
3669
3670
|
const result = installStarterPack({ repoRoot, base: fresh ? ".agents/skills" : skillsBaseFor(repoRoot) });
|
|
3670
3671
|
if (fresh) declareAgentsMdLayout(repoRoot);
|
|
@@ -3687,6 +3688,14 @@ ${C.dim} backup: ${result.backupPath}${C.reset}` : ""}
|
|
|
3687
3688
|
lines.push(`${C.green}\u2713${C.reset} Restored status line to: ${C.dim}${result.statuslineWrappedCommand}${C.reset}
|
|
3688
3689
|
`);
|
|
3689
3690
|
}
|
|
3691
|
+
for (const other of result.others ?? []) {
|
|
3692
|
+
lines.push(
|
|
3693
|
+
other.changed ? `${C.green}\u2713${C.reset} Removed OuterLayer hooks from ${other.path}${other.backupPath ? `
|
|
3694
|
+
${C.dim} backup: ${other.backupPath}${C.reset}` : ""}
|
|
3695
|
+
` : `${C.dim}No OuterLayer hooks to remove in ${other.path}${C.reset}
|
|
3696
|
+
`
|
|
3697
|
+
);
|
|
3698
|
+
}
|
|
3690
3699
|
return lines.join("");
|
|
3691
3700
|
}
|
|
3692
3701
|
if (!result.changed) {
|
|
@@ -3699,6 +3708,14 @@ ${C.dim} backup: ${result.backupPath}${C.reset}` : ""}
|
|
|
3699
3708
|
` : "")
|
|
3700
3709
|
);
|
|
3701
3710
|
}
|
|
3711
|
+
for (const other of result.others ?? []) {
|
|
3712
|
+
lines.push(
|
|
3713
|
+
other.changed ? `${C.green}\u2713${C.reset} Installed ${other.events.join(", ")} hooks \u2192 ${other.path}
|
|
3714
|
+
` + (other.backupPath ? `${C.dim} backup: ${other.backupPath}${C.reset}
|
|
3715
|
+
` : "") : `${C.green}\u2713${C.reset} Hooks already installed in ${other.path} (no change)
|
|
3716
|
+
`
|
|
3717
|
+
);
|
|
3718
|
+
}
|
|
3702
3719
|
if (result.wrapped.length > 0) {
|
|
3703
3720
|
lines.push(
|
|
3704
3721
|
`${C.green}\u2713${C.reset} Auto-wrapped ${result.wrapped.length} hook(s) for execution evidence (adds one spawn per firing \u2014 see ${C.yellow}${cliInvocation()} hooks unwrap${C.reset} to undo):
|
|
@@ -3790,7 +3807,7 @@ ${starter.output}`),
|
|
|
3790
3807
|
}
|
|
3791
3808
|
}
|
|
3792
3809
|
async function installMachineSkillsForSetup() {
|
|
3793
|
-
const { setupMachineSkills } = await import('./machine-skills-
|
|
3810
|
+
const { setupMachineSkills } = await import('./machine-skills-HR4RNRNR.js');
|
|
3794
3811
|
const result = setupMachineSkills(homeFromEnv());
|
|
3795
3812
|
for (const failure of result.failures) process.stderr.write(`${C.yellow}!${C.reset} Could not write a maintained skill: ${failure}
|
|
3796
3813
|
`);
|
|
@@ -3798,8 +3815,8 @@ async function installMachineSkillsForSetup() {
|
|
|
3798
3815
|
` : "";
|
|
3799
3816
|
}
|
|
3800
3817
|
async function realConnectDepsForCwd() {
|
|
3801
|
-
const { realConnectDeps } = await import('./connect-cmd-
|
|
3802
|
-
const { resolveRepoIdentity } = await import('./dist-
|
|
3818
|
+
const { realConnectDeps } = await import('./connect-cmd-RUBP466E.js');
|
|
3819
|
+
const { resolveRepoIdentity } = await import('./dist-VVZIGSAF.js');
|
|
3803
3820
|
return {
|
|
3804
3821
|
...realConnectDeps(),
|
|
3805
3822
|
home: homeFromEnv(),
|
|
@@ -3816,7 +3833,7 @@ function buildProgram(argv = process.argv) {
|
|
|
3816
3833
|
const program2 = new Command();
|
|
3817
3834
|
program2.name(cliInvocation()).description("OuterLayer \u2014 see what your coding agents actually do").enablePositionalOptions().version(resolveVersion()).hook("preAction", async (_root, command) => {
|
|
3818
3835
|
if (command.opts().apiKey !== void 0) warnDeprecated(API_KEY_FLAG_DEPRECATION);
|
|
3819
|
-
const { machineRefreshSkipped, refreshMachineSkills } = await import('./machine-skills-
|
|
3836
|
+
const { machineRefreshSkipped, refreshMachineSkills } = await import('./machine-skills-HR4RNRNR.js');
|
|
3820
3837
|
const names = [];
|
|
3821
3838
|
for (let at = command; at?.parent; at = at.parent) names.push(at.name());
|
|
3822
3839
|
if (!machineRefreshSkipped(names, command._hidden === true, argv)) refreshMachineSkills(homeFromEnv());
|
|
@@ -3873,8 +3890,8 @@ build, ../outerlayer-build/SKILL.md becomes ~/.agents/skills/outerlayer-build/SK
|
|
|
3873
3890
|
what CLIs older than ${FIRST_VERSION_READING_AGENTS_SKILLS} do. \`` + cliInvocation() + " doctor` reports the same\nstates under Starter files.\n"
|
|
3874
3891
|
).action(async (opts) => {
|
|
3875
3892
|
if (opts.update || opts.dryRun) {
|
|
3876
|
-
const { runInitUpdateWithFleet, formatInitUpdate, updateFlagProblem } = await import('./init-update-
|
|
3877
|
-
const { fleetReadiness } = await import('./fleet-readiness-
|
|
3893
|
+
const { runInitUpdateWithFleet, formatInitUpdate, updateFlagProblem } = await import('./init-update-EFCTKF6D.js');
|
|
3894
|
+
const { fleetReadiness } = await import('./fleet-readiness-DKAPHAZN.js');
|
|
3878
3895
|
const problem = updateFlagProblem(opts);
|
|
3879
3896
|
if (problem !== void 0) {
|
|
3880
3897
|
fail(problem);
|
|
@@ -3891,7 +3908,7 @@ what CLIs older than ${FIRST_VERSION_READING_AGENTS_SKILLS} do. \`` + cliInvocat
|
|
|
3891
3908
|
}
|
|
3892
3909
|
let starterTemplate;
|
|
3893
3910
|
if (opts.template !== void 0) {
|
|
3894
|
-
const { assertKnownTemplate, StarterPackError } = await import('./starter-pack-
|
|
3911
|
+
const { assertKnownTemplate, StarterPackError } = await import('./starter-pack-IMKIUA56.js');
|
|
3895
3912
|
try {
|
|
3896
3913
|
assertKnownTemplate(opts.template);
|
|
3897
3914
|
} catch (err) {
|
|
@@ -3920,18 +3937,18 @@ what CLIs older than ${FIRST_VERSION_READING_AGENTS_SKILLS} do. \`` + cliInvocat
|
|
|
3920
3937
|
return;
|
|
3921
3938
|
}
|
|
3922
3939
|
if (opts.remove) {
|
|
3923
|
-
const { removeShellFunction } = await import('./shell-function-
|
|
3940
|
+
const { removeShellFunction } = await import('./shell-function-GYD2ZQQG.js');
|
|
3924
3941
|
const changed = removeShellFunction({ home: homeFromEnv() });
|
|
3925
3942
|
if (changed.length > 0 && !opts.json) process.stdout.write(`Removed the claude function from ${changed.join(", ")}.
|
|
3926
3943
|
`);
|
|
3927
3944
|
}
|
|
3928
|
-
const shell = !opts.remove && opts.shellFunction !== void 0 ? (await import('./init-cmd-
|
|
3945
|
+
const shell = !opts.remove && opts.shellFunction !== void 0 ? (await import('./init-cmd-XNANUDIW.js')).applyShellFunctionFlag(opts.shellFunction, { home: homeFromEnv(), shellPath: process.env.SHELL }) : void 0;
|
|
3929
3946
|
if (opts.json) writeJson(shell === void 0 ? outcome.result : { ...outcome.result, shellFunction: { outcome: shell.outcome, reason: shell.reason } });
|
|
3930
3947
|
else process.stdout.write(outcome.text + skillsLine + (shell?.text ?? ""));
|
|
3931
3948
|
return;
|
|
3932
3949
|
}
|
|
3933
3950
|
await installMachineSkillsForSetup();
|
|
3934
|
-
const { runInitCommand } = await import('./init-cmd-
|
|
3951
|
+
const { runInitCommand } = await import('./init-cmd-XNANUDIW.js');
|
|
3935
3952
|
const code = await runInitCommand(
|
|
3936
3953
|
{ json: opts.json, factory: opts.factory, shellFunction: opts.shellFunction },
|
|
3937
3954
|
{
|
|
@@ -3943,7 +3960,7 @@ what CLIs older than ${FIRST_VERSION_READING_AGENTS_SKILLS} do. \`` + cliInvocat
|
|
|
3943
3960
|
return { ok, text, detail };
|
|
3944
3961
|
},
|
|
3945
3962
|
runAgentSetup: async () => {
|
|
3946
|
-
const { runAgentSetup } = await import('./agent-setup-
|
|
3963
|
+
const { runAgentSetup } = await import('./agent-setup-Q3HDN23U.js');
|
|
3947
3964
|
return runAgentSetup({ cwd: process.cwd(), skillsLink: opts.skillsLink !== false });
|
|
3948
3965
|
},
|
|
3949
3966
|
runDoctorChecks: gatherDoctorChecks,
|
|
@@ -3952,7 +3969,7 @@ what CLIs older than ${FIRST_VERSION_READING_AGENTS_SKILLS} do. \`` + cliInvocat
|
|
|
3952
3969
|
shellPath: process.env.SHELL,
|
|
3953
3970
|
interactive: Boolean(process.stdin.isTTY && process.stderr.isTTY) && opts.json !== true,
|
|
3954
3971
|
ask: async () => {
|
|
3955
|
-
const { promptOnTerminal } = await import('./connect-cmd-
|
|
3972
|
+
const { promptOnTerminal } = await import('./connect-cmd-RUBP466E.js');
|
|
3956
3973
|
const answer = await promptOnTerminal({
|
|
3957
3974
|
message: `Should plain claude start Claude Code through ${cliInvocation()} claude? That is how a session in a governed repository gets its control plane. It adds one block to your zsh or bash startup file.`,
|
|
3958
3975
|
options: [
|
|
@@ -3991,7 +4008,7 @@ linked (true, false, or null when it could not be checked) and, when false,
|
|
|
3991
4008
|
linkUrl.
|
|
3992
4009
|
`
|
|
3993
4010
|
).action(async (opts) => {
|
|
3994
|
-
const { runConnectCommand } = await import('./connect-cmd-
|
|
4011
|
+
const { runConnectCommand } = await import('./connect-cmd-RUBP466E.js');
|
|
3995
4012
|
const code = await runConnectCommand({ factory: opts.factory, json: opts.json }, await realConnectDepsForCwd(), {
|
|
3996
4013
|
stdout: process.stdout,
|
|
3997
4014
|
stderr: process.stderr
|
|
@@ -4069,7 +4086,7 @@ code is 1: revoke the token on /profile/security.
|
|
|
4069
4086
|
else fail(found.reason);
|
|
4070
4087
|
return;
|
|
4071
4088
|
}
|
|
4072
|
-
const { runSync, SyncConfigError, SyncTransportError } = await import('./sync-cmd-
|
|
4089
|
+
const { runSync, SyncConfigError, SyncTransportError } = await import('./sync-cmd-NBLYEPQG.js');
|
|
4073
4090
|
try {
|
|
4074
4091
|
const result = await runSync({
|
|
4075
4092
|
url: opts.url,
|
|
@@ -4098,7 +4115,7 @@ code is 1: revoke the token on /profile/security.
|
|
|
4098
4115
|
if (invokedCommandToken(argv) === "watch") {
|
|
4099
4116
|
warnDeprecated(`\`${cliInvocation()} watch\` is now \`${cliInvocation()} daemon\`; the old name will be removed in a future release.`);
|
|
4100
4117
|
}
|
|
4101
|
-
const { runWatch } = await import('./watch-
|
|
4118
|
+
const { runWatch } = await import('./watch-IHV4V3HZ.js');
|
|
4102
4119
|
await runWatch({ once: opts.once });
|
|
4103
4120
|
});
|
|
4104
4121
|
program2.command("hook <event>", { hidden: true }).description("capture-hook fast path, installed by `init`").action(() => {
|
|
@@ -4107,11 +4124,14 @@ code is 1: revoke the token on /profile/security.
|
|
|
4107
4124
|
});
|
|
4108
4125
|
program2.command("hook-wrap", { hidden: true }).description("runs a hook wrapped by `hooks wrap`, recording exec evidence").option("--id <base64>", "the original hook command, base64-encoded").option("--capture-output", "tee stdout/stderr into a bounded tail").action(() => {
|
|
4109
4126
|
});
|
|
4110
|
-
|
|
4111
|
-
|
|
4127
|
+
for (const agent of defaultAgents()) {
|
|
4128
|
+
if (agent.adapter.launch === void 0) continue;
|
|
4129
|
+
program2.command(`${agent.descriptor.legacy?.subcommand ?? agent.descriptor.id} [args...]`).description(`start ${agent.descriptor.label} with the repository's control plane attached`).allowUnknownOption().helpOption(false).action(() => {
|
|
4130
|
+
});
|
|
4131
|
+
}
|
|
4112
4132
|
const brokerRelay = program2.command("broker-relay", { hidden: true }).description("relay a build's loopback connections to the runner's tunnel and destinations").enablePositionalOptions().option("--port <port>", "the loopback port to listen on").option("--socket <path>", "the runner's tunnel socket").option("--join <path>", "the socket the runner's joining process connects to").option("--lease-watchdog", "exit when the runner's lease expiry passes; needs --join").option("--forward <port=target>", "also relay a loopback port to a destination; repeatable", (value, previous) => [...previous, value], []).action(async (opts) => {
|
|
4113
|
-
const { startRelay, startSessionRelay } = await import('./relay-
|
|
4114
|
-
const { TARGET_TUNNEL, targetOfPath } = await import('./relay-protocol-
|
|
4133
|
+
const { startRelay, startSessionRelay } = await import('./relay-I2T43PPB.js');
|
|
4134
|
+
const { TARGET_TUNNEL, targetOfPath } = await import('./relay-protocol-GI2GC2AM.js');
|
|
4115
4135
|
const port = Number(opts.port);
|
|
4116
4136
|
if (!Number.isInteger(port) || port < 1 || port > 65535) {
|
|
4117
4137
|
fail(opts.port === void 0 ? "--port is required" : `--port must be a port number, not ${opts.port}`);
|
|
@@ -4143,7 +4163,7 @@ code is 1: revoke the token on /profile/security.
|
|
|
4143
4163
|
await startRelay({ port, socketPath: opts.socket, forwards: forwards.map((forward) => ({ port: forward.port, socketPath: forward.spec })) });
|
|
4144
4164
|
});
|
|
4145
4165
|
brokerRelay.command("join").description("carry the runner's session to the relay over standard input and output").option("--socket <path>", "the relay's joining socket", "/run/outerlayer-relay/join.sock").action(async (opts) => {
|
|
4146
|
-
const { joinRelay } = await import('./relay-
|
|
4166
|
+
const { joinRelay } = await import('./relay-I2T43PPB.js');
|
|
4147
4167
|
try {
|
|
4148
4168
|
await joinRelay({ socketPath: opts.socket, input: process.stdin, output: process.stdout });
|
|
4149
4169
|
} catch (err) {
|
|
@@ -4159,7 +4179,7 @@ code is 1: revoke the token on /profile/security.
|
|
|
4159
4179
|
}
|
|
4160
4180
|
});
|
|
4161
4181
|
program2.command("vm-exec", { hidden: true }).description("run a command in a microVM build's guest through its exec agent").requiredOption("--socket <path>", "the Unix socket Firecracker serves the build's vsock device on").option("--user <user>", "the user to run as", "").option("--cwd <dir>", "the working directory", "/").option("--env <NAME=value>", "an environment value the command line carries; repeatable", (value, previous) => [...previous, value], []).option("--pass <NAME>", "an environment variable whose value is read from this process; repeatable", (value, previous) => [...previous, value], []).argument("<argv...>", "the command and its arguments").action(async (argv2, opts) => {
|
|
4162
|
-
const { runVmExec } = await import('./exec-client-
|
|
4182
|
+
const { runVmExec } = await import('./exec-client-54XKNPTI.js');
|
|
4163
4183
|
const env = {};
|
|
4164
4184
|
for (const entry of opts.env) {
|
|
4165
4185
|
const eq = entry.indexOf("=");
|
|
@@ -4188,7 +4208,7 @@ code is 1: revoke the token on /profile/security.
|
|
|
4188
4208
|
process.exitCode = await runBuildCommand({ dir: opts.dir, argv: command });
|
|
4189
4209
|
});
|
|
4190
4210
|
program2.command("session-sender", { hidden: true }).description("stream a runner build's sessions to its work item while the build runs").action(async () => {
|
|
4191
|
-
const { runSessionSender } = await import('./session-sender-
|
|
4211
|
+
const { runSessionSender } = await import('./session-sender-UPACLRGG.js');
|
|
4192
4212
|
try {
|
|
4193
4213
|
await runSessionSender();
|
|
4194
4214
|
} catch (err) {
|
|
@@ -4196,7 +4216,7 @@ code is 1: revoke the token on /profile/security.
|
|
|
4196
4216
|
}
|
|
4197
4217
|
});
|
|
4198
4218
|
program2.command("vm-init", { hidden: true }).description("lay out a microVM build's guest; the guest helper runs it").action(async () => {
|
|
4199
|
-
const { realGuestHost, runGuestInit } = await import('./guest-init-
|
|
4219
|
+
const { realGuestHost, runGuestInit } = await import('./guest-init-5QZRGP62.js');
|
|
4200
4220
|
const { readFileSync: readFileSync3 } = await import('fs');
|
|
4201
4221
|
try {
|
|
4202
4222
|
runGuestInit(realGuestHost(), readFileSync3("/proc/cmdline", "utf8"));
|
|
@@ -4205,7 +4225,7 @@ code is 1: revoke the token on /profile/security.
|
|
|
4205
4225
|
}
|
|
4206
4226
|
});
|
|
4207
4227
|
program2.command("vm-forward", { hidden: true }).description("pipe a guest port to another; vm-init runs it").requiredOption("--listen <host:port>", "the address to listen on").requiredOption("--to <host:port>", "the address to pipe each connection to").action(async (opts) => {
|
|
4208
|
-
const { startBridgeForward } = await import('./bridge-
|
|
4228
|
+
const { startBridgeForward } = await import('./bridge-4KPODDN7.js');
|
|
4209
4229
|
try {
|
|
4210
4230
|
await startBridgeForward(opts);
|
|
4211
4231
|
} catch (err) {
|
|
@@ -4231,7 +4251,7 @@ async function runCli(processArgv) {
|
|
|
4231
4251
|
await buildProgram(argv).parseAsync(argv);
|
|
4232
4252
|
}
|
|
4233
4253
|
async function compileContext(opts) {
|
|
4234
|
-
const { runEmit, EmitError } = await import('./emit-cmd-
|
|
4254
|
+
const { runEmit, EmitError } = await import('./emit-cmd-RO4L4PFZ.js');
|
|
4235
4255
|
try {
|
|
4236
4256
|
const result = runEmit({ cwd: opts.dir, check: opts.check, json: opts.json });
|
|
4237
4257
|
if (result.exitCode !== 0) process.exitCode = result.exitCode;
|
|
@@ -4284,7 +4304,7 @@ Compiling .outerlayer/ moved to \`${cliInvocation()} context emit\`.
|
|
|
4284
4304
|
await compileContext({ dir: opts.dir, check: opts.check, json: opts.json });
|
|
4285
4305
|
return;
|
|
4286
4306
|
}
|
|
4287
|
-
const { runEmitResult, EmitResultError } = await import('./emit-result-cmd-
|
|
4307
|
+
const { runEmitResult, EmitResultError } = await import('./emit-result-cmd-2ERWFDUN.js');
|
|
4288
4308
|
try {
|
|
4289
4309
|
const result = await runEmitResult({
|
|
4290
4310
|
name,
|
|
@@ -4335,7 +4355,7 @@ everywhere, bytes and deep link untouched; a still-queued one is cancelled
|
|
|
4335
4355
|
locally so it never uploads. One correction can retire several duplicates.
|
|
4336
4356
|
`
|
|
4337
4357
|
).action(async (file, opts) => {
|
|
4338
|
-
const { runEmitArtifact, EmitArtifactError } = await import('./emit-artifact-cmd-
|
|
4358
|
+
const { runEmitArtifact, EmitArtifactError } = await import('./emit-artifact-cmd-TA3MPHLU.js');
|
|
4339
4359
|
let pr;
|
|
4340
4360
|
if (opts.pr !== void 0) {
|
|
4341
4361
|
pr = parseTrackerNumber(opts.pr);
|
|
@@ -4391,7 +4411,7 @@ its criterion, and the new record retires the old record. The id must be the ite
|
|
|
4391
4411
|
as \`work demo --item <n> --json\` prints it.
|
|
4392
4412
|
`
|
|
4393
4413
|
).action(async (manifest, opts) => {
|
|
4394
|
-
const { runEmitDemo, EmitDemoError } = await import('./emit-demo-cmd-
|
|
4414
|
+
const { runEmitDemo, EmitDemoError } = await import('./emit-demo-cmd-Y2Y6LEL7.js');
|
|
4395
4415
|
let item;
|
|
4396
4416
|
if (opts.item !== void 0) {
|
|
4397
4417
|
item = parseTrackerNumber(opts.item);
|
|
@@ -4434,7 +4454,7 @@ as \`work demo --item <n> --json\` prints it.
|
|
|
4434
4454
|
}
|
|
4435
4455
|
});
|
|
4436
4456
|
program2.command("demo-voice", { hidden: true }).description("Speak demo lines for a recorder: JSON lines in on stdin, out on stdout").action(async () => {
|
|
4437
|
-
const { runDemoVoice } = await import('./demo-voice-cmd-
|
|
4457
|
+
const { runDemoVoice } = await import('./demo-voice-cmd-GEPX7GIG.js');
|
|
4438
4458
|
await runDemoVoice();
|
|
4439
4459
|
});
|
|
4440
4460
|
const demoCmd = program2.command("demo").description("Record demos with the recorder this CLI carries");
|
|
@@ -4452,7 +4472,7 @@ and the command prints the manifest's path for \`emit demo\`. Under \`work proof
|
|
|
4452
4472
|
to OUTERLAYER_PROOF_OUT instead. Exit 1 means the demo's test failed; its manifest is written all the same.
|
|
4453
4473
|
`
|
|
4454
4474
|
).action(async (file, opts) => {
|
|
4455
|
-
const { runDemoRecord, DemoRecordError } = await import('./demo-record-cmd-
|
|
4475
|
+
const { runDemoRecord, DemoRecordError } = await import('./demo-record-cmd-2OKCGST7.js');
|
|
4456
4476
|
try {
|
|
4457
4477
|
const result = await runDemoRecord({
|
|
4458
4478
|
file,
|
|
@@ -4501,7 +4521,7 @@ recent events with their ids. --find <text> searches all of them.
|
|
|
4501
4521
|
item that session was launched for is used automatically.
|
|
4502
4522
|
`
|
|
4503
4523
|
).action(async (opts) => {
|
|
4504
|
-
const { runEmitFinding, refuseRemovedFindingFlags, EmitFindingError } = await import('./emit-finding-cmd-
|
|
4524
|
+
const { runEmitFinding, refuseRemovedFindingFlags, EmitFindingError } = await import('./emit-finding-cmd-VECM64UR.js');
|
|
4505
4525
|
try {
|
|
4506
4526
|
refuseRemovedFindingFlags(opts);
|
|
4507
4527
|
const result = await runEmitFinding({
|
|
@@ -4568,7 +4588,7 @@ the whole batch. "untimed": true records one with no time on purpose.
|
|
|
4568
4588
|
that session was launched for is used automatically.
|
|
4569
4589
|
`
|
|
4570
4590
|
).action(async (file, opts) => {
|
|
4571
|
-
const { runEmitFindings, EmitFindingError } = await import('./emit-finding-cmd-
|
|
4591
|
+
const { runEmitFindings, EmitFindingError } = await import('./emit-finding-cmd-VECM64UR.js');
|
|
4572
4592
|
try {
|
|
4573
4593
|
const result = await runEmitFindings({
|
|
4574
4594
|
file,
|
|
@@ -4603,7 +4623,7 @@ command, the command exits 0, and \`sync\` sends it later. If the gateway refuse
|
|
|
4603
4623
|
the step, the command prints why and exits 1.
|
|
4604
4624
|
`
|
|
4605
4625
|
).action(async (name, opts) => {
|
|
4606
|
-
const { runEmitStep, EmitStepError } = await import('./emit-step-cmd-
|
|
4626
|
+
const { runEmitStep, EmitStepError } = await import('./emit-step-cmd-V2ET66N4.js');
|
|
4607
4627
|
try {
|
|
4608
4628
|
await runEmitStep({
|
|
4609
4629
|
name,
|
|
@@ -4646,7 +4666,7 @@ of the item, and a (proof: <kind>) annotation names its proof.
|
|
|
4646
4666
|
${cliInvocation()} emit criteria acceptance/412-login.md --item 412
|
|
4647
4667
|
`
|
|
4648
4668
|
).action(async (file, opts) => {
|
|
4649
|
-
const { runEmitCriteria, EmitCriteriaError } = await import('./emit-criteria-cmd-
|
|
4669
|
+
const { runEmitCriteria, EmitCriteriaError } = await import('./emit-criteria-cmd-NMTUV2KM.js');
|
|
4650
4670
|
try {
|
|
4651
4671
|
const result = await runEmitCriteria({
|
|
4652
4672
|
file,
|
|
@@ -4670,9 +4690,9 @@ function registerSpecCommands(program2) {
|
|
|
4670
4690
|
const specCmd = program2.command("spec").description("Find, file and edit the issue a spec lives in, in your factory's tracker");
|
|
4671
4691
|
const credentialOptions = (command) => command.option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)");
|
|
4672
4692
|
const run = async (action) => {
|
|
4673
|
-
const { WorkCommandError } = await import('./work-cmd-
|
|
4693
|
+
const { WorkCommandError } = await import('./work-cmd-HKOJU5FJ.js');
|
|
4674
4694
|
try {
|
|
4675
|
-
await action(await import('./spec-cmd-
|
|
4695
|
+
await action(await import('./spec-cmd-7QRE2SZK.js'));
|
|
4676
4696
|
} catch (err) {
|
|
4677
4697
|
if (err instanceof WorkCommandError) {
|
|
4678
4698
|
fail(err.message);
|
|
@@ -4707,7 +4727,7 @@ Prints each problem the item covers with its id, its reports and its result.
|
|
|
4707
4727
|
session was launched for is used.
|
|
4708
4728
|
`
|
|
4709
4729
|
).action(async (opts) => {
|
|
4710
|
-
const { runFindingsShow, FindingsCommandError } = await import('./findings-cmd-
|
|
4730
|
+
const { runFindingsShow, FindingsCommandError } = await import('./findings-cmd-QJPPF6BY.js');
|
|
4711
4731
|
try {
|
|
4712
4732
|
const result = await runFindingsShow({
|
|
4713
4733
|
item: opts.item,
|
|
@@ -4735,7 +4755,7 @@ Give exactly one of --fixed and --not-fixed, and a --note. Run it again for the
|
|
|
4735
4755
|
problem to replace the earlier result. A problem the item does not cover is refused.
|
|
4736
4756
|
`
|
|
4737
4757
|
).action(async (problem, opts) => {
|
|
4738
|
-
const { runFindingsResult, FindingsCommandError } = await import('./findings-cmd-
|
|
4758
|
+
const { runFindingsResult, FindingsCommandError } = await import('./findings-cmd-QJPPF6BY.js');
|
|
4739
4759
|
try {
|
|
4740
4760
|
const result = await runFindingsResult({
|
|
4741
4761
|
problem,
|
|
@@ -4777,7 +4797,7 @@ takes it, and prints the line that starts your session on it. That
|
|
|
4777
4797
|
session links itself and holds the item's lease while it works.
|
|
4778
4798
|
`
|
|
4779
4799
|
).action(async (opts) => {
|
|
4780
|
-
const { runWorkBuild, WorkCommandError } = await import('./work-cmd-
|
|
4800
|
+
const { runWorkBuild, WorkCommandError } = await import('./work-cmd-HKOJU5FJ.js');
|
|
4781
4801
|
try {
|
|
4782
4802
|
await runWorkBuild(opts);
|
|
4783
4803
|
} catch (err) {
|
|
@@ -4800,7 +4820,7 @@ renews that session's own 20-minute lease, unless --no-lease or
|
|
|
4800
4820
|
--ended is given, or another worker already holds a live one.
|
|
4801
4821
|
`
|
|
4802
4822
|
).action(async (number, opts) => {
|
|
4803
|
-
const { runWorkLinkSession, WorkCommandError } = await import('./work-cmd-
|
|
4823
|
+
const { runWorkLinkSession, WorkCommandError } = await import('./work-cmd-HKOJU5FJ.js');
|
|
4804
4824
|
try {
|
|
4805
4825
|
await runWorkLinkSession({ ...opts, number, noLease: opts.lease === false, logFailures: opts.logFailures === true });
|
|
4806
4826
|
} catch (err) {
|
|
@@ -4831,8 +4851,8 @@ thread at its source. It takes a plain answer: no --criterion and no
|
|
|
4831
4851
|
action flag.
|
|
4832
4852
|
`
|
|
4833
4853
|
).action(async (opts) => {
|
|
4834
|
-
const { runWorkComment, WorkCommentCommandError } = await import('./work-comment-cmd-
|
|
4835
|
-
const { WorkCommandError } = await import('./work-cmd-
|
|
4854
|
+
const { runWorkComment, WorkCommentCommandError } = await import('./work-comment-cmd-H3JCWQ2J.js');
|
|
4855
|
+
const { WorkCommandError } = await import('./work-cmd-HKOJU5FJ.js');
|
|
4836
4856
|
try {
|
|
4837
4857
|
await runWorkComment(opts);
|
|
4838
4858
|
} catch (err) {
|
|
@@ -4854,7 +4874,7 @@ nothing and exits 0 when the call fails: the line goes to hook-errors.log,
|
|
|
4854
4874
|
and the comment waits for the next agent job.
|
|
4855
4875
|
`
|
|
4856
4876
|
).action(async (ids, opts) => {
|
|
4857
|
-
const { runWorkCommentsRead } = await import('./work-comment-cmd-
|
|
4877
|
+
const { runWorkCommentsRead } = await import('./work-comment-cmd-H3JCWQ2J.js');
|
|
4858
4878
|
await runWorkCommentsRead({ ...opts, commentIds: ids });
|
|
4859
4879
|
});
|
|
4860
4880
|
workCmd.command("threads").description("Read a work item's general thread, its criterion threads and its source threads").requiredOption("--item <number>", "the item's number inside this factory").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)").addHelpText(
|
|
@@ -4870,8 +4890,8 @@ that started outside OuterLayer, such as the line comments of a
|
|
|
4870
4890
|
GitHub review, each with its id, source and comments.
|
|
4871
4891
|
`
|
|
4872
4892
|
).action(async (opts) => {
|
|
4873
|
-
const { runWorkThreads, WorkCommentCommandError } = await import('./work-comment-cmd-
|
|
4874
|
-
const { WorkCommandError } = await import('./work-cmd-
|
|
4893
|
+
const { runWorkThreads, WorkCommentCommandError } = await import('./work-comment-cmd-H3JCWQ2J.js');
|
|
4894
|
+
const { WorkCommandError } = await import('./work-cmd-HKOJU5FJ.js');
|
|
4875
4895
|
try {
|
|
4876
4896
|
await runWorkThreads(opts);
|
|
4877
4897
|
} catch (err) {
|
|
@@ -4895,8 +4915,8 @@ still running, or that an older runner released, has no log and the
|
|
|
4895
4915
|
command exits 1.
|
|
4896
4916
|
`
|
|
4897
4917
|
).action(async (opts) => {
|
|
4898
|
-
const { runWorkLogs, WorkLogsCommandError } = await import('./work-logs-cmd-
|
|
4899
|
-
const { WorkCommandError } = await import('./work-cmd-
|
|
4918
|
+
const { runWorkLogs, WorkLogsCommandError } = await import('./work-logs-cmd-UOO4JVLG.js');
|
|
4919
|
+
const { WorkCommandError } = await import('./work-cmd-HKOJU5FJ.js');
|
|
4900
4920
|
try {
|
|
4901
4921
|
await runWorkLogs(opts);
|
|
4902
4922
|
} catch (err) {
|
|
@@ -4919,8 +4939,8 @@ item is not built again until a new build request. Exits 1 when no host
|
|
|
4919
4939
|
build is running for the item.
|
|
4920
4940
|
`
|
|
4921
4941
|
).action(async (opts) => {
|
|
4922
|
-
const { runWorkStop, WorkStopCommandError } = await import('./work-stop-cmd-
|
|
4923
|
-
const { WorkCommandError } = await import('./work-cmd-
|
|
4942
|
+
const { runWorkStop, WorkStopCommandError } = await import('./work-stop-cmd-SD2ZRMSY.js');
|
|
4943
|
+
const { WorkCommandError } = await import('./work-cmd-HKOJU5FJ.js');
|
|
4924
4944
|
try {
|
|
4925
4945
|
await runWorkStop(opts);
|
|
4926
4946
|
} catch (err) {
|
|
@@ -4941,8 +4961,8 @@ Prints the item's newest live demo record: its artifact id, the commit it was re
|
|
|
4941
4961
|
test file that recorded it. With --json, prints { "demo": null } for an item with no demo.
|
|
4942
4962
|
`
|
|
4943
4963
|
).action(async (opts) => {
|
|
4944
|
-
const { runWorkDemo, WorkDemoCommandError } = await import('./work-demo-cmd-
|
|
4945
|
-
const { WorkCommandError } = await import('./work-cmd-
|
|
4964
|
+
const { runWorkDemo, WorkDemoCommandError } = await import('./work-demo-cmd-J4AZAIVP.js');
|
|
4965
|
+
const { WorkCommandError } = await import('./work-cmd-HKOJU5FJ.js');
|
|
4946
4966
|
try {
|
|
4947
4967
|
await runWorkDemo(opts);
|
|
4948
4968
|
} catch (err) {
|
|
@@ -4963,7 +4983,7 @@ deletes anything \u2014 the item is removed from Work only once no
|
|
|
4963
4983
|
live addition remains on it.
|
|
4964
4984
|
`
|
|
4965
4985
|
).action(async (opts) => {
|
|
4966
|
-
const { runWorkRemove, WorkCommandError } = await import('./work-cmd-
|
|
4986
|
+
const { runWorkRemove, WorkCommandError } = await import('./work-cmd-HKOJU5FJ.js');
|
|
4967
4987
|
try {
|
|
4968
4988
|
await runWorkRemove(opts);
|
|
4969
4989
|
} catch (err) {
|
|
@@ -4975,7 +4995,7 @@ live addition remains on it.
|
|
|
4975
4995
|
}
|
|
4976
4996
|
});
|
|
4977
4997
|
workCmd.command("status").description("Show one item's stage, gate ledger, and additions").option("--item <number>", "the item's number inside this factory").option("--issue <number>", "issue number, or a Linear/Jira key like ENG-123").option(TRACKER_OPTION_FLAG, "tracker for a keyed --issue, when both hold the key").option("--repo <owner/name>", "repository for an issue number (default: the checkout's remote)").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)").action(async (opts) => {
|
|
4978
|
-
const { runWorkStatus, WorkCommandError } = await import('./work-cmd-
|
|
4998
|
+
const { runWorkStatus, WorkCommandError } = await import('./work-cmd-HKOJU5FJ.js');
|
|
4979
4999
|
try {
|
|
4980
5000
|
await runWorkStatus(opts);
|
|
4981
5001
|
} catch (err) {
|
|
@@ -5020,11 +5040,11 @@ differs from HEAD.
|
|
|
5020
5040
|
fail(trackerNumberError("--pr", opts.pr));
|
|
5021
5041
|
return;
|
|
5022
5042
|
}
|
|
5023
|
-
const { runWorkProofsCommand } = await import('./work-proofs-cmd-
|
|
5043
|
+
const { runWorkProofsCommand } = await import('./work-proofs-cmd-7Y3HGT7C.js');
|
|
5024
5044
|
await runWorkProofsCommand({ ...opts, ...pr === void 0 ? {} : { pr } });
|
|
5025
5045
|
});
|
|
5026
5046
|
workCmd.command("list").description("List live work items for this factory").option("--stage <spec|build|review>", "filter by stage").option("--section <attention|waiting|flowing>", "filter by Queue section").option("--repo <owner/name>", "repository (default: the current checkout's remote)").option("--unclaimed", "only items with no live lease").option("--claimed", "only items with a live lease, held by a host or a local session").option("--startable", "only items a host can start: a build request, no open PR, no live lease").option("--needs <amend>", "only items with a thread waiting on an agent").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)").action(async (opts) => {
|
|
5027
|
-
const { runWorkList, WorkCommandError } = await import('./work-cmd-
|
|
5047
|
+
const { runWorkList, WorkCommandError } = await import('./work-cmd-HKOJU5FJ.js');
|
|
5028
5048
|
try {
|
|
5029
5049
|
await runWorkList(opts);
|
|
5030
5050
|
} catch (err) {
|
|
@@ -5045,7 +5065,7 @@ by a different key is refused; claiming again with the same key extends
|
|
|
5045
5065
|
it. --host is a label only.
|
|
5046
5066
|
`
|
|
5047
5067
|
).action(async (opts) => {
|
|
5048
|
-
const { runWorkClaim, WorkCommandError } = await import('./work-claim-cmd-
|
|
5068
|
+
const { runWorkClaim, WorkCommandError } = await import('./work-claim-cmd-WGTSU5IT.js');
|
|
5049
5069
|
try {
|
|
5050
5070
|
await runWorkClaim(opts);
|
|
5051
5071
|
} catch (err) {
|
|
@@ -5065,7 +5085,7 @@ Extends the live lease this API key holds. Refused with a 410 if the
|
|
|
5065
5085
|
lease has expired, or a 403 if a different key holds it.
|
|
5066
5086
|
`
|
|
5067
5087
|
).action(async (opts) => {
|
|
5068
|
-
const { runWorkRenew, WorkCommandError } = await import('./work-claim-cmd-
|
|
5088
|
+
const { runWorkRenew, WorkCommandError } = await import('./work-claim-cmd-WGTSU5IT.js');
|
|
5069
5089
|
try {
|
|
5070
5090
|
await runWorkRenew(opts);
|
|
5071
5091
|
} catch (err) {
|
|
@@ -5097,7 +5117,7 @@ applies to a host's lease only. A later tool call in the session
|
|
|
5097
5117
|
takes the lease again.
|
|
5098
5118
|
`
|
|
5099
5119
|
).action(async (opts) => {
|
|
5100
|
-
const { runWorkRelease, WorkCommandError } = await import('./work-claim-cmd-
|
|
5120
|
+
const { runWorkRelease, WorkCommandError } = await import('./work-claim-cmd-WGTSU5IT.js');
|
|
5101
5121
|
try {
|
|
5102
5122
|
await runWorkRelease(opts);
|
|
5103
5123
|
} catch (err) {
|
|
@@ -5124,7 +5144,7 @@ Idempotent: declaring the same pull request twice is a no-op.
|
|
|
5124
5144
|
needs your own login; an agent session or a factory key is refused.
|
|
5125
5145
|
`
|
|
5126
5146
|
).action(async (number, opts) => {
|
|
5127
|
-
const { runWorkPr, WorkPrCommandError } = await import('./work-pr-cmd-
|
|
5147
|
+
const { runWorkPr, WorkPrCommandError } = await import('./work-pr-cmd-3Q2D5RQT.js');
|
|
5128
5148
|
try {
|
|
5129
5149
|
await runWorkPr({ ...opts, number });
|
|
5130
5150
|
} catch (err) {
|
|
@@ -5149,8 +5169,8 @@ login, then declares the pull request on the item, as \`work pr\` does.
|
|
|
5149
5169
|
Run it again after a change to the title or description.
|
|
5150
5170
|
`
|
|
5151
5171
|
).action(async (opts) => {
|
|
5152
|
-
const { runWorkOpenPr, WorkOpenPrCommandError } = await import('./work-open-pr-cmd-
|
|
5153
|
-
const { WorkCommandError } = await import('./work-cmd-
|
|
5172
|
+
const { runWorkOpenPr, WorkOpenPrCommandError } = await import('./work-open-pr-cmd-QFRDDBAM.js');
|
|
5173
|
+
const { WorkCommandError } = await import('./work-cmd-HKOJU5FJ.js');
|
|
5154
5174
|
try {
|
|
5155
5175
|
await runWorkOpenPr(opts);
|
|
5156
5176
|
} catch (err) {
|
|
@@ -5166,9 +5186,9 @@ function registerRunnerCommands(program2) {
|
|
|
5166
5186
|
const runnerCmd = program2.command("runner").description("Take work from the implement and amend queues on this machine");
|
|
5167
5187
|
const configOption = "the cloud config file to run against (default: ~/.outerlayer/config.json)";
|
|
5168
5188
|
runnerCmd.command("start").description("Run the loop: claim work, run it, report, clean up, repeat").option("--config <path>", configOption).action(async (opts) => {
|
|
5169
|
-
const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-
|
|
5170
|
-
const { start, RunnerStartError } = await import('./loop-
|
|
5171
|
-
const { RunnerAlreadyRunningError } = await import('./pidfile-
|
|
5189
|
+
const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-T22KVOOT.js');
|
|
5190
|
+
const { start, RunnerStartError } = await import('./loop-L6TX6OR4.js');
|
|
5191
|
+
const { RunnerAlreadyRunningError } = await import('./pidfile-7M7O2M7T.js');
|
|
5172
5192
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5173
5193
|
try {
|
|
5174
5194
|
const { realUpdateDeps } = await import('./real-deps-QX5YH7FG.js');
|
|
@@ -5185,10 +5205,10 @@ function registerRunnerCommands(program2) {
|
|
|
5185
5205
|
"after",
|
|
5186
5206
|
"\nReads OUTERLAYER_URL, OUTERLAYER_APP_ID, OUTERLAYER_API_KEY, OUTERLAYER_RUNNER_NAME and one Claude credential\n(CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY) from the environment. OUTERLAYER_AGENT\nis optional and defaults to claude. On a later start it refuses variables that disagree with the config in the volume.\nThe image sets OUTERLAYER_RUNNER_IMAGE; outside the image, use `runner start`.\n"
|
|
5187
5207
|
).action(async () => {
|
|
5188
|
-
const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-
|
|
5189
|
-
const { containerStart } = await import('./container-start-
|
|
5190
|
-
const { start, RunnerStartError } = await import('./loop-
|
|
5191
|
-
const { RunnerAlreadyRunningError } = await import('./pidfile-
|
|
5208
|
+
const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-T22KVOOT.js');
|
|
5209
|
+
const { containerStart } = await import('./container-start-JRF3SBUA.js');
|
|
5210
|
+
const { start, RunnerStartError } = await import('./loop-L6TX6OR4.js');
|
|
5211
|
+
const { RunnerAlreadyRunningError } = await import('./pidfile-7M7O2M7T.js');
|
|
5192
5212
|
try {
|
|
5193
5213
|
const result = await containerStart({
|
|
5194
5214
|
env: process.env,
|
|
@@ -5209,16 +5229,16 @@ function registerRunnerCommands(program2) {
|
|
|
5209
5229
|
"after",
|
|
5210
5230
|
"\nIn the runner image, run it with `docker exec <container> outerlayer runner update-steps`. It reads the\ncontainer with `docker inspect` and changes nothing. The steps rename the old container and never remove it\nbefore the new one runs. They name the container's variables and never print a value.\n"
|
|
5211
5231
|
).action(async (opts) => {
|
|
5212
|
-
const { defaultRunnerConfigPath } = await import('./config-
|
|
5213
|
-
const { runnerDir } = await import('./paths-
|
|
5214
|
-
const { runUpdateSteps } = await import('./update-steps-
|
|
5232
|
+
const { defaultRunnerConfigPath } = await import('./config-T22KVOOT.js');
|
|
5233
|
+
const { runnerDir } = await import('./paths-F2ZR2EKC.js');
|
|
5234
|
+
const { runUpdateSteps } = await import('./update-steps-VGKNGWTZ.js');
|
|
5215
5235
|
const text = await runUpdateSteps({ runnerDirPath: runnerDir(opts.config ?? defaultRunnerConfigPath()) });
|
|
5216
5236
|
process.stdout.write(`${text}
|
|
5217
5237
|
`);
|
|
5218
5238
|
});
|
|
5219
5239
|
runnerCmd.command("check").description("Validate the config, the hooks and the key, and print the effective settings").option("--config <path>", configOption).action(async (opts) => {
|
|
5220
|
-
const { defaultRunnerConfigPath } = await import('./config-
|
|
5221
|
-
const { runRunnerCheck } = await import('./check-
|
|
5240
|
+
const { defaultRunnerConfigPath } = await import('./config-T22KVOOT.js');
|
|
5241
|
+
const { runRunnerCheck } = await import('./check-WWX32IGY.js');
|
|
5222
5242
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5223
5243
|
const result = await runRunnerCheck(configPath);
|
|
5224
5244
|
if (!result.ok) {
|
|
@@ -5239,8 +5259,8 @@ function registerRunnerCommands(program2) {
|
|
|
5239
5259
|
`);
|
|
5240
5260
|
});
|
|
5241
5261
|
runnerCmd.command("install").description("Put this CLI in the runner's install layout; --service adds its service").option("--config <path>", configOption).option("--service", "set up the service that keeps the runner running").option("--print", "with --service, print the unit and set up nothing").option("--user <account>", "with --service, the account the service runs as").option("--replace", "replace a unit or launcher file this command did not write").option("--allow-downgrade", "install this CLI even when it is older than the version the runner runs").option("--unit-name <name>", "with --service, the unit's name, to run a second runner beside the first").option("--build-memory-max <size>", "with --service, memory all builds may use together, such as 16g").option("--build-cpus-max <n>", "with --service, CPUs all builds may use together, such as 4").action(async (opts) => {
|
|
5242
|
-
const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-
|
|
5243
|
-
const { runRunnerInstall, RunnerInstallError, launcherSummary, restartNote } = await import('./install-cmd-
|
|
5262
|
+
const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-T22KVOOT.js');
|
|
5263
|
+
const { runRunnerInstall, RunnerInstallError, launcherSummary, restartNote } = await import('./install-cmd-RHFUZFV4.js');
|
|
5244
5264
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5245
5265
|
if (opts.service !== true) {
|
|
5246
5266
|
const names = { print: "print", user: "user", unitName: "unit-name", buildMemoryMax: "build-memory-max", buildCpusMax: "build-cpus-max" };
|
|
@@ -5252,13 +5272,13 @@ function registerRunnerCommands(program2) {
|
|
|
5252
5272
|
}
|
|
5253
5273
|
}
|
|
5254
5274
|
const buildCpusMax = opts.buildCpusMax === void 0 ? void 0 : Number(opts.buildCpusMax);
|
|
5255
|
-
if (buildCpusMax !== void 0 && !(await import('./command-
|
|
5275
|
+
if (buildCpusMax !== void 0 && !(await import('./command-CGEFJZNC.js')).cpusAreValid(buildCpusMax)) {
|
|
5256
5276
|
fail(`--build-cpus-max ${opts.buildCpusMax} is not a number of CPUs from 0.01 to 1024.`);
|
|
5257
5277
|
return;
|
|
5258
5278
|
}
|
|
5259
5279
|
try {
|
|
5260
5280
|
if (opts.service === true) {
|
|
5261
|
-
const { installServiceCommand } = await import('./command-
|
|
5281
|
+
const { installServiceCommand } = await import('./command-CGEFJZNC.js');
|
|
5262
5282
|
const result2 = await installServiceCommand({
|
|
5263
5283
|
configPath,
|
|
5264
5284
|
print: opts.print,
|
|
@@ -5315,8 +5335,8 @@ To keep it running, run ${C.yellow}${cliInvocation()} runner install --service${
|
|
|
5315
5335
|
fail(`pass --service: \`${cliInvocation()} runner uninstall --service\` removes the runner's service.`);
|
|
5316
5336
|
return;
|
|
5317
5337
|
}
|
|
5318
|
-
const { defaultRunnerConfigPath } = await import('./config-
|
|
5319
|
-
const { uninstallServiceCommand } = await import('./command-
|
|
5338
|
+
const { defaultRunnerConfigPath } = await import('./config-T22KVOOT.js');
|
|
5339
|
+
const { uninstallServiceCommand } = await import('./command-CGEFJZNC.js');
|
|
5320
5340
|
const result = await uninstallServiceCommand({ configPath: opts.config ?? defaultRunnerConfigPath(), unitName: opts.unitName, home: homeFromEnv() });
|
|
5321
5341
|
if (result.ok) for (const line of result.lines) process.stdout.write(`${C.green}\u2713${C.reset} ${line}
|
|
5322
5342
|
`);
|
|
@@ -5343,12 +5363,12 @@ already in claude.env is used.
|
|
|
5343
5363
|
printf '%s' "$CLAUDE_CODE_OAUTH_TOKEN" | ${cliInvocation()} runner init --agent claude --factory <org>/<factory>
|
|
5344
5364
|
`
|
|
5345
5365
|
).action(async (opts) => {
|
|
5346
|
-
const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-
|
|
5347
|
-
const { prepareRunnerInit, runRunnerInit, RunnerInitError, writeRunnerInit } = await import('./init-
|
|
5348
|
-
const { obtainRunnerKey, runnerKeyLogin } = await import('./runner-key-
|
|
5349
|
-
const { detectMachine } = await import('./machine-
|
|
5350
|
-
const { chooseVm, runVmInit, VmInitError } = await import('./init-
|
|
5351
|
-
const { AGENT_COMMANDS, credentialFromStdin, isAgentName, restartForCredential, RunnerEnvError } = await import('./runner-env-
|
|
5366
|
+
const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-T22KVOOT.js');
|
|
5367
|
+
const { prepareRunnerInit, runRunnerInit, RunnerInitError, writeRunnerInit } = await import('./init-EK3PUU6W.js');
|
|
5368
|
+
const { obtainRunnerKey, runnerKeyLogin } = await import('./runner-key-R47C6374.js');
|
|
5369
|
+
const { detectMachine } = await import('./machine-VJKAY2GX.js');
|
|
5370
|
+
const { chooseVm, runVmInit, VmInitError } = await import('./init-Y2URPVVY.js');
|
|
5371
|
+
const { AGENT_COMMANDS, credentialFromStdin, isAgentName, restartForCredential, RunnerEnvError } = await import('./runner-env-YW55JVU7.js');
|
|
5352
5372
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5353
5373
|
if (opts.agent !== void 0 && !isAgentName(opts.agent)) {
|
|
5354
5374
|
fail(`--agent ${opts.agent}: runner init writes commands for ${Object.keys(AGENT_COMMANDS).join(", ")}. For another agent, leave --agent out and edit runner.commands.`);
|
|
@@ -5379,7 +5399,7 @@ already in claude.env is used.
|
|
|
5379
5399
|
const chunks = [];
|
|
5380
5400
|
for await (const chunk of process.stdin) chunks.push(Buffer.from(chunk));
|
|
5381
5401
|
const result2 = runRunnerInit(configPath, { machine, configFromStdin: Buffer.concat(chunks).toString("utf8"), requireContainer: true });
|
|
5382
|
-
const { ensureHostKey: ensureHostKey2 } = await import('./host-key-
|
|
5402
|
+
const { ensureHostKey: ensureHostKey2 } = await import('./host-key-HLLV37NV.js');
|
|
5383
5403
|
const hostKey2 = await ensureHostKey2(configPath);
|
|
5384
5404
|
process.stdout.write(`host key ${hostKey2.fingerprint}
|
|
5385
5405
|
hooks: ${result2.hooks}
|
|
@@ -5438,7 +5458,7 @@ hooks: ${result2.hooks}
|
|
|
5438
5458
|
const prepared = prepareRunnerInit(configPath, { machine, allowProcess, agent, credential, keyFromLogin: makeKey !== void 0 });
|
|
5439
5459
|
const created = makeKey === void 0 ? void 0 : await makeKey();
|
|
5440
5460
|
const result = writeRunnerInit(prepared, created);
|
|
5441
|
-
const { ensureHostKey } = await import('./host-key-
|
|
5461
|
+
const { ensureHostKey } = await import('./host-key-HLLV37NV.js');
|
|
5442
5462
|
const hostKey = await ensureHostKey(configPath);
|
|
5443
5463
|
if (created !== void 0) {
|
|
5444
5464
|
process.stdout.write(`${C.green}\u2713${C.reset} saved the runner key in ${result.configPath}
|
|
@@ -5466,7 +5486,7 @@ ${C.yellow}${result.note}${C.reset}
|
|
|
5466
5486
|
To isolate builds in containers instead, run ${C.yellow}${cliInvocation()} runner init --vm${C.reset}.
|
|
5467
5487
|
`);
|
|
5468
5488
|
}
|
|
5469
|
-
const { runRunnerInstall, RunnerInstallError, RunnerDowngradeError, launcherSummary } = await import('./install-cmd-
|
|
5489
|
+
const { runRunnerInstall, RunnerInstallError, RunnerDowngradeError, launcherSummary } = await import('./install-cmd-RHFUZFV4.js');
|
|
5470
5490
|
let installedLayout = false;
|
|
5471
5491
|
let noService = "it starts the runner from the install layout, which needs a CLI installed with npm";
|
|
5472
5492
|
try {
|
|
@@ -5498,7 +5518,7 @@ ${C.yellow}The runner will not update itself: ${installErr.message}${C.reset}
|
|
|
5498
5518
|
let serviceUp = false;
|
|
5499
5519
|
let restart;
|
|
5500
5520
|
if (installedLayout) {
|
|
5501
|
-
const { installServiceCommand } = await import('./command-
|
|
5521
|
+
const { installServiceCommand } = await import('./command-CGEFJZNC.js');
|
|
5502
5522
|
const service = await installServiceCommand({
|
|
5503
5523
|
configPath,
|
|
5504
5524
|
entryPath: process.argv[1] ?? "",
|
|
@@ -5542,12 +5562,12 @@ Next:
|
|
|
5542
5562
|
"after",
|
|
5543
5563
|
"\nA repository governed by a control plane builds the control plane's image, at the commit\nthe gateway has stored for it. A repository that governs itself fetches the head of its\ndefault branch into the runner's cache. Either way it reads .devcontainer/devcontainer.json\nand builds the image with the devcontainer CLI. Settings\nthat reach the host or widen the container's privileges are ignored and listed. The\nimage holds this CLI and a pinned Claude Code. Nothing runs inside the image.\nA repository with no devcontainer file builds on the universal image the CLI pins by digest.\n"
|
|
5544
5564
|
).action(async (opts) => {
|
|
5545
|
-
const { defaultRunnerConfigPath } = await import('./config-
|
|
5546
|
-
const { baseLines, buildRepositoryImage, RecipeError } = await import('./build-
|
|
5565
|
+
const { defaultRunnerConfigPath } = await import('./config-T22KVOOT.js');
|
|
5566
|
+
const { baseLines, buildRepositoryImage, RecipeError } = await import('./build-KYXFZQ33.js');
|
|
5547
5567
|
const { currentCliBuild } = await import('./cli-build-K56DK4DS.js');
|
|
5548
|
-
const { createDockerHost } = await import('./docker-
|
|
5549
|
-
const { builderSpec } = await import('./builder-
|
|
5550
|
-
const { loadRunnerConfig } = await import('./config-
|
|
5568
|
+
const { createDockerHost } = await import('./docker-5VWK335X.js');
|
|
5569
|
+
const { builderSpec } = await import('./builder-IMNOEYV7.js');
|
|
5570
|
+
const { loadRunnerConfig } = await import('./config-T22KVOOT.js');
|
|
5551
5571
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5552
5572
|
const loaded = (() => {
|
|
5553
5573
|
try {
|
|
@@ -5558,12 +5578,12 @@ Next:
|
|
|
5558
5578
|
})();
|
|
5559
5579
|
const memory = loaded?.build?.memory ?? "8g";
|
|
5560
5580
|
try {
|
|
5561
|
-
const { ensureRunnerIdentity } = await import('./runner-identity-
|
|
5581
|
+
const { ensureRunnerIdentity } = await import('./runner-identity-Y5ZFCC7V.js');
|
|
5562
5582
|
await ensureRunnerIdentity(configPath, { log: (line) => console.error(line) }).catch((err) => {
|
|
5563
5583
|
console.error(`the runner's Docker identity could not be stored: ${err instanceof Error ? err.message : String(err)}`);
|
|
5564
5584
|
});
|
|
5565
|
-
const { imageTargetFor } = await import('./governing-source-
|
|
5566
|
-
const { runnerCalls } = await import('./caller-
|
|
5585
|
+
const { imageTargetFor } = await import('./governing-source-7PZ6DAJU.js');
|
|
5586
|
+
const { runnerCalls } = await import('./caller-NLRE272L.js');
|
|
5567
5587
|
const target = await imageTargetFor({ config: loaded === void 0 || loaded.fleet === true ? void 0 : runnerCalls(loaded), repository: opts.repository, fetchImpl: fetch });
|
|
5568
5588
|
if (!target.ok) {
|
|
5569
5589
|
if (opts.json) {
|
|
@@ -5627,25 +5647,25 @@ Next:
|
|
|
5627
5647
|
}
|
|
5628
5648
|
});
|
|
5629
5649
|
runnerCmd.command("stop").description("Take no more work; finish running jobs, then exit").option("--config <path>", "the cloud config file naming the runner to stop").option("--now", "end running jobs immediately, with outcome stopped").action(async (opts) => {
|
|
5630
|
-
const { defaultRunnerConfigPath } = await import('./config-
|
|
5631
|
-
const { requestStop } = await import('./loop-
|
|
5650
|
+
const { defaultRunnerConfigPath } = await import('./config-T22KVOOT.js');
|
|
5651
|
+
const { requestStop } = await import('./loop-L6TX6OR4.js');
|
|
5632
5652
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5633
|
-
const { runnerImageVersion } = await import('./image-tag-
|
|
5653
|
+
const { runnerImageVersion } = await import('./image-tag-PBWQBATH.js');
|
|
5634
5654
|
await requestStop(configPath, Boolean(opts.now), void 0, { image: runnerImageVersion() !== void 0 });
|
|
5635
5655
|
});
|
|
5636
5656
|
runnerCmd.command("status").description("List running jobs; with --recent, finished ones too").option("--config <path>", "the cloud config file naming the runner to inspect").option("--recent", "also list finished jobs, newest first, capped at 20").option("--json", "machine-readable JSON output").action(async (opts) => {
|
|
5637
|
-
const { defaultRunnerConfigPath, loadRunnerConfig } = await import('./config-
|
|
5638
|
-
const { jobsDir, runnerDir } = await import('./paths-
|
|
5639
|
-
const { listJobFiles, runnerProcessState } = await import('./loop-
|
|
5640
|
-
const { renderStatus } = await import('./status-
|
|
5641
|
-
const { readHousekeepingRecord } = await import('./record-
|
|
5657
|
+
const { defaultRunnerConfigPath, loadRunnerConfig } = await import('./config-T22KVOOT.js');
|
|
5658
|
+
const { jobsDir, runnerDir } = await import('./paths-F2ZR2EKC.js');
|
|
5659
|
+
const { listJobFiles, runnerProcessState } = await import('./loop-L6TX6OR4.js');
|
|
5660
|
+
const { renderStatus } = await import('./status-BQEYEG2V.js');
|
|
5661
|
+
const { readHousekeepingRecord } = await import('./record-YCJ6DZOY.js');
|
|
5642
5662
|
const path2 = await import('path');
|
|
5643
5663
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5644
5664
|
const all = listJobFiles(configPath);
|
|
5645
5665
|
const housekeeping = readHousekeepingRecord(runnerDir(configPath));
|
|
5646
|
-
const { readPendingUpdate } = await import('./pending-
|
|
5666
|
+
const { readPendingUpdate } = await import('./pending-VOFQRXP4.js');
|
|
5647
5667
|
const pendingUpdate = readPendingUpdate(runnerDir(configPath));
|
|
5648
|
-
const { readImageStatus } = await import('./image-tag-
|
|
5668
|
+
const { readImageStatus } = await import('./image-tag-PBWQBATH.js');
|
|
5649
5669
|
const image = readImageStatus(runnerDir(configPath));
|
|
5650
5670
|
let host = "unknown";
|
|
5651
5671
|
let concurrency = 1;
|
|
@@ -5655,7 +5675,7 @@ Next:
|
|
|
5655
5675
|
host = config.host;
|
|
5656
5676
|
concurrency = config.concurrency;
|
|
5657
5677
|
if (config.fleet === true) {
|
|
5658
|
-
const { readFleetState } = await import('./state-
|
|
5678
|
+
const { readFleetState } = await import('./state-VAHBIMS5.js');
|
|
5659
5679
|
fleet = { state: readFleetState(configPath) };
|
|
5660
5680
|
}
|
|
5661
5681
|
} catch {
|
|
@@ -5663,7 +5683,7 @@ Next:
|
|
|
5663
5683
|
const processState = runnerProcessState(configPath);
|
|
5664
5684
|
const service = await (async () => {
|
|
5665
5685
|
if (process.platform !== "linux" || !existsSync("/run/systemd/system")) return void 0;
|
|
5666
|
-
const { inspectRunnerService } = await import('./find-unit-
|
|
5686
|
+
const { inspectRunnerService } = await import('./find-unit-CNAPU7XQ.js');
|
|
5667
5687
|
const facts = inspectRunnerService(configPath);
|
|
5668
5688
|
return facts === void 0 ? void 0 : { unit: facts.unit, running: facts.mainPid !== void 0, delegated: facts.delegate };
|
|
5669
5689
|
})();
|
|
@@ -5702,9 +5722,9 @@ Next:
|
|
|
5702
5722
|
);
|
|
5703
5723
|
});
|
|
5704
5724
|
runnerCmd.command("logs").argument("<item>", "the work item's number in the factory, or a build's claim id").description("Print the newest attempt's log for one item or claim id").option("--config <path>", "the cloud config file naming the runner to inspect").option("-f, --follow", "keep printing as the log grows").action(async (itemArg, opts) => {
|
|
5705
|
-
const { defaultRunnerConfigPath } = await import('./config-
|
|
5706
|
-
const { listJobFiles } = await import('./loop-
|
|
5707
|
-
const { describeAmbiguous, logPathFor, selectAttempt, tail, RunnerLogsError } = await import('./logs-
|
|
5725
|
+
const { defaultRunnerConfigPath } = await import('./config-T22KVOOT.js');
|
|
5726
|
+
const { listJobFiles } = await import('./loop-L6TX6OR4.js');
|
|
5727
|
+
const { describeAmbiguous, logPathFor, selectAttempt, tail, RunnerLogsError } = await import('./logs-E7MGQINH.js');
|
|
5708
5728
|
const configPath = opts.config ?? defaultRunnerConfigPath();
|
|
5709
5729
|
const jobs = listJobFiles(configPath);
|
|
5710
5730
|
const selected = selectAttempt(jobs, itemArg);
|
|
@@ -5742,28 +5762,35 @@ function registerHooksCommands(program2) {
|
|
|
5742
5762
|
);
|
|
5743
5763
|
hooksCmd.command("status").description("List hook entries in user and project settings, marking the wrapped ones").option("--json", "machine-readable JSON output").action((opts) => {
|
|
5744
5764
|
const report = [];
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5765
|
+
const where = { home: homeFromEnv(), cwd: process.cwd() };
|
|
5766
|
+
const cli = cliForInstall(resolveCliBin());
|
|
5767
|
+
const agents = installAgents();
|
|
5768
|
+
for (const agent of agents) {
|
|
5769
|
+
const named = agent === agents[0] ? {} : { agent: agent.entry.descriptor.id };
|
|
5770
|
+
for (const scope of ["user", "project"]) {
|
|
5771
|
+
const path2 = settingsFileOf(agent, scope, where);
|
|
5772
|
+
let candidates;
|
|
5773
|
+
try {
|
|
5774
|
+
candidates = withSettingsText(path2, (text) => agent.install.candidates(text, cli));
|
|
5775
|
+
} catch (err) {
|
|
5776
|
+
if (err instanceof SettingsParseError) {
|
|
5777
|
+
report.push({ scope, path: path2, ...named, error: err.message, entries: [] });
|
|
5778
|
+
continue;
|
|
5779
|
+
}
|
|
5780
|
+
throw err;
|
|
5754
5781
|
}
|
|
5755
|
-
|
|
5782
|
+
report.push({
|
|
5783
|
+
scope,
|
|
5784
|
+
path: path2,
|
|
5785
|
+
...named,
|
|
5786
|
+
entries: candidates.map((c) => ({
|
|
5787
|
+
event: c.event,
|
|
5788
|
+
...c.matcher ? { matcher: c.matcher } : {},
|
|
5789
|
+
command: c.command,
|
|
5790
|
+
wrapped: c.wrapped
|
|
5791
|
+
}))
|
|
5792
|
+
});
|
|
5756
5793
|
}
|
|
5757
|
-
report.push({
|
|
5758
|
-
scope,
|
|
5759
|
-
path: path2,
|
|
5760
|
-
entries: listHookCandidates(settings, resolveCliBin()).map((c) => ({
|
|
5761
|
-
event: c.event,
|
|
5762
|
-
...c.matcher ? { matcher: c.matcher } : {},
|
|
5763
|
-
command: c.command,
|
|
5764
|
-
wrapped: c.wrapped
|
|
5765
|
-
}))
|
|
5766
|
-
});
|
|
5767
5794
|
}
|
|
5768
5795
|
if (opts.json) {
|
|
5769
5796
|
writeJson(report);
|
|
@@ -5806,94 +5833,97 @@ ${C.dim}${file.path}${C.reset}
|
|
|
5806
5833
|
fail(`could not copy the CLI to ~/.outerlayer/cli: ${err instanceof Error ? err.message : String(err)}`);
|
|
5807
5834
|
return;
|
|
5808
5835
|
}
|
|
5809
|
-
const
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5836
|
+
const where = { home: homeFromEnv(), cwd: process.cwd() };
|
|
5837
|
+
for (const agent of installAgents()) {
|
|
5838
|
+
const path2 = settingsFileOf(agent, scope, where);
|
|
5839
|
+
const readCli = cliForInstall(resolveCliBin());
|
|
5840
|
+
let candidates;
|
|
5841
|
+
try {
|
|
5842
|
+
candidates = withSettingsText(path2, (text2) => agent.install.candidates(text2, readCli));
|
|
5843
|
+
} catch (err) {
|
|
5844
|
+
if (err instanceof SettingsParseError) {
|
|
5845
|
+
fail(err.message);
|
|
5846
|
+
continue;
|
|
5847
|
+
}
|
|
5848
|
+
throw err;
|
|
5817
5849
|
}
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
(c) => !c.wrapped && (!events || events.includes(c.event))
|
|
5823
|
-
);
|
|
5824
|
-
if (candidates.length === 0) {
|
|
5825
|
-
process.stdout.write(`${C.dim}No unwrapped hook candidates in ${path2}${C.reset}
|
|
5850
|
+
const events = opts.event ? [opts.event] : void 0;
|
|
5851
|
+
const unwrapped = candidates.filter((c) => !c.wrapped && (!events || events.includes(c.event)));
|
|
5852
|
+
if (unwrapped.length === 0) {
|
|
5853
|
+
process.stdout.write(`${C.dim}No unwrapped hook candidates in ${path2}${C.reset}
|
|
5826
5854
|
`);
|
|
5827
|
-
|
|
5828
|
-
}
|
|
5829
|
-
let accept;
|
|
5830
|
-
if (opts.all) {
|
|
5831
|
-
accept = () => true;
|
|
5832
|
-
} else {
|
|
5833
|
-
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
5834
|
-
const accepted = /* @__PURE__ */ new Set();
|
|
5835
|
-
for (const c of candidates) {
|
|
5836
|
-
const answer = await rl.question(
|
|
5837
|
-
`Wrap ${c.event}${c.matcher ? `[${c.matcher}]` : ""}: ${c.command} ? [y/N] `
|
|
5838
|
-
);
|
|
5839
|
-
if (/^y(es)?$/i.test(answer.trim())) accepted.add(candidateKey(c));
|
|
5855
|
+
continue;
|
|
5840
5856
|
}
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5857
|
+
let accept;
|
|
5858
|
+
if (opts.all) {
|
|
5859
|
+
accept = () => true;
|
|
5860
|
+
} else {
|
|
5861
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
5862
|
+
const accepted = /* @__PURE__ */ new Set();
|
|
5863
|
+
for (const c of unwrapped) {
|
|
5864
|
+
const answer = await rl.question(
|
|
5865
|
+
`Wrap ${c.event}${c.matcher ? `[${c.matcher}]` : ""}: ${c.command} ? [y/N] `
|
|
5866
|
+
);
|
|
5867
|
+
if (/^y(es)?$/i.test(answer.trim())) accepted.add(candidateKey(c));
|
|
5868
|
+
}
|
|
5869
|
+
rl.close();
|
|
5870
|
+
accept = (c) => accepted.has(candidateKey(c));
|
|
5871
|
+
}
|
|
5872
|
+
const { text, changed, wrapped, skippedUnresolvedBin } = withSettingsText(
|
|
5873
|
+
path2,
|
|
5874
|
+
(current) => agent.install.wrap(current, cliForInstall(cliBin), { events, captureOutput: opts.captureOutput, select: accept })
|
|
5853
5875
|
);
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5876
|
+
if (skippedUnresolvedBin) {
|
|
5877
|
+
fail(
|
|
5878
|
+
`the resolved CLI path (${cliBin}) does not exist \u2014 refusing to write hook entries pointing at it.
|
|
5879
|
+
Reinstall OuterLayer, then re-run this command.`
|
|
5880
|
+
);
|
|
5881
|
+
return;
|
|
5882
|
+
}
|
|
5883
|
+
if (!changed) {
|
|
5884
|
+
process.stdout.write(`${C.dim}No hooks wrapped${C.reset}
|
|
5858
5885
|
`);
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5886
|
+
continue;
|
|
5887
|
+
}
|
|
5888
|
+
const backupPath = writeSettingsText(path2, text);
|
|
5889
|
+
const manifestHome = homeFromEnv();
|
|
5890
|
+
recordWrapped(manifestHome, path2, wrapped.map((c) => ({ event: c.event, original: c.command })));
|
|
5891
|
+
process.stdout.write(
|
|
5892
|
+
`${C.green}\u2713${C.reset} Wrapped ${wrapped.length} hook(s) in ${path2}
|
|
5866
5893
|
` + (backupPath ? `${C.dim} backup: ${backupPath}${C.reset}
|
|
5867
5894
|
` : "")
|
|
5868
|
-
|
|
5895
|
+
);
|
|
5896
|
+
}
|
|
5869
5897
|
});
|
|
5870
5898
|
hooksCmd.command("unwrap").description("Restore wrapped hooks to their original commands").option("--project", "operate on project settings instead of user settings").addHelpText("after", "\nAlso the escape hatch if the wrapper misbehaves.\n").action((opts) => {
|
|
5871
5899
|
const scope = opts.project ? "project" : "user";
|
|
5872
|
-
const
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5900
|
+
const where = { home: homeFromEnv(), cwd: process.cwd() };
|
|
5901
|
+
for (const agent of installAgents()) {
|
|
5902
|
+
const path2 = settingsFileOf(agent, scope, where);
|
|
5903
|
+
let result;
|
|
5904
|
+
try {
|
|
5905
|
+
result = withSettingsText(path2, (text) => agent.install.unwrap(text, cliForInstall(resolveCliBin())));
|
|
5906
|
+
} catch (err) {
|
|
5907
|
+
if (err instanceof SettingsParseError) {
|
|
5908
|
+
fail(err.message);
|
|
5909
|
+
continue;
|
|
5910
|
+
}
|
|
5911
|
+
throw err;
|
|
5880
5912
|
}
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
recordUnwrapped(manifestHome, path2);
|
|
5886
|
-
if (!changed) {
|
|
5887
|
-
process.stdout.write(`${C.dim}No wrapped hooks in ${path2}${C.reset}
|
|
5913
|
+
const manifestHome = homeFromEnv();
|
|
5914
|
+
recordUnwrapped(manifestHome, path2);
|
|
5915
|
+
if (!result.changed) {
|
|
5916
|
+
process.stdout.write(`${C.dim}No wrapped hooks in ${path2}${C.reset}
|
|
5888
5917
|
`);
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5918
|
+
continue;
|
|
5919
|
+
}
|
|
5920
|
+
const backupPath = writeSettingsText(path2, result.text);
|
|
5921
|
+
process.stdout.write(
|
|
5922
|
+
`${C.green}\u2713${C.reset} Restored ${result.unwrapped} hook(s) in ${path2}
|
|
5894
5923
|
` + (backupPath ? `${C.dim} backup: ${backupPath}${C.reset}
|
|
5895
5924
|
` : "")
|
|
5896
|
-
|
|
5925
|
+
);
|
|
5926
|
+
}
|
|
5897
5927
|
});
|
|
5898
5928
|
}
|
|
5899
5929
|
function registerMcpCommands(program2) {
|
|
@@ -5915,7 +5945,7 @@ Self-host deployments also need --app-id: without a key service to resolve the
|
|
|
5915
5945
|
caller from the bearer token, the gateway answers 401 without that header.
|
|
5916
5946
|
`
|
|
5917
5947
|
).action(async (opts) => {
|
|
5918
|
-
const { runMcpInstall, handleMcpInstallError, McpInstallError } = await import('./mcp-install-cmd-
|
|
5948
|
+
const { runMcpInstall, handleMcpInstallError, McpInstallError } = await import('./mcp-install-cmd-SMPLT43Q.js');
|
|
5919
5949
|
try {
|
|
5920
5950
|
if (opts.transport !== void 0 && opts.transport !== "stdio" && opts.transport !== "http") {
|
|
5921
5951
|
throw new McpInstallError(`--transport must be "stdio" or "http", got "${opts.transport}"`);
|
|
@@ -5937,7 +5967,7 @@ caller from the bearer token, the gateway answers 401 without that header.
|
|
|
5937
5967
|
"after",
|
|
5938
5968
|
"\nWhat the stdio .mcp.json entry spawns. Reads newline-delimited JSON-RPC 2.0 on\nstdin and writes responses on stdout. The API key comes from OUTERLAYER_API_KEY\nor ~/.outerlayer/config.json at start-up; with neither the command exits 1 and\nprints why, which the MCP client shows as the connect error.\n"
|
|
5939
5969
|
).action(async (opts) => {
|
|
5940
|
-
const { runMcpServe, handleMcpServeError } = await import('./mcp-serve-cmd-
|
|
5970
|
+
const { runMcpServe, handleMcpServeError } = await import('./mcp-serve-cmd-XXERT673.js');
|
|
5941
5971
|
try {
|
|
5942
5972
|
await runMcpServe({ url: opts.url, appId: opts.appId });
|
|
5943
5973
|
} catch (err) {
|
|
@@ -5958,7 +5988,7 @@ would get, the instruction files and the names of the skills. It warns when the
|
|
|
5958
5988
|
no \`build\`. It needs the context-read permission: a login or a factory key with it is enough.
|
|
5959
5989
|
`
|
|
5960
5990
|
).action(async (opts) => {
|
|
5961
|
-
const { runContextShow, ContextShowError } = await import('./context-show-cmd-
|
|
5991
|
+
const { runContextShow, ContextShowError } = await import('./context-show-cmd-4UXO5WQJ.js');
|
|
5962
5992
|
try {
|
|
5963
5993
|
const result = await runContextShow({ repo: opts.repo, json: opts.json, url: opts.url, apiKey: opts.apiKey, appId: opts.appId });
|
|
5964
5994
|
process.stdout.write(result.output);
|