@outerlayer/cli 0.40.0-next.20261117034333 → 0.40.0-next.20261117055025
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 +5 -1
- package/dist/agent-setup-4J2JL5EB.js +41 -0
- package/dist/{agent-subcommand-MW4TF4SG.js → agent-subcommand-64YO6FE4.js} +4 -4
- package/dist/{artifact-link-cmd-XUHNVFVU.js → artifact-link-cmd-HYEM4X5U.js} +2 -2
- package/dist/{bridge-WEK2IMAD.js → bridge-H72K6N7O.js} +7 -7
- package/dist/{build-LJSUCORB.js → build-PBQIJPCC.js} +13 -13
- package/dist/{build-disk-S2XHWSDH.js → build-disk-3COAKTPF.js} +11 -11
- package/dist/build-info.json +1 -1
- package/dist/{builder-TCRJKB2W.js → builder-GOJQQOIV.js} +10 -10
- package/dist/caller-BZBHMIA2.js +23 -0
- package/dist/{check-Z6GAY2C4.js → check-Y5CTVK5F.js} +55 -55
- package/dist/{chunk-UAZBE4O3.js → chunk-2AEXGFFJ.js} +10 -10
- package/dist/{chunk-ZQTMWBLA.js → chunk-2L2LLHQW.js} +1 -1
- package/dist/{chunk-PB4QDL6Q.js → chunk-3FZXSMIL.js} +4 -4
- package/dist/{chunk-V77IQKWK.js → chunk-3QNW4M64.js} +17 -17
- package/dist/{chunk-4FTRLX6A.js → chunk-3RG2ZR3J.js} +5 -5
- package/dist/{chunk-MEZVLRJK.js → chunk-3RSCWOYQ.js} +10 -10
- package/dist/{chunk-ABY722KN.js → chunk-3TEE7JVW.js} +1 -1
- package/dist/{chunk-7QIQ7QR3.js → chunk-52CTFVXD.js} +1 -1
- package/dist/{chunk-BZFRU6M7.js → chunk-6FWHB4TW.js} +8 -8
- package/dist/{chunk-CH3PO7UY.js → chunk-6IGOHB3O.js} +3 -2
- package/dist/{chunk-BEK2BZAI.js → chunk-7CK4Z6VC.js} +6 -6
- package/dist/{chunk-NWWED36F.js → chunk-7QDRLTFW.js} +1 -1
- package/dist/{chunk-TZNIDZGI.js → chunk-AAGXH2FR.js} +1 -1
- package/dist/{chunk-QJI56HI2.js → chunk-AQS3AG4T.js} +7 -7
- package/dist/{chunk-UUVURKWB.js → chunk-ATK2MNGU.js} +4 -4
- package/dist/{chunk-3ETI7MKK.js → chunk-BIBHD4KJ.js} +4 -4
- package/dist/{chunk-GQI5N56J.js → chunk-BIXO533I.js} +2 -2
- package/dist/{chunk-TTBG7YZW.js → chunk-CKS7B2ZJ.js} +7 -7
- package/dist/{chunk-KCLFDN26.js → chunk-CZYUSXAR.js} +3 -3
- package/dist/{chunk-D2QNQOFX.js → chunk-D3PPI7I4.js} +1 -1
- package/dist/{chunk-3PXV4I75.js → chunk-DMW22UQE.js} +3 -3
- package/dist/{chunk-RUSF2YGL.js → chunk-EBSN6K35.js} +6 -6
- package/dist/{chunk-MBOQJTOS.js → chunk-FBFYIEHC.js} +4 -4
- package/dist/{chunk-H6L6SWMN.js → chunk-FRQLJUID.js} +2 -2
- package/dist/{chunk-H4JQKCVP.js → chunk-FUNAQRMN.js} +9 -9
- package/dist/{chunk-5EWESACE.js → chunk-FYL2RFHI.js} +3 -3
- package/dist/{chunk-PZZS6DHY.js → chunk-G2KLJMPR.js} +8 -8
- package/dist/{chunk-K6THWLSJ.js → chunk-H37HSQGH.js} +1 -1
- package/dist/{chunk-UFGV3JZ5.js → chunk-H73CCPAW.js} +1 -1
- package/dist/{chunk-FLHDVJAV.js → chunk-H7BNWYIA.js} +5 -5
- package/dist/{chunk-EBWA6KIE.js → chunk-HHOFP647.js} +1 -1
- package/dist/{chunk-AGKUDDIN.js → chunk-HQEPFG5U.js} +1 -1
- package/dist/{chunk-D3CALDGC.js → chunk-IHMGZWOB.js} +1 -1
- package/dist/{chunk-ABXHYH2Y.js → chunk-ISTSELPU.js} +6 -6
- package/dist/{chunk-CNMC4OXO.js → chunk-IXHMDBXY.js} +7 -7
- package/dist/{chunk-F4PRZBBJ.js → chunk-J4EPJMU6.js} +2 -2
- package/dist/{chunk-33RKRHJG.js → chunk-J7UWKTRV.js} +1 -1
- package/dist/{chunk-HI6R4XYD.js → chunk-JMQDGBAF.js} +2 -2
- package/dist/{chunk-HSGZ4JEV.js → chunk-K3IO22FH.js} +1 -1
- package/dist/{chunk-MG2Y5XYV.js → chunk-K7RHVH7G.js} +218 -59
- package/dist/{chunk-PHC24VUU.js → chunk-KPCGSGZS.js} +5 -5
- package/dist/{chunk-X6BGCNE3.js → chunk-KZEZBZ4W.js} +8 -8
- package/dist/{chunk-WEPLWKV6.js → chunk-L4T6CI57.js} +3 -3
- package/dist/{chunk-7PIUTUXI.js → chunk-LX4GPGNE.js} +3 -3
- package/dist/{chunk-ZASDJ7F5.js → chunk-MAWSNLSZ.js} +4 -4
- package/dist/{chunk-GBLNHZ3E.js → chunk-MN73QQDA.js} +4 -4
- package/dist/{chunk-LYHR47YE.js → chunk-O6YRZ4CP.js} +2 -2
- package/dist/{chunk-AH2BO6Q6.js → chunk-OA2KHMXX.js} +6 -6
- package/dist/{chunk-ZYIVNB6B.js → chunk-PC6BJDBE.js} +4 -4
- package/dist/{chunk-6NODVJGM.js → chunk-PIP32M2V.js} +3 -3
- package/dist/{chunk-WZ6K327V.js → chunk-PKYJMXRB.js} +8 -8
- package/dist/{chunk-CW6H5JXV.js → chunk-PVDIDOKH.js} +40 -9
- package/dist/{chunk-V6UDJVVD.js → chunk-QKMVEQXO.js} +3 -3
- package/dist/{chunk-FG2E3HES.js → chunk-QMC2MM2S.js} +1 -1
- package/dist/{chunk-6ZBUQIJA.js → chunk-QMOE5Y4X.js} +1 -1
- package/dist/{chunk-EU6JHHES.js → chunk-QYJYYF3J.js} +247 -61
- package/dist/{chunk-P7OXJ3ZD.js → chunk-RC5WWCUS.js} +5 -5
- package/dist/{chunk-UE42G3QY.js → chunk-SS3SQYDS.js} +1 -1
- package/dist/{chunk-SK4BESZM.js → chunk-SSVM6C5N.js} +1 -1
- package/dist/{chunk-UN7RXMOB.js → chunk-T4SVE4O4.js} +4 -4
- package/dist/{chunk-I7ZQKMKG.js → chunk-TPLMLNME.js} +1 -1
- package/dist/{chunk-VG6FUXGK.js → chunk-UAGUV74T.js} +1 -1
- package/dist/{chunk-KDVQGQXM.js → chunk-V56S4A34.js} +1 -1
- package/dist/{chunk-S4CX66JO.js → chunk-V65YF5VP.js} +1 -1
- package/dist/{chunk-5O7P6VXS.js → chunk-VEW4BPVJ.js} +1 -1
- package/dist/{chunk-6QXGAGQY.js → chunk-VH7P6XUP.js} +1 -1
- package/dist/{chunk-6GJMRVMX.js → chunk-VUSPSY6N.js} +1 -1
- package/dist/{chunk-ZIN6G7DS.js → chunk-WAI7EGGE.js} +1 -1
- package/dist/{chunk-H2THCHUP.js → chunk-WHIAOWEN.js} +1 -1
- package/dist/{chunk-F6J3ACXH.js → chunk-XVE7HD6X.js} +6 -6
- package/dist/{chunk-YICV7DAE.js → chunk-XVTDFLRQ.js} +3 -3
- package/dist/{chunk-IQYAPM4S.js → chunk-Y73IIGAU.js} +7 -7
- package/dist/{chunk-33DTLCL6.js → chunk-YAB2SVSI.js} +2 -2
- package/dist/{chunk-2QFZBWBP.js → chunk-YVLGGDYK.js} +1 -1
- package/dist/{chunk-XT6LWXJ2.js → chunk-ZHXBFXG2.js} +1 -1
- package/dist/{claude-launcher-HWC5S5HD.js → claude-launcher-43RD6G3Y.js} +7 -7
- package/dist/{cli-TWF7CU3E.js → cli-YSZ2PWXK.js} +169 -169
- package/dist/{command-KGYVPB7B.js → command-NBKHR4MM.js} +52 -52
- package/dist/{config-J4VSNOH4.js → config-OJTLS62B.js} +12 -12
- package/dist/{connect-cmd-LPC6J27D.js → connect-cmd-L5KO3U67.js} +13 -13
- package/dist/{container-start-O6BAIQGT.js → container-start-NRCXZWBS.js} +49 -49
- package/dist/{context-cleanup-VWJSWUJB.js → context-cleanup-REXSRAU6.js} +4 -4
- package/dist/{context-show-cmd-B427F3M4.js → context-show-cmd-DAVFJJHX.js} +14 -14
- package/dist/{control-plane-launch-WV253P7I.js → control-plane-launch-TARK67QP.js} +14 -14
- package/dist/{demo-record-cmd-YRND2HVT.js → demo-record-cmd-BRBXTCSL.js} +8 -8
- package/dist/{demo-voice-cmd-TUIXJ7CY.js → demo-voice-cmd-67ZE46PS.js} +20 -20
- package/dist/{dist-UV2JOW3N.js → dist-3AH72O53.js} +2 -2
- package/dist/{docker-6NO5B657.js → docker-FEOTGBDS.js} +10 -10
- package/dist/{doctor-V3Z5CR5Q.js → doctor-3QBRH4YU.js} +51 -51
- package/dist/{emit-artifact-cmd-MWDEBRB2.js → emit-artifact-cmd-ZDQ5PPRN.js} +19 -19
- package/dist/{emit-cmd-2ADJWBJP.js → emit-cmd-MY3TTOV7.js} +7 -7
- package/dist/{emit-criteria-cmd-35O7KR37.js → emit-criteria-cmd-SED3RVYR.js} +16 -16
- package/dist/{emit-demo-cmd-HJCW3JEA.js → emit-demo-cmd-VBHIORA3.js} +20 -20
- package/dist/{emit-finding-cmd-Q4SN3OA7.js → emit-finding-cmd-NQRNWPFW.js} +16 -16
- package/dist/{emit-result-cmd-7VEMDT2P.js → emit-result-cmd-CA3FQUGR.js} +18 -18
- package/dist/{emit-step-cmd-DYQM5OQA.js → emit-step-cmd-EZQD56H5.js} +16 -16
- package/dist/{exec-client-6WGSNY56.js → exec-client-JEOB57LW.js} +8 -8
- package/dist/{find-unit-6BX4K4WV.js → find-unit-HJRHPB3Y.js} +13 -13
- package/dist/{findings-cmd-WHQBJZNA.js → findings-cmd-4HKGMYM7.js} +16 -16
- package/dist/{fleet-readiness-A67D5OP4.js → fleet-readiness-SPPQPJZI.js} +14 -14
- package/dist/{governing-source-C4BMFNFZ.js → governing-source-URY2L5EI.js} +21 -21
- package/dist/{guest-init-ZWEJGXQS.js → guest-init-KXWFAIS5.js} +9 -9
- package/dist/{hook-fast-SZ5L3ZJK.js → hook-fast-3EMC5BR5.js} +1 -1
- package/dist/{hook-install-63GJ3OUI.js → hook-install-2S7NZOBO.js} +4 -4
- package/dist/host-checks-527RRKUD.js +82 -0
- package/dist/host-key-JGKWDEN7.js +18 -0
- package/dist/{image-tag-6HQDPX45.js → image-tag-DJ2DYY75.js} +8 -8
- package/dist/index.js +4 -4
- package/dist/{init-KOG5S5KX.js → init-6KSNBYRM.js} +47 -47
- package/dist/init-ILAIAVL7.js +82 -0
- package/dist/{init-agent-XIDQULDZ.js → init-agent-D7K7PKUI.js} +47 -47
- package/dist/init-cmd-ZEM335MG.js +53 -0
- package/dist/{init-update-7SBDG65Z.js → init-update-2PHTQUR6.js} +24 -24
- package/dist/install-cmd-2SO5XQMZ.js +26 -0
- package/dist/launch-agent-ZCE2MKWW.js +26 -0
- package/dist/{layout-2MIQCJ3U.js → layout-4GFI5FUZ.js} +4 -4
- package/dist/{login-browser-ZYWUIEOQ.js → login-browser-G3NBTYT6.js} +2 -2
- package/dist/{logs-SP6RPVCP.js → logs-IGY3Z45I.js} +7 -7
- package/dist/loop-OY7YZMHJ.js +92 -0
- package/dist/machine-HJUWRAJ4.js +82 -0
- package/dist/{machine-skills-UYWZXOZI.js → machine-skills-FJPUFZ7N.js} +4 -4
- package/dist/{mcp-install-cmd-U2SEWH66.js → mcp-install-cmd-DWN6GODI.js} +4 -4
- package/dist/{mcp-serve-cmd-VAQL3CJB.js → mcp-serve-cmd-3ACPN3DK.js} +9 -9
- package/dist/{paths-G7LFPGQQ.js → paths-KPYCKVEO.js} +7 -7
- package/dist/pending-LR3J3B32.js +18 -0
- package/dist/{pidfile-FIVR2HKB.js → pidfile-2TYTTJAD.js} +8 -8
- package/dist/{record-K3I7V46A.js → record-SXQN3F2G.js} +8 -8
- package/dist/{relay-AQBBQJ5I.js → relay-XUWU6YJA.js} +5 -5
- package/dist/{relay-protocol-XZ7WESQL.js → relay-protocol-2ELEUOSS.js} +5 -5
- package/dist/{run-cmd-BRUSQKEA.js → run-cmd-ZC6H5JMT.js} +16 -16
- package/dist/{runner-agents-KF6EECFW.js → runner-agents-RKBGYF6D.js} +4 -4
- package/dist/runner-env-7AZQ443N.js +24 -0
- package/dist/{runner-identity-JM3ZQ2PJ.js → runner-identity-IA53MENM.js} +10 -10
- package/dist/{runner-key-P6FUFO6Y.js → runner-key-DQG25VKO.js} +47 -47
- package/dist/{session-sender-N3U3ZTL3.js → session-sender-HUD6KDQS.js} +19 -19
- package/dist/{setup-cmd-F7Y4SFTK.js → setup-cmd-6BBZWFJX.js} +14 -14
- package/dist/{setup-wiring-LU6AY2QA.js → setup-wiring-M3NSQHVV.js} +54 -54
- package/dist/{spec-cmd-ZNXNMAYA.js → spec-cmd-VKL4K2QQ.js} +17 -17
- package/dist/{starter-pack-NEQLRMTX.js → starter-pack-ETRBBABF.js} +5 -5
- package/dist/state-5QGIGKBB.js +18 -0
- package/dist/{status-N326EK5I.js → status-HSUAGN6D.js} +47 -47
- package/dist/{sync-cmd-KG7YQGM6.js → sync-cmd-EPN6VJ4R.js} +18 -18
- package/dist/update-steps-CF2EKH43.js +83 -0
- package/dist/{watch-3VJ363V2.js → watch-YSSMGF7F.js} +18 -18
- package/dist/{work-claim-cmd-MXWB5NG6.js → work-claim-cmd-TV4TJNBE.js} +23 -23
- package/dist/{work-cmd-X55AAJG2.js → work-cmd-VWXZLMF4.js} +16 -16
- package/dist/{work-comment-cmd-7AL5KEVJ.js → work-comment-cmd-A6OMDNWD.js} +18 -18
- package/dist/{work-demo-cmd-6UFGGEMI.js → work-demo-cmd-RO2MNERR.js} +16 -16
- package/dist/{work-logs-cmd-DCAV3J7A.js → work-logs-cmd-FNVY6PFY.js} +16 -16
- package/dist/{work-mock-cmd-O7KFTS65.js → work-mock-cmd-AC2Z3W7V.js} +16 -16
- package/dist/{work-needs-attention-cmd-OD5PTHLX.js → work-needs-attention-cmd-2IEXGHHV.js} +16 -16
- package/dist/{work-no-change-cmd-ABYXIOZT.js → work-no-change-cmd-VN5YDUZZ.js} +16 -16
- package/dist/{work-open-pr-cmd-WRFHZXVM.js → work-open-pr-cmd-GX3AEJMQ.js} +17 -17
- package/dist/{work-pr-cmd-VEH4HP7P.js → work-pr-cmd-PU7YFJDD.js} +16 -16
- package/dist/{work-proofs-cmd-TKA3J2II.js → work-proofs-cmd-SM2GQTEF.js} +18 -18
- package/dist/{work-proofs-record-WTBSJLET.js → work-proofs-record-RTWRGKIG.js} +24 -24
- package/dist/{work-stop-cmd-WF7R6ILK.js → work-stop-cmd-4PKBXINK.js} +16 -16
- package/package.json +1 -1
- package/skill-pack/maintained/outerlayer-review/SKILL.md +4 -1
- package/skill-pack/shipped.json +3 -0
- package/skill-pack/template/review/SKILL.md +14 -0
- package/dist/agent-setup-UU3NQZ3A.js +0 -41
- package/dist/caller-VJBDXZXG.js +0 -23
- package/dist/host-checks-SYD7WFUN.js +0 -82
- package/dist/host-key-AYXCAME4.js +0 -18
- package/dist/init-ULMPF7MK.js +0 -82
- package/dist/init-cmd-P7FYHTLS.js +0 -53
- package/dist/install-cmd-TWYZTNRV.js +0 -26
- package/dist/launch-agent-5MCXT6QN.js +0 -26
- package/dist/loop-OU2U7SUJ.js +0 -92
- package/dist/machine-NE34TJIO.js +0 -82
- package/dist/pending-OEAYMKZO.js +0 -18
- package/dist/runner-env-XAO7EBCK.js +0 -24
- package/dist/state-VXN7EX2K.js +0 -18
- package/dist/update-steps-YQQXESUZ.js +0 -83
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RUNNER_PROTOCOL } from './chunk-
|
|
4
|
-
import { MAX_TEST_FILE_BYTES, itemsSentence, criteriaOf, hostItemsOf, loadCitationFinder, testFileMatcher, planCriteria, wholeItems, judgeGroups, failedItems, inCriteriaOrder, testsByCriterion, oneLineReason, criterionInputs, parseJudgeAnswer, judgedItems } from './chunk-
|
|
3
|
+
import { RUNNER_PROTOCOL } from './chunk-HHOFP647.js';
|
|
4
|
+
import { MAX_TEST_FILE_BYTES, itemsSentence, criteriaOf, hostItemsOf, loadCitationFinder, testFileMatcher, planCriteria, wholeItems, judgeGroups, failedItems, inCriteriaOrder, testsByCriterion, oneLineReason, criterionInputs, parseJudgeAnswer, judgedItems } from './chunk-FBFYIEHC.js';
|
|
5
5
|
import { zodProblem } from './chunk-I3LTIAOR.js';
|
|
6
6
|
import { sha256OfFile, downloadPinned, VoiceDownloadError } from './chunk-2PGI6RDE.js';
|
|
7
|
-
import { hasStoredCredential, storedCredentialVariables, storeAgentCredential, isAgentName, credentialFromStdin } from './chunk-
|
|
8
|
-
import { upgradedStarterText } from './chunk-
|
|
9
|
-
import { HELPER_PATH, HELPER_RECORD, DOCKERD_LOG } from './chunk-
|
|
10
|
-
import { writeDockerClientConfig } from './chunk-
|
|
11
|
-
import { senderPidfile } from './chunk-
|
|
12
|
-
import { installScrubContext } from './chunk-
|
|
7
|
+
import { hasStoredCredential, storedCredentialVariables, storeAgentCredential, isAgentName, credentialFromStdin } from './chunk-H7BNWYIA.js';
|
|
8
|
+
import { upgradedStarterText } from './chunk-KPCGSGZS.js';
|
|
9
|
+
import { HELPER_PATH, HELPER_RECORD, DOCKERD_LOG } from './chunk-DMW22UQE.js';
|
|
10
|
+
import { writeDockerClientConfig } from './chunk-HQEPFG5U.js';
|
|
11
|
+
import { senderPidfile } from './chunk-T4SVE4O4.js';
|
|
12
|
+
import { installScrubContext } from './chunk-FUNAQRMN.js';
|
|
13
13
|
import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk-B4XB5QFD.js';
|
|
14
|
-
import { runnerImageVersion } from './chunk-
|
|
15
|
-
import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey, configForJob } from './chunk-
|
|
14
|
+
import { runnerImageVersion } from './chunk-SS3SQYDS.js';
|
|
15
|
+
import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey, configForJob } from './chunk-JMQDGBAF.js';
|
|
16
16
|
import { receiveFiles } from './chunk-NN33FYXG.js';
|
|
17
|
-
import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, readRepositoryRecipe, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-
|
|
18
|
-
import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-
|
|
17
|
+
import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, readRepositoryRecipe, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-PKYJMXRB.js';
|
|
18
|
+
import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-ATK2MNGU.js';
|
|
19
19
|
import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
|
|
20
20
|
import { currentCliBuild } from './chunk-OGFGZQA3.js';
|
|
21
|
-
import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-
|
|
22
|
-
import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-
|
|
23
|
-
import { describeCallFailure, shortClaim, retrySend, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, formatClock, stageGovernedContext, keptContextTree, removeStagedContext, WORKFLOW_PERMISSION_REASON, refusalCode, SELF_GOVERNED, resolveGoverningSource, prefetchGovernedContext, controlPlaneTokenFailure, keepStagedContext, pinnedSourceOf, shimScript } from './chunk-
|
|
24
|
-
import { postJson,
|
|
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, JUDGE_MAX_TURNS, identityScript, identityArgs, parseIdentity, mountableHome, homeCopyScript, homeCopyArgs, COMMAND_DIR, identityRunArgs, judgeProgramRecord, SAVED_STATE_LABEL } from './chunk-
|
|
28
|
-
import { universalImagePending, writeSanitizedRecipe, classifyProperties, RecipeError, DOCKER_FEATURE } from './chunk-
|
|
29
|
-
import { sanitizeTerminal, planArtifactUpload } from './chunk-
|
|
30
|
-
import { sharedSkillNames, skillConflictMessage } from './chunk-
|
|
21
|
+
import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-IHMGZWOB.js';
|
|
22
|
+
import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-XVTDFLRQ.js';
|
|
23
|
+
import { describeCallFailure, shortClaim, retrySend, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, formatClock, stageGovernedContext, keptContextTree, removeStagedContext, WORKFLOW_PERMISSION_REASON, refusalCode, SELF_GOVERNED, resolveGoverningSource, prefetchGovernedContext, controlPlaneTokenFailure, keepStagedContext, pinnedSourceOf, shimScript } from './chunk-PVDIDOKH.js';
|
|
24
|
+
import { postJson, WorkCommandError, getJson, isSignatureRefusal } from './chunk-KZEZBZ4W.js';
|
|
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-MAWSNLSZ.js';
|
|
26
|
+
import { formatBytes, volumeBytes, allocatedBytes, DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, freeBytes } from './chunk-YAB2SVSI.js';
|
|
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, JUDGE_MAX_TURNS, identityScript, identityArgs, parseIdentity, mountableHome, homeCopyScript, homeCopyArgs, COMMAND_DIR, identityRunArgs, judgeProgramRecord, SAVED_STATE_LABEL } from './chunk-G2KLJMPR.js';
|
|
28
|
+
import { universalImagePending, writeSanitizedRecipe, classifyProperties, RecipeError, DOCKER_FEATURE } from './chunk-H37HSQGH.js';
|
|
29
|
+
import { sanitizeTerminal, planArtifactUpload } from './chunk-QMC2MM2S.js';
|
|
30
|
+
import { sharedSkillNames, skillConflictMessage } from './chunk-ZHXBFXG2.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, readBundleScript, applyTrust, proxyEnvironment, describeSandboxError, dropBuildAuthority, sandboxSettingsFrom, createSandboxClient, hostKeyOf, buildAuthorityFor, checkEnvironment, withMiseVariables, primaryOf, variablesFor, carried6to4, classifyAddress, EVAL_INPUT_DIR, isMiseVariableAllowed,
|
|
35
|
-
import { agentCredential, managedAgentCredential, RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, RELAY_USER, builtInNames, currentAgentCredential, removedAgentCredentialValues, realFdStorePort, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath, AGENT_CREDENTIAL_MISSING, fdName, RELAY_ID, DOCKER_DESKTOP_REASON } from './chunk-
|
|
32
|
+
import { signerFor } from './chunk-QMOE5Y4X.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-WHIAOWEN.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, 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-PC6BJDBE.js';
|
|
35
|
+
import { agentCredential, managedAgentCredential, RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, RELAY_USER, builtInNames, currentAgentCredential, removedAgentCredentialValues, realFdStorePort, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath, AGENT_CREDENTIAL_MISSING, fdName, RELAY_ID, DOCKER_DESKTOP_REASON } from './chunk-BIXO533I.js';
|
|
36
36
|
import { versionAtLeast } from './chunk-F3J4UKBF.js';
|
|
37
|
-
import { jobAgent, firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, builderDiskPinned, guestAssetsPinned, runnerAgentNamed, credentialForms, orList, credentialShapes, agentCommands, defaultCommandLine, credentialAgent, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, BUILDER_DISK_VERSION, credentialHandOffKey, strippedVariables, runnerAgents, judgeAgent, networkHelperPinned, NETWORK_HELPER_SHA256, universalImagePinned, UNIVERSAL_IMAGE, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, GH_VERSION, TINI_SHA256, TINI_VERSION, HEADLESS_SHELL, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_FFMPEG_BASE_URL, VOICE_PACK_FILES, BUILDER_DISK_SHA256, BUILDER_DISK_BASE_URL, DEFAULT_BASE_IMAGE, agentVersionOf } from './chunk-
|
|
38
|
-
import { sessionFolderIn, legacyAgent, defaultAgents, parsePolicy, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, orderSessions, extractFacts, sessionsToTimeline, resolvePackRoot } from './chunk-
|
|
37
|
+
import { jobAgent, firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, builderDiskPinned, guestAssetsPinned, runnerAgentNamed, credentialForms, orList, credentialShapes, agentCommands, defaultCommandLine, credentialAgent, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, BUILDER_DISK_VERSION, credentialHandOffKey, strippedVariables, runnerAgents, judgeAgent, networkHelperPinned, NETWORK_HELPER_SHA256, universalImagePinned, UNIVERSAL_IMAGE, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, GH_VERSION, TINI_SHA256, TINI_VERSION, HEADLESS_SHELL, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_FFMPEG_BASE_URL, VOICE_PACK_FILES, BUILDER_DISK_SHA256, BUILDER_DISK_BASE_URL, DEFAULT_BASE_IMAGE, agentVersionOf } from './chunk-52CTFVXD.js';
|
|
38
|
+
import { sessionFolderIn, legacyAgent, defaultAgents, parsePolicy, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, orderSessions, extractFacts, sessionsToTimeline, resolvePackRoot } from './chunk-FYL2RFHI.js';
|
|
39
39
|
import { MAINTAINED_SKILLS } from './chunk-VSBG7MMU.js';
|
|
40
40
|
import { resolveVersion } from './chunk-RA3O54FC.js';
|
|
41
41
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
42
|
-
import { scrubText, MIN_SCRUBBED_LITERAL, setCustomScrubbers, setLocalIdentity, setRepoRoot, forkFor, scrubDeep } from './chunk-
|
|
43
|
-
import { CheckItemsSchema, CODE_REVIEW_NAME, CRITERIA_JUDGE_NAME, JUDGE_NOT_RUN_ITEM_ID, CHECK_ITEM_REASON_MAX_LENGTH, CHECK_ITEM_HREF_MAX_LENGTH, downconvertSession } from './chunk-
|
|
42
|
+
import { scrubText, MIN_SCRUBBED_LITERAL, setCustomScrubbers, setLocalIdentity, setRepoRoot, forkFor, scrubDeep } from './chunk-WAI7EGGE.js';
|
|
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-6IGOHB3O.js';
|
|
44
44
|
import { randomUUID, randomBytes, createHash } from 'crypto';
|
|
45
45
|
import { rmSync, mkdirSync, existsSync, readFileSync, mkdtempSync, statSync, appendFileSync, writeFileSync, readdirSync, accessSync, constants, openSync, closeSync, lstatSync, chmodSync, renameSync, rmdirSync, createReadStream, unlinkSync, realpathSync, writeSync, truncateSync, cpSync, copyFileSync, fstatSync, readSync, createWriteStream, linkSync } from 'fs';
|
|
46
46
|
import { join, dirname, isAbsolute, delimiter, basename, sep, relative, resolve } from 'path';
|
|
@@ -1413,6 +1413,7 @@ function createMicroVmPorts(over = {}) {
|
|
|
1413
1413
|
var ATTEMPTS = 3;
|
|
1414
1414
|
var RETRY_MS = 1e3;
|
|
1415
1415
|
var READ_TIMEOUT_MS = 1e4;
|
|
1416
|
+
var SAVE_TIMEOUT_MS = 15e4;
|
|
1416
1417
|
function sandboxErrorOf(err, nowMs) {
|
|
1417
1418
|
return new SandboxError(err.message, err.status ?? 0, err.code, err.reason, retryAfterMsOf(err.retryAfter ?? null, nowMs));
|
|
1418
1419
|
}
|
|
@@ -1533,6 +1534,18 @@ function createGatewaySandboxClient(opts) {
|
|
|
1533
1534
|
},
|
|
1534
1535
|
async restartTimeLimit() {
|
|
1535
1536
|
},
|
|
1537
|
+
async saveState(id, key) {
|
|
1538
|
+
const creds = opts.creds(factoryOfSandbox(id));
|
|
1539
|
+
const signer = await signerFor(creds.configPath);
|
|
1540
|
+
let data;
|
|
1541
|
+
try {
|
|
1542
|
+
data = (await postJson(creds.url, `${own(id)}/states`, creds.apiKey, creds.appId, { key }, fetchImpl, SAVE_TIMEOUT_MS, signer)).data;
|
|
1543
|
+
} catch (err) {
|
|
1544
|
+
throw err instanceof WorkCommandError ? sandboxErrorOf(err, Date.now()) : err;
|
|
1545
|
+
}
|
|
1546
|
+
if (typeof data.id !== "string" || typeof data.createdAt !== "string" || !Number.isFinite(Date.parse(data.createdAt))) throw new SandboxError("the gateway's answer names no saved state", 0);
|
|
1547
|
+
return { id: data.id, createdAt: data.createdAt };
|
|
1548
|
+
},
|
|
1536
1549
|
...dataPlaneOf(sandboxCallOf(fetchImpl), (sandbox) => {
|
|
1537
1550
|
const header = headers.get(sandbox.dataPlaneUrl);
|
|
1538
1551
|
if (header === void 0) throw new SandboxError("the gateway named no secret header for this sandbox", 0);
|
|
@@ -3244,6 +3257,7 @@ async function runBuildSteps(input) {
|
|
|
3244
3257
|
log.line(`${tag} this build saves no state: ${notAtHead}`);
|
|
3245
3258
|
} else {
|
|
3246
3259
|
const saved = await setup.saveState();
|
|
3260
|
+
if ("handedOver" in saved) return { ok: false, reason: "", handedOver: true };
|
|
3247
3261
|
if (saved.ok) savedState = true;
|
|
3248
3262
|
else log.line(`${tag} the build's state could not be saved: ${saved.reason}`);
|
|
3249
3263
|
}
|
|
@@ -3808,6 +3822,29 @@ function readRecords(dir) {
|
|
|
3808
3822
|
function deleteRecord(dir, id) {
|
|
3809
3823
|
rmSync(join(dir, `${id}.json`), { force: true });
|
|
3810
3824
|
}
|
|
3825
|
+
var FAILED_SAVES_FILE = "failed-saves";
|
|
3826
|
+
var FAILED_SAVE_PAUSE_MS = 216e5;
|
|
3827
|
+
function readFailedSaves(dir) {
|
|
3828
|
+
try {
|
|
3829
|
+
const parsed = JSON.parse(readFileSync(join(dir, FAILED_SAVES_FILE), "utf8"));
|
|
3830
|
+
const entries = Object.entries(Array.isArray(parsed) ? {} : parsed);
|
|
3831
|
+
return Object.fromEntries(entries.filter((entry) => typeof entry[1] === "string"));
|
|
3832
|
+
} catch {
|
|
3833
|
+
return {};
|
|
3834
|
+
}
|
|
3835
|
+
}
|
|
3836
|
+
function noteFailedSave(dir, key, at) {
|
|
3837
|
+
const kept = Object.entries(readFailedSaves(dir)).filter(([, when]) => at.getTime() - Date.parse(when) < FAILED_SAVE_PAUSE_MS);
|
|
3838
|
+
mkdirSync(dir, { recursive: true, mode: RUNNER_DIR_MODE });
|
|
3839
|
+
const target2 = join(dir, FAILED_SAVES_FILE);
|
|
3840
|
+
writeFileSync(`${target2}.partial`, `${JSON.stringify(Object.fromEntries([...kept, [key, at.toISOString()]]), null, 2)}
|
|
3841
|
+
`, { mode: RUNNER_FILE_MODE });
|
|
3842
|
+
renameSync(`${target2}.partial`, target2);
|
|
3843
|
+
}
|
|
3844
|
+
function recentFailedSaveMs(dir, key, nowMs) {
|
|
3845
|
+
const age = nowMs - Date.parse(readFailedSaves(dir)[key] ?? "");
|
|
3846
|
+
return age >= 0 && age < FAILED_SAVE_PAUSE_MS ? age : void 0;
|
|
3847
|
+
}
|
|
3811
3848
|
|
|
3812
3849
|
// src/runner/saved-state/container.ts
|
|
3813
3850
|
var SAVED_FOLDERS = ["home", "work"];
|
|
@@ -4123,15 +4160,25 @@ async function discardItemDisk(kept, removeVolume, onError, endSandbox) {
|
|
|
4123
4160
|
|
|
4124
4161
|
// src/runner/saved-state/provision.ts
|
|
4125
4162
|
var isRetryFresh = (value) => typeof value === "object" && value !== null && value.retryFresh === true;
|
|
4163
|
+
var isHandedOver = (value) => typeof value === "object" && value !== null && value.handedOver === true;
|
|
4164
|
+
var LATER_ATTEMPT_REASON = "only the first attempt of a job may save a state";
|
|
4126
4165
|
async function provisionWithFreshFallback(input) {
|
|
4166
|
+
const later = (allowRestore, itemDiskFailed) => input.attempt(allowRestore, itemDiskFailed, LATER_ATTEMPT_REASON);
|
|
4127
4167
|
const first = await input.attempt(true);
|
|
4168
|
+
if (isHandedOver(first)) {
|
|
4169
|
+
input.log(first.reason);
|
|
4170
|
+
const second2 = await later(first.saved);
|
|
4171
|
+
if (!isRetryFresh(second2)) return second2;
|
|
4172
|
+
input.log(`${second2.reason}; provisioning the build again from a fresh disk`);
|
|
4173
|
+
return await later(false);
|
|
4174
|
+
}
|
|
4128
4175
|
if (!isRetryFresh(first)) return first;
|
|
4129
4176
|
input.log(`${first.reason}; provisioning the build again from a fresh disk`);
|
|
4130
|
-
if (first.itemDisk === void 0) return await
|
|
4131
|
-
const second = await
|
|
4177
|
+
if (first.itemDisk === void 0) return await later(false);
|
|
4178
|
+
const second = await later(true, first.itemDisk);
|
|
4132
4179
|
if (!isRetryFresh(second)) return second;
|
|
4133
4180
|
input.log(`${second.reason}; provisioning the build again from a fresh disk`);
|
|
4134
|
-
return await
|
|
4181
|
+
return await later(false, first.itemDisk);
|
|
4135
4182
|
}
|
|
4136
4183
|
function keptDiskPlan() {
|
|
4137
4184
|
return { keyCommits: {}, noSave: "it starts from the work item's kept disk" };
|
|
@@ -4162,8 +4209,8 @@ function setupInputFor(input) {
|
|
|
4162
4209
|
...input.fromItemDisk === true ? { fromItemDisk: true } : {},
|
|
4163
4210
|
keyCommits: input.plan.keyCommits,
|
|
4164
4211
|
...input.withoutBuildVariables === true ? { withoutBuildVariables: true } : {},
|
|
4165
|
-
// A plan
|
|
4166
|
-
...input.plan.key === void 0 ? {} : { saveState: input.saveState }
|
|
4212
|
+
// A plan with a key may save a state, unless it names why not. A build that starts from one is not asked to save.
|
|
4213
|
+
...input.plan.key === void 0 || input.plan.noSave !== void 0 ? {} : { saveState: input.saveState }
|
|
4167
4214
|
};
|
|
4168
4215
|
}
|
|
4169
4216
|
async function saveAndPrune(input) {
|
|
@@ -4768,22 +4815,81 @@ function joinRelay(runtime, sandbox, build, services, joinSecret, log) {
|
|
|
4768
4815
|
);
|
|
4769
4816
|
}
|
|
4770
4817
|
var SANDBOX_RUN_DIR = "/tmp/ol-run";
|
|
4771
|
-
async function
|
|
4772
|
-
const sandbox = await sandboxOfBuild(runtime, state);
|
|
4773
|
-
if (sandbox === void 0) throw new Error(`sandbox ${state.sandboxId} is gone`);
|
|
4818
|
+
async function clearSandbox(runtime, sandbox, build) {
|
|
4774
4819
|
const { host } = runtimeInSandbox(runtime, sandbox);
|
|
4775
|
-
const removed = await host.remove(
|
|
4776
|
-
if (removed.status !== 0 && !/no such container/i.test(removed.stderr)) throw new Error(`container ${
|
|
4820
|
+
const removed = await host.remove(build.container);
|
|
4821
|
+
if (removed.status !== 0 && !/no such container/i.test(removed.stderr)) throw new Error(`container ${build.container} was not removed${said(removed.stderr)}`);
|
|
4777
4822
|
const siblings = await client(runtime).command(sandbox, removeBuildContainersLine());
|
|
4778
4823
|
if (siblings.exitCode !== 0) throw new Error(`the containers the build started were not removed (exit ${siblings.exitCode ?? "none"})${said(siblings.stderr)}`);
|
|
4779
|
-
const emptied = await host.run(clearOneBuildArgs({ image:
|
|
4824
|
+
const emptied = await host.run(clearOneBuildArgs({ image: build.imageId, volume: build.volume, runnerId: build.runnerId }));
|
|
4780
4825
|
if (emptied.status !== 0) throw new Error(`the build's command state was not removed from the volume (exit ${emptied.status})${said(emptied.stderr)}`);
|
|
4781
4826
|
const unmounted = await client(runtime).command(sandbox, `if mountpoint -q ${HOST_BUILD_DIR}; then sudo umount ${HOST_BUILD_DIR}; fi`);
|
|
4782
4827
|
if (unmounted.exitCode !== 0) throw new Error(`${HOST_BUILD_DIR} was not unmounted in the sandbox (exit ${unmounted.exitCode ?? "none"})${said(unmounted.stderr)}`);
|
|
4783
4828
|
const cleared = await client(runtime).command(sandbox, `sudo rm -rf ${SANDBOX_DIR} ${OLD_SANDBOX_DIR} ${SANDBOX_RUN_DIR}`);
|
|
4784
4829
|
if (cleared.exitCode !== 0) throw new Error(`the runner's files were not removed from the sandbox (exit ${cleared.exitCode ?? "none"})${said(cleared.stderr)}`);
|
|
4830
|
+
}
|
|
4831
|
+
async function keepSandboxDisk(runtime, state, kept) {
|
|
4832
|
+
const sandbox = await sandboxOfBuild(runtime, state);
|
|
4833
|
+
if (sandbox === void 0) throw new Error(`sandbox ${state.sandboxId} is gone`);
|
|
4834
|
+
await clearSandbox(runtime, sandbox, kept);
|
|
4785
4835
|
await kept.keep();
|
|
4786
4836
|
}
|
|
4837
|
+
function saveFailureReason(err) {
|
|
4838
|
+
if (!(err instanceof SandboxError)) return describeCallFailure(err);
|
|
4839
|
+
if (err.code === "sandbox_state_limit") return "the factory has as many saved states as it may (sandbox_state_limit)";
|
|
4840
|
+
if (err.status === 0) return `the gateway did not answer the save in ${SAVE_TIMEOUT_MS / 1e3} seconds: ${err.message}`;
|
|
4841
|
+
return `the gateway refused the save: ${describeSandboxError(err)}`;
|
|
4842
|
+
}
|
|
4843
|
+
function sandboxStateKey(runnerId, key) {
|
|
4844
|
+
return `${runnerId}/${key.baseKey}`;
|
|
4845
|
+
}
|
|
4846
|
+
async function saveSandboxState(input) {
|
|
4847
|
+
const { runtime, sandbox, key, dir } = input;
|
|
4848
|
+
if (input.aborted()) return void 0;
|
|
4849
|
+
const failed2 = (reason) => {
|
|
4850
|
+
noteFailedSave(dir, key.key, input.now());
|
|
4851
|
+
return { saved: false, reason };
|
|
4852
|
+
};
|
|
4853
|
+
await leaveRelay(runtime, input.buildId);
|
|
4854
|
+
try {
|
|
4855
|
+
await clearSandbox(runtime, sandbox, input.build);
|
|
4856
|
+
} catch (err) {
|
|
4857
|
+
return failed2(`the sandbox could not be cleared for the save: ${describeCallFailure(err)}`);
|
|
4858
|
+
}
|
|
4859
|
+
if (input.aborted()) return void 0;
|
|
4860
|
+
const sandboxClient = client(runtime);
|
|
4861
|
+
if (sandboxClient.saveState === void 0) return failed2("the sandbox provider saves no state");
|
|
4862
|
+
let state;
|
|
4863
|
+
try {
|
|
4864
|
+
state = await sandboxClient.saveState(sandbox.id, sandboxStateKey(input.build.runnerId, key));
|
|
4865
|
+
} catch (err) {
|
|
4866
|
+
return failed2(saveFailureReason(err));
|
|
4867
|
+
}
|
|
4868
|
+
if (input.aborted()) return void 0;
|
|
4869
|
+
const record = {
|
|
4870
|
+
id: state.id,
|
|
4871
|
+
kind: "sandbox",
|
|
4872
|
+
volume: input.build.volume,
|
|
4873
|
+
savedAt: state.createdAt,
|
|
4874
|
+
bytes: 0,
|
|
4875
|
+
baseKey: key.baseKey,
|
|
4876
|
+
key: key.key,
|
|
4877
|
+
fileHashes: key.fileHashes,
|
|
4878
|
+
// A record is written as JSON, which leaves out an id the probe did not give.
|
|
4879
|
+
agentUid: input.agentUid,
|
|
4880
|
+
complete: true
|
|
4881
|
+
};
|
|
4882
|
+
await saveAndPrune({
|
|
4883
|
+
save: async () => {
|
|
4884
|
+
writeRecord2(dir, record);
|
|
4885
|
+
return { ok: true, record };
|
|
4886
|
+
},
|
|
4887
|
+
dir,
|
|
4888
|
+
removeVolume: async () => void 0,
|
|
4889
|
+
log: input.log
|
|
4890
|
+
});
|
|
4891
|
+
return { saved: true, id: state.id };
|
|
4892
|
+
}
|
|
4787
4893
|
async function cleanupSandbox(runtime, state, keepDisk) {
|
|
4788
4894
|
const failures = [];
|
|
4789
4895
|
let kept = false;
|
|
@@ -4941,11 +5047,18 @@ function clockStep(probe, nowMs) {
|
|
|
4941
5047
|
async function provisionSandbox(input) {
|
|
4942
5048
|
const tag = itemTag({ item: input.item.number, organizationId: input.organizationId, claimId: input.claimId });
|
|
4943
5049
|
return provisionWithFreshFallback({
|
|
4944
|
-
attempt: (allowRestore, itemDiskFailed) => provisionSandboxOnce(input, allowRestore, itemDiskFailed),
|
|
5050
|
+
attempt: (allowRestore, itemDiskFailed, noSave) => provisionSandboxOnce(input, allowRestore, itemDiskFailed, noSave),
|
|
4945
5051
|
log: (line2) => input.log.line(`${tag} ${line2}`)
|
|
4946
5052
|
});
|
|
4947
5053
|
}
|
|
4948
|
-
|
|
5054
|
+
function holdBackSave(plan, noSave) {
|
|
5055
|
+
if (noSave === void 0 || plan.key === void 0 || plan.noSave !== void 0) return { plan };
|
|
5056
|
+
return { plan: { ...plan, noSave }, ...plan.restore === void 0 ? { line: `this build saves no state: ${noSave}` } : {} };
|
|
5057
|
+
}
|
|
5058
|
+
function failedSaveReason(ageMs) {
|
|
5059
|
+
return `a save of its key failed ${formatDuration(ageMs)} ago, and the runner asks for none for ${formatDuration(FAILED_SAVE_PAUSE_MS)} after a failed save`;
|
|
5060
|
+
}
|
|
5061
|
+
async function provisionSandboxOnce(input, allowRestore, itemDiskFailed, noSave) {
|
|
4949
5062
|
const { config, runtime, item, itemKey, jobDir, log, tokens } = input;
|
|
4950
5063
|
const tag = itemTag({ item: item.number, organizationId: input.organizationId, claimId: input.claimId });
|
|
4951
5064
|
const logPath = join(jobDir, "provision.log");
|
|
@@ -5011,6 +5124,11 @@ async function provisionSandboxOnce(input, allowRestore, itemDiskFailed) {
|
|
|
5011
5124
|
allowRestore,
|
|
5012
5125
|
log: tagged
|
|
5013
5126
|
});
|
|
5127
|
+
const statesDir = savedStatesDir(runnerDir(config.configPath));
|
|
5128
|
+
const failedAgo = plan.key === void 0 ? void 0 : recentFailedSaveMs(statesDir, plan.key.key, clockOf(input.now)().getTime());
|
|
5129
|
+
const heldBack = holdBackSave(plan, noSave ?? (failedAgo === void 0 ? void 0 : failedSaveReason(failedAgo)));
|
|
5130
|
+
plan = heldBack.plan;
|
|
5131
|
+
if (heldBack.line !== void 0) tagged(heldBack.line);
|
|
5014
5132
|
let fromState = plan.restore?.record;
|
|
5015
5133
|
const buildId = randomBytes(6).toString("hex");
|
|
5016
5134
|
const runnerId = runnerLabelValue(config.configPath);
|
|
@@ -5035,7 +5153,7 @@ async function provisionSandboxOnce(input, allowRestore, itemDiskFailed) {
|
|
|
5035
5153
|
};
|
|
5036
5154
|
const state = { sandboxId: "", name, dataPlaneUrl: "", buildId, diskKey, container: containerState };
|
|
5037
5155
|
const secrets = secretsOf(runtime, jobDir);
|
|
5038
|
-
const
|
|
5156
|
+
const envInput = {
|
|
5039
5157
|
config,
|
|
5040
5158
|
item: item.number,
|
|
5041
5159
|
...input.queue === "run" ? { run: true } : {},
|
|
@@ -5048,7 +5166,9 @@ async function provisionSandboxOnce(input, allowRestore, itemDiskFailed) {
|
|
|
5048
5166
|
containerEnv: apply.containerEnv,
|
|
5049
5167
|
builtIns: true,
|
|
5050
5168
|
factoryVariables: factoryVariablesOf(config, jobDir)
|
|
5051
|
-
}
|
|
5169
|
+
};
|
|
5170
|
+
const env = buildEnvironment(envInput);
|
|
5171
|
+
const stepEnv = managed ? buildEnvironment({ ...envInput, factoryVariables: [] }) : env;
|
|
5052
5172
|
if (env.skippedTokenVariables.length > 0) {
|
|
5053
5173
|
log.line(`${tag} not passing ${env.skippedTokenVariables.join(", ")} from runner.build.variables into the build: its repository token comes from the runner`);
|
|
5054
5174
|
}
|
|
@@ -5321,28 +5441,57 @@ async function provisionSandboxOnce(input, allowRestore, itemDiskFailed) {
|
|
|
5321
5441
|
joinRelay(runtime, sandbox, { buildId, container }, services.streams, joinSecret, (line2) => log.line(`${tag} ${line2}`));
|
|
5322
5442
|
if (input.aborted()) return bail("", true);
|
|
5323
5443
|
if (!await waitForRelay(sandboxed, container)) return end("the relay in the build's container did not start");
|
|
5324
|
-
const
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5444
|
+
const deliverGh = async (delivered) => {
|
|
5445
|
+
const ghDelivered = await deliverJobFiles(sandboxed, containerState, ["gh"], secrets);
|
|
5446
|
+
if (!ghDelivered.ok) return ghDelivered;
|
|
5447
|
+
keepGhConfigCurrent(tokens, buildDir2, (err) => log.error(`${tag} the read token could not be written for gh: ${describeCallFailure(err)}`), {
|
|
5448
|
+
runtime: sandboxed,
|
|
5449
|
+
state: containerState,
|
|
5450
|
+
secrets,
|
|
5451
|
+
delivered,
|
|
5452
|
+
onFailure: (reason) => log.error(`${tag} ${reason}`)
|
|
5453
|
+
});
|
|
5454
|
+
return { ok: true };
|
|
5455
|
+
};
|
|
5456
|
+
const deliverHeldGh = async () => deliverGh(await tokens.token("read").catch(() => void 0));
|
|
5457
|
+
if (!managed) {
|
|
5458
|
+
const ghDelivered = await deliverGh(readToken);
|
|
5459
|
+
if (!ghDelivered.ok) return end(ghDelivered.reason);
|
|
5460
|
+
}
|
|
5333
5461
|
const tools = await host.exec({ container, user: ADDED_USER, env: NO_ENV, argv: ["cat", "/opt/outerlayer/tools.json"] });
|
|
5334
5462
|
const agentVersion = agentVersionOf(tools.status === 0 ? tools.stdout : "", runtime.agents, input.job);
|
|
5335
5463
|
environment.agentVersion = agentVersion;
|
|
5336
5464
|
const judgeProgram = await judgeProgramRecord((argv) => host.exec({ container, user: ADDED_USER, env: NO_ENV, argv }), runtime.agents);
|
|
5337
5465
|
if (judgeProgram !== void 0) containerState.judgeProgram = judgeProgram;
|
|
5338
5466
|
input.save(state, environment);
|
|
5339
|
-
if (input.queue === "review")
|
|
5467
|
+
if (input.queue === "review") {
|
|
5468
|
+
const ghDelivered = managed ? await deliverHeldGh() : { ok: true };
|
|
5469
|
+
if (!ghDelivered.ok) return end(ghDelivered.reason);
|
|
5470
|
+
return { ok: true, workdir: CHECKOUT_DIR, state, environment };
|
|
5471
|
+
}
|
|
5340
5472
|
const stepExec = async (argv, workdir, opts) => {
|
|
5341
|
-
const ran = await host.exec({ container, user: agentUser, workdir, env: withMiseVariables(
|
|
5473
|
+
const ran = await host.exec({ container, user: agentUser, workdir, env: withMiseVariables(stepEnv, opts?.variables), argv }, { ...opts?.quiet === true ? {} : { logPath }, ...opts?.timeoutMs === void 0 ? {} : { timeoutMs: opts.timeoutMs } });
|
|
5342
5474
|
return endedAtLimit(ran) ? { ...ran, timedOut: true } : ran;
|
|
5343
5475
|
};
|
|
5344
5476
|
const setupMinutes = config.build?.setupMinutes ?? DEFAULT_SETUP_MINUTES;
|
|
5345
5477
|
let setupPassed = false;
|
|
5478
|
+
let saved;
|
|
5479
|
+
const saveState = async () => {
|
|
5480
|
+
const probe = await host.run(identityRunArgs({ ...runInput, user: ADDED_USER }, agentUser), { logPath });
|
|
5481
|
+
saved = await saveSandboxState({
|
|
5482
|
+
runtime,
|
|
5483
|
+
sandbox,
|
|
5484
|
+
buildId,
|
|
5485
|
+
build: { container, volume: volumeName, imageId: image, runnerId },
|
|
5486
|
+
key: plan.key,
|
|
5487
|
+
agentUid: probe.status === 0 ? parseIdentity(probe.stdout)?.uid ?? void 0 : void 0,
|
|
5488
|
+
dir: statesDir,
|
|
5489
|
+
now: clockOf(input.now),
|
|
5490
|
+
aborted: input.aborted,
|
|
5491
|
+
log: tagged
|
|
5492
|
+
});
|
|
5493
|
+
return { handedOver: true };
|
|
5494
|
+
};
|
|
5346
5495
|
const steps = await runBuildSteps({
|
|
5347
5496
|
repository,
|
|
5348
5497
|
branch: primary.branch,
|
|
@@ -5380,13 +5529,23 @@ async function provisionSandboxOnce(input, allowRestore, itemDiskFailed) {
|
|
|
5380
5529
|
...runtimeStepInput({ base: {} }, services),
|
|
5381
5530
|
// A kept disk or a saved state holds the checkouts already: each is switched to the branch. A kept disk keeps its
|
|
5382
5531
|
// untracked files. A saved state is not the work item's disk, so its untracked files go and its ignored ones stay.
|
|
5383
|
-
setup: setupInputFor({ setupMinutes, plan, saveState: void 0, fromItemDisk: keptDisk !== void 0 }),
|
|
5384
|
-
// From here on a failure is the build's own, not the saved state's.
|
|
5532
|
+
setup: setupInputFor({ setupMinutes, plan, saveState: managed ? saveState : void 0, withoutBuildVariables: managed, fromItemDisk: keptDisk !== void 0 }),
|
|
5533
|
+
// From here on a failure is the build's own, not the saved state's. The gh login is written only now.
|
|
5385
5534
|
afterSave: async () => {
|
|
5386
5535
|
setupPassed = true;
|
|
5387
|
-
return { ok: true };
|
|
5536
|
+
return managed ? deliverHeldGh() : { ok: true };
|
|
5388
5537
|
}
|
|
5389
5538
|
});
|
|
5539
|
+
if (!steps.ok && steps.handedOver === true) {
|
|
5540
|
+
if (input.aborted()) return bail("", true);
|
|
5541
|
+
const result = saved;
|
|
5542
|
+
try {
|
|
5543
|
+
await cleanupSandbox(runtime, { buildId, sandboxId: state.sandboxId, container: containerState });
|
|
5544
|
+
} catch (err) {
|
|
5545
|
+
log.error(`${tag} the sandbox could not be ended after the save: ${describeCallFailure(err)}`);
|
|
5546
|
+
}
|
|
5547
|
+
return result.saved ? { handedOver: true, saved: true, reason: `saved state ${result.id}; provisioning the build again from it` } : { handedOver: true, saved: false, reason: `no state was saved: ${result.reason}; provisioning the build again from the base snapshot` };
|
|
5548
|
+
}
|
|
5390
5549
|
if (!steps.ok) {
|
|
5391
5550
|
if (fromState !== void 0 && !setupPassed && steps.aborted !== true) return giveUpState(fromState, steps.reason);
|
|
5392
5551
|
return settleFailedSteps(steps, { giveUp: (reason) => giveUpItemDisk(reason, "checkout_not_switched"), bail });
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { mcpTargetPath, INIT_STDIO_ENTRY, INIT_DOCS_ENTRY, DOCS_MCP_SERVER_NAME } from './chunk-
|
|
4
|
-
import { POLICY_PATH, POLICY_CONTENT } from './chunk-
|
|
5
|
-
import { skillsBaseFor } from './chunk-
|
|
3
|
+
import { mcpTargetPath, INIT_STDIO_ENTRY, INIT_DOCS_ENTRY, DOCS_MCP_SERVER_NAME } from './chunk-K3IO22FH.js';
|
|
4
|
+
import { POLICY_PATH, POLICY_CONTENT } from './chunk-FRQLJUID.js';
|
|
5
|
+
import { skillsBaseFor } from './chunk-3TEE7JVW.js';
|
|
6
6
|
import { findGitDirs } from './chunk-BJ3KTMDH.js';
|
|
7
7
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
8
|
-
import { hasSymlinkComponent } from './chunk-
|
|
8
|
+
import { hasSymlinkComponent } from './chunk-SSVM6C5N.js';
|
|
9
9
|
import { cloneIsGoverned } from './chunk-YQR6E6OV.js';
|
|
10
|
-
import { resolvePackRoot, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, restoreSkillPaths, rewriteSkillPaths, skillDir, loadTemplateFiles, TEMPLATE_SKILLS } from './chunk-
|
|
10
|
+
import { resolvePackRoot, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, restoreSkillPaths, rewriteSkillPaths, skillDir, loadTemplateFiles, TEMPLATE_SKILLS } from './chunk-FYL2RFHI.js';
|
|
11
11
|
import { createHash } from 'crypto';
|
|
12
12
|
import { existsSync, readFileSync } from 'fs';
|
|
13
13
|
import { join } from 'path';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { detectActiveSession } from './chunk-
|
|
4
|
-
import { autoConnect } from './chunk-
|
|
5
|
-
import { workPageUrl } from './chunk-
|
|
6
|
-
import { sanitizeTerminal } from './chunk-
|
|
3
|
+
import { detectActiveSession } from './chunk-V65YF5VP.js';
|
|
4
|
+
import { autoConnect } from './chunk-QKMVEQXO.js';
|
|
5
|
+
import { workPageUrl } from './chunk-7CK4Z6VC.js';
|
|
6
|
+
import { sanitizeTerminal } from './chunk-QMC2MM2S.js';
|
|
7
7
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
8
|
-
import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-
|
|
9
|
-
import { signRunnerRequest } from './chunk-
|
|
8
|
+
import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-7QDRLTFW.js';
|
|
9
|
+
import { signRunnerRequest } from './chunk-QMOE5Y4X.js';
|
|
10
10
|
import { readRepoConnection } from './chunk-BJ3KTMDH.js';
|
|
11
11
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
12
12
|
import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-JIMISJV2.js';
|
|
13
13
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
14
|
-
import { resolveRepoIdentity } from './chunk-
|
|
14
|
+
import { resolveRepoIdentity } from './chunk-WAI7EGGE.js';
|
|
15
15
|
|
|
16
16
|
createRequire(import.meta.url);
|
|
17
17
|
|
|
@@ -556,7 +556,7 @@ async function runWorkLinkSession(opts) {
|
|
|
556
556
|
return await linkSession(opts);
|
|
557
557
|
} catch (err) {
|
|
558
558
|
if (opts.logFailures) {
|
|
559
|
-
const { logHookError } = await import('./hook-fast-
|
|
559
|
+
const { logHookError } = await import('./hook-fast-3EMC5BR5.js');
|
|
560
560
|
const reason = err instanceof Error ? err.message : String(err);
|
|
561
561
|
logHookError(opts.home ?? homeFromEnv(opts.env ?? process.env), new Error(`work link-session #${opts.number} failed: ${reason}`));
|
|
562
562
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { helperSocketPath } from './chunk-
|
|
4
|
-
import { UNIT_MARKER } from './chunk-
|
|
5
|
-
import { runnerDir } from './chunk-
|
|
3
|
+
import { helperSocketPath } from './chunk-K7RHVH7G.js';
|
|
4
|
+
import { UNIT_MARKER } from './chunk-XVE7HD6X.js';
|
|
5
|
+
import { runnerDir } from './chunk-WHIAOWEN.js';
|
|
6
6
|
import { createHash } from 'crypto';
|
|
7
7
|
import { join } from 'path';
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { stripTerminalControls } from './chunk-
|
|
4
|
-
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-
|
|
3
|
+
import { stripTerminalControls } from './chunk-K7RHVH7G.js';
|
|
4
|
+
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-SS3SQYDS.js';
|
|
5
5
|
import { readFileSync } from 'fs';
|
|
6
6
|
|
|
7
7
|
createRequire(import.meta.url);
|
|
@@ -55,7 +55,7 @@ function envNamesOf(row, imageEnv) {
|
|
|
55
55
|
return [...new Set(names)].sort();
|
|
56
56
|
}
|
|
57
57
|
async function readOwnContainer(deps = {}) {
|
|
58
|
-
const run = deps.run ?? (await import('./docker-
|
|
58
|
+
const run = deps.run ?? (await import('./docker-FEOTGBDS.js')).spawnRun;
|
|
59
59
|
const ids = candidateIds(deps.env ?? process.env, deps.readFile ?? ((path) => readFileSync(path, "utf8")));
|
|
60
60
|
if (ids.length === 0) return { ok: false, reason: "the runner cannot tell which container it runs in: HOSTNAME is empty and /proc/self/mountinfo names none" };
|
|
61
61
|
let problem = "";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-
|
|
4
|
-
import { parseSize } from './chunk-
|
|
5
|
-
import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-
|
|
6
|
-
import { builderDiskPinned } from './chunk-
|
|
3
|
+
import { DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-YAB2SVSI.js';
|
|
4
|
+
import { parseSize } from './chunk-G2KLJMPR.js';
|
|
5
|
+
import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-PC6BJDBE.js';
|
|
6
|
+
import { builderDiskPinned } from './chunk-52CTFVXD.js';
|
|
7
7
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
8
8
|
import { existsSync, statSync, accessSync, constants, readFileSync } from 'fs';
|
|
9
9
|
import { hostname } from 'os';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { launcherPath, pathNotes, writeLauncher, LauncherWriteError } from './chunk-
|
|
4
|
-
import { currentVersion, entryIn, currentLink, versionDir, execStartLine, isInLayout, packageRootIn, switchCurrent } from './chunk-
|
|
3
|
+
import { launcherPath, pathNotes, writeLauncher, LauncherWriteError } from './chunk-D3PPI7I4.js';
|
|
4
|
+
import { currentVersion, entryIn, currentLink, versionDir, execStartLine, isInLayout, packageRootIn, switchCurrent } from './chunk-TPLMLNME.js';
|
|
5
5
|
import { compareVersions } from './chunk-TQMI335S.js';
|
|
6
|
-
import { defaultRunnerConfigPath } from './chunk-
|
|
7
|
-
import { runnerDir, RUNNER_DIR_MODE } from './chunk-
|
|
6
|
+
import { defaultRunnerConfigPath } from './chunk-MAWSNLSZ.js';
|
|
7
|
+
import { runnerDir, RUNNER_DIR_MODE } from './chunk-WHIAOWEN.js';
|
|
8
8
|
import { lchownSync, lstatSync, realpathSync, readFileSync, mkdirSync, rmSync, cpSync, existsSync, readdirSync } from 'fs';
|
|
9
9
|
import { dirname, sep, join, resolve } from 'path';
|
|
10
10
|
import { spawnSync } from 'child_process';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { summarizeChecks, summaryText, renderDoctorText } from './chunk-
|
|
3
|
+
import { summarizeChecks, summaryText, renderDoctorText } from './chunk-3QNW4M64.js';
|
|
4
4
|
import { shellFunctionInstalled, removeShellFunction, installShellFunction, SHELL_FUNCTION_LINE } from './chunk-4KCWAP5L.js';
|
|
5
|
-
import { runConnect, hasUncommittedPolicy, commitCommandsFor } from './chunk-
|
|
5
|
+
import { runConnect, hasUncommittedPolicy, commitCommandsFor } from './chunk-7CK4Z6VC.js';
|
|
6
6
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
7
7
|
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
8
8
|
import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-JIMISJV2.js';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { launchRefusalForSession } from './chunk-C2PZOLN7.js';
|
|
4
|
-
import { detectActiveSession } from './chunk-
|
|
5
|
-
import { autoConnect } from './chunk-
|
|
6
|
-
import { acquireSpoolLockAt } from './chunk-
|
|
4
|
+
import { detectActiveSession } from './chunk-V65YF5VP.js';
|
|
5
|
+
import { autoConnect } from './chunk-QKMVEQXO.js';
|
|
6
|
+
import { acquireSpoolLockAt } from './chunk-QMC2MM2S.js';
|
|
7
7
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
8
|
-
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-
|
|
8
|
+
import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-7QDRLTFW.js';
|
|
9
9
|
import { launchedItemForSession } from './chunk-LGJ56FCM.js';
|
|
10
10
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
11
11
|
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
12
|
-
import { resolveRepoIdentity } from './chunk-
|
|
13
|
-
import { StepNameSchema, StepBodySchema } from './chunk-
|
|
12
|
+
import { resolveRepoIdentity } from './chunk-WAI7EGGE.js';
|
|
13
|
+
import { StepNameSchema, StepBodySchema } from './chunk-6IGOHB3O.js';
|
|
14
14
|
import { randomUUID } from 'crypto';
|
|
15
15
|
import { readFileSync, existsSync, mkdirSync, writeFileSync, renameSync, appendFileSync } from 'fs';
|
|
16
16
|
import { join, dirname } from 'path';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { builtInEnvironment, managedAgentCredential, agentCredential, builtInNames, TARGET_TUNNEL, TARGET_LEASE, destinationTarget, builtInDestinations, destinationPort } from './chunk-
|
|
4
|
-
import { strippedVariables } from './chunk-
|
|
5
|
-
import { defaultAgents } from './chunk-
|
|
3
|
+
import { builtInEnvironment, managedAgentCredential, agentCredential, builtInNames, TARGET_TUNNEL, TARGET_LEASE, destinationTarget, builtInDestinations, destinationPort } from './chunk-BIXO533I.js';
|
|
4
|
+
import { strippedVariables } from './chunk-52CTFVXD.js';
|
|
5
|
+
import { defaultAgents } from './chunk-FYL2RFHI.js';
|
|
6
6
|
import { PROVIDERS } from './chunk-JIMISJV2.js';
|
|
7
|
-
import { MIN_SCRUBBED_LITERAL } from './chunk-
|
|
7
|
+
import { MIN_SCRUBBED_LITERAL } from './chunk-WAI7EGGE.js';
|
|
8
8
|
import { mkdirSync, writeFileSync, existsSync, unlinkSync, chmodSync } from 'fs';
|
|
9
9
|
import { request as request$1, createServer } from 'http';
|
|
10
10
|
import { request } from 'https';
|
|
@@ -678,7 +678,7 @@ async function missingRenewalHookContext(home, cwd, codec) {
|
|
|
678
678
|
try {
|
|
679
679
|
const event = codec.events.find((name) => kindOf(codec, name) === "tool-used");
|
|
680
680
|
if (event === void 0) return void 0;
|
|
681
|
-
const { hookRegistered } = await import('./hook-install-
|
|
681
|
+
const { hookRegistered } = await import('./hook-install-2S7NZOBO.js');
|
|
682
682
|
const registered = hookRegistered(event, { home, cwd });
|
|
683
683
|
if (registered !== false) return void 0;
|
|
684
684
|
return `This install has no ${event} hook, so this session's work-item lease will never be renewed while it works and may be lost to another worker mid-session. Run \`${cliInvocation()} init\` to register it.`;
|
|
@@ -878,11 +878,11 @@ async function missingControlPlane(cwd, sessionId, home, env) {
|
|
|
878
878
|
const dirs = findGitDirs(cwd);
|
|
879
879
|
if (dirs === void 0) return void 0;
|
|
880
880
|
if (existsSync(join(dirs.gitCommonDir, "outerlayer", "materialized.json")) || hasExcludeBlock(dirs.gitCommonDir)) {
|
|
881
|
-
const { cleanupEarlierCopies } = await import('./context-cleanup-
|
|
881
|
+
const { cleanupEarlierCopies } = await import('./context-cleanup-REXSRAU6.js');
|
|
882
882
|
cleanupEarlierCopies(dirs);
|
|
883
883
|
}
|
|
884
884
|
if (!contextPossiblyGoverned(cwd, home)) return void 0;
|
|
885
|
-
const { governanceOf } = await import('./control-plane-launch-
|
|
885
|
+
const { governanceOf } = await import('./control-plane-launch-TARK67QP.js');
|
|
886
886
|
if (await governanceOf({ cwd, env, home }) !== "governed") return void 0;
|
|
887
887
|
recordMissingContext(dirs, sessionId, home);
|
|
888
888
|
const launcher = `${cliInvocation()} ${LEGACY.legacy.subcommand}`;
|