@outerlayer/cli 0.38.0-next.20261105155912 → 0.38.0-next.20261105195352
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-RXMEQ7PA.js → agent-setup-THQTFPYB.js} +19 -19
- package/dist/{agent-subcommand-KPQGEOPQ.js → agent-subcommand-H5LKM3HG.js} +4 -4
- package/dist/{bridge-F4BNXRM2.js → bridge-RN5JYY7N.js} +7 -7
- package/dist/{build-ZH5MAZNM.js → build-DJDZXY7M.js} +13 -13
- package/dist/{build-disk-GPCMOIZV.js → build-disk-PN7QBYVR.js} +11 -11
- package/dist/build-info.json +1 -1
- package/dist/{builder-ZMVXHOEJ.js → builder-NJXSBAX3.js} +10 -10
- package/dist/caller-T65G6G3Z.js +23 -0
- package/dist/{check-CZM3LZ7Y.js → check-QF7RGLUL.js} +55 -55
- package/dist/{chunk-IG7SBYJY.js → chunk-2VUBHRPG.js} +1 -1
- package/dist/{chunk-Y2HVISUN.js → chunk-365EXSFH.js} +1 -1
- package/dist/{chunk-EVFZUFCO.js → chunk-3CN77FDB.js} +4 -4
- package/dist/{chunk-RVIZRXBK.js → chunk-3FKWVYWC.js} +3 -3
- package/dist/{chunk-PMBG7IYE.js → chunk-3YCKLA4N.js} +10 -10
- package/dist/{chunk-64D2YZK5.js → chunk-44332APJ.js} +1 -1
- package/dist/{chunk-J7MMYBBV.js → chunk-5BU252QJ.js} +5 -5
- package/dist/{chunk-3J7F3VGZ.js → chunk-6S4THFJO.js} +2 -2
- package/dist/{chunk-DP6ZOSCR.js → chunk-6UXPXENL.js} +24 -10
- package/dist/{chunk-Y5ZKDLNX.js → chunk-6VCNDRNW.js} +15 -15
- package/dist/{chunk-L25GQH45.js → chunk-6Z5H7JV3.js} +1 -1
- package/dist/{chunk-OCDG3ZWH.js → chunk-72DXH6AP.js} +9 -9
- package/dist/{chunk-K7KQCOSM.js → chunk-75D54355.js} +9 -9
- package/dist/{chunk-WHPMCF7R.js → chunk-7DHQVVEC.js} +16 -16
- package/dist/{chunk-QJKW4MKH.js → chunk-7PZDPISM.js} +54 -2
- package/dist/{chunk-RM3K57Q7.js → chunk-A5FIUS53.js} +39 -16
- package/dist/{chunk-45UZPTDQ.js → chunk-AGDRXJSZ.js} +1 -1
- package/dist/{chunk-GLJX2CZY.js → chunk-AUQPAVRV.js} +350 -300
- package/dist/{chunk-XN4A275V.js → chunk-BHATB3L2.js} +23 -13
- package/dist/{chunk-MPGTKJOM.js → chunk-BM25MMUE.js} +3 -3
- package/dist/{chunk-3PR7BPMG.js → chunk-BP3B5R7Y.js} +4 -4
- package/dist/{chunk-K7BI4TLM.js → chunk-DDBCRY3Y.js} +20 -7
- package/dist/{chunk-VV2VLQWG.js → chunk-DSR3VW72.js} +2 -2
- package/dist/{chunk-5YWOGS66.js → chunk-EJOZNQBE.js} +7 -7
- package/dist/{chunk-MY6T3N3A.js → chunk-EUA3SKPV.js} +1 -1
- package/dist/{chunk-ZEEQB7VM.js → chunk-FIXRXONQ.js} +5 -5
- package/dist/{chunk-2C3XLYO5.js → chunk-G74ZB2V4.js} +1 -1
- package/dist/{chunk-EKRLMOWS.js → chunk-GEC2G3SJ.js} +6 -6
- package/dist/{chunk-JCEJARDB.js → chunk-GUYDCCUH.js} +1 -1
- package/dist/{chunk-2RKPEUGK.js → chunk-HBGVQT33.js} +1 -1
- package/dist/{chunk-GZETHU2Z.js → chunk-HLBN3FLS.js} +3 -3
- package/dist/{chunk-IJN3GP4M.js → chunk-HUMQ4NLZ.js} +1 -1
- package/dist/{chunk-HI5RBFL3.js → chunk-HV44EL6A.js} +14 -9
- package/dist/{chunk-VG524OUD.js → chunk-ID3HBQYZ.js} +5 -5
- package/dist/{chunk-2QIK3JRV.js → chunk-IRFN2ZHJ.js} +1 -1
- package/dist/{chunk-SKV6FO37.js → chunk-KEY5IDTC.js} +4 -4
- package/dist/{chunk-KXCTWOPU.js → chunk-KZG3R5YD.js} +3 -3
- package/dist/{chunk-M4WTELYI.js → chunk-LQJAZ4VK.js} +3 -3
- package/dist/{chunk-DOKFFSOZ.js → chunk-LWHHAZ75.js} +2 -2
- package/dist/{chunk-7TPLWWFN.js → chunk-M53UNEO6.js} +1 -1
- package/dist/{chunk-35RIDLSD.js → chunk-NAGY6ISM.js} +2 -2
- package/dist/{chunk-QDM23DTW.js → chunk-NFKERPLC.js} +10 -10
- package/dist/{chunk-HOCVTWV2.js → chunk-NIUSFUUS.js} +1 -1
- package/dist/{chunk-EOVVSXRH.js → chunk-NYWLOOIL.js} +7 -7
- package/dist/{chunk-GMRIR2MF.js → chunk-O4CWZFC4.js} +7 -7
- package/dist/{chunk-LMT72G74.js → chunk-OD2F225Q.js} +1 -1
- package/dist/{chunk-MB7IX6DO.js → chunk-ORSNYGXN.js} +1 -1
- package/dist/{chunk-XQSTN7NG.js → chunk-P22JMQJB.js} +3 -3
- package/dist/{chunk-J56SR6X4.js → chunk-P26TVBYV.js} +1 -1
- package/dist/{chunk-HU3POMM4.js → chunk-P64TL3GV.js} +6 -6
- package/dist/{chunk-WWTZLRPH.js → chunk-PLVHIQJN.js} +43 -3
- package/dist/{chunk-OVRLLZPJ.js → chunk-PWCP3YVA.js} +1 -1
- package/dist/{chunk-D5JJQRW7.js → chunk-QNPJ4VZ2.js} +9 -9
- package/dist/{chunk-SUMRSD2Q.js → chunk-QNQS4PET.js} +1 -1
- package/dist/{chunk-6XYKZH3K.js → chunk-R2QIQZ4V.js} +5 -5
- package/dist/{chunk-AWY7ORQ2.js → chunk-RNCCRUT5.js} +1 -1
- package/dist/{chunk-5M3KXOPY.js → chunk-S24KG7NY.js} +2 -2
- package/dist/{chunk-W7LJQ2GU.js → chunk-SCH5S3VW.js} +4 -4
- package/dist/{chunk-OV4XTV5M.js → chunk-SF2TBJBP.js} +7 -4
- package/dist/{chunk-VUSYGNNN.js → chunk-SZKBH2BO.js} +1 -1
- package/dist/{chunk-YU6XPJ5I.js → chunk-SZN3CSEP.js} +3 -3
- package/dist/{chunk-TOH7FJH3.js → chunk-TTYZDLGW.js} +42 -31
- package/dist/{chunk-XUXDUOJI.js → chunk-UAVBSFHI.js} +5 -5
- package/dist/{chunk-SSSPZ3TB.js → chunk-UEFLAGRW.js} +1 -1
- package/dist/{chunk-KXKVMSHC.js → chunk-UFDJDVZD.js} +1 -1
- package/dist/{chunk-3B5H5MGB.js → chunk-V52EY5UK.js} +1 -1
- package/dist/{chunk-HVUS5WRU.js → chunk-WH4OWQ6T.js} +3 -3
- package/dist/{chunk-BMYIPXBG.js → chunk-WPLNTUS6.js} +3 -3
- package/dist/{chunk-FRQPX2QR.js → chunk-XGQ7ZHNH.js} +3 -3
- package/dist/{chunk-IYUJFAQD.js → chunk-XJPTMZJG.js} +917 -34
- package/dist/{chunk-2FDWTE6F.js → chunk-ZFZ62TU4.js} +5 -5
- package/dist/{chunk-U63SE2NJ.js → chunk-ZOLDM52Z.js} +1 -1
- package/dist/{chunk-H6H5GCM6.js → chunk-ZRYBGZI7.js} +19 -8
- package/dist/{chunk-CUAV3727.js → chunk-ZZZIOKUN.js} +3 -3
- package/dist/{claude-launcher-3O5W5ENW.js → claude-launcher-LIV7LKKT.js} +8 -8
- package/dist/{cli-YMSYVF7O.js → cli-NKKF5PF5.js} +162 -149
- package/dist/{command-ZOWMTOWA.js → command-ZQDMVPD4.js} +50 -50
- package/dist/{config-J4NNZ2XO.js → config-6LQKXZNE.js} +12 -12
- package/dist/{connect-cmd-GVIUKK3R.js → connect-cmd-KHOYYXIY.js} +11 -11
- package/dist/{container-start-RZSGWDZG.js → container-start-FGSVYG2T.js} +54 -49
- package/dist/{context-cleanup-7V2ARBSC.js → context-cleanup-WYI3QQBI.js} +4 -4
- package/dist/{context-show-cmd-73E36KAV.js → context-show-cmd-MUSMZ3ZM.js} +12 -12
- package/dist/{control-plane-launch-L744RJ4A.js → control-plane-launch-UGMPLX2S.js} +15 -15
- package/dist/{demo-record-cmd-KGH3WGLY.js → demo-record-cmd-GO4ZIP4J.js} +8 -8
- package/dist/{demo-voice-cmd-CHCS7TQF.js → demo-voice-cmd-YOIL75H3.js} +20 -20
- package/dist/{docker-CAMJXBAJ.js → docker-IWTHGXFC.js} +10 -10
- package/dist/{doctor-NILQ2RUT.js → doctor-UUCRZ7JO.js} +55 -55
- package/dist/{emit-artifact-cmd-CGY656UZ.js → emit-artifact-cmd-IG5O5KUV.js} +19 -19
- package/dist/{emit-cmd-AG7HL3YI.js → emit-cmd-KGBGKB56.js} +7 -7
- package/dist/{emit-criteria-cmd-3HYUUSDK.js → emit-criteria-cmd-HV3RXCV5.js} +14 -14
- package/dist/{emit-demo-cmd-GHDL7ZGH.js → emit-demo-cmd-ZKHGJUW7.js} +20 -20
- package/dist/{emit-finding-cmd-KPHWY6ZU.js → emit-finding-cmd-PBTELK66.js} +14 -14
- package/dist/{emit-result-cmd-WOJEHOXH.js → emit-result-cmd-JJUNDXEH.js} +18 -18
- package/dist/{emit-step-cmd-QTNJBTZN.js → emit-step-cmd-5VZQBGLU.js} +14 -14
- package/dist/{exec-client-IPPD3NF4.js → exec-client-PH7FI3Q3.js} +8 -8
- package/dist/find-unit-527IGJNL.js +24 -0
- package/dist/{findings-cmd-LVYAXHQG.js → findings-cmd-PVP6D4ZV.js} +14 -14
- package/dist/{fleet-readiness-F46LOKJ6.js → fleet-readiness-YZZ6YDXZ.js} +14 -14
- package/dist/{governing-source-4XYZYZCD.js → governing-source-UUDIJISJ.js} +20 -20
- package/dist/{guest-init-CFJM25V5.js → guest-init-KXBNS3NA.js} +9 -9
- package/dist/{hook-fast-RNST4WJH.js → hook-fast-CRC7M2YT.js} +4 -4
- package/dist/{hook-install-G3FUCXBE.js → hook-install-3UNSUQVP.js} +4 -4
- package/dist/{hook-wrap-fast-HNY3OGLN.js → hook-wrap-fast-GVS5HF5C.js} +3 -3
- package/dist/host-checks-ISCYYAYB.js +79 -0
- package/dist/host-key-535Z4MV6.js +18 -0
- package/dist/{image-tag-5Z2NKCHC.js → image-tag-S5LR2FDL.js} +8 -8
- package/dist/index.js +7 -7
- package/dist/{init-7OHFUQBV.js → init-2JDKKCKC.js} +46 -46
- package/dist/init-CGYS6IGX.js +79 -0
- package/dist/{init-agent-B5ADPZIB.js → init-agent-ESCPFY6L.js} +47 -47
- package/dist/{init-cmd-ZT2PXGPD.js → init-cmd-RXB7ZCFD.js} +28 -28
- package/dist/{init-update-WYM5WSM7.js → init-update-YIQRJG5U.js} +23 -23
- package/dist/{install-cmd-3NOHEA6E.js → install-cmd-OG4IHLHP.js} +10 -10
- package/dist/{layout-RPYMSWCY.js → layout-ZDD5JMAD.js} +4 -4
- package/dist/{logs-XKEW5EOB.js → logs-LLFBENNJ.js} +7 -7
- package/dist/loop-36JR7RB2.js +90 -0
- package/dist/machine-DGMGTVD7.js +79 -0
- package/dist/{machine-skills-RP2Y5F32.js → machine-skills-G253FBPY.js} +4 -4
- package/dist/{mcp-install-cmd-IZYHXHXG.js → mcp-install-cmd-WLU64HPE.js} +4 -4
- package/dist/{mcp-serve-cmd-HAIJVRR7.js → mcp-serve-cmd-YJX7HUHL.js} +9 -9
- package/dist/{paths-6AMRSXZK.js → paths-5OXE4APD.js} +7 -7
- package/dist/pending-YC4KF2AW.js +18 -0
- package/dist/{pidfile-3BILBCEO.js → pidfile-ID52SG3L.js} +8 -8
- package/dist/{record-MV6WJGZT.js → record-XIM2Z2JO.js} +8 -8
- package/dist/{relay-CO5I2WOV.js → relay-T22SKZ3G.js} +5 -5
- package/dist/{relay-protocol-S2JGOYZZ.js → relay-protocol-64ZEAKJ4.js} +5 -5
- package/dist/runner-agents-AGFDPTJN.js +14 -0
- package/dist/runner-env-W7LASDJX.js +24 -0
- package/dist/{runner-identity-IVP2GW33.js → runner-identity-T7HDG3QU.js} +10 -10
- package/dist/{runner-key-VCWF2EN7.js → runner-key-RXTJDYTI.js} +46 -46
- package/dist/{session-sender-PWYFVWN6.js → session-sender-B6CSWAHX.js} +19 -19
- package/dist/{shell-function-FTY7SSAJ.js → shell-function-RBJR373S.js} +2 -2
- package/dist/{spec-cmd-2WKI4V2T.js → spec-cmd-HIQYYRBQ.js} +15 -15
- package/dist/{starter-pack-W6S3L76K.js → starter-pack-AK7Z6XLF.js} +5 -5
- package/dist/state-ZQN2O2PB.js +18 -0
- package/dist/{status-HHM6TH6J.js → status-YD7P337P.js} +46 -46
- package/dist/{statusline-fast-5G2CTPSX.js → statusline-fast-WUXKRABL.js} +3 -3
- package/dist/{sync-cmd-TIDWKW4E.js → sync-cmd-BRP4QE2W.js} +18 -18
- package/dist/update-steps-SBBEBOIJ.js +80 -0
- package/dist/{watch-IA6UDVSF.js → watch-B3NVFDVP.js} +18 -18
- package/dist/{work-claim-cmd-7TLC4DKU.js → work-claim-cmd-H6M5ANKL.js} +20 -20
- package/dist/{work-cmd-2LXE27RX.js → work-cmd-DJNV646Q.js} +14 -14
- package/dist/{work-comment-cmd-ER53OPLH.js → work-comment-cmd-6QZQPRJ7.js} +17 -17
- package/dist/{work-demo-cmd-CSXUA7KH.js → work-demo-cmd-6MZIVYHK.js} +14 -14
- package/dist/{work-logs-cmd-ECF7ZLHO.js → work-logs-cmd-IS4GV5VC.js} +14 -14
- package/dist/{work-open-pr-cmd-SUJEYZ6C.js → work-open-pr-cmd-KZSKJKEQ.js} +15 -15
- package/dist/{work-pr-cmd-FCNFYWUR.js → work-pr-cmd-ARVEEUF3.js} +14 -14
- package/dist/{work-proofs-cmd-UQU6SSFD.js → work-proofs-cmd-YUH3XYQE.js} +16 -16
- package/dist/{work-proofs-record-MKCYQLS2.js → work-proofs-record-BDYS2VU2.js} +24 -24
- package/dist/{work-stop-cmd-PBC7SJ7M.js → work-stop-cmd-U67OPSCS.js} +14 -14
- package/package.json +2 -2
- package/dist/caller-J7FR4VBJ.js +0 -23
- package/dist/find-unit-N3OJBFS5.js +0 -24
- package/dist/host-checks-PPTMNHRA.js +0 -79
- package/dist/host-key-QUBI74MS.js +0 -18
- package/dist/init-5ERGXSUD.js +0 -79
- package/dist/loop-HTKTSGBA.js +0 -90
- package/dist/machine-RBYGRRSM.js +0 -79
- package/dist/pending-C4XQUKWA.js +0 -18
- package/dist/runner-agents-FQ4FODZN.js +0 -14
- package/dist/runner-env-72OTIZV2.js +0 -24
- package/dist/state-C3FRODOO.js +0 -18
- package/dist/update-steps-WD25IX2R.js +0 -80
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { PROXY_WARNING_FLAG } from './chunk-
|
|
4
|
-
import { RELAY_ID, RELAY_USER } from './chunk-
|
|
5
|
-
import {
|
|
6
|
-
import { defaultAgents } from './chunk-
|
|
3
|
+
import { PROXY_WARNING_FLAG } from './chunk-UAVBSFHI.js';
|
|
4
|
+
import { RELAY_ID, RELAY_USER } from './chunk-6UXPXENL.js';
|
|
5
|
+
import { imageInstalls, GH_VERSION, VOICE_PACK_FILES, VOICE_PACK_VERSION, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, TINI_SHA256, TINI_VERSION, HEADLESS_SHELL_REVISION, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG_BASE_URL, PLAYWRIGHT_FFMPEG_REVISION, HEADLESS_SHELL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_VERSION } from './chunk-A5FIUS53.js';
|
|
6
|
+
import { defaultAgents } from './chunk-XJPTMZJG.js';
|
|
7
7
|
|
|
8
8
|
createRequire(import.meta.url);
|
|
9
9
|
|
|
@@ -46,13 +46,13 @@ function plain(name, value, allowed) {
|
|
|
46
46
|
function toolsDockerfile(parts, agents = defaultAgents()) {
|
|
47
47
|
const recipeImage = plain("the recipe image", parts.recipeImage, /^[A-Za-z0-9_.:@/-]+$/);
|
|
48
48
|
const nodeImage = plain("the Node image", parts.nodeImage, /^[A-Za-z0-9_.:@/-]+$/);
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
const
|
|
49
|
+
const wanted = parts.image !== void 0 ? [{ image: parts.image, name: parts.agentName ?? parts.image.command, version: parts.claudeCodeVersion }] : imageInstalls(agents, parts.claudeCodeVersion, parts.agentVersions).map(({ agent, image, version }) => ({ image, name: parts.agentName ?? agent.descriptor.label, version }));
|
|
50
|
+
const installs = wanted.map(({ image, name, version }) => ({ image, version: plain(`the ${name} version`, version, /^[A-Za-z0-9.+-]+$/) }));
|
|
51
|
+
if (installs.length === 0) plain(`the ${parts.agentName ?? "agent"} version`, parts.claudeCodeVersion, /^[A-Za-z0-9.+-]+$/);
|
|
52
|
+
const images = installs.map((install) => install.image);
|
|
53
53
|
const buildId = plain("the build id", parts.buildId, /^[A-Za-z0-9_.:+-]+$/);
|
|
54
|
-
const tools = JSON.stringify({ outerlayerBuildId: buildId, ...image
|
|
55
|
-
const files = (image
|
|
54
|
+
const tools = JSON.stringify({ outerlayerBuildId: buildId, ...Object.fromEntries(installs.map(({ image, version }) => [image.versionKey, version])), ghVersion: GH_VERSION });
|
|
55
|
+
const files = images.flatMap((image) => image.files).map((file) => ({ path: file.path, text: plain(`the text of ${file.path}`, file.text, /^[^\n']*$/) }));
|
|
56
56
|
const folders = [...new Set(files.map((file) => file.path.slice(0, file.path.lastIndexOf("/"))))];
|
|
57
57
|
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)))'`;
|
|
58
58
|
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]))})'`;
|
|
@@ -99,7 +99,7 @@ function toolsDockerfile(parts, agents = defaultAgents()) {
|
|
|
99
99
|
`FROM ${recipeImage} AS recipe`,
|
|
100
100
|
`FROM ${nodeImage} AS stage`,
|
|
101
101
|
"ARG TARGETARCH",
|
|
102
|
-
...image
|
|
102
|
+
...installs.flatMap(({ image, version }) => image.install(version)),
|
|
103
103
|
"COPY dist /out/opt/outerlayer/cli/dist",
|
|
104
104
|
"COPY package.json /out/opt/outerlayer/cli/package.json",
|
|
105
105
|
// `outerlayer demo record` runs a demo on the Playwright release this CLI depends on, found beside the CLI as an npm
|
|
@@ -113,10 +113,10 @@ function toolsDockerfile(parts, agents = defaultAgents()) {
|
|
|
113
113
|
`RUN mkdir -p /out/opt/outerlayer/bin /out/usr/local/bin ${[...folders.map((folder) => `/out${folder}`), "/out/build"].join(" ")} \\`,
|
|
114
114
|
" && cp /usr/local/bin/node /out/opt/outerlayer/bin/node \\",
|
|
115
115
|
` && printf '%s\\n' '#!/bin/sh' 'exec /opt/outerlayer/bin/node /opt/outerlayer/cli/dist/index.js "$@"' > /out/usr/local/bin/outerlayer \\`,
|
|
116
|
-
...image
|
|
116
|
+
...images.map((image) => ` && printf '%s\\n' ${agentWrapperScript(image.program).trimEnd().split("\n").map((line) => `'${line}'`).join(" ")} > /out/usr/local/bin/${image.command} \\`),
|
|
117
117
|
` && printf '%s\\n' '${tools}' > /out/opt/outerlayer/tools.json \\`,
|
|
118
118
|
...files.map((file) => ` && printf '%s\\n' '${file.text}' > /out${file.path} \\`),
|
|
119
|
-
` && chmod 0755 /out/usr/local/bin/outerlayer${image
|
|
119
|
+
` && chmod 0755 /out/usr/local/bin/outerlayer${images.map((image) => ` /out/usr/local/bin/${image.command}`).join("")} \\`,
|
|
120
120
|
// Every build, whatever user runs it, writes here: the first mount of an empty volume copies this mode.
|
|
121
121
|
" && chmod 1777 /out/build",
|
|
122
122
|
...parts.guestHelper === true ? [
|
|
@@ -163,13 +163,13 @@ function toolsDockerfile(parts, agents = defaultAgents()) {
|
|
|
163
163
|
"COPY --from=media /out/ /",
|
|
164
164
|
"COPY --from=browser /out/ /",
|
|
165
165
|
"COPY --from=git /out/ /",
|
|
166
|
-
...Object.entries(image
|
|
166
|
+
...images.flatMap((image) => Object.entries(image.env)).map(([name, value]) => `ENV ${name}=${value}`),
|
|
167
167
|
// Last, so a recipe's own git comes first. A recipe image that sets no PATH gets the one Docker gives a container.
|
|
168
168
|
`ENV PATH=\${PATH:-/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin}:${FALLBACK_BIN}`,
|
|
169
169
|
// 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.
|
|
170
170
|
// 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.
|
|
171
171
|
"RUN check=$(mktemp -d /tmp/ol-check.XXXXXX) \\",
|
|
172
|
-
` && outerlayer --version${image
|
|
172
|
+
` && outerlayer --version${images.map((image) => ` && ${image.command} --version`).join("")} && gh --version && ffmpeg -version && ffprobe -version \\`,
|
|
173
173
|
' && XDG_RUNTIME_DIR="$check" espeak-ng --version \\',
|
|
174
174
|
` && git --version && ${FALLBACK_BIN}/git --version \\`,
|
|
175
175
|
` && ${IMAGE_BROWSER.playwright}/chromium_headless_shell-${HEADLESS_SHELL_REVISION}/chrome-headless-shell-linux*/chrome-headless-shell --version \\`,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
3
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-G74ZB2V4.js';
|
|
4
4
|
import { readFileSync, mkdirSync, writeFileSync, renameSync } from 'fs';
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { placeholderQueues, placeholderProblem } from './chunk-
|
|
4
|
-
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-
|
|
5
|
-
import { getJson, WorkCommandError } from './chunk-
|
|
6
|
-
import { isBuiltinVm, builtinKind, EGRESS_SWITCHABLE_KEYS, imageBuildOf, keepsHostBuilder } from './chunk-
|
|
7
|
-
import { realBuildDiskProbe, checkDiskFit, DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-
|
|
8
|
-
import { ensureHostKey } from './chunk-
|
|
9
|
-
import { BUILD_SLICE_MEMORY_ENV, agentCredentialVariablesSet, agentCredential, parseRunnerEnv } from './chunk-
|
|
10
|
-
import { forwardedVariables, credentialAgent, credentialForms, managedKeyName, builderDiskPinned, storeVariables, credentialEnvPath } from './chunk-
|
|
11
|
-
import { defaultAgents } from './chunk-
|
|
3
|
+
import { placeholderQueues, placeholderProblem } from './chunk-AUQPAVRV.js';
|
|
4
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-P64TL3GV.js';
|
|
5
|
+
import { getJson, WorkCommandError } from './chunk-O4CWZFC4.js';
|
|
6
|
+
import { isBuiltinVm, builtinKind, EGRESS_SWITCHABLE_KEYS, imageBuildOf, keepsHostBuilder } from './chunk-KEY5IDTC.js';
|
|
7
|
+
import { realBuildDiskProbe, checkDiskFit, DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-6S4THFJO.js';
|
|
8
|
+
import { ensureHostKey } from './chunk-ZOLDM52Z.js';
|
|
9
|
+
import { BUILD_SLICE_MEMORY_ENV, agentCredentialVariablesSet, agentCredential, parseRunnerEnv } from './chunk-6UXPXENL.js';
|
|
10
|
+
import { forwardedVariables, credentialAgent, credentialForms, managedKeyName, builderDiskPinned, storeVariables, credentialEnvPath } from './chunk-A5FIUS53.js';
|
|
11
|
+
import { defaultAgents } from './chunk-XJPTMZJG.js';
|
|
12
12
|
import { closeSync, openSync, constants, readFileSync } from 'fs';
|
|
13
13
|
import { join, dirname } from 'path';
|
|
14
14
|
import { totalmem } from 'os';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { runEmit } from './chunk-
|
|
4
|
-
import { addStdioMcpEntryIfAbsent, addDocsMcpEntryIfAbsent, DOCS_MCP_SERVER_NAME } from './chunk-
|
|
5
|
-
import { installStarterPack } from './chunk-
|
|
6
|
-
import { listWithAnd } from './chunk-
|
|
7
|
-
import { AGENTS_MD_LAYOUT, mcpFiles, declareAgentsMdLayout, linkAgentSkills, describeSkillsLink, isAgentsMdLayout, holdsTodaysLayoutSources, discoverOuterlayerPaths } from './chunk-
|
|
3
|
+
import { runEmit } from './chunk-FIXRXONQ.js';
|
|
4
|
+
import { addStdioMcpEntryIfAbsent, addDocsMcpEntryIfAbsent, DOCS_MCP_SERVER_NAME } from './chunk-PWCP3YVA.js';
|
|
5
|
+
import { installStarterPack } from './chunk-SZN3CSEP.js';
|
|
6
|
+
import { listWithAnd } from './chunk-BM25MMUE.js';
|
|
7
|
+
import { AGENTS_MD_LAYOUT, mcpFiles, declareAgentsMdLayout, linkAgentSkills, describeSkillsLink, isAgentsMdLayout, holdsTodaysLayoutSources, discoverOuterlayerPaths } from './chunk-HV44EL6A.js';
|
|
8
8
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
9
|
-
import { resolveGitCommonDir, defaultGitRunner } from './chunk-
|
|
9
|
+
import { resolveGitCommonDir, defaultGitRunner } from './chunk-ID3HBQYZ.js';
|
|
10
10
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
11
|
-
import { linkedAgentsPath } from './chunk-
|
|
11
|
+
import { linkedAgentsPath } from './chunk-P26TVBYV.js';
|
|
12
12
|
import { cloneIsGoverned } from './chunk-YQR6E6OV.js';
|
|
13
|
-
import { generatedHeaderSource, defaultAgents, loadTemplateFiles, loadMaintainedFiles, skillDir, AGENTS_SKILLS_BASE, legacyAgent, laptopAgents } from './chunk-
|
|
14
|
-
import { LEGACY_AGENT } from './chunk-
|
|
13
|
+
import { generatedHeaderSource, defaultAgents, loadTemplateFiles, loadMaintainedFiles, skillDir, AGENTS_SKILLS_BASE, legacyAgent, laptopAgents } from './chunk-XJPTMZJG.js';
|
|
14
|
+
import { LEGACY_AGENT } from './chunk-7PZDPISM.js';
|
|
15
15
|
import { execFileSync } from 'child_process';
|
|
16
16
|
import { existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
17
17
|
import { join, dirname } from 'path';
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { checkStarterFiles, contextIsGoverned } from './chunk-
|
|
4
|
-
import { resolveCredentials, getJson, WorkCommandError } from './chunk-
|
|
5
|
-
import { fleetCheck, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences, checkIgnoredSkillFolders } from './chunk-
|
|
6
|
-
import { withInjectedPrograms } from './chunk-
|
|
7
|
-
import { isLinkedRepository } from './chunk-
|
|
3
|
+
import { checkStarterFiles, contextIsGoverned } from './chunk-ZFZ62TU4.js';
|
|
4
|
+
import { resolveCredentials, getJson, WorkCommandError } from './chunk-O4CWZFC4.js';
|
|
5
|
+
import { fleetCheck, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences, checkIgnoredSkillFolders } from './chunk-GEC2G3SJ.js';
|
|
6
|
+
import { withInjectedPrograms } from './chunk-AGDRXJSZ.js';
|
|
7
|
+
import { isLinkedRepository } from './chunk-BM25MMUE.js';
|
|
8
8
|
import { sanitizeTerminal } from './chunk-VVZIFOAN.js';
|
|
9
9
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
10
|
-
import { checkFormerSkillNames } from './chunk-
|
|
11
|
-
import { resolveGatewayCredentials, defaultFetch } from './chunk-
|
|
12
|
-
import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-
|
|
13
|
-
import { CONTROL_PLANE_DIR_VARIABLE } from './chunk-
|
|
10
|
+
import { checkFormerSkillNames } from './chunk-365EXSFH.js';
|
|
11
|
+
import { resolveGatewayCredentials, defaultFetch } from './chunk-SZKBH2BO.js';
|
|
12
|
+
import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-DDBCRY3Y.js';
|
|
13
|
+
import { CONTROL_PLANE_DIR_VARIABLE } from './chunk-SF2TBJBP.js';
|
|
14
14
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
15
|
-
import { readStatuslineState, STATE_FRESH_MS } from './chunk-
|
|
15
|
+
import { readStatuslineState, STATE_FRESH_MS } from './chunk-M53UNEO6.js';
|
|
16
16
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
17
|
-
import { installAgents, withSettingsText } from './chunk-
|
|
17
|
+
import { installAgents, withSettingsText } from './chunk-44332APJ.js';
|
|
18
18
|
import { cliForInstall, cliBinResolvable } from './chunk-ZHQC43NH.js';
|
|
19
19
|
import { readDeliveryRecord, readDegraded, readSourceCache } from './chunk-YQR6E6OV.js';
|
|
20
20
|
import { deadHooksState, preparePackageManagerCommand } from './chunk-CJPTUU2E.js';
|
|
21
|
-
import { defaultAgents, legacyAgent, contextAgents } from './chunk-
|
|
21
|
+
import { defaultAgents, legacyAgent, contextAgents } from './chunk-XJPTMZJG.js';
|
|
22
22
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
23
23
|
import { SUPPORTED_VERSIONS, resolveRepoIdentity } from './chunk-QAFR65VC.js';
|
|
24
24
|
import { readFileSync, mkdirSync, writeFileSync, renameSync, existsSync, accessSync, constants, statSync } from 'fs';
|
|
@@ -1050,8 +1050,8 @@ function doctorExitCode(checks) {
|
|
|
1050
1050
|
|
|
1051
1051
|
// src/doctor-report.ts
|
|
1052
1052
|
async function gatherDoctorChecks() {
|
|
1053
|
-
const { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK } = await import('./build-disk-
|
|
1054
|
-
const { defaultRunnerConfigPath, hasRunnerBlock, keyRunnerFactory, loadRunnerConfig, runnerVmOf } = await import('./config-
|
|
1053
|
+
const { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK } = await import('./build-disk-PN7QBYVR.js');
|
|
1054
|
+
const { defaultRunnerConfigPath, hasRunnerBlock, keyRunnerFactory, loadRunnerConfig, runnerVmOf } = await import('./config-6LQKXZNE.js');
|
|
1055
1055
|
const configPath = defaultRunnerConfigPath();
|
|
1056
1056
|
const runnerHost = hasRunnerBlock(configPath);
|
|
1057
1057
|
const hooks = (() => {
|
|
@@ -1079,7 +1079,7 @@ async function gatherDoctorChecks() {
|
|
|
1079
1079
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1080
1080
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1081
1081
|
} else if (hasRunnerBlock(configPath)) {
|
|
1082
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1082
|
+
const { runnerHostChecks } = await import('./doctor-UUCRZ7JO.js');
|
|
1083
1083
|
const gateway = (() => {
|
|
1084
1084
|
try {
|
|
1085
1085
|
const loaded = loadRunnerConfig(configPath);
|
|
@@ -1107,7 +1107,7 @@ async function gatherDoctorChecks() {
|
|
|
1107
1107
|
const service = await (async () => {
|
|
1108
1108
|
const { existsSync: existsSync3 } = await import('fs');
|
|
1109
1109
|
if (process.platform !== "linux" || !existsSync3("/run/systemd/system")) return void 0;
|
|
1110
|
-
const { inspectRunnerService } = await import('./find-unit-
|
|
1110
|
+
const { inspectRunnerService } = await import('./find-unit-527IGJNL.js');
|
|
1111
1111
|
return inspectRunnerService(configPath);
|
|
1112
1112
|
})();
|
|
1113
1113
|
checks.push(...await runnerHostChecks({ configPath, hooks, gateway, repos, runner, service }));
|
|
@@ -63,9 +63,61 @@ var CLAUDE_CODE = {
|
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
+
// ../agents/src/opencode/descriptor.ts
|
|
67
|
+
var OPENCODE = {
|
|
68
|
+
id: "opencode",
|
|
69
|
+
label: "OpenCode",
|
|
70
|
+
color: "#211E1E",
|
|
71
|
+
program: "opencode",
|
|
72
|
+
versions: { minimum: "2.2.5", tested: { from: "2.2.5", to: "2.2.5" } },
|
|
73
|
+
providers: ["anthropic"],
|
|
74
|
+
credentials: {
|
|
75
|
+
label: "OpenCode",
|
|
76
|
+
setupCommand: "",
|
|
77
|
+
forwarded: ["ANTHROPIC_API_KEY"],
|
|
78
|
+
stripped: ["ANTHROPIC_API_KEY"],
|
|
79
|
+
placeholders: {
|
|
80
|
+
ANTHROPIC_API_KEY: "sk-ant-api03-placeholder-not-a-real-key"
|
|
81
|
+
},
|
|
82
|
+
kinds: {
|
|
83
|
+
ANTHROPIC_API_KEY: { pattern: "^sk-ant-api[0-9]*-[A-Za-z0-9_-]+$", provider: "anthropic", providerKind: "api-key", starts: "sk-ant-api" }
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
// OpenCode keeps sessions in a database, so the capture part's `collect` writes each one as a JSON export in this folder.
|
|
87
|
+
capture: { sessionFolder: "~/.outerlayer/agent-sessions/opencode" },
|
|
88
|
+
context: {
|
|
89
|
+
// OpenCode reads `AGENTS.md`, which the control plane shares with other agents.
|
|
90
|
+
instructionFiles: [],
|
|
91
|
+
repoSkillFolders: [".claude/skills"],
|
|
92
|
+
userSkillFolder: "~/.config/opencode/skills",
|
|
93
|
+
attach: "replaces-user-config",
|
|
94
|
+
native: []
|
|
95
|
+
},
|
|
96
|
+
capabilities: {
|
|
97
|
+
sessionId: "generated",
|
|
98
|
+
resume: false,
|
|
99
|
+
fork: false,
|
|
100
|
+
subagents: { spawnTools: [], transcript: "inline" },
|
|
101
|
+
cost: "events",
|
|
102
|
+
longCommands: "blocking",
|
|
103
|
+
// `--auto` takes the place of permission modes.
|
|
104
|
+
permission: {},
|
|
105
|
+
structuredOutput: false,
|
|
106
|
+
mcp: true,
|
|
107
|
+
judge: false
|
|
108
|
+
},
|
|
109
|
+
hooks: {
|
|
110
|
+
contextCap: 0,
|
|
111
|
+
timeoutCeilingMs: 1e4,
|
|
112
|
+
// OpenCode has no event before a tool runs, so no event maps to `pre_tool_use`.
|
|
113
|
+
spans: { "session.tool.success": "post_tool_use", "session.execution.succeeded": "stop" }
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
66
117
|
// ../agents/src/native/agents.ts
|
|
67
118
|
var NATIVE_AGENTS = {
|
|
68
|
-
"claude-code": CLAUDE_CODE
|
|
119
|
+
"claude-code": CLAUDE_CODE,
|
|
120
|
+
opencode: OPENCODE
|
|
69
121
|
};
|
|
70
122
|
var LEGACY_AGENT = "claude-code";
|
|
71
123
|
|
|
@@ -89,4 +141,4 @@ function homeRelative(folder) {
|
|
|
89
141
|
return folder.replace(/^~\//, "");
|
|
90
142
|
}
|
|
91
143
|
|
|
92
|
-
export { CLAUDE_CODE, LEGACY_AGENT, NATIVE_AGENTS, PROVIDERS, homeRelative };
|
|
144
|
+
export { CLAUDE_CODE, LEGACY_AGENT, NATIVE_AGENTS, OPENCODE, PROVIDERS, homeRelative };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { defaultAgents, agentById } from './chunk-
|
|
4
|
-
import {
|
|
3
|
+
import { defaultAgents, agentById } from './chunk-XJPTMZJG.js';
|
|
4
|
+
import { PROVIDERS, LEGACY_AGENT } from './chunk-7PZDPISM.js';
|
|
5
5
|
import { join, dirname } from 'path';
|
|
6
6
|
|
|
7
7
|
createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// src/runner/image/pins.ts
|
|
10
10
|
var CLAUDE_CODE_VERSION = "2.1.284";
|
|
11
|
+
var OPENCODE_VERSION = "2.2.5";
|
|
11
12
|
var DEFAULT_BASE_IMAGE = "ubuntu:24.04@sha256:008173c23f95b170204355c12626cb5a965d779a7e1283b09e9cffbb1bf33ca3";
|
|
12
13
|
var NODE_IMAGE = "node:22-bookworm-slim@sha256:43ac6c60b8f89723f746e8a92ce91abd5017e627ce1ddfe4238355d3a30b772c";
|
|
13
14
|
var BUILDKIT_IMAGE = "moby/buildkit:v0.33.1@sha256:cec9f139f45e93c5c69c60f8b07cfad9f43f4ef6b6a6cd917527fea5ff2e3dea";
|
|
@@ -146,7 +147,7 @@ function universalImagePinned(digest = UNIVERSAL_IMAGE_DIGEST) {
|
|
|
146
147
|
}
|
|
147
148
|
|
|
148
149
|
// src/runner/runner-agents.ts
|
|
149
|
-
var AGENT_PINS = { [LEGACY_AGENT]: CLAUDE_CODE_VERSION };
|
|
150
|
+
var AGENT_PINS = { [LEGACY_AGENT]: CLAUDE_CODE_VERSION, opencode: OPENCODE_VERSION };
|
|
150
151
|
function runnerAgents(agents = defaultAgents()) {
|
|
151
152
|
return agents.flatMap((agent) => agent.adapter.credentials === void 0 ? [] : [{ descriptor: agent.descriptor, adapter: agent.adapter, credentials: agent.adapter.credentials }]);
|
|
152
153
|
}
|
|
@@ -156,10 +157,18 @@ function credentialAgent(agents = defaultAgents()) {
|
|
|
156
157
|
function buildAgent(agents = defaultAgents()) {
|
|
157
158
|
return agentById(LEGACY_AGENT, agents);
|
|
158
159
|
}
|
|
159
|
-
function
|
|
160
|
-
|
|
160
|
+
function programOf(command) {
|
|
161
|
+
const word = command.trim().split(/\s+/).find((candidate) => !/^[A-Za-z_][A-Za-z0-9_]*=/.test(candidate));
|
|
162
|
+
return word?.replace(/^["']|["']$/g, "").split("/").pop();
|
|
163
|
+
}
|
|
164
|
+
function agentIdOfCommand(command, agents = defaultAgents()) {
|
|
165
|
+
const program = command === void 0 ? void 0 : programOf(command);
|
|
166
|
+
return program === void 0 ? void 0 : agents.find((agent) => agent.descriptor.program === program)?.descriptor.id;
|
|
167
|
+
}
|
|
168
|
+
function jobAgent(job, agents = defaultAgents()) {
|
|
169
|
+
const id = job?.agent ?? agentIdOfCommand(job?.command, agents);
|
|
170
|
+
return (id === void 0 ? void 0 : agentById(id, agents)) ?? buildAgent(agents);
|
|
161
171
|
}
|
|
162
|
-
var JOB_AGENT_ID = LEGACY_AGENT;
|
|
163
172
|
function headlessAgents(agents = defaultAgents()) {
|
|
164
173
|
return agents.flatMap((agent) => agent.adapter.headless === void 0 ? [] : [{ descriptor: agent.descriptor, adapter: agent.adapter, headless: agent.adapter.headless }]);
|
|
165
174
|
}
|
|
@@ -174,10 +183,10 @@ function agentCommands(name, agents = defaultAgents()) {
|
|
|
174
183
|
return found === void 0 ? void 0 : { implement: found.headless.commandLine(queuePrompt("implement"), "implement"), amend: found.headless.commandLine(queuePrompt("amend"), "amend") };
|
|
175
184
|
}
|
|
176
185
|
function defaultCommandLine(queue, agents = defaultAgents()) {
|
|
177
|
-
return
|
|
186
|
+
return buildAgent(agents)?.adapter.headless?.commandLine(queuePrompt(queue), queue);
|
|
178
187
|
}
|
|
179
|
-
function jobCommandEnv(sessionEnv, agents = defaultAgents()) {
|
|
180
|
-
return { ...jobAgent(
|
|
188
|
+
function jobCommandEnv(sessionEnv, agents = defaultAgents(), job) {
|
|
189
|
+
return { ...jobAgent(job, agents)?.adapter.headless?.jobEnv, OUTERLAYER_UNATTENDED: "1", ...sessionEnv };
|
|
181
190
|
}
|
|
182
191
|
function runnerNameOf(descriptor) {
|
|
183
192
|
return descriptor.legacy?.runnerName ?? descriptor.id;
|
|
@@ -209,9 +218,10 @@ function storeVariables(forms) {
|
|
|
209
218
|
const [first, ...rest] = forms.variables;
|
|
210
219
|
return [`${first} (from \`${forms.setupCommand}\`)`, ...rest].join(" or ");
|
|
211
220
|
}
|
|
212
|
-
function credentialForms(descriptor) {
|
|
221
|
+
function credentialForms(descriptor, agents = defaultAgents()) {
|
|
213
222
|
const { label, setupCommand, forwarded } = descriptor.credentials;
|
|
214
|
-
|
|
223
|
+
const owner = runnerAgents(agents).find((agent) => agent.descriptor.credentials.forwarded.some((variable) => forwarded.includes(variable)))?.descriptor ?? descriptor;
|
|
224
|
+
return { label, possessive: `${label}'s`, checkName: `${runnerNameOf(descriptor)} credential`, setupCommand, variables: forwarded, runnerName: runnerNameOf(descriptor), envFile: credentialNames(owner).envFile };
|
|
215
225
|
}
|
|
216
226
|
function credentialShapes(descriptor, providers = PROVIDERS) {
|
|
217
227
|
const { setupCommand, forwarded, kinds } = descriptor.credentials;
|
|
@@ -219,7 +229,7 @@ function credentialShapes(descriptor, providers = PROVIDERS) {
|
|
|
219
229
|
const kind = kinds[variable];
|
|
220
230
|
const provider = providers[kind.provider];
|
|
221
231
|
const name = `${provider?.label ?? kind.provider} ${provider?.credentialKinds.find((candidate) => candidate.id === kind.providerKind)?.label ?? kind.providerKind}`;
|
|
222
|
-
return { phrase: index === 0 ? `a token from \`${setupCommand}\`` : `${/^[AEIOU]/i.test(name) ? "an" : "a"} ${name}`, starts: kind.starts };
|
|
232
|
+
return { phrase: index === 0 && setupCommand !== "" ? `a token from \`${setupCommand}\`` : `${/^[AEIOU]/i.test(name) ? "an" : "a"} ${name}`, starts: kind.starts };
|
|
223
233
|
});
|
|
224
234
|
}
|
|
225
235
|
function orList(items) {
|
|
@@ -238,15 +248,28 @@ function providersOf(agents = defaultAgents(), providers = PROVIDERS) {
|
|
|
238
248
|
function buildAgentPin(agents = defaultAgents()) {
|
|
239
249
|
return AGENT_PINS[buildAgent(agents)?.descriptor.id ?? LEGACY_AGENT];
|
|
240
250
|
}
|
|
241
|
-
function
|
|
242
|
-
|
|
251
|
+
function judgeAgent(agents = defaultAgents()) {
|
|
252
|
+
return buildAgent(agents);
|
|
253
|
+
}
|
|
254
|
+
function imageInstalls(agents = defaultAgents(), buildVersion, versions = {}) {
|
|
255
|
+
const build = buildAgent(agents);
|
|
256
|
+
return agents.flatMap((agent) => {
|
|
257
|
+
const version = agent === build && buildVersion !== void 0 ? buildVersion : versions[agent.descriptor.id] ?? AGENT_PINS[agent.descriptor.id];
|
|
258
|
+
return agent.adapter.image === void 0 || version === void 0 ? [] : [{ agent, image: agent.adapter.image, version }];
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
function imageAgentPins(agents = defaultAgents(), buildVersion) {
|
|
262
|
+
return imageInstalls(agents, buildVersion).map(({ agent, version }) => ({ id: agent.descriptor.id, version }));
|
|
263
|
+
}
|
|
264
|
+
function agentVersionOf(toolsJson, agents = defaultAgents(), job) {
|
|
265
|
+
const agent = jobAgent(job, agents);
|
|
243
266
|
try {
|
|
244
267
|
const key = agent?.adapter.image?.versionKey;
|
|
245
268
|
const version = key === void 0 ? void 0 : JSON.parse(toolsJson)[key];
|
|
246
269
|
if (typeof version === "string" && version !== "") return version;
|
|
247
270
|
} catch {
|
|
248
271
|
}
|
|
249
|
-
return buildAgentPin(agents);
|
|
272
|
+
return AGENT_PINS[agent?.descriptor.id ?? LEGACY_AGENT] ?? buildAgentPin(agents);
|
|
250
273
|
}
|
|
251
274
|
|
|
252
|
-
export { AGENT_PINS, BUILDER_DISK_BASE_URL, BUILDER_DISK_SHA256, BUILDER_DISK_VERSION, BUILDKIT_IMAGE, DEFAULT_BASE_IMAGE, FFMPEG_BUILD_TAG, FFMPEG_STATIC, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, FIRECRACKER_VERSION, GH_SHA256, GH_VERSION, GUEST_ASSETS_BASE_URL, GUEST_ASSETS_VERSION, GUEST_HELPER_SHA256, GUEST_KERNEL_SHA256, HEADLESS_SHELL, HEADLESS_SHELL_BASE_URL, HEADLESS_SHELL_REVISION, HOST_HELPER_ASSETS_VERSION, HOST_HELPER_BASE_URL, HOST_HELPER_SHA256, HOST_HELPER_SLICE_SINCE, JAILER_BINARY_SHA256,
|
|
275
|
+
export { AGENT_PINS, BUILDER_DISK_BASE_URL, BUILDER_DISK_SHA256, BUILDER_DISK_VERSION, BUILDKIT_IMAGE, DEFAULT_BASE_IMAGE, FFMPEG_BUILD_TAG, FFMPEG_STATIC, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, FIRECRACKER_VERSION, GH_SHA256, GH_VERSION, GUEST_ASSETS_BASE_URL, GUEST_ASSETS_VERSION, GUEST_HELPER_SHA256, GUEST_KERNEL_SHA256, HEADLESS_SHELL, HEADLESS_SHELL_BASE_URL, HEADLESS_SHELL_REVISION, HOST_HELPER_ASSETS_VERSION, HOST_HELPER_BASE_URL, HOST_HELPER_SHA256, HOST_HELPER_SLICE_SINCE, JAILER_BINARY_SHA256, MANAGED_KIND, MEDIA_PINS, MICROVM_ARCHES, NETWORK_HELPER_SHA256, NODE_IMAGE, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_FFMPEG_BASE_URL, PLAYWRIGHT_FFMPEG_REVISION, PLAYWRIGHT_VERSION, TINI_SHA256, TINI_VERSION, UNIVERSAL_IMAGE, UNIVERSAL_IMAGE_DIGEST, UNIVERSAL_IMAGE_REPOSITORY, UNIVERSAL_IMAGE_SOURCE, VOICE_PACK_FILES, VOICE_PACK_VERSION, agentCommands, agentVersionOf, buildAgent, buildAgentPin, builderDiskPinned, credentialAgent, credentialEnvPath, credentialForms, credentialHandOffKey, credentialNames, credentialShapes, defaultCommandLine, firecrackerArch, forwardedVariables, guestAssetsPinned, headlessNames, hostHelperPinned, hostHelperSupportsSlice, imageAgentPins, imageInstalls, jobAgent, jobCommandEnv, judgeAgent, managedKeyName, networkHelperPinned, orList, providersOf, runnerAgentNamed, runnerAgents, storeVariables, strippedVariables, universalImagePinned };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { legacyAgent, createNodeAgentIO, ADAPTER_FACTORIES } from './chunk-
|
|
3
|
+
import { legacyAgent, createNodeAgentIO, ADAPTER_FACTORIES } from './chunk-XJPTMZJG.js';
|
|
4
4
|
|
|
5
5
|
createRequire(import.meta.url);
|
|
6
6
|
|