@outerlayer/cli 0.34.0-next.20261026232906 → 0.34.0-next.20261027023105
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/README.md +4 -3
- package/dist/{build-M4UYZAFH.js → build-FS7TQEJ6.js} +4 -3
- package/dist/{build-disk-ZDVSSHO2.js → build-disk-RZ7AZKTY.js} +3 -3
- package/dist/build-info.json +1 -1
- package/dist/{builder-IORYS76D.js → builder-MQIL24HI.js} +2 -2
- package/dist/{check-V66LZDNK.js → check-YIUZ3UX3.js} +15 -14
- package/dist/{chunk-T7HUNNJ2.js → chunk-36U7LY7C.js} +3 -3
- package/dist/{chunk-MIRCFK4X.js → chunk-7PCA37ZS.js} +1 -1
- package/dist/{chunk-TLIZ7FY4.js → chunk-7QF2EXAN.js} +2 -2
- package/dist/{chunk-6NXBXWOP.js → chunk-BLSEHKZ4.js} +1 -1
- package/dist/{chunk-Q3L5AC75.js → chunk-DEJCZ43H.js} +3 -3
- package/dist/{chunk-TGBST2QL.js → chunk-DX4FF5P5.js} +6 -6
- package/dist/{chunk-JZLMFYFM.js → chunk-FQGC22IP.js} +1 -1
- package/dist/{chunk-KOZ6IBEI.js → chunk-GR7ZVGNI.js} +1 -1
- package/dist/chunk-GTBY7BTI.js +301 -0
- package/dist/{chunk-XDJ376OP.js → chunk-IYQPUGST.js} +5 -169
- package/dist/{chunk-F5H3LVHR.js → chunk-JL4GSPGD.js} +2 -2
- package/dist/{chunk-DFBY6LX3.js → chunk-LKTH7PUH.js} +10 -7
- package/dist/{chunk-63A6NUEZ.js → chunk-Q2KGDDUX.js} +1 -1
- package/dist/{chunk-4UPET3R7.js → chunk-QUOITPN7.js} +21 -2
- package/dist/{chunk-T6HSNQAT.js → chunk-SSRB5HEL.js} +4 -4
- package/dist/{chunk-IZVDQXTC.js → chunk-UWDFA6WW.js} +9 -9
- package/dist/{chunk-PN7RMFPP.js → chunk-WPDL7MBC.js} +2 -2
- package/dist/{chunk-XLJXO4QC.js → chunk-ZK3A4W3I.js} +5 -5
- package/dist/{cli-HQWQEHXJ.js → cli-MP5AUR36.js} +45 -45
- package/dist/{command-TONUMZ2A.js → command-RGBJLW72.js} +9 -8
- package/dist/{config-4K6OG2SZ.js → config-NGCQD6SN.js} +4 -4
- package/dist/{container-start-R74IO7CI.js → container-start-KT2KKAQX.js} +12 -11
- package/dist/{demo-record-cmd-7HJ5C7KM.js → demo-record-cmd-BUNOOCNM.js} +10 -1
- package/dist/{demo-voice-cmd-MBK3BGHZ.js → demo-voice-cmd-RWTRJUAX.js} +2 -2
- package/dist/{docker-XWQM4F7B.js → docker-TRGA5QRL.js} +2 -2
- package/dist/{doctor-SF4GAWAO.js → doctor-NEO7NXJJ.js} +10 -9
- package/dist/{emit-demo-cmd-6VTA5BSJ.js → emit-demo-cmd-QMRDQGB6.js} +2 -2
- package/dist/{find-unit-I4GWKY4T.js → find-unit-IOCVYPNW.js} +6 -6
- package/dist/{host-checks-FKLQST3J.js → host-checks-JH2ILNZT.js} +10 -9
- package/dist/index.js +1 -1
- package/dist/{init-3MO5WCU3.js → init-HGJQW2NL.js} +9 -8
- package/dist/{init-TDLUTI6F.js → init-WGVNY4NP.js} +9 -8
- package/dist/{init-cmd-MQ5R35O2.js → init-cmd-L2SG2WSN.js} +1 -1
- package/dist/{loop-NNNDBFAS.js → loop-F6E6PGWG.js} +14 -13
- package/dist/{machine-GCW2GGI2.js → machine-GYTMJSIY.js} +9 -8
- package/dist/{runner-env-LVVLUHY2.js → runner-env-DH7YA4BU.js} +6 -6
- package/dist/{runner-identity-73F2IWBT.js → runner-identity-GLL56XY7.js} +2 -2
- package/dist/{runner-key-ASPZ7TQH.js → runner-key-HMXSBRBE.js} +9 -8
- package/dist/{status-35Z3TW42.js → status-QNKTP6OU.js} +10 -9
- package/dist/{update-steps-ZTNIK7LA.js → update-steps-M2UKG4QZ.js} +11 -10
- package/dist/{work-claim-cmd-QPYCZUMI.js → work-claim-cmd-JF5GGDFZ.js} +4 -4
- package/dist/{work-proofs-cmd-56EY7O45.js → work-proofs-cmd-A7SZSM2A.js} +1 -1
- package/dist/{work-proofs-record-SPGI47OS.js → work-proofs-record-YG6HD6SJ.js} +3 -3
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { defaultDockerfile, toolsDockerfile } from './chunk-GTBY7BTI.js';
|
|
4
|
+
import { runnerLabelValue } from './chunk-GR7ZVGNI.js';
|
|
5
5
|
import { RecipeError, locateRecipe, readRecipe, assertBuildable, writeSanitizedRecipe, classifyProperties, SANITIZED_NAME } from './chunk-HDLON3RJ.js';
|
|
6
|
+
import { CLAUDE_CODE_VERSION, NODE_IMAGE, DEFAULT_BASE_IMAGE, MEDIA_PINS, TINI_VERSION, GH_VERSION } from './chunk-QUOITPN7.js';
|
|
6
7
|
import { claimPidFile, RunnerAlreadyRunningError, releasePidFile } from './chunk-LQHCNXPK.js';
|
|
7
8
|
import { startTimeOf } from './chunk-JBJTC3UU.js';
|
|
8
9
|
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, repoCacheDir, imagesDir, imageBuildLogsDir, attemptStamp, runnerDir, rootfsPathFor } from './chunk-GJ4KBHBD.js';
|
|
9
|
-
import {
|
|
10
|
-
import { RELAY_ID, RELAY_USER } from './chunk-MESOOLF4.js';
|
|
10
|
+
import { withGitConfig, tokenHeader } from './chunk-SDAEXUIX.js';
|
|
11
11
|
import { mkdirSync, rmSync, writeFileSync, existsSync, mkdtempSync, cpSync, readFileSync, readdirSync, lstatSync, readlinkSync } from 'fs';
|
|
12
12
|
import { tmpdir } from 'os';
|
|
13
13
|
import { dirname, join } from 'path';
|
|
@@ -146,170 +146,6 @@ async function cloneRepository(remote, dest, timeoutMs = CLONE_TIMEOUT_MS) {
|
|
|
146
146
|
return { ok: false, reason: `the clone of ${remote} failed: ${detail}` };
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
|
|
150
|
-
// src/runner/image/dockerfiles.ts
|
|
151
|
-
var FETCHED_DIR = "fetched";
|
|
152
|
-
var FETCHED_VOICE_DIR = "voice";
|
|
153
|
-
var FETCHED_FFMPEG = "ffmpeg.tar.xz";
|
|
154
|
-
var FETCHED_GH = "gh.tgz";
|
|
155
|
-
var FETCHED_TINI = "tini";
|
|
156
|
-
function plain(name, value, allowed) {
|
|
157
|
-
if (!allowed.test(value)) throw new Error(`${name} holds a character a Dockerfile line cannot carry safely: ${JSON.stringify(value)}`);
|
|
158
|
-
return value;
|
|
159
|
-
}
|
|
160
|
-
var DEFAULT_PACKAGES = ["git", "ca-certificates", "curl", "build-essential", "python3", "python3-pip", "python3-venv", "unzip", "jq"];
|
|
161
|
-
function defaultDockerfile(baseImage, nodeImage) {
|
|
162
|
-
return [
|
|
163
|
-
ubuntuWithNode(baseImage, nodeImage, DEFAULT_PACKAGES),
|
|
164
|
-
// The browsers live in one shared folder so any user finds them. A build container's root filesystem is
|
|
165
|
-
// read-only, so the build user cannot add to this folder: a repository that needs another Playwright version
|
|
166
|
-
// installs that version's Chromium into a writable folder by setting PLAYWRIGHT_BROWSERS_PATH.
|
|
167
|
-
// `install --with-deps` runs apt-get as root and works on amd64 and arm64.
|
|
168
|
-
"ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright",
|
|
169
|
-
"RUN mkdir -p /ms-playwright \\",
|
|
170
|
-
` && npx -y playwright@${plain("the Playwright version", PLAYWRIGHT_VERSION, /^[0-9.]+$/)} install --with-deps chromium \\`,
|
|
171
|
-
" && chmod -R a+rX /ms-playwright \\",
|
|
172
|
-
" && rm -rf /var/lib/apt/lists/* /root/.npm",
|
|
173
|
-
""
|
|
174
|
-
].join("\n");
|
|
175
|
-
}
|
|
176
|
-
function ubuntuWithNode(baseImage, nodeImage, packages) {
|
|
177
|
-
return [
|
|
178
|
-
`FROM ${baseImage}`,
|
|
179
|
-
"ENV DEBIAN_FRONTEND=noninteractive",
|
|
180
|
-
"RUN apt-get update \\",
|
|
181
|
-
` && apt-get install -y --no-install-recommends ${packages.join(" ")} \\`,
|
|
182
|
-
" && rm -rf /var/lib/apt/lists/*",
|
|
183
|
-
`COPY --from=${nodeImage} /usr/local/bin/node /usr/local/bin/node`,
|
|
184
|
-
`COPY --from=${nodeImage} /usr/local/lib/node_modules /usr/local/lib/node_modules`,
|
|
185
|
-
"RUN ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \\",
|
|
186
|
-
" && ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx \\",
|
|
187
|
-
" && ln -s ../lib/node_modules/corepack/dist/corepack.js /usr/local/bin/corepack",
|
|
188
|
-
""
|
|
189
|
-
].join("\n");
|
|
190
|
-
}
|
|
191
|
-
function toolsDockerfile(parts) {
|
|
192
|
-
const recipeImage = plain("the recipe image", parts.recipeImage, /^[A-Za-z0-9_.:@/-]+$/);
|
|
193
|
-
const nodeImage = plain("the Node image", parts.nodeImage, /^[A-Za-z0-9_.:@/-]+$/);
|
|
194
|
-
const version = plain("the Claude Code version", parts.claudeCodeVersion, /^[A-Za-z0-9.+-]+$/);
|
|
195
|
-
const buildId = plain("the build id", parts.buildId, /^[A-Za-z0-9_.:+-]+$/);
|
|
196
|
-
const tools = JSON.stringify({ outerlayerBuildId: buildId, claudeCodeVersion: version, ghVersion: GH_VERSION });
|
|
197
|
-
const managedSettings = JSON.stringify({
|
|
198
|
-
hooks: Object.fromEntries(
|
|
199
|
-
["SessionStart", "SessionEnd", "Stop", "PostToolUse"].map((event) => [event, [{ hooks: [{ type: "command", command: `outerlayer hook ${event}` }] }]])
|
|
200
|
-
)
|
|
201
|
-
});
|
|
202
|
-
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)))'`;
|
|
203
|
-
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]))})'`;
|
|
204
|
-
const voiceDir = `/out/opt/outerlayer/voice/${VOICE_PACK_VERSION}`;
|
|
205
|
-
const checks = VOICE_PACK_FILES.map((file) => `echo "${file.sha256} ${voiceDir}/${file.name}" | sha256sum -c -`);
|
|
206
|
-
const fetched = parts.fetched === true;
|
|
207
|
-
const voice = fetched ? [`FROM ${nodeImage} AS voice`, `COPY ${FETCHED_DIR}/${FETCHED_VOICE_DIR}/ ${voiceDir}/`, `RUN ${checks.join(" \\\n && ")} \\`, " && chmod -R a+rX /out"] : [
|
|
208
|
-
// The voice pack streams to disk, one pinned file at a time, because a 300 MB model must not sit in a build's memory. Its own stage keeps it cached when the CLI changes.
|
|
209
|
-
`FROM ${nodeImage} AS voice`,
|
|
210
|
-
`RUN mkdir -p ${voiceDir} \\`,
|
|
211
|
-
...VOICE_PACK_FILES.map((file) => ` && ${stream} ${file.url} ${voiceDir}/${file.name} \\`),
|
|
212
|
-
...checks.map((check) => ` && ${check} \\`),
|
|
213
|
-
" && chmod -R a+rX /out"
|
|
214
|
-
];
|
|
215
|
-
return [
|
|
216
|
-
...voice,
|
|
217
|
-
// ffmpeg and ffprobe are static LGPL builds. espeak-ng comes from the stage image's own package, with the libraries and loader it needs, and runs as a separate program.
|
|
218
|
-
`FROM ${nodeImage} AS media`,
|
|
219
|
-
"ARG TARGETARCH",
|
|
220
|
-
"RUN apt-get update \\",
|
|
221
|
-
" && apt-get install -y --no-install-recommends ca-certificates espeak-ng xz-utils \\",
|
|
222
|
-
" && rm -rf /var/lib/apt/lists/*",
|
|
223
|
-
...fetched ? [`COPY ${FETCHED_DIR}/${FETCHED_FFMPEG} /tmp/ffmpeg.tar.xz`] : [],
|
|
224
|
-
"RUN set -eu \\",
|
|
225
|
-
` && case "$TARGETARCH" in \\`,
|
|
226
|
-
` amd64) ffmpeg_file=${FFMPEG_STATIC.amd64.file}; ffmpeg_sha=${FFMPEG_STATIC.amd64.sha256} ;; \\`,
|
|
227
|
-
` arm64) ffmpeg_file=${FFMPEG_STATIC.arm64.file}; ffmpeg_sha=${FFMPEG_STATIC.arm64.sha256} ;; \\`,
|
|
228
|
-
` *) echo "no pinned ffmpeg for $TARGETARCH" >&2; exit 1 ;; \\`,
|
|
229
|
-
" esac \\",
|
|
230
|
-
...fetched ? [] : [` && ${download} https://github.com/BtbN/FFmpeg-Builds/releases/download/${FFMPEG_BUILD_TAG}/$ffmpeg_file /tmp/ffmpeg.tar.xz \\`],
|
|
231
|
-
' && echo "$ffmpeg_sha /tmp/ffmpeg.tar.xz" | sha256sum -c - \\',
|
|
232
|
-
" && tar -xJf /tmp/ffmpeg.tar.xz -C /tmp \\",
|
|
233
|
-
" && mkdir -p /out/usr/local/bin /out/opt/outerlayer/media/lib \\",
|
|
234
|
-
" && install -m 0755 /tmp/ffmpeg-*/bin/ffmpeg /tmp/ffmpeg-*/bin/ffprobe /out/usr/local/bin/ \\",
|
|
235
|
-
" && install -m 0755 /usr/bin/espeak-ng /out/opt/outerlayer/media/espeak-ng \\",
|
|
236
|
-
` && for lib in $(ldd /usr/bin/espeak-ng | awk '$3 ~ /^\\// {print $3}'); do cp -L "$lib" /out/opt/outerlayer/media/lib/; done \\`,
|
|
237
|
-
" && cp -L $(ldd /usr/bin/espeak-ng | awk '$1 ~ /ld-linux/ {print $1}') /out/opt/outerlayer/media/lib/ld.so \\",
|
|
238
|
-
" && cp -r /usr/lib/*/espeak-ng-data /out/opt/outerlayer/media/espeak-ng-data \\",
|
|
239
|
-
` && printf '%s\\n' '#!/bin/sh' 'ESPEAK_DATA_PATH=/opt/outerlayer/media' 'export ESPEAK_DATA_PATH' 'exec /opt/outerlayer/media/lib/ld.so --library-path /opt/outerlayer/media/lib /opt/outerlayer/media/espeak-ng "$@"' > /out/usr/local/bin/espeak-ng \\`,
|
|
240
|
-
" && chmod 0755 /out/usr/local/bin/espeak-ng \\",
|
|
241
|
-
" && chmod -R a+rX /out",
|
|
242
|
-
`FROM ${recipeImage} AS recipe`,
|
|
243
|
-
`FROM ${nodeImage} AS stage`,
|
|
244
|
-
"ARG TARGETARCH",
|
|
245
|
-
`RUN npm install --global --prefix /out/opt/outerlayer/claude @anthropic-ai/claude-code@${version}`,
|
|
246
|
-
"COPY dist /out/opt/outerlayer/cli/dist",
|
|
247
|
-
"COPY package.json /out/opt/outerlayer/cli/package.json",
|
|
248
|
-
// `outerlayer demo record` runs a demo on the Playwright release this CLI depends on, found beside the CLI as an npm
|
|
249
|
-
// install puts it. Only the library, with no install scripts: the layer adds no browser to a repository's own image.
|
|
250
|
-
"RUN mkdir -p /tmp/cli-deps && cd /tmp/cli-deps && echo '{}' > package.json \\",
|
|
251
|
-
` && npm install --no-audit --no-fund --ignore-scripts @playwright/test@${plain("the Playwright version", PLAYWRIGHT_VERSION, /^[0-9.]+$/)} \\`,
|
|
252
|
-
" && mv node_modules /out/opt/outerlayer/cli/node_modules",
|
|
253
|
-
// `outerlayer claude` installs the maintained skills from this pack into the build's home folder before the agent starts.
|
|
254
|
-
"COPY skill-pack /out/opt/outerlayer/cli/skill-pack",
|
|
255
|
-
"RUN mkdir -p /out/opt/outerlayer/bin /out/usr/local/bin /out/etc/claude-code /out/build \\",
|
|
256
|
-
" && cp /usr/local/bin/node /out/opt/outerlayer/bin/node \\",
|
|
257
|
-
` && printf '%s\\n' '#!/bin/sh' 'exec /opt/outerlayer/bin/node /opt/outerlayer/cli/dist/index.js "$@"' > /out/usr/local/bin/outerlayer \\`,
|
|
258
|
-
` && printf '%s\\n' '#!/bin/sh' 'PATH=/opt/outerlayer/bin:$PATH' 'export PATH' 'exec /opt/outerlayer/claude/bin/claude "$@"' > /out/usr/local/bin/claude \\`,
|
|
259
|
-
` && printf '%s\\n' '${tools}' > /out/opt/outerlayer/tools.json \\`,
|
|
260
|
-
` && printf '%s\\n' '${managedSettings}' > /out/etc/claude-code/managed-settings.json \\`,
|
|
261
|
-
" && chmod 0755 /out/usr/local/bin/outerlayer /out/usr/local/bin/claude \\",
|
|
262
|
-
// Every build, whatever user runs it, writes here: the first mount of an empty volume copies this mode.
|
|
263
|
-
" && chmod 1777 /out/build",
|
|
264
|
-
...parts.guestHelper === true ? [
|
|
265
|
-
"COPY guest/outerlayer-guest /out/opt/outerlayer/bin/outerlayer-guest",
|
|
266
|
-
// The guest mounts the build's tmpfs, the kernel's file systems and the run directory over these. The judge's tmpfs is mounted over its directory when the judge runs.
|
|
267
|
-
"RUN chmod 0755 /out/opt/outerlayer/bin/outerlayer-guest \\",
|
|
268
|
-
" && mkdir -p /out/outerlayer/job /out/outerlayer/judge /out/run /out/proc /out/sys /out/dev"
|
|
269
|
-
] : [],
|
|
270
|
-
...fetched ? [`COPY ${FETCHED_DIR}/${FETCHED_TINI} /tmp/tini`, `COPY ${FETCHED_DIR}/${FETCHED_GH} /tmp/gh.tgz`] : [],
|
|
271
|
-
`RUN set -eu \\`,
|
|
272
|
-
` && case "$TARGETARCH" in \\`,
|
|
273
|
-
` amd64) gh_sha=${GH_SHA256.amd64}; tini_sha=${TINI_SHA256.amd64} ;; \\`,
|
|
274
|
-
` arm64) gh_sha=${GH_SHA256.arm64}; tini_sha=${TINI_SHA256.arm64} ;; \\`,
|
|
275
|
-
` *) echo "no pinned gh and tini for $TARGETARCH" >&2; exit 1 ;; \\`,
|
|
276
|
-
" esac \\",
|
|
277
|
-
...fetched ? [] : [` && ${download} https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-$TARGETARCH /tmp/tini \\`],
|
|
278
|
-
' && echo "$tini_sha /tmp/tini" | sha256sum -c - \\',
|
|
279
|
-
" && install -m 0755 /tmp/tini /out/opt/outerlayer/bin/tini \\",
|
|
280
|
-
...fetched ? [] : [` && ${download} https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_$TARGETARCH.tar.gz /tmp/gh.tgz \\`],
|
|
281
|
-
' && echo "$gh_sha /tmp/gh.tgz" | sha256sum -c - \\',
|
|
282
|
-
" && tar -xzf /tmp/gh.tgz -C /tmp \\",
|
|
283
|
-
` && install -m 0755 /tmp/gh_${GH_VERSION}_linux_$TARGETARCH/bin/gh /out/usr/local/bin/gh`,
|
|
284
|
-
"COPY --from=recipe /etc/passwd /tmp/recipe-passwd",
|
|
285
|
-
"COPY --from=recipe /etc/group /tmp/recipe-group",
|
|
286
|
-
`RUN uid=$(awk -F: 'BEGIN{m=1499} $3>=1500 && $3<60000 && $3>m{m=$3} END{print m+1}' /tmp/recipe-passwd) \\`,
|
|
287
|
-
` && gid=$(awk -F: 'BEGIN{m=1499} $3>=1500 && $3<60000 && $3>m{m=$3} END{print m+1}' /tmp/recipe-group) \\`,
|
|
288
|
-
" && { grep -v -e '^ol-agent:' -e '^ol-relay:' /tmp/recipe-passwd > /out/etc/passwd || true; } \\",
|
|
289
|
-
" && { grep -v -e '^ol-agent:' -e '^ol-relay:' /tmp/recipe-group > /out/etc/group || true; } \\",
|
|
290
|
-
// The relay's id is fixed because the runner names it in the container's `--tmpfs` options before the container exists.
|
|
291
|
-
` && if awk -F: '$3==${RELAY_ID}{found=1} END{exit !found}' /out/etc/passwd; then echo "uid ${RELAY_ID} is taken by a user of the recipe image, and the relay needs it" >&2; exit 1; fi \\`,
|
|
292
|
-
` && if awk -F: '$3==${RELAY_ID}{found=1} END{exit !found}' /out/etc/group; then echo "gid ${RELAY_ID} is taken by a group of the recipe image, and the relay needs it" >&2; exit 1; fi \\`,
|
|
293
|
-
` && printf '%s\\n' "ol-agent:x:$uid:$gid::/build/home:/bin/sh" >> /out/etc/passwd \\`,
|
|
294
|
-
` && printf '%s\\n' "ol-agent:x:$gid:" >> /out/etc/group \\`,
|
|
295
|
-
` && printf '%s\\n' "${RELAY_USER}:x:${RELAY_ID}:${RELAY_ID}::/nonexistent:/usr/sbin/nologin" >> /out/etc/passwd \\`,
|
|
296
|
-
` && printf '%s\\n' "${RELAY_USER}:x:${RELAY_ID}:" >> /out/etc/group \\`,
|
|
297
|
-
" && chmod 0644 /out/etc/passwd /out/etc/group \\",
|
|
298
|
-
" && chmod -R a+rX /out",
|
|
299
|
-
`FROM ${recipeImage}`,
|
|
300
|
-
"COPY --from=stage /out/ /",
|
|
301
|
-
"COPY --from=voice /out/ /",
|
|
302
|
-
"COPY --from=media /out/ /",
|
|
303
|
-
"ENV DISABLE_AUTOUPDATER=1",
|
|
304
|
-
// 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.
|
|
305
|
-
// 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.
|
|
306
|
-
"RUN check=$(mktemp -d /tmp/ol-check.XXXXXX) \\",
|
|
307
|
-
" && outerlayer --version && claude --version && gh --version && ffmpeg -version && ffprobe -version \\",
|
|
308
|
-
' && XDG_RUNTIME_DIR="$check" espeak-ng --version \\',
|
|
309
|
-
' && rm -rf "$check"',
|
|
310
|
-
""
|
|
311
|
-
].join("\n");
|
|
312
|
-
}
|
|
313
149
|
function sha256(...chunks) {
|
|
314
150
|
const hash = createHash("sha256");
|
|
315
151
|
for (const chunk of chunks) hash.update(chunk);
|
|
@@ -612,4 +448,4 @@ async function prune(host, repository, repoRecords, keep, runnerDirPath, runnerL
|
|
|
612
448
|
return removed;
|
|
613
449
|
}
|
|
614
450
|
|
|
615
|
-
export {
|
|
451
|
+
export { KEY_PREFIX, TAG_HOST, buildRepositoryImage, cloneRepository, diffBetween, fetchCommit, metadataFromLabels, prepareImageBuild, readBranchHead, readDefaultBranchHead, writeRecord };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { scrubReason, stripTerminalControls } from './chunk-
|
|
4
|
-
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-
|
|
3
|
+
import { scrubReason, stripTerminalControls } from './chunk-DX4FF5P5.js';
|
|
4
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-7QF2EXAN.js';
|
|
5
5
|
import { RunnerAlreadyRunningError, readPidFile } from './chunk-LQHCNXPK.js';
|
|
6
6
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
7
7
|
import { isSignatureRefusal, postJson } from './chunk-QABXXQ67.js';
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { sha256OfFile, downloadPinned, VoiceDownloadError } from './chunk-2PGI6RDE.js';
|
|
4
|
-
import { readDefaultBranchHead, cloneRepository, buildRepositoryImage, prepareImageBuild, KEY_PREFIX,
|
|
4
|
+
import { readDefaultBranchHead, cloneRepository, buildRepositoryImage, prepareImageBuild, KEY_PREFIX, TAG_HOST, metadataFromLabels, writeRecord } from './chunk-IYQPUGST.js';
|
|
5
|
+
import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-GTBY7BTI.js';
|
|
5
6
|
import { currentCliBuild } from './chunk-OGFGZQA3.js';
|
|
6
7
|
import { runExec, execCapture, waitForAgent } from './chunk-3VZTNXK5.js';
|
|
7
8
|
import { GUEST_CID, linkVsockSockets } from './chunk-6KFJIU73.js';
|
|
8
9
|
import { retrySend, describeCallFailure, keepStagedContext, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, prefetchGovernedContext, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript, WORKFLOW_PERMISSION_REASON } from './chunk-77VBS2RT.js';
|
|
9
10
|
import { runnerImageVersion } from './chunk-SDELQEG4.js';
|
|
10
|
-
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-
|
|
11
|
-
import { runnerCredentialProblem, builtinKind, allowHostProblem, hostAllowed } from './chunk-
|
|
12
|
-
import { formatBytes, allocatedBytes } from './chunk-
|
|
13
|
-
import { createDockerHost, builderSpec, runnerLabelValue, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, containerRunArgs, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, containerExecArgs, childEnvironment, readDu, JUDGE_DIR, MAX_ITEMS_BYTES, JUDGE_ITEMS, MAX_REPORT_BYTES, JUDGE_REPORT, spawnRun } from './chunk-
|
|
14
|
-
import { firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, CLAUDE_CODE_VERSION, builderDiskPinned, guestAssetsPinned, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, BUILDER_DISK_VERSION, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, GH_VERSION, TINI_SHA256, TINI_VERSION, VOICE_PACK_FILES, BUILDER_DISK_SHA256, BUILDER_DISK_BASE_URL, DEFAULT_BASE_IMAGE } from './chunk-4UPET3R7.js';
|
|
11
|
+
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-Q2KGDDUX.js';
|
|
12
|
+
import { runnerCredentialProblem, builtinKind, allowHostProblem, hostAllowed } from './chunk-DEJCZ43H.js';
|
|
13
|
+
import { formatBytes, allocatedBytes } from './chunk-BLSEHKZ4.js';
|
|
14
|
+
import { createDockerHost, builderSpec, runnerLabelValue, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, containerRunArgs, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, containerExecArgs, childEnvironment, readDu, JUDGE_DIR, MAX_ITEMS_BYTES, JUDGE_ITEMS, MAX_REPORT_BYTES, JUDGE_REPORT, spawnRun } from './chunk-GR7ZVGNI.js';
|
|
15
15
|
import { RecipeError, DOCKER_FEATURE, writeSanitizedRecipe, classifyProperties } from './chunk-HDLON3RJ.js';
|
|
16
|
+
import { firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, CLAUDE_CODE_VERSION, builderDiskPinned, guestAssetsPinned, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, BUILDER_DISK_VERSION, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, GH_VERSION, TINI_SHA256, TINI_VERSION, HEADLESS_SHELL, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_FFMPEG_BASE_URL, VOICE_PACK_FILES, BUILDER_DISK_SHA256, BUILDER_DISK_BASE_URL, DEFAULT_BASE_IMAGE } from './chunk-QUOITPN7.js';
|
|
16
17
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
17
18
|
import { postJson, WorkCommandError, getJson } from './chunk-QABXXQ67.js';
|
|
18
19
|
import { sanitizeTerminal } from './chunk-IXPH4EXK.js';
|
|
@@ -539,7 +540,9 @@ function toolFilePins(arch) {
|
|
|
539
540
|
...VOICE_PACK_FILES.map((file) => ({ path: `${FETCHED_VOICE_DIR}/${file.name}`, url: file.url, sha256: file.sha256 })),
|
|
540
541
|
{ path: FETCHED_FFMPEG, url: `https://github.com/BtbN/FFmpeg-Builds/releases/download/${FFMPEG_BUILD_TAG}/${FFMPEG_STATIC[arch].file}`, sha256: FFMPEG_STATIC[arch].sha256 },
|
|
541
542
|
{ path: FETCHED_GH, url: `https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_${arch}.tar.gz`, sha256: GH_SHA256[arch] },
|
|
542
|
-
{ path: FETCHED_TINI, url: `https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-${arch}`, sha256: TINI_SHA256[arch] }
|
|
543
|
+
{ path: FETCHED_TINI, url: `https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-${arch}`, sha256: TINI_SHA256[arch] },
|
|
544
|
+
{ path: FETCHED_HEADLESS_SHELL, url: `${HEADLESS_SHELL_BASE_URL}/${HEADLESS_SHELL[arch].file}`, sha256: HEADLESS_SHELL[arch].sha256 },
|
|
545
|
+
{ path: FETCHED_PLAYWRIGHT_FFMPEG, url: `${PLAYWRIGHT_FFMPEG_BASE_URL}/${PLAYWRIGHT_FFMPEG[arch].file}`, sha256: PLAYWRIGHT_FFMPEG[arch].sha256 }
|
|
543
546
|
];
|
|
544
547
|
}
|
|
545
548
|
function pinsDir(runnerDir2, pins) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { DEFAULT_UNIT_NAME } from './chunk-
|
|
3
|
+
import { DEFAULT_UNIT_NAME } from './chunk-7QF2EXAN.js';
|
|
4
4
|
import { RUNNER_FILE_MODE } from './chunk-GJ4KBHBD.js';
|
|
5
5
|
import { claudeEnvPath, withoutCredentialLines, parseRunnerEnv } from './chunk-SDAEXUIX.js';
|
|
6
6
|
import { existsSync, readFileSync, writeFileSync, renameSync, rmSync } from 'fs';
|
|
@@ -106,7 +106,26 @@ var FFMPEG_STATIC = {
|
|
|
106
106
|
sha256: "8463881ca7a25015ca6e00f5c91dd2f1637eb73d33c8230413cb74db760a86b3"
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
|
-
var MEDIA_PINS = `${VOICE_PACK_VERSION}+${FFMPEG_BUILD_TAG}`;
|
|
110
109
|
var PLAYWRIGHT_VERSION = "1.64.1";
|
|
110
|
+
var HEADLESS_SHELL_VERSION = "156.0.8078.4";
|
|
111
|
+
var HEADLESS_SHELL_REVISION = "1248";
|
|
112
|
+
var HEADLESS_SHELL_BASE_URL = `https://cdn.playwright.dev/builds/cft/${HEADLESS_SHELL_VERSION}`;
|
|
113
|
+
var HEADLESS_SHELL = {
|
|
114
|
+
amd64: {
|
|
115
|
+
file: "linux64/chrome-headless-shell-linux64.zip",
|
|
116
|
+
sha256: "c3e50596aef52c58f8fda3c6b3411c33d34c88b177b3ed1c2243359fd3b8ba20"
|
|
117
|
+
},
|
|
118
|
+
arm64: {
|
|
119
|
+
file: "linux-arm64/chrome-headless-shell-linux-arm64.zip",
|
|
120
|
+
sha256: "81ab9d4d3c301dc5fdfb6c541b9e6632b16fc819a6a854460f40a76fe2b2c476"
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
var PLAYWRIGHT_FFMPEG_REVISION = "1013";
|
|
124
|
+
var PLAYWRIGHT_FFMPEG_BASE_URL = `https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/${PLAYWRIGHT_FFMPEG_REVISION}`;
|
|
125
|
+
var PLAYWRIGHT_FFMPEG = {
|
|
126
|
+
amd64: { file: "ffmpeg-linux.zip", sha256: "ee986434d158f74fb5d9c5ff1092026ceedb63f324fe90b5be89460926b7b679" },
|
|
127
|
+
arm64: { file: "ffmpeg-linux-arm64.zip", sha256: "457360e803a7d8d5f8f7f5ecf562b2d338f6b4f7f86339d0c31938a451e8878b" }
|
|
128
|
+
};
|
|
129
|
+
var MEDIA_PINS = `${VOICE_PACK_VERSION}+${FFMPEG_BUILD_TAG}+${HEADLESS_SHELL_VERSION}+${PLAYWRIGHT_FFMPEG_REVISION}`;
|
|
111
130
|
|
|
112
|
-
export { BUILDER_DISK_BASE_URL, BUILDER_DISK_SHA256, BUILDER_DISK_VERSION, BUILDKIT_IMAGE, CLAUDE_CODE_VERSION, 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, HOST_HELPER_ASSETS_VERSION, HOST_HELPER_BASE_URL, HOST_HELPER_SHA256, HOST_HELPER_SLICE_SINCE, JAILER_BINARY_SHA256, MEDIA_PINS, MICROVM_ARCHES, NODE_IMAGE, PLAYWRIGHT_VERSION, TINI_SHA256, TINI_VERSION, VOICE_PACK_FILES, VOICE_PACK_VERSION, builderDiskPinned, firecrackerArch, guestAssetsPinned, hostHelperPinned, hostHelperSupportsSlice };
|
|
131
|
+
export { BUILDER_DISK_BASE_URL, BUILDER_DISK_SHA256, BUILDER_DISK_VERSION, BUILDKIT_IMAGE, CLAUDE_CODE_VERSION, 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, MEDIA_PINS, MICROVM_ARCHES, NODE_IMAGE, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_FFMPEG_BASE_URL, PLAYWRIGHT_FFMPEG_REVISION, PLAYWRIGHT_VERSION, TINI_SHA256, TINI_VERSION, VOICE_PACK_FILES, VOICE_PACK_VERSION, builderDiskPinned, firecrackerArch, guestAssetsPinned, hostHelperPinned, hostHelperSupportsSlice };
|
|
@@ -1195,8 +1195,8 @@ function doctorExitCode(checks) {
|
|
|
1195
1195
|
|
|
1196
1196
|
// src/doctor-report.ts
|
|
1197
1197
|
async function gatherDoctorChecks() {
|
|
1198
|
-
const { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK } = await import('./build-disk-
|
|
1199
|
-
const { defaultRunnerConfigPath, hasRunnerBlock, loadRunnerConfig, runnerVmOf } = await import('./config-
|
|
1198
|
+
const { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK } = await import('./build-disk-RZ7AZKTY.js');
|
|
1199
|
+
const { defaultRunnerConfigPath, hasRunnerBlock, loadRunnerConfig, runnerVmOf } = await import('./config-NGCQD6SN.js');
|
|
1200
1200
|
const configPath = defaultRunnerConfigPath();
|
|
1201
1201
|
const runnerHost = hasRunnerBlock(configPath);
|
|
1202
1202
|
const hooks = (() => {
|
|
@@ -1217,7 +1217,7 @@ async function gatherDoctorChecks() {
|
|
|
1217
1217
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1218
1218
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1219
1219
|
} else if (hasRunnerBlock(configPath)) {
|
|
1220
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1220
|
+
const { runnerHostChecks } = await import('./doctor-NEO7NXJJ.js');
|
|
1221
1221
|
const gateway = (() => {
|
|
1222
1222
|
try {
|
|
1223
1223
|
const { url, apiKey, appId } = loadRunnerConfig(configPath);
|
|
@@ -1244,7 +1244,7 @@ async function gatherDoctorChecks() {
|
|
|
1244
1244
|
const service = await (async () => {
|
|
1245
1245
|
const { existsSync: existsSync3 } = await import('fs');
|
|
1246
1246
|
if (process.platform !== "linux" || !existsSync3("/run/systemd/system")) return void 0;
|
|
1247
|
-
const { inspectRunnerService } = await import('./find-unit-
|
|
1247
|
+
const { inspectRunnerService } = await import('./find-unit-IOCVYPNW.js');
|
|
1248
1248
|
return inspectRunnerService(configPath);
|
|
1249
1249
|
})();
|
|
1250
1250
|
checks.push(...await runnerHostChecks({ configPath, hooks, gateway, repos, runner, service }));
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
4
|
-
import { reportFailedStart, fitImageBuildMemory } from './chunk-
|
|
4
|
+
import { reportFailedStart, fitImageBuildMemory } from './chunk-JL4GSPGD.js';
|
|
5
5
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
|
|
6
6
|
import { RUNNER_PROTOCOL } from './chunk-MH6QLXUO.js';
|
|
7
7
|
import { writePendingUpdate } from './chunk-HOUFCUMH.js';
|
|
8
|
-
import { renderUpdateSteps } from './chunk-
|
|
8
|
+
import { renderUpdateSteps } from './chunk-WPDL7MBC.js';
|
|
9
9
|
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-TS3EFB7S.js';
|
|
10
|
-
import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, readProvisionOut, workdirProblem, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, startSender, finishJob, sampleGuest, foldSample, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, serveLease, vmAlive, writeGuestGhConfig, ALREADY_RELEASED, inTeardown } from './chunk-
|
|
10
|
+
import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, readProvisionOut, workdirProblem, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, startSender, finishJob, sampleGuest, foldSample, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, serveLease, vmAlive, writeGuestGhConfig, ALREADY_RELEASED, inTeardown } from './chunk-DX4FF5P5.js';
|
|
11
11
|
import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-ZVB57WI6.js';
|
|
12
|
-
import { realBlockedProbes, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, sliceMemoryOf } from './chunk-
|
|
12
|
+
import { realBlockedProbes, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, sliceMemoryOf } from './chunk-ZK3A4W3I.js';
|
|
13
13
|
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-YL3RWW7X.js';
|
|
14
14
|
import { RepoFilter } from './chunk-TBT347UY.js';
|
|
15
|
-
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, LEASE_SECONDS, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionEnvironment, resolveHostBuild, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem, containerCommandExec, execCommandLine, startHostServices, setUpRunnerCgroup, sweepImageBuilders, measureDisk, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, createLeaseChannel } from './chunk-
|
|
15
|
+
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, LEASE_SECONDS, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionEnvironment, resolveHostBuild, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem, containerCommandExec, execCommandLine, startHostServices, setUpRunnerCgroup, sweepImageBuilders, measureDisk, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, createLeaseChannel } from './chunk-LKTH7PUH.js';
|
|
16
16
|
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-77VBS2RT.js';
|
|
17
17
|
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-SDELQEG4.js';
|
|
18
18
|
import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
|
|
19
|
-
import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-
|
|
20
|
-
import { freeBytes, formatBytes, allocatedBytes, volumeBytes } from './chunk-
|
|
21
|
-
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, RUNNER_LABEL, BUILD_LABEL, readJobFileChecked } from './chunk-
|
|
19
|
+
import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-DEJCZ43H.js';
|
|
20
|
+
import { freeBytes, formatBytes, allocatedBytes, volumeBytes } from './chunk-BLSEHKZ4.js';
|
|
21
|
+
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, RUNNER_LABEL, BUILD_LABEL, readJobFileChecked } from './chunk-GR7ZVGNI.js';
|
|
22
22
|
import { claimPidFile, writePidFile, readPidFile, releasePidFile } from './chunk-LQHCNXPK.js';
|
|
23
23
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
24
24
|
import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-QABXXQ67.js';
|
|
@@ -3279,7 +3279,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
3279
3279
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
3280
3280
|
const held = heldClaudeCredential();
|
|
3281
3281
|
const env = held === void 0 ? process.env : { ...process.env, [held.variable]: held.value };
|
|
3282
|
-
return (await import('./check-
|
|
3282
|
+
return (await import('./check-YIUZ3UX3.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
3283
3283
|
},
|
|
3284
3284
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
3285
3285
|
log
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { stripTerminalControls } from './chunk-
|
|
3
|
+
import { stripTerminalControls } from './chunk-DX4FF5P5.js';
|
|
4
4
|
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-SDELQEG4.js';
|
|
5
5
|
import { readFileSync } from 'fs';
|
|
6
6
|
|
|
@@ -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-TRGA5QRL.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 = "";
|
|
@@ -1,10 +1,10 @@
|
|
|
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 { builtinKind, imageBuildOf, keepsHostBuilder } from './chunk-
|
|
6
|
-
import { realBuildDiskProbe, checkDiskFit, DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-
|
|
7
|
-
import { builderDiskPinned } from './chunk-
|
|
3
|
+
import { placeholderQueues, placeholderProblem } from './chunk-LKTH7PUH.js';
|
|
4
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-7QF2EXAN.js';
|
|
5
|
+
import { builtinKind, imageBuildOf, keepsHostBuilder } from './chunk-DEJCZ43H.js';
|
|
6
|
+
import { realBuildDiskProbe, checkDiskFit, DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-BLSEHKZ4.js';
|
|
7
|
+
import { builderDiskPinned } from './chunk-QUOITPN7.js';
|
|
8
8
|
import { BUILD_SLICE_MEMORY_ENV, FORWARDED_CLAUDE_CREDENTIAL_VARIABLES, claudeCredentialVariablesSet, claudeCredential, claudeEnvPath, parseRunnerEnv } from './chunk-SDAEXUIX.js';
|
|
9
9
|
import { closeSync, openSync, constants, readFileSync } from 'fs';
|
|
10
10
|
import { join, dirname } from 'path';
|