@outerlayer/cli 0.40.0 → 0.41.0-next.20261117195646
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 +8 -5
- package/dist/agent-credential-JN5VDRUX.js +16 -0
- package/dist/agent-setup-7A66WE3X.js +43 -0
- package/dist/{agent-subcommand-U7TXKOF4.js → agent-subcommand-AE42NSHC.js} +6 -6
- package/dist/{artifact-link-cmd-HYEM4X5U.js → artifact-link-cmd-YMMRVRQD.js} +2 -2
- package/dist/bridge-PJTQ3XHE.js +19 -0
- package/dist/build-75I2U74U.js +28 -0
- package/dist/build-disk-Z5YFT47Z.js +23 -0
- package/dist/build-info.json +1 -1
- package/dist/builder-NNNVIN4P.js +22 -0
- package/dist/caller-H3KRGMJH.js +25 -0
- package/dist/{check-U5P5FFFB.js → check-KFQCKXHZ.js} +108 -90
- package/dist/{chunk-4KCWAP5L.js → chunk-23YVVYQC.js} +1 -1
- package/dist/{chunk-J3P4WLJA.js → chunk-26RXLXEX.js} +1 -1
- package/dist/{chunk-YYHSGZHO.js → chunk-2RUTYYYA.js} +1 -1
- package/dist/{chunk-6IGOHB3O.js → chunk-37WA2LQC.js} +6 -1
- package/dist/{chunk-WNX2RR5P.js → chunk-3HH2AQKF.js} +1 -1
- package/dist/{chunk-ZHRXINEW.js → chunk-3RXLDGWE.js} +7 -7
- package/dist/{chunk-ZCBKVSBK.js → chunk-4I3SN7WG.js} +3 -3
- package/dist/{chunk-TWKW3BL3.js → chunk-4RPDWURG.js} +1 -1
- package/dist/{chunk-Y34AHK7R.js → chunk-4SMKP5QI.js} +2 -2
- package/dist/{chunk-XC2ZN7UA.js → chunk-6SYVSIGA.js} +1 -1
- package/dist/{chunk-CQIJVNUB.js → chunk-A2AFTKMN.js} +7 -7
- package/dist/{chunk-PKBW4RL7.js → chunk-APVMCKLK.js} +1 -1
- package/dist/{chunk-4JUAJVOW.js → chunk-ATXTGXGK.js} +2 -2
- package/dist/{chunk-24K3CV6P.js → chunk-B2WCKRMW.js} +6 -6
- package/dist/{chunk-LA66NWUO.js → chunk-B3ZKYFBI.js} +1 -1
- package/dist/{chunk-HS45JMDJ.js → chunk-B6W2LW7E.js} +1 -1
- package/dist/{chunk-3UFBSPHM.js → chunk-BO5TMIRG.js} +4 -4
- package/dist/{chunk-5VANIC7Z.js → chunk-BPZ23EMS.js} +7 -7
- package/dist/{chunk-CDMNKUFT.js → chunk-CUMLCXFI.js} +2 -2
- package/dist/{chunk-YZQDTL3T.js → chunk-D47Z2Z7F.js} +190 -173
- package/dist/{chunk-VXL7SLO3.js → chunk-D5TZYUGZ.js} +1 -1
- package/dist/{chunk-AE6A5DVR.js → chunk-D5YKSWK3.js} +8 -8
- package/dist/{chunk-5GJWIATY.js → chunk-DJCSAWBV.js} +4 -4
- package/dist/{chunk-F3J4UKBF.js → chunk-DJK3IK6K.js} +1 -1
- package/dist/{chunk-CHIKNMWU.js → chunk-DXZ6QBUJ.js} +1 -1
- package/dist/{chunk-7N6MB6NR.js → chunk-EVAK6FAS.js} +6 -6
- package/dist/{chunk-WGWIB5JH.js → chunk-EYD5HOQ7.js} +1 -1
- package/dist/{chunk-AOAXRPXC.js → chunk-FD42O5SH.js} +13 -4
- package/dist/{chunk-FIH3QA4E.js → chunk-FMOGX7RR.js} +5 -5
- package/dist/{chunk-EOKIUWXY.js → chunk-FRLGVHJP.js} +1 -1
- package/dist/{chunk-7RIWXHSY.js → chunk-G4B473J5.js} +3 -3
- package/dist/chunk-GAHP2AI3.js +163 -0
- package/dist/{chunk-3KT24F2C.js → chunk-GVGHEQCU.js} +9 -9
- package/dist/{chunk-WNPLSKH6.js → chunk-H2NTP6OM.js} +1 -1
- package/dist/{chunk-F3P7DP7R.js → chunk-I6G5CO3K.js} +1 -1
- package/dist/{chunk-D6CU6N5S.js → chunk-IOSONR7N.js} +2 -2
- package/dist/{chunk-SKVA4VMG.js → chunk-J2ADYASG.js} +1 -1
- package/dist/{chunk-CVDB3ILT.js → chunk-JMSMNKCK.js} +1 -1
- package/dist/{chunk-TTPOEZFE.js → chunk-KTZOD7A3.js} +1 -1
- package/dist/{chunk-SGVMC66D.js → chunk-LOWZZ4QA.js} +1 -1
- package/dist/{chunk-DCY6QUS6.js → chunk-M4YTSRJI.js} +1 -1
- package/dist/chunk-MQ6SKVLA.js +9 -0
- package/dist/{chunk-ZZN2TUHE.js → chunk-MYFC3HKP.js} +9 -9
- package/dist/{chunk-Q5A5WWZI.js → chunk-NCZNYMTB.js} +23 -21
- package/dist/{chunk-R2VUU5TC.js → chunk-NEOM73RW.js} +1 -1
- package/dist/{chunk-AQNL3XHS.js → chunk-NPVIEJX6.js} +1 -1
- package/dist/{chunk-K5J7AKRL.js → chunk-P7WAAN35.js} +1 -1
- package/dist/{chunk-SQIFPWGN.js → chunk-PLVLC7SU.js} +2 -2
- package/dist/{chunk-A6DFTKQF.js → chunk-PMJGT7SQ.js} +25 -19
- package/dist/{chunk-WVEN3DDJ.js → chunk-PTZF6MC5.js} +6 -6
- package/dist/{chunk-OLWDENJZ.js → chunk-Q3QJG2P6.js} +3 -3
- package/dist/{chunk-JIMISJV2.js → chunk-Q7Z6ELTL.js} +28 -7
- package/dist/{chunk-HHOFP647.js → chunk-QDJBEQCE.js} +1 -1
- package/dist/{chunk-BV4I6IIT.js → chunk-QFGKTIPS.js} +3 -3
- package/dist/{chunk-2SS737DI.js → chunk-QHGVLLOJ.js} +1 -1
- package/dist/{chunk-EOO274OK.js → chunk-QKVOUI56.js} +3 -3
- package/dist/{chunk-MUDXPJT6.js → chunk-QPC6OKD2.js} +11 -11
- package/dist/{chunk-MRM7CQJ3.js → chunk-QS2O5G64.js} +116 -14
- package/dist/{chunk-WKO72EYV.js → chunk-R6ME6MWL.js} +3 -3
- package/dist/{chunk-H7IY5B2M.js → chunk-RVUOSR2D.js} +526 -107
- package/dist/{chunk-L6UD5LKU.js → chunk-SDCECDBS.js} +5 -5
- package/dist/{chunk-P6GTJQMA.js → chunk-SE5ZVVDJ.js} +3 -3
- package/dist/{chunk-2ZF62BAK.js → chunk-TLCTOEU5.js} +1 -1
- package/dist/{chunk-PG4KH7G6.js → chunk-TVU7AL2Z.js} +6 -6
- package/dist/{chunk-XEVGUSP6.js → chunk-UTZULAN6.js} +10 -10
- package/dist/{chunk-VIIJAM2R.js → chunk-UYIWLYLX.js} +5 -5
- package/dist/{chunk-IGYRJWB4.js → chunk-V5MR6BWR.js} +226 -143
- package/dist/{chunk-BEPP2C3U.js → chunk-VATN55FQ.js} +8 -8
- package/dist/{chunk-ZCFGRVGX.js → chunk-VYF5BILX.js} +34 -7
- package/dist/{chunk-U74YD3WB.js → chunk-W7P5QFRN.js} +7 -7
- package/dist/{chunk-QMC2MM2S.js → chunk-WNFITHNX.js} +1 -1
- package/dist/{chunk-XMUNNJMO.js → chunk-WOQOZCZZ.js} +4 -4
- package/dist/{chunk-UHGU2EAK.js → chunk-WRIQGJKT.js} +225 -17
- package/dist/{chunk-DAAZIWK2.js → chunk-X7YMKZ7A.js} +23 -21
- package/dist/{chunk-WQRFIWYB.js → chunk-XCAPYFJ3.js} +5 -5
- package/dist/{chunk-VUSPSY6N.js → chunk-XDAMSCJG.js} +1 -1
- package/dist/{chunk-LAO7LRIR.js → chunk-XMJNIIPM.js} +411 -92
- package/dist/{chunk-Q7OOS23E.js → chunk-XNB2VFZI.js} +4 -4
- package/dist/{chunk-GBCTYHZ4.js → chunk-YLDCYJRP.js} +15 -13
- package/dist/{chunk-YKVFVP4A.js → chunk-YLDHHHBJ.js} +43 -13
- package/dist/{chunk-2GAQRL4S.js → chunk-YNZVC7XT.js} +4 -4
- package/dist/{chunk-HMW3UCME.js → chunk-YXKZGVUL.js} +36 -8
- package/dist/{chunk-YVBJ74GP.js → chunk-YXUSSZAE.js} +23 -21
- package/dist/{claude-launcher-ZLZ4UMHJ.js → claude-launcher-HNE36BKE.js} +68 -18
- package/dist/{cli-EFLEZPHB.js → cli-NEZV54LS.js} +220 -179
- package/dist/{command-22NUIO7Z.js → command-H2R6EFUH.js} +68 -61
- package/dist/{config-HZEVAUDO.js → config-DIUO2GQY.js} +16 -14
- package/dist/{connect-cmd-IUDF62SX.js → connect-cmd-SXSWOHVT.js} +17 -15
- package/dist/{container-start-PQAEL5ZS.js → container-start-B7BACAFN.js} +61 -57
- package/dist/{context-cleanup-OT7BL2NG.js → context-cleanup-BUZVQNKC.js} +6 -6
- package/dist/{context-show-cmd-JDO6DBBU.js → context-show-cmd-ZWOTXOXV.js} +18 -16
- package/dist/{control-plane-launch-M545J63D.js → control-plane-launch-BPJQYN6J.js} +19 -17
- package/dist/{demo-record-cmd-DGP3CW3A.js → demo-record-cmd-4H2J2N3X.js} +12 -10
- package/dist/{demo-voice-cmd-23BV7L6V.js → demo-voice-cmd-VIOM4SF5.js} +26 -24
- package/dist/{dist-AKLRKVET.js → dist-FKOMD5MC.js} +2 -2
- package/dist/docker-QQEZWBI3.js +22 -0
- package/dist/{doctor-5VN6Q4ZU.js → doctor-Y7CIJZX5.js} +115 -64
- package/dist/emit-artifact-cmd-HUAKLOH4.js +46 -0
- package/dist/{emit-cmd-RM6FHATP.js → emit-cmd-UDTT7ENT.js} +9 -9
- package/dist/emit-criteria-cmd-7LKPQRFE.js +37 -0
- package/dist/emit-demo-cmd-7TW5Y3MN.js +49 -0
- package/dist/{emit-finding-cmd-E7WKK2A4.js → emit-finding-cmd-T3JBAGS2.js} +20 -18
- package/dist/{emit-result-cmd-5LKEMUOD.js → emit-result-cmd-ILRQ6OIL.js} +24 -22
- package/dist/emit-step-cmd-4ISFOYRC.js +37 -0
- package/dist/exec-client-UJKPJRNK.js +20 -0
- package/dist/{find-unit-XKWFS4BL.js → find-unit-OAJKRZI2.js} +17 -15
- package/dist/{findings-cmd-5BNDO3YM.js → findings-cmd-37RCXQK2.js} +20 -18
- package/dist/fleet-readiness-IVFQSHPL.js +33 -0
- package/dist/governing-source-RXJBJHN7.js +45 -0
- package/dist/guest-init-EXKSBS7A.js +22 -0
- package/dist/{hook-fast-CQ2YCZLB.js → hook-fast-BSH6IHRN.js} +4 -4
- package/dist/{hook-install-VWF5C6EL.js → hook-install-NOWMUPSI.js} +6 -6
- package/dist/{hook-wrap-fast-Y5KKK67C.js → hook-wrap-fast-7E5LAYEU.js} +3 -3
- package/dist/host-checks-GWUYRJXA.js +84 -0
- package/dist/host-key-7WPFECOD.js +20 -0
- package/dist/{image-tag-VZTFHG6T.js → image-tag-GLR3OAO3.js} +12 -10
- package/dist/index.js +6 -6
- package/dist/init-4MF5M74X.js +84 -0
- package/dist/{init-IXQBYUOM.js → init-BEMNWKES.js} +55 -53
- package/dist/{init-agent-BWLBRVNP.js → init-agent-6E3FAOEZ.js} +55 -53
- package/dist/init-cmd-R5ICA2LP.js +55 -0
- package/dist/{init-update-35IRDVWQ.js → init-update-FAFXM2YE.js} +29 -27
- package/dist/install-cmd-HI5OQW5J.js +28 -0
- package/dist/launch-agent-JLANNHFC.js +28 -0
- package/dist/{layout-F6FDPUC2.js → layout-U2ZTNGVB.js} +6 -6
- package/dist/{login-browser-G3NBTYT6.js → login-browser-QAPMBSQA.js} +2 -2
- package/dist/{logs-NWVFDJS3.js → logs-RVPQEAYN.js} +11 -9
- package/dist/loop-PP7QFT3F.js +94 -0
- package/dist/machine-JHWQCYS3.js +84 -0
- package/dist/{machine-skills-U7RNJTPH.js → machine-skills-2QFBY2II.js} +6 -6
- package/dist/{mcp-install-cmd-QDYJB3RW.js → mcp-install-cmd-KRZJVOND.js} +6 -6
- package/dist/{mcp-serve-cmd-JEYAQJPY.js → mcp-serve-cmd-UT3YCM5P.js} +13 -11
- package/dist/{paths-DWVALEBM.js → paths-72CWJPND.js} +11 -9
- package/dist/pending-ES4EF46B.js +20 -0
- package/dist/pidfile-WI6SE35U.js +21 -0
- package/dist/record-KX763L6R.js +20 -0
- package/dist/{relay-SKBUV4HQ.js → relay-ZZWAUA6P.js} +9 -7
- package/dist/{relay-protocol-YSGHT7C4.js → relay-protocol-4GCTOIT4.js} +9 -7
- package/dist/{run-cmd-S7IQ6OVY.js → run-cmd-SCXMROKB.js} +20 -18
- package/dist/runner-agents-QS3IX55G.js +15 -0
- package/dist/runner-env-FU6EWMWW.js +26 -0
- package/dist/runner-identity-PUW27LAT.js +22 -0
- package/dist/{runner-key-OM2HCEVM.js → runner-key-5G2AJD57.js} +55 -53
- package/dist/session-sender-A46R3S66.js +46 -0
- package/dist/{setup-cmd-S4ZIVRRF.js → setup-cmd-OZS4QOPI.js} +18 -16
- package/dist/{setup-wiring-FRY6CKZ7.js → setup-wiring-G2RLSBQ6.js} +64 -62
- package/dist/{shell-function-7N3ILFLG.js → shell-function-6ZFAVOSM.js} +2 -2
- package/dist/{spec-cmd-PRGEIOJ7.js → spec-cmd-C4KSLTAD.js} +21 -19
- package/dist/{starter-pack-YVBD7AKE.js → starter-pack-G5TQVPMW.js} +7 -7
- package/dist/state-TCZAKBBZ.js +20 -0
- package/dist/{status-JORNKH3T.js → status-T6WDUAI4.js} +65 -53
- package/dist/{statusline-fast-ZWMTN36K.js → statusline-fast-VVJF5W7X.js} +3 -3
- package/dist/{sync-cmd-QVSAP72U.js → sync-cmd-ZYTJMWET.js} +24 -22
- package/dist/update-steps-PU34FN7N.js +85 -0
- package/dist/{watch-F2ELGBST.js → watch-VCKWAILU.js} +24 -22
- package/dist/{work-claim-cmd-LEM7P2ME.js → work-claim-cmd-7TR6LNIY.js} +27 -25
- package/dist/{work-cmd-M2RCHHKE.js → work-cmd-7KOXRPOJ.js} +20 -18
- package/dist/work-comment-cmd-EDXP3K7B.js +41 -0
- package/dist/{work-demo-cmd-FQMFCLZ6.js → work-demo-cmd-OYZTKNCG.js} +20 -18
- package/dist/{work-logs-cmd-KLPX4TYX.js → work-logs-cmd-P3QS5AFY.js} +20 -18
- package/dist/{work-mock-cmd-XJEG6AAT.js → work-mock-cmd-3QEXWV43.js} +20 -18
- package/dist/{work-needs-attention-cmd-BOINZLEQ.js → work-needs-attention-cmd-ZTQB2DXB.js} +20 -18
- package/dist/{work-no-change-cmd-IINJFYBD.js → work-no-change-cmd-FGHOOPLY.js} +20 -18
- package/dist/{work-open-pr-cmd-S2XL6OZV.js → work-open-pr-cmd-WFIPFVQR.js} +21 -19
- package/dist/work-pr-cmd-262GWNKI.js +36 -0
- package/dist/work-proofs-cmd-PAJSCMJ2.js +39 -0
- package/dist/{work-proofs-record-34VAOVND.js → work-proofs-record-A4NZTAME.js} +30 -28
- package/dist/{work-stop-cmd-HWG6IUFS.js → work-stop-cmd-CBRWKR4Q.js} +20 -18
- package/package.json +1 -1
- package/dist/agent-setup-KJVEDAHY.js +0 -41
- package/dist/bridge-UIT7F5DZ.js +0 -17
- package/dist/build-W2Z43HX5.js +0 -26
- package/dist/build-disk-AOY6DOEK.js +0 -21
- package/dist/builder-PHD5WM6J.js +0 -20
- package/dist/caller-WJVESIHQ.js +0 -23
- package/dist/docker-S6XFE42W.js +0 -20
- package/dist/emit-artifact-cmd-H3HULADF.js +0 -44
- package/dist/emit-criteria-cmd-UM3DXOOD.js +0 -35
- package/dist/emit-demo-cmd-BMAXX7M2.js +0 -47
- package/dist/emit-step-cmd-6TX7FGWI.js +0 -35
- package/dist/exec-client-H2AOUP6U.js +0 -18
- package/dist/fleet-readiness-YDRQPUI5.js +0 -31
- package/dist/governing-source-CLLOKTZF.js +0 -43
- package/dist/guest-init-PDLZDDB4.js +0 -20
- package/dist/host-checks-43WBI5JE.js +0 -82
- package/dist/host-key-AOUOQNV5.js +0 -18
- package/dist/init-IZJENDA6.js +0 -82
- package/dist/init-cmd-AL3ODKU6.js +0 -53
- package/dist/install-cmd-DMAMD7BD.js +0 -26
- package/dist/launch-agent-XAPO3FGT.js +0 -26
- package/dist/loop-Q5CTVY7B.js +0 -92
- package/dist/machine-55WUTHG3.js +0 -82
- package/dist/pending-PA5UWRHN.js +0 -18
- package/dist/pidfile-KOM3XD4E.js +0 -19
- package/dist/record-S2WGEUIM.js +0 -18
- package/dist/runner-agents-ZVIM6XVC.js +0 -14
- package/dist/runner-env-WD6CPYTN.js +0 -24
- package/dist/runner-identity-LDFFB6YB.js +0 -20
- package/dist/session-sender-IZP4E562.js +0 -44
- package/dist/state-LAKZKWCJ.js +0 -18
- package/dist/update-steps-LM3C7MG6.js +0 -83
- package/dist/work-comment-cmd-QGAY3QUN.js +0 -39
- package/dist/work-pr-cmd-6YTJRHVC.js +0 -34
- package/dist/work-proofs-cmd-OC3O264U.js +0 -37
- package/dist/{real-deps-B7NMEDXM.js → real-deps-HNNHF3UN.js} +1 -1
|
@@ -1,54 +1,56 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { MAX_TEST_FILE_BYTES, itemsSentence, criteriaOf, hostItemsOf, loadCitationFinder, testFileMatcher, planCriteria, wholeItems, judgeGroups, failedItems, inCriteriaOrder, testsByCriterion, oneLineReason, criterionInputs, parseJudgeAnswer, judgedItems } from './chunk-YXKZGVUL.js';
|
|
4
|
+
import { RUNNER_PROTOCOL } from './chunk-QDJBEQCE.js';
|
|
5
5
|
import { zodProblem } from './chunk-I3LTIAOR.js';
|
|
6
6
|
import { sha256OfFile, downloadPinned, VoiceDownloadError } from './chunk-2PGI6RDE.js';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
7
|
+
import { upgradedStarterText } from './chunk-FMOGX7RR.js';
|
|
8
|
+
import { runnerImageVersion } from './chunk-3HH2AQKF.js';
|
|
9
|
+
import { hasStoredCredential, storedCredentialVariables, storeAgentCredential, replaceFile, isAgentName, credentialFromStdin } from './chunk-PMJGT7SQ.js';
|
|
10
|
+
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-MYFC3HKP.js';
|
|
11
|
+
import { HELPER_PATH, HELPER_RECORD, DOCKERD_LOG } from './chunk-QFGKTIPS.js';
|
|
12
|
+
import { writeDockerClientConfig } from './chunk-H2NTP6OM.js';
|
|
13
|
+
import { senderPidfile } from './chunk-YNZVC7XT.js';
|
|
14
|
+
import { installScrubContext } from './chunk-QPC6OKD2.js';
|
|
13
15
|
import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk-B4XB5QFD.js';
|
|
14
|
-
import {
|
|
15
|
-
import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey, configForJob } from './chunk-SQIFPWGN.js';
|
|
16
|
+
import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey, configForJob } from './chunk-PLVLC7SU.js';
|
|
16
17
|
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-
|
|
18
|
+
import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, readRepositoryRecipe, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-VATN55FQ.js';
|
|
19
|
+
import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-FD42O5SH.js';
|
|
19
20
|
import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
|
|
20
21
|
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 {
|
|
24
|
-
import {
|
|
25
|
-
import { keyRunnerFactory, runnerCredentialProblem, builtinKind, readOnlyOption, optionalEgress, readsOnly, isBuiltinContainer, isBuiltinVm, isBuiltinSandbox, egressSummary, DEFAULT_WORKSPACE_KEEP_DAYS, readOnlyRemoteOf, DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SETUP_MINUTES, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed, sandboxTimeLimitMinutes, networkOf, imageBuildOf, machineSizeOf, 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, NETWORK_HELPER_MEMORY, firstLine, writeJobFile, readJobFile, spawnRun, RUNNER_LABEL, BUILD_LABEL, createDockerHost, builderSpec, childEnvironment, containerExecArgs, readDu, JUDGE_DIR, JUDGE_ITEMS, answerFileName, hashJudgeProgram, NETWORK_READY_FILE, MAX_ITEMS_BYTES, MAX_REPORT_BYTES, JUDGE_REPORT, withAnswerProtocol, JUDGE_TREE, runnerLabelValue, parseSize, readJobFileChecked, networkHelperName, prepareRunArgs, containerRunArgs, judgeCommand, WORKSPACE_LABEL, homeCopyRunArgs, networkHelperRunArgs,
|
|
28
|
-
import { universalImagePending, writeSanitizedRecipe, classifyProperties, RecipeError, DOCKER_FEATURE } from './chunk-
|
|
29
|
-
import {
|
|
30
|
-
import { sharedSkillNames, skillConflictMessage } from './chunk-EOO274OK.js';
|
|
22
|
+
import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-NEOM73RW.js';
|
|
23
|
+
import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-WOQOZCZZ.js';
|
|
24
|
+
import { postJson, getJson, WorkCommandError, isSignatureRefusal } from './chunk-YLDHHHBJ.js';
|
|
25
|
+
import { sanitizeTerminal, planArtifactUpload } from './chunk-WNFITHNX.js';
|
|
26
|
+
import { keyRunnerFactory, runnerCredentialProblem, builtinKind, readOnlyOption, optionalEgress, readsOnly, isBuiltinContainer, isBuiltinVm, isBuiltinSandbox, egressSummary, DEFAULT_WORKSPACE_KEEP_DAYS, readOnlyRemoteOf, DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SETUP_MINUTES, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed, sandboxTimeLimitMinutes, networkOf, imageBuildOf, machineSizeOf, sandboxSizeOf, DEFAULT_SAVED_STATE_MAX_BYTES } from './chunk-VYF5BILX.js';
|
|
27
|
+
import { formatBytes, volumeBytes, allocatedBytes, DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, freeBytes } from './chunk-IOSONR7N.js';
|
|
28
|
+
import { said, NETWORK_HELPER_MEMORY, firstLine, JUDGE_MAX_TURNS, writeJobFile, readJobFile, spawnRun, RUNNER_LABEL, BUILD_LABEL, createDockerHost, builderSpec, childEnvironment, containerExecArgs, readDu, JUDGE_DIR, JUDGE_ITEMS, answerFileName, hashJudgeProgram, NETWORK_READY_FILE, MAX_ITEMS_BYTES, MAX_REPORT_BYTES, JUDGE_REPORT, judgeProgram, withAnswerProtocol, JUDGE_TREE, runnerLabelValue, parseSize, readJobFileChecked, networkHelperName, prepareRunArgs, containerRunArgs, NODE, JUDGE_HOME, judgeCommand, WORKSPACE_LABEL, homeCopyRunArgs, networkHelperRunArgs, identityScript, identityArgs, parseIdentity, mountableHome, homeCopyScript, homeCopyArgs, COMMAND_DIR, identityRunArgs, judgeProgramRecord, SAVED_STATE_LABEL } from './chunk-YXUSSZAE.js';
|
|
29
|
+
import { universalImagePending, writeSanitizedRecipe, classifyProperties, RecipeError, DOCKER_FEATURE } from './chunk-EYD5HOQ7.js';
|
|
30
|
+
import { sharedSkillNames, skillConflictMessage } from './chunk-QKVOUI56.js';
|
|
31
31
|
import { readCloudConfig } from './chunk-HWVMRETT.js';
|
|
32
|
-
import { signerFor } from './chunk-
|
|
33
|
-
import { sessionsDir, vmAssetsDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, workspacesDir, jobsDir, storeScopes, spoolDir, orgStoreIn, rootfsDir, imagesDir, builderCacheDiskPath, buildsDir, buildDir, ghConfigDir, runnerDirOfBuild, mirrorDir, orgHomeDir, jobConsolePath, vsockPath, builderConsolePath, rootfsPathFor, diskTemplatesDir, deliveryDir, SHIM_DIR } from './chunk-
|
|
34
|
-
import { BUILD_HOME, dataPlaneOf, sandboxCallOf, SandboxError, repositoriesOf, JOB_MOUNT, heldBuildAuthority, IMAGE_BUNDLES, writeTrustFiles, buildEnvironment, trustEnvironment, CHECKOUT_DIR, parseIsolation, containerLocalAddress, destinationEnvironment, withHooksPath, startBuildServices, checkoutPath, headerVariables, authorEnvironment, sharedUserEnvironment, withTunnelRecord, commitIdentityRecord, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, parseProxied, retryAfterMsOf, readBundleScript, applyTrust, proxyEnvironment, describeSandboxError, dropBuildAuthority, sandboxSettingsFrom, createSandboxClient, hostKeyOf, buildAuthorityFor, checkEnvironment, withMiseVariables, primaryOf, variablesFor, carried6to4, classifyAddress, EVAL_INPUT_DIR, isMiseVariableAllowed, variableForPath, droppedRequestHeaders, hasDotDotSegment, routeNameOf, providerMayAnswerLater, toolProxyEnvironment } from './chunk-
|
|
35
|
-
import { agentCredential, managedAgentCredential, RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, RELAY_USER, builtInNames,
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
32
|
+
import { signerFor } from './chunk-I6G5CO3K.js';
|
|
33
|
+
import { sessionsDir, vmAssetsDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, workspacesDir, jobsDir, storeScopes, spoolDir, orgStoreIn, rootfsDir, imagesDir, builderCacheDiskPath, buildsDir, buildDir, ghConfigDir, runnerDirOfBuild, mirrorDir, orgHomeDir, jobConsolePath, vsockPath, builderConsolePath, rootfsPathFor, diskTemplatesDir, deliveryDir, SHIM_DIR } from './chunk-D5TZYUGZ.js';
|
|
34
|
+
import { BUILD_HOME, dataPlaneOf, sandboxCallOf, SandboxError, repositoriesOf, JOB_MOUNT, heldBuildAuthority, IMAGE_BUNDLES, writeTrustFiles, buildEnvironment, trustEnvironment, CHECKOUT_DIR, parseIsolation, containerLocalAddress, destinationEnvironment, withHooksPath, startBuildServices, checkoutPath, UsageLedger, headerVariables, authorEnvironment, sharedUserEnvironment, withTunnelRecord, commitIdentityRecord, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, parseProxied, retryAfterMsOf, readBundleScript, applyTrust, proxyEnvironment, describeSandboxError, dropBuildAuthority, sandboxSettingsFrom, createSandboxClient, hostKeyOf, buildAuthorityFor, checkEnvironment, withMiseVariables, primaryOf, variablesFor, carried6to4, classifyAddress, EVAL_INPUT_DIR, isMiseVariableAllowed, variableForPath, droppedRequestHeaders, hasDotDotSegment, routeNameOf, withheldCredentialLine, providerMayAnswerLater, toolProxyEnvironment } from './chunk-WRIQGJKT.js';
|
|
35
|
+
import { agentCredential, managedAgentCredential, RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, RELAY_USER, builtInNames, 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, RELAY_ID, DOCKER_DESKTOP_REASON } from './chunk-GAHP2AI3.js';
|
|
36
|
+
import { jobCredentialProblem, parseRunnerEnv, findAgentCredential, rejectedCredentialText, removedAgentCredentialValues, currentAgentCredential, realFdStorePort, reportedAgents, fdName } from './chunk-D47Z2Z7F.js';
|
|
37
|
+
import { versionAtLeast } from './chunk-DJK3IK6K.js';
|
|
38
|
+
import { jobAgent, firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, builderDiskPinned, guestAssetsPinned, runnerAgentNamed, credentialForms, orList, credentialShapes, agentCommands, commandAgentId, defaultCommandFor, defaultCommandLine, runnerAgents, credentialAgent, stallReason, judgeAgent, agentErrorReason, 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, networkHelperPinned, NETWORK_HELPER_SHA256, universalImagePinned, defaultAgentId, 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-QS2O5G64.js';
|
|
39
|
+
import { sessionFolderIn, legacyAgent, defaultAgents, parsePolicy, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, orderSessions, extractFacts, sessionsToTimeline, resolvePackRoot } from './chunk-XMJNIIPM.js';
|
|
40
|
+
import { PROVIDERS } from './chunk-Q7Z6ELTL.js';
|
|
39
41
|
import { MAINTAINED_SKILLS } from './chunk-VSBG7MMU.js';
|
|
40
42
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
41
43
|
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, CRITERIA_JUDGE_NAME, JUDGE_NOT_RUN_ITEM_ID, CHECK_ITEM_REASON_MAX_LENGTH, CHECK_ITEM_HREF_MAX_LENGTH, downconvertSession } from './chunk-
|
|
44
|
-
import { randomUUID,
|
|
45
|
-
import { rmSync, mkdirSync, existsSync, readFileSync, mkdtempSync, statSync,
|
|
44
|
+
import { scrubText, MIN_SCRUBBED_LITERAL, setCustomScrubbers, setLocalIdentity, setRepoRoot, forkFor, scrubDeep } from './chunk-KTZOD7A3.js';
|
|
45
|
+
import { CheckItemsSchema, CODE_REVIEW_NAME, CRITERIA_JUDGE_NAME, JUDGE_NOT_RUN_ITEM_ID, CHECK_ITEM_REASON_MAX_LENGTH, CHECK_ITEM_HREF_MAX_LENGTH, downconvertSession } from './chunk-37WA2LQC.js';
|
|
46
|
+
import { randomUUID, createHash, randomBytes } from 'crypto';
|
|
47
|
+
import { rmSync, appendFileSync, mkdirSync, existsSync, readFileSync, mkdtempSync, statSync, writeFileSync, readdirSync, accessSync, constants, openSync, closeSync, lstatSync, chmodSync, renameSync, rmdirSync, createReadStream, readSync, unlinkSync, realpathSync, writeSync, truncateSync, cpSync, copyFileSync, fstatSync, createWriteStream, linkSync } from 'fs';
|
|
46
48
|
import { join, dirname, isAbsolute, delimiter, basename, sep, relative, resolve } from 'path';
|
|
47
49
|
import { Readable, PassThrough, Writable, Duplex, Transform } from 'stream';
|
|
48
50
|
import { spawn, spawnSync } from 'child_process';
|
|
49
51
|
import { createServer, createConnection, connect, isIP } from 'net';
|
|
50
|
-
import { availableParallelism, networkInterfaces, tmpdir } from 'os';
|
|
51
|
-
import { createGunzip, gunzipSync, constants as constants$
|
|
52
|
+
import { availableParallelism, networkInterfaces, tmpdir, constants as constants$1 } from 'os';
|
|
53
|
+
import { createGunzip, gunzipSync, constants as constants$2, gzipSync } from 'zlib';
|
|
52
54
|
import http2 from 'http2';
|
|
53
55
|
import { once } from 'events';
|
|
54
56
|
import { createServer as createServer$1, request, Agent } from 'http';
|
|
@@ -75,7 +77,8 @@ var SESSION_ID_VARIABLE = "OUTERLAYER_SESSION_ID";
|
|
|
75
77
|
var RESUME_SESSION_VARIABLE = "OUTERLAYER_RESUME_SESSION";
|
|
76
78
|
var CONTINUE_VARIABLE = "OUTERLAYER_CONTINUE";
|
|
77
79
|
var WORK_ITEM_ID = /^[A-Za-z0-9_-]{1,64}$/;
|
|
78
|
-
var SESSION_ID = /^[A-Za-z0-
|
|
80
|
+
var SESSION_ID = /^[A-Za-z0-9_-]{1,64}$/;
|
|
81
|
+
var TRANSCRIPT_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]{0,199}$/;
|
|
79
82
|
var REASON_TEXT = {
|
|
80
83
|
no_saved_session: "no session is saved on this host",
|
|
81
84
|
session_not_loaded: "the saved session could not be loaded",
|
|
@@ -87,6 +90,9 @@ function sessionFilesOf(sessionId, agents, job) {
|
|
|
87
90
|
if (capture === void 0) throw new Error(`${agent?.descriptor.label ?? "the agent list"} keeps no session files`);
|
|
88
91
|
return capture.sessionFiles({ home: BUILD_HOME, cwd: CHECKOUT_DIR, sessionId });
|
|
89
92
|
}
|
|
93
|
+
function transcriptNameOf(meta, agents, job) {
|
|
94
|
+
return meta.transcript ?? sessionFilesOf(meta.sessionId, agents, job).entries[0];
|
|
95
|
+
}
|
|
90
96
|
function keptSessionDir(configPath, organizationId, workItemId) {
|
|
91
97
|
if (!WORK_ITEM_ID.test(workItemId)) throw new Error(`cannot keep a session for the work item ${JSON.stringify(workItemId)}`);
|
|
92
98
|
return join(sessionsDir(configPath, organizationId), workItemId);
|
|
@@ -108,7 +114,8 @@ async function keepSession(input, agents = defaultAgents(), job) {
|
|
|
108
114
|
const { dir } = input;
|
|
109
115
|
const meta = input.scrub === void 0 ? input.meta : { ...input.meta, scrubbed: true };
|
|
110
116
|
if (!SESSION_ID.test(meta.sessionId)) throw new Error(`cannot keep the session ${JSON.stringify(meta.sessionId)}`);
|
|
111
|
-
|
|
117
|
+
if (meta.transcript !== void 0 && !TRANSCRIPT_NAME.test(meta.transcript)) throw new Error(`cannot keep the transcript ${JSON.stringify(meta.transcript)}`);
|
|
118
|
+
const transcriptName = transcriptNameOf(meta, agents, job);
|
|
112
119
|
const parent = dirname(dir);
|
|
113
120
|
mkdirSync(parent, { recursive: true, mode: 448 });
|
|
114
121
|
const tag = randomBytes(4).toString("hex");
|
|
@@ -152,14 +159,18 @@ function readKeptSession(dir, agents = defaultAgents(), job) {
|
|
|
152
159
|
return void 0;
|
|
153
160
|
}
|
|
154
161
|
if (typeof parsed.sessionId !== "string" || !SESSION_ID.test(parsed.sessionId) || typeof parsed.claimId !== "string" || typeof parsed.queue !== "string" || typeof parsed.keptAt !== "string") return void 0;
|
|
162
|
+
if (parsed.transcript !== void 0 && (typeof parsed.transcript !== "string" || !TRANSCRIPT_NAME.test(parsed.transcript))) return void 0;
|
|
155
163
|
let transcript;
|
|
156
164
|
try {
|
|
157
|
-
transcript = join(dir,
|
|
165
|
+
transcript = join(dir, transcriptNameOf({ sessionId: parsed.sessionId, transcript: parsed.transcript }, agents, job));
|
|
158
166
|
if (!statSync(transcript).isFile()) return void 0;
|
|
159
167
|
} catch {
|
|
160
168
|
return void 0;
|
|
161
169
|
}
|
|
162
|
-
return {
|
|
170
|
+
return {
|
|
171
|
+
meta: { sessionId: parsed.sessionId, claimId: parsed.claimId, queue: parsed.queue, keptAt: parsed.keptAt, ...parsed.scrubbed === true ? { scrubbed: true } : {}, ...parsed.transcript === void 0 ? {} : { transcript: parsed.transcript } },
|
|
172
|
+
transcript
|
|
173
|
+
};
|
|
163
174
|
}
|
|
164
175
|
var BLOCK = 512;
|
|
165
176
|
function tarHeader(path, size, type, mtimeMs) {
|
|
@@ -197,7 +208,7 @@ function filesUnder(root, relative2) {
|
|
|
197
208
|
return stat.isFile() ? [{ path: relative2, type: "0", size: stat.size, mtimeMs: stat.mtimeMs }] : [];
|
|
198
209
|
}
|
|
199
210
|
function packKeptSession(dir, meta, agents = defaultAgents(), job) {
|
|
200
|
-
const names = sessionFilesOf(meta.sessionId, agents, job).entries;
|
|
211
|
+
const names = meta.transcript === void 0 ? sessionFilesOf(meta.sessionId, agents, job).entries : [meta.transcript];
|
|
201
212
|
async function* pack() {
|
|
202
213
|
for (const name of names) {
|
|
203
214
|
let entries;
|
|
@@ -258,7 +269,7 @@ async function prepareResume(input, agents = defaultAgents()) {
|
|
|
258
269
|
return fresh({ resumed: false, reason: "session_not_loaded" });
|
|
259
270
|
}
|
|
260
271
|
input.log(`${what} continues session ${meta.sessionId.slice(0, 8)} of claim ${shortClaim(meta.claimId)}`);
|
|
261
|
-
return { sessionId, resume: decision, env: { [SESSION_ID_VARIABLE]: sessionId, [RESUME_SESSION_VARIABLE]: `${RESUME_DIR}/${
|
|
272
|
+
return { sessionId, resume: decision, env: { [SESSION_ID_VARIABLE]: sessionId, [RESUME_SESSION_VARIABLE]: `${RESUME_DIR}/${transcriptNameOf(meta, agents, input.job)}`, ...build ? { [CONTINUE_VARIABLE]: "1" } : {} } };
|
|
262
273
|
}
|
|
263
274
|
var COPY_OUT_SCRIPT = 'cd "$1" 2>/dev/null && [ -f "$2" ] || exit 3; shift; for entry in "$@"; do if [ -e "$entry" ]; then set -- "$@" "$entry"; fi; shift; done; exec tar -cf - "$@"';
|
|
264
275
|
var SESSION_COPY_MS = 15 * 6e4;
|
|
@@ -268,12 +279,25 @@ async function copyOutSession(input, agents = defaultAgents()) {
|
|
|
268
279
|
let fd;
|
|
269
280
|
let stderr = "";
|
|
270
281
|
try {
|
|
282
|
+
const capture = jobAgent(input.job, agents)?.adapter.capture;
|
|
283
|
+
let files = sessionFilesOf(input.sessionId, agents, input.job);
|
|
284
|
+
let located;
|
|
285
|
+
const locate = capture?.locateInBuild?.({ home: BUILD_HOME });
|
|
286
|
+
if (capture !== void 0 && locate !== void 0) {
|
|
287
|
+
const listed = await input.guest.run(locate.argv);
|
|
288
|
+
const path = listed.status === 0 ? locate.read(listed.stdout) : void 0;
|
|
289
|
+
if (path === void 0) return { ok: false, reason: "the build wrote no transcript of its session" };
|
|
290
|
+
const transcript = basename(path);
|
|
291
|
+
const sessionId = capture.identify(path).sessionId;
|
|
292
|
+
if (!SESSION_ID.test(sessionId) || !TRANSCRIPT_NAME.test(transcript)) return { ok: false, reason: `the build's session file ${JSON.stringify(transcript)} has no name the runner can keep` };
|
|
293
|
+
files = { dir: dirname(path), entries: [transcript] };
|
|
294
|
+
located = { sessionId, transcript };
|
|
295
|
+
}
|
|
271
296
|
mkdirSync(dirname(input.tarPath), { recursive: true, mode: 448 });
|
|
272
297
|
fd = openSync(input.tarPath, "w", 384);
|
|
273
298
|
const out = fd;
|
|
274
299
|
const maxBytes = input.maxBytes ?? MAX_SESSION_COPY_BYTES;
|
|
275
300
|
const stop = new AbortController();
|
|
276
|
-
const files = sessionFilesOf(input.sessionId, agents, input.job);
|
|
277
301
|
let written = 0;
|
|
278
302
|
let overCap = false;
|
|
279
303
|
const result = await input.guest.stream(["/bin/sh", "-c", COPY_OUT_SCRIPT, "sh", files.dir, ...files.entries], {
|
|
@@ -293,7 +317,7 @@ async function copyOutSession(input, agents = defaultAgents()) {
|
|
|
293
317
|
if (overCap) return { ok: false, reason: `the session is larger than the ${Math.floor(maxBytes / (1024 * 1024))} MiB the runner keeps` };
|
|
294
318
|
if (result.status === 3) return { ok: false, reason: "the build wrote no transcript of its session" };
|
|
295
319
|
if (result.status !== 0) return { ok: false, reason: `tar exited ${result.status}${stderr.trim() === "" ? "" : `: ${stderr.trim().split("\n").at(-1)}`}` };
|
|
296
|
-
return { ok: true };
|
|
320
|
+
return located === void 0 ? { ok: true } : { ok: true, located };
|
|
297
321
|
} catch (err) {
|
|
298
322
|
return { ok: false, reason: describeCallFailure(err) };
|
|
299
323
|
} finally {
|
|
@@ -359,11 +383,11 @@ function failedStepLineOf(path) {
|
|
|
359
383
|
}
|
|
360
384
|
}
|
|
361
385
|
|
|
362
|
-
// src/runner/managed-
|
|
386
|
+
// src/runner/managed-model-key.ts
|
|
363
387
|
var FETCH_RETRY_WINDOW_MS = 3e4;
|
|
364
388
|
var ADOPTED_FETCH_RETRY_WINDOW_MS = 3e5;
|
|
365
|
-
|
|
366
|
-
|
|
389
|
+
var OWN_404_CODES = /* @__PURE__ */ new Set(["work_item_not_found", "model_provider_unknown"]);
|
|
390
|
+
async function fetchAnthropicKeyOfOlderGateway(config, item, fetchImpl, deps) {
|
|
367
391
|
const outcome = await retrySend(
|
|
368
392
|
async () => postJson(config.url, `/v1/work-items/${item}/claim/anthropic-key`, config.apiKey, config.appId, {}, fetchImpl, void 0, await signerFor(config.configPath)),
|
|
369
393
|
{ now: deps.now, sleep: deps.sleep, windowMs: deps.windowMs ?? FETCH_RETRY_WINDOW_MS }
|
|
@@ -371,34 +395,80 @@ async function fetchManagedClaudeKey(config, item, deps = {}) {
|
|
|
371
395
|
if (!outcome.ok) return { ok: false, code: outcome.code, reason: outcome.message ?? outcome.reason, retryable: outcome.retryable };
|
|
372
396
|
const apiKey = outcome.value.data.apiKey;
|
|
373
397
|
if (typeof apiKey !== "string" || apiKey === "") {
|
|
374
|
-
return { ok: false, code: "malformed_key_response", reason: "the gateway's answer carried no
|
|
398
|
+
return { ok: false, code: "malformed_key_response", reason: "the gateway's answer carried no model key", retryable: false };
|
|
399
|
+
}
|
|
400
|
+
return { ok: true, provider: "anthropic", apiKey };
|
|
401
|
+
}
|
|
402
|
+
async function fetchManagedModelKey(config, item, deps = {}) {
|
|
403
|
+
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
404
|
+
const body = deps.provider === void 0 ? {} : { provider: deps.provider };
|
|
405
|
+
const outcome = await retrySend(
|
|
406
|
+
async () => postJson(config.url, `/v1/work-items/${item}/claim/model-key`, config.apiKey, config.appId, body, fetchImpl, void 0, await signerFor(config.configPath)),
|
|
407
|
+
{ now: deps.now, sleep: deps.sleep, windowMs: deps.windowMs ?? FETCH_RETRY_WINDOW_MS }
|
|
408
|
+
);
|
|
409
|
+
if (!outcome.ok) {
|
|
410
|
+
if (outcome.status === 404 && !OWN_404_CODES.has(outcome.code ?? "") && (deps.provider === void 0 || deps.provider === "anthropic")) {
|
|
411
|
+
return fetchAnthropicKeyOfOlderGateway(config, item, fetchImpl, deps);
|
|
412
|
+
}
|
|
413
|
+
return { ok: false, code: outcome.code, reason: outcome.message ?? outcome.reason, retryable: outcome.retryable };
|
|
414
|
+
}
|
|
415
|
+
const { apiKey, provider } = outcome.value.data;
|
|
416
|
+
if (typeof apiKey !== "string" || apiKey === "" || typeof provider !== "string" || provider === "") {
|
|
417
|
+
return { ok: false, code: "malformed_key_response", reason: "the gateway's answer carried no model key", retryable: false };
|
|
375
418
|
}
|
|
376
|
-
return { ok: true, apiKey };
|
|
419
|
+
return { ok: true, provider, apiKey };
|
|
377
420
|
}
|
|
378
421
|
var held = /* @__PURE__ */ new Map();
|
|
379
422
|
var everHeld = /* @__PURE__ */ new Set();
|
|
380
423
|
var everHeldBy = /* @__PURE__ */ new Map();
|
|
381
424
|
var EVER_HELD_BY_LIMIT = 1e3;
|
|
382
|
-
function
|
|
383
|
-
held.
|
|
425
|
+
function holdManagedKey(jobDir, provider, apiKey) {
|
|
426
|
+
const keys = held.get(jobDir) ?? /* @__PURE__ */ new Map();
|
|
427
|
+
keys.set(provider, apiKey);
|
|
428
|
+
held.set(jobDir, keys);
|
|
384
429
|
everHeld.add(apiKey);
|
|
430
|
+
const kept = everHeldBy.get(jobDir) ?? /* @__PURE__ */ new Map();
|
|
431
|
+
kept.set(provider, apiKey);
|
|
385
432
|
everHeldBy.delete(jobDir);
|
|
386
|
-
everHeldBy.set(jobDir,
|
|
433
|
+
everHeldBy.set(jobDir, kept);
|
|
387
434
|
if (everHeldBy.size > EVER_HELD_BY_LIMIT) everHeldBy.delete(everHeldBy.keys().next().value);
|
|
388
435
|
}
|
|
389
|
-
function
|
|
390
|
-
return held.get(jobDir);
|
|
436
|
+
function managedKeyFor(jobDir, provider) {
|
|
437
|
+
return held.get(jobDir)?.get(provider);
|
|
391
438
|
}
|
|
392
|
-
function
|
|
439
|
+
function managedKeysFor(jobDir) {
|
|
440
|
+
return Object.fromEntries(held.get(jobDir) ?? []);
|
|
441
|
+
}
|
|
442
|
+
function dropManagedKeys(jobDir) {
|
|
393
443
|
held.delete(jobDir);
|
|
394
444
|
}
|
|
445
|
+
function managedKeyValuesFor(jobDir) {
|
|
446
|
+
return [...everHeldBy.get(jobDir)?.values() ?? []];
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
// src/runner/managed-claude-key.ts
|
|
450
|
+
function dropManagedClaudeKey(jobDir) {
|
|
451
|
+
dropManagedKeys(jobDir);
|
|
452
|
+
}
|
|
395
453
|
function managedClaudeKeyValuesFor(jobDir) {
|
|
396
|
-
|
|
397
|
-
|
|
454
|
+
return managedKeyValuesFor(jobDir);
|
|
455
|
+
}
|
|
456
|
+
function noteMissingCredential(jobDir, hostEnv, agents, job) {
|
|
457
|
+
const agent = jobAgent(job, agents);
|
|
458
|
+
const advice = agent === void 0 ? void 0 : jobCredentialProblem(agent, hostEnv, agents);
|
|
459
|
+
if (advice === void 0) return void 0;
|
|
460
|
+
try {
|
|
461
|
+
appendFileSync(join(jobDir, "provision.log"), `error: ${advice}
|
|
462
|
+
`, { mode: 384 });
|
|
463
|
+
} catch {
|
|
464
|
+
}
|
|
465
|
+
return advice;
|
|
398
466
|
}
|
|
399
467
|
function hasClaudeCredential(config, hostEnv, jobDir, agents, job) {
|
|
400
|
-
|
|
401
|
-
|
|
468
|
+
const agent = jobAgent(job, agents);
|
|
469
|
+
if (agent?.adapter.credentials === void 0) return true;
|
|
470
|
+
const provider = agent.descriptor.providers[0];
|
|
471
|
+
return config.fleet === true ? provider !== void 0 && managedKeyFor(jobDir, provider) !== void 0 : agentCredential(hostEnv, {}, agents, job) !== void 0;
|
|
402
472
|
}
|
|
403
473
|
|
|
404
474
|
// src/runner/managed-build-settings.ts
|
|
@@ -1873,7 +1943,10 @@ async function releaseRun(config, runId, outcome, fetchImpl) {
|
|
|
1873
1943
|
var RUN_PROMPT = "/outerlayer-run";
|
|
1874
1944
|
function runCommandOf(config, agents = defaultAgents()) {
|
|
1875
1945
|
if (config.commands.run !== void 0) return config.commands.run;
|
|
1876
|
-
return jobAgent({ command: config.commands.implement }, agents)
|
|
1946
|
+
return runCommandFor(jobAgent({ command: config.commands.implement }, agents));
|
|
1947
|
+
}
|
|
1948
|
+
function runCommandFor(agent) {
|
|
1949
|
+
return agent?.adapter.headless?.commandLine(RUN_PROMPT, "implement");
|
|
1877
1950
|
}
|
|
1878
1951
|
|
|
1879
1952
|
// src/runner/container/agent-user.ts
|
|
@@ -2401,7 +2474,7 @@ function prepareRunnerInit(configPath, opts = {}) {
|
|
|
2401
2474
|
if (!stored.some((variable) => named.descriptor.credentials.forwarded.includes(variable))) {
|
|
2402
2475
|
const forms = credentialForms(named.descriptor, agents);
|
|
2403
2476
|
throw new RunnerInitError(
|
|
2404
|
-
`--agent ${forms.runnerName} needs ${forms.possessive} credential in ${forms.variables.join(" or ")}, and the
|
|
2477
|
+
`--agent ${forms.runnerName} needs ${forms.possessive} credential in ${forms.variables.join(" or ")}, and the credential files beside the config hold ${stored.join(" and ")}. Pipe ${orList(credentialShapes(named.descriptor).map((shape) => shape.phrase))}: printf '%s' "$${forms.variables[0]}" | outerlayer runner init --agent ${forms.runnerName}`
|
|
2405
2478
|
);
|
|
2406
2479
|
}
|
|
2407
2480
|
}
|
|
@@ -2436,11 +2509,82 @@ function writeRunnerInit(prepared, runnerKey) {
|
|
|
2436
2509
|
};
|
|
2437
2510
|
if (host !== void 0) delete config.runner.host;
|
|
2438
2511
|
mkdirSync(dirname(configPath), { recursive: true });
|
|
2439
|
-
const stored = credential === void 0 ? void 0 : { variable: credential.variable, path: storeAgentCredential(configPath, credential, agents) };
|
|
2512
|
+
const stored = credential === void 0 ? void 0 : { variable: credential.variable, path: storeAgentCredential(configPath, credential, agents, agent) };
|
|
2440
2513
|
writeFileSync(configPath, `${JSON.stringify(config, null, 2)}
|
|
2441
2514
|
`, { mode: RUNNER_FILE_MODE });
|
|
2442
2515
|
return { configPath, hooks, credential: stored };
|
|
2443
2516
|
}
|
|
2517
|
+
function addRunnerAgent(configPath, agentName, credential, agents = defaultAgents()) {
|
|
2518
|
+
const config = readConfigObject(configPath);
|
|
2519
|
+
const runner = config.runner;
|
|
2520
|
+
if (runner === void 0 || typeof runner !== "object") throw new RunnerInitError(`${configPath}: there is no runner block to add an agent to. Run \`outerlayer runner init\` first.`);
|
|
2521
|
+
const named = runnerAgentNamed(agentName, agents);
|
|
2522
|
+
if (named === void 0) throw new RunnerInitError(`--agent ${agentName}: runner init knows no such agent.`);
|
|
2523
|
+
const id = named.descriptor.id;
|
|
2524
|
+
const commands = runner.commands ?? {};
|
|
2525
|
+
const set = [commands.implement, commands.amend].filter((command) => command !== void 0);
|
|
2526
|
+
const placeholders = set.length > 0 && set.every(isPlaceholderCommand);
|
|
2527
|
+
const listedBefore = placeholders ? [] : Array.isArray(runner.agents) && runner.agents.length > 0 ? runner.agents : [commandAgentId({ commands }, agents)];
|
|
2528
|
+
const alreadyListed = listedBefore.includes(id);
|
|
2529
|
+
if (credential === void 0 && alreadyListed) {
|
|
2530
|
+
const forms = credentialForms(named.descriptor, agents);
|
|
2531
|
+
throw new RunnerInitError(
|
|
2532
|
+
`${configPath}: the runner already has ${forms.label}, and no credential was piped on stdin, so there is nothing to store. Pipe ${orList(credentialShapes(named.descriptor).map((shape) => shape.phrase))} to replace its credential: printf '%s' "$${forms.variables[0]}" | outerlayer runner init --agent ${forms.runnerName}`
|
|
2533
|
+
);
|
|
2534
|
+
}
|
|
2535
|
+
if (credential === void 0 && !storedCredentialVariables(configPath, agents).some((variable) => named.descriptor.credentials.forwarded.includes(variable))) {
|
|
2536
|
+
const forms = credentialForms(named.descriptor, agents);
|
|
2537
|
+
throw new RunnerInitError(
|
|
2538
|
+
`--agent ${forms.runnerName} needs ${forms.possessive} credential in ${forms.variables.join(" or ")}, and none was piped on stdin or is stored beside the config. Pipe ${orList(credentialShapes(named.descriptor).map((shape) => shape.phrase))}: printf '%s' "$${forms.variables[0]}" | outerlayer runner init --agent ${forms.runnerName}`
|
|
2539
|
+
);
|
|
2540
|
+
}
|
|
2541
|
+
const next = alreadyListed ? listedBefore : [...listedBefore, id];
|
|
2542
|
+
if (credential !== void 0) keepOtherAgentsKeys(configPath, named, credential, next, agents);
|
|
2543
|
+
const stored = credential === void 0 ? void 0 : { variable: credential.variable, path: storeAgentCredential(configPath, credential, agents, agentName) };
|
|
2544
|
+
if (!alreadyListed) {
|
|
2545
|
+
const block = config.runner;
|
|
2546
|
+
if (placeholders) {
|
|
2547
|
+
block.commands = { ...commands, ...agentCommands(agentName, agents) };
|
|
2548
|
+
delete block.agents;
|
|
2549
|
+
} else block.agents = next;
|
|
2550
|
+
writeFileSync(configPath, `${JSON.stringify(config, null, 2)}
|
|
2551
|
+
`);
|
|
2552
|
+
}
|
|
2553
|
+
return { agents: next, added: !alreadyListed, commandsWritten: placeholders && !alreadyListed, credential: stored };
|
|
2554
|
+
}
|
|
2555
|
+
function keepOtherAgentsKeys(configPath, named, credential, listed, agents) {
|
|
2556
|
+
const target2 = join(dirname(configPath), credentialForms(named.descriptor, agents).envFile);
|
|
2557
|
+
const runnerEnv = join(dirname(configPath), "runner.env");
|
|
2558
|
+
const dropped = new Set(named.descriptor.credentials.stripped);
|
|
2559
|
+
const sources = [
|
|
2560
|
+
...existsSync(target2) ? [parseRunnerEnv(readFileSync(target2, "utf8"))] : [],
|
|
2561
|
+
...existsSync(runnerEnv) ? [Object.fromEntries(Object.entries(parseRunnerEnv(readFileSync(runnerEnv, "utf8"))).filter(([name]) => dropped.has(name)))] : []
|
|
2562
|
+
];
|
|
2563
|
+
for (const other of listed) {
|
|
2564
|
+
const agent = runnerAgentNamed(other, agents);
|
|
2565
|
+
if (agent === void 0 || agent.descriptor.id === named.descriptor.id) continue;
|
|
2566
|
+
const ownFile = join(dirname(configPath), credentialForms(agent.descriptor, agents).envFile);
|
|
2567
|
+
if (existsSync(ownFile) && storedHas(ownFile, agent.descriptor.credentials.forwarded)) continue;
|
|
2568
|
+
for (const old of sources) {
|
|
2569
|
+
const variable = agent.descriptor.credentials.forwarded.find((name) => (old[name] ?? "") !== "" && name !== credential.variable);
|
|
2570
|
+
if (variable === void 0) continue;
|
|
2571
|
+
replaceFile(ownFile, `${variable}=${old[variable]}
|
|
2572
|
+
`);
|
|
2573
|
+
break;
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
function storedHas(path, variables) {
|
|
2578
|
+
const set = parseRunnerEnv(readFileSync(path, "utf8"));
|
|
2579
|
+
return variables.some((name) => (set[name] ?? "") !== "");
|
|
2580
|
+
}
|
|
2581
|
+
function hasRunnerBlock(configPath) {
|
|
2582
|
+
try {
|
|
2583
|
+
return readConfigObject(configPath).runner !== void 0;
|
|
2584
|
+
} catch {
|
|
2585
|
+
return false;
|
|
2586
|
+
}
|
|
2587
|
+
}
|
|
2444
2588
|
function removeRunnerBlock(configPath) {
|
|
2445
2589
|
const config = readConfigObject(configPath);
|
|
2446
2590
|
delete config.runner;
|
|
@@ -2510,12 +2654,15 @@ function modellessQueues(config, agents = defaultAgents()) {
|
|
|
2510
2654
|
const flag = agent?.adapter.headless?.modelFlag;
|
|
2511
2655
|
if (agent === void 0 || flag === void 0) return false;
|
|
2512
2656
|
const named = new RegExp(`(?:^|\\s)${escapeForPattern(flag)}(?:=|\\s)`);
|
|
2657
|
+
const written = defaultCommandFor(agent.descriptor.id, queue, agents);
|
|
2658
|
+
if (written !== void 0 && !named.test(written) && command.trim() === written) return false;
|
|
2513
2659
|
return programPattern(agent.descriptor.program).test(command) && !named.test(command);
|
|
2514
2660
|
});
|
|
2515
2661
|
}
|
|
2516
|
-
function modellessProblem(queues, agents = defaultAgents()) {
|
|
2662
|
+
function modellessProblem(queues, agents = defaultAgents(), commands) {
|
|
2517
2663
|
return queues.map((queue) => {
|
|
2518
|
-
const
|
|
2664
|
+
const own = commands === void 0 || commands[queue] === void 0 ? void 0 : jobAgent({ command: commands[queue] }, agents);
|
|
2665
|
+
const line2 = own === void 0 ? defaultCommandLine(queue, agents) : defaultCommandFor(own.descriptor.id, queue, agents);
|
|
2519
2666
|
return `runner.commands.${queue} names no model, so its builds run on the agent's default model${line2 === void 0 ? "" : `. \`runner init\` writes \`${line2}\``}`;
|
|
2520
2667
|
}).join(". ");
|
|
2521
2668
|
}
|
|
@@ -2526,19 +2673,26 @@ function credentialFix(forms, others) {
|
|
|
2526
2673
|
const [first, ...rest] = forms.variables;
|
|
2527
2674
|
const alternative = others.length === 0 ? "" : ` (or ${others.join(" or ")})`;
|
|
2528
2675
|
const alternativeVariables = rest.length === 0 ? "" : ` (or ${rest.join(" or ")})`;
|
|
2529
|
-
|
|
2676
|
+
const stored = `\`outerlayer runner init --agent ${forms.runnerName}\`, which stores it in the ${forms.envFile} beside the config. Or start the runner with ${first}${alternativeVariables} set`;
|
|
2677
|
+
if (forms.setupCommand === "") return `Pipe the value of ${first}${alternative} to ${stored}`;
|
|
2678
|
+
return `Run \`${forms.setupCommand}\`, then pipe the token it prints${alternative} to ${stored}`;
|
|
2530
2679
|
}
|
|
2531
2680
|
function unset(variables) {
|
|
2532
2681
|
return variables.length === 1 ? `${variables[0]} is not set` : `neither ${variables.join(" nor ")} is set`;
|
|
2533
2682
|
}
|
|
2683
|
+
function credentialVerdict(states) {
|
|
2684
|
+
const missing = states.filter((state) => !state.held).map((state) => state.agent);
|
|
2685
|
+
return { status: states.length > 0 && missing.length === states.length ? "fail" : "pass", missing };
|
|
2686
|
+
}
|
|
2534
2687
|
function agentCredentialCheck(env, options = {}, agents = defaultAgents()) {
|
|
2535
|
-
const agent = credentialAgent(agents);
|
|
2688
|
+
const agent = (options.agentId === void 0 ? void 0 : runnerAgents(agents).find((entry) => entry.descriptor.id === options.agentId)) ?? credentialAgent(agents);
|
|
2536
2689
|
if (agent === void 0) return { name: "Agent credential", status: "pass", detail: "no agent takes a credential" };
|
|
2537
|
-
const forms = credentialForms(agent.descriptor);
|
|
2690
|
+
const forms = credentialForms(agent.descriptor, agents);
|
|
2538
2691
|
const name = `${forms.label} credential`;
|
|
2539
2692
|
const fix = credentialFix(forms, credentialShapes(agent.descriptor).slice(1).map((shape) => shape.phrase));
|
|
2540
2693
|
if (options.service !== void 0) {
|
|
2541
|
-
const { unit
|
|
2694
|
+
const { unit } = options.service;
|
|
2695
|
+
const variables = options.service.variables.filter((variable) => agent.descriptor.credentials.forwarded.includes(variable));
|
|
2542
2696
|
if (variables.length === 0) {
|
|
2543
2697
|
return {
|
|
2544
2698
|
name,
|
|
@@ -2549,7 +2703,7 @@ function agentCredentialCheck(env, options = {}, agents = defaultAgents()) {
|
|
|
2549
2703
|
}
|
|
2550
2704
|
return { name, status: "pass", detail: `${variables[0]} is set in the ${forms.envFile} or runner.env of the service ${unit}` };
|
|
2551
2705
|
}
|
|
2552
|
-
const held3 = agentCredential(env, { ignoreHeld: options.ignoreHeld === true }, agents);
|
|
2706
|
+
const held3 = agentCredential(env, { ignoreHeld: options.ignoreHeld === true }, agents, { agent: agent.descriptor.id });
|
|
2553
2707
|
if (held3 === void 0) {
|
|
2554
2708
|
return {
|
|
2555
2709
|
name,
|
|
@@ -2561,6 +2715,16 @@ function agentCredentialCheck(env, options = {}, agents = defaultAgents()) {
|
|
|
2561
2715
|
const sameVariables = options.shell === true ? "; the runner must be started with the same variable" : "";
|
|
2562
2716
|
return { name, status: "pass", detail: `${held3.variable} is set${sameVariables}` };
|
|
2563
2717
|
}
|
|
2718
|
+
function agentCredentialFromFiles(env, options, agents = defaultAgents()) {
|
|
2719
|
+
const { found, foundIn, rejected } = findAgentCredential(env, options.agentId, agents, options.configDir);
|
|
2720
|
+
const check = agentCredentialCheck(found === void 0 ? env : { [found.variable]: found.value }, { shell: true, ignoreHeld: true, agentId: options.agentId }, agents);
|
|
2721
|
+
const agent = runnerAgents(agents).find((entry) => entry.descriptor.id === options.agentId);
|
|
2722
|
+
if (check.status === "fail") {
|
|
2723
|
+
if (rejected.length === 0 || agent === void 0) return check;
|
|
2724
|
+
return { ...check, detail: `${check.detail} (${rejectedCredentialText(credentialForms(agent.descriptor).label, rejected)})` };
|
|
2725
|
+
}
|
|
2726
|
+
return found === void 0 || foundIn === void 0 ? check : { ...check, detail: `${found.variable} is set (read from ${foundIn})` };
|
|
2727
|
+
}
|
|
2564
2728
|
function missingPermissionOf(err) {
|
|
2565
2729
|
if (!(err instanceof WorkCommandError) || err.status !== 403) return void 0;
|
|
2566
2730
|
const permission = /missing required permission '([^']+)'/i.exec(err.message)?.[1];
|
|
@@ -3135,7 +3299,8 @@ function stagedHasBuildSkill(staged, input) {
|
|
|
3135
3299
|
const agent = agentOf(input);
|
|
3136
3300
|
const tree = join(staged.dir, "tree");
|
|
3137
3301
|
if (agent?.adapter.context?.deliveredSkills(tree).includes("build") !== true) return false;
|
|
3138
|
-
|
|
3302
|
+
const delivered = agent.adapter.context.deliveredEntries.includes("skills") && existsSync(join(tree, "skills", "build", "SKILL.md"));
|
|
3303
|
+
return delivered || agent.descriptor.context.repoSkillFolders.some((folder) => existsSync(join(tree, folder, "build", "SKILL.md")));
|
|
3139
3304
|
}
|
|
3140
3305
|
var NO_AGENT = "context_delivery_failed: the agent list holds no agent to run the build";
|
|
3141
3306
|
async function writeShim(input, agent) {
|
|
@@ -3481,7 +3646,7 @@ function clearJudgeFolder(runtime, state, secrets) {
|
|
|
3481
3646
|
}
|
|
3482
3647
|
var FILE_MODE = 420;
|
|
3483
3648
|
var DIR_MODE = 493;
|
|
3484
|
-
function
|
|
3649
|
+
function replaceFile2(path, text2) {
|
|
3485
3650
|
const partial = `${path}.${process.pid}.partial`;
|
|
3486
3651
|
writeFileSync(partial, text2);
|
|
3487
3652
|
chmodSync(partial, FILE_MODE);
|
|
@@ -3503,8 +3668,8 @@ var GH_CONFIG_YML = 'version: "1"\n';
|
|
|
3503
3668
|
function writeGhConfig(dir, token) {
|
|
3504
3669
|
mkdirSync(dir, { recursive: true, mode: DIR_MODE });
|
|
3505
3670
|
chmodSync(dir, DIR_MODE);
|
|
3506
|
-
|
|
3507
|
-
|
|
3671
|
+
replaceFile2(join(dir, "hosts.yml"), ghHostsYml(token));
|
|
3672
|
+
replaceFile2(join(dir, "config.yml"), GH_CONFIG_YML);
|
|
3508
3673
|
}
|
|
3509
3674
|
var noop = () => void 0;
|
|
3510
3675
|
var FRAME_HEADER_BYTES = 9;
|
|
@@ -5252,7 +5417,7 @@ async function provisionSandboxOnce(input, allowRestore, itemDiskFailed, noSave)
|
|
|
5252
5417
|
builtIns: true,
|
|
5253
5418
|
factoryVariables: factoryVariablesOf(config, jobDir)
|
|
5254
5419
|
};
|
|
5255
|
-
const env = buildEnvironment(envInput);
|
|
5420
|
+
const env = buildEnvironment({ ...envInput, onWithheld: (name2) => log.line(`${tag} ${withheldCredentialLine(name2)}`) });
|
|
5256
5421
|
const stepEnv = managed ? buildEnvironment({ ...envInput, factoryVariables: [] }) : env;
|
|
5257
5422
|
if (env.skippedTokenVariables.length > 0) {
|
|
5258
5423
|
log.line(`${tag} not passing ${env.skippedTokenVariables.join(", ")} from runner.build.variables into the build: its repository token comes from the runner`);
|
|
@@ -5546,8 +5711,8 @@ async function provisionSandboxOnce(input, allowRestore, itemDiskFailed, noSave)
|
|
|
5546
5711
|
const tools = await host.exec({ container, user: ADDED_USER, env: NO_ENV, argv: ["cat", "/opt/outerlayer/tools.json"] });
|
|
5547
5712
|
const agentVersion = agentVersionOf(tools.status === 0 ? tools.stdout : "", runtime.agents, input.job);
|
|
5548
5713
|
environment.agentVersion = agentVersion;
|
|
5549
|
-
const
|
|
5550
|
-
if (
|
|
5714
|
+
const judgeProgram2 = await judgeProgramRecord((argv) => host.exec({ container, user: ADDED_USER, env: NO_ENV, argv }), runtime.agents, input.job);
|
|
5715
|
+
if (judgeProgram2 !== void 0) containerState.judgeProgram = judgeProgram2;
|
|
5551
5716
|
input.save(state, environment);
|
|
5552
5717
|
if (input.queue === "review") {
|
|
5553
5718
|
const ghDelivered = managed ? await deliverHeldGh() : { ok: true };
|
|
@@ -6463,7 +6628,10 @@ async function provisionMicroVmOnce(input, allowRestore, itemDiskFailed) {
|
|
|
6463
6628
|
const tag = itemTag({ item: item.number, organizationId: input.organizationId, claimId: input.claimId });
|
|
6464
6629
|
const logPath = join(jobDir, "provision.log");
|
|
6465
6630
|
const fail = (reason) => ({ ok: false, reason });
|
|
6466
|
-
if (!hasClaudeCredential(config, runtime.hostEnv, jobDir, runtime.agents, input.job))
|
|
6631
|
+
if (!hasClaudeCredential(config, runtime.hostEnv, jobDir, runtime.agents, input.job)) {
|
|
6632
|
+
if (config.fleet !== true) noteMissingCredential(jobDir, runtime.hostEnv, runtime.agents, input.job);
|
|
6633
|
+
return fail(AGENT_CREDENTIAL_MISSING);
|
|
6634
|
+
}
|
|
6467
6635
|
const repositories = repositoriesOf({ repositories: input.repositories, repository: item.specRepository, branch: input.branch });
|
|
6468
6636
|
const primary = primaryOf(repositories);
|
|
6469
6637
|
if (primary === void 0) return fail("the work item names no repository to clone");
|
|
@@ -6565,7 +6733,7 @@ async function provisionMicroVmOnce(input, allowRestore, itemDiskFailed) {
|
|
|
6565
6733
|
builtIns: true,
|
|
6566
6734
|
trustEnvironment: trustEnvironment(jobDir)
|
|
6567
6735
|
};
|
|
6568
|
-
const env = buildEnvironment(envInput);
|
|
6736
|
+
const env = buildEnvironment({ ...envInput, onWithheld: (name) => log.line(`${tag} ${withheldCredentialLine(name)}`) });
|
|
6569
6737
|
if (env.skippedTokenVariables.length > 0) {
|
|
6570
6738
|
log.line(`${tag} not passing ${env.skippedTokenVariables.join(", ")} from runner.build.variables into the build: its repository token comes from the runner`);
|
|
6571
6739
|
}
|
|
@@ -6791,7 +6959,7 @@ async function provisionMicroVmOnce(input, allowRestore, itemDiskFailed) {
|
|
|
6791
6959
|
const tools = await asRoot(runtime, state, ["cat", "/opt/outerlayer/tools.json"]);
|
|
6792
6960
|
const agentVersion = agentVersionOf(tools.status === 0 ? tools.stdout : "", runtime.agents, input.job);
|
|
6793
6961
|
environment.agentVersion = agentVersion;
|
|
6794
|
-
const recorded = await judgeProgramRecord((argv) => asRoot(runtime, state, argv), runtime.agents);
|
|
6962
|
+
const recorded = await judgeProgramRecord((argv) => asRoot(runtime, state, argv), runtime.agents, input.job);
|
|
6795
6963
|
if (recorded !== void 0) state.judgeProgram = recorded;
|
|
6796
6964
|
input.save(state, environment);
|
|
6797
6965
|
if (input.queue === "review") return { ok: true, workdir: CHECKOUT_DIR, state, environment };
|
|
@@ -7100,7 +7268,7 @@ function microVmJudgeEnvironment(input) {
|
|
|
7100
7268
|
},
|
|
7101
7269
|
hashProgram: async () => {
|
|
7102
7270
|
needsVm();
|
|
7103
|
-
return await hashJudgeProgram((argv) => asRoot(runtime, state, argv), runtime.agents);
|
|
7271
|
+
return await hashJudgeProgram((argv) => asRoot(runtime, state, argv), runtime.agents, input.job);
|
|
7104
7272
|
},
|
|
7105
7273
|
prepare: async (files, tree) => {
|
|
7106
7274
|
needsVm();
|
|
@@ -8829,6 +8997,79 @@ function buildReleaseLog(jobDirPath, endStage, scrub) {
|
|
|
8829
8997
|
if (parts.length === 0) return void 0;
|
|
8830
8998
|
return capRunnerLog(scrub(parts.join("\n")) + "\n");
|
|
8831
8999
|
}
|
|
9000
|
+
function linuxSignalName(number) {
|
|
9001
|
+
const names = {
|
|
9002
|
+
1: "SIGHUP",
|
|
9003
|
+
2: "SIGINT",
|
|
9004
|
+
3: "SIGQUIT",
|
|
9005
|
+
4: "SIGILL",
|
|
9006
|
+
5: "SIGTRAP",
|
|
9007
|
+
6: "SIGABRT",
|
|
9008
|
+
7: "SIGBUS",
|
|
9009
|
+
8: "SIGFPE",
|
|
9010
|
+
9: "SIGKILL",
|
|
9011
|
+
10: "SIGUSR1",
|
|
9012
|
+
11: "SIGSEGV",
|
|
9013
|
+
12: "SIGUSR2",
|
|
9014
|
+
13: "SIGPIPE",
|
|
9015
|
+
14: "SIGALRM",
|
|
9016
|
+
15: "SIGTERM",
|
|
9017
|
+
16: "SIGSTKFLT",
|
|
9018
|
+
17: "SIGCHLD",
|
|
9019
|
+
18: "SIGCONT",
|
|
9020
|
+
19: "SIGSTOP",
|
|
9021
|
+
20: "SIGTSTP",
|
|
9022
|
+
21: "SIGTTIN",
|
|
9023
|
+
22: "SIGTTOU",
|
|
9024
|
+
23: "SIGURG",
|
|
9025
|
+
24: "SIGXCPU",
|
|
9026
|
+
25: "SIGXFSZ",
|
|
9027
|
+
26: "SIGVTALRM",
|
|
9028
|
+
27: "SIGPROF",
|
|
9029
|
+
28: "SIGWINCH",
|
|
9030
|
+
29: "SIGIO",
|
|
9031
|
+
30: "SIGPWR",
|
|
9032
|
+
31: "SIGSYS"
|
|
9033
|
+
};
|
|
9034
|
+
return names[number];
|
|
9035
|
+
}
|
|
9036
|
+
function hostSignalName(number) {
|
|
9037
|
+
return Object.entries(constants$1.signals).find(([, value]) => value === number)?.[0];
|
|
9038
|
+
}
|
|
9039
|
+
function notEndedByRunnerReason(exit, isolated) {
|
|
9040
|
+
if (exit.signal !== null) {
|
|
9041
|
+
return `the command was killed by ${exit.signal} on the host; the runner did not end it`;
|
|
9042
|
+
}
|
|
9043
|
+
const number = exit.code - 128;
|
|
9044
|
+
const name = isolated ? linuxSignalName(number) : hostSignalName(number);
|
|
9045
|
+
if (name === void 0) return void 0;
|
|
9046
|
+
return `the command exited ${exit.code}, the status of a process killed by ${name}; the runner did not end it`;
|
|
9047
|
+
}
|
|
9048
|
+
function jobNotEndedByRunnerReason(exit, job) {
|
|
9049
|
+
return notEndedByRunnerReason(exit, job.container !== void 0 || job.microvm !== void 0 || job.sandbox !== void 0);
|
|
9050
|
+
}
|
|
9051
|
+
function commandEndReasonOf(exit, job, agents) {
|
|
9052
|
+
return jobNotEndedByRunnerReason(exit, job) ?? stallReason(job, exit.code, agents);
|
|
9053
|
+
}
|
|
9054
|
+
var OUTPUT_TAIL_BYTES = 64 * 1024;
|
|
9055
|
+
function commandOutputTail(jobDir, job, max = OUTPUT_TAIL_BYTES) {
|
|
9056
|
+
const base = job.container?.commandLogBase ?? job.microvm?.commandLogBase ?? job.sandbox?.commandLogBase ?? 0;
|
|
9057
|
+
const path = join(jobDir, "command.log");
|
|
9058
|
+
let fd;
|
|
9059
|
+
try {
|
|
9060
|
+
const size = statSync(path).size;
|
|
9061
|
+
const start = Math.max(base, size - max);
|
|
9062
|
+
if (start >= size) return "";
|
|
9063
|
+
const bytes = Buffer.alloc(size - start);
|
|
9064
|
+
fd = openSync(path, "r");
|
|
9065
|
+
readSync(fd, bytes, 0, bytes.length, start);
|
|
9066
|
+
return bytes.toString("utf8");
|
|
9067
|
+
} catch {
|
|
9068
|
+
return "";
|
|
9069
|
+
} finally {
|
|
9070
|
+
if (fd !== void 0) closeSync(fd);
|
|
9071
|
+
}
|
|
9072
|
+
}
|
|
8832
9073
|
function recordOf(input, kind, bytes, volume) {
|
|
8833
9074
|
return {
|
|
8834
9075
|
workItemId: input.workItemId,
|
|
@@ -9353,7 +9594,13 @@ async function keepEndedSession(input) {
|
|
|
9353
9594
|
await keepSession(
|
|
9354
9595
|
{
|
|
9355
9596
|
dir: keptSessionDir(input.configPath, job.organizationId, job.workItemId),
|
|
9356
|
-
meta: {
|
|
9597
|
+
meta: {
|
|
9598
|
+
sessionId: copied.located?.sessionId ?? job.sessionId,
|
|
9599
|
+
claimId: job.claimId,
|
|
9600
|
+
queue: job.queue,
|
|
9601
|
+
keptAt: input.now().toISOString(),
|
|
9602
|
+
...copied.located === void 0 ? {} : { transcript: copied.located.transcript }
|
|
9603
|
+
},
|
|
9357
9604
|
tar: createReadStream(tarPath),
|
|
9358
9605
|
scrub: input.scrub,
|
|
9359
9606
|
add: (dir) => addWorkTo(dir, workPath, work)
|
|
@@ -9378,6 +9625,98 @@ function settleKeptWork(input) {
|
|
|
9378
9625
|
if (input.outcome !== "ok" || job.sessionKept !== true || job.workItemId === void 0) return;
|
|
9379
9626
|
if (dropKeptWork(keptSessionDir(input.configPath, job.organizationId, job.workItemId))) input.log.line(`${input.tag} the unfinished work kept with the session was removed: the item is done`);
|
|
9380
9627
|
}
|
|
9628
|
+
var FINGERPRINT_SCRIPT = 'const fs=require("fs"),c=require("crypto"),path=require("path");const[root,...skip]=process.argv.slice(1);const out=[];const walk=(dir)=>{for(const name of fs.readdirSync(dir).sort()){const file=path.join(dir,name);if(skip.includes(file))continue;const s=fs.lstatSync(file);const mode=(s.mode&0o7777).toString(8);if(s.isDirectory()){out.push(["d",mode,"",file]);walk(file)}else if(s.isSymbolicLink())out.push(["l",mode,fs.readlinkSync(file),file]);else if(s.isFile())out.push(["f",mode,c.createHash("sha256").update(fs.readFileSync(file)).digest("hex"),file]);else out.push(["o",mode,"",file])}};walk(root);process.stdout.write(out.map((entry)=>JSON.stringify(entry)).join("\\n")+"\\n")';
|
|
9629
|
+
function fingerprintCommand(skip) {
|
|
9630
|
+
return { argv: [NODE, "-e", FINGERPRINT_SCRIPT, JUDGE_DIR, ...skip], env: {}, cwd: JUDGE_DIR };
|
|
9631
|
+
}
|
|
9632
|
+
function parseFingerprint(stdout) {
|
|
9633
|
+
const entries = /* @__PURE__ */ new Map();
|
|
9634
|
+
for (const line2 of stdout.split("\n")) {
|
|
9635
|
+
if (line2 === "") continue;
|
|
9636
|
+
const [type, mode, content, file] = JSON.parse(line2);
|
|
9637
|
+
entries.set(file, `${type} ${mode} ${content}`);
|
|
9638
|
+
}
|
|
9639
|
+
return entries;
|
|
9640
|
+
}
|
|
9641
|
+
function changedPaths(before, after, ignore) {
|
|
9642
|
+
const paths = /* @__PURE__ */ new Set([...before.keys(), ...after.keys()]);
|
|
9643
|
+
return [...paths].filter((file) => !ignore.has(file) && before.get(file) !== after.get(file)).sort();
|
|
9644
|
+
}
|
|
9645
|
+
var NAMED_PATHS = 5;
|
|
9646
|
+
function changeReason(subject, paths) {
|
|
9647
|
+
const named = paths.slice(0, NAMED_PATHS).join(", ");
|
|
9648
|
+
return `${subject} changed files it must not change: ${named}${paths.length > NAMED_PATHS ? ` and ${paths.length - NAMED_PATHS} more` : ""}`;
|
|
9649
|
+
}
|
|
9650
|
+
async function superviseRuns(input) {
|
|
9651
|
+
const agents = input.agents ?? defaultAgents();
|
|
9652
|
+
const agent = judgeAgent(agents, input.job);
|
|
9653
|
+
if (agent?.adapter.headless?.judgeSupervised !== true) return void 0;
|
|
9654
|
+
const names = Object.keys(input.runs);
|
|
9655
|
+
const answers = new Set(Object.values(input.runs).map((run) => run.answer));
|
|
9656
|
+
const take = async () => {
|
|
9657
|
+
const ran = await input.run(fingerprintCommand([JUDGE_HOME, JUDGE_REPORT]));
|
|
9658
|
+
if (ran.status !== 0) throw new Error(`the integrity check could not read the judge's folder (exit ${ran.status})`);
|
|
9659
|
+
return parseFingerprint(ran.stdout);
|
|
9660
|
+
};
|
|
9661
|
+
const before = await take();
|
|
9662
|
+
const sealed = /* @__PURE__ */ new Map();
|
|
9663
|
+
const ledger = new UsageLedger(Object.values(input.runs).map((run) => run.key));
|
|
9664
|
+
const cap = { max: JUDGE_MAX_TURNS * names.length, used: 0, exceeded: () => void 0, ledger };
|
|
9665
|
+
const capped = new Promise((resolve2) => {
|
|
9666
|
+
cap.exceeded = () => resolve2("capped");
|
|
9667
|
+
});
|
|
9668
|
+
const buildId = builtOf(input.job)?.buildId;
|
|
9669
|
+
const services = buildId === void 0 ? void 0 : input.tunnels.get(buildId);
|
|
9670
|
+
const provider = agent.descriptor.providers[0];
|
|
9671
|
+
const destination = provider === void 0 ? void 0 : PROVIDERS[provider]?.destination.name;
|
|
9672
|
+
if (destination === void 0 || services?.capRequests?.(destination, cap) !== true) throw new Error(`the build serves no ${provider ?? "provider"} destination to count the judge's requests at`);
|
|
9673
|
+
return {
|
|
9674
|
+
capped,
|
|
9675
|
+
requests: () => cap.used,
|
|
9676
|
+
costUsd: (name) => ledger.costUsd(input.runs[name].key),
|
|
9677
|
+
ended: async (name) => {
|
|
9678
|
+
let after;
|
|
9679
|
+
try {
|
|
9680
|
+
after = await take();
|
|
9681
|
+
} catch (err) {
|
|
9682
|
+
return `the integrity check could not run after the run: ${err instanceof Error ? err.message : String(err)}`;
|
|
9683
|
+
}
|
|
9684
|
+
const { answer, subject } = input.runs[name];
|
|
9685
|
+
sealed.set(name, { answer, hash: after.get(answer), order: sealed.size });
|
|
9686
|
+
const changed = changedPaths(before, after, answers);
|
|
9687
|
+
return changed.length === 0 ? void 0 : changeReason(subject, changed);
|
|
9688
|
+
},
|
|
9689
|
+
finished: async () => {
|
|
9690
|
+
const voided = /* @__PURE__ */ new Map();
|
|
9691
|
+
if (sealed.size === 0) return voided;
|
|
9692
|
+
let last;
|
|
9693
|
+
try {
|
|
9694
|
+
last = await take();
|
|
9695
|
+
} catch (err) {
|
|
9696
|
+
const reason = `the integrity check could not run after the runs: ${err instanceof Error ? err.message : String(err)}`;
|
|
9697
|
+
for (const name of sealed.keys()) voided.set(name, reason);
|
|
9698
|
+
return voided;
|
|
9699
|
+
}
|
|
9700
|
+
for (const [name, seal] of sealed) {
|
|
9701
|
+
if (last.get(seal.answer) === seal.hash) continue;
|
|
9702
|
+
const reason = changeReason("a run that ended later", [seal.answer]);
|
|
9703
|
+
voided.set(name, reason);
|
|
9704
|
+
for (const [other, later] of sealed) if (later.order > seal.order) voided.set(other, reason);
|
|
9705
|
+
}
|
|
9706
|
+
return voided;
|
|
9707
|
+
},
|
|
9708
|
+
release: () => {
|
|
9709
|
+
services?.capRequests?.(destination, void 0);
|
|
9710
|
+
},
|
|
9711
|
+
answerChanged: (name, text2) => {
|
|
9712
|
+
const seal = sealed.get(name);
|
|
9713
|
+
if (seal === void 0 || text2 === void 0) return void 0;
|
|
9714
|
+
const [type, , content] = (seal.hash ?? "").split(" ");
|
|
9715
|
+
if (type === "f" && content === createHash("sha256").update(text2).digest("hex")) return void 0;
|
|
9716
|
+
return changeReason("a process that outlived its run", [seal.answer]);
|
|
9717
|
+
}
|
|
9718
|
+
};
|
|
9719
|
+
}
|
|
9381
9720
|
|
|
9382
9721
|
// src/runner/judge-verdict.ts
|
|
9383
9722
|
function firstLine5(text2) {
|
|
@@ -9385,15 +9724,18 @@ function firstLine5(text2) {
|
|
|
9385
9724
|
}
|
|
9386
9725
|
var RESULT_LINE = /^result:\s*(pass|fail)\s*$/i;
|
|
9387
9726
|
var UNMET_LINE = /^unmet:\s*(\S+)\s*$/i;
|
|
9388
|
-
function readJudgeReply(run, minutes, agents = defaultAgents()) {
|
|
9727
|
+
function readJudgeReply(run, minutes, agents = defaultAgents(), job) {
|
|
9389
9728
|
if (run.kind === "timeout") return { kind: "none", reason: `the judge ran out of time after ${minutes}`, limitKey: true };
|
|
9390
|
-
|
|
9729
|
+
if (run.kind === "capped") return { kind: "none", reason: `the judge reached the turn limit of ${JUDGE_MAX_TURNS} turns before it gave a result`, usage: { turns: run.requests } };
|
|
9730
|
+
const output = judgeAgent(agents, job)?.adapter.headless?.readJudgeOutput?.(run.stdout, { status: run.status });
|
|
9391
9731
|
if (output === void 0) {
|
|
9392
9732
|
const said2 = firstLine5(run.stderr);
|
|
9393
9733
|
return { kind: "none", reason: `the judge exited ${run.status} and printed no result${said2 === "" ? "" : `: ${said2}`}` };
|
|
9394
9734
|
}
|
|
9395
|
-
const
|
|
9735
|
+
const turns = output.usage?.turns ?? run.requests;
|
|
9736
|
+
const usage = output.usage === void 0 && turns === void 0 ? {} : { usage: { ...output.usage, ...turns === void 0 ? {} : { turns } } };
|
|
9396
9737
|
if (output.kind === "turn-limit") return { kind: "none", reason: `the judge reached the turn limit of ${JUDGE_MAX_TURNS} turns before it gave a result`, ...usage };
|
|
9738
|
+
if (output.kind === "unfinished") return { kind: "none", reason: `the judge did not finish: ${output.reason}`, ...usage };
|
|
9397
9739
|
const lines = output.text.split(/\r\n|\r|\n/).map((line2) => line2.trim()).filter((line2) => line2 !== "");
|
|
9398
9740
|
const verdict = RESULT_LINE.exec(lines.at(-1) ?? "")?.[1]?.toLowerCase();
|
|
9399
9741
|
if (verdict === void 0) return { kind: "none", reason: "the judge gave no `result:` line", ...usage };
|
|
@@ -9477,6 +9819,7 @@ function noBranchPushed(unpushed) {
|
|
|
9477
9819
|
}
|
|
9478
9820
|
|
|
9479
9821
|
// src/runner/judge.ts
|
|
9822
|
+
var NO_LOG = "/dev/null";
|
|
9480
9823
|
var LIMIT_KEY_TAIL = " (runner.checks.timeLimitMinutes)";
|
|
9481
9824
|
var MAX_DIFF_BYTES = 4 * 1024 * 1024;
|
|
9482
9825
|
var noAgentProgram = (label) => `the image has no ${label} for the judge`;
|
|
@@ -9528,8 +9871,34 @@ async function hostPassedNames(config, item, fetchImpl) {
|
|
|
9528
9871
|
}
|
|
9529
9872
|
return [...latest].filter(([, result]) => result === "pass").map(([name]) => name);
|
|
9530
9873
|
}
|
|
9531
|
-
function
|
|
9532
|
-
|
|
9874
|
+
function judgeFacts(runtime, job) {
|
|
9875
|
+
const agent = judgeAgent(runtime.agents, job);
|
|
9876
|
+
return agent === void 0 ? void 0 : { agent: agent.descriptor.id };
|
|
9877
|
+
}
|
|
9878
|
+
function judgeCredential(config, jobDir, runtime, job) {
|
|
9879
|
+
const judge = judgeFacts(runtime, job);
|
|
9880
|
+
if (config.fleet !== true) return servedJobCredential(runtime, job) ?? agentCredential(runtime.hostEnv, {}, runtime.agents, judge);
|
|
9881
|
+
const provider = judgeAgent(runtime.agents, job)?.descriptor.providers[0];
|
|
9882
|
+
return provider !== void 0 && managedKeyFor(jobDir, provider) !== void 0 ? managedAgentCredential(runtime.agents, void 0, judge) : void 0;
|
|
9883
|
+
}
|
|
9884
|
+
function servedJobCredential(runtime, job) {
|
|
9885
|
+
const judge = judgeAgent(runtime.agents, job);
|
|
9886
|
+
const own = jobAgent(job, runtime.agents);
|
|
9887
|
+
if (judge === void 0 || own === void 0 || judge.descriptor.id === own.descriptor.id) return void 0;
|
|
9888
|
+
if (!own.descriptor.providers.some((provider) => judge.descriptor.providers.includes(provider))) return void 0;
|
|
9889
|
+
const served = agentCredential(runtime.hostEnv, {}, runtime.agents, { agent: own.descriptor.id });
|
|
9890
|
+
const placeholder = served === void 0 ? void 0 : judge.descriptor.credentials.placeholders[served.variable];
|
|
9891
|
+
return served === void 0 || placeholder === void 0 ? void 0 : { variable: served.variable, placeholder };
|
|
9892
|
+
}
|
|
9893
|
+
function missingJudgeCredential(config, runtime, what, job) {
|
|
9894
|
+
const agent = judgeAgent(runtime.agents, job);
|
|
9895
|
+
if (config.fleet === true) {
|
|
9896
|
+
const variable = managedAgentCredential(runtime.agents, void 0, judgeFacts(runtime, job))?.variable;
|
|
9897
|
+
if (variable !== void 0) return `this factory stores no ${variable}, so the ${what === "judge" ? "judge" : "code review"} cannot run`;
|
|
9898
|
+
}
|
|
9899
|
+
if (agent === void 0) return `the host holds no agent credential for the ${what}`;
|
|
9900
|
+
if (what === "judge") return `the host holds no ${agent.descriptor.credentials.label} credential for the judge`;
|
|
9901
|
+
return `the host holds no ${agent.descriptor.credentials.label} credential for the review`;
|
|
9533
9902
|
}
|
|
9534
9903
|
function environmentFor(input) {
|
|
9535
9904
|
const { config, job, jobDir, deps } = input;
|
|
@@ -9645,17 +10014,18 @@ async function runJudge(input) {
|
|
|
9645
10014
|
previous = hostItemsOf(workItem, check.name);
|
|
9646
10015
|
}
|
|
9647
10016
|
if (check.judge.text === void 0) return await fail(check, `the brief ${check.judge.brief} is not in the definitions repository`);
|
|
9648
|
-
const agent = judgeAgent(runtime.agents);
|
|
10017
|
+
const agent = judgeAgent(runtime.agents, job);
|
|
9649
10018
|
if (agent?.adapter.headless === void 0) return await fail(check, `${agent?.descriptor.label ?? "the agent list"} has no headless part, so it cannot run the judge`);
|
|
9650
10019
|
const missing = noAgentProgram(agent.descriptor.label);
|
|
9651
10020
|
const environment = environmentFor(input);
|
|
9652
10021
|
if (environment === void 0) return await fail(check, `${missing}: this build ran outside a container or microVM`);
|
|
9653
10022
|
const expected = builtOf(job)?.judgeProgram;
|
|
9654
10023
|
if (expected === void 0) return await fail(check, missing);
|
|
10024
|
+
if (expected.path !== judgeProgram(runtime.agents, job)) return await fail(check, `the build recorded ${expected.path} as its judge's program, and this runner judges with ${agent.descriptor.label}; rerun the item`);
|
|
9655
10025
|
const brief = check.judge.text;
|
|
9656
10026
|
if (tokens === void 0) return await fail(check, "the build's repository tokens are no longer held, so the branch cannot be fetched");
|
|
9657
|
-
const credential = judgeCredential(config, jobDir, runtime);
|
|
9658
|
-
if (credential === void 0) return await fail(check,
|
|
10027
|
+
const credential = judgeCredential(config, jobDir, runtime, job);
|
|
10028
|
+
if (credential === void 0) return await fail(check, missingJudgeCredential(config, runtime, "judge", job));
|
|
9659
10029
|
if (job.branch === void 0) return await fail(check, "the build pushed no branch: the claim names none");
|
|
9660
10030
|
try {
|
|
9661
10031
|
await environment.stop();
|
|
@@ -9719,13 +10089,25 @@ async function runJudge(input) {
|
|
|
9719
10089
|
const clear = async () => {
|
|
9720
10090
|
await environment.clear?.().catch((err) => log.error(`${tag} what the judge left in its folder could not be removed: ${describeCallFailure(err)}`));
|
|
9721
10091
|
};
|
|
9722
|
-
|
|
10092
|
+
let supervision;
|
|
10093
|
+
let command;
|
|
10094
|
+
try {
|
|
10095
|
+
command = judgeCommand({ brief: prompt, credential, job }, runtime.agents);
|
|
10096
|
+
supervision = await superviseRuns({ run: (probe) => environment.run(probe, { logPath: NO_LOG }), tunnels: runtime.tunnels, agents: runtime.agents, job, runs: { judge: { answer: JUDGE_ITEMS, subject: "the judge", key: credential.placeholder } } });
|
|
10097
|
+
} catch (err) {
|
|
10098
|
+
await clear();
|
|
10099
|
+
throw err;
|
|
10100
|
+
}
|
|
10101
|
+
const running = environment.run(command, { logPath: join(jobDir, logName) });
|
|
9723
10102
|
running.catch(() => void 0);
|
|
9724
10103
|
const timer = timeoutAfter(limitMinutes * 6e4, deps.sleep);
|
|
9725
10104
|
let outcome;
|
|
10105
|
+
let discarded;
|
|
9726
10106
|
try {
|
|
9727
|
-
outcome = await Promise.race([running, timer.done]);
|
|
10107
|
+
outcome = await Promise.race([running, timer.done, ...supervision === void 0 ? [] : [supervision.capped]]);
|
|
10108
|
+
discarded = await supervision?.ended("judge");
|
|
9728
10109
|
} catch (err) {
|
|
10110
|
+
supervision?.release();
|
|
9729
10111
|
await clear();
|
|
9730
10112
|
throw err;
|
|
9731
10113
|
} finally {
|
|
@@ -9743,12 +10125,21 @@ async function runJudge(input) {
|
|
|
9743
10125
|
} catch (err) {
|
|
9744
10126
|
log.error(`${tag} the judge's items could not be read: ${describeCallFailure(err)}`);
|
|
9745
10127
|
}
|
|
9746
|
-
if (outcome
|
|
9747
|
-
|
|
10128
|
+
if (outcome !== "timeout" && outcome !== "capped") discarded ??= supervision?.answerChanged("judge", answerText);
|
|
10129
|
+
if (outcome === "timeout" || outcome === "capped") {
|
|
10130
|
+
await environment.stop().catch((err) => log.error(`${tag} the judge could not be stopped after ${outcome === "timeout" ? "its time ran out" : "it reached its turn limit"}: ${describeCallFailure(err)}`));
|
|
9748
10131
|
}
|
|
10132
|
+
supervision?.release();
|
|
9749
10133
|
await clear();
|
|
9750
|
-
const
|
|
9751
|
-
|
|
10134
|
+
const requests = supervision?.requests();
|
|
10135
|
+
if (supervision !== void 0) {
|
|
10136
|
+
const costUsd = supervision.costUsd("judge");
|
|
10137
|
+
log.line(`${tag} judge: ${requests} model ${requests === 1 ? "request" : "requests"}, cost ${costUsd === void 0 ? "unknown" : `$${costUsd.toFixed(4)}`}`);
|
|
10138
|
+
}
|
|
10139
|
+
if (discarded !== void 0) return { reply: { kind: "none", reason: discarded }, answer: void 0, report: void 0 };
|
|
10140
|
+
const run = outcome === "timeout" ? { kind: "timeout" } : outcome === "capped" ? { kind: "capped", requests } : { kind: "exited", status: outcome.status, stdout: outcome.stdout, stderr: outcome.stderr, ...requests === void 0 ? {} : { requests } };
|
|
10141
|
+
const reply = readJudgeReply(run, minutes, runtime.agents, job);
|
|
10142
|
+
return { reply, answer: supervision !== void 0 && reply.kind === "none" ? void 0 : parseJudgeAnswer(answerText), report };
|
|
9752
10143
|
};
|
|
9753
10144
|
const linkTo = (path, line2) => {
|
|
9754
10145
|
const href = finder.testHref(repo, head, path, line2 ?? 1);
|
|
@@ -10081,6 +10472,8 @@ function outcomeFromExitCode(jobDirPath) {
|
|
|
10081
10472
|
}
|
|
10082
10473
|
var REASON_FILE = "reason";
|
|
10083
10474
|
var REASON_MAX2 = 200;
|
|
10475
|
+
var REASON_CUT = "\u2026";
|
|
10476
|
+
var DIRECTION_CONTROLS = /[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/g;
|
|
10084
10477
|
function cutReasonLine(line2, max = REASON_MAX2) {
|
|
10085
10478
|
const cut = line2.slice(0, max);
|
|
10086
10479
|
const last = cut.charCodeAt(cut.length - 1);
|
|
@@ -10100,7 +10493,12 @@ function releaseScrub(config, home, jobDir, agents = defaultAgents()) {
|
|
|
10100
10493
|
const merged = mergeScrubConfig(config.scrub, readCloudConfig(home).scrub);
|
|
10101
10494
|
const secrets = [...headerVariables(config.build?.destinations), ...strippedVariables(agents)].map((name) => process.env[name] ?? "");
|
|
10102
10495
|
const managed = config.fleet === true && jobDir !== void 0 ? [...managedClaudeKeyValuesFor(jobDir), ...managedBuildSettingValuesFor(jobDir)] : [];
|
|
10103
|
-
const
|
|
10496
|
+
const removed = removedAgentCredentialValues();
|
|
10497
|
+
const copies = runnerAgents(agents).flatMap((agent, index) => {
|
|
10498
|
+
const value = currentAgentCredential(process.env, agent.descriptor.id, agents)?.value;
|
|
10499
|
+
return value === void 0 || index > 0 && removed.includes(value) ? [] : [value];
|
|
10500
|
+
});
|
|
10501
|
+
const held3 = [...new Set(copies), ...removed, ...managed].filter((value) => value !== void 0);
|
|
10104
10502
|
return { literals: [...scrubList(merged?.literals), ...secrets, ...held3], patterns: scrubList(merged?.patterns) };
|
|
10105
10503
|
}
|
|
10106
10504
|
function transcriptScrub(config, secrets, jobDir, agents = defaultAgents()) {
|
|
@@ -10138,9 +10536,18 @@ function readReasonLine(jobDirPath, config, home = homeFromEnv()) {
|
|
|
10138
10536
|
}
|
|
10139
10537
|
function scrubReason(line2, config, home = homeFromEnv(), jobDir, max = REASON_MAX2) {
|
|
10140
10538
|
installScrubContext(home, releaseScrub(config, home, jobDir));
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
10539
|
+
return oneCutLine(scrubText(withoutControls(line2)), max);
|
|
10540
|
+
}
|
|
10541
|
+
function withoutControls(text2) {
|
|
10542
|
+
return stripTerminalControls(stripUnsendableReasonChars(text2)).replace(DIRECTION_CONTROLS, "");
|
|
10543
|
+
}
|
|
10544
|
+
function oneCutLine(text2, max) {
|
|
10545
|
+
const oneLine = text2.replace(/[\r\n\t]+/g, " ").trim();
|
|
10546
|
+
const cut = oneLine.length > max ? `${cutReasonLine(oneLine, max - REASON_CUT.length).trimEnd()}${REASON_CUT}` : oneLine;
|
|
10547
|
+
return cut.length > 0 ? cut : void 0;
|
|
10548
|
+
}
|
|
10549
|
+
function sendableReason(reason) {
|
|
10550
|
+
return reason === void 0 ? void 0 : oneCutLine(withoutControls(reason), REASON_MAX2);
|
|
10144
10551
|
}
|
|
10145
10552
|
function scrubTunnelRecord(record, config, jobDir) {
|
|
10146
10553
|
if (record === void 0) return void 0;
|
|
@@ -10853,6 +11260,10 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
|
|
|
10853
11260
|
if (outcome === "failed" && job.reason === void 0 && job.commandEndReason !== void 0) {
|
|
10854
11261
|
job.reason = scrubReason(job.commandEndReason, config, void 0, jobDirPath);
|
|
10855
11262
|
}
|
|
11263
|
+
if (outcome === "failed" && job.reason === void 0 && job.exitCode !== void 0 && job.exitCode !== 0) {
|
|
11264
|
+
const said2 = agentErrorReason(job, commandOutputTail(jobDirPath, job));
|
|
11265
|
+
if (said2 !== void 0) job.reason = scrubReason(said2, config, void 0, jobDirPath);
|
|
11266
|
+
}
|
|
10856
11267
|
const cliVersion = deps.cliVersion ?? resolveVersion();
|
|
10857
11268
|
const base = job.environment ?? (job.microvm !== void 0 ? { isolation: "vm", cliVersion } : !isIsolatedJob(job) ? sharedUserEnvironment(cliVersion) : { isolation: "container", cliVersion });
|
|
10858
11269
|
if (isolated || job.build !== void 0) {
|
|
@@ -10871,7 +11282,7 @@ async function finishJob(job, jobDirPath, outcome, config, deps, ending) {
|
|
|
10871
11282
|
const sentAtMs = endedAt.getTime();
|
|
10872
11283
|
const runnerLog = valuesNotHeld ? `The runner sends no log for this attempt: ${VALUES_NOT_HELD}.
|
|
10873
11284
|
` : releaseLogFor(jobDirPath, job, config);
|
|
10874
|
-
const detail = outcome === void 0 ? { log: runnerLog, endedAt: endedAt.toISOString() } : { stage: job.endStage, exitCode: job.endExitCode, reason: job.reason, environment: job.environment, resume: job.resume, disk: job.disk, log: runnerLog, endedAt: endedAt.toISOString() };
|
|
11285
|
+
const detail = outcome === void 0 ? { log: runnerLog, endedAt: endedAt.toISOString() } : { stage: job.endStage, exitCode: job.endExitCode, reason: sendableReason(job.reason), environment: job.environment, resume: job.resume, disk: job.disk, log: runnerLog, endedAt: endedAt.toISOString() };
|
|
10875
11286
|
const release = await retrySend(() => sendRelease(config, job, outcome, detail, deps.fetchImpl), {
|
|
10876
11287
|
now: deps.now,
|
|
10877
11288
|
sleep: deps.sleep
|
|
@@ -10951,7 +11362,7 @@ async function retryFailedReleases(jobsDirPath, config, deps) {
|
|
|
10951
11362
|
continue;
|
|
10952
11363
|
}
|
|
10953
11364
|
const runnerLog = readScrubbedReleaseLog(dirPath) ?? releaseLogFor(dirPath, job, config);
|
|
10954
|
-
const detail = job.outcome === void 0 ? { log: runnerLog, endedAt: job.endedAt } : { stage: job.endStage, exitCode: job.endExitCode, reason: job.reason, environment: job.environment, resume: job.resume, disk: job.disk, log: runnerLog, endedAt: job.endedAt };
|
|
11365
|
+
const detail = job.outcome === void 0 ? { log: runnerLog, endedAt: job.endedAt } : { stage: job.endStage, exitCode: job.endExitCode, reason: sendableReason(job.reason), environment: job.environment, resume: job.resume, disk: job.disk, log: runnerLog, endedAt: job.endedAt };
|
|
10955
11366
|
const release = await retrySend(() => sendRelease(config, job, job.outcome, detail, deps.fetchImpl), {
|
|
10956
11367
|
now: deps.now,
|
|
10957
11368
|
sleep: deps.sleep
|
|
@@ -12466,7 +12877,7 @@ function decode(prefix, gzip) {
|
|
|
12466
12877
|
if (!gzip) return prefix;
|
|
12467
12878
|
try {
|
|
12468
12879
|
const { compressedWindow, inflatedBytes } = limits();
|
|
12469
|
-
return gunzipSync(prefix.subarray(0, compressedWindow), { finishFlush: constants$
|
|
12880
|
+
return gunzipSync(prefix.subarray(0, compressedWindow), { finishFlush: constants$2.Z_SYNC_FLUSH, maxOutputLength: inflatedBytes });
|
|
12470
12881
|
} catch (err) {
|
|
12471
12882
|
const code = err.code;
|
|
12472
12883
|
if (code === "ERR_BUFFER_TOO_LARGE") return refused(TOO_LONG);
|
|
@@ -13167,7 +13578,10 @@ async function provisionContainerOnce(input, allowRestore, itemDiskFailed) {
|
|
|
13167
13578
|
const tag = itemTag({ item: item.number, organizationId: input.organizationId, claimId: input.claimId });
|
|
13168
13579
|
const logPath = join(jobDir, "provision.log");
|
|
13169
13580
|
const fail = (reason) => ({ ok: false, reason });
|
|
13170
|
-
if (!hasClaudeCredential(config, runtime.hostEnv, jobDir, runtime.agents, input.job))
|
|
13581
|
+
if (!hasClaudeCredential(config, runtime.hostEnv, jobDir, runtime.agents, input.job)) {
|
|
13582
|
+
if (config.fleet !== true) noteMissingCredential(jobDir, runtime.hostEnv, runtime.agents, input.job);
|
|
13583
|
+
return fail(AGENT_CREDENTIAL_MISSING);
|
|
13584
|
+
}
|
|
13171
13585
|
const repositories = repositoriesOf({ repositories: input.repositories, repository: item.specRepository, branch: input.branch });
|
|
13172
13586
|
const primary = primaryOf(repositories);
|
|
13173
13587
|
if (primary === void 0) return fail("the work item names no repository to clone");
|
|
@@ -13270,7 +13684,7 @@ async function provisionContainerOnce(input, allowRestore, itemDiskFailed) {
|
|
|
13270
13684
|
containerEnv: report.apply.containerEnv,
|
|
13271
13685
|
builtIns: true
|
|
13272
13686
|
};
|
|
13273
|
-
const env = buildEnvironment(envInput);
|
|
13687
|
+
const env = buildEnvironment({ ...envInput, onWithheld: (name2) => log.line(`${tag} ${withheldCredentialLine(name2)}`) });
|
|
13274
13688
|
if (env.skippedTokenVariables.length > 0) {
|
|
13275
13689
|
log.line(`${tag} not passing ${env.skippedTokenVariables.join(", ")} from runner.build.variables into the build: its repository token comes from the runner`);
|
|
13276
13690
|
}
|
|
@@ -13403,7 +13817,7 @@ async function provisionContainerOnce(input, allowRestore, itemDiskFailed) {
|
|
|
13403
13817
|
const tools = await host.exec({ container: name, user: ADDED_USER, env: NO_ENV2, argv: ["cat", "/opt/outerlayer/tools.json"] });
|
|
13404
13818
|
const agentVersion = agentVersionOf(tools.status === 0 ? tools.stdout : "", runtime.agents, input.job);
|
|
13405
13819
|
environment.agentVersion = agentVersion;
|
|
13406
|
-
const recorded = await judgeProgramRecord((argv) => host.exec({ container: name, user: ADDED_USER, env: NO_ENV2, argv }), runtime.agents);
|
|
13820
|
+
const recorded = await judgeProgramRecord((argv) => host.exec({ container: name, user: ADDED_USER, env: NO_ENV2, argv }), runtime.agents, input.job);
|
|
13407
13821
|
if (recorded !== void 0) state.judgeProgram = recorded;
|
|
13408
13822
|
input.save(state, environment);
|
|
13409
13823
|
if (input.queue === "review") return { ok: true, workdir: CHECKOUT_DIR, state, environment };
|
|
@@ -13613,6 +14027,11 @@ async function measureDisk(runtime, state) {
|
|
|
13613
14027
|
clearTimeout(timer);
|
|
13614
14028
|
}
|
|
13615
14029
|
}
|
|
14030
|
+
function jobAgentOf(jobDir, config, runtime) {
|
|
14031
|
+
const agent = readJobFile(join(jobDir, "job.json"))?.agent;
|
|
14032
|
+
const chosen = agent ?? defaultAgentId(config, reportedAgents(config, runtime.hostEnv, runtime.agents), runtime.agents);
|
|
14033
|
+
return chosen === void 0 ? {} : { job: { agent: chosen } };
|
|
14034
|
+
}
|
|
13616
14035
|
function decryptFor(settingsKey) {
|
|
13617
14036
|
if (settingsKey === void 0 || (managedBuildSettingsFor(settingsKey)?.proxied?.length ?? 0) === 0) return {};
|
|
13618
14037
|
return { decrypt: { authority: buildAuthorityFor(settingsKey), variables: () => managedBuildSettingsFor(settingsKey)?.proxied ?? [] } };
|
|
@@ -13633,7 +14052,7 @@ async function startServicesFor(runtime, config, buildDir2, jobDir, itemKey, bui
|
|
|
13633
14052
|
...lease === void 0 ? {} : { lease },
|
|
13634
14053
|
...inherit === void 0 ? {} : { inherit },
|
|
13635
14054
|
...routeLog === void 0 ? {} : { log: routeLog },
|
|
13636
|
-
...builtIns ? { builtIns: { gatewayUrl: config.url, itemKey, upstreams: runtime.upstreams,
|
|
14055
|
+
...builtIns ? { builtIns: { gatewayUrl: config.url, itemKey, upstreams: runtime.upstreams, managedKeys: managedKeysFor(jobDir), agents: runtime.agents, ...jobAgentOf(settingsDir ?? jobDir, config, runtime) } } : {},
|
|
13637
14056
|
hostEnv: runtime.hostEnv,
|
|
13638
14057
|
destinationOptions: runtime.destinationOptions
|
|
13639
14058
|
});
|
|
@@ -13855,7 +14274,7 @@ function containerJudgeEnvironment(input) {
|
|
|
13855
14274
|
if (!delivered.ok) throw new Error(delivered.reason);
|
|
13856
14275
|
},
|
|
13857
14276
|
hashProgram: async () => {
|
|
13858
|
-
return await hashJudgeProgram((argv) => runtime.host.exec({ container: state.container, user: ADDED_USER, env: NO_ENV2, argv }), runtime.agents);
|
|
14277
|
+
return await hashJudgeProgram((argv) => runtime.host.exec({ container: state.container, user: ADDED_USER, env: NO_ENV2, argv }), runtime.agents, input.job);
|
|
13859
14278
|
},
|
|
13860
14279
|
prepare: async (files, tree) => {
|
|
13861
14280
|
if (filesAreCopied(state)) {
|
|
@@ -14523,4 +14942,4 @@ async function runHostChecks(input) {
|
|
|
14523
14942
|
}
|
|
14524
14943
|
}
|
|
14525
14944
|
|
|
14526
|
-
export { ADOPTED_FETCH_RETRY_WINDOW_MS, ALREADY_RELEASED, AttemptLogBook, EXIT_CODE_FILE, GUEST_USAGE_INTERVAL_MS, HELPER_ENV, KIND_LABEL, LEASE_SECONDS, MAX_CHECK_ITEMS_BYTES, MICROVM_COMMAND_DIR, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, RENEW_INTERVAL_SECONDS, RunnerInitError, SandboxContainerStoppedError, SandboxGoneError, agentCredentialCheck, appendCommandLog, attemptNote, builtOf, checksIn, claimPermissionProblem, claimRun, commandItems, commandLogOffset, containerCommandExec, createContainerRuntime, createGatewaySandboxClient, createHousekeepingDocker, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deliverCommitHooks, deliverContainerHooks, deliverExecMaven, deliverJobFiles, deliverSandboxHooks, describeHookEnd, describeMachineDocker, detectMachine, ensureFirecrackerAndJailer, ensureNetworkReady, ensureTunnel, environmentFor, execArgv, execCommandLine, fetchManagedBuildSettings,
|
|
14945
|
+
export { ADOPTED_FETCH_RETRY_WINDOW_MS, ALREADY_RELEASED, AttemptLogBook, EXIT_CODE_FILE, GUEST_USAGE_INTERVAL_MS, HELPER_ENV, KIND_LABEL, LEASE_SECONDS, MAX_CHECK_ITEMS_BYTES, MICROVM_COMMAND_DIR, MIN_ENGINE_MAJOR, NO_LOG, PLACEHOLDER_MARKER, RENEW_INTERVAL_SECONDS, RunnerInitError, SandboxContainerStoppedError, SandboxGoneError, addRunnerAgent, agentCredentialCheck, agentCredentialFromFiles, appendCommandLog, attemptNote, builtOf, checksIn, claimPermissionProblem, claimRun, commandEndReasonOf, commandItems, commandLogOffset, containerCommandExec, createContainerRuntime, createGatewaySandboxClient, createHousekeepingDocker, createLeaseChannel, credentialVerdict, currentSkillCommand, decideHostBuildSkill, deliverCommitHooks, deliverContainerHooks, deliverExecMaven, deliverJobFiles, deliverSandboxHooks, describeHookEnd, describeMachineDocker, detectMachine, ensureFirecrackerAndJailer, ensureNetworkReady, ensureTunnel, environmentFor, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedModelKey, filesAreCopied, finishJob, foldSample, formerSkillProblem, formerSkillQueues, freeItemDisksUntil, gatewayRefusalReason, gitRemoteFor, hasRunnerBlock, heldSandboxClaimsOf, helperFirecrackerNote, helperSocketPath, holdManagedBuildSettings, holdManagedKey, holdsHostDisk, hookLimitsFor, hostCommandEnvironment, hostEnvironment, housekeepingDockerIfReachable, inSandbox, inTeardown, installTrust, isContainerTracked, isGroupAlive, isIdle, isIsolatedJob, isJudgeCheck, isMicroVmTracked, isPlaceholderCommand, isReadable, isSandboxTracked, isTimedOut, isTracked, isUnfinished, itemScope, itemTag, jobEnv, jobRecordsClaim, jobTimeLimitMinutes, judgeCredential, judgeProbe, keepGhConfigCurrent, keptCommitsLine, keptSandboxIds, keptSessionDir, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listAdoptableJobs, listItemDisks, listTrackedJobs, listUnreadableJobs, listenOnBroker, makeRecorder, managedBuildSettingsFor, measureDisk, microVmArchSupported, microVmAssetsPinned, microVmCommandLine, microVmOomKills, missingJudgeCredential, missingPermissionFix, missingPermissionOf, modellessProblem, modellessQueues, nativeWindowsSandboxRefusal, needsAgentCredential, needsBuildSkill, needsRenew, noteMissingCredential, outcomeFromExitCode, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, prepareBranch, prepareResume, prepareRunnerInit, probeCommand, probeHelper, probeMicroVmCommand, probeSandboxCommand, provisionContainer, provisionEnvironment, provisionMicroVm, provisionSandbox, reachDockerStep, readConfigObject, readCpuUsec, readDefinitions, readProvisionOut, readRecords, readWorkItem, recordsProofsOnly, recoverLostJobs, rejoinSandboxBuild, releaseLease, removeOldestUntil, removeRunnerBlock, renewLease, renewRun, resolveHostBuild, restartSender, restoreSessionIntoContainer, restoreSessionIntoMicroVm, restoreSessionIntoSandbox, restoreWork, retryFailedReleases, runCommand, runCommandFor, runCommandOf, runDecision, runHook, runHostChecks, runHousekeeping, runRunnerInit, runWithSpawn, sampleGuest, savedStatesDir, scrubReason, serveLease, sessionGuestOfContainer, sessionGuestOfMicroVm, sessionGuestOfSandbox, setStage, setUpRunnerCgroup, shellQuote, startHostServices, startMicroVmCommand, startSandboxCommand, startSender, startServicesFor, stopOrphanedMicroVms, stoppedHelperReason, stripTerminalControls, superviseRuns, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, sweepSandboxes, testProofIn, timeoutAfter, treeFileText, unfinishedJobs, vmAlive, withJobTimeLimit, withTunnelLog, workRestoredEnv, workdirProblem, writeGuestGhConfig, writeRunnerInit };
|