@outerlayer/cli 0.34.0-next.20261027121359 → 0.34.0-next.20261027174501
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-UPRMGVB7.js → agent-setup-THDNZ5ME.js} +6 -6
- package/dist/{bridge-GVZUP3NU.js → bridge-MLB57JP6.js} +2 -2
- package/dist/build-25GDCEZ7.js +18 -0
- package/dist/{build-disk-WMIRA4RD.js → build-disk-NFMQCZM3.js} +8 -8
- package/dist/build-info.json +1 -1
- package/dist/{builder-XTAHDFV5.js → builder-OWDGC3VQ.js} +7 -7
- package/dist/{check-FAG4QKIX.js → check-IFHLERRX.js} +39 -39
- package/dist/{chunk-Q3ATWA2U.js → chunk-2YPOSVC7.js} +3 -3
- package/dist/{chunk-M6YTST7G.js → chunk-36M4KVBT.js} +2 -2
- package/dist/{chunk-W5EKMK37.js → chunk-3FTIUB7I.js} +1 -1
- package/dist/{chunk-L4DCIEVT.js → chunk-3RRYEZAC.js} +4 -4
- package/dist/{chunk-I2GHZ2VA.js → chunk-3VJYDWFV.js} +1 -1
- package/dist/{chunk-XEJ5USHY.js → chunk-4HA4S3U2.js} +6 -6
- package/dist/{chunk-CHDWAWQA.js → chunk-4QQJTJUN.js} +1 -1
- package/dist/{chunk-6SJ3DJDH.js → chunk-5ARXP3BP.js} +3 -3
- package/dist/{chunk-SGT7YU3X.js → chunk-5FHBVV25.js} +104 -59
- package/dist/{chunk-T375XV3H.js → chunk-62URQYCB.js} +1 -1
- package/dist/{chunk-NGZBVN6F.js → chunk-6IMQXBTZ.js} +6 -6
- package/dist/{chunk-66TKWWTX.js → chunk-7Q7GQELE.js} +5 -5
- package/dist/{chunk-B7LPFCIN.js → chunk-7SJNVGVC.js} +6 -6
- package/dist/{chunk-JKOONI3H.js → chunk-7TLGRE5F.js} +2 -2
- package/dist/{chunk-OOD5NDQA.js → chunk-A6PJSNP6.js} +349 -94
- package/dist/{chunk-LUYTNCMS.js → chunk-ANFNZCXZ.js} +5 -5
- package/dist/{chunk-LHUZVM3L.js → chunk-AV5T7HV3.js} +1 -1
- package/dist/{chunk-RMJSYOSV.js → chunk-BS3OYFAD.js} +1 -1
- package/dist/{chunk-PBZODW5X.js → chunk-BS4CZMT6.js} +1 -1
- package/dist/{chunk-HO4XRLAZ.js → chunk-CFJOONWM.js} +1 -1
- package/dist/{chunk-UC4OSOQS.js → chunk-CMMEJJTL.js} +10 -35
- package/dist/{chunk-YIBHQR3B.js → chunk-EYJRVHBN.js} +3 -3
- package/dist/{chunk-UYWGR35C.js → chunk-FLHBUQ2W.js} +7 -6
- package/dist/{chunk-N752ZNZ5.js → chunk-FVVHQIZR.js} +1 -1
- package/dist/{chunk-Z7THNFUU.js → chunk-GMKDAF37.js} +25 -6
- package/dist/{chunk-XZGURZHF.js → chunk-GPO7F757.js} +1 -1
- package/dist/{chunk-KFXPH7SJ.js → chunk-HJCNWEQK.js} +3 -3
- package/dist/{chunk-3NMDGGZS.js → chunk-JO4SAEHH.js} +3 -3
- package/dist/{chunk-ZV6GOXYA.js → chunk-JVNQNKHV.js} +1 -1
- package/dist/{chunk-RO2NZJHZ.js → chunk-JWMJMQRF.js} +4 -4
- package/dist/{chunk-ARPPH7VS.js → chunk-LSFP57LI.js} +257 -79
- package/dist/{chunk-TS2YACAQ.js → chunk-LYX2RRSF.js} +2 -2
- package/dist/{chunk-WS5E73JO.js → chunk-MXAYUZJF.js} +6 -6
- package/dist/{chunk-L7RPNSAA.js → chunk-NO6E72RM.js} +2 -2
- package/dist/{chunk-UXGWAAGQ.js → chunk-OHTMTMFX.js} +4 -4
- package/dist/{chunk-XSUM3E67.js → chunk-OP2L7OXA.js} +3 -3
- package/dist/{chunk-UDRBQI5J.js → chunk-PMIW6OGQ.js} +10 -10
- package/dist/{chunk-YGX72FUQ.js → chunk-QRIE4JZE.js} +3 -3
- package/dist/{chunk-QBBZGVZJ.js → chunk-RCAMBC3H.js} +3 -3
- package/dist/{chunk-KDSKFXPE.js → chunk-RJZZFAXS.js} +1 -1
- package/dist/{chunk-LTMFHECB.js → chunk-S5U6RKQX.js} +20 -20
- package/dist/{chunk-W774NREK.js → chunk-SKAML7GB.js} +3 -3
- package/dist/{chunk-QTAADTIO.js → chunk-T6ALNN3H.js} +1 -1
- package/dist/{chunk-DUG3JXAT.js → chunk-UZIAZXXO.js} +1 -1
- package/dist/{chunk-LXOBWRVC.js → chunk-W246VXU4.js} +3 -3
- package/dist/{chunk-J2X5CTYY.js → chunk-WR2GRWK3.js} +1 -1
- package/dist/{chunk-QUOITPN7.js → chunk-WX2HW2G2.js} +8 -1
- package/dist/{chunk-HDLON3RJ.js → chunk-X7M73LKT.js} +9 -2
- package/dist/{chunk-4IB5WUY2.js → chunk-Y4WJ4BLX.js} +6 -6
- package/dist/{chunk-SJY6A6EH.js → chunk-Y7MF32DM.js} +36 -22
- package/dist/{chunk-FRETDGET.js → chunk-Z4LFCJT6.js} +3 -3
- package/dist/{claude-launcher-SGZSOGKZ.js → claude-launcher-LYGS66AC.js} +1 -1
- package/dist/{cli-6QN7TH6U.js → cli-7S4PEKAV.js} +114 -113
- package/dist/{command-6T6RI5XY.js → command-GQVFZHJ2.js} +27 -27
- package/dist/{config-CWYMIXTV.js → config-5NWSCHIO.js} +9 -9
- package/dist/{connect-cmd-MY6SR4OK.js → connect-cmd-HB3K3AHE.js} +6 -6
- package/dist/{container-start-FDXR4QND.js → container-start-WRD3YZQR.js} +33 -33
- package/dist/{context-show-cmd-WRTV3ACH.js → context-show-cmd-RJIQS2KF.js} +7 -7
- package/dist/{control-plane-launch-UM4IHOJQ.js → control-plane-launch-TS4DFJF4.js} +5 -5
- package/dist/{demo-record-cmd-XBWTORVM.js → demo-record-cmd-VVZGUCWB.js} +4 -4
- package/dist/{demo-voice-cmd-FLU4GDKS.js → demo-voice-cmd-3ADGIWK6.js} +13 -13
- package/dist/{dist-ADKRGE7I.js → dist-BUSLJNSZ.js} +1 -1
- package/dist/{docker-IUPWQ2RK.js → docker-5VGCFZV2.js} +7 -7
- package/dist/{doctor-5VNZ2BLY.js → doctor-N4I6IEKP.js} +28 -28
- package/dist/{emit-artifact-cmd-RDXIWRFU.js → emit-artifact-cmd-WJT7AXTZ.js} +11 -11
- package/dist/{emit-criteria-cmd-EDJOWGKL.js → emit-criteria-cmd-45IYB535.js} +8 -8
- package/dist/{emit-demo-cmd-W3BXFFU3.js → emit-demo-cmd-AIIQNPXS.js} +13 -13
- package/dist/{emit-finding-cmd-TMZIOQIP.js → emit-finding-cmd-6YTJK2NA.js} +8 -8
- package/dist/{emit-result-cmd-P55JBD2W.js → emit-result-cmd-TZGFY743.js} +10 -10
- package/dist/{emit-step-cmd-Y7LKI7L3.js → emit-step-cmd-LGBTIAXC.js} +8 -8
- package/dist/{exec-client-FB3OBHOJ.js → exec-client-LR67CA24.js} +3 -3
- package/dist/find-unit-YGDFVHVU.js +19 -0
- package/dist/{findings-cmd-D64BYS7Z.js → findings-cmd-ETJXUDQI.js} +8 -8
- package/dist/{fleet-readiness-75KQEZ6E.js → fleet-readiness-MYIMDBF7.js} +5 -5
- package/dist/{governing-source-YYEU46PP.js → governing-source-GBJTVMK2.js} +10 -10
- package/dist/{guest-init-SGF6ZVZN.js → guest-init-GXPOW53F.js} +4 -4
- package/dist/{hook-fast-XX5HZOCR.js → hook-fast-5WOGLR7V.js} +1 -1
- package/dist/{host-checks-VKBAGGWH.js → host-checks-33ZTDTSH.js} +31 -31
- package/dist/{pending-GEDI4K7P.js → host-key-GAZM4EOH.js} +3 -3
- package/dist/{image-tag-MRWNQGXA.js → image-tag-OYHGRHVV.js} +3 -3
- package/dist/index.js +4 -4
- package/dist/{init-B5S5LMIL.js → init-2YOAKLDN.js} +24 -24
- package/dist/{init-BB2TLXVB.js → init-OXCOPKHP.js} +24 -24
- package/dist/{init-cmd-I2Z4VZSG.js → init-cmd-BUWWUQKM.js} +11 -11
- package/dist/{init-update-TIZILQXL.js → init-update-TXQHBY3H.js} +9 -9
- package/dist/{install-cmd-X4OHS36T.js → install-cmd-VZGXSS73.js} +5 -5
- package/dist/{logs-BPEOYWRW.js → logs-42QPBCMC.js} +2 -2
- package/dist/{loop-XULUT5HL.js → loop-M3XDFD6O.js} +38 -38
- package/dist/{machine-UYFUUSEQ.js → machine-3BI2SGAK.js} +24 -24
- package/dist/{mcp-serve-cmd-NCPWJJDZ.js → mcp-serve-cmd-LYJQO6U4.js} +4 -4
- package/dist/{paths-WXGOFVCF.js → paths-QLFRPIKS.js} +2 -2
- package/dist/{host-key-CNCHVNDC.js → pending-6DDSCXUD.js} +3 -3
- package/dist/{pidfile-MYLBUG2I.js → pidfile-WLZ427QQ.js} +3 -3
- package/dist/{record-Y2JIOP56.js → record-WGCMQLQS.js} +3 -3
- package/dist/{runner-env-Y2PBG7TR.js → runner-env-6FSJOSWS.js} +11 -11
- package/dist/{runner-identity-PL442M57.js → runner-identity-XODZ7YBP.js} +7 -7
- package/dist/{runner-key-L6LXC4QA.js → runner-key-KMTC4NCQ.js} +24 -24
- package/dist/{session-sender-AXROAZSC.js → session-sender-U54EQJNR.js} +11 -11
- package/dist/{spec-cmd-JG4QLGGJ.js → spec-cmd-EM24GTAM.js} +9 -9
- package/dist/{status-VOGNQ3NG.js → status-WVCQCBDQ.js} +31 -31
- package/dist/{sync-cmd-B3KQZJZO.js → sync-cmd-Y5RKWVF7.js} +10 -10
- package/dist/{update-steps-RSYFLNTL.js → update-steps-2D4YQAW2.js} +32 -32
- package/dist/{watch-IHZRBUYV.js → watch-X5VYY4LH.js} +10 -10
- package/dist/{work-claim-cmd-YEMHNW3H.js → work-claim-cmd-IU3YJQKR.js} +15 -15
- package/dist/{work-cmd-OWZS3ZXL.js → work-cmd-LUKJHAMH.js} +8 -8
- package/dist/{work-comment-cmd-ESBYAE4K.js → work-comment-cmd-BDNFAVKL.js} +9 -9
- package/dist/{work-demo-cmd-FT3FQWM7.js → work-demo-cmd-GPDJHU6F.js} +8 -8
- package/dist/{work-logs-cmd-K6NTURGR.js → work-logs-cmd-B6EX4RPE.js} +8 -8
- package/dist/{work-open-pr-cmd-NGD4Z2TO.js → work-open-pr-cmd-TRXDCMSG.js} +9 -9
- package/dist/{work-pr-cmd-274YUPQB.js → work-pr-cmd-5GUR5SIU.js} +8 -8
- package/dist/{work-proofs-cmd-JLSQHVKO.js → work-proofs-cmd-5BYAAW3H.js} +9 -9
- package/dist/{work-proofs-record-AYUWUFBE.js → work-proofs-record-USD4JWFP.js} +16 -16
- package/dist/{work-stop-cmd-VQLLLJ3H.js → work-stop-cmd-J47GZB2N.js} +8 -8
- package/package.json +1 -1
- package/skill-pack/maintained/outerlayer-build/SKILL.md +15 -0
- package/dist/build-ZDYL7ZGP.js +0 -18
- package/dist/find-unit-R4I5GJCH.js +0 -19
|
@@ -1,30 +1,30 @@
|
|
|
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, TAG_HOST, metadataFromLabels, writeRecord } from './chunk-
|
|
5
|
-
import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-
|
|
4
|
+
import { readDefaultBranchHead, cloneRepository, buildRepositoryImage, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, metadataFromLabels, writeRecord } from './chunk-5FHBVV25.js';
|
|
5
|
+
import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-CMMEJJTL.js';
|
|
6
6
|
import { currentCliBuild } from './chunk-OGFGZQA3.js';
|
|
7
|
-
import { runExec, execCapture, waitForAgent } from './chunk-
|
|
8
|
-
import { GUEST_CID, linkVsockSockets } from './chunk-
|
|
9
|
-
import { retrySend, describeCallFailure, keepStagedContext, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, prefetchGovernedContext, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript, WORKFLOW_PERMISSION_REASON } from './chunk-
|
|
10
|
-
import { runnerImageVersion } from './chunk-
|
|
11
|
-
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-
|
|
12
|
-
import { optionalEgress, runnerCredentialProblem, builtinKind, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed } from './chunk-
|
|
13
|
-
import { formatBytes, allocatedBytes } from './chunk-
|
|
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-
|
|
15
|
-
import { RecipeError, DOCKER_FEATURE, writeSanitizedRecipe, classifyProperties } from './chunk-
|
|
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-
|
|
7
|
+
import { runExec, execCapture, waitForAgent } from './chunk-JVNQNKHV.js';
|
|
8
|
+
import { GUEST_CID, linkVsockSockets } from './chunk-BS3OYFAD.js';
|
|
9
|
+
import { retrySend, describeCallFailure, keepStagedContext, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, prefetchGovernedContext, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript, WORKFLOW_PERMISSION_REASON } from './chunk-7Q7GQELE.js';
|
|
10
|
+
import { runnerImageVersion } from './chunk-CFJOONWM.js';
|
|
11
|
+
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-OP2L7OXA.js';
|
|
12
|
+
import { optionalEgress, runnerCredentialProblem, builtinKind, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed } from './chunk-JWMJMQRF.js';
|
|
13
|
+
import { formatBytes, allocatedBytes } from './chunk-LYX2RRSF.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-FLHBUQ2W.js';
|
|
15
|
+
import { RecipeError, DOCKER_FEATURE, universalImagePending, writeSanitizedRecipe, classifyProperties } from './chunk-X7M73LKT.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, universalImagePinned, UNIVERSAL_IMAGE, UNIVERSAL_IMAGE_DIGEST, UNIVERSAL_IMAGE_REPOSITORY, UNIVERSAL_IMAGE_SOURCE, 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-WX2HW2G2.js';
|
|
17
17
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
18
|
-
import { postJson, WorkCommandError, getJson } from './chunk-
|
|
18
|
+
import { postJson, WorkCommandError, getJson } from './chunk-6IMQXBTZ.js';
|
|
19
19
|
import { sanitizeTerminal } from './chunk-IXPH4EXK.js';
|
|
20
|
-
import { signerFor } from './chunk-
|
|
20
|
+
import { signerFor } from './chunk-RJZZFAXS.js';
|
|
21
21
|
import { sharedSkillNames, skillConflictMessage } from './chunk-FGF52V4V.js';
|
|
22
22
|
import { versionAtLeast, MINIMUM_CLAUDE_VERSION } from './chunk-HCVLP7XA.js';
|
|
23
|
-
import { MIN_SCRUBBED_LITERAL, setCustomScrubbers, setLocalIdentity, setRepoRoot, parseTranscript, scrubDeep, scrubText } from './chunk-
|
|
23
|
+
import { MIN_SCRUBBED_LITERAL, setCustomScrubbers, setLocalIdentity, setRepoRoot, parseTranscript, scrubDeep, scrubText } from './chunk-A6PJSNP6.js';
|
|
24
24
|
import { orderSessions, extractFacts, sessionsToTimeline } from './chunk-XFJ7YOPD.js';
|
|
25
25
|
import { downconvertSession } from './chunk-DINRXUQA.js';
|
|
26
|
-
import { vmAssetsDir, RUNNER_DIR_MODE, rootfsPathFor, diskTemplatesDir, RUNNER_FILE_MODE, buildsDir, buildDir, runnerDir, deliveryDir, ghConfigDir, runnerDirOfBuild, spoolDir, mirrorDir, SHIM_DIR, vsockPath, builderCacheDiskPath, builderConsolePath } from './chunk-
|
|
27
|
-
import { claudeCredential, parseIsolation, proxyEnvironment, withProxyWarningHidden, containerLocalAddress, destinationEnvironment, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, withHooksPath, startBuildServices, BUILT_IN_NAMES, repositoriesOf, primaryOf, RELAY_PORT, repositoryPath, CHECKOUT_DIR, lifecycleWorkdir, buildEnvironment, writeBuildMavenSettings, checkEnvironment, AGENT_CREDENTIAL_MISSING, mavenSettingsXml, namesGlobalSettings, MAVEN_NO_PROXY_NOTE, mavenArgs, MAVEN_SPACE_NOTE, writeMavenSettings, checkoutPath, JOB_MOUNT, realFdStorePort } from './chunk-
|
|
26
|
+
import { vmAssetsDir, RUNNER_DIR_MODE, rootfsPathFor, diskTemplatesDir, RUNNER_FILE_MODE, buildsDir, buildDir, runnerDir, deliveryDir, ghConfigDir, runnerDirOfBuild, spoolDir, mirrorDir, SHIM_DIR, vsockPath, builderCacheDiskPath, builderConsolePath } from './chunk-3VJYDWFV.js';
|
|
27
|
+
import { claudeCredential, parseIsolation, proxyEnvironment, withProxyWarningHidden, containerLocalAddress, destinationEnvironment, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, withHooksPath, startBuildServices, BUILT_IN_NAMES, repositoriesOf, primaryOf, RELAY_PORT, repositoryPath, CHECKOUT_DIR, lifecycleWorkdir, buildEnvironment, writeBuildMavenSettings, checkEnvironment, AGENT_CREDENTIAL_MISSING, mavenSettingsXml, namesGlobalSettings, MAVEN_NO_PROXY_NOTE, mavenArgs, MAVEN_SPACE_NOTE, writeMavenSettings, checkoutPath, nodeAcceptsProxyWarningFlag, PROXY_WARNING_FLAG, JOB_MOUNT, realFdStorePort } from './chunk-GMKDAF37.js';
|
|
28
28
|
import { RELAY_USER, RELAY_ID, UNKNOWN_TRANSPORT_REASON, DOCKER_DESKTOP_REASON, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath } from './chunk-MESOOLF4.js';
|
|
29
29
|
import { spawn, spawnSync } from 'child_process';
|
|
30
30
|
import { mkdirSync, existsSync, readFileSync, mkdtempSync, rmSync, chmodSync, truncateSync, statSync, accessSync, constants, readdirSync, writeFileSync, lstatSync, copyFileSync, renameSync, rmdirSync, unlinkSync, linkSync, openSync, closeSync, cpSync, writeSync, appendFileSync, createWriteStream, createReadStream } from 'fs';
|
|
@@ -726,9 +726,9 @@ function createFirecrackerHost(options = {}) {
|
|
|
726
726
|
var BUILD_PREFIX = "build-";
|
|
727
727
|
var LEAF = "runner";
|
|
728
728
|
function serviceDirectory(selfCgroup, mount) {
|
|
729
|
-
const
|
|
730
|
-
if (
|
|
731
|
-
const path =
|
|
729
|
+
const line2 = selfCgroup?.split("\n").find((l) => l.startsWith("0::"));
|
|
730
|
+
if (line2 === void 0) return void 0;
|
|
731
|
+
const path = line2.slice(3).trim();
|
|
732
732
|
if (!path.endsWith(".service")) return void 0;
|
|
733
733
|
return join(mount, path);
|
|
734
734
|
}
|
|
@@ -1781,14 +1781,14 @@ async function deliverExecMaven(build, workdir, base, run, note) {
|
|
|
1781
1781
|
}
|
|
1782
1782
|
function onceNote(write) {
|
|
1783
1783
|
const seen = /* @__PURE__ */ new Set();
|
|
1784
|
-
return (
|
|
1785
|
-
if (seen.has(
|
|
1786
|
-
seen.add(
|
|
1787
|
-
write(
|
|
1784
|
+
return (line2) => {
|
|
1785
|
+
if (seen.has(line2)) return;
|
|
1786
|
+
seen.add(line2);
|
|
1787
|
+
write(line2);
|
|
1788
1788
|
};
|
|
1789
1789
|
}
|
|
1790
1790
|
function attemptNote(log, tag) {
|
|
1791
|
-
return onceNote((
|
|
1791
|
+
return onceNote((line2) => log.line(`${tag} ${line2}`));
|
|
1792
1792
|
}
|
|
1793
1793
|
function hostCommandEnvironment(base, build, config, hooksPath, note) {
|
|
1794
1794
|
let env = { ...base };
|
|
@@ -1875,7 +1875,7 @@ function e2fsckRunner(run = runWithSpawn(), env = process.env) {
|
|
|
1875
1875
|
};
|
|
1876
1876
|
}
|
|
1877
1877
|
function firstLine2(text) {
|
|
1878
|
-
return text.split("\n").find((
|
|
1878
|
+
return text.split("\n").find((line2) => line2.trim() !== "")?.trim() ?? "";
|
|
1879
1879
|
}
|
|
1880
1880
|
async function giveBackCacheSpace(input) {
|
|
1881
1881
|
try {
|
|
@@ -2121,7 +2121,8 @@ function readStored(prepared) {
|
|
|
2121
2121
|
toolsBuilt: false,
|
|
2122
2122
|
checkedCommit: prepared.checkout.commit,
|
|
2123
2123
|
recordDir: prepared.recordDir,
|
|
2124
|
-
|
|
2124
|
+
// On the universal image the stored report is shared by every repository, so the reused result names this build's repository and commit.
|
|
2125
|
+
report: prepared.location.kind === "default" ? { ...stored.report, repository: prepared.repository, sourceCommit: prepared.checkout.commit, defaultBranch: prepared.checkout.defaultBranch } : stored.report,
|
|
2125
2126
|
removed: [],
|
|
2126
2127
|
rootfs: { path, env: stored.env, user: stored.user }
|
|
2127
2128
|
};
|
|
@@ -2148,6 +2149,7 @@ async function buildRootDiskInMicroVm(opts, deps) {
|
|
|
2148
2149
|
try {
|
|
2149
2150
|
const stored = readStored(prepared);
|
|
2150
2151
|
if (stored !== void 0) return stored;
|
|
2152
|
+
if (prepared.location.kind === "default" && !(deps.universalPublished ?? universalImagePinned)()) throw universalImagePending();
|
|
2151
2153
|
return await buildInBuilder(opts, deps, prepared);
|
|
2152
2154
|
} finally {
|
|
2153
2155
|
prepared.release();
|
|
@@ -2161,8 +2163,8 @@ async function buildInBuilder(opts, deps, prepared) {
|
|
|
2161
2163
|
const { repository, owner, name, checkout, location, recipe, repoRecords, recordDir, logPath } = prepared;
|
|
2162
2164
|
const rKey = prepared.recipeKey.slice(0, KEY_PREFIX);
|
|
2163
2165
|
const tKey = prepared.toolsKey.slice(0, KEY_PREFIX);
|
|
2164
|
-
const recipeTag = `${TAG_HOST}/recipe/${
|
|
2165
|
-
const buildTag = `${TAG_HOST}/build/${
|
|
2166
|
+
const recipeTag = `${TAG_HOST}/recipe/${prepared.tagName}:${rKey}`;
|
|
2167
|
+
const buildTag = `${TAG_HOST}/build/${prepared.tagName}:${rKey}-${tKey}`;
|
|
2166
2168
|
const runner = runnerDir(opts.configPath);
|
|
2167
2169
|
const builderDisk = await ports.builderDisk(runner);
|
|
2168
2170
|
const toolFilesDir = await ports.toolFiles(runner);
|
|
@@ -2173,7 +2175,7 @@ async function buildInBuilder(opts, deps, prepared) {
|
|
|
2173
2175
|
const dir = buildDir(opts.configPath, id);
|
|
2174
2176
|
const state = { buildId: id, buildDir: dir, vsockPath: vsockPath(dir) };
|
|
2175
2177
|
const record = { owner, name, id };
|
|
2176
|
-
const cachePath = builderCacheDiskPath(opts.configPath, owner, name);
|
|
2178
|
+
const cachePath = location.kind === "default" ? builderCacheDiskPath(opts.configPath, SHARED_OWNER, SHARED_NAME) : builderCacheDiskPath(opts.configPath, owner, name);
|
|
2177
2179
|
const diskPath = join(dir, "build.ext4");
|
|
2178
2180
|
const partial = join(recordDir, "rootfs.ext4.partial");
|
|
2179
2181
|
const scratchRoot = opts.tmpDir ?? tmpdir();
|
|
@@ -2216,12 +2218,12 @@ async function buildInBuilder(opts, deps, prepared) {
|
|
|
2216
2218
|
lines.push(pending);
|
|
2217
2219
|
pending = "";
|
|
2218
2220
|
}
|
|
2219
|
-
for (const
|
|
2220
|
-
if (
|
|
2221
|
-
else if (
|
|
2222
|
-
else if (
|
|
2221
|
+
for (const line2 of lines) {
|
|
2222
|
+
if (line2.startsWith(RESULT_PREFIX)) result = line2.slice(RESULT_PREFIX.length);
|
|
2223
|
+
else if (line2.startsWith(ENGINE_PANIC_PREFIX)) enginePanic ??= line2.slice(ENGINE_PANIC_PREFIX.length);
|
|
2224
|
+
else if (line2 === ENGINE_STOPPED_LINE) continue;
|
|
2223
2225
|
else {
|
|
2224
|
-
tail.push(
|
|
2226
|
+
tail.push(line2);
|
|
2225
2227
|
if (tail.length > LOG_TAIL_LINES) tail.shift();
|
|
2226
2228
|
}
|
|
2227
2229
|
}
|
|
@@ -2295,7 +2297,8 @@ async function buildInBuilder(opts, deps, prepared) {
|
|
|
2295
2297
|
let recipeParts = { kind: "default" };
|
|
2296
2298
|
const recipeDir = join(scratch, "recipe");
|
|
2297
2299
|
mkdirSync(recipeDir);
|
|
2298
|
-
if (location.kind === "default") writeFileSync(join(recipeDir, "Dockerfile"),
|
|
2300
|
+
if (location.kind === "default") writeFileSync(join(recipeDir, "Dockerfile"), `FROM ${UNIVERSAL_IMAGE}
|
|
2301
|
+
`);
|
|
2299
2302
|
else {
|
|
2300
2303
|
sanitized = writeSanitizedRecipe(checkout.dir, location, recipe);
|
|
2301
2304
|
recipeParts = { kind: "file", config: relative(checkout.dir, sanitized) };
|
|
@@ -2310,7 +2313,15 @@ async function buildInBuilder(opts, deps, prepared) {
|
|
|
2310
2313
|
mkdirSync(join(toolsDir, FETCHED_DIR));
|
|
2311
2314
|
writeFileSync(
|
|
2312
2315
|
join(toolsDir, "Dockerfile"),
|
|
2313
|
-
toolsDockerfile({
|
|
2316
|
+
toolsDockerfile({
|
|
2317
|
+
recipeImage: recipeTag,
|
|
2318
|
+
nodeImage: prepared.nodeImage,
|
|
2319
|
+
claudeCodeVersion: prepared.claudeCodeVersion,
|
|
2320
|
+
buildId: opts.cli.buildId,
|
|
2321
|
+
guestHelper: true,
|
|
2322
|
+
fetched: true,
|
|
2323
|
+
...location.kind === "default" ? { universal: true } : {}
|
|
2324
|
+
})
|
|
2314
2325
|
);
|
|
2315
2326
|
inputs = builderInput({ checkoutDir: checkout.dir, toolsDir, toolFilesDir, recipeDir }, archive);
|
|
2316
2327
|
for (const { target, stream } of inputs) {
|
|
@@ -2360,6 +2371,7 @@ async function buildInBuilder(opts, deps, prepared) {
|
|
|
2360
2371
|
sourceCommit: checkout.commit,
|
|
2361
2372
|
defaultBranch: checkout.defaultBranch,
|
|
2362
2373
|
recipe: location.kind === "default" ? "default" : location.path,
|
|
2374
|
+
...location.kind === "default" ? { base: { reference: `${UNIVERSAL_IMAGE_REPOSITORY}:${UNIVERSAL_IMAGE_SOURCE}`, digest: UNIVERSAL_IMAGE_DIGEST } } : {},
|
|
2363
2375
|
recipeKey: prepared.recipeKey,
|
|
2364
2376
|
toolsKey: prepared.toolsKey,
|
|
2365
2377
|
imageId: `${ROOT_DISK_ID_PREFIX}${rKey}-${tKey}`,
|
|
@@ -2428,7 +2440,7 @@ async function buildInBuilder(opts, deps, prepared) {
|
|
|
2428
2440
|
}
|
|
2429
2441
|
const refusals = tunnel?.record().refusals ?? [];
|
|
2430
2442
|
if (err instanceof StepFailed && refusals.length > 0) return new RecipeError("image_builder_failed", refusalReason(refusals, logPath), logPath);
|
|
2431
|
-
const last = tail.filter((
|
|
2443
|
+
const last = tail.filter((line2) => line2.trim() !== "").at(-1);
|
|
2432
2444
|
const why = err instanceof StepFailed ? err.message : `the builder microVM failed: ${describeCallFailure(err)}`;
|
|
2433
2445
|
const panicNote = enginePanic === void 0 ? "" : `; the first panic in the Docker engine's log was: ${enginePanic}`;
|
|
2434
2446
|
return new RecipeError("image_builder_failed", `${why}${panicNote}${last === void 0 ? "" : `; the last line was: ${last}`}. The build log is at ${logPath}`, logPath);
|
|
@@ -2882,14 +2894,156 @@ function lifecycleFailureReason(step, exitCode) {
|
|
|
2882
2894
|
return `lifecycle command ${step.name} (${step.source}) exited ${exitCode}`;
|
|
2883
2895
|
}
|
|
2884
2896
|
|
|
2897
|
+
// src/runner/runtimes.ts
|
|
2898
|
+
var RUNTIMES = ["node", "python", "go", "rust", "ruby", "java"];
|
|
2899
|
+
var MANIFESTS = {
|
|
2900
|
+
"package.json": "node",
|
|
2901
|
+
"pyproject.toml": "python",
|
|
2902
|
+
"requirements.txt": "python",
|
|
2903
|
+
"go.mod": "go",
|
|
2904
|
+
"Cargo.toml": "rust",
|
|
2905
|
+
Gemfile: "ruby",
|
|
2906
|
+
"pom.xml": "java",
|
|
2907
|
+
"build.gradle": "java",
|
|
2908
|
+
"build.gradle.kts": "java"
|
|
2909
|
+
};
|
|
2910
|
+
var IMAGE_CONFIG = "/etc/mise/config.toml";
|
|
2911
|
+
var RUST_PIN_FILES = ["rust-toolchain.toml", "rust-toolchain"];
|
|
2912
|
+
var REFUSALS_NAMED2 = 3;
|
|
2913
|
+
var PLAIN = { withoutProxyWarning: true };
|
|
2914
|
+
function firstLine4(text) {
|
|
2915
|
+
return text.trim().split("\n")[0] ?? "";
|
|
2916
|
+
}
|
|
2917
|
+
function toolFailure(stderr) {
|
|
2918
|
+
for (const l of stderr.split("\n")) {
|
|
2919
|
+
if (/^\S+@\S+: /.test(l)) return l;
|
|
2920
|
+
const summary = /^\s*mise ✗ (\S+@\S+)\s+.*?· failed: (.+)$/.exec(l);
|
|
2921
|
+
if (summary !== null) return `${summary[1]}: ${summary[2]}`;
|
|
2922
|
+
}
|
|
2923
|
+
return "";
|
|
2924
|
+
}
|
|
2925
|
+
function describeSource(source, path) {
|
|
2926
|
+
if (source === void 0 || source === IMAGE_CONFIG) return "the image default";
|
|
2927
|
+
return source.startsWith(`${path}/`) ? source.slice(path.length + 1) : source;
|
|
2928
|
+
}
|
|
2929
|
+
function parseListing(stdout) {
|
|
2930
|
+
try {
|
|
2931
|
+
const parsed = JSON.parse(stdout);
|
|
2932
|
+
return Object.entries(parsed).flatMap(
|
|
2933
|
+
([tool, versions]) => (Array.isArray(versions) ? versions : []).flatMap(
|
|
2934
|
+
(entry) => typeof entry.version === "string" ? [{ tool, version: entry.version, source: typeof entry.source?.path === "string" ? entry.source.path : void 0, installed: entry.installed !== false }] : []
|
|
2935
|
+
)
|
|
2936
|
+
);
|
|
2937
|
+
} catch {
|
|
2938
|
+
return void 0;
|
|
2939
|
+
}
|
|
2940
|
+
}
|
|
2941
|
+
async function listing(context) {
|
|
2942
|
+
const ran = await context.input.exec(["mise", "ls", "--current", "--json"], context.path, { quiet: true, ...PLAIN });
|
|
2943
|
+
return ran.status === 0 ? parseListing(ran.stdout) : void 0;
|
|
2944
|
+
}
|
|
2945
|
+
function refusalNote(context) {
|
|
2946
|
+
const named = context.input.refusals().slice(context.refusalsBefore).slice(0, REFUSALS_NAMED2).map((r) => r.range === "not-allowed" ? `${r.host} (not in runner.build.allowHosts)` : `${r.host} (${r.range})`);
|
|
2947
|
+
return named.length === 0 ? "" : `; the build's tunnel refused ${named.join(", ")}`;
|
|
2948
|
+
}
|
|
2949
|
+
function line(context, text) {
|
|
2950
|
+
context.input.log.line(`${context.input.tag} runtimes ${context.entry.repository}: ${text}`);
|
|
2951
|
+
}
|
|
2952
|
+
var installWithMise = async (context) => {
|
|
2953
|
+
const { input, entry, path } = context;
|
|
2954
|
+
context.before = await listing(context) ?? [];
|
|
2955
|
+
const installed = await input.exec(["mise", "install"], path, PLAIN);
|
|
2956
|
+
if (installed.status !== 0) {
|
|
2957
|
+
const missing = context.before.filter((r) => !r.installed).map((r) => `${r.tool} ${r.version} (from ${describeSource(r.source, path)})`);
|
|
2958
|
+
const what = missing.length === 0 ? `mise install failed in ${entry.repository} (exit ${installed.status})${firstLine4(installed.stderr) === "" ? "" : `: ${firstLine4(installed.stderr)}`}` : `mise could not install ${missing.join(", ")} in ${entry.repository} (exit ${installed.status})${toolFailure(installed.stderr) === "" ? "" : `: ${toolFailure(installed.stderr)}`}`;
|
|
2959
|
+
return `runtime_install_failed: ${what}${refusalNote(context)}`;
|
|
2960
|
+
}
|
|
2961
|
+
const after = await listing(context);
|
|
2962
|
+
if (after === void 0) return `runtime_install_failed: mise installed the tools but its listing failed in ${entry.repository}${refusalNote(context)}`;
|
|
2963
|
+
context.resolved = after;
|
|
2964
|
+
for (const r of context.resolved) line(context, `${r.tool} ${r.version} from ${describeSource(r.source, path)}`);
|
|
2965
|
+
return void 0;
|
|
2966
|
+
};
|
|
2967
|
+
var goToolchain = async (context) => {
|
|
2968
|
+
if (!context.files.has("go.mod")) return void 0;
|
|
2969
|
+
const ran = await context.input.exec(["go", "version"], context.path);
|
|
2970
|
+
if (ran.status !== 0) return `runtime_install_failed: go version failed in ${context.entry.repository} (exit ${ran.status})${firstLine4(ran.stderr) === "" ? "" : `: ${firstLine4(ran.stderr)}`}${refusalNote(context)}`;
|
|
2971
|
+
const version = /\bgo(\d+\.\d+(?:\.\d+)?\S*)/.exec(ran.stdout)?.[1];
|
|
2972
|
+
line(context, `go ${version ?? firstLine4(ran.stdout)} from go.mod`);
|
|
2973
|
+
return void 0;
|
|
2974
|
+
};
|
|
2975
|
+
var rustToolchain = async (context) => {
|
|
2976
|
+
const pin = RUST_PIN_FILES.find((file) => context.files.has(file));
|
|
2977
|
+
if (pin === void 0) return void 0;
|
|
2978
|
+
const ran = await context.input.exec(["rustc", "--version"], context.path);
|
|
2979
|
+
if (ran.status !== 0) return `runtime_install_failed: rustc --version failed in ${context.entry.repository} (exit ${ran.status})${firstLine4(ran.stderr) === "" ? "" : `: ${firstLine4(ran.stderr)}`}${refusalNote(context)}`;
|
|
2980
|
+
const version = /\brustc (\S+)/.exec(ran.stdout)?.[1];
|
|
2981
|
+
line(context, `rust ${version ?? firstLine4(ran.stdout)} from ${pin}`);
|
|
2982
|
+
return void 0;
|
|
2983
|
+
};
|
|
2984
|
+
var CHECKOUT_STEPS = [installWithMise, goToolchain, rustToolchain];
|
|
2985
|
+
function unpinnedIn(context) {
|
|
2986
|
+
const used = new Set([...context.files].map((file) => MANIFESTS[file]));
|
|
2987
|
+
const pinned = new Set(context.resolved.filter((r) => r.source?.startsWith(`${context.path}/`)).map((r) => r.tool));
|
|
2988
|
+
pinned.add("go");
|
|
2989
|
+
if (RUST_PIN_FILES.some((file) => context.files.has(file))) pinned.add("rust");
|
|
2990
|
+
return RUNTIMES.filter((runtime) => used.has(runtime) && !pinned.has(runtime));
|
|
2991
|
+
}
|
|
2992
|
+
async function provisionRuntimes(input) {
|
|
2993
|
+
const unpinned = {};
|
|
2994
|
+
let dropProxyWarning = false;
|
|
2995
|
+
for (const entry of input.repositories) {
|
|
2996
|
+
if (input.aborted?.() === true) return { ok: false, reason: "", aborted: true };
|
|
2997
|
+
const path = checkoutPath(entry);
|
|
2998
|
+
const listed = await input.exec(["ls", "-1", "-A"], path, { quiet: true });
|
|
2999
|
+
const context = {
|
|
3000
|
+
input,
|
|
3001
|
+
entry,
|
|
3002
|
+
path,
|
|
3003
|
+
files: new Set(listed.status === 0 ? listed.stdout.split("\n").map((name) => name.trim()) : []),
|
|
3004
|
+
refusalsBefore: input.refusals().length,
|
|
3005
|
+
before: [],
|
|
3006
|
+
resolved: []
|
|
3007
|
+
};
|
|
3008
|
+
for (const step of CHECKOUT_STEPS) {
|
|
3009
|
+
const reason = await step(context);
|
|
3010
|
+
if (reason !== void 0) return { ok: false, reason };
|
|
3011
|
+
}
|
|
3012
|
+
unpinned[entry.repository] = unpinnedIn(context);
|
|
3013
|
+
const old = context.resolved.find((r) => r.tool === "node" && !nodeAcceptsProxyWarningFlag(r.version));
|
|
3014
|
+
if (old !== void 0) {
|
|
3015
|
+
dropProxyWarning = true;
|
|
3016
|
+
line(context, `leaving ${PROXY_WARNING_FLAG} out of NODE_OPTIONS because node ${old.version} does not accept it`);
|
|
3017
|
+
}
|
|
3018
|
+
}
|
|
3019
|
+
return { ok: true, unpinned, dropProxyWarning };
|
|
3020
|
+
}
|
|
3021
|
+
function runtimeStepInput(report, services) {
|
|
3022
|
+
return report.base === void 0 ? {} : { runtimes: { refusals: () => services.record().refusals } };
|
|
3023
|
+
}
|
|
3024
|
+
function keepUnpinnedRuntimes(state, steps) {
|
|
3025
|
+
if (steps.unpinnedRuntimes !== void 0) state.unpinnedRuntimes = steps.unpinnedRuntimes;
|
|
3026
|
+
}
|
|
3027
|
+
|
|
2885
3028
|
// src/runner/build-steps.ts
|
|
2886
3029
|
var aborted = () => ({ ok: false, reason: "", aborted: true });
|
|
2887
|
-
function
|
|
3030
|
+
function firstLine5(text) {
|
|
2888
3031
|
return text.trim().split("\n")[0] ?? "";
|
|
2889
3032
|
}
|
|
3033
|
+
async function nodeRejectsProxyWarningFlag(repositories, exec, log, tag) {
|
|
3034
|
+
for (const entry of repositories) {
|
|
3035
|
+
const ran = await exec(["node", "--version"], checkoutPath(entry), { quiet: true, withoutProxyWarning: true });
|
|
3036
|
+
if (ran.status !== 0) continue;
|
|
3037
|
+
const version = firstLine5(ran.stdout);
|
|
3038
|
+
if (nodeAcceptsProxyWarningFlag(version)) continue;
|
|
3039
|
+
log.line(`${tag} ${entry.repository}: leaving ${PROXY_WARNING_FLAG} out of NODE_OPTIONS because node ${version} does not accept it`);
|
|
3040
|
+
return true;
|
|
3041
|
+
}
|
|
3042
|
+
return false;
|
|
3043
|
+
}
|
|
2890
3044
|
function gitErrorLine(text) {
|
|
2891
|
-
const lines = text.split("\n").map((
|
|
2892
|
-
return lines.find((
|
|
3045
|
+
const lines = text.split("\n").map((line2) => line2.trim()).filter((line2) => line2 !== "");
|
|
3046
|
+
return lines.find((line2) => /^(fatal|error):/.test(line2)) ?? lines.at(-1) ?? "";
|
|
2893
3047
|
}
|
|
2894
3048
|
var STAGED_TREE = `${JOB_MOUNT}/context/tree`;
|
|
2895
3049
|
var DELIVER_SCRIPT = [
|
|
@@ -2905,7 +3059,7 @@ var DELIVER_SCRIPT = [
|
|
|
2905
3059
|
var RECORD_SCRIPT = 'd="$(git rev-parse --git-common-dir)" && mkdir -p "$d/outerlayer" && printf "%s" "$1" > "$d/outerlayer/delivery.json"';
|
|
2906
3060
|
var WRITE_SHIM_SCRIPT = 'mkdir -p "$1" && printf "%s" "$2" > "$1/claude" && chmod 755 "$1/claude"';
|
|
2907
3061
|
function failure(what, result) {
|
|
2908
|
-
return `context_delivery_failed: ${what} (exit ${result.status})${
|
|
3062
|
+
return `context_delivery_failed: ${what} (exit ${result.status})${firstLine5(result.stderr) === "" ? "" : `: ${firstLine5(result.stderr)}`}`;
|
|
2909
3063
|
}
|
|
2910
3064
|
async function repositorySkills(input, folder) {
|
|
2911
3065
|
const listed = await input.exec(["ls", "-1", folder], CHECKOUT_DIR, { quiet: true });
|
|
@@ -3007,6 +3161,16 @@ async function runBuildSteps(input) {
|
|
|
3007
3161
|
if (!checked.ok) return checked;
|
|
3008
3162
|
}
|
|
3009
3163
|
if (input.governing !== void 0) await noteIgnoredDevcontainers(input, repositories, input.governing.repository);
|
|
3164
|
+
let unpinnedRuntimes;
|
|
3165
|
+
const ordered = [{ ...primary, primary: true }, ...repositories.filter((candidate) => candidate.repository !== primary.repository).map((entry) => ({ ...entry, primary: false }))];
|
|
3166
|
+
if (input.runtimes !== void 0) {
|
|
3167
|
+
const chosen = await provisionRuntimes({ repositories: ordered, exec, log, tag, refusals: input.runtimes.refusals, aborted: input.aborted });
|
|
3168
|
+
if (!chosen.ok) return chosen.aborted === true ? aborted() : { ok: false, reason: chosen.reason };
|
|
3169
|
+
unpinnedRuntimes = chosen.unpinned;
|
|
3170
|
+
if (chosen.dropProxyWarning) input.dropProxyWarning?.();
|
|
3171
|
+
} else if (input.dropProxyWarning !== void 0 && await nodeRejectsProxyWarningFlag(ordered, exec, log, tag)) {
|
|
3172
|
+
input.dropProxyWarning();
|
|
3173
|
+
}
|
|
3010
3174
|
const lifecycleDir = lifecycleWorkdir(repositories, input.governing?.repository);
|
|
3011
3175
|
for (const step of lifecycleSteps(input.lifecycle)) {
|
|
3012
3176
|
if (input.aborted()) return aborted();
|
|
@@ -3051,7 +3215,7 @@ async function runBuildSteps(input) {
|
|
|
3051
3215
|
}
|
|
3052
3216
|
if (input.aborted()) return aborted();
|
|
3053
3217
|
}
|
|
3054
|
-
return { ok: true, startCommit, ...controlPlane === void 0 ? {} : { controlPlane } };
|
|
3218
|
+
return { ok: true, startCommit, ...controlPlane === void 0 ? {} : { controlPlane }, ...unpinnedRuntimes === void 0 ? {} : { unpinnedRuntimes } };
|
|
3055
3219
|
}
|
|
3056
3220
|
var EVAL_INPUT_NAME = "eval-input";
|
|
3057
3221
|
var TRANSCRIPT_ROOT = "/build/home/.claude/projects";
|
|
@@ -3060,7 +3224,7 @@ var MAX_TRANSCRIPTS = 500;
|
|
|
3060
3224
|
var MAX_TOTAL_TRANSCRIPT_BYTES = 64 * 1024 * 1024;
|
|
3061
3225
|
var TRANSCRIPT_COPY_MS = 2 * 60 * 1e3;
|
|
3062
3226
|
var BUILD_HOME = "/build/home";
|
|
3063
|
-
function
|
|
3227
|
+
function firstLine6(text) {
|
|
3064
3228
|
return text.trim().split("\n")[0] ?? "";
|
|
3065
3229
|
}
|
|
3066
3230
|
async function copyTranscripts(run, now = Date.now) {
|
|
@@ -3072,7 +3236,7 @@ async function copyTranscripts(run, now = Date.now) {
|
|
|
3072
3236
|
return { ok: false, reason: describeCallFailure(err) };
|
|
3073
3237
|
}
|
|
3074
3238
|
if (listed.status !== 0 && !/No such file or directory/.test(listed.stderr)) {
|
|
3075
|
-
return { ok: false, reason: `listing the transcripts failed (exit ${listed.status})${
|
|
3239
|
+
return { ok: false, reason: `listing the transcripts failed (exit ${listed.status})${firstLine6(listed.stderr) === "" ? "" : `: ${firstLine6(listed.stderr)}`}` };
|
|
3076
3240
|
}
|
|
3077
3241
|
const paths = listed.stdout.split("\0").filter((entry) => entry.startsWith(`${TRANSCRIPT_ROOT}/`) && !entry.includes("\n") && !entry.slice(TRANSCRIPT_ROOT.length + 1).split("/").includes("..")).map((entry) => entry.slice(TRANSCRIPT_ROOT.length + 1)).sort();
|
|
3078
3242
|
const copied = [];
|
|
@@ -3089,7 +3253,7 @@ async function copyTranscripts(run, now = Date.now) {
|
|
|
3089
3253
|
}
|
|
3090
3254
|
try {
|
|
3091
3255
|
const read = await run(["head", "-c", String(MAX_TRANSCRIPT_BYTES + 1), `${TRANSCRIPT_ROOT}/${path}`]);
|
|
3092
|
-
if (read.status !== 0) missed.push({ path, reason: `reading it failed (exit ${read.status})${
|
|
3256
|
+
if (read.status !== 0) missed.push({ path, reason: `reading it failed (exit ${read.status})${firstLine6(read.stderr) === "" ? "" : `: ${firstLine6(read.stderr)}`}` });
|
|
3093
3257
|
else if (Buffer.byteLength(read.stdout) > MAX_TRANSCRIPT_BYTES) missed.push({ path, reason: `it is larger than ${MAX_TRANSCRIPT_BYTES / (1024 * 1024)} MiB` });
|
|
3094
3258
|
else if (total + Buffer.byteLength(read.stdout) > MAX_TOTAL_TRANSCRIPT_BYTES) missed.push({ path, reason: `copying it would take the transcripts past ${MAX_TOTAL_TRANSCRIPT_BYTES / (1024 * 1024)} MiB` });
|
|
3095
3259
|
else {
|
|
@@ -3133,11 +3297,11 @@ function scrubbing(scrub, author, work) {
|
|
|
3133
3297
|
setRepoRoot(void 0);
|
|
3134
3298
|
}
|
|
3135
3299
|
}
|
|
3136
|
-
function scrubLine(
|
|
3300
|
+
function scrubLine(line2) {
|
|
3137
3301
|
try {
|
|
3138
|
-
return JSON.stringify(scrubDeep(JSON.parse(
|
|
3302
|
+
return JSON.stringify(scrubDeep(JSON.parse(line2)));
|
|
3139
3303
|
} catch {
|
|
3140
|
-
return scrubText(
|
|
3304
|
+
return scrubText(line2);
|
|
3141
3305
|
}
|
|
3142
3306
|
}
|
|
3143
3307
|
function writeReadOnly(path, text) {
|
|
@@ -3211,7 +3375,7 @@ async function writeEvalInput(request) {
|
|
|
3211
3375
|
continue;
|
|
3212
3376
|
}
|
|
3213
3377
|
const file = `sessions/${traceId}.jsonl`;
|
|
3214
|
-
const text = transcript.content.split("\n").filter((
|
|
3378
|
+
const text = transcript.content.split("\n").filter((line2) => line2.trim() !== "").map(scrubLine).join("\n");
|
|
3215
3379
|
writeReadOnly(join(dir, file), `${text}
|
|
3216
3380
|
`);
|
|
3217
3381
|
scrubDeep(session);
|
|
@@ -3638,8 +3802,8 @@ async function deliverTar(runtime, state, input) {
|
|
|
3638
3802
|
{ timeoutMs: DELIVERY_TIMEOUT_MS }
|
|
3639
3803
|
);
|
|
3640
3804
|
if (result.status === 0) return { ok: true };
|
|
3641
|
-
const
|
|
3642
|
-
return { ok: false, reason: `${input.step} could not be delivered (exit ${result.status})${
|
|
3805
|
+
const line2 = scrubDelivery(result.stderr.trim().split("\n")[0] ?? "", input.secrets);
|
|
3806
|
+
return { ok: false, reason: `${input.step} could not be delivered (exit ${result.status})${line2 === "" ? "" : `: ${line2}`}` };
|
|
3643
3807
|
} catch (err) {
|
|
3644
3808
|
return { ok: false, reason: `${input.step} could not be delivered: ${scrubDelivery(describeCallFailure(err), input.secrets)}` };
|
|
3645
3809
|
}
|
|
@@ -3762,18 +3926,18 @@ function parse(data) {
|
|
|
3762
3926
|
const length = Number.parseInt(header, 16);
|
|
3763
3927
|
if (length === 0) return { kind: "commands", commands, capabilities };
|
|
3764
3928
|
if (data.length - offset < length) return { kind: "need-more" };
|
|
3765
|
-
const
|
|
3929
|
+
const line2 = data.subarray(offset + 4, offset + length);
|
|
3766
3930
|
offset += length;
|
|
3767
3931
|
if (offset > limits().sectionBytes) return refused(TOO_LONG);
|
|
3768
3932
|
const first = commands.length === 0;
|
|
3769
|
-
const nul =
|
|
3770
|
-
const decoded = decodeText(first && nul !== -1 ?
|
|
3933
|
+
const nul = line2.indexOf(0);
|
|
3934
|
+
const decoded = decodeText(first && nul !== -1 ? line2.subarray(0, nul) : line2);
|
|
3771
3935
|
if (decoded === void 0) return refused(UNREADABLE);
|
|
3772
3936
|
const text = decoded.replace(/\n$/, "");
|
|
3773
3937
|
if (first && text.startsWith("shallow ")) continue;
|
|
3774
3938
|
const match = COMMAND.exec(text);
|
|
3775
3939
|
if (match === null) return refused(UNREADABLE);
|
|
3776
|
-
if (first && nul !== -1) capabilities =
|
|
3940
|
+
if (first && nul !== -1) capabilities = line2.subarray(nul + 1).toString("latin1").split(/\s+/).filter((word) => word !== "");
|
|
3777
3941
|
commands.push({ oldId: match[1], newId: match[2], ref: match[3] });
|
|
3778
3942
|
}
|
|
3779
3943
|
}
|
|
@@ -3927,7 +4091,7 @@ function createGitRemote(options) {
|
|
|
3927
4091
|
const claimed = options.repositories ?? (options.repository === void 0 || options.branch === void 0 || options.mirrorDir === void 0 ? [] : [{ repository: options.repository, branch: options.branch, mirrorDir: options.mirrorDir }]);
|
|
3928
4092
|
const maxLfsBodyBytes = 1024 * 1024;
|
|
3929
4093
|
const hopByHop = /* @__PURE__ */ new Set(["connection", "keep-alive", "transfer-encoding", "upgrade", "proxy-authenticate", "proxy-authorization", "te", "trailer", "set-cookie"]);
|
|
3930
|
-
const log = (
|
|
4094
|
+
const log = (line2) => options.log?.(line2);
|
|
3931
4095
|
function forward(input) {
|
|
3932
4096
|
const { route, res } = input;
|
|
3933
4097
|
const url = new URL(`${gitUrl}/${route.owner}/${route.name}.git/${route.kind === "info-refs" ? "info/refs" : route.kind === "lfs-batch" ? "info/lfs/objects/batch" : `git-${route.kind}`}${route.search === "" ? "" : `?${route.search}`}`);
|
|
@@ -4345,7 +4509,7 @@ function gitRemoteFor(runtime, input) {
|
|
|
4345
4509
|
...input.readOnly === true ? { readOnly: true } : {}
|
|
4346
4510
|
});
|
|
4347
4511
|
}
|
|
4348
|
-
function
|
|
4512
|
+
function firstLine7(text) {
|
|
4349
4513
|
return text.trim().split("\n")[0] ?? "";
|
|
4350
4514
|
}
|
|
4351
4515
|
var NO_ENV = { literals: {}, passed: {} };
|
|
@@ -4409,7 +4573,7 @@ async function obtainImage(input) {
|
|
|
4409
4573
|
};
|
|
4410
4574
|
}
|
|
4411
4575
|
try {
|
|
4412
|
-
const common = { repository, configPath: config.configPath, readToken, pinned: input.pinned, log: (
|
|
4576
|
+
const common = { repository, configPath: config.configPath, readToken, pinned: input.pinned, log: (line2) => log.line(`${tag} ${line2}`) };
|
|
4413
4577
|
if (input.inBuilder !== void 0) {
|
|
4414
4578
|
return { ok: true, built: await runtime.buildRootDisk({ ...input.inBuilder, ...common, guestHelper: input.guestHelper, deadlineMs: input.deadlineMs }) };
|
|
4415
4579
|
}
|
|
@@ -4547,7 +4711,7 @@ async function provisionContainer(input) {
|
|
|
4547
4711
|
}
|
|
4548
4712
|
return aborted2 ? { ok: false, reason: "ended before provision finished", aborted: true } : fail(reason);
|
|
4549
4713
|
};
|
|
4550
|
-
const dockerFailed = (what, result) => bail(`${what} failed (exit ${result.status})${
|
|
4714
|
+
const dockerFailed = (what, result) => bail(`${what} failed (exit ${result.status})${firstLine7(result.stderr) === "" ? "" : `: ${firstLine7(result.stderr)}`}`);
|
|
4551
4715
|
if (input.aborted()) return bail("", true);
|
|
4552
4716
|
mkdirSync(buildDir2, { recursive: true });
|
|
4553
4717
|
const ghDir = ghConfigDir(buildDir2);
|
|
@@ -4578,8 +4742,8 @@ async function provisionContainer(input) {
|
|
|
4578
4742
|
environment.credentials = tokens.used();
|
|
4579
4743
|
let services;
|
|
4580
4744
|
try {
|
|
4581
|
-
const gitRemote = gitRemoteFor(runtime, { repositories, tokens, buildDir: buildDir2, log: (
|
|
4582
|
-
services = await startServicesFor(runtime, config, buildDir2, jobDir, itemKey, true, gitRemote, "stream", input.leaseExpiryMs === void 0 ? void 0 : leaseFor(runtime, buildId, input.leaseExpiryMs), void 0, (
|
|
4745
|
+
const gitRemote = gitRemoteFor(runtime, { repositories, tokens, buildDir: buildDir2, log: (line2) => log.line(`${tag} ${line2}`) });
|
|
4746
|
+
services = await startServicesFor(runtime, config, buildDir2, jobDir, itemKey, true, gitRemote, "stream", input.leaseExpiryMs === void 0 ? void 0 : leaseFor(runtime, buildId, input.leaseExpiryMs), void 0, (line2) => log.line(`${tag} ${line2}`));
|
|
4583
4747
|
runtime.tunnels.set(buildId, services);
|
|
4584
4748
|
} catch (err) {
|
|
4585
4749
|
return bail(`the tunnel could not start: ${describeCallFailure(err)}`);
|
|
@@ -4606,7 +4770,7 @@ async function provisionContainer(input) {
|
|
|
4606
4770
|
if (prepared.status !== 0) return dockerFailed("preparing the build's volume", prepared);
|
|
4607
4771
|
const started = await host.run(containerRunArgs(runInput), { logPath });
|
|
4608
4772
|
if (started.status !== 0) return dockerFailed("starting the build's container", started);
|
|
4609
|
-
joinBuild(runtime, state, services, (
|
|
4773
|
+
joinBuild(runtime, state, services, (line2) => log.line(`${tag} ${line2}`));
|
|
4610
4774
|
if (input.aborted()) return bail("", true);
|
|
4611
4775
|
if (!await waitForRelay(runtime, state)) return bail("the relay in the build's container did not start");
|
|
4612
4776
|
const ghDelivered = await deliverJobFiles(runtime, state, ["gh", "maven"], secrets);
|
|
@@ -4643,9 +4807,10 @@ async function provisionContainer(input) {
|
|
|
4643
4807
|
const hashed = program.status === 0 ? parseProgramHash(program.stdout) : void 0;
|
|
4644
4808
|
if (hashed !== void 0) state.judgeProgram = { path: JUDGE_PROGRAM, sha256: hashed };
|
|
4645
4809
|
input.save(state, environment);
|
|
4646
|
-
|
|
4810
|
+
let execEnv = buildEnvironment({ ...envInput, imageEnv: state.imageEnv });
|
|
4647
4811
|
for (const notice of execEnv.notices) log.line(`${tag} ${notice}`);
|
|
4648
|
-
const
|
|
4812
|
+
const plainEnv = buildEnvironment({ ...envInput, imageEnv: state.imageEnv, proxyWarning: false });
|
|
4813
|
+
const exec = (argv, workdir, opts) => host.exec({ container: name, user: agentUser, workdir, env: opts?.withoutProxyWarning === true ? plainEnv : execEnv, argv }, opts?.quiet === true ? void 0 : { logPath });
|
|
4649
4814
|
const steps = await runBuildSteps({
|
|
4650
4815
|
repository,
|
|
4651
4816
|
branch: primary.branch,
|
|
@@ -4676,10 +4841,17 @@ async function provisionContainer(input) {
|
|
|
4676
4841
|
},
|
|
4677
4842
|
removeStagedContext: () => removeStagedContext(buildDir2),
|
|
4678
4843
|
keepIn: jobDir,
|
|
4679
|
-
...input.requireBuildSkill === true ? { requireBuildSkill: true } : {}
|
|
4844
|
+
...input.requireBuildSkill === true ? { requireBuildSkill: true } : {},
|
|
4845
|
+
// A repository with no devcontainer file builds on the universal image, whose runtimes the build chooses and installs.
|
|
4846
|
+
...runtimeStepInput(report, services),
|
|
4847
|
+
dropProxyWarning: () => {
|
|
4848
|
+
state.proxyWarningDropped = true;
|
|
4849
|
+
execEnv = plainEnv;
|
|
4850
|
+
}
|
|
4680
4851
|
});
|
|
4681
4852
|
if (!steps.ok) return bail(steps.reason, steps.aborted === true);
|
|
4682
4853
|
state.startCommit = steps.startCommit;
|
|
4854
|
+
keepUnpinnedRuntimes(state, steps);
|
|
4683
4855
|
if (steps.controlPlane !== void 0) environment.controlPlane = steps.controlPlane;
|
|
4684
4856
|
return { ok: true, workdir: CHECKOUT_DIR, state, environment };
|
|
4685
4857
|
}
|
|
@@ -4705,9 +4877,11 @@ function containerCommandExec(input) {
|
|
|
4705
4877
|
repositories: input.job.repositories,
|
|
4706
4878
|
hostEnv: input.runtime.hostEnv,
|
|
4707
4879
|
containerEnv: state.containerEnv ?? {},
|
|
4880
|
+
unpinnedRuntimes: state.unpinnedRuntimes,
|
|
4708
4881
|
builtIns: state.builtIns === true,
|
|
4709
4882
|
identity: input.job.commitIdentity,
|
|
4710
|
-
imageEnv: state.imageEnv
|
|
4883
|
+
imageEnv: state.imageEnv,
|
|
4884
|
+
proxyWarning: state.proxyWarningDropped !== true
|
|
4711
4885
|
});
|
|
4712
4886
|
return {
|
|
4713
4887
|
container: state.container,
|
|
@@ -4729,9 +4903,11 @@ function containerSenderCommand(input) {
|
|
|
4729
4903
|
repositories: input.job.repositories,
|
|
4730
4904
|
hostEnv: input.runtime.hostEnv,
|
|
4731
4905
|
containerEnv: state.containerEnv ?? {},
|
|
4906
|
+
unpinnedRuntimes: state.unpinnedRuntimes,
|
|
4732
4907
|
builtIns: state.builtIns === true,
|
|
4733
4908
|
identity: input.job.commitIdentity,
|
|
4734
|
-
imageEnv: state.imageEnv
|
|
4909
|
+
imageEnv: state.imageEnv,
|
|
4910
|
+
proxyWarning: state.proxyWarningDropped !== true
|
|
4735
4911
|
});
|
|
4736
4912
|
const args = containerExecArgs({
|
|
4737
4913
|
container: state.container,
|
|
@@ -4860,9 +5036,11 @@ async function syncInContainer(input) {
|
|
|
4860
5036
|
repositories: job.repositories,
|
|
4861
5037
|
hostEnv: runtime.hostEnv,
|
|
4862
5038
|
containerEnv: state.containerEnv ?? {},
|
|
5039
|
+
unpinnedRuntimes: state.unpinnedRuntimes,
|
|
4863
5040
|
builtIns: state.builtIns === true,
|
|
4864
5041
|
identity: job.commitIdentity,
|
|
4865
|
-
imageEnv: state.imageEnv
|
|
5042
|
+
imageEnv: state.imageEnv,
|
|
5043
|
+
proxyWarning: state.proxyWarningDropped !== true
|
|
4866
5044
|
});
|
|
4867
5045
|
const result = await runtime.host.exec(
|
|
4868
5046
|
{ container: state.container, user: state.agentUser ?? ADDED_USER, workdir: job.workdir ?? CHECKOUT_DIR, env, argv: ["outerlayer", "sync"] },
|
|
@@ -4937,7 +5115,7 @@ function containerJudgeEnvironment(input) {
|
|
|
4937
5115
|
env: NO_ENV,
|
|
4938
5116
|
argv: ["/bin/sh", "-c", `[ -f ${file} ] && [ ! -L ${file} ] && head -c ${maxBytes + 1} ${file}`]
|
|
4939
5117
|
}, { timeoutMs: REPORT_READ_TIMEOUT_MS });
|
|
4940
|
-
if (read.status > 1) throw new Error(`reading the judge's ${name} exited ${read.status}: ${
|
|
5118
|
+
if (read.status > 1) throw new Error(`reading the judge's ${name} exited ${read.status}: ${firstLine7(read.stderr)}`);
|
|
4941
5119
|
return read.status === 0 && Buffer.byteLength(read.stdout) <= maxBytes ? read.stdout : void 0;
|
|
4942
5120
|
};
|
|
4943
5121
|
return {
|
|
@@ -4955,7 +5133,7 @@ function containerJudgeEnvironment(input) {
|
|
|
4955
5133
|
hashProgram: async () => {
|
|
4956
5134
|
const ran = await runtime.host.exec({ container: state.container, user: ADDED_USER, env: NO_ENV, argv: [...HASH_ARGV] });
|
|
4957
5135
|
const sha256 = ran.status === 0 ? parseProgramHash(ran.stdout) : void 0;
|
|
4958
|
-
return sha256 === void 0 ? { ok: false, reason:
|
|
5136
|
+
return sha256 === void 0 ? { ok: false, reason: firstLine7(ran.stderr) || `the hash could not be taken (exit ${ran.status})` } : { ok: true, sha256 };
|
|
4959
5137
|
},
|
|
4960
5138
|
prepare: async (files, tree) => {
|
|
4961
5139
|
if (filesAreCopied(state)) {
|
|
@@ -4988,7 +5166,7 @@ function containerJudgeEnvironment(input) {
|
|
|
4988
5166
|
// host. Every capability is dropped in the container, so root there could not either; the build's user removes its own, and the runner removes the rest.
|
|
4989
5167
|
clear: async () => {
|
|
4990
5168
|
const removed = await runtime.host.exec({ container: state.container, user, env: NO_ENV, argv: ["find", JUDGE_DIR, "-mindepth", "1", "-user", user, "-delete"] });
|
|
4991
|
-
if (removed.status !== 0) throw new Error(`find exited ${removed.status}: ${
|
|
5169
|
+
if (removed.status !== 0) throw new Error(`find exited ${removed.status}: ${firstLine7(removed.stderr)}`);
|
|
4992
5170
|
if (!filesAreCopied(state)) return;
|
|
4993
5171
|
const emptied = await clearJudgeFolder(runtime, state, secretsOf(runtime, input.jobDir));
|
|
4994
5172
|
if (!emptied.ok) throw new Error(emptied.reason);
|
|
@@ -5044,7 +5222,7 @@ async function startCheckContainer(input) {
|
|
|
5044
5222
|
}
|
|
5045
5223
|
return { ok: false, reason };
|
|
5046
5224
|
};
|
|
5047
|
-
const dockerFailed = (what, result) => fail(`${what} failed (exit ${result.status})${
|
|
5225
|
+
const dockerFailed = (what, result) => fail(`${what} failed (exit ${result.status})${firstLine7(result.stderr) === "" ? "" : `: ${firstLine7(result.stderr)}`}`);
|
|
5048
5226
|
mkdirSync(buildDir2, { recursive: true });
|
|
5049
5227
|
if (!filesAreCopied(state)) chmodSync(buildDir2, 493);
|
|
5050
5228
|
let services;
|
|
@@ -5053,7 +5231,7 @@ async function startCheckContainer(input) {
|
|
|
5053
5231
|
repositories: repositoriesOf({ repositories: job.repositories, repository, branch: job.branch }),
|
|
5054
5232
|
tokens,
|
|
5055
5233
|
buildDir: buildDir2,
|
|
5056
|
-
log: (
|
|
5234
|
+
log: (line2) => log.line(`${tag} ${line2}`),
|
|
5057
5235
|
readOnly: true
|
|
5058
5236
|
});
|
|
5059
5237
|
services = await startServicesFor(runtime, config, buildDir2, checksDir, void 0, false, gitRemote, transport === "exec" ? "stream" : "socket");
|
|
@@ -5082,7 +5260,7 @@ async function startCheckContainer(input) {
|
|
|
5082
5260
|
if (prepared.status !== 0) return dockerFailed("preparing the check environment's volume", prepared);
|
|
5083
5261
|
const started = await host.run(containerRunArgs(runInput), { logPath });
|
|
5084
5262
|
if (started.status !== 0) return dockerFailed("starting the check environment's container", started);
|
|
5085
|
-
if (transport === "exec") joinBuild(runtime, state, services, (
|
|
5263
|
+
if (transport === "exec") joinBuild(runtime, state, services, (line2) => log.line(`${tag} ${line2}`));
|
|
5086
5264
|
if (!await waitForRelay(runtime, state)) return fail("the relay in the check environment's container did not start");
|
|
5087
5265
|
const env = checkEnvironment({ config, item: job.item, repository, hostEnv: runtime.hostEnv, containerEnv: built.containerEnv ?? {}, imageEnv: built.imageEnv });
|
|
5088
5266
|
const secrets = () => tokens.issuedTokens();
|
|
@@ -5111,7 +5289,7 @@ async function startCheckContainer(input) {
|
|
|
5111
5289
|
await host.stop(name);
|
|
5112
5290
|
const again = await host.start(name);
|
|
5113
5291
|
if (again.status !== 0 || !await waitForRelay(runtime, state)) return false;
|
|
5114
|
-
rejoinBuild(runtime, state, (
|
|
5292
|
+
rejoinBuild(runtime, state, (line2) => log.line(`${tag} ${line2}`));
|
|
5115
5293
|
if (delivered) {
|
|
5116
5294
|
const again2 = await deliverInput();
|
|
5117
5295
|
if (!again2.ok) {
|
|
@@ -5128,8 +5306,8 @@ async function startCheckContainer(input) {
|
|
|
5128
5306
|
// src/runner/machine.ts
|
|
5129
5307
|
function groupName(gid) {
|
|
5130
5308
|
try {
|
|
5131
|
-
for (const
|
|
5132
|
-
const [name, , id] =
|
|
5309
|
+
for (const line2 of readFileSync("/etc/group", "utf8").split("\n")) {
|
|
5310
|
+
const [name, , id] = line2.split(":");
|
|
5133
5311
|
if (name !== void 0 && Number(id) === gid) return name;
|
|
5134
5312
|
}
|
|
5135
5313
|
} catch {
|
|
@@ -5224,4 +5402,4 @@ function describeMachineDocker(machine) {
|
|
|
5224
5402
|
return `Docker Engine ${version ?? "of no known version"}, older than the ${MIN_ENGINE_MAJOR} that container builds need`;
|
|
5225
5403
|
}
|
|
5226
5404
|
|
|
5227
|
-
export { ADDED_USER, ADOPTED_FETCH_RETRY_WINDOW_MS, AgentUserError, AssetError, DeliveryFailure, EVAL_INPUT_NAME, GH_CONFIG_YML, HELPER_ENV, LEASE_SECONDS, MANAGED_UNJAILED_REASON, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, ROOT_DISK_ID_PREFIX, RunnerInitError, attemptNote, claimPermissionProblem, claudeCredentialCheck, cleanupContainer, closeHostBuild, containerCommandExec, containerJudgeEnvironment, containerSenderCommand, copyJudgeTree, copyTranscripts, copyTranscriptsFromContainer, createBuildDisk, createContainerRuntime, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deleteBuildDisk, deliverContainerHooks, deliverExecMaven, describeMachineDocker, detectMachine, dropManagedBuildSettings, dropManagedClaudeKey, ensureFirecrackerAndJailer, ensureRootfs, ensureTunnel, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedClaudeKey, filesAreCopied, formerSkillProblem, formerSkillQueues, ghHostsYml, gitRemoteFor, hasClaudeCredential, helperFirecrackerNote, helperSocketPath, holdManagedBuildSettings, holdManagedClaudeKey, hostCommandEnvironment, hostEnvironment, isPlaceholderCommand, keepGhConfigCurrent, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listenOnBroker, machineConfig, makeBuildsDirPrivate, managedBuildSettingValues, managedBuildSettingsFor, managedClaudeKeyFor, managedClaudeKeyValues, managedMachineLimits, measureDisk, microVmArchSupported, microVmAssetsPinned, missingPermissionFix, missingPermissionOf, needsBuildSkill, needsClaudeCredential, obtainImage, outOfMemoryReason, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, prepareBranch, prepareRunnerInit, probeHelper, provisionContainer, provisionEnvironment, reachDockerStep, readConfigObject, resolveAgentUser, resolveHostBuild, runBuildSteps, runRunnerInit, runWithSpawn, senderAliveScript, senderSignalScript, setUpRunnerCgroup, shellQuote, signalInContainer, startCheckContainer, startHostServices, startJailedInto, startServicesFor, stopContainer, stopJailed, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, syncInContainer, withFactoryHosts, withTunnelLog, writeEvalInput, writeRunnerInit };
|
|
5405
|
+
export { ADDED_USER, ADOPTED_FETCH_RETRY_WINDOW_MS, AgentUserError, AssetError, DeliveryFailure, EVAL_INPUT_NAME, GH_CONFIG_YML, HELPER_ENV, LEASE_SECONDS, MANAGED_UNJAILED_REASON, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, ROOT_DISK_ID_PREFIX, RunnerInitError, attemptNote, claimPermissionProblem, claudeCredentialCheck, cleanupContainer, closeHostBuild, containerCommandExec, containerJudgeEnvironment, containerSenderCommand, copyJudgeTree, copyTranscripts, copyTranscriptsFromContainer, createBuildDisk, createContainerRuntime, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deleteBuildDisk, deliverContainerHooks, deliverExecMaven, describeMachineDocker, detectMachine, dropManagedBuildSettings, dropManagedClaudeKey, ensureFirecrackerAndJailer, ensureRootfs, ensureTunnel, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedClaudeKey, filesAreCopied, formerSkillProblem, formerSkillQueues, ghHostsYml, gitRemoteFor, hasClaudeCredential, helperFirecrackerNote, helperSocketPath, holdManagedBuildSettings, holdManagedClaudeKey, hostCommandEnvironment, hostEnvironment, isPlaceholderCommand, keepGhConfigCurrent, keepUnpinnedRuntimes, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listenOnBroker, machineConfig, makeBuildsDirPrivate, managedBuildSettingValues, managedBuildSettingsFor, managedClaudeKeyFor, managedClaudeKeyValues, managedMachineLimits, measureDisk, microVmArchSupported, microVmAssetsPinned, missingPermissionFix, missingPermissionOf, needsBuildSkill, needsClaudeCredential, obtainImage, outOfMemoryReason, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, prepareBranch, prepareRunnerInit, probeHelper, provisionContainer, provisionEnvironment, reachDockerStep, readConfigObject, resolveAgentUser, resolveHostBuild, runBuildSteps, runRunnerInit, runWithSpawn, runtimeStepInput, senderAliveScript, senderSignalScript, setUpRunnerCgroup, shellQuote, signalInContainer, startCheckContainer, startHostServices, startJailedInto, startServicesFor, stopContainer, stopJailed, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, syncInContainer, withFactoryHosts, withTunnelLog, writeEvalInput, writeRunnerInit };
|