@outerlayer/cli 0.38.0-next.20261112043334 → 0.38.0-next.20261112061209
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -4
- package/dist/agent-setup-JCCBEF2W.js +40 -0
- package/dist/{agent-subcommand-VDN4AFAJ.js → agent-subcommand-JXQNN57P.js} +4 -4
- package/dist/{artifact-link-cmd-A7SROEQS.js → artifact-link-cmd-TCCDV4ZI.js} +2 -2
- package/dist/{bridge-QUQYCBQN.js → bridge-YN5S2ID2.js} +7 -7
- package/dist/{build-FNUOBMFG.js → build-5K2MI7LO.js} +13 -13
- package/dist/{build-disk-4PCVGMAT.js → build-disk-34RMC46P.js} +11 -11
- package/dist/build-info.json +1 -1
- package/dist/{builder-JG2DHKSN.js → builder-Y46OD2YA.js} +10 -10
- package/dist/caller-A7J5XLTN.js +23 -0
- package/dist/{check-6JV4M2U6.js → check-KFH4KBOO.js} +55 -55
- package/dist/{chunk-BUT777XB.js → chunk-2AQFXNPE.js} +1 -1
- package/dist/{chunk-EJ7ZXBXS.js → chunk-2K2HCINU.js} +2 -2
- package/dist/{chunk-5NK2KKG6.js → chunk-42OC3PB7.js} +3 -3
- package/dist/{chunk-7DIYEB3X.js → chunk-43K5TGGG.js} +6 -6
- package/dist/{chunk-W7BF2RXV.js → chunk-44RZCSDR.js} +3 -3
- package/dist/{chunk-6X2BSMRM.js → chunk-4YDYYNKT.js} +1 -1
- package/dist/{chunk-RTMIEV5N.js → chunk-52PRIAV7.js} +3 -3
- package/dist/{chunk-YZVNZWKD.js → chunk-5JUJGQ4B.js} +7 -7
- package/dist/{chunk-QYLBGMTA.js → chunk-6725XB2P.js} +2 -2
- package/dist/{chunk-Y5S6EUGK.js → chunk-6CM7HS33.js} +6 -6
- package/dist/{chunk-LM2MCACJ.js → chunk-6ILW7JIM.js} +17 -17
- package/dist/{chunk-I5U6CFH4.js → chunk-6UU33NGO.js} +1 -1
- package/dist/{chunk-SLORYOL4.js → chunk-7EJDT6W5.js} +1 -1
- package/dist/{chunk-6FB7NTJK.js → chunk-ABLIHKNU.js} +1 -1
- package/dist/{chunk-37WGI6GZ.js → chunk-AUJRXNE7.js} +10 -10
- package/dist/{chunk-C5NJHYLO.js → chunk-B4MGXOTK.js} +10 -10
- package/dist/{chunk-ZCX43KZ5.js → chunk-BOZRAKYW.js} +1 -1
- package/dist/{chunk-LSU3LXDM.js → chunk-D7TMU2EJ.js} +7 -7
- package/dist/{chunk-ERG3WCEC.js → chunk-DAVRAYHH.js} +10 -8
- package/dist/{chunk-BJIJYPGC.js → chunk-EDAHMAQV.js} +5 -5
- package/dist/{chunk-MVERFCX4.js → chunk-EMSSER2V.js} +1 -1
- package/dist/{chunk-NO4N4D32.js → chunk-EOVTRFI6.js} +4 -4
- package/dist/{chunk-2VJVPP5Y.js → chunk-F5C2B747.js} +1 -1
- package/dist/{chunk-2UCTMANO.js → chunk-FQFZ5XL5.js} +1 -1
- package/dist/{chunk-OAPWDSBW.js → chunk-G6DU2BIN.js} +2 -2
- package/dist/{chunk-PCGU6T7J.js → chunk-GDQMVZS4.js} +1 -1
- package/dist/{chunk-UXARYJQ4.js → chunk-GYEDK2C7.js} +1 -1
- package/dist/{chunk-POBH5YCG.js → chunk-HHDDGKBN.js} +1 -1
- package/dist/{chunk-NRDFBOKE.js → chunk-HN3MAJWV.js} +3 -3
- package/dist/{chunk-DLUBSTLW.js → chunk-HTB4TQ53.js} +8 -8
- package/dist/{chunk-4T2NBVC4.js → chunk-HWHDFWIL.js} +5 -5
- package/dist/{chunk-EUHUIIGT.js → chunk-IBEFT67X.js} +4 -4
- package/dist/{chunk-B2SHUO6J.js → chunk-IDZNOFE3.js} +1 -1
- package/dist/{chunk-WFYKTAXZ.js → chunk-IEWF7OMQ.js} +1 -1
- package/dist/{chunk-5NVF5TAL.js → chunk-IQDIXTDJ.js} +16 -4
- package/dist/{chunk-JIANCWJ3.js → chunk-ISBA6KRX.js} +1 -1
- package/dist/{chunk-5TMM2K23.js → chunk-IW3AWMDJ.js} +4 -4
- package/dist/{chunk-J6KKJGR7.js → chunk-JAQWKAEN.js} +1 -1
- package/dist/{chunk-FUZEOWF4.js → chunk-JGTYQMGV.js} +1 -1
- package/dist/{chunk-BBRXFXBB.js → chunk-KNQDI2ZN.js} +1 -1
- package/dist/{chunk-3C23ZPWR.js → chunk-LKCO2LXP.js} +2 -2
- package/dist/{chunk-ZJHWXRT4.js → chunk-LSQEBU6U.js} +1 -1
- package/dist/{chunk-N6BNN6ZD.js → chunk-N7HPKPPZ.js} +1 -1
- package/dist/{chunk-BBIFZCCB.js → chunk-NG5IIGT6.js} +186 -96
- package/dist/{chunk-43R7JHQI.js → chunk-NSHOVOSO.js} +5 -5
- package/dist/{chunk-DNXYI22V.js → chunk-NUHKAZWF.js} +8 -8
- package/dist/{chunk-NDQC2WUJ.js → chunk-NXNECYRC.js} +1 -1
- package/dist/{chunk-26BFN6DH.js → chunk-O5FDLDQI.js} +1 -1
- package/dist/{chunk-5AVYYNGU.js → chunk-OK7IUE5M.js} +7 -7
- package/dist/{chunk-KRYTOYH5.js → chunk-P37BKTMK.js} +27 -27
- package/dist/{chunk-DZFIRKDZ.js → chunk-PFUT37UQ.js} +3 -3
- package/dist/{chunk-A4NWDCWS.js → chunk-PLPIEAQD.js} +5 -5
- package/dist/{chunk-I62FX622.js → chunk-QW3W4QYP.js} +1 -1
- package/dist/{chunk-722KABMV.js → chunk-RA4N34AG.js} +3 -3
- package/dist/{chunk-2PJO6QS2.js → chunk-RVKFUJFK.js} +7 -7
- package/dist/{chunk-ZH5YLKO6.js → chunk-RZJ5GII7.js} +1 -1
- package/dist/{chunk-KZU5WQK5.js → chunk-S6WHYTSR.js} +2 -2
- package/dist/{chunk-SFN7K33S.js → chunk-SPLGHAZO.js} +7 -7
- package/dist/{chunk-ECNWHXIO.js → chunk-TKNYBIBU.js} +4 -4
- package/dist/{chunk-4FHDVWKO.js → chunk-TTHZCIU5.js} +4 -4
- package/dist/{chunk-RCK2MJRG.js → chunk-TXB2WDG6.js} +2 -2
- package/dist/{chunk-SFSE6YDX.js → chunk-UD4XMIIQ.js} +6 -6
- package/dist/{chunk-IGBPPM7F.js → chunk-UE4N3MJV.js} +7 -7
- package/dist/{chunk-Z42UKOZ6.js → chunk-UJBNNBAS.js} +6 -6
- package/dist/{chunk-Z7XFVFW2.js → chunk-VGI32UMX.js} +1 -1
- package/dist/{chunk-5UFAWMET.js → chunk-VGXGM5C7.js} +3 -3
- package/dist/{chunk-3T7PXUHN.js → chunk-VMBH6HOJ.js} +9 -9
- package/dist/{chunk-7GJEQXOH.js → chunk-WCHE4WRD.js} +1 -1
- package/dist/{chunk-6M3GJTGE.js → chunk-WFBH4RLB.js} +3 -3
- package/dist/{chunk-Y25ONBS6.js → chunk-WUT7OUBK.js} +5 -5
- package/dist/{chunk-RUX4M4AX.js → chunk-XJOAE2DO.js} +1 -1
- package/dist/{chunk-WG5OBUIZ.js → chunk-ZFKWU4Y2.js} +6 -6
- package/dist/{claude-launcher-5ALZD5WD.js → claude-launcher-RJMNDN3K.js} +7 -7
- package/dist/{cli-7MJFFRYI.js → cli-SCU3VYTK.js} +173 -166
- package/dist/{command-XLJ75AS5.js → command-ACLKBBR5.js} +50 -50
- package/dist/{config-5KMNGNK5.js → config-RLM4L7BC.js} +12 -12
- package/dist/{connect-cmd-XR7XPGQ6.js → connect-cmd-TYEKAJ53.js} +13 -13
- package/dist/{container-start-F6T3JPRM.js → container-start-JQBE44O4.js} +48 -48
- package/dist/{context-cleanup-HHMQV7KH.js → context-cleanup-6S4NOT4C.js} +4 -4
- package/dist/{context-show-cmd-4EKSCIF4.js → context-show-cmd-KFVD47FK.js} +14 -14
- package/dist/{control-plane-launch-AJPCKLBL.js → control-plane-launch-FUYYXNL7.js} +14 -14
- package/dist/{demo-record-cmd-LVZOYPR7.js → demo-record-cmd-J26ZZMLZ.js} +8 -8
- package/dist/{demo-voice-cmd-DT6VFD2U.js → demo-voice-cmd-KBVO6WZA.js} +20 -20
- package/dist/{dist-7JDEWP5U.js → dist-FSIXL3TN.js} +2 -2
- package/dist/{docker-T7A6GZDD.js → docker-IGL2JPTN.js} +10 -10
- package/dist/{doctor-F7TCZO3O.js → doctor-SAWKY2I6.js} +51 -51
- package/dist/{emit-artifact-cmd-B5ZYJKFM.js → emit-artifact-cmd-DBQAROAN.js} +19 -19
- package/dist/{emit-cmd-P2XWWVFP.js → emit-cmd-E364BCF2.js} +7 -7
- package/dist/{emit-criteria-cmd-RHFJYNSU.js → emit-criteria-cmd-OTH6OB33.js} +16 -16
- package/dist/{emit-demo-cmd-WELKVLD4.js → emit-demo-cmd-IPAW6TDJ.js} +20 -20
- package/dist/{emit-finding-cmd-KRNEWZQP.js → emit-finding-cmd-DNHV4DG5.js} +16 -16
- package/dist/{emit-result-cmd-NQ6LAE4Z.js → emit-result-cmd-2LWTIMNP.js} +18 -18
- package/dist/{emit-step-cmd-HKOYFSYL.js → emit-step-cmd-KKNYP4CO.js} +16 -16
- package/dist/{exec-client-2JSXFMEW.js → exec-client-TTLHPSNE.js} +8 -8
- package/dist/find-unit-6CBLEKXX.js +24 -0
- package/dist/{findings-cmd-EF4QXYRT.js → findings-cmd-Y46BOVAQ.js} +16 -16
- package/dist/{fleet-readiness-NBYN45IT.js → fleet-readiness-OYZYYJMX.js} +14 -14
- package/dist/governing-source-OMZOIQR7.js +41 -0
- package/dist/{guest-init-FX2NUAW6.js → guest-init-TSJ352Y5.js} +9 -9
- package/dist/{hook-fast-JZKCKSXB.js → hook-fast-CYQXYLXL.js} +1 -1
- package/dist/{hook-install-R66RP7ME.js → hook-install-EZZAWUCB.js} +4 -4
- package/dist/host-checks-QVYX7Y2F.js +80 -0
- package/dist/host-key-N674G67D.js +18 -0
- package/dist/{image-tag-H5CZTC42.js → image-tag-N7T6RKXL.js} +8 -8
- package/dist/index.js +4 -4
- package/dist/{init-W4X47BR5.js → init-532GETMW.js} +46 -46
- package/dist/init-IQ3QXDSQ.js +80 -0
- package/dist/{init-agent-QQF3VGIJ.js → init-agent-5P6YA4IE.js} +46 -46
- package/dist/{init-cmd-QXAL75UY.js → init-cmd-GIAACT54.js} +27 -27
- package/dist/{init-update-G5MKJ7RO.js → init-update-PEPY3Y55.js} +24 -24
- package/dist/{install-cmd-TMUNQF7U.js → install-cmd-OJIVYJ33.js} +10 -10
- package/dist/{layout-LTYJDJ5J.js → layout-V5WSXBGR.js} +4 -4
- package/dist/{login-browser-LSZKECIB.js → login-browser-A637BTC7.js} +2 -2
- package/dist/{logs-ZEXFSBVF.js → logs-HPAZ7O74.js} +7 -7
- package/dist/loop-TYNS2QQ4.js +90 -0
- package/dist/machine-CNWVFLRX.js +80 -0
- package/dist/{machine-skills-CYCZGBAM.js → machine-skills-OPXVTDHI.js} +4 -4
- package/dist/{mcp-install-cmd-TVIOPOIO.js → mcp-install-cmd-HZK6BMMS.js} +4 -4
- package/dist/{mcp-serve-cmd-OCQLRUAK.js → mcp-serve-cmd-TIUV3ZOP.js} +9 -9
- package/dist/{paths-IB5XFML7.js → paths-ICWQRDYW.js} +7 -7
- package/dist/pending-64VJNE6H.js +18 -0
- package/dist/{pidfile-VET4I455.js → pidfile-JPOYJP6P.js} +8 -8
- package/dist/{record-3V3HQRGY.js → record-GEBD7SQ4.js} +8 -8
- package/dist/{relay-V7LX2WR6.js → relay-KSGNSDV6.js} +24 -9
- package/dist/{relay-protocol-QGEWESBF.js → relay-protocol-VWBBQAQC.js} +5 -5
- package/dist/{run-cmd-U3MPDIT5.js → run-cmd-4P3NGSI7.js} +16 -16
- package/dist/{runner-agents-OTYZ73WU.js → runner-agents-P5HCEBXD.js} +4 -4
- package/dist/runner-env-OSMUW57J.js +24 -0
- package/dist/{runner-identity-GTWFQEIN.js → runner-identity-GQC344ZQ.js} +10 -10
- package/dist/{runner-key-WZXU64C7.js → runner-key-DCWF35HX.js} +46 -46
- package/dist/{session-sender-AEUNLU5R.js → session-sender-7HTTTMEV.js} +19 -19
- package/dist/{spec-cmd-DHCZHM2L.js → spec-cmd-TDFURROT.js} +17 -17
- package/dist/{starter-pack-HMJWEIVX.js → starter-pack-33YJXHV5.js} +5 -5
- package/dist/state-5WMXX5CE.js +18 -0
- package/dist/{status-QBQAN35R.js → status-AXNVCDNW.js} +46 -46
- package/dist/{sync-cmd-2HOFZYI6.js → sync-cmd-3UKD6HTQ.js} +18 -18
- package/dist/update-steps-TRJTM3RP.js +81 -0
- package/dist/{watch-ZY62C5WB.js → watch-ZPOTELW4.js} +18 -18
- package/dist/{work-claim-cmd-QDNRGX2N.js → work-claim-cmd-4T4355ST.js} +22 -22
- package/dist/{work-cmd-3BDBBKGG.js → work-cmd-C6I5YGXR.js} +16 -16
- package/dist/{work-comment-cmd-2HI4FP5R.js → work-comment-cmd-XS2USJM2.js} +18 -18
- package/dist/{work-demo-cmd-RXV5DRM3.js → work-demo-cmd-B6VT5RFH.js} +16 -16
- package/dist/{work-logs-cmd-Q7YA3AHY.js → work-logs-cmd-V23Y6AL5.js} +16 -16
- package/dist/{work-needs-attention-cmd-WAWSJIHS.js → work-needs-attention-cmd-CNXW5QRQ.js} +16 -16
- package/dist/{work-no-change-cmd-NTXYEPEW.js → work-no-change-cmd-NLMVQVW5.js} +16 -16
- package/dist/{work-open-pr-cmd-GFIMFDAR.js → work-open-pr-cmd-UJBMJ4SJ.js} +17 -17
- package/dist/{work-pr-cmd-W3T6ELML.js → work-pr-cmd-ZGX5ICW2.js} +16 -16
- package/dist/{work-proofs-cmd-DSDVAM6V.js → work-proofs-cmd-YJBW7IJG.js} +18 -18
- package/dist/{work-proofs-record-AC5UQ2ME.js → work-proofs-record-77HYFV4T.js} +24 -24
- package/dist/{work-stop-cmd-UGFPCTRT.js → work-stop-cmd-V57J5R3V.js} +16 -16
- package/package.json +1 -1
- package/skill-pack/maintained/outerlayer-build/SKILL.md +3 -3
- package/skill-pack/maintained/outerlayer-build/references/release.md +1 -1
- package/skill-pack/maintained/outerlayer-build/scripts/criterion-citations.mjs +1 -1
- package/skill-pack/maintained/outerlayer-build/scripts/record-criteria.mjs +1 -1
- package/skill-pack/maintained/outerlayer-evidence/SKILL.md +3 -3
- package/dist/agent-setup-3GY4FFSC.js +0 -40
- package/dist/caller-A2K7SLSL.js +0 -23
- package/dist/find-unit-3QYPTK6A.js +0 -24
- package/dist/governing-source-R64FW4CP.js +0 -41
- package/dist/host-checks-VWWXDWV2.js +0 -80
- package/dist/host-key-ACYKDZ4X.js +0 -18
- package/dist/init-OIHCYS4S.js +0 -80
- package/dist/loop-U5AUIWQG.js +0 -90
- package/dist/machine-6DFKQ3LQ.js +0 -80
- package/dist/pending-TX4VIF6P.js +0 -18
- package/dist/runner-env-3QPJQ2H2.js +0 -24
- package/dist/state-O3A3CIDQ.js +0 -18
- package/dist/update-steps-QRRCMRL4.js +0 -81
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { itemsSentence, criteriaOf, hostItemsOf, loadCitationFinder, testFileMatcher, planCriteria, wholeItems, judgeGroups, failedItems, inCriteriaOrder, testsByCriterion, oneLineReason, criterionInputs, parseJudgeAnswer, judgedItems, openPullRequests, MAX_TEST_FILE_BYTES, wholeEntries } from './chunk-
|
|
3
|
+
import { itemsSentence, criteriaOf, hostItemsOf, loadCitationFinder, testFileMatcher, planCriteria, wholeItems, judgeGroups, failedItems, inCriteriaOrder, testsByCriterion, oneLineReason, criterionInputs, parseJudgeAnswer, judgedItems, openPullRequests, MAX_TEST_FILE_BYTES, wholeEntries } from './chunk-RA4N34AG.js';
|
|
4
4
|
import { RUNNER_PROTOCOL } from './chunk-KVWFAAAQ.js';
|
|
5
5
|
import { sha256OfFile, downloadPinned, VoiceDownloadError } from './chunk-2PGI6RDE.js';
|
|
6
6
|
import { zodProblem } from './chunk-I3LTIAOR.js';
|
|
7
|
-
import { hasStoredCredential, storedCredentialVariables, storeAgentCredential, isAgentName, credentialFromStdin } from './chunk-
|
|
8
|
-
import { upgradedStarterText } from './chunk-
|
|
9
|
-
import { HELPER_PATH, HELPER_RECORD, DOCKERD_LOG } from './chunk-
|
|
10
|
-
import { writeDockerClientConfig } from './chunk-
|
|
11
|
-
import { senderPidfile } from './chunk-
|
|
12
|
-
import { installScrubContext } from './chunk-
|
|
7
|
+
import { hasStoredCredential, storedCredentialVariables, storeAgentCredential, isAgentName, credentialFromStdin } from './chunk-PLPIEAQD.js';
|
|
8
|
+
import { upgradedStarterText } from './chunk-HWHDFWIL.js';
|
|
9
|
+
import { HELPER_PATH, HELPER_RECORD, DOCKERD_LOG } from './chunk-PFUT37UQ.js';
|
|
10
|
+
import { writeDockerClientConfig } from './chunk-N7HPKPPZ.js';
|
|
11
|
+
import { senderPidfile } from './chunk-TKNYBIBU.js';
|
|
12
|
+
import { installScrubContext } from './chunk-VMBH6HOJ.js';
|
|
13
13
|
import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk-ZVB57WI6.js';
|
|
14
|
-
import { runnerImageVersion } from './chunk-
|
|
15
|
-
import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey, configForJob } from './chunk-
|
|
14
|
+
import { runnerImageVersion } from './chunk-GYEDK2C7.js';
|
|
15
|
+
import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey, configForJob } from './chunk-TXB2WDG6.js';
|
|
16
16
|
import { receiveFiles } from './chunk-NN33FYXG.js';
|
|
17
|
-
import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, readRepositoryRecipe, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-
|
|
18
|
-
import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-
|
|
17
|
+
import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, readRepositoryRecipe, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-OK7IUE5M.js';
|
|
18
|
+
import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-EOVTRFI6.js';
|
|
19
19
|
import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
|
|
20
20
|
import { currentCliBuild } from './chunk-OGFGZQA3.js';
|
|
21
|
-
import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-
|
|
22
|
-
import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-
|
|
23
|
-
import { describeCallFailure, shortClaim, retrySend, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, formatClock, stageGovernedContext, keptContextTree, removeStagedContext, WORKFLOW_PERMISSION_REASON, refusalCode, SELF_GOVERNED, resolveGoverningSource, prefetchGovernedContext, controlPlaneTokenFailure, keepStagedContext, pinnedSourceOf, shimScript } from './chunk-
|
|
24
|
-
import { postJson, WorkCommandError, isSignatureRefusal, getJson } from './chunk-
|
|
25
|
-
import { isBuiltinContainer, isBuiltinVm, isBuiltinSandbox, keyRunnerFactory, runnerCredentialProblem, builtinKind, readOnlyOption, optionalEgress, egressSummary, DEFAULT_WORKSPACE_KEEP_DAYS, readOnlyRemoteOf, DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SETUP_MINUTES, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed, sandboxTimeLimitMinutes, networkOf, imageBuildOf, sandboxSizeOf, DEFAULT_SAVED_STATE_MAX_BYTES } from './chunk-
|
|
26
|
-
import { formatBytes, volumeBytes, allocatedBytes, DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, freeBytes } from './chunk-
|
|
27
|
-
import { said, firstLine, writeJobFile, readJobFile, spawnRun, RUNNER_LABEL, BUILD_LABEL,
|
|
28
|
-
import { universalImagePending, RecipeError, writeSanitizedRecipe, classifyProperties, DOCKER_FEATURE } from './chunk-
|
|
29
|
-
import { sanitizeTerminal, planArtifactUpload } from './chunk-
|
|
30
|
-
import { sharedSkillNames, skillConflictMessage } from './chunk-
|
|
21
|
+
import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-KNQDI2ZN.js';
|
|
22
|
+
import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-HN3MAJWV.js';
|
|
23
|
+
import { describeCallFailure, shortClaim, retrySend, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, formatClock, stageGovernedContext, keptContextTree, removeStagedContext, WORKFLOW_PERMISSION_REASON, refusalCode, SELF_GOVERNED, resolveGoverningSource, prefetchGovernedContext, controlPlaneTokenFailure, keepStagedContext, pinnedSourceOf, shimScript } from './chunk-SPLGHAZO.js';
|
|
24
|
+
import { postJson, WorkCommandError, isSignatureRefusal, getJson } from './chunk-NUHKAZWF.js';
|
|
25
|
+
import { isBuiltinContainer, isBuiltinVm, isBuiltinSandbox, keyRunnerFactory, runnerCredentialProblem, builtinKind, readOnlyOption, optionalEgress, egressSummary, DEFAULT_WORKSPACE_KEEP_DAYS, readOnlyRemoteOf, DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SETUP_MINUTES, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed, sandboxTimeLimitMinutes, networkOf, imageBuildOf, sandboxSizeOf, DEFAULT_SAVED_STATE_MAX_BYTES } from './chunk-IBEFT67X.js';
|
|
26
|
+
import { formatBytes, volumeBytes, allocatedBytes, DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, freeBytes } from './chunk-LKCO2LXP.js';
|
|
27
|
+
import { said, NETWORK_HELPER_MEMORY, firstLine, writeJobFile, readJobFile, spawnRun, RUNNER_LABEL, BUILD_LABEL, createDockerHost, builderSpec, childEnvironment, containerExecArgs, readDu, NETWORK_READY_FILE, withAnswerProtocol, JUDGE_TREE, MAX_REPORT_BYTES, runnerLabelValue, parseSize, readJobFileChecked, networkHelperName, prepareRunArgs, containerRunArgs, judgeCommand, JUDGE_DIR, WORKSPACE_LABEL, homeCopyRunArgs, networkHelperRunArgs, JUDGE_MAX_TURNS, JUDGE_ITEMS, answerFileName, hashJudgeProgram, identityScript, identityArgs, parseIdentity, mountableHome, homeCopyScript, homeCopyArgs, COMMAND_DIR, judgeProgramRecord, MAX_ITEMS_BYTES, JUDGE_REPORT, identityRunArgs, SAVED_STATE_LABEL } from './chunk-DAVRAYHH.js';
|
|
28
|
+
import { universalImagePending, RecipeError, writeSanitizedRecipe, classifyProperties, DOCKER_FEATURE } from './chunk-JGTYQMGV.js';
|
|
29
|
+
import { sanitizeTerminal, planArtifactUpload } from './chunk-O5FDLDQI.js';
|
|
30
|
+
import { sharedSkillNames, skillConflictMessage } from './chunk-QW3W4QYP.js';
|
|
31
31
|
import { readCloudConfig } from './chunk-HWVMRETT.js';
|
|
32
|
-
import { signerFor } from './chunk-
|
|
33
|
-
import { vmAssetsDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, workspacesDir, jobsDir, storeScopes, spoolDir, orgStoreIn, rootfsDir, imagesDir, sessionsDir, builderCacheDiskPath, buildsDir, buildDir, ghConfigDir, runnerDirOfBuild, mirrorDir, orgHomeDir, jobConsolePath, vsockPath, builderConsolePath, rootfsPathFor, diskTemplatesDir, deliveryDir, SHIM_DIR } from './chunk-
|
|
34
|
-
import { BUILD_HOME, repositoriesOf, SandboxError, JOB_MOUNT, heldBuildAuthority, IMAGE_BUNDLES, writeTrustFiles, buildEnvironment, trustEnvironment, CHECKOUT_DIR, parseIsolation, containerLocalAddress, destinationEnvironment, withHooksPath, startBuildServices, headerVariables, authorEnvironment, sharedUserEnvironment, withTunnelRecord, commitIdentityRecord, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, parseProxied, readBundleScript, applyTrust, STAND_IN, proxyEnvironment, describeSandboxError, dropBuildAuthority, sandboxSettingsFrom, createSandboxClient, hostKeyOf, buildAuthorityFor, checkEnvironment, withMiseVariables, checkoutPath, primaryOf, variablesFor, carried6to4, classifyAddress, EVAL_INPUT_DIR, isMiseVariableAllowed, variableForPath, droppedRequestHeaders, hasDotDotSegment, routeNameOf, toolProxyEnvironment } from './chunk-
|
|
35
|
-
import { agentCredential, RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, RELAY_USER, builtInNames, currentAgentCredential, removedAgentCredentialValues, managedAgentCredential, realFdStorePort, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath, AGENT_CREDENTIAL_MISSING, fdName, RELAY_ID, DOCKER_DESKTOP_REASON } from './chunk-
|
|
32
|
+
import { signerFor } from './chunk-6UU33NGO.js';
|
|
33
|
+
import { vmAssetsDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, workspacesDir, jobsDir, storeScopes, spoolDir, orgStoreIn, rootfsDir, imagesDir, sessionsDir, builderCacheDiskPath, buildsDir, buildDir, ghConfigDir, runnerDirOfBuild, mirrorDir, orgHomeDir, jobConsolePath, vsockPath, builderConsolePath, rootfsPathFor, diskTemplatesDir, deliveryDir, SHIM_DIR } from './chunk-ISBA6KRX.js';
|
|
34
|
+
import { BUILD_HOME, repositoriesOf, SandboxError, JOB_MOUNT, heldBuildAuthority, IMAGE_BUNDLES, writeTrustFiles, buildEnvironment, trustEnvironment, CHECKOUT_DIR, parseIsolation, containerLocalAddress, destinationEnvironment, withHooksPath, startBuildServices, headerVariables, authorEnvironment, sharedUserEnvironment, withTunnelRecord, commitIdentityRecord, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, parseProxied, readBundleScript, applyTrust, STAND_IN, proxyEnvironment, describeSandboxError, dropBuildAuthority, sandboxSettingsFrom, createSandboxClient, hostKeyOf, buildAuthorityFor, checkEnvironment, withMiseVariables, checkoutPath, primaryOf, variablesFor, carried6to4, classifyAddress, EVAL_INPUT_DIR, isMiseVariableAllowed, variableForPath, droppedRequestHeaders, hasDotDotSegment, routeNameOf, toolProxyEnvironment } from './chunk-TTHZCIU5.js';
|
|
35
|
+
import { agentCredential, RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, RELAY_USER, builtInNames, currentAgentCredential, removedAgentCredentialValues, managedAgentCredential, realFdStorePort, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath, AGENT_CREDENTIAL_MISSING, fdName, RELAY_ID, DOCKER_DESKTOP_REASON } from './chunk-2K2HCINU.js';
|
|
36
36
|
import { versionAtLeast } from './chunk-SF2TBJBP.js';
|
|
37
|
-
import { jobAgent, firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, builderDiskPinned, guestAssetsPinned, runnerAgentNamed, credentialForms, orList, credentialShapes, agentCommands, defaultCommandLine, credentialAgent, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, BUILDER_DISK_VERSION, credentialHandOffKey, strippedVariables, runnerAgents, judgeAgent, networkHelperPinned, NETWORK_HELPER_SHA256, universalImagePinned, UNIVERSAL_IMAGE, 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, agentVersionOf } from './chunk-
|
|
38
|
-
import { sessionFolderIn, legacyAgent, defaultAgents, parsePolicy, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, orderSessions, extractFacts, sessionsToTimeline, resolvePackRoot } from './chunk-
|
|
37
|
+
import { jobAgent, firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, builderDiskPinned, guestAssetsPinned, runnerAgentNamed, credentialForms, orList, credentialShapes, agentCommands, defaultCommandLine, credentialAgent, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, BUILDER_DISK_VERSION, credentialHandOffKey, strippedVariables, runnerAgents, judgeAgent, networkHelperPinned, NETWORK_HELPER_SHA256, universalImagePinned, UNIVERSAL_IMAGE, 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, agentVersionOf } from './chunk-JAQWKAEN.js';
|
|
38
|
+
import { sessionFolderIn, legacyAgent, defaultAgents, parsePolicy, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, orderSessions, extractFacts, sessionsToTimeline, resolvePackRoot } from './chunk-6725XB2P.js';
|
|
39
39
|
import { MAINTAINED_SKILLS } from './chunk-ELPP5OHC.js';
|
|
40
40
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
41
41
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
42
|
-
import { scrubText, MIN_SCRUBBED_LITERAL, setCustomScrubbers, setLocalIdentity, setRepoRoot, forkFor, scrubDeep } from './chunk-
|
|
43
|
-
import { CheckItemsSchema, CODE_REVIEW_NAME, JUDGE_NOT_RUN_ITEM_ID, REVIEWED_COMMIT_ITEM_ID, CHECK_ITEM_REASON_MAX_LENGTH, UNREVIEWED_FILES_ITEM_ID, problemKind, CODE_REVIEW_PROBLEMS_MAX, CHECK_ITEM_HREF_MAX_LENGTH, downconvertSession } from './chunk-
|
|
42
|
+
import { scrubText, MIN_SCRUBBED_LITERAL, setCustomScrubbers, setLocalIdentity, setRepoRoot, forkFor, scrubDeep } from './chunk-WCHE4WRD.js';
|
|
43
|
+
import { CheckItemsSchema, CODE_REVIEW_NAME, JUDGE_NOT_RUN_ITEM_ID, REVIEWED_COMMIT_ITEM_ID, CHECK_ITEM_REASON_MAX_LENGTH, UNREVIEWED_FILES_ITEM_ID, problemKind, CODE_REVIEW_PROBLEMS_MAX, CHECK_ITEM_HREF_MAX_LENGTH, downconvertSession } from './chunk-IQDIXTDJ.js';
|
|
44
44
|
import { randomUUID, randomBytes, createHash } from 'crypto';
|
|
45
45
|
import { rmSync, mkdirSync, existsSync, readFileSync, mkdtempSync, statSync, appendFileSync, writeFileSync, readdirSync, accessSync, constants, openSync, closeSync, renameSync, rmdirSync, createReadStream, lstatSync, unlinkSync, chmodSync, realpathSync, writeSync, truncateSync, cpSync, fstatSync, readSync, createWriteStream, copyFileSync, linkSync } from 'fs';
|
|
46
46
|
import { join, dirname, isAbsolute, delimiter, basename, sep, relative, resolve } from 'path';
|
|
@@ -1437,6 +1437,7 @@ function createSandboxPorts(opts, hostEnv) {
|
|
|
1437
1437
|
creating: opts?.creating ?? /* @__PURE__ */ new Set(),
|
|
1438
1438
|
resuming: opts?.resuming ?? /* @__PURE__ */ new Set(),
|
|
1439
1439
|
joinSecrets: opts?.joinSecrets ?? /* @__PURE__ */ new Map(),
|
|
1440
|
+
networkHelper: opts?.networkHelper ?? ((options) => ensureNetworkHelper(options)),
|
|
1440
1441
|
sleep: opts?.sleep ?? ((ms) => new Promise((resolve2) => setTimeout(resolve2, ms)))
|
|
1441
1442
|
};
|
|
1442
1443
|
}
|
|
@@ -3493,6 +3494,67 @@ function superviseRelay(input) {
|
|
|
3493
3494
|
}
|
|
3494
3495
|
};
|
|
3495
3496
|
}
|
|
3497
|
+
var NETWORK_READY_ATTEMPTS = 60;
|
|
3498
|
+
var NETWORK_READY_PAUSE_MS = 500;
|
|
3499
|
+
var LOG_LINES = 20;
|
|
3500
|
+
async function helperReason(runtime, name) {
|
|
3501
|
+
const logs = await runtime.host.logs(name, LOG_LINES);
|
|
3502
|
+
const lines = `${logs.stdout}
|
|
3503
|
+
${logs.stderr}`.split("\n").map((line2) => line2.trim());
|
|
3504
|
+
return lines.filter((line2) => line2.startsWith("net: ")).at(-1) ?? lines.filter((line2) => line2 !== "").at(-1) ?? "";
|
|
3505
|
+
}
|
|
3506
|
+
async function waitForNetwork(runtime, name) {
|
|
3507
|
+
for (let attempt = 0; attempt < NETWORK_READY_ATTEMPTS; attempt++) {
|
|
3508
|
+
const probe = await runtime.host.exec({ container: name, user: "0:0", env: { literals: {}, passed: {} }, argv: ["cat", NETWORK_READY_FILE] });
|
|
3509
|
+
if (probe.status === 0) return void 0;
|
|
3510
|
+
const state = await runtime.host.state(name);
|
|
3511
|
+
if (state === "stopped" || state === "missing") {
|
|
3512
|
+
return `the build's network helper container stopped before its network was ready${said(await helperReason(runtime, name))}`;
|
|
3513
|
+
}
|
|
3514
|
+
await runtime.sleep(NETWORK_READY_PAUSE_MS);
|
|
3515
|
+
}
|
|
3516
|
+
return `the build's network helper container was not ready within ${NETWORK_READY_ATTEMPTS * NETWORK_READY_PAUSE_MS / 1e3} seconds${said(await helperReason(runtime, name))}`;
|
|
3517
|
+
}
|
|
3518
|
+
async function startNetworkHelper(runtime, input, logPath) {
|
|
3519
|
+
const started = await runtime.host.run(networkHelperRunArgs(input), { logPath });
|
|
3520
|
+
if (started.status !== 0) {
|
|
3521
|
+
return `starting the build's network helper container failed (exit ${started.status})${said(started.stderr)}`;
|
|
3522
|
+
}
|
|
3523
|
+
return waitForNetwork(runtime, input.name);
|
|
3524
|
+
}
|
|
3525
|
+
async function ensureNetworkReady(runtime, state) {
|
|
3526
|
+
if (state.network === void 0) return void 0;
|
|
3527
|
+
const current = await runtime.host.state(state.network);
|
|
3528
|
+
if (current === "running") return void 0;
|
|
3529
|
+
if (current === "missing") return `the build's network helper container ${state.network} is gone`;
|
|
3530
|
+
const started = await runtime.host.start(state.network);
|
|
3531
|
+
if (started.status !== 0) {
|
|
3532
|
+
return `starting the build's network helper container again failed (exit ${started.status})${said(started.stderr)}`;
|
|
3533
|
+
}
|
|
3534
|
+
return waitForNetwork(runtime, state.network);
|
|
3535
|
+
}
|
|
3536
|
+
async function stoppedHelperReason(runtime, name) {
|
|
3537
|
+
if (await runtime.host.oomKilled(name)) return `the build's network helper container ran out of memory (${NETWORK_HELPER_MEMORY})`;
|
|
3538
|
+
return `the build's network helper container stopped${said(await helperReason(runtime, name))}`;
|
|
3539
|
+
}
|
|
3540
|
+
async function removeNetworkHelper(runtime, state) {
|
|
3541
|
+
if (state.network === void 0) return void 0;
|
|
3542
|
+
const removed = await runtime.host.remove(state.network);
|
|
3543
|
+
if (removed.status !== 0 && !/no such container/i.test(removed.stderr)) return `container ${state.network} was not removed: ${removed.stderr.trim()}`;
|
|
3544
|
+
return void 0;
|
|
3545
|
+
}
|
|
3546
|
+
function kernelHasIpv6(exists = existsSync, platform = process.platform) {
|
|
3547
|
+
return platform !== "linux" || exists("/proc/sys/net/ipv6");
|
|
3548
|
+
}
|
|
3549
|
+
function helperArchOf(engineArch) {
|
|
3550
|
+
if (engineArch === "amd64") return "x86_64";
|
|
3551
|
+
if (engineArch === "arm64") return "aarch64";
|
|
3552
|
+
return engineArch;
|
|
3553
|
+
}
|
|
3554
|
+
async function engineNetworkHelper(host, runnerDir2, ensure = ensureNetworkHelper) {
|
|
3555
|
+
const engine = await host.architecture();
|
|
3556
|
+
return ensure({ runnerDir: runnerDir2, ...engine === null ? {} : { arch: helperArchOf(engine) } });
|
|
3557
|
+
}
|
|
3496
3558
|
|
|
3497
3559
|
// src/runner/record-proofs.ts
|
|
3498
3560
|
var RECORD_PROOFS_ARGV = ["outerlayer", "work", "proofs", "--record", "--comment"];
|
|
@@ -4121,6 +4183,12 @@ var SKILL_PACK_DIR = `${SANDBOX_DIR}/skill-pack`;
|
|
|
4121
4183
|
var SECRET_FILE = `${SANDBOX_DIR}/join-secret`;
|
|
4122
4184
|
var CONTAINER_SECRET_FILE = "/run/outerlayer-relay/join-secret";
|
|
4123
4185
|
var JOIN_WS_PORT = 7077;
|
|
4186
|
+
var HELPER_FILE = `${SANDBOX_DIR}/outerlayer-guest`;
|
|
4187
|
+
var JOIN_DIR = `${SANDBOX_DIR}/join`;
|
|
4188
|
+
var CONTAINER_JOIN_DIR = "/run/outerlayer-join";
|
|
4189
|
+
var CONTAINER_JOIN_SOCKET = `${CONTAINER_JOIN_DIR}/join.sock`;
|
|
4190
|
+
var CONTAINER_PROXY_SOCKET = `${CONTAINER_JOIN_DIR}/proxy.sock`;
|
|
4191
|
+
var RELAY_IDS = "60100:60100";
|
|
4124
4192
|
var SANDBOX_RESERVE_MIB = 512;
|
|
4125
4193
|
var RELAY_ATTEMPTS = 40;
|
|
4126
4194
|
var RELAY_WAIT_MS = 500;
|
|
@@ -4211,14 +4279,56 @@ function daemonSetupLine() {
|
|
|
4211
4279
|
function hostMountLine(volume) {
|
|
4212
4280
|
return `sudo mkdir -p ${HOST_BUILD_DIR} && { mountpoint -q ${HOST_BUILD_DIR} || sudo mount --bind "$(sudo docker volume inspect -f '{{.Mountpoint}}' ${quote(volume)})" ${HOST_BUILD_DIR}; }`;
|
|
4213
4281
|
}
|
|
4214
|
-
function removeBuildContainersLine(keep) {
|
|
4215
|
-
const others = keep
|
|
4282
|
+
function removeBuildContainersLine(...keep) {
|
|
4283
|
+
const others = keep.map((name) => ` | grep -v ${quote(` ${name}$`)}`).join("");
|
|
4216
4284
|
return `ids=$(sudo docker ps -a --format '{{.ID}} {{.Names}}' | grep -v ' buildx_buildkit_'${others} | cut -d' ' -f1); [ -z "$ids" ] || sudo docker rm -f $ids`;
|
|
4217
4285
|
}
|
|
4286
|
+
function joinForwarderName(container) {
|
|
4287
|
+
return `${container}-join`;
|
|
4288
|
+
}
|
|
4289
|
+
function networkContainersOf(state) {
|
|
4290
|
+
return state.network === void 0 ? [] : [state.network, joinForwarderName(state.container)];
|
|
4291
|
+
}
|
|
4292
|
+
var FORWARDER_SCRIPT = `const net=require("net");for(const pair of process.argv.slice(1)){const cut=pair.indexOf("=");const at=pair.lastIndexOf(":",cut);const path=pair.slice(cut+1);net.createServer((c)=>{const u=net.connect(path);const end=()=>{c.destroy();u.destroy()};c.on("error",end);u.on("error",end);c.on("close",end);u.on("close",end);c.pipe(u);u.pipe(c)}).listen(Number(pair.slice(at+1,cut)),pair.slice(0,at))}`;
|
|
4293
|
+
function joinForwarderRunArgs(input) {
|
|
4294
|
+
return [
|
|
4295
|
+
"--detach",
|
|
4296
|
+
"--name",
|
|
4297
|
+
input.name,
|
|
4298
|
+
"--label",
|
|
4299
|
+
`${BUILD_LABEL}=${input.buildId}`,
|
|
4300
|
+
"--label",
|
|
4301
|
+
`${RUNNER_LABEL}=${input.runnerId}`,
|
|
4302
|
+
"--network",
|
|
4303
|
+
"host",
|
|
4304
|
+
"--cap-drop",
|
|
4305
|
+
"ALL",
|
|
4306
|
+
"--security-opt",
|
|
4307
|
+
"no-new-privileges",
|
|
4308
|
+
"--read-only",
|
|
4309
|
+
"--user",
|
|
4310
|
+
RELAY_IDS,
|
|
4311
|
+
"--memory",
|
|
4312
|
+
"128m",
|
|
4313
|
+
"--memory-swap",
|
|
4314
|
+
"128m",
|
|
4315
|
+
"--pids-limit",
|
|
4316
|
+
"64",
|
|
4317
|
+
"--mount",
|
|
4318
|
+
`type=bind,src=${JOIN_DIR},dst=${CONTAINER_JOIN_DIR}`,
|
|
4319
|
+
"--entrypoint",
|
|
4320
|
+
"/opt/outerlayer/bin/node",
|
|
4321
|
+
input.image,
|
|
4322
|
+
"-e",
|
|
4323
|
+
FORWARDER_SCRIPT,
|
|
4324
|
+
`0.0.0.0:${JOIN_WS_PORT}=${CONTAINER_JOIN_SOCKET}`,
|
|
4325
|
+
`127.0.0.1:${RELAY_PORT}=${CONTAINER_PROXY_SOCKET}`
|
|
4326
|
+
];
|
|
4327
|
+
}
|
|
4218
4328
|
function sandboxRunArgs(args, opts = {}) {
|
|
4219
4329
|
const out = [...args];
|
|
4220
4330
|
const network = out.indexOf("--network");
|
|
4221
|
-
if (network !== -1) out[network + 1] = "host";
|
|
4331
|
+
if (network !== -1 && opts.joined !== true) out[network + 1] = "host";
|
|
4222
4332
|
const entrypoint = out.indexOf("--entrypoint");
|
|
4223
4333
|
out.splice(
|
|
4224
4334
|
entrypoint,
|
|
@@ -4228,12 +4338,42 @@ function sandboxRunArgs(args, opts = {}) {
|
|
|
4228
4338
|
...opts.skillPack === true ? ["--mount", `type=bind,src=${SKILL_PACK_DIR},dst=/opt/outerlayer/cli/skill-pack,readonly`] : [],
|
|
4229
4339
|
"--mount",
|
|
4230
4340
|
`type=bind,src=${SECRET_FILE},dst=${CONTAINER_SECRET_FILE},readonly`,
|
|
4341
|
+
...opts.joined === true ? ["--mount", `type=bind,src=${JOIN_DIR},dst=${CONTAINER_JOIN_DIR}`] : [],
|
|
4231
4342
|
...opts.dockerGroup === void 0 ? [] : ["--mount", `type=bind,src=${DOCKER_SOCKET},dst=${DOCKER_SOCKET}`, "--group-add", opts.dockerGroup],
|
|
4232
4343
|
...Object.entries(toolProxyEnvironment()).flatMap(([name, value]) => ["--env", `${name}=${value}`])
|
|
4233
4344
|
);
|
|
4234
|
-
out.push("--join-ws", String(JOIN_WS_PORT), "--join-secret-file", CONTAINER_SECRET_FILE);
|
|
4345
|
+
out.push("--join-ws", opts.joined === true ? CONTAINER_JOIN_SOCKET : String(JOIN_WS_PORT), "--join-secret-file", CONTAINER_SECRET_FILE);
|
|
4346
|
+
if (opts.joined === true) out.push("--listen-socket", CONTAINER_PROXY_SOCKET);
|
|
4235
4347
|
return out;
|
|
4236
4348
|
}
|
|
4349
|
+
function noHelperLine(why) {
|
|
4350
|
+
return `${why}, so the build's container is on the sandbox's own network: a program that ignores proxy settings has no network`;
|
|
4351
|
+
}
|
|
4352
|
+
async function startSandboxNetwork(input) {
|
|
4353
|
+
const { sandboxed, sandboxClient, sandbox, build } = input;
|
|
4354
|
+
const tun = await commandIn(sandboxClient, sandbox, "test -c /dev/net/tun");
|
|
4355
|
+
if (tun.exitCode !== 0) return { none: "this sandbox's kernel gives no TUN device" };
|
|
4356
|
+
let helper;
|
|
4357
|
+
try {
|
|
4358
|
+
helper = await engineNetworkHelper(sandboxed.host, input.runnerDir, (options) => input.runtime.sandbox.networkHelper(options));
|
|
4359
|
+
} catch (err) {
|
|
4360
|
+
return { none: err instanceof AssetError ? err.message : `the network helper could not be had: ${describeCallFailure(err)}` };
|
|
4361
|
+
}
|
|
4362
|
+
try {
|
|
4363
|
+
await sandboxClient.upload(sandbox, HELPER_FILE, readFileSync(helper.path));
|
|
4364
|
+
} catch (err) {
|
|
4365
|
+
return { failed: `putting the network helper in the sandbox failed: ${err instanceof SandboxError ? describeSandboxError(err) : describeCallFailure(err)}` };
|
|
4366
|
+
}
|
|
4367
|
+
const placed = await commandIn(sandboxClient, sandbox, `chmod 755 ${HELPER_FILE} && mkdir -p ${JOIN_DIR} && sudo chown ${RELAY_IDS} ${JOIN_DIR} && sudo chmod 700 ${JOIN_DIR}`);
|
|
4368
|
+
if (placed.exitCode !== 0) return { failed: `preparing the network helper in the sandbox failed (exit ${placed.exitCode ?? "none"})${said(placed.stderr)}` };
|
|
4369
|
+
const ipv6 = (await commandIn(sandboxClient, sandbox, "test -e /proc/sys/net/ipv6")).exitCode === 0;
|
|
4370
|
+
const name = networkHelperName(build.container);
|
|
4371
|
+
const notReady = await startNetworkHelper(sandboxed, { name, buildId: build.buildId, runnerId: build.runnerId, image: build.image, limits: build.limits, ipv6, helperFile: HELPER_FILE }, input.logPath);
|
|
4372
|
+
if (notReady !== void 0) return { failed: notReady };
|
|
4373
|
+
const forwarder = await sandboxed.host.run(joinForwarderRunArgs({ name: joinForwarderName(build.container), buildId: build.buildId, runnerId: build.runnerId, image: build.image }), { logPath: input.logPath });
|
|
4374
|
+
if (forwarder.status !== 0) return { failed: `starting the build's join forwarder failed (exit ${forwarder.status})${said(forwarder.stderr)}` };
|
|
4375
|
+
return { helper: name };
|
|
4376
|
+
}
|
|
4237
4377
|
var RELAY_PROBE = `const s=require("net").connect(3128,"127.0.0.1");s.on("connect",()=>process.exit(0));s.on("error",()=>process.exit(1));setTimeout(()=>process.exit(1),2000)`;
|
|
4238
4378
|
async function waitForRelay(runtime, container) {
|
|
4239
4379
|
for (let attempt = 0; attempt < RELAY_ATTEMPTS; attempt++) {
|
|
@@ -4601,7 +4741,12 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
4601
4741
|
const agentUser = resolved.user;
|
|
4602
4742
|
input.save(state, environment);
|
|
4603
4743
|
if (input.aborted()) return bail("", true);
|
|
4604
|
-
const
|
|
4744
|
+
const network = await startSandboxNetwork({ runtime, sandboxed, sandboxClient, sandbox, runnerDir: runnerDir(config.configPath), build: { buildId, runnerId, container, image, limits: limits2 }, logPath });
|
|
4745
|
+
if ("failed" in network) return bail(network.failed);
|
|
4746
|
+
if ("none" in network) log.line(`${tag} ${noHelperLine(network.none)}`);
|
|
4747
|
+
else containerState.network = network.helper;
|
|
4748
|
+
const runArgs = containerRunArgs({ ...runInput, home: containerState.home, network: containerState.network }, runtime.agents);
|
|
4749
|
+
const started = await host.run(sandboxRunArgs(runArgs, { skillPack: skillPack !== void 0, dockerGroup, joined: containerState.network !== void 0 }), { logPath });
|
|
4605
4750
|
if (started.status !== 0) return dockerFailed("starting the build's container", started);
|
|
4606
4751
|
joinRelay(runtime, sandbox, { buildId, container }, services.streams, joinSecret, (line2) => log.line(`${tag} ${line2}`));
|
|
4607
4752
|
if (input.aborted()) return bail("", true);
|
|
@@ -4726,6 +4871,12 @@ async function rejoinOf(runtime, own) {
|
|
|
4726
4871
|
async function startSandboxContainerAgain(runtime, own, rejoin, jobDir, log) {
|
|
4727
4872
|
const state = own.container;
|
|
4728
4873
|
const { sandbox, sandboxed } = rejoin;
|
|
4874
|
+
const notReady = await ensureNetworkReady(sandboxed, state);
|
|
4875
|
+
if (notReady !== void 0) throw new Error(notReady);
|
|
4876
|
+
if (state.network !== void 0) {
|
|
4877
|
+
const forwarding = await sandboxed.host.start(joinForwarderName(state.container));
|
|
4878
|
+
if (forwarding.status !== 0) throw new Error(`the build's join forwarder could not be started again (exit ${forwarding.status})`);
|
|
4879
|
+
}
|
|
4729
4880
|
const started = await sandboxed.host.start(state.container);
|
|
4730
4881
|
if (started.status !== 0) throw new Error(`the build's container could not be started again (exit ${started.status})`);
|
|
4731
4882
|
if (!await waitForRelay(sandboxed, state.container)) throw new Error("the relay in the build's container did not start again");
|
|
@@ -4744,7 +4895,7 @@ function sandboxJudgeEnvironment(input) {
|
|
|
4744
4895
|
const rejoin = await rejoinOf(runtime, own);
|
|
4745
4896
|
const { sandbox, sandboxed } = rejoin;
|
|
4746
4897
|
await leaveRelay(runtime, state.buildId);
|
|
4747
|
-
const removed = await client(runtime).command(sandbox, removeBuildContainersLine(state.container));
|
|
4898
|
+
const removed = await client(runtime).command(sandbox, removeBuildContainersLine(state.container, ...networkContainersOf(state)));
|
|
4748
4899
|
if (removed.exitCode !== 0) throw new Error(`the containers the build started could not be removed (exit ${removed.exitCode ?? "none"})`);
|
|
4749
4900
|
await sandboxed.host.stop(state.container);
|
|
4750
4901
|
state.stopped = true;
|
|
@@ -12161,67 +12312,6 @@ function createCpuAllocator(cores) {
|
|
|
12161
12312
|
}
|
|
12162
12313
|
};
|
|
12163
12314
|
}
|
|
12164
|
-
var NETWORK_READY_ATTEMPTS = 60;
|
|
12165
|
-
var NETWORK_READY_PAUSE_MS = 500;
|
|
12166
|
-
var LOG_LINES = 20;
|
|
12167
|
-
async function helperReason(runtime, name) {
|
|
12168
|
-
const logs = await runtime.host.logs(name, LOG_LINES);
|
|
12169
|
-
const lines = `${logs.stdout}
|
|
12170
|
-
${logs.stderr}`.split("\n").map((line2) => line2.trim());
|
|
12171
|
-
return lines.filter((line2) => line2.startsWith("net: ")).at(-1) ?? lines.filter((line2) => line2 !== "").at(-1) ?? "";
|
|
12172
|
-
}
|
|
12173
|
-
async function waitForNetwork(runtime, name) {
|
|
12174
|
-
for (let attempt = 0; attempt < NETWORK_READY_ATTEMPTS; attempt++) {
|
|
12175
|
-
const probe = await runtime.host.exec({ container: name, user: "0:0", env: { literals: {}, passed: {} }, argv: ["cat", NETWORK_READY_FILE] });
|
|
12176
|
-
if (probe.status === 0) return void 0;
|
|
12177
|
-
const state = await runtime.host.state(name);
|
|
12178
|
-
if (state === "stopped" || state === "missing") {
|
|
12179
|
-
return `the build's network helper container stopped before its network was ready${said(await helperReason(runtime, name))}`;
|
|
12180
|
-
}
|
|
12181
|
-
await runtime.sleep(NETWORK_READY_PAUSE_MS);
|
|
12182
|
-
}
|
|
12183
|
-
return `the build's network helper container was not ready within ${NETWORK_READY_ATTEMPTS * NETWORK_READY_PAUSE_MS / 1e3} seconds${said(await helperReason(runtime, name))}`;
|
|
12184
|
-
}
|
|
12185
|
-
async function startNetworkHelper(runtime, input, logPath) {
|
|
12186
|
-
const started = await runtime.host.run(networkHelperRunArgs(input), { logPath });
|
|
12187
|
-
if (started.status !== 0) {
|
|
12188
|
-
return `starting the build's network helper container failed (exit ${started.status})${said(started.stderr)}`;
|
|
12189
|
-
}
|
|
12190
|
-
return waitForNetwork(runtime, input.name);
|
|
12191
|
-
}
|
|
12192
|
-
async function ensureNetworkReady(runtime, state) {
|
|
12193
|
-
if (state.network === void 0) return void 0;
|
|
12194
|
-
const current = await runtime.host.state(state.network);
|
|
12195
|
-
if (current === "running") return void 0;
|
|
12196
|
-
if (current === "missing") return `the build's network helper container ${state.network} is gone`;
|
|
12197
|
-
const started = await runtime.host.start(state.network);
|
|
12198
|
-
if (started.status !== 0) {
|
|
12199
|
-
return `starting the build's network helper container again failed (exit ${started.status})${said(started.stderr)}`;
|
|
12200
|
-
}
|
|
12201
|
-
return waitForNetwork(runtime, state.network);
|
|
12202
|
-
}
|
|
12203
|
-
async function stoppedHelperReason(runtime, name) {
|
|
12204
|
-
if (await runtime.host.oomKilled(name)) return `the build's network helper container ran out of memory (${NETWORK_HELPER_MEMORY})`;
|
|
12205
|
-
return `the build's network helper container stopped${said(await helperReason(runtime, name))}`;
|
|
12206
|
-
}
|
|
12207
|
-
async function removeNetworkHelper(runtime, state) {
|
|
12208
|
-
if (state.network === void 0) return void 0;
|
|
12209
|
-
const removed = await runtime.host.remove(state.network);
|
|
12210
|
-
if (removed.status !== 0 && !/no such container/i.test(removed.stderr)) return `container ${state.network} was not removed: ${removed.stderr.trim()}`;
|
|
12211
|
-
return void 0;
|
|
12212
|
-
}
|
|
12213
|
-
function kernelHasIpv6(exists = existsSync, platform = process.platform) {
|
|
12214
|
-
return platform !== "linux" || exists("/proc/sys/net/ipv6");
|
|
12215
|
-
}
|
|
12216
|
-
function helperArchOf(engineArch) {
|
|
12217
|
-
if (engineArch === "amd64") return "x86_64";
|
|
12218
|
-
if (engineArch === "arm64") return "aarch64";
|
|
12219
|
-
return engineArch;
|
|
12220
|
-
}
|
|
12221
|
-
async function engineNetworkHelper(host, runnerDir2, ensure = ensureNetworkHelper) {
|
|
12222
|
-
const engine = await host.architecture();
|
|
12223
|
-
return ensure({ runnerDir: runnerDir2, ...engine === null ? {} : { arch: helperArchOf(engine) } });
|
|
12224
|
-
}
|
|
12225
12315
|
|
|
12226
12316
|
// src/runner/container/hooks.ts
|
|
12227
12317
|
var MIN_ENGINE_MAJOR = 26;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RemovedTargetError, removedTargetError } from './chunk-
|
|
4
|
-
import { removeRetiredSkills } from './chunk-
|
|
5
|
-
import { defaultFetch, resolveGatewayCredentials } from './chunk-
|
|
6
|
-
import { withTokenHeader } from './chunk-
|
|
3
|
+
import { RemovedTargetError, removedTargetError } from './chunk-EMSSER2V.js';
|
|
4
|
+
import { removeRetiredSkills } from './chunk-VGI32UMX.js';
|
|
5
|
+
import { defaultFetch, resolveGatewayCredentials } from './chunk-GDQMVZS4.js';
|
|
6
|
+
import { withTokenHeader } from './chunk-TTHZCIU5.js';
|
|
7
7
|
import { appendContextProvenance } from './chunk-545P7JY7.js';
|
|
8
8
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
9
9
|
import { writeDegraded, writeSourceCache, SOURCE_CACHE_TTL_RETRY_MS, writeContextManifest, SOURCE_CACHE_TTL_SUCCESS_MS, readSourceCache, isSourceCacheFresh, clearDegraded } from './chunk-YQR6E6OV.js';
|
|
10
|
-
import { normalizeRepoName, loadMaintainedFiles, writeMaintainedFiles, parseOuterlayerConfig, targetIds, classifyTree, emitTree, emitBuilders, defaultAgents, agentRootFolders } from './chunk-
|
|
10
|
+
import { normalizeRepoName, loadMaintainedFiles, writeMaintainedFiles, parseOuterlayerConfig, targetIds, classifyTree, emitTree, emitBuilders, defaultAgents, agentRootFolders } from './chunk-6725XB2P.js';
|
|
11
11
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
12
12
|
import { execFileSync } from 'child_process';
|
|
13
13
|
import { existsSync, mkdirSync, writeFileSync, chmodSync, lstatSync, readFileSync, copyFileSync } from 'fs';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { detectActiveSession } from './chunk-
|
|
4
|
-
import { autoConnect } from './chunk-
|
|
5
|
-
import { workPageUrl } from './chunk-
|
|
6
|
-
import { sanitizeTerminal } from './chunk-
|
|
3
|
+
import { detectActiveSession } from './chunk-F5C2B747.js';
|
|
4
|
+
import { autoConnect } from './chunk-VGXGM5C7.js';
|
|
5
|
+
import { workPageUrl } from './chunk-UJBNNBAS.js';
|
|
6
|
+
import { sanitizeTerminal } from './chunk-O5FDLDQI.js';
|
|
7
7
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
8
|
-
import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-
|
|
9
|
-
import { signRunnerRequest } from './chunk-
|
|
8
|
+
import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-GDQMVZS4.js';
|
|
9
|
+
import { signRunnerRequest } from './chunk-6UU33NGO.js';
|
|
10
10
|
import { readRepoConnection } from './chunk-BJ3KTMDH.js';
|
|
11
11
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
12
12
|
import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-7PZDPISM.js';
|
|
13
13
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
14
|
-
import { resolveRepoIdentity } from './chunk-
|
|
14
|
+
import { resolveRepoIdentity } from './chunk-WCHE4WRD.js';
|
|
15
15
|
|
|
16
16
|
createRequire(import.meta.url);
|
|
17
17
|
|
|
@@ -563,7 +563,7 @@ async function runWorkLinkSession(opts) {
|
|
|
563
563
|
return await linkSession(opts);
|
|
564
564
|
} catch (err) {
|
|
565
565
|
if (opts.logFailures) {
|
|
566
|
-
const { logHookError } = await import('./hook-fast-
|
|
566
|
+
const { logHookError } = await import('./hook-fast-CYQXYLXL.js');
|
|
567
567
|
const reason = err instanceof Error ? err.message : String(err);
|
|
568
568
|
logHookError(opts.home ?? homeFromEnv(opts.env ?? process.env), new Error(`work link-session #${opts.number} failed: ${reason}`));
|
|
569
569
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
4
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
4
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-ISBA6KRX.js';
|
|
5
5
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, rmSync } from 'fs';
|
|
6
6
|
import { dirname } from 'path';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
4
|
-
import { ArtifactTombstoneRecordSchema, ArtifactSpoolRecordSchema } from './chunk-
|
|
4
|
+
import { ArtifactTombstoneRecordSchema, ArtifactSpoolRecordSchema } from './chunk-IQDIXTDJ.js';
|
|
5
5
|
import { mkdirSync, appendFileSync, writeFileSync, renameSync, unlinkSync, existsSync, readdirSync, readFileSync, statSync } from 'fs';
|
|
6
6
|
import { join, dirname } from 'path';
|
|
7
7
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { toolsDockerfile } from './chunk-
|
|
4
|
-
import { claimPidFile, RunnerAlreadyRunningError, releasePidFile } from './chunk-
|
|
3
|
+
import { toolsDockerfile } from './chunk-EOVTRFI6.js';
|
|
4
|
+
import { claimPidFile, RunnerAlreadyRunningError, releasePidFile } from './chunk-NXNECYRC.js';
|
|
5
5
|
import { startTimeOf } from './chunk-JBJTC3UU.js';
|
|
6
|
-
import { runnerLabelValue } from './chunk-
|
|
7
|
-
import { RecipeError, locateRecipe, readRecipe, assertBuildable, writeSanitizedRecipe, classifyProperties, SANITIZED_NAME } from './chunk-
|
|
8
|
-
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, repoCacheDir, imagesDir, imageBuildLogsDir, attemptStamp, orgStore, rootfsPathFor } from './chunk-
|
|
9
|
-
import { withGitConfig, tokenHeader } from './chunk-
|
|
10
|
-
import { UNIVERSAL_IMAGE_DIGEST, UNIVERSAL_IMAGE_REPOSITORY, UNIVERSAL_IMAGE_SOURCE, buildAgentPin, NODE_IMAGE, UNIVERSAL_IMAGE, MEDIA_PINS, TINI_VERSION, GH_VERSION, imageAgentPins } from './chunk-
|
|
6
|
+
import { runnerLabelValue } from './chunk-DAVRAYHH.js';
|
|
7
|
+
import { RecipeError, locateRecipe, readRecipe, assertBuildable, writeSanitizedRecipe, classifyProperties, SANITIZED_NAME } from './chunk-JGTYQMGV.js';
|
|
8
|
+
import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, repoCacheDir, imagesDir, imageBuildLogsDir, attemptStamp, orgStore, rootfsPathFor } from './chunk-ISBA6KRX.js';
|
|
9
|
+
import { withGitConfig, tokenHeader } from './chunk-TTHZCIU5.js';
|
|
10
|
+
import { UNIVERSAL_IMAGE_DIGEST, UNIVERSAL_IMAGE_REPOSITORY, UNIVERSAL_IMAGE_SOURCE, buildAgentPin, NODE_IMAGE, UNIVERSAL_IMAGE, MEDIA_PINS, TINI_VERSION, GH_VERSION, imageAgentPins } from './chunk-JAQWKAEN.js';
|
|
11
11
|
import { mkdirSync, writeFileSync, existsSync, mkdtempSync, rmSync, cpSync, readFileSync, readdirSync, lstatSync, readlinkSync } from 'fs';
|
|
12
12
|
import { tmpdir } from 'os';
|
|
13
13
|
import { join } from 'path';
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
4
|
-
import { reportFailedStart, fitImageBuildMemory } from './chunk-
|
|
4
|
+
import { reportFailedStart, fitImageBuildMemory } from './chunk-RVKFUJFK.js';
|
|
5
5
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
|
|
6
|
-
import { writeFleetState } from './chunk-
|
|
7
|
-
import { writePendingUpdate } from './chunk-
|
|
8
|
-
import { renderUpdateSteps } from './chunk-
|
|
9
|
-
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-
|
|
10
|
-
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-
|
|
11
|
-
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-
|
|
12
|
-
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runIsolation, runCommandOf, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, restoreSessionIntoSandbox, recordsProofsOnly, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionSandbox, deliverSandboxHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, keptCommitsLine, currentSkillCommand, formerSkillProblem, commandLogOffset, startSandboxCommand, MICROVM_COMMAND_DIR, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isSandboxTracked, isContainerTracked, isMicroVmTracked, probeSandboxCommand, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, SandboxGoneError, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isIsolatedJob, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, vmAlive, filesAreCopied, inSandbox, listItemDisks, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, keptSandboxIds, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, rejoinSandboxBuild, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, ADOPTED_FETCH_RETRY_WINDOW_MS, managedBuildSettingsFor, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, deliverJobFiles, inTeardown } from './chunk-
|
|
6
|
+
import { writeFleetState } from './chunk-4YDYYNKT.js';
|
|
7
|
+
import { writePendingUpdate } from './chunk-IEWF7OMQ.js';
|
|
8
|
+
import { renderUpdateSteps } from './chunk-52PRIAV7.js';
|
|
9
|
+
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-FQFZ5XL5.js';
|
|
10
|
+
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-AUJRXNE7.js';
|
|
11
|
+
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-HHDDGKBN.js';
|
|
12
|
+
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runIsolation, runCommandOf, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, restoreSessionIntoSandbox, recordsProofsOnly, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionSandbox, deliverSandboxHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, keptCommitsLine, currentSkillCommand, formerSkillProblem, commandLogOffset, startSandboxCommand, MICROVM_COMMAND_DIR, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isSandboxTracked, isContainerTracked, isMicroVmTracked, probeSandboxCommand, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, SandboxGoneError, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isIsolatedJob, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, vmAlive, filesAreCopied, inSandbox, listItemDisks, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, keptSandboxIds, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, rejoinSandboxBuild, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, ADOPTED_FETCH_RETRY_WINDOW_MS, managedBuildSettingsFor, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, deliverJobFiles, inTeardown } from './chunk-NG5IIGT6.js';
|
|
13
13
|
import { RUNNER_PROTOCOL } from './chunk-KVWFAAAQ.js';
|
|
14
|
-
import { RUNNER_RESERVE_BYTES } from './chunk-
|
|
15
|
-
import { RepoFilter } from './chunk-
|
|
14
|
+
import { RUNNER_RESERVE_BYTES } from './chunk-ZFKWU4Y2.js';
|
|
15
|
+
import { RepoFilter } from './chunk-VMBH6HOJ.js';
|
|
16
16
|
import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-ZVB57WI6.js';
|
|
17
|
-
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-
|
|
17
|
+
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-GYEDK2C7.js';
|
|
18
18
|
import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
|
|
19
|
-
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls, configForJob } from './chunk-
|
|
20
|
-
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-
|
|
19
|
+
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls, configForJob } from './chunk-TXB2WDG6.js';
|
|
20
|
+
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-NXNECYRC.js';
|
|
21
21
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
22
|
-
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-
|
|
23
|
-
import { WorkCommandError, isSignatureRefusal, getJson, postJson, getBytes } from './chunk-
|
|
24
|
-
import { keyRunnerFactory, isBuiltinSandbox, isBuiltinContainer, isBuiltinVm, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, readOnlyRemoteOf, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS, readOnlyOption } from './chunk-
|
|
25
|
-
import { allocatedBytes, freeBytes, formatBytes } from './chunk-
|
|
26
|
-
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, runnerLabelValue, builderName, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-
|
|
27
|
-
import { loadHostKey, ensureHostKey, signerFor } from './chunk-
|
|
28
|
-
import { RUNNER_DIR_MODE, runnerDir, RUNNER_FILE_MODE, buildDir, attemptStamp, jobDir, jobsDir, pidFilePath, storeScopes, imagesDir } from './chunk-
|
|
29
|
-
import { parseClaimIdentity, parseBranchlessRepositories, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, JOB_MOUNT } from './chunk-
|
|
30
|
-
import { jobCredentialProblem, COMMAND_LOST_REASON, takeAgentCredentials, heldAgentCredential, CONTAINER_STOPPED_REASON, currentAgentCredential, fdName } from './chunk-
|
|
31
|
-
import { cleanAttachmentName } from './chunk-
|
|
32
|
-
import { jobAgent, jobCommandEnv, runnerAgents } from './chunk-
|
|
33
|
-
import { defaultAgents } from './chunk-
|
|
22
|
+
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-SPLGHAZO.js';
|
|
23
|
+
import { WorkCommandError, isSignatureRefusal, getJson, postJson, getBytes } from './chunk-NUHKAZWF.js';
|
|
24
|
+
import { keyRunnerFactory, isBuiltinSandbox, isBuiltinContainer, isBuiltinVm, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, readOnlyRemoteOf, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS, readOnlyOption } from './chunk-IBEFT67X.js';
|
|
25
|
+
import { allocatedBytes, freeBytes, formatBytes } from './chunk-LKCO2LXP.js';
|
|
26
|
+
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, runnerLabelValue, builderName, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-DAVRAYHH.js';
|
|
27
|
+
import { loadHostKey, ensureHostKey, signerFor } from './chunk-6UU33NGO.js';
|
|
28
|
+
import { RUNNER_DIR_MODE, runnerDir, RUNNER_FILE_MODE, buildDir, attemptStamp, jobDir, jobsDir, pidFilePath, storeScopes, imagesDir } from './chunk-ISBA6KRX.js';
|
|
29
|
+
import { parseClaimIdentity, parseBranchlessRepositories, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, JOB_MOUNT } from './chunk-TTHZCIU5.js';
|
|
30
|
+
import { jobCredentialProblem, COMMAND_LOST_REASON, takeAgentCredentials, heldAgentCredential, CONTAINER_STOPPED_REASON, currentAgentCredential, fdName } from './chunk-2K2HCINU.js';
|
|
31
|
+
import { cleanAttachmentName } from './chunk-44RZCSDR.js';
|
|
32
|
+
import { jobAgent, jobCommandEnv, runnerAgents } from './chunk-JAQWKAEN.js';
|
|
33
|
+
import { defaultAgents } from './chunk-6725XB2P.js';
|
|
34
34
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
35
35
|
import { mkdirSync, existsSync, writeFileSync, chmodSync, renameSync, statSync, readdirSync, readFileSync, rmSync, closeSync } from 'fs';
|
|
36
36
|
import { join, dirname } from 'path';
|
|
@@ -2574,7 +2574,7 @@ var CLAIM_REFUSAL_CODES = new Set(
|
|
|
2574
2574
|
"pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
|
|
2575
2575
|
);
|
|
2576
2576
|
async function tryClaimAndStart(state, item, queue) {
|
|
2577
|
-
const { postJson: postJson2 } = await import('./work-cmd-
|
|
2577
|
+
const { postJson: postJson2 } = await import('./work-cmd-C6I5YGXR.js');
|
|
2578
2578
|
const log = logOf(state);
|
|
2579
2579
|
const hostKey = await loadHostKey(state.config.configPath);
|
|
2580
2580
|
const claim = await retrySend(
|
|
@@ -4127,7 +4127,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
4127
4127
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
4128
4128
|
const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
|
|
4129
4129
|
const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
|
|
4130
|
-
return (await import('./check-
|
|
4130
|
+
return (await import('./check-KFH4KBOO.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
4131
4131
|
},
|
|
4132
4132
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
4133
4133
|
log
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { TUNNEL_PORT, BRIDGE_ADDRESS, BRIDGE_CIDR } from './chunk-
|
|
3
|
+
import { TUNNEL_PORT, BRIDGE_ADDRESS, BRIDGE_CIDR } from './chunk-N7HPKPPZ.js';
|
|
4
4
|
import { startTimeOf } from './chunk-JBJTC3UU.js';
|
|
5
|
-
import { EXEC_PORT } from './chunk-
|
|
6
|
-
import { RELAY_PORT } from './chunk-
|
|
5
|
+
import { EXEC_PORT } from './chunk-HN3MAJWV.js';
|
|
6
|
+
import { RELAY_PORT } from './chunk-TTHZCIU5.js';
|
|
7
7
|
import { spawn, spawnSync } from 'child_process';
|
|
8
8
|
import { symlinkSync, lstatSync, writeFileSync, chmodSync, mkdirSync, existsSync } from 'fs';
|
|
9
9
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { DEFAULT_UNIT_NAME } from './chunk-
|
|
4
|
-
import { RUNNER_FILE_MODE } from './chunk-
|
|
5
|
-
import { parseRunnerEnv, withoutCredentialLines } from './chunk-
|
|
6
|
-
import { headlessNames, runnerAgentNamed, credentialAgent, orList, credentialShapes, runnerAgents, credentialForms, credentialEnvPath, forwardedVariables } from './chunk-
|
|
7
|
-
import { defaultAgents } from './chunk-
|
|
3
|
+
import { DEFAULT_UNIT_NAME } from './chunk-ZFKWU4Y2.js';
|
|
4
|
+
import { RUNNER_FILE_MODE } from './chunk-ISBA6KRX.js';
|
|
5
|
+
import { parseRunnerEnv, withoutCredentialLines } from './chunk-2K2HCINU.js';
|
|
6
|
+
import { headlessNames, runnerAgentNamed, credentialAgent, orList, credentialShapes, runnerAgents, credentialForms, credentialEnvPath, forwardedVariables } from './chunk-JAQWKAEN.js';
|
|
7
|
+
import { defaultAgents } from './chunk-6725XB2P.js';
|
|
8
8
|
import { existsSync, readFileSync, writeFileSync, renameSync, rmSync } from 'fs';
|
|
9
9
|
import { join, dirname } from 'path';
|
|
10
10
|
|