@outerlayer/cli 0.36.0-next.20261101174803 → 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-4KPODDN7.js +15 -0
- package/dist/build-KYXFZQ33.js +23 -0
- package/dist/build-disk-W6AL5WHI.js +20 -0
- package/dist/build-info.json +1 -1
- package/dist/builder-IMNOEYV7.js +19 -0
- package/dist/caller-NLRE272L.js +22 -0
- package/dist/{check-K4RVAP4L.js → check-WWX32IGY.js} +78 -74
- package/dist/{chunk-MKSZHT6S.js → chunk-2YC3TXWX.js} +1 -1
- package/dist/{chunk-QIOTIQWD.js → chunk-3UFX6KH2.js} +12 -11
- package/dist/{chunk-F2LPX2HS.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-H7SKHAUE.js → chunk-4XXBV37R.js} +6 -6
- package/dist/{chunk-XNBUZGRO.js → chunk-6B3V6EGQ.js} +11 -9
- package/dist/{chunk-O36YAH2G.js → chunk-6HDXRDC5.js} +4 -4
- package/dist/chunk-6JLYU322.js +68 -0
- package/dist/{chunk-5GHJFETA.js → chunk-6KH3NMIT.js} +3010 -1196
- package/dist/{chunk-SPXVFFQV.js → chunk-AQE6E54X.js} +10 -9
- package/dist/{chunk-LGV5N5DG.js → chunk-ATKCHMFD.js} +1 -1
- package/dist/{chunk-7J7HRYZ3.js → chunk-B2P72DAE.js} +1 -1
- package/dist/{chunk-LEHBDEUG.js → chunk-B36NSEUM.js} +4 -5
- package/dist/{chunk-B62TYDP2.js → chunk-B5SWBFVE.js} +5 -4
- package/dist/chunk-BSPJI5T7.js +28 -0
- package/dist/{chunk-VJYSPH2J.js → chunk-BUYXEU7J.js} +26 -21
- package/dist/{chunk-CIUD3436.js → chunk-BZSJ77MO.js} +1 -1
- package/dist/{chunk-OEBFKPHK.js → chunk-CDG475ZP.js} +11 -11
- package/dist/{chunk-AGKQEOFS.js → chunk-CSBW4LGL.js} +54 -31
- package/dist/{chunk-D2OTBS47.js → chunk-CSVJGW3I.js} +2 -2
- package/dist/{chunk-GANAOCHR.js → chunk-CXJC3JLN.js} +25 -374
- package/dist/{chunk-WAZJPDR2.js → chunk-D4VGJQY7.js} +1 -1
- package/dist/{chunk-BRUDBWLO.js → chunk-D5I5SSPU.js} +7 -7
- package/dist/{chunk-KFUDKFEH.js → chunk-D6EXW4EB.js} +45 -19
- package/dist/{chunk-AF6DQJ5W.js → chunk-DG3M5DZU.js} +1 -1
- package/dist/{chunk-WT7J2627.js → chunk-DTCTXDJP.js} +1 -1
- package/dist/chunk-DTQPDMHG.js +654 -0
- package/dist/{chunk-EZRAR5YG.js → chunk-E3TP4QTM.js} +1 -1
- package/dist/{chunk-NFZJ5XHP.js → chunk-ENBOAE2W.js} +33 -32
- package/dist/{chunk-R3252UTU.js → chunk-ENMX3VQ7.js} +7 -7
- package/dist/{chunk-AH6634HC.js → chunk-FOSYM7TQ.js} +1 -2
- package/dist/{chunk-HL7UNTXO.js → chunk-FRMAQ3C4.js} +17 -10
- package/dist/{chunk-HAWPG7QW.js → chunk-FTP7SE6Y.js} +3 -3
- package/dist/{chunk-IP7BIBXJ.js → chunk-FWSVWPMS.js} +16 -7
- package/dist/{chunk-GLUQVET2.js → chunk-GFZ7PELR.js} +6 -6
- package/dist/{chunk-UZGQT6OF.js → chunk-H2NJG3TE.js} +6 -3
- package/dist/{chunk-46OBCATR.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-24FEVLX7.js → chunk-I6U6QPN6.js} +1311 -73
- package/dist/{chunk-4DJZSNVT.js → chunk-IKFAJTLZ.js} +1 -1
- package/dist/{chunk-55PYF6S2.js → chunk-J2OMKFYB.js} +3 -3
- package/dist/{chunk-7Y5VW4JG.js → chunk-K2G3VB7W.js} +1 -1
- package/dist/chunk-K7N6LAPC.js +78 -0
- package/dist/{chunk-ULBVE7MP.js → chunk-KRCU66AM.js} +9 -9
- package/dist/{chunk-JU3VU42K.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-ABAVN4RT.js → chunk-LSZUTI6O.js} +29 -26
- package/dist/chunk-MVPOYQQY.js +136 -0
- package/dist/{chunk-YQHEJ5SV.js → chunk-NXQK2I3G.js} +3 -3
- package/dist/{chunk-DJMR4YPG.js → chunk-O3MJAHLI.js} +82 -96
- package/dist/{chunk-B7PYT2BY.js → chunk-PBGNX3PS.js} +6 -3
- package/dist/{chunk-CJJDJ7AT.js → chunk-PIZA7OG2.js} +5 -3
- package/dist/{chunk-RIHB3HA2.js → chunk-PMA67TIN.js} +3 -3
- package/dist/{chunk-DJDTL6AY.js → chunk-QKOJ22OV.js} +148 -293
- package/dist/{chunk-RDWKRG4K.js → chunk-RF4JHGGB.js} +7 -7
- package/dist/{chunk-MOOZJRKM.js → chunk-SJJXDU2J.js} +27 -30
- package/dist/chunk-T5QBWM6M.js +113 -0
- package/dist/{chunk-W7I65BKE.js → chunk-TJIFYV2Z.js} +12 -12
- package/dist/{chunk-EBOQU6QC.js → chunk-TKY3SDXH.js} +6 -6
- package/dist/{chunk-ALEUIS35.js → chunk-ULBYRPAP.js} +1 -1
- package/dist/{chunk-ZP7F3OHV.js → chunk-URHS76GV.js} +48 -38
- package/dist/{chunk-X2XTCGUS.js → chunk-VAYVTUU4.js} +11 -12
- package/dist/{chunk-TSYHUUAT.js → chunk-VUH7KKVD.js} +3 -3
- package/dist/{chunk-RIIPBJK6.js → chunk-WACPWYMH.js} +4 -4
- package/dist/{chunk-AAGU5FJF.js → chunk-WGC7UFRM.js} +1 -1
- package/dist/{chunk-2SRQSGPR.js → chunk-WVAXJOWG.js} +30 -24
- package/dist/{chunk-KLXECBIE.js → chunk-XEWG4AB2.js} +151 -108
- package/dist/{chunk-KDK6AF7B.js → chunk-XIDDJSQU.js} +7 -6
- package/dist/{chunk-MXIFRYLA.js → chunk-Y4E7IS7H.js} +2 -2
- package/dist/{chunk-DHFNBNC3.js → chunk-YJQ7YA7J.js} +5 -5
- package/dist/{chunk-6A2GEFN3.js → chunk-YMVRCSKD.js} +4 -4
- package/dist/{chunk-JW5BENE6.js → chunk-YYQ5NOT5.js} +3 -3
- package/dist/chunk-ZHQC43NH.js +130 -0
- package/dist/{chunk-KB5B6ZT5.js → chunk-ZSRMJOAK.js} +20 -20
- package/dist/{claude-launcher-L77BKZOC.js → claude-launcher-LGKJZH33.js} +99 -120
- package/dist/{cli-QQY5UECM.js → cli-Q5L64EEG.js} +327 -298
- package/dist/{cli-update-notice-T3CXRWNB.js → cli-update-notice-AWYJ4A7R.js} +2 -2
- package/dist/{command-QLHQZ32L.js → command-CGEFJZNC.js} +65 -64
- package/dist/{config-5GY7FL35.js → config-T22KVOOT.js} +14 -10
- package/dist/connect-cmd-RUBP466E.js +28 -0
- package/dist/{container-start-OCJODSMB.js → container-start-JRF3SBUA.js} +65 -62
- package/dist/{context-cleanup-A7KBEBIO.js → context-cleanup-3K2AOECJ.js} +6 -2
- package/dist/{context-show-cmd-MZ74ZIVO.js → context-show-cmd-4UXO5WQJ.js} +18 -16
- package/dist/{control-plane-launch-3TZFOSCX.js → control-plane-launch-AAH4YH56.js} +31 -27
- package/dist/{demo-record-cmd-Y57UWBCX.js → demo-record-cmd-2OKCGST7.js} +10 -5
- package/dist/{demo-voice-cmd-4INIOVTC.js → demo-voice-cmd-GEPX7GIG.js} +27 -27
- package/dist/{dist-6KGTCWKR.js → dist-VVZIGSAF.js} +1 -1
- package/dist/docker-5VWK335X.js +19 -0
- package/dist/{doctor-DB2AJUAO.js → doctor-EQM3JRZI.js} +81 -76
- package/dist/emit-artifact-cmd-TA3MPHLU.js +43 -0
- package/dist/{emit-cmd-IOWTTZSA.js → emit-cmd-RO4L4PFZ.js} +9 -8
- package/dist/emit-criteria-cmd-NMTUV2KM.js +34 -0
- package/dist/emit-demo-cmd-Y2Y6LEL7.js +46 -0
- package/dist/{emit-finding-cmd-KQIGM5IF.js → emit-finding-cmd-VECM64UR.js} +20 -19
- package/dist/{emit-result-cmd-6Q7OU2NY.js → emit-result-cmd-2ERWFDUN.js} +25 -24
- package/dist/{emit-step-cmd-GZU5O2FR.js → emit-step-cmd-V2ET66N4.js} +20 -19
- package/dist/exec-client-54XKNPTI.js +16 -0
- package/dist/find-unit-CNAPU7XQ.js +23 -0
- package/dist/{findings-cmd-T7PQAVJG.js → findings-cmd-QJPPF6BY.js} +20 -19
- package/dist/{fleet-readiness-PTMOEX6L.js → fleet-readiness-DKAPHAZN.js} +16 -15
- package/dist/governing-source-7PZ6DAJU.js +40 -0
- package/dist/guest-init-5QZRGP62.js +18 -0
- package/dist/{hook-fast-RW7RU3O6.js → hook-fast-VXROB4KF.js} +7 -5
- package/dist/hook-install-GDNRMML4.js +14 -0
- 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-PBWQBATH.js +17 -0
- package/dist/index.js +8 -9
- package/dist/init-EK3PUU6W.js +78 -0
- package/dist/{init-HUQLVUPO.js → init-Y2URPVVY.js} +62 -59
- package/dist/{init-cmd-6NQGBVAJ.js → init-cmd-XNANUDIW.js} +38 -33
- package/dist/{init-update-MA6QKX46.js → init-update-EFCTKF6D.js} +55 -46
- package/dist/install-cmd-RHFUZFV4.js +19 -0
- package/dist/layout-7XMC7S6K.js +13 -0
- package/dist/{logs-FEITSC2V.js → logs-E7MGQINH.js} +10 -3
- package/dist/loop-L6TX6OR4.js +89 -0
- package/dist/machine-VJKAY2GX.js +78 -0
- package/dist/{machine-skills-237PQFRC.js → machine-skills-HR4RNRNR.js} +5 -4
- package/dist/{mcp-install-cmd-23ZY4IBK.js → mcp-install-cmd-SMPLT43Q.js} +7 -1
- package/dist/{mcp-serve-cmd-ZINYSLY6.js → mcp-serve-cmd-XXERT673.js} +11 -7
- package/dist/{paths-XEYE7OZ2.js → paths-F2ZR2EKC.js} +10 -3
- package/dist/pending-VOFQRXP4.js +16 -0
- package/dist/pidfile-7M7O2M7T.js +17 -0
- package/dist/record-YCJ6DZOY.js +16 -0
- package/dist/{relay-IEYNSKAZ.js → relay-I2T43PPB.js} +8 -1
- package/dist/relay-protocol-GI2GC2AM.js +13 -0
- package/dist/runner-env-YW55JVU7.js +23 -0
- package/dist/runner-identity-Y5ZFCC7V.js +19 -0
- package/dist/{runner-key-CFZ47PR3.js → runner-key-R47C6374.js} +54 -54
- package/dist/session-sender-UPACLRGG.js +43 -0
- package/dist/{shell-function-NRD4KVUK.js → shell-function-GYD2ZQQG.js} +2 -1
- package/dist/{spec-cmd-CNASSB6L.js → spec-cmd-7QRE2SZK.js} +21 -20
- package/dist/{starter-pack-CCVIEY72.js → starter-pack-IMKIUA56.js} +7 -6
- package/dist/state-VAHBIMS5.js +16 -0
- package/dist/{status-VNHIHQ57.js → status-BQEYEG2V.js} +54 -54
- package/dist/{statusline-fast-E7RWVREA.js → statusline-fast-NUVHCNRX.js} +4 -2
- package/dist/{sync-cmd-5JLJBODH.js → sync-cmd-NBLYEPQG.js} +25 -24
- package/dist/update-steps-VGKNGWTZ.js +79 -0
- package/dist/{watch-AEWWTUEK.js → watch-IHV4V3HZ.js} +25 -24
- package/dist/{work-claim-cmd-GUYOJYH7.js → work-claim-cmd-WGTSU5IT.js} +24 -24
- package/dist/{work-cmd-YRPYMGII.js → work-cmd-HKOJU5FJ.js} +18 -17
- package/dist/{work-comment-cmd-U5Z6FKEU.js → work-comment-cmd-H3JCWQ2J.js} +21 -20
- package/dist/{work-demo-cmd-OLCWTVWM.js → work-demo-cmd-J4AZAIVP.js} +18 -17
- package/dist/{work-launch-TTGSHLY4.js → work-launch-LWDQXLGI.js} +1 -1
- package/dist/{work-logs-cmd-2OA7ENDU.js → work-logs-cmd-UOO4JVLG.js} +18 -17
- package/dist/{work-open-pr-cmd-6GUCDYVM.js → work-open-pr-cmd-QFRDDBAM.js} +20 -19
- package/dist/{work-pr-cmd-KK3VQUQI.js → work-pr-cmd-3Q2D5RQT.js} +19 -18
- package/dist/{work-proofs-cmd-BUOS5OJC.js → work-proofs-cmd-7Y3HGT7C.js} +21 -20
- package/dist/{work-proofs-record-6WLMOK53.js → work-proofs-record-QPUM6DY4.js} +31 -31
- package/dist/{work-stop-cmd-VZJX5X4L.js → work-stop-cmd-SD2ZRMSY.js} +18 -17
- package/package.json +1 -1
- package/dist/agent-setup-DJRQFPDU.js +0 -33
- package/dist/bridge-XM4QLKIX.js +0 -8
- package/dist/build-ZE5IG3V6.js +0 -18
- package/dist/build-disk-GMXDIZU4.js +0 -15
- package/dist/builder-LJ3FSB36.js +0 -14
- package/dist/caller-YLNJJPFU.js +0 -18
- package/dist/chunk-CXFJOX2C.js +0 -144
- package/dist/chunk-FGF52V4V.js +0 -137
- package/dist/chunk-HCVLP7XA.js +0 -53
- package/dist/chunk-KYDEBGJG.js +0 -402
- package/dist/chunk-MESOOLF4.js +0 -45
- package/dist/chunk-OHQMGLJP.js +0 -113
- package/dist/chunk-OUPQTA7N.js +0 -145
- package/dist/chunk-VRMXYQWR.js +0 -74
- package/dist/connect-cmd-THV7XBVP.js +0 -27
- package/dist/docker-5YVUZ3J2.js +0 -14
- package/dist/emit-artifact-cmd-H27MFSKH.js +0 -42
- package/dist/emit-criteria-cmd-IOUVMB2Q.js +0 -33
- package/dist/emit-demo-cmd-WJSS7KU2.js +0 -46
- package/dist/exec-client-FGGPQSYQ.js +0 -9
- package/dist/find-unit-PRZIFBIK.js +0 -19
- package/dist/governing-source-CND5ZZC3.js +0 -39
- package/dist/guest-init-WPUS45IN.js +0 -11
- package/dist/host-checks-S3B7Z4SY.js +0 -78
- package/dist/host-key-O4DFMOSV.js +0 -9
- package/dist/image-tag-WBD57QBN.js +0 -10
- package/dist/init-ILTX4V56.js +0 -78
- package/dist/install-cmd-JKPXIOEY.js +0 -12
- package/dist/layout-2ZMCT2D3.js +0 -11
- package/dist/loop-KDWDOSMQ.js +0 -89
- package/dist/machine-Z6K5XXI6.js +0 -78
- package/dist/pending-D2NNV54J.js +0 -9
- package/dist/pidfile-FLFVRKVW.js +0 -10
- package/dist/record-JMZOXD4R.js +0 -9
- package/dist/relay-protocol-5LSWUJCW.js +0 -6
- package/dist/runner-env-W2UMHY7P.js +0 -19
- package/dist/runner-identity-IIY5UJL3.js +0 -14
- package/dist/session-sender-NO4F2IQ5.js +0 -42
- package/dist/settings-XB2HYBKO.js +0 -7
- package/dist/state-UWIM42JH.js +0 -9
- package/dist/update-steps-XGOXDCOS.js +0 -79
- package/dist/{chunk-OLM2TIOW.js → chunk-NFZMENCY.js} +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { parseOuterlayerConfig } from './chunk-
|
|
3
|
+
import { parseOuterlayerConfig, targetIds, defaultAgents } from './chunk-I6U6QPN6.js';
|
|
4
|
+
import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-LSLK4RS4.js';
|
|
4
5
|
import { readFileSync } from 'fs';
|
|
5
6
|
import { join } from 'path';
|
|
6
7
|
|
|
@@ -8,23 +9,23 @@ createRequire(import.meta.url);
|
|
|
8
9
|
function invalidConfigMessage(errors) {
|
|
9
10
|
return `invalid .outerlayer/config.json \u2014 ${errors.map((e) => `${e.path}: ${e.message}`).join("; ")}`;
|
|
10
11
|
}
|
|
11
|
-
function removedTargetError(configText) {
|
|
12
|
-
const parsed = parseOuterlayerConfig(configText);
|
|
12
|
+
function removedTargetError(configText, agents = defaultAgents()) {
|
|
13
|
+
const parsed = parseOuterlayerConfig(configText, targetIds(agents));
|
|
13
14
|
if (parsed.ok) return void 0;
|
|
14
15
|
const removed = parsed.errors.filter((e) => e.code === "removed_target");
|
|
15
16
|
return removed.length === 0 ? void 0 : invalidConfigMessage(removed);
|
|
16
17
|
}
|
|
17
|
-
function removedTargetErrorIn(root) {
|
|
18
|
+
function removedTargetErrorIn(root, agents = defaultAgents()) {
|
|
18
19
|
let text;
|
|
19
20
|
try {
|
|
20
21
|
text = readFileSync(join(root, ".outerlayer", "config.json"), "utf8");
|
|
21
22
|
} catch {
|
|
22
23
|
return void 0;
|
|
23
24
|
}
|
|
24
|
-
return removedTargetError(text);
|
|
25
|
+
return removedTargetError(text, agents);
|
|
25
26
|
}
|
|
26
27
|
function launchRefusal(repository, error) {
|
|
27
|
-
return `outerlayer
|
|
28
|
+
return `outerlayer ${NATIVE_AGENTS[LEGACY_AGENT].legacy.subcommand}: the control plane ${repository} has an ${error}
|
|
28
29
|
`;
|
|
29
30
|
}
|
|
30
31
|
function buildRefusalReason(repository, error) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { parseSize, BUILD_LABEL, RUNNER_LABEL, runnerLabelValue } from './chunk-
|
|
4
|
-
import { buildsDir, storeScopes, rootfsDir, orgStoreIn, runnerDir, imagesDir, builderCacheDiskPath } from './chunk-
|
|
3
|
+
import { parseSize, BUILD_LABEL, RUNNER_LABEL, runnerLabelValue } from './chunk-CDG475ZP.js';
|
|
4
|
+
import { buildsDir, storeScopes, rootfsDir, orgStoreIn, runnerDir, imagesDir, builderCacheDiskPath } from './chunk-DTCTXDJP.js';
|
|
5
5
|
import { spawnSync } from 'child_process';
|
|
6
6
|
import { statfsSync, statSync, existsSync, readdirSync } from 'fs';
|
|
7
7
|
import { dirname, join } from 'path';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { detectActiveSession } from './chunk-
|
|
4
|
-
import { autoConnect } from './chunk-
|
|
3
|
+
import { detectActiveSession } from './chunk-FWSVWPMS.js';
|
|
4
|
+
import { autoConnect } from './chunk-VUH7KKVD.js';
|
|
5
|
+
import { resolveRepoIdentity } from './chunk-6KH3NMIT.js';
|
|
5
6
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
6
|
-
import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-
|
|
7
|
-
import {
|
|
8
|
-
import { parseWorkItemEnv } from './chunk-5WYT3PPE.js';
|
|
7
|
+
import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-NXQK2I3G.js';
|
|
8
|
+
import { parseWorkItemEnv } from './chunk-4OD45RBP.js';
|
|
9
9
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
10
10
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
11
11
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { LiveUploader } from './chunk-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { parseWorkItemEnv } from './chunk-
|
|
3
|
+
import { LiveUploader } from './chunk-3UFX6KH2.js';
|
|
4
|
+
import { CaptureDaemon } from './chunk-6KH3NMIT.js';
|
|
5
|
+
import { spoolDir } from './chunk-O3MJAHLI.js';
|
|
6
|
+
import { parseWorkItemEnv } from './chunk-4OD45RBP.js';
|
|
7
7
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
8
8
|
import { mkdirSync, writeFileSync, rmSync } from 'fs';
|
|
9
9
|
import { join } from 'path';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { stripTerminalControls } from './chunk-
|
|
4
|
-
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-
|
|
3
|
+
import { stripTerminalControls } from './chunk-XEWG4AB2.js';
|
|
4
|
+
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-ULBYRPAP.js';
|
|
5
5
|
import { readFileSync } from 'fs';
|
|
6
6
|
|
|
7
7
|
createRequire(import.meta.url);
|
|
@@ -55,7 +55,7 @@ function envNamesOf(row, imageEnv) {
|
|
|
55
55
|
return [...new Set(names)].sort();
|
|
56
56
|
}
|
|
57
57
|
async function readOwnContainer(deps = {}) {
|
|
58
|
-
const run = deps.run ?? (await import('./docker-
|
|
58
|
+
const run = deps.run ?? (await import('./docker-5VWK335X.js')).spawnRun;
|
|
59
59
|
const ids = candidateIds(deps.env ?? process.env, deps.readFile ?? ((path) => readFileSync(path, "utf8")));
|
|
60
60
|
if (ids.length === 0) return { ok: false, reason: "the runner cannot tell which container it runs in: HOSTNAME is empty and /proc/self/mountinfo names none" };
|
|
61
61
|
let problem = "";
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { existsSync, readFileSync, mkdirSync, copyFileSync, writeFileSync } from 'fs';
|
|
4
|
+
import { dirname } from 'path';
|
|
5
|
+
|
|
6
|
+
createRequire(import.meta.url);
|
|
7
|
+
function tokenizeCommand(command) {
|
|
8
|
+
const tokens = [];
|
|
9
|
+
let current = "";
|
|
10
|
+
let inToken = false;
|
|
11
|
+
let quote = null;
|
|
12
|
+
for (const ch of command) {
|
|
13
|
+
if (quote !== null) {
|
|
14
|
+
if (ch === quote) quote = null;
|
|
15
|
+
else current += ch;
|
|
16
|
+
} else if (ch === '"' || ch === "'") {
|
|
17
|
+
quote = ch;
|
|
18
|
+
inToken = true;
|
|
19
|
+
} else if (/\s/.test(ch)) {
|
|
20
|
+
if (inToken) {
|
|
21
|
+
tokens.push(current);
|
|
22
|
+
current = "";
|
|
23
|
+
inToken = false;
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
current += ch;
|
|
27
|
+
inToken = true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (quote !== null) return null;
|
|
31
|
+
if (inToken) tokens.push(current);
|
|
32
|
+
return tokens;
|
|
33
|
+
}
|
|
34
|
+
function quoteBin(bin) {
|
|
35
|
+
return /\s/.test(bin) ? `"${bin}"` : bin;
|
|
36
|
+
}
|
|
37
|
+
function isScriptBin(bin) {
|
|
38
|
+
return /\.[cm]?js$/i.test(bin);
|
|
39
|
+
}
|
|
40
|
+
function cliCommand(cliBin) {
|
|
41
|
+
return isScriptBin(cliBin) ? `node ${quoteBin(cliBin)}` : quoteBin(cliBin);
|
|
42
|
+
}
|
|
43
|
+
var PORTABLE_BIN = "outerlayer";
|
|
44
|
+
function isOurBin(bin, cliBin) {
|
|
45
|
+
if (cliBin !== void 0 && normalizeBinPath(bin) === normalizeBinPath(cliBin)) return true;
|
|
46
|
+
const parts = bin.replace(/\\/g, "/").split("/");
|
|
47
|
+
if (isPublishedPackageBin(parts)) return true;
|
|
48
|
+
const base = (parts.pop() ?? "").toLowerCase();
|
|
49
|
+
if (base === "outerlayer" || base === "outerlayer.exe" || base === "outerlayer.cmd") return true;
|
|
50
|
+
return parts.some((p) => p.toLowerCase() === ".outerlayer");
|
|
51
|
+
}
|
|
52
|
+
function isPublishedPackageBin(parts) {
|
|
53
|
+
const n = parts.length;
|
|
54
|
+
if (n === 2 && parts[0] === "@outerlayer" && /^cli(@[^/]+)?$/.test(parts[1])) return true;
|
|
55
|
+
return parts[n - 4] === "@outerlayer" && parts[n - 3] === "cli" && parts[n - 2] === "dist" && parts[n - 1] === "index.js";
|
|
56
|
+
}
|
|
57
|
+
function normalizeBinPath(bin) {
|
|
58
|
+
return bin.replace(/\\/g, "/");
|
|
59
|
+
}
|
|
60
|
+
function splitCliInvocation(command, cliBin) {
|
|
61
|
+
if (typeof command !== "string") return null;
|
|
62
|
+
const tokens = tokenizeCommand(command.trim());
|
|
63
|
+
if (!tokens) return null;
|
|
64
|
+
const launcher = (tokens[0] ?? "").replace(/\\/g, "/").split("/").pop() ?? "";
|
|
65
|
+
const viaNode = launcher === "node" || launcher === "node.exe";
|
|
66
|
+
const viaNpx = launcher === "npx";
|
|
67
|
+
const i = viaNode || viaNpx ? 1 : 0;
|
|
68
|
+
const bin = tokens[i];
|
|
69
|
+
if (!bin || !isOurBin(bin, cliBin)) return null;
|
|
70
|
+
return { bin, args: tokens.slice(i + 1), viaNpx, viaNode };
|
|
71
|
+
}
|
|
72
|
+
function parseCliInvocation(command, cliBin) {
|
|
73
|
+
return splitCliInvocation(command, cliBin)?.args ?? null;
|
|
74
|
+
}
|
|
75
|
+
function decodeVerifiedWrapId(token) {
|
|
76
|
+
if (typeof token !== "string") return null;
|
|
77
|
+
const original = decodeWrappedCommand(token);
|
|
78
|
+
const canonical = encodeWrappedCommand(original);
|
|
79
|
+
return canonical.replace(/=+$/, "") === token.replace(/=+$/, "") ? original : null;
|
|
80
|
+
}
|
|
81
|
+
function cliBinResolvable(cliBin) {
|
|
82
|
+
if (!cliBin.includes("/") && !cliBin.includes("\\")) return true;
|
|
83
|
+
return existsSync(cliBin);
|
|
84
|
+
}
|
|
85
|
+
function encodeWrappedCommand(command) {
|
|
86
|
+
return Buffer.from(command, "utf8").toString("base64");
|
|
87
|
+
}
|
|
88
|
+
function decodeWrappedCommand(id) {
|
|
89
|
+
return Buffer.from(id, "base64").toString("utf8");
|
|
90
|
+
}
|
|
91
|
+
function readSettingsText(path) {
|
|
92
|
+
return existsSync(path) ? readFileSync(path, "utf8") : void 0;
|
|
93
|
+
}
|
|
94
|
+
var SettingsParseError = class extends Error {
|
|
95
|
+
constructor(path, cause) {
|
|
96
|
+
super(`refusing to modify ${path}: it is not valid JSON (${cause instanceof Error ? cause.message : cause})`);
|
|
97
|
+
this.path = path;
|
|
98
|
+
this.cause = cause;
|
|
99
|
+
this.name = "SettingsParseError";
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
function writeSettingsText(path, text, now = Date.now) {
|
|
103
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
104
|
+
let backupPath;
|
|
105
|
+
if (existsSync(path)) {
|
|
106
|
+
backupPath = `${path}.bak-${now()}`;
|
|
107
|
+
copyFileSync(path, backupPath);
|
|
108
|
+
}
|
|
109
|
+
writeFileSync(path, text);
|
|
110
|
+
return backupPath;
|
|
111
|
+
}
|
|
112
|
+
function cliForInstall(bin) {
|
|
113
|
+
return {
|
|
114
|
+
command(args) {
|
|
115
|
+
if (bin === void 0) throw new Error("this command line has no CLI to run");
|
|
116
|
+
return `${cliCommand(bin)} ${args}`;
|
|
117
|
+
},
|
|
118
|
+
parse: (command) => parseCliInvocation(command, bin),
|
|
119
|
+
split(command) {
|
|
120
|
+
const split = splitCliInvocation(command, bin);
|
|
121
|
+
return split === null ? null : { ...split, script: isScriptBin(split.bin) };
|
|
122
|
+
},
|
|
123
|
+
startsLikeCommand: (split) => bin !== void 0 && normalizeBinPath(split.bin) === normalizeBinPath(bin) && split.viaNode === isScriptBin(bin),
|
|
124
|
+
encode: encodeWrappedCommand,
|
|
125
|
+
decode: decodeVerifiedWrapId,
|
|
126
|
+
resolvable: () => bin !== void 0 && cliBinResolvable(bin)
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export { PORTABLE_BIN, SettingsParseError, cliBinResolvable, cliForInstall, decodeWrappedCommand, readSettingsText, writeSettingsText };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { PROXY_WARNING_FLAG } from './chunk-CXJC3JLN.js';
|
|
4
|
+
import { buildAgent, GH_VERSION, VOICE_PACK_FILES, VOICE_PACK_VERSION, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, TINI_SHA256, TINI_VERSION, RELAY_ID, RELAY_USER, HEADLESS_SHELL_REVISION, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG_BASE_URL, PLAYWRIGHT_FFMPEG_REVISION, HEADLESS_SHELL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_VERSION } from './chunk-DTQPDMHG.js';
|
|
5
|
+
import { defaultAgents } from './chunk-I6U6QPN6.js';
|
|
6
6
|
|
|
7
7
|
createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// src/runner/image/claude-wrapper.ts
|
|
10
10
|
var UNIVERSAL_VERSIONS_FILE = "/etc/outerlayer/universal-versions.json";
|
|
11
|
-
function
|
|
11
|
+
function agentWrapperScript(program) {
|
|
12
12
|
return [
|
|
13
13
|
"#!/bin/sh",
|
|
14
14
|
`if [ -f ${UNIVERSAL_VERSIONS_FILE} ]; then PATH="$PATH:/opt/outerlayer/bin"; else PATH=/opt/outerlayer/bin:$PATH; fi`,
|
|
15
15
|
"export PATH",
|
|
16
|
-
|
|
16
|
+
`exec ${program} "$@"`,
|
|
17
17
|
""
|
|
18
18
|
].join("\n");
|
|
19
19
|
}
|
|
@@ -42,17 +42,17 @@ function plain(name, value, allowed) {
|
|
|
42
42
|
if (!allowed.test(value)) throw new Error(`${name} holds a character a Dockerfile line cannot carry safely: ${JSON.stringify(value)}`);
|
|
43
43
|
return value;
|
|
44
44
|
}
|
|
45
|
-
function toolsDockerfile(parts) {
|
|
45
|
+
function toolsDockerfile(parts, agents = defaultAgents()) {
|
|
46
46
|
const recipeImage = plain("the recipe image", parts.recipeImage, /^[A-Za-z0-9_.:@/-]+$/);
|
|
47
47
|
const nodeImage = plain("the Node image", parts.nodeImage, /^[A-Za-z0-9_.:@/-]+$/);
|
|
48
|
-
const
|
|
48
|
+
const agent = buildAgent(agents);
|
|
49
|
+
const image = parts.image ?? agent?.adapter.image;
|
|
50
|
+
const agentName = parts.agentName ?? (parts.image === void 0 ? agent?.descriptor.label : parts.image.command) ?? "agent";
|
|
51
|
+
const version = plain(`the ${agentName} version`, parts.claudeCodeVersion, /^[A-Za-z0-9.+-]+$/);
|
|
49
52
|
const buildId = plain("the build id", parts.buildId, /^[A-Za-z0-9_.:+-]+$/);
|
|
50
|
-
const tools = JSON.stringify({ outerlayerBuildId: buildId,
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
["SessionStart", "SessionEnd", "Stop", "PostToolUse"].map((event) => [event, [{ hooks: [{ type: "command", command: `outerlayer hook ${event}` }] }]])
|
|
54
|
-
)
|
|
55
|
-
});
|
|
53
|
+
const tools = JSON.stringify({ outerlayerBuildId: buildId, ...image === void 0 ? {} : { [image.versionKey]: version }, ghVersion: GH_VERSION });
|
|
54
|
+
const files = (image?.files ?? []).map((file) => ({ path: file.path, text: plain(`the text of ${file.path}`, file.text, /^[^\n']*$/) }));
|
|
55
|
+
const folders = [...new Set(files.map((file) => file.path.slice(0, file.path.lastIndexOf("/"))))];
|
|
56
56
|
const download = `NODE_USE_ENV_PROXY=1 node ${PROXY_WARNING_FLAG} -e 'fetch(process.argv[1]).then((r)=>{if(!r.ok)throw new Error(process.argv[1]+" "+r.status);return r.arrayBuffer()}).then((b)=>require("fs").writeFileSync(process.argv[2],Buffer.from(b)))'`;
|
|
57
57
|
const stream = `NODE_USE_ENV_PROXY=1 node ${PROXY_WARNING_FLAG} -e 'const{pipeline}=require("stream/promises"),{Readable}=require("stream"),fs=require("fs");fetch(process.argv[1]).then((r)=>{if(!r.ok)throw new Error(process.argv[1]+" "+r.status);return pipeline(Readable.fromWeb(r.body),fs.createWriteStream(process.argv[2]))})'`;
|
|
58
58
|
const voiceDir = `/out/opt/outerlayer/voice/${VOICE_PACK_VERSION}`;
|
|
@@ -98,7 +98,7 @@ function toolsDockerfile(parts) {
|
|
|
98
98
|
`FROM ${recipeImage} AS recipe`,
|
|
99
99
|
`FROM ${nodeImage} AS stage`,
|
|
100
100
|
"ARG TARGETARCH",
|
|
101
|
-
|
|
101
|
+
...image === void 0 ? [] : image.install(version),
|
|
102
102
|
"COPY dist /out/opt/outerlayer/cli/dist",
|
|
103
103
|
"COPY package.json /out/opt/outerlayer/cli/package.json",
|
|
104
104
|
// `outerlayer demo record` runs a demo on the Playwright release this CLI depends on, found beside the CLI as an npm
|
|
@@ -109,13 +109,13 @@ function toolsDockerfile(parts) {
|
|
|
109
109
|
" && mv node_modules /out/opt/outerlayer/cli/node_modules",
|
|
110
110
|
// `outerlayer claude` installs the maintained skills from this pack into the build's home folder before the agent starts.
|
|
111
111
|
"COPY skill-pack /out/opt/outerlayer/cli/skill-pack",
|
|
112
|
-
|
|
112
|
+
`RUN mkdir -p /out/opt/outerlayer/bin /out/usr/local/bin ${[...folders.map((folder) => `/out${folder}`), "/out/build"].join(" ")} \\`,
|
|
113
113
|
" && cp /usr/local/bin/node /out/opt/outerlayer/bin/node \\",
|
|
114
114
|
` && printf '%s\\n' '#!/bin/sh' 'exec /opt/outerlayer/bin/node /opt/outerlayer/cli/dist/index.js "$@"' > /out/usr/local/bin/outerlayer \\`,
|
|
115
|
-
` && printf '%s\\n' ${
|
|
115
|
+
...image === void 0 ? [] : [` && printf '%s\\n' ${agentWrapperScript(image.program).trimEnd().split("\n").map((line) => `'${line}'`).join(" ")} > /out/usr/local/bin/${image.command} \\`],
|
|
116
116
|
` && printf '%s\\n' '${tools}' > /out/opt/outerlayer/tools.json \\`,
|
|
117
|
-
` && printf '%s\\n' '${
|
|
118
|
-
|
|
117
|
+
...files.map((file) => ` && printf '%s\\n' '${file.text}' > /out${file.path} \\`),
|
|
118
|
+
` && chmod 0755 /out/usr/local/bin/outerlayer${image === void 0 ? "" : ` /out/usr/local/bin/${image.command}`} \\`,
|
|
119
119
|
// Every build, whatever user runs it, writes here: the first mount of an empty volume copies this mode.
|
|
120
120
|
" && chmod 1777 /out/build",
|
|
121
121
|
...parts.guestHelper === true ? [
|
|
@@ -162,13 +162,13 @@ function toolsDockerfile(parts) {
|
|
|
162
162
|
"COPY --from=media /out/ /",
|
|
163
163
|
"COPY --from=browser /out/ /",
|
|
164
164
|
"COPY --from=git /out/ /",
|
|
165
|
-
|
|
165
|
+
...Object.entries(image?.env ?? {}).map(([name, value]) => `ENV ${name}=${value}`),
|
|
166
166
|
// Last, so a recipe's own git comes first. A recipe image that sets no PATH gets the one Docker gives a container.
|
|
167
167
|
`ENV PATH=\${PATH:-/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin}:${FALLBACK_BIN}`,
|
|
168
168
|
// espeak-ng's audio library makes a private pulse-* folder for the user who runs it, in the temp folder unless XDG_RUNTIME_DIR names another.
|
|
169
169
|
// Made here, as root, it would ship in the image where the build user cannot read it, and the runner's disk check fails on it.
|
|
170
170
|
"RUN check=$(mktemp -d /tmp/ol-check.XXXXXX) \\",
|
|
171
|
-
|
|
171
|
+
` && outerlayer --version${image === void 0 ? "" : ` && ${image.command} --version`} && gh --version && ffmpeg -version && ffprobe -version \\`,
|
|
172
172
|
' && XDG_RUNTIME_DIR="$check" espeak-ng --version \\',
|
|
173
173
|
` && git --version && ${FALLBACK_BIN}/git --version \\`,
|
|
174
174
|
` && ${IMAGE_BROWSER.playwright}/chromium_headless_shell-${HEADLESS_SHELL_REVISION}/chrome-headless-shell-linux*/chrome-headless-shell --version \\`,
|