@outerlayer/cli 0.34.0-next.20261027121359 → 0.34.0-next.20261027162612
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-QGM2SECF.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-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-SJY6A6EH.js → chunk-BCIBSJZH.js} +35 -22
- 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-LTMFHECB.js → chunk-CKVJSOY3.js} +20 -20
- 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-ARPPH7VS.js → chunk-J3Q3QCOF.js} +243 -79
- 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-4IB5WUY2.js → chunk-KVGK2JL3.js} +6 -6
- package/dist/{chunk-TS2YACAQ.js → chunk-LYX2RRSF.js} +2 -2
- package/dist/{chunk-W774NREK.js → chunk-MGF346ND.js} +3 -3
- package/dist/{chunk-UDRBQI5J.js → chunk-N33OOF3K.js} +10 -10
- package/dist/{chunk-WS5E73JO.js → chunk-NEBMTP7T.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-YGX72FUQ.js → chunk-QRIE4JZE.js} +3 -3
- package/dist/{chunk-XEJ5USHY.js → chunk-QWSAZGH6.js} +6 -6
- package/dist/{chunk-QBBZGVZJ.js → chunk-RCAMBC3H.js} +3 -3
- package/dist/{chunk-KDSKFXPE.js → chunk-RJZZFAXS.js} +1 -1
- 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-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-HVBFWC3J.js} +114 -113
- package/dist/{command-6T6RI5XY.js → command-J3CDQLWC.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-YLKDT2JG.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-AG73VZNG.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-6G2F2HTK.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-7VWIU5TG.js} +24 -24
- package/dist/{init-BB2TLXVB.js → init-Y2OJSOAA.js} +24 -24
- package/dist/{init-cmd-I2Z4VZSG.js → init-cmd-77XKBRUF.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-FRT5NSFG.js} +38 -38
- package/dist/{machine-UYFUUSEQ.js → machine-TEG554M5.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-T3V7N7CL.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-4YO4TUEH.js} +31 -31
- package/dist/{sync-cmd-B3KQZJZO.js → sync-cmd-Y5RKWVF7.js} +10 -10
- package/dist/{update-steps-RSYFLNTL.js → update-steps-KNN4Y2ZU.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-PBY7WNYI.js} +9 -9
- package/dist/{work-proofs-record-AYUWUFBE.js → work-proofs-record-AVKJFZOD.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,145 @@ 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, dropProxyWarning) {
|
|
3022
|
+
return report.base === void 0 ? {} : { runtimes: { refusals: () => services.record().refusals, dropProxyWarning } };
|
|
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
|
}
|
|
2890
3033
|
function gitErrorLine(text) {
|
|
2891
|
-
const lines = text.split("\n").map((
|
|
2892
|
-
return lines.find((
|
|
3034
|
+
const lines = text.split("\n").map((line2) => line2.trim()).filter((line2) => line2 !== "");
|
|
3035
|
+
return lines.find((line2) => /^(fatal|error):/.test(line2)) ?? lines.at(-1) ?? "";
|
|
2893
3036
|
}
|
|
2894
3037
|
var STAGED_TREE = `${JOB_MOUNT}/context/tree`;
|
|
2895
3038
|
var DELIVER_SCRIPT = [
|
|
@@ -2905,7 +3048,7 @@ var DELIVER_SCRIPT = [
|
|
|
2905
3048
|
var RECORD_SCRIPT = 'd="$(git rev-parse --git-common-dir)" && mkdir -p "$d/outerlayer" && printf "%s" "$1" > "$d/outerlayer/delivery.json"';
|
|
2906
3049
|
var WRITE_SHIM_SCRIPT = 'mkdir -p "$1" && printf "%s" "$2" > "$1/claude" && chmod 755 "$1/claude"';
|
|
2907
3050
|
function failure(what, result) {
|
|
2908
|
-
return `context_delivery_failed: ${what} (exit ${result.status})${
|
|
3051
|
+
return `context_delivery_failed: ${what} (exit ${result.status})${firstLine5(result.stderr) === "" ? "" : `: ${firstLine5(result.stderr)}`}`;
|
|
2909
3052
|
}
|
|
2910
3053
|
async function repositorySkills(input, folder) {
|
|
2911
3054
|
const listed = await input.exec(["ls", "-1", folder], CHECKOUT_DIR, { quiet: true });
|
|
@@ -3007,6 +3150,14 @@ async function runBuildSteps(input) {
|
|
|
3007
3150
|
if (!checked.ok) return checked;
|
|
3008
3151
|
}
|
|
3009
3152
|
if (input.governing !== void 0) await noteIgnoredDevcontainers(input, repositories, input.governing.repository);
|
|
3153
|
+
let unpinnedRuntimes;
|
|
3154
|
+
if (input.runtimes !== void 0) {
|
|
3155
|
+
const ordered = [{ ...primary, primary: true }, ...repositories.filter((candidate) => candidate.repository !== primary.repository).map((entry) => ({ ...entry, primary: false }))];
|
|
3156
|
+
const chosen = await provisionRuntimes({ repositories: ordered, exec, log, tag, refusals: input.runtimes.refusals, aborted: input.aborted });
|
|
3157
|
+
if (!chosen.ok) return chosen.aborted === true ? aborted() : { ok: false, reason: chosen.reason };
|
|
3158
|
+
unpinnedRuntimes = chosen.unpinned;
|
|
3159
|
+
if (chosen.dropProxyWarning) input.runtimes.dropProxyWarning();
|
|
3160
|
+
}
|
|
3010
3161
|
const lifecycleDir = lifecycleWorkdir(repositories, input.governing?.repository);
|
|
3011
3162
|
for (const step of lifecycleSteps(input.lifecycle)) {
|
|
3012
3163
|
if (input.aborted()) return aborted();
|
|
@@ -3051,7 +3202,7 @@ async function runBuildSteps(input) {
|
|
|
3051
3202
|
}
|
|
3052
3203
|
if (input.aborted()) return aborted();
|
|
3053
3204
|
}
|
|
3054
|
-
return { ok: true, startCommit, ...controlPlane === void 0 ? {} : { controlPlane } };
|
|
3205
|
+
return { ok: true, startCommit, ...controlPlane === void 0 ? {} : { controlPlane }, ...unpinnedRuntimes === void 0 ? {} : { unpinnedRuntimes } };
|
|
3055
3206
|
}
|
|
3056
3207
|
var EVAL_INPUT_NAME = "eval-input";
|
|
3057
3208
|
var TRANSCRIPT_ROOT = "/build/home/.claude/projects";
|
|
@@ -3060,7 +3211,7 @@ var MAX_TRANSCRIPTS = 500;
|
|
|
3060
3211
|
var MAX_TOTAL_TRANSCRIPT_BYTES = 64 * 1024 * 1024;
|
|
3061
3212
|
var TRANSCRIPT_COPY_MS = 2 * 60 * 1e3;
|
|
3062
3213
|
var BUILD_HOME = "/build/home";
|
|
3063
|
-
function
|
|
3214
|
+
function firstLine6(text) {
|
|
3064
3215
|
return text.trim().split("\n")[0] ?? "";
|
|
3065
3216
|
}
|
|
3066
3217
|
async function copyTranscripts(run, now = Date.now) {
|
|
@@ -3072,7 +3223,7 @@ async function copyTranscripts(run, now = Date.now) {
|
|
|
3072
3223
|
return { ok: false, reason: describeCallFailure(err) };
|
|
3073
3224
|
}
|
|
3074
3225
|
if (listed.status !== 0 && !/No such file or directory/.test(listed.stderr)) {
|
|
3075
|
-
return { ok: false, reason: `listing the transcripts failed (exit ${listed.status})${
|
|
3226
|
+
return { ok: false, reason: `listing the transcripts failed (exit ${listed.status})${firstLine6(listed.stderr) === "" ? "" : `: ${firstLine6(listed.stderr)}`}` };
|
|
3076
3227
|
}
|
|
3077
3228
|
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
3229
|
const copied = [];
|
|
@@ -3089,7 +3240,7 @@ async function copyTranscripts(run, now = Date.now) {
|
|
|
3089
3240
|
}
|
|
3090
3241
|
try {
|
|
3091
3242
|
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})${
|
|
3243
|
+
if (read.status !== 0) missed.push({ path, reason: `reading it failed (exit ${read.status})${firstLine6(read.stderr) === "" ? "" : `: ${firstLine6(read.stderr)}`}` });
|
|
3093
3244
|
else if (Buffer.byteLength(read.stdout) > MAX_TRANSCRIPT_BYTES) missed.push({ path, reason: `it is larger than ${MAX_TRANSCRIPT_BYTES / (1024 * 1024)} MiB` });
|
|
3094
3245
|
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
3246
|
else {
|
|
@@ -3133,11 +3284,11 @@ function scrubbing(scrub, author, work) {
|
|
|
3133
3284
|
setRepoRoot(void 0);
|
|
3134
3285
|
}
|
|
3135
3286
|
}
|
|
3136
|
-
function scrubLine(
|
|
3287
|
+
function scrubLine(line2) {
|
|
3137
3288
|
try {
|
|
3138
|
-
return JSON.stringify(scrubDeep(JSON.parse(
|
|
3289
|
+
return JSON.stringify(scrubDeep(JSON.parse(line2)));
|
|
3139
3290
|
} catch {
|
|
3140
|
-
return scrubText(
|
|
3291
|
+
return scrubText(line2);
|
|
3141
3292
|
}
|
|
3142
3293
|
}
|
|
3143
3294
|
function writeReadOnly(path, text) {
|
|
@@ -3211,7 +3362,7 @@ async function writeEvalInput(request) {
|
|
|
3211
3362
|
continue;
|
|
3212
3363
|
}
|
|
3213
3364
|
const file = `sessions/${traceId}.jsonl`;
|
|
3214
|
-
const text = transcript.content.split("\n").filter((
|
|
3365
|
+
const text = transcript.content.split("\n").filter((line2) => line2.trim() !== "").map(scrubLine).join("\n");
|
|
3215
3366
|
writeReadOnly(join(dir, file), `${text}
|
|
3216
3367
|
`);
|
|
3217
3368
|
scrubDeep(session);
|
|
@@ -3638,8 +3789,8 @@ async function deliverTar(runtime, state, input) {
|
|
|
3638
3789
|
{ timeoutMs: DELIVERY_TIMEOUT_MS }
|
|
3639
3790
|
);
|
|
3640
3791
|
if (result.status === 0) return { ok: true };
|
|
3641
|
-
const
|
|
3642
|
-
return { ok: false, reason: `${input.step} could not be delivered (exit ${result.status})${
|
|
3792
|
+
const line2 = scrubDelivery(result.stderr.trim().split("\n")[0] ?? "", input.secrets);
|
|
3793
|
+
return { ok: false, reason: `${input.step} could not be delivered (exit ${result.status})${line2 === "" ? "" : `: ${line2}`}` };
|
|
3643
3794
|
} catch (err) {
|
|
3644
3795
|
return { ok: false, reason: `${input.step} could not be delivered: ${scrubDelivery(describeCallFailure(err), input.secrets)}` };
|
|
3645
3796
|
}
|
|
@@ -3762,18 +3913,18 @@ function parse(data) {
|
|
|
3762
3913
|
const length = Number.parseInt(header, 16);
|
|
3763
3914
|
if (length === 0) return { kind: "commands", commands, capabilities };
|
|
3764
3915
|
if (data.length - offset < length) return { kind: "need-more" };
|
|
3765
|
-
const
|
|
3916
|
+
const line2 = data.subarray(offset + 4, offset + length);
|
|
3766
3917
|
offset += length;
|
|
3767
3918
|
if (offset > limits().sectionBytes) return refused(TOO_LONG);
|
|
3768
3919
|
const first = commands.length === 0;
|
|
3769
|
-
const nul =
|
|
3770
|
-
const decoded = decodeText(first && nul !== -1 ?
|
|
3920
|
+
const nul = line2.indexOf(0);
|
|
3921
|
+
const decoded = decodeText(first && nul !== -1 ? line2.subarray(0, nul) : line2);
|
|
3771
3922
|
if (decoded === void 0) return refused(UNREADABLE);
|
|
3772
3923
|
const text = decoded.replace(/\n$/, "");
|
|
3773
3924
|
if (first && text.startsWith("shallow ")) continue;
|
|
3774
3925
|
const match = COMMAND.exec(text);
|
|
3775
3926
|
if (match === null) return refused(UNREADABLE);
|
|
3776
|
-
if (first && nul !== -1) capabilities =
|
|
3927
|
+
if (first && nul !== -1) capabilities = line2.subarray(nul + 1).toString("latin1").split(/\s+/).filter((word) => word !== "");
|
|
3777
3928
|
commands.push({ oldId: match[1], newId: match[2], ref: match[3] });
|
|
3778
3929
|
}
|
|
3779
3930
|
}
|
|
@@ -3927,7 +4078,7 @@ function createGitRemote(options) {
|
|
|
3927
4078
|
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
4079
|
const maxLfsBodyBytes = 1024 * 1024;
|
|
3929
4080
|
const hopByHop = /* @__PURE__ */ new Set(["connection", "keep-alive", "transfer-encoding", "upgrade", "proxy-authenticate", "proxy-authorization", "te", "trailer", "set-cookie"]);
|
|
3930
|
-
const log = (
|
|
4081
|
+
const log = (line2) => options.log?.(line2);
|
|
3931
4082
|
function forward(input) {
|
|
3932
4083
|
const { route, res } = input;
|
|
3933
4084
|
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 +4496,7 @@ function gitRemoteFor(runtime, input) {
|
|
|
4345
4496
|
...input.readOnly === true ? { readOnly: true } : {}
|
|
4346
4497
|
});
|
|
4347
4498
|
}
|
|
4348
|
-
function
|
|
4499
|
+
function firstLine7(text) {
|
|
4349
4500
|
return text.trim().split("\n")[0] ?? "";
|
|
4350
4501
|
}
|
|
4351
4502
|
var NO_ENV = { literals: {}, passed: {} };
|
|
@@ -4409,7 +4560,7 @@ async function obtainImage(input) {
|
|
|
4409
4560
|
};
|
|
4410
4561
|
}
|
|
4411
4562
|
try {
|
|
4412
|
-
const common = { repository, configPath: config.configPath, readToken, pinned: input.pinned, log: (
|
|
4563
|
+
const common = { repository, configPath: config.configPath, readToken, pinned: input.pinned, log: (line2) => log.line(`${tag} ${line2}`) };
|
|
4413
4564
|
if (input.inBuilder !== void 0) {
|
|
4414
4565
|
return { ok: true, built: await runtime.buildRootDisk({ ...input.inBuilder, ...common, guestHelper: input.guestHelper, deadlineMs: input.deadlineMs }) };
|
|
4415
4566
|
}
|
|
@@ -4547,7 +4698,7 @@ async function provisionContainer(input) {
|
|
|
4547
4698
|
}
|
|
4548
4699
|
return aborted2 ? { ok: false, reason: "ended before provision finished", aborted: true } : fail(reason);
|
|
4549
4700
|
};
|
|
4550
|
-
const dockerFailed = (what, result) => bail(`${what} failed (exit ${result.status})${
|
|
4701
|
+
const dockerFailed = (what, result) => bail(`${what} failed (exit ${result.status})${firstLine7(result.stderr) === "" ? "" : `: ${firstLine7(result.stderr)}`}`);
|
|
4551
4702
|
if (input.aborted()) return bail("", true);
|
|
4552
4703
|
mkdirSync(buildDir2, { recursive: true });
|
|
4553
4704
|
const ghDir = ghConfigDir(buildDir2);
|
|
@@ -4578,8 +4729,8 @@ async function provisionContainer(input) {
|
|
|
4578
4729
|
environment.credentials = tokens.used();
|
|
4579
4730
|
let services;
|
|
4580
4731
|
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, (
|
|
4732
|
+
const gitRemote = gitRemoteFor(runtime, { repositories, tokens, buildDir: buildDir2, log: (line2) => log.line(`${tag} ${line2}`) });
|
|
4733
|
+
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
4734
|
runtime.tunnels.set(buildId, services);
|
|
4584
4735
|
} catch (err) {
|
|
4585
4736
|
return bail(`the tunnel could not start: ${describeCallFailure(err)}`);
|
|
@@ -4606,7 +4757,7 @@ async function provisionContainer(input) {
|
|
|
4606
4757
|
if (prepared.status !== 0) return dockerFailed("preparing the build's volume", prepared);
|
|
4607
4758
|
const started = await host.run(containerRunArgs(runInput), { logPath });
|
|
4608
4759
|
if (started.status !== 0) return dockerFailed("starting the build's container", started);
|
|
4609
|
-
joinBuild(runtime, state, services, (
|
|
4760
|
+
joinBuild(runtime, state, services, (line2) => log.line(`${tag} ${line2}`));
|
|
4610
4761
|
if (input.aborted()) return bail("", true);
|
|
4611
4762
|
if (!await waitForRelay(runtime, state)) return bail("the relay in the build's container did not start");
|
|
4612
4763
|
const ghDelivered = await deliverJobFiles(runtime, state, ["gh", "maven"], secrets);
|
|
@@ -4643,9 +4794,10 @@ async function provisionContainer(input) {
|
|
|
4643
4794
|
const hashed = program.status === 0 ? parseProgramHash(program.stdout) : void 0;
|
|
4644
4795
|
if (hashed !== void 0) state.judgeProgram = { path: JUDGE_PROGRAM, sha256: hashed };
|
|
4645
4796
|
input.save(state, environment);
|
|
4646
|
-
|
|
4797
|
+
let execEnv = buildEnvironment({ ...envInput, imageEnv: state.imageEnv });
|
|
4647
4798
|
for (const notice of execEnv.notices) log.line(`${tag} ${notice}`);
|
|
4648
|
-
const
|
|
4799
|
+
const plainEnv = buildEnvironment({ ...envInput, imageEnv: state.imageEnv, proxyWarning: false });
|
|
4800
|
+
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
4801
|
const steps = await runBuildSteps({
|
|
4650
4802
|
repository,
|
|
4651
4803
|
branch: primary.branch,
|
|
@@ -4676,10 +4828,16 @@ async function provisionContainer(input) {
|
|
|
4676
4828
|
},
|
|
4677
4829
|
removeStagedContext: () => removeStagedContext(buildDir2),
|
|
4678
4830
|
keepIn: jobDir,
|
|
4679
|
-
...input.requireBuildSkill === true ? { requireBuildSkill: true } : {}
|
|
4831
|
+
...input.requireBuildSkill === true ? { requireBuildSkill: true } : {},
|
|
4832
|
+
// A repository with no devcontainer file builds on the universal image, whose runtimes the build chooses and installs.
|
|
4833
|
+
...runtimeStepInput(report, services, () => {
|
|
4834
|
+
state.proxyWarningDropped = true;
|
|
4835
|
+
execEnv = plainEnv;
|
|
4836
|
+
})
|
|
4680
4837
|
});
|
|
4681
4838
|
if (!steps.ok) return bail(steps.reason, steps.aborted === true);
|
|
4682
4839
|
state.startCommit = steps.startCommit;
|
|
4840
|
+
keepUnpinnedRuntimes(state, steps);
|
|
4683
4841
|
if (steps.controlPlane !== void 0) environment.controlPlane = steps.controlPlane;
|
|
4684
4842
|
return { ok: true, workdir: CHECKOUT_DIR, state, environment };
|
|
4685
4843
|
}
|
|
@@ -4705,9 +4863,11 @@ function containerCommandExec(input) {
|
|
|
4705
4863
|
repositories: input.job.repositories,
|
|
4706
4864
|
hostEnv: input.runtime.hostEnv,
|
|
4707
4865
|
containerEnv: state.containerEnv ?? {},
|
|
4866
|
+
unpinnedRuntimes: state.unpinnedRuntimes,
|
|
4708
4867
|
builtIns: state.builtIns === true,
|
|
4709
4868
|
identity: input.job.commitIdentity,
|
|
4710
|
-
imageEnv: state.imageEnv
|
|
4869
|
+
imageEnv: state.imageEnv,
|
|
4870
|
+
proxyWarning: state.proxyWarningDropped !== true
|
|
4711
4871
|
});
|
|
4712
4872
|
return {
|
|
4713
4873
|
container: state.container,
|
|
@@ -4729,9 +4889,11 @@ function containerSenderCommand(input) {
|
|
|
4729
4889
|
repositories: input.job.repositories,
|
|
4730
4890
|
hostEnv: input.runtime.hostEnv,
|
|
4731
4891
|
containerEnv: state.containerEnv ?? {},
|
|
4892
|
+
unpinnedRuntimes: state.unpinnedRuntimes,
|
|
4732
4893
|
builtIns: state.builtIns === true,
|
|
4733
4894
|
identity: input.job.commitIdentity,
|
|
4734
|
-
imageEnv: state.imageEnv
|
|
4895
|
+
imageEnv: state.imageEnv,
|
|
4896
|
+
proxyWarning: state.proxyWarningDropped !== true
|
|
4735
4897
|
});
|
|
4736
4898
|
const args = containerExecArgs({
|
|
4737
4899
|
container: state.container,
|
|
@@ -4860,9 +5022,11 @@ async function syncInContainer(input) {
|
|
|
4860
5022
|
repositories: job.repositories,
|
|
4861
5023
|
hostEnv: runtime.hostEnv,
|
|
4862
5024
|
containerEnv: state.containerEnv ?? {},
|
|
5025
|
+
unpinnedRuntimes: state.unpinnedRuntimes,
|
|
4863
5026
|
builtIns: state.builtIns === true,
|
|
4864
5027
|
identity: job.commitIdentity,
|
|
4865
|
-
imageEnv: state.imageEnv
|
|
5028
|
+
imageEnv: state.imageEnv,
|
|
5029
|
+
proxyWarning: state.proxyWarningDropped !== true
|
|
4866
5030
|
});
|
|
4867
5031
|
const result = await runtime.host.exec(
|
|
4868
5032
|
{ container: state.container, user: state.agentUser ?? ADDED_USER, workdir: job.workdir ?? CHECKOUT_DIR, env, argv: ["outerlayer", "sync"] },
|
|
@@ -4937,7 +5101,7 @@ function containerJudgeEnvironment(input) {
|
|
|
4937
5101
|
env: NO_ENV,
|
|
4938
5102
|
argv: ["/bin/sh", "-c", `[ -f ${file} ] && [ ! -L ${file} ] && head -c ${maxBytes + 1} ${file}`]
|
|
4939
5103
|
}, { timeoutMs: REPORT_READ_TIMEOUT_MS });
|
|
4940
|
-
if (read.status > 1) throw new Error(`reading the judge's ${name} exited ${read.status}: ${
|
|
5104
|
+
if (read.status > 1) throw new Error(`reading the judge's ${name} exited ${read.status}: ${firstLine7(read.stderr)}`);
|
|
4941
5105
|
return read.status === 0 && Buffer.byteLength(read.stdout) <= maxBytes ? read.stdout : void 0;
|
|
4942
5106
|
};
|
|
4943
5107
|
return {
|
|
@@ -4955,7 +5119,7 @@ function containerJudgeEnvironment(input) {
|
|
|
4955
5119
|
hashProgram: async () => {
|
|
4956
5120
|
const ran = await runtime.host.exec({ container: state.container, user: ADDED_USER, env: NO_ENV, argv: [...HASH_ARGV] });
|
|
4957
5121
|
const sha256 = ran.status === 0 ? parseProgramHash(ran.stdout) : void 0;
|
|
4958
|
-
return sha256 === void 0 ? { ok: false, reason:
|
|
5122
|
+
return sha256 === void 0 ? { ok: false, reason: firstLine7(ran.stderr) || `the hash could not be taken (exit ${ran.status})` } : { ok: true, sha256 };
|
|
4959
5123
|
},
|
|
4960
5124
|
prepare: async (files, tree) => {
|
|
4961
5125
|
if (filesAreCopied(state)) {
|
|
@@ -4988,7 +5152,7 @@ function containerJudgeEnvironment(input) {
|
|
|
4988
5152
|
// 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
5153
|
clear: async () => {
|
|
4990
5154
|
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}: ${
|
|
5155
|
+
if (removed.status !== 0) throw new Error(`find exited ${removed.status}: ${firstLine7(removed.stderr)}`);
|
|
4992
5156
|
if (!filesAreCopied(state)) return;
|
|
4993
5157
|
const emptied = await clearJudgeFolder(runtime, state, secretsOf(runtime, input.jobDir));
|
|
4994
5158
|
if (!emptied.ok) throw new Error(emptied.reason);
|
|
@@ -5044,7 +5208,7 @@ async function startCheckContainer(input) {
|
|
|
5044
5208
|
}
|
|
5045
5209
|
return { ok: false, reason };
|
|
5046
5210
|
};
|
|
5047
|
-
const dockerFailed = (what, result) => fail(`${what} failed (exit ${result.status})${
|
|
5211
|
+
const dockerFailed = (what, result) => fail(`${what} failed (exit ${result.status})${firstLine7(result.stderr) === "" ? "" : `: ${firstLine7(result.stderr)}`}`);
|
|
5048
5212
|
mkdirSync(buildDir2, { recursive: true });
|
|
5049
5213
|
if (!filesAreCopied(state)) chmodSync(buildDir2, 493);
|
|
5050
5214
|
let services;
|
|
@@ -5053,7 +5217,7 @@ async function startCheckContainer(input) {
|
|
|
5053
5217
|
repositories: repositoriesOf({ repositories: job.repositories, repository, branch: job.branch }),
|
|
5054
5218
|
tokens,
|
|
5055
5219
|
buildDir: buildDir2,
|
|
5056
|
-
log: (
|
|
5220
|
+
log: (line2) => log.line(`${tag} ${line2}`),
|
|
5057
5221
|
readOnly: true
|
|
5058
5222
|
});
|
|
5059
5223
|
services = await startServicesFor(runtime, config, buildDir2, checksDir, void 0, false, gitRemote, transport === "exec" ? "stream" : "socket");
|
|
@@ -5082,7 +5246,7 @@ async function startCheckContainer(input) {
|
|
|
5082
5246
|
if (prepared.status !== 0) return dockerFailed("preparing the check environment's volume", prepared);
|
|
5083
5247
|
const started = await host.run(containerRunArgs(runInput), { logPath });
|
|
5084
5248
|
if (started.status !== 0) return dockerFailed("starting the check environment's container", started);
|
|
5085
|
-
if (transport === "exec") joinBuild(runtime, state, services, (
|
|
5249
|
+
if (transport === "exec") joinBuild(runtime, state, services, (line2) => log.line(`${tag} ${line2}`));
|
|
5086
5250
|
if (!await waitForRelay(runtime, state)) return fail("the relay in the check environment's container did not start");
|
|
5087
5251
|
const env = checkEnvironment({ config, item: job.item, repository, hostEnv: runtime.hostEnv, containerEnv: built.containerEnv ?? {}, imageEnv: built.imageEnv });
|
|
5088
5252
|
const secrets = () => tokens.issuedTokens();
|
|
@@ -5111,7 +5275,7 @@ async function startCheckContainer(input) {
|
|
|
5111
5275
|
await host.stop(name);
|
|
5112
5276
|
const again = await host.start(name);
|
|
5113
5277
|
if (again.status !== 0 || !await waitForRelay(runtime, state)) return false;
|
|
5114
|
-
rejoinBuild(runtime, state, (
|
|
5278
|
+
rejoinBuild(runtime, state, (line2) => log.line(`${tag} ${line2}`));
|
|
5115
5279
|
if (delivered) {
|
|
5116
5280
|
const again2 = await deliverInput();
|
|
5117
5281
|
if (!again2.ok) {
|
|
@@ -5128,8 +5292,8 @@ async function startCheckContainer(input) {
|
|
|
5128
5292
|
// src/runner/machine.ts
|
|
5129
5293
|
function groupName(gid) {
|
|
5130
5294
|
try {
|
|
5131
|
-
for (const
|
|
5132
|
-
const [name, , id] =
|
|
5295
|
+
for (const line2 of readFileSync("/etc/group", "utf8").split("\n")) {
|
|
5296
|
+
const [name, , id] = line2.split(":");
|
|
5133
5297
|
if (name !== void 0 && Number(id) === gid) return name;
|
|
5134
5298
|
}
|
|
5135
5299
|
} catch {
|
|
@@ -5224,4 +5388,4 @@ function describeMachineDocker(machine) {
|
|
|
5224
5388
|
return `Docker Engine ${version ?? "of no known version"}, older than the ${MIN_ENGINE_MAJOR} that container builds need`;
|
|
5225
5389
|
}
|
|
5226
5390
|
|
|
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 };
|
|
5391
|
+
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 };
|