@outerlayer/cli 0.34.0-next.20261028183303 → 0.34.0-next.20261029100612
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 +7 -0
- package/dist/agent-setup-UPIHHKI2.js +32 -0
- package/dist/{artifact-link-cmd-CSVFEM5O.js → artifact-link-cmd-6LFCTDBD.js} +5 -5
- package/dist/{bridge-4GRZFXJU.js → bridge-XM4QLKIX.js} +2 -2
- package/dist/{build-SEJJWGTO.js → build-UBZNVGY2.js} +10 -10
- package/dist/{build-disk-EYRR3PBT.js → build-disk-Y3MMWFYE.js} +7 -7
- package/dist/build-info.json +1 -1
- package/dist/{builder-T7B46P7T.js → builder-SX4W5VF3.js} +6 -6
- package/dist/caller-IIA2TPAA.js +18 -0
- package/dist/{check-VKSOYRNI.js → check-PVB3GPFQ.js} +88 -70
- package/dist/{chunk-ANPNT6PM.js → chunk-2AM6Z5BP.js} +1 -1
- package/dist/{chunk-3UIXIGYT.js → chunk-2B6EKUBD.js} +4 -4
- package/dist/{chunk-QGDGGLSD.js → chunk-2F43WNKI.js} +3 -3
- package/dist/{chunk-UZEIBWTP.js → chunk-2OE4BZRF.js} +8 -8
- package/dist/{chunk-VNVZDWO3.js → chunk-352DHUTP.js} +4 -1
- package/dist/{chunk-W7E6IMEW.js → chunk-3EEJGQEJ.js} +22 -21
- package/dist/{chunk-5W2YSWIW.js → chunk-4PH4DVV4.js} +1 -1
- package/dist/{chunk-WH3FPBPO.js → chunk-4PWOZU7R.js} +82 -33
- package/dist/{chunk-ZJSNLVCE.js → chunk-545P7JY7.js} +1 -1
- package/dist/{chunk-RRXS4CWE.js → chunk-5C7QZBLI.js} +9 -7
- package/dist/{chunk-2EEW6FJN.js → chunk-5FWBAM6O.js} +1 -1
- package/dist/{chunk-T2Q7ISPE.js → chunk-5WYT3PPE.js} +1 -1
- package/dist/{chunk-ARL6X6Y4.js → chunk-62TMOXQN.js} +2 -2
- package/dist/{chunk-EA2PQRCU.js → chunk-7CIU64OH.js} +6 -6
- package/dist/{chunk-AF4E4I4T.js → chunk-7G35LX5D.js} +11 -11
- package/dist/{chunk-KH4774QT.js → chunk-7R655ODT.js} +1 -1
- package/dist/{chunk-G2JWZDFA.js → chunk-A2LHHKTT.js} +3 -3
- package/dist/{chunk-ESVW4MJY.js → chunk-AAGU5FJF.js} +1 -1
- package/dist/{chunk-QGEGLZSY.js → chunk-ADI2CCDX.js} +47 -7
- package/dist/{chunk-I2MFIT6X.js → chunk-AGMR4IQE.js} +29 -28
- package/dist/{chunk-SAAVZ2BX.js → chunk-AUVJMR3P.js} +1 -1
- package/dist/{chunk-HFOZTCTN.js → chunk-AVHPSB65.js} +7 -7
- package/dist/{chunk-KQDK4Q6A.js → chunk-CDVG2LXT.js} +10 -10
- package/dist/{chunk-TUSYOL2O.js → chunk-CJPTUU2E.js} +1 -1
- package/dist/{chunk-OYQVLQP3.js → chunk-EQ5Y2OMK.js} +16 -14
- package/dist/{chunk-MH6QLXUO.js → chunk-FJ7KTNMD.js} +1 -1
- package/dist/{chunk-KPEMNHVF.js → chunk-FNKCMOQY.js} +3 -3
- package/dist/{chunk-2O5KA67H.js → chunk-FUJUFLDC.js} +2 -2
- package/dist/{chunk-CRB3POP4.js → chunk-FZKNTIOJ.js} +1 -1
- package/dist/{chunk-YLPJOUVF.js → chunk-GANAOCHR.js} +6 -1
- package/dist/{chunk-3KGXXTMN.js → chunk-GBMTKV5B.js} +5 -5
- package/dist/{chunk-POND2SMT.js → chunk-H2GESWLW.js} +3 -3
- package/dist/{chunk-DCBFUUDL.js → chunk-HERRKKES.js} +7 -7
- package/dist/{chunk-V2S2WRGD.js → chunk-HS5QEIJT.js} +11 -11
- package/dist/{chunk-PJDQPF5N.js → chunk-HWVMRETT.js} +1 -1
- package/dist/{chunk-H7MGR2GN.js → chunk-IUPYSGCP.js} +6 -6
- package/dist/{chunk-7JSWRF5O.js → chunk-JFALOM5G.js} +10 -10
- package/dist/{chunk-XDAMLX2L.js → chunk-JQOET7TF.js} +9 -9
- package/dist/{chunk-RQ3GCCHH.js → chunk-JXXMOAJG.js} +2 -2
- package/dist/{chunk-URIZRCRY.js → chunk-KYDEBGJG.js} +1 -1
- package/dist/{chunk-GG5OE6MY.js → chunk-KZUHEN26.js} +2 -2
- package/dist/{chunk-2EHDLYSL.js → chunk-LFXLFDEA.js} +30 -22
- package/dist/chunk-LW2A24IA.js +31 -0
- package/dist/{chunk-BBJ6BM5U.js → chunk-MKSZHT6S.js} +1 -1
- package/dist/{chunk-VX7WZK7J.js → chunk-MOG4XCYS.js} +189 -121
- package/dist/{chunk-P2PNBDUT.js → chunk-NM3L4JBB.js} +4 -4
- package/dist/{chunk-TDCHUEKY.js → chunk-O7CGRDRQ.js} +5 -5
- package/dist/{chunk-KT4CN6OU.js → chunk-OHQMGLJP.js} +3 -3
- package/dist/{chunk-5BHIBJDA.js → chunk-OLM2TIOW.js} +1 -1
- package/dist/{chunk-VEVNGDTP.js → chunk-PDK35AR4.js} +2 -2
- package/dist/{chunk-RPST2GNG.js → chunk-PQ5YDDDE.js} +3 -3
- package/dist/{chunk-OKJXZXYH.js → chunk-PUSCE544.js} +6 -6
- package/dist/{chunk-ZEFNJCN3.js → chunk-QM3HMXMU.js} +2 -2
- package/dist/chunk-RW3YMQVQ.js +39 -0
- package/dist/{chunk-ZCZY3Q55.js → chunk-SHPCVBT3.js} +1 -1
- package/dist/{chunk-UXC3RQLF.js → chunk-SQGD4LYW.js} +1 -1
- package/dist/{chunk-LJEZGHCH.js → chunk-SYCZTZXD.js} +647 -211
- package/dist/{chunk-4YD7N6V3.js → chunk-TKTVKEES.js} +4 -4
- package/dist/{chunk-GH2HEEOH.js → chunk-TV2OQUWE.js} +1 -1
- package/dist/{chunk-MRLJK4GZ.js → chunk-UGPJIKN4.js} +6 -6
- package/dist/{chunk-HH3BQG65.js → chunk-UPRZREBO.js} +1 -1
- package/dist/{chunk-ROQPDCRU.js → chunk-UZGQT6OF.js} +1 -1
- package/dist/{chunk-NCOL5RYI.js → chunk-VNHBDHX7.js} +1 -1
- package/dist/{chunk-64O2NUVA.js → chunk-VO46IHB4.js} +8 -7
- package/dist/{chunk-MCPCOKHN.js → chunk-W74HQLLZ.js} +9 -9
- package/dist/{chunk-ZCA34T7R.js → chunk-WDDVPDLQ.js} +8 -8
- package/dist/{chunk-YF7W7B7Y.js → chunk-WDIZT56W.js} +38 -11
- package/dist/{chunk-CUAB7FAZ.js → chunk-WG3VIMD2.js} +8 -8
- package/dist/{chunk-IAVT7R6O.js → chunk-WJTIU2A5.js} +6 -6
- package/dist/{chunk-NXUZFHMX.js → chunk-WK4OTIAN.js} +3 -3
- package/dist/{chunk-T3XPLCJG.js → chunk-XBECMHJW.js} +1 -1
- package/dist/{chunk-54LIUIZL.js → chunk-XGSJNXH2.js} +4 -4
- package/dist/{chunk-5TXQFZHY.js → chunk-XU5BNWX7.js} +1 -1
- package/dist/{chunk-I7RZHMXW.js → chunk-YBAVN6WS.js} +3 -3
- package/dist/{chunk-ZTOJIRJH.js → chunk-YBP22LDO.js} +8 -8
- package/dist/{chunk-S6UM3N4R.js → chunk-YQHUCOUL.js} +37 -12
- package/dist/{chunk-IXRUVR25.js → chunk-YTTESG7K.js} +46 -7
- package/dist/{chunk-CKDSPW35.js → chunk-ZI2E4YMY.js} +6 -6
- package/dist/{chunk-MEIDQLXQ.js → chunk-ZI7JENTB.js} +1 -1
- package/dist/{claude-launcher-7IC6QWR5.js → claude-launcher-MMCKOBND.js} +6 -6
- package/dist/{cli-HBS2PXSS.js → cli-W4B35KDN.js} +165 -155
- package/dist/{cli-update-notice-4DLZ3655.js → cli-update-notice-T3CXRWNB.js} +3 -3
- package/dist/{command-XA6DOFL4.js → command-SKJHW4C4.js} +43 -42
- package/dist/{config-RSOCVUKC.js → config-ZDENMTEW.js} +9 -9
- package/dist/connect-cmd-APZN6F6N.js +27 -0
- package/dist/{container-start-PYW7W2N2.js → container-start-PAUJUXJX.js} +57 -56
- package/dist/{context-cleanup-CEZSKNVL.js → context-cleanup-PASDUBGW.js} +5 -5
- package/dist/{context-show-cmd-XWLTP6R4.js → context-show-cmd-OWREGUJL.js} +19 -19
- package/dist/{control-plane-launch-3MBWPYWZ.js → control-plane-launch-FV5Q6GVJ.js} +16 -16
- package/dist/{demo-record-cmd-SIKNTSGI.js → demo-record-cmd-KXLLIMOP.js} +5 -5
- package/dist/{demo-voice-cmd-SAB3QU4F.js → demo-voice-cmd-TY2OX2CZ.js} +30 -30
- package/dist/{dist-VPXROEZO.js → dist-Z6WP743R.js} +2 -2
- package/dist/{docker-YMRPMDOW.js → docker-SKD6VTBD.js} +6 -6
- package/dist/{doctor-NVHAE4LS.js → doctor-DX6N3L5T.js} +53 -42
- package/dist/emit-artifact-cmd-NFAASCXW.js +43 -0
- package/dist/emit-cmd-UOPHEUW5.js +16 -0
- package/dist/emit-criteria-cmd-TX4LKO5X.js +33 -0
- package/dist/emit-demo-cmd-FRJFQKED.js +47 -0
- package/dist/emit-finding-cmd-LO2AKL4P.js +34 -0
- package/dist/{emit-result-cmd-VCKNZ4RZ.js → emit-result-cmd-7PL4HNXL.js} +28 -28
- package/dist/emit-step-cmd-RZT6VK5U.js +33 -0
- package/dist/{exec-client-U4544U2S.js → exec-client-UHL7WPDO.js} +3 -3
- package/dist/find-unit-IBL736HQ.js +19 -0
- package/dist/{findings-cmd-PLHBAQW4.js → findings-cmd-MEU7GDRC.js} +23 -23
- package/dist/fleet-readiness-4RNICYSP.js +28 -0
- package/dist/governing-source-6DH2NLPE.js +38 -0
- package/dist/{guest-init-MI4SEME4.js → guest-init-2TTQKFFZ.js} +4 -4
- package/dist/{hook-fast-GOH4T6SN.js → hook-fast-5PNO5HRO.js} +6 -6
- package/dist/{hook-wrap-fast-7VYYAAH4.js → hook-wrap-fast-545QJSBJ.js} +3 -3
- package/dist/host-checks-FWPDGTWF.js +78 -0
- package/dist/{host-key-OMLDWLNG.js → host-key-Q5DEAP3Q.js} +3 -3
- package/dist/{image-tag-YJJONB64.js → image-tag-JWATDMIZ.js} +3 -3
- package/dist/index.js +6 -6
- package/dist/init-DWOODP2Q.js +57 -0
- package/dist/{init-W3ATJYLX.js → init-GF43ZLZI.js} +39 -38
- package/dist/{init-cmd-XJOEU2PB.js → init-cmd-LW4TECQH.js} +33 -33
- package/dist/{init-update-KX3FFQ5H.js → init-update-5PTU5IE6.js} +30 -30
- package/dist/{install-cmd-QTIIMO6B.js → install-cmd-ZEFBJH24.js} +5 -5
- package/dist/{layout-7UOBWNYO.js → layout-ZE6F2Z7W.js} +4 -4
- package/dist/login-browser-YB7AMKHR.js +13 -0
- package/dist/{logout-cmd-5WE2N5B5.js → logout-cmd-Z2PYV5LF.js} +5 -5
- package/dist/{logs-YVXVAYTD.js → logs-3YRC7HRA.js} +23 -3
- package/dist/loop-UBAR3KBZ.js +89 -0
- package/dist/machine-H4Y5X424.js +57 -0
- package/dist/{machine-skills-KYN7XJEJ.js → machine-skills-DMHU7OLO.js} +5 -5
- package/dist/{mcp-install-cmd-LD7KYAOP.js → mcp-install-cmd-23ZY4IBK.js} +5 -5
- package/dist/{mcp-serve-cmd-ECTAPDB3.js → mcp-serve-cmd-PKXIHUOX.js} +9 -9
- package/dist/{paths-M66LPPUF.js → paths-7PC3K7C3.js} +2 -2
- package/dist/{pending-7LC6XDRO.js → pending-2VIIFAP4.js} +3 -3
- package/dist/{pidfile-DSQOOAZV.js → pidfile-KQ2EJABZ.js} +3 -3
- package/dist/{record-3KKIJ3XL.js → record-IHEF6C33.js} +3 -3
- package/dist/{runner-env-EX7YUIUH.js → runner-env-KCZBSWOB.js} +11 -11
- package/dist/{runner-identity-LJWBXNM5.js → runner-identity-D5HQ22D3.js} +6 -6
- package/dist/{runner-key-CAUO4RKG.js → runner-key-N5YEMI3S.js} +38 -37
- package/dist/session-sender-GJEVFQVN.js +43 -0
- package/dist/{settings-3DBYKYQD.js → settings-XB2HYBKO.js} +2 -2
- package/dist/{spec-cmd-SAWQYHKM.js → spec-cmd-BRTO5J2C.js} +23 -23
- package/dist/{starter-pack-KB3YH4KX.js → starter-pack-WUNNS6G7.js} +9 -9
- package/dist/state-FJPSFOID.js +9 -0
- package/dist/{status-VMFS7N6A.js → status-UPEZZYCT.js} +78 -56
- package/dist/{statusline-fast-YVHG6ZLX.js → statusline-fast-E7RWVREA.js} +4 -4
- package/dist/sync-cmd-EO4TP2K7.js +42 -0
- package/dist/update-steps-46FCWHJZ.js +79 -0
- package/dist/{watch-6NRBX6VE.js → watch-EG6MYI3O.js} +28 -28
- package/dist/{work-claim-cmd-SLVX2N4L.js → work-claim-cmd-MPH5HFLT.js} +26 -26
- package/dist/work-cmd-PKEAVXJC.js +31 -0
- package/dist/work-comment-cmd-7IEOLOOK.js +32 -0
- package/dist/{work-demo-cmd-SZJIKB5J.js → work-demo-cmd-GKMBBMMM.js} +20 -20
- package/dist/{work-launch-LEQ2MPM3.js → work-launch-TTGSHLY4.js} +3 -3
- package/dist/{work-logs-cmd-MRFSBMJM.js → work-logs-cmd-44ZOKO5E.js} +20 -20
- package/dist/{work-open-pr-cmd-N7GK7FUQ.js → work-open-pr-cmd-YYQLQ7DN.js} +22 -22
- package/dist/work-pr-cmd-ILCIO22W.js +32 -0
- package/dist/work-proofs-cmd-S7HZNVFC.js +35 -0
- package/dist/{work-proofs-record-JD4DNZUW.js → work-proofs-record-RJMR37XG.js} +34 -34
- package/dist/{work-stop-cmd-M6RIGF7S.js → work-stop-cmd-5VPW7HOZ.js} +20 -20
- package/package.json +1 -1
- package/dist/agent-setup-IVXRBFVV.js +0 -32
- package/dist/connect-cmd-JFGDHFLA.js +0 -27
- package/dist/emit-artifact-cmd-TZTVQCFT.js +0 -43
- package/dist/emit-cmd-4G3443OJ.js +0 -16
- package/dist/emit-criteria-cmd-WH7JB4RQ.js +0 -33
- package/dist/emit-demo-cmd-DNUVG5N7.js +0 -47
- package/dist/emit-finding-cmd-X5CBH4ZA.js +0 -34
- package/dist/emit-step-cmd-IUXZZYKO.js +0 -33
- package/dist/find-unit-QYD2FMCP.js +0 -19
- package/dist/fleet-readiness-F65CKZY5.js +0 -28
- package/dist/governing-source-JFCTQXYK.js +0 -38
- package/dist/host-checks-HC4XXGAD.js +0 -77
- package/dist/init-JVKJTJNM.js +0 -56
- package/dist/login-browser-Q25ZNSQ3.js +0 -13
- package/dist/loop-GBTANKUW.js +0 -87
- package/dist/machine-OQOHEMJB.js +0 -56
- package/dist/session-sender-U2CTD7EX.js +0 -43
- package/dist/sync-cmd-EBJQ5LMH.js +0 -42
- package/dist/update-steps-HMSVBDKH.js +0 -78
- package/dist/work-cmd-VSHZCXHQ.js +0 -31
- package/dist/work-comment-cmd-3DCL7VHN.js +0 -32
- package/dist/work-pr-cmd-HD5OIHUU.js +0 -32
- package/dist/work-proofs-cmd-GFGENBGN.js +0 -35
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { sha256OfFile, downloadPinned, VoiceDownloadError } from './chunk-2PGI6RDE.js';
|
|
4
|
-
import { readDefaultBranchFiles, readDefaultBranchHead, cloneRepository, buildRepositoryImage, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-
|
|
5
|
-
import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-
|
|
4
|
+
import { readDefaultBranchFiles, readDefaultBranchHead, cloneRepository, buildRepositoryImage, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-EQ5Y2OMK.js';
|
|
5
|
+
import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-XBECMHJW.js';
|
|
6
|
+
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
6
7
|
import { currentCliBuild } from './chunk-OGFGZQA3.js';
|
|
7
|
-
import { runExec, execCapture, waitForAgent } from './chunk-
|
|
8
|
-
import { GUEST_CID, linkVsockSockets } from './chunk-
|
|
9
|
-
import { retrySend, describeCallFailure,
|
|
10
|
-
import { runnerImageVersion } from './chunk-
|
|
11
|
-
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
8
|
+
import { runExec, execCapture, waitForAgent } from './chunk-4PH4DVV4.js';
|
|
9
|
+
import { GUEST_CID, linkVsockSockets } from './chunk-UZGQT6OF.js';
|
|
10
|
+
import { retrySend, describeCallFailure, formatDuration, keepStagedContext, controlPlaneTokenFailure, refusalCode, resolveGoverningSource, prefetchGovernedContext, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, shimScript, WORKFLOW_PERMISSION_REASON } from './chunk-HERRKKES.js';
|
|
11
|
+
import { runnerImageVersion } from './chunk-SQGD4LYW.js';
|
|
12
|
+
import { hasStoredCredential, AGENT_COMMANDS, storeClaudeCredential, credentialFromStdin, isAgentName } from './chunk-FNKCMOQY.js';
|
|
13
|
+
import { claimCalls } from './chunk-RW3YMQVQ.js';
|
|
14
|
+
import { optionalEgress, runnerCredentialProblem, builtinKind, keyRunnerFactory, DEFAULT_SETUP_MINUTES, allowHostProblem, DEFAULT_SAVED_STATE_MAX_BYTES, systemClock, emptyEgressCounts, hostAllowed } from './chunk-WDIZT56W.js';
|
|
15
|
+
import { DEFAULT_BUILD_DISK, formatBytes, allocatedBytes } from './chunk-5C7QZBLI.js';
|
|
16
|
+
import { parseSize, NETWORK_HELPER_MEMORY, createDockerHost, builderSpec, runnerLabelValue, RUNNER_LABEL, BUILD_LABEL, prepareRunArgs, networkHelperName, containerRunArgs, HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, mountableHome, homeCopyRunArgs, containerExecArgs, childEnvironment, readDu, JUDGE_DIR, MAX_ITEMS_BYTES, JUDGE_ITEMS, MAX_REPORT_BYTES, JUDGE_REPORT, NETWORK_READY_FILE, spawnRun, identityRunArgs, parseIdentity, networkHelperRunArgs, SAVED_STATE_LABEL } from './chunk-NM3L4JBB.js';
|
|
15
17
|
import { RecipeError, DOCKER_FEATURE, universalImagePending, writeSanitizedRecipe, classifyProperties } from './chunk-CM4J53WZ.js';
|
|
16
18
|
import { firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, CLAUDE_CODE_VERSION, builderDiskPinned, guestAssetsPinned, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, BUILDER_DISK_VERSION, 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 } from './chunk-D3CT6XQ4.js';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { signerFor } from './chunk-5TXQFZHY.js';
|
|
19
|
+
import { postJson, WorkCommandError, getJson } from './chunk-JQOET7TF.js';
|
|
20
|
+
import { sanitizeTerminal } from './chunk-PDK35AR4.js';
|
|
21
|
+
import { signerFor } from './chunk-XU5BNWX7.js';
|
|
21
22
|
import { sharedSkillNames, skillConflictMessage } from './chunk-FGF52V4V.js';
|
|
22
23
|
import { versionAtLeast, MINIMUM_CLAUDE_VERSION } from './chunk-HCVLP7XA.js';
|
|
23
|
-
import { MIN_SCRUBBED_LITERAL, setCustomScrubbers, setLocalIdentity, setRepoRoot, parseTranscript, scrubDeep, scrubText } from './chunk-
|
|
24
|
-
import { orderSessions, extractFacts, sessionsToTimeline } from './chunk-
|
|
25
|
-
import { downconvertSession } from './chunk-
|
|
26
|
-
import { vmAssetsDir, RUNNER_DIR_MODE, rootfsPathFor, diskTemplatesDir, RUNNER_FILE_MODE, buildsDir, buildDir, runnerDir, deliveryDir, ghConfigDir, runnerDirOfBuild, spoolDir, mirrorDir, SHIM_DIR, vsockPath, builderCacheDiskPath, builderConsolePath } from './chunk-
|
|
27
|
-
import { claudeCredential, parseIsolation, proxyEnvironment, withProxyWarningHidden, containerLocalAddress, destinationEnvironment, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, withHooksPath, startBuildServices, BUILT_IN_NAMES, checkoutPath, repositoriesOf, primaryOf, RELAY_PORT, repositoryPath, CHECKOUT_DIR, lifecycleWorkdir, buildEnvironment, checkEnvironment, withMiseVariables, isMiseVariableAllowed, JOB_MOUNT, realFdStorePort, AGENT_CREDENTIAL_MISSING } from './chunk-
|
|
24
|
+
import { MIN_SCRUBBED_LITERAL, setCustomScrubbers, setLocalIdentity, setRepoRoot, parseTranscript, scrubDeep, scrubText } from './chunk-TV2OQUWE.js';
|
|
25
|
+
import { orderSessions, extractFacts, sessionsToTimeline } from './chunk-5FWBAM6O.js';
|
|
26
|
+
import { downconvertSession } from './chunk-YTTESG7K.js';
|
|
27
|
+
import { vmAssetsDir, RUNNER_DIR_MODE, rootfsPathFor, diskTemplatesDir, RUNNER_FILE_MODE, buildsDir, buildDir, runnerDir, deliveryDir, ghConfigDir, orgStoreIn, runnerDirOfBuild, spoolDir, mirrorDir, SHIM_DIR, vsockPath, builderCacheDiskPath, builderConsolePath } from './chunk-YQHUCOUL.js';
|
|
28
|
+
import { claudeCredential, parseIsolation, proxyEnvironment, withProxyWarningHidden, containerLocalAddress, destinationEnvironment, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, withHooksPath, startBuildServices, BUILT_IN_NAMES, checkoutPath, repositoriesOf, primaryOf, RELAY_PORT, repositoryPath, CHECKOUT_DIR, lifecycleWorkdir, buildEnvironment, checkEnvironment, withMiseVariables, isMiseVariableAllowed, JOB_MOUNT, realFdStorePort, AGENT_CREDENTIAL_MISSING } from './chunk-GANAOCHR.js';
|
|
28
29
|
import { RELAY_USER, RELAY_ID, UNKNOWN_TRANSPORT_REASON, DOCKER_DESKTOP_REASON, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath } from './chunk-MESOOLF4.js';
|
|
29
30
|
import { spawn, spawnSync } from 'child_process';
|
|
30
31
|
import { mkdirSync, existsSync, readFileSync, mkdtempSync, rmSync, chmodSync, truncateSync, statSync, accessSync, constants, readdirSync, writeFileSync, renameSync, lstatSync, copyFileSync, rmdirSync, unlinkSync, linkSync, openSync, closeSync, cpSync, writeSync, appendFileSync, createWriteStream, createReadStream } from 'fs';
|
|
@@ -42,6 +43,17 @@ import { createGunzip, gunzipSync, constants as constants$1 } from 'zlib';
|
|
|
42
43
|
|
|
43
44
|
createRequire(import.meta.url);
|
|
44
45
|
|
|
46
|
+
// src/runner/item-tag.ts
|
|
47
|
+
var CLAIM_TAG_LENGTH = 8;
|
|
48
|
+
function itemScope(job) {
|
|
49
|
+
if (job.organizationId === void 0 || job.claimId === void 0 || job.claimId === "") return void 0;
|
|
50
|
+
return job.claimId.slice(0, CLAIM_TAG_LENGTH).replace(/[^A-Za-z0-9_-]/g, "_");
|
|
51
|
+
}
|
|
52
|
+
function itemTag(job) {
|
|
53
|
+
const scope = itemScope(job);
|
|
54
|
+
return scope === void 0 ? `#${job.item}` : `#${job.item}@${scope}`;
|
|
55
|
+
}
|
|
56
|
+
|
|
45
57
|
// src/runner/managed-claude-key.ts
|
|
46
58
|
var FETCH_RETRY_WINDOW_MS = 3e4;
|
|
47
59
|
var ADOPTED_FETCH_RETRY_WINDOW_MS = 3e5;
|
|
@@ -60,9 +72,14 @@ async function fetchManagedClaudeKey(config, item, deps = {}) {
|
|
|
60
72
|
}
|
|
61
73
|
var held = /* @__PURE__ */ new Map();
|
|
62
74
|
var everHeld = /* @__PURE__ */ new Set();
|
|
75
|
+
var everHeldBy = /* @__PURE__ */ new Map();
|
|
76
|
+
var EVER_HELD_BY_LIMIT = 1e3;
|
|
63
77
|
function holdManagedClaudeKey(jobDir, apiKey) {
|
|
64
78
|
held.set(jobDir, apiKey);
|
|
65
79
|
everHeld.add(apiKey);
|
|
80
|
+
everHeldBy.delete(jobDir);
|
|
81
|
+
everHeldBy.set(jobDir, apiKey);
|
|
82
|
+
if (everHeldBy.size > EVER_HELD_BY_LIMIT) everHeldBy.delete(everHeldBy.keys().next().value);
|
|
66
83
|
}
|
|
67
84
|
function managedClaudeKeyFor(jobDir) {
|
|
68
85
|
return held.get(jobDir);
|
|
@@ -73,6 +90,10 @@ function dropManagedClaudeKey(jobDir) {
|
|
|
73
90
|
function managedClaudeKeyValues() {
|
|
74
91
|
return [...everHeld];
|
|
75
92
|
}
|
|
93
|
+
function managedClaudeKeyValuesFor(jobDir) {
|
|
94
|
+
const key = everHeldBy.get(jobDir);
|
|
95
|
+
return key === void 0 ? [] : [key];
|
|
96
|
+
}
|
|
76
97
|
function hasClaudeCredential(config, hostEnv, jobDir) {
|
|
77
98
|
return config.managed === true ? managedClaudeKeyFor(jobDir) !== void 0 : claudeCredential(hostEnv) !== void 0;
|
|
78
99
|
}
|
|
@@ -133,6 +154,9 @@ function dropManagedBuildSettings(jobDir) {
|
|
|
133
154
|
function managedBuildSettingValues() {
|
|
134
155
|
return [...new Set([...held2.values()].flatMap((settings) => settings.variables.map(({ value }) => value)))];
|
|
135
156
|
}
|
|
157
|
+
function managedBuildSettingValuesFor(jobDir) {
|
|
158
|
+
return [...new Set((held2.get(jobDir)?.variables ?? []).map(({ value }) => value))];
|
|
159
|
+
}
|
|
136
160
|
function managedMachineLimits(settings) {
|
|
137
161
|
const { vcpus, memoryGiB, diskGB } = settings.machine;
|
|
138
162
|
return { cpus: vcpus, memoryBytes: Math.round(memoryGiB * GIB), diskBytes: Math.round(diskGB * GB) };
|
|
@@ -2248,7 +2272,7 @@ async function buildInBuilder(opts, deps, prepared) {
|
|
|
2248
2272
|
const dir = buildDir(opts.configPath, id);
|
|
2249
2273
|
const state = { buildId: id, buildDir: dir, vsockPath: vsockPath(dir) };
|
|
2250
2274
|
const record = { owner, name, id };
|
|
2251
|
-
const cachePath = location.kind === "default" ? builderCacheDiskPath(opts.configPath, SHARED_OWNER, SHARED_NAME) : builderCacheDiskPath(opts.configPath, owner, name);
|
|
2275
|
+
const cachePath = location.kind === "default" ? builderCacheDiskPath(opts.configPath, SHARED_OWNER, SHARED_NAME, opts.organizationId) : builderCacheDiskPath(opts.configPath, owner, name, opts.organizationId);
|
|
2252
2276
|
const diskPath = join(dir, "build.ext4");
|
|
2253
2277
|
const partial = join(recordDir, "rootfs.ext4.partial");
|
|
2254
2278
|
const scratchRoot = opts.tmpDir ?? tmpdir();
|
|
@@ -2828,7 +2852,7 @@ async function claimPermissionProblem(config, fetchImpl = fetch) {
|
|
|
2828
2852
|
return unverified("this host's key could not be read, so whether the runner key can claim work was not checked", err);
|
|
2829
2853
|
}
|
|
2830
2854
|
try {
|
|
2831
|
-
await getJson(config.url, "/v1/runner/host-key", config.apiKey, config
|
|
2855
|
+
await getJson(config.url, "/v1/runner/host-key", config.apiKey, keyRunnerFactory(config), fetchImpl, signer);
|
|
2832
2856
|
return { status: "ok" };
|
|
2833
2857
|
} catch (err) {
|
|
2834
2858
|
const permission = missingPermissionOf(err);
|
|
@@ -3097,8 +3121,26 @@ var readMiseVariables = async (context) => {
|
|
|
3097
3121
|
context.variables = Object.fromEntries(Object.entries(reported).filter(([name]) => isMiseVariableAllowed(name)));
|
|
3098
3122
|
const names = Object.keys(context.variables).sort();
|
|
3099
3123
|
if (names.length > 0) line(context, `variables ${names.join(", ")} from mise env`);
|
|
3124
|
+
const path = await pathFromMise(context);
|
|
3125
|
+
if (path !== void 0) context.variables.PATH = path;
|
|
3100
3126
|
return void 0;
|
|
3101
3127
|
};
|
|
3128
|
+
async function pathFromMise(context) {
|
|
3129
|
+
const listed = await context.input.exec(["mise", "env", "--paths"], context.path, { quiet: true });
|
|
3130
|
+
if (listed.status !== 0) {
|
|
3131
|
+
line(context, `mise env --paths failed (exit ${listed.status})${said(listed.stderr)}; the build's commands keep the image's PATH`);
|
|
3132
|
+
return void 0;
|
|
3133
|
+
}
|
|
3134
|
+
const folders = [...new Set(listed.stdout.split("\n").map((folder) => folder.trim()).filter((folder) => folder !== ""))];
|
|
3135
|
+
if (folders.length === 0) return void 0;
|
|
3136
|
+
const image = await context.input.exec(["printenv", "PATH"], context.path, { quiet: true });
|
|
3137
|
+
if (image.status !== 0) {
|
|
3138
|
+
line(context, `reading the image's PATH failed (exit ${image.status})${said(image.stderr)}; the build's commands keep the image's PATH`);
|
|
3139
|
+
return void 0;
|
|
3140
|
+
}
|
|
3141
|
+
line(context, `PATH starts with ${folders.join(":")} from mise env --paths`);
|
|
3142
|
+
return [...folders, ...image.stdout.trim().split(":").filter((folder) => folder !== "" && !folders.includes(folder))].join(":");
|
|
3143
|
+
}
|
|
3102
3144
|
function unpinnedIn(context) {
|
|
3103
3145
|
const used = new Set([...context.files].map((file) => MANIFESTS[file]));
|
|
3104
3146
|
const pinned = new Set(context.resolved.filter((r) => r.source?.startsWith(`${context.path}/`)).map((r) => r.tool));
|
|
@@ -3565,7 +3607,7 @@ async function planSavedState(input) {
|
|
|
3565
3607
|
repositories.push({ repository: entry.repository, commit: read.commit, files: read.files });
|
|
3566
3608
|
}
|
|
3567
3609
|
const key = stateKey({
|
|
3568
|
-
factory: config
|
|
3610
|
+
factory: keyRunnerFactory(config),
|
|
3569
3611
|
repositories,
|
|
3570
3612
|
imageDigest: input.base.digest,
|
|
3571
3613
|
diskBytes: parseSize(config.build?.disk ?? DEFAULT_BUILD_DISK) ?? 0
|
|
@@ -3901,7 +3943,7 @@ function diffBase(job) {
|
|
|
3901
3943
|
}
|
|
3902
3944
|
async function writeEvalInput(request) {
|
|
3903
3945
|
const { job, dir, log } = request;
|
|
3904
|
-
const tag =
|
|
3946
|
+
const tag = `${itemTag(job)}`;
|
|
3905
3947
|
rmSync(dir, { recursive: true, force: true });
|
|
3906
3948
|
mkdirSync(join(dir, "sessions"), { recursive: true });
|
|
3907
3949
|
chmodSync(dir, 493);
|
|
@@ -5071,6 +5113,7 @@ function createContainerRuntime(opts = {}) {
|
|
|
5071
5113
|
repository: build.repository,
|
|
5072
5114
|
remote: remoteFor?.(build.repository),
|
|
5073
5115
|
configPath: build.configPath,
|
|
5116
|
+
...build.organizationId === void 0 ? {} : { organizationId: build.organizationId },
|
|
5074
5117
|
cli: cli ?? currentCliBuild(),
|
|
5075
5118
|
readToken: build.readToken,
|
|
5076
5119
|
pinned: build.pinned,
|
|
@@ -5146,7 +5189,7 @@ function keepGhConfigCurrent(tokens, buildDir2, onError, copy) {
|
|
|
5146
5189
|
});
|
|
5147
5190
|
}
|
|
5148
5191
|
function gitRemoteFor(runtime, input) {
|
|
5149
|
-
const runnerDirPath = runnerDirOfBuild(input.buildDir);
|
|
5192
|
+
const runnerDirPath = orgStoreIn(runnerDirOfBuild(input.buildDir), input.organizationId);
|
|
5150
5193
|
return createGitRemote({
|
|
5151
5194
|
repositories: input.repositories.map((entry) => {
|
|
5152
5195
|
const [owner = "", name = ""] = entry.repository.split("/");
|
|
@@ -5223,7 +5266,7 @@ async function obtainImage(input) {
|
|
|
5223
5266
|
};
|
|
5224
5267
|
}
|
|
5225
5268
|
try {
|
|
5226
|
-
const common = { repository, configPath: config.configPath, readToken, pinned: input.pinned, log: (line2) => log.line(`${tag} ${line2}`) };
|
|
5269
|
+
const common = { repository, configPath: config.configPath, ...input.organizationId === void 0 ? {} : { organizationId: input.organizationId }, readToken, pinned: input.pinned, log: (line2) => log.line(`${tag} ${line2}`) };
|
|
5227
5270
|
if (input.inBuilder !== void 0) {
|
|
5228
5271
|
return { ok: true, built: await runtime.buildRootDisk({ ...input.inBuilder, ...common, guestHelper: input.guestHelper, deadlineMs: input.deadlineMs }) };
|
|
5229
5272
|
}
|
|
@@ -5263,7 +5306,7 @@ async function provisionContainer(input) {
|
|
|
5263
5306
|
async function provisionContainerOnce(input, allowRestore) {
|
|
5264
5307
|
const { config, runtime, item, itemKey, jobDir, log, tokens } = input;
|
|
5265
5308
|
const { host } = runtime;
|
|
5266
|
-
const tag =
|
|
5309
|
+
const tag = itemTag({ item: item.number, organizationId: input.organizationId, claimId: input.claimId });
|
|
5267
5310
|
const logPath = join(jobDir, "provision.log");
|
|
5268
5311
|
const fail = (reason) => ({ ok: false, reason });
|
|
5269
5312
|
if (!hasClaudeCredential(config, runtime.hostEnv, jobDir)) return fail(AGENT_CREDENTIAL_MISSING);
|
|
@@ -5601,7 +5644,7 @@ function shellQuote(word) {
|
|
|
5601
5644
|
function containerCommandExec(input) {
|
|
5602
5645
|
const state = input.job.container;
|
|
5603
5646
|
const env = buildEnvironment({
|
|
5604
|
-
config: input.config,
|
|
5647
|
+
config: claimCalls(input.config, input.job),
|
|
5605
5648
|
item: input.job.item,
|
|
5606
5649
|
itemKey: input.job.itemKey,
|
|
5607
5650
|
branch: input.job.branch,
|
|
@@ -5627,7 +5670,7 @@ function containerCommandExec(input) {
|
|
|
5627
5670
|
function containerSenderCommand(input) {
|
|
5628
5671
|
const state = input.job.container;
|
|
5629
5672
|
const env = buildEnvironment({
|
|
5630
|
-
config: input.config,
|
|
5673
|
+
config: claimCalls(input.config, input.job),
|
|
5631
5674
|
item: input.job.item,
|
|
5632
5675
|
itemKey: input.job.itemKey,
|
|
5633
5676
|
branch: input.job.branch,
|
|
@@ -5768,7 +5811,7 @@ async function runCliInContainer(input, argv, logName) {
|
|
|
5768
5811
|
if (!delivered.ok) return { ok: false, reason: delivered.reason };
|
|
5769
5812
|
}
|
|
5770
5813
|
const env = buildEnvironment({
|
|
5771
|
-
config: input.config,
|
|
5814
|
+
config: claimCalls(input.config, job),
|
|
5772
5815
|
item: job.item,
|
|
5773
5816
|
itemKey: job.itemKey,
|
|
5774
5817
|
branch: job.branch,
|
|
@@ -5931,7 +5974,7 @@ function readRegularFile(path, limit) {
|
|
|
5931
5974
|
async function startCheckContainer(input) {
|
|
5932
5975
|
const { config, runtime, job, jobDir, tokens, log } = input;
|
|
5933
5976
|
const { host } = runtime;
|
|
5934
|
-
const tag =
|
|
5977
|
+
const tag = `${itemTag(job)}`;
|
|
5935
5978
|
const built = job.container;
|
|
5936
5979
|
const repository = built?.repository ?? job.repository;
|
|
5937
5980
|
if (built === void 0 || built.imageId === void 0 || repository === void 0 || job.branch === void 0) {
|
|
@@ -6018,7 +6061,7 @@ async function startCheckContainer(input) {
|
|
|
6018
6061
|
if (started.status !== 0) return dockerFailed("starting the check environment's container", started);
|
|
6019
6062
|
if (transport === "exec") joinBuild(runtime, state, services, (line2) => log.line(`${tag} ${line2}`));
|
|
6020
6063
|
if (!await waitForRelay(runtime, state)) return fail("the relay in the check environment's container did not start");
|
|
6021
|
-
const env = checkEnvironment({ config, item: job.item, repository, hostEnv: runtime.hostEnv, containerEnv: built.containerEnv ?? {} });
|
|
6064
|
+
const env = checkEnvironment({ config: claimCalls(config, job), item: job.item, repository, hostEnv: runtime.hostEnv, containerEnv: built.containerEnv ?? {} });
|
|
6022
6065
|
const secrets = () => tokens.issuedTokens();
|
|
6023
6066
|
let delivered = false;
|
|
6024
6067
|
const deliverInput = async () => {
|
|
@@ -6039,7 +6082,13 @@ async function startCheckContainer(input) {
|
|
|
6039
6082
|
if (!result.ok) throw new DeliveryFailure(result.reason);
|
|
6040
6083
|
}
|
|
6041
6084
|
},
|
|
6042
|
-
exec: (argv, workdir, opts) =>
|
|
6085
|
+
exec: async (argv, workdir, opts) => {
|
|
6086
|
+
const ran = await host.exec(
|
|
6087
|
+
{ container: name, user: agentUser, workdir, env: withMiseVariables(env, opts?.variables), argv },
|
|
6088
|
+
{ logPath: opts?.logPath, timeoutMs: opts?.timeoutMs }
|
|
6089
|
+
);
|
|
6090
|
+
return endedAtLimit(ran) ? { ...ran, timedOut: true } : ran;
|
|
6091
|
+
},
|
|
6043
6092
|
restart: async () => {
|
|
6044
6093
|
await leaveBuild(runtime, state);
|
|
6045
6094
|
await host.stop(name);
|
|
@@ -6163,4 +6212,4 @@ function describeMachineDocker(machine) {
|
|
|
6163
6212
|
return `Docker Engine ${version ?? "of no known version"}, older than the ${MIN_ENGINE_MAJOR} that container builds need`;
|
|
6164
6213
|
}
|
|
6165
6214
|
|
|
6166
|
-
export { ADDED_USER, ADOPTED_FETCH_RETRY_WINDOW_MS, AgentUserError, AssetError, DeliveryFailure, EVAL_INPUT_NAME, GH_CONFIG_YML, HELPER_ENV, LEASE_SECONDS, MANAGED_UNJAILED_REASON, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, PROOFS_LOG, RECORD_PROOFS_ARGV, ROOT_DISK_ID_PREFIX, RunnerInitError, agentUidOf, attemptNote, claimPermissionProblem, claudeCredentialCheck, cleanupContainer, clockOf, closeHostBuild, containerCommandExec, containerJudgeEnvironment, containerSenderCommand, copyJudgeTree, copyTranscripts, copyTranscriptsFromContainer, createBuildDisk, createContainerRuntime, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deleteBuildDisk, deleteRecord, deliverContainerHooks, deliverExecMaven, describeMachineDocker, detectMachine, discardUnusableState, dropManagedBuildSettings, dropManagedClaudeKey, ensureFirecrackerAndJailer, ensureNetworkReady, ensureRootfs, ensureTunnel, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedClaudeKey, filesAreCopied, firstLine4 as firstLine, formerSkillProblem, formerSkillQueues, ghHostsYml, gitRemoteFor, hasClaudeCredential, helperFirecrackerNote, helperSocketPath, holdManagedBuildSettings, holdManagedClaudeKey, hostCommandEnvironment, hostEnvironment, isPlaceholderCommand, keepGhConfigCurrent, keepMissingSetupScripts, keepRuntimeStep, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listenOnBroker, machineConfig, makeBuildsDirPrivate, managedBuildSettingValues, managedBuildSettingsFor, managedClaudeKeyFor, managedClaudeKeyValues, managedMachineLimits, measureDisk, microVmArchSupported, microVmAssetsPinned, missingPermissionFix, missingPermissionOf, needsBuildSkill, needsClaudeCredential, obtainImage, outOfMemoryReason, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, planSavedState, prepareBranch, prepareRunnerInit, probeHelper, provisionContainer, provisionEnvironment, provisionRuntimes, provisionWithFreshFallback, ranRuntimeStep, reachDockerStep, readConfigObject, readRecords, recordProofsInContainer, removeOldestUntil, removeSavedState, resolveAgentUser, resolveHostBuild, runBuildSteps, runRunnerInit, runWithSpawn, runtimeStepInput, said, saveAndPrune, savedStateBase, savedStatesDir, selectExpired, selectStaleIncomplete, selectToFit, senderAliveScript, senderSignalScript, setUpRunnerCgroup, settleFailedSteps, setupInputFor, shellQuote, signalInContainer, startCheckContainer, startHostServices, startJailedInto, startServicesFor, stopContainer, stopJailed, stoppedHelperReason, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, syncInContainer, taggedLog, uidFromProbe, userIdChangedReason, withFactoryHosts, withTunnelLog, writeEvalInput, writeRecord2 as writeRecord, writeRunnerInit };
|
|
6215
|
+
export { ADDED_USER, ADOPTED_FETCH_RETRY_WINDOW_MS, AgentUserError, AssetError, DeliveryFailure, EVAL_INPUT_NAME, GH_CONFIG_YML, HELPER_ENV, LEASE_SECONDS, MANAGED_UNJAILED_REASON, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, PROOFS_LOG, RECORD_PROOFS_ARGV, ROOT_DISK_ID_PREFIX, RunnerInitError, agentUidOf, attemptNote, claimPermissionProblem, claudeCredentialCheck, cleanupContainer, clockOf, closeHostBuild, containerCommandExec, containerJudgeEnvironment, containerSenderCommand, copyJudgeTree, copyTranscripts, copyTranscriptsFromContainer, createBuildDisk, createContainerRuntime, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deleteBuildDisk, deleteRecord, deliverContainerHooks, deliverExecMaven, describeMachineDocker, detectMachine, discardUnusableState, dropManagedBuildSettings, dropManagedClaudeKey, ensureFirecrackerAndJailer, ensureNetworkReady, ensureRootfs, ensureTunnel, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedClaudeKey, filesAreCopied, firstLine4 as firstLine, formerSkillProblem, formerSkillQueues, ghHostsYml, gitRemoteFor, hasClaudeCredential, helperFirecrackerNote, helperSocketPath, holdManagedBuildSettings, holdManagedClaudeKey, hostCommandEnvironment, hostEnvironment, isPlaceholderCommand, itemScope, itemTag, keepGhConfigCurrent, keepMissingSetupScripts, keepRuntimeStep, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listenOnBroker, machineConfig, makeBuildsDirPrivate, managedBuildSettingValues, managedBuildSettingValuesFor, managedBuildSettingsFor, managedClaudeKeyFor, managedClaudeKeyValues, managedClaudeKeyValuesFor, managedMachineLimits, measureDisk, microVmArchSupported, microVmAssetsPinned, missingPermissionFix, missingPermissionOf, needsBuildSkill, needsClaudeCredential, obtainImage, outOfMemoryReason, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, planSavedState, prepareBranch, prepareRunnerInit, probeHelper, provisionContainer, provisionEnvironment, provisionRuntimes, provisionWithFreshFallback, ranRuntimeStep, reachDockerStep, readConfigObject, readRecords, recordProofsInContainer, removeOldestUntil, removeSavedState, resolveAgentUser, resolveHostBuild, runBuildSteps, runRunnerInit, runSetupScripts, runWithSpawn, runtimeStepInput, said, saveAndPrune, savedStateBase, savedStatesDir, selectExpired, selectStaleIncomplete, selectToFit, senderAliveScript, senderSignalScript, setUpRunnerCgroup, settleFailedSteps, setupInputFor, shellQuote, signalInContainer, startCheckContainer, startHostServices, startJailedInto, startServicesFor, stopContainer, stopJailed, stoppedHelperReason, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, syncInContainer, taggedLog, uidFromProbe, usableCpus, userIdChangedReason, withFactoryHosts, withTunnelLog, writeEvalInput, writeRecord2 as writeRecord, writeRunnerInit };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { homeFromEnv } from './chunk-
|
|
3
|
+
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
4
4
|
import { mkdirSync, statSync, renameSync, appendFileSync, readFileSync } from 'fs';
|
|
5
5
|
import { dirname, join } from 'path';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { parseSize, BUILD_LABEL, RUNNER_LABEL, runnerLabelValue } from './chunk-
|
|
4
|
-
import { buildsDir, rootfsDir, runnerDir, imagesDir, builderCacheDiskPath } from './chunk-
|
|
3
|
+
import { parseSize, BUILD_LABEL, RUNNER_LABEL, runnerLabelValue } from './chunk-NM3L4JBB.js';
|
|
4
|
+
import { buildsDir, storeScopes, rootfsDir, orgStoreIn, runnerDir, imagesDir, builderCacheDiskPath } from './chunk-YQHUCOUL.js';
|
|
5
5
|
import { spawnSync } from 'child_process';
|
|
6
6
|
import { statfsSync, statSync, existsSync, readdirSync } from 'fs';
|
|
7
7
|
import { dirname, join } from 'path';
|
|
@@ -79,8 +79,9 @@ function isBuilderDir(dir) {
|
|
|
79
79
|
}
|
|
80
80
|
function cacheDiskBytes(configPath, builds, buildEntries) {
|
|
81
81
|
const cache = [];
|
|
82
|
-
const
|
|
83
|
-
|
|
82
|
+
for (const scope of storeScopes(configPath)) {
|
|
83
|
+
const images = imagesDir(configPath, scope);
|
|
84
|
+
if (!existsSync(images)) continue;
|
|
84
85
|
const owners = listDir(images);
|
|
85
86
|
if (owners === void 0) {
|
|
86
87
|
logUnreadable(images);
|
|
@@ -90,7 +91,7 @@ function cacheDiskBytes(configPath, builds, buildEntries) {
|
|
|
90
91
|
const names = listDir(join(images, owner));
|
|
91
92
|
if (names === void 0) logUnreadable(join(images, owner));
|
|
92
93
|
for (const name of names ?? []) {
|
|
93
|
-
const path = builderCacheDiskPath(configPath, owner, name);
|
|
94
|
+
const path = builderCacheDiskPath(configPath, owner, name, scope);
|
|
94
95
|
if (existsSync(path)) cache.push(allocatedBytes(path));
|
|
95
96
|
}
|
|
96
97
|
}
|
|
@@ -117,8 +118,9 @@ function microVmFacts(configPath) {
|
|
|
117
118
|
const cacheBytes = cacheDiskBytes(configPath, builds, entries);
|
|
118
119
|
if (cacheBytes === void 0) return void 0;
|
|
119
120
|
let root = 0;
|
|
120
|
-
const
|
|
121
|
-
|
|
121
|
+
for (const scope of storeScopes(configPath)) {
|
|
122
|
+
const roots = rootfsDir(orgStoreIn(runnerDir(configPath), scope));
|
|
123
|
+
if (!existsSync(roots)) continue;
|
|
122
124
|
const rootEntries = listDir(roots);
|
|
123
125
|
if (rootEntries === void 0) return void 0;
|
|
124
126
|
for (const entry of rootEntries) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { RESERVED_EMIT_NAMES, ARTIFACT_KINDS, ArtifactCriterionIdSchema } from './chunk-
|
|
3
|
+
import { RESERVED_EMIT_NAMES, ARTIFACT_KINDS, ArtifactCriterionIdSchema } from './chunk-YTTESG7K.js';
|
|
4
4
|
import { __commonJS, __require, __toESM } from './chunk-Z5GEFMRW.js';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { parseTrackerNumber } from './chunk-WZBHBH3J.js';
|
|
4
|
-
import { cliInvocation } from './chunk-
|
|
4
|
+
import { cliInvocation } from './chunk-FZKNTIOJ.js';
|
|
5
5
|
import { mkdirSync, appendFileSync, readFileSync } from 'fs';
|
|
6
6
|
import { join } from 'path';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE } from './chunk-
|
|
4
|
-
import { normalizePath, CONTEXT_PIN_FILENAME } from './chunk-
|
|
3
|
+
import { AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE } from './chunk-UPRZREBO.js';
|
|
4
|
+
import { normalizePath, CONTEXT_PIN_FILENAME } from './chunk-5FWBAM6O.js';
|
|
5
5
|
import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, lstatSync, readlinkSync, symlinkSync, rmdirSync } from 'fs';
|
|
6
6
|
import { relative, sep, join } from 'path';
|
|
7
7
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { detectActiveSession } from './chunk-IP7BIBXJ.js';
|
|
4
|
-
import { autoConnect } from './chunk-
|
|
5
|
-
import { C } from './chunk-
|
|
6
|
-
import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-
|
|
7
|
-
import { resolveRepoIdentity } from './chunk-
|
|
8
|
-
import { parseWorkItemEnv } from './chunk-
|
|
4
|
+
import { autoConnect } from './chunk-UGPJIKN4.js';
|
|
5
|
+
import { C } from './chunk-2AM6Z5BP.js';
|
|
6
|
+
import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-GBMTKV5B.js';
|
|
7
|
+
import { resolveRepoIdentity } from './chunk-TV2OQUWE.js';
|
|
8
|
+
import { parseWorkItemEnv } from './chunk-5WYT3PPE.js';
|
|
9
9
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
10
|
-
import { homeFromEnv } from './chunk-
|
|
10
|
+
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
11
11
|
|
|
12
12
|
createRequire(import.meta.url);
|
|
13
13
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { criteriaOf, loadCitationFinder, hostItemsOf, criterionInputs, NO_CITING_TEST_REASON, NO_TEST_FILES_REASON, NO_VERDICT_REASON, isFoundInReason, uncitedIds, planCriteria, pickSearchable, IdScan, testFileMatcher, foundInReason, MAX_TEST_FILE_BYTES, MAX_TEST_FILES, groupBySize } from './chunk-
|
|
4
|
-
import { WorkCommandError, resolveCredentials, getJson } from './chunk-
|
|
5
|
-
import { C } from './chunk-
|
|
6
|
-
import { sanitizeTerminal } from './chunk-
|
|
7
|
-
import { defaultFetch } from './chunk-
|
|
8
|
-
import { resolveRepoIdentity } from './chunk-
|
|
9
|
-
import { parseWorkItemEnv } from './chunk-
|
|
3
|
+
import { criteriaOf, loadCitationFinder, hostItemsOf, criterionInputs, NO_CITING_TEST_REASON, NO_TEST_FILES_REASON, NO_VERDICT_REASON, isFoundInReason, uncitedIds, planCriteria, pickSearchable, IdScan, testFileMatcher, foundInReason, MAX_TEST_FILE_BYTES, MAX_TEST_FILES, groupBySize } from './chunk-2B6EKUBD.js';
|
|
4
|
+
import { WorkCommandError, resolveCredentials, getJson } from './chunk-JQOET7TF.js';
|
|
5
|
+
import { C } from './chunk-2AM6Z5BP.js';
|
|
6
|
+
import { sanitizeTerminal } from './chunk-PDK35AR4.js';
|
|
7
|
+
import { defaultFetch } from './chunk-GBMTKV5B.js';
|
|
8
|
+
import { resolveRepoIdentity } from './chunk-TV2OQUWE.js';
|
|
9
|
+
import { parseWorkItemEnv } from './chunk-5WYT3PPE.js';
|
|
10
10
|
import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
|
|
11
11
|
import { readDeliveryRecord } from './chunk-YQR6E6OV.js';
|
|
12
|
-
import { inferArtifactKind, mediaTypeForArtifactPath, WORK_ITEM_COMMENT_MAX_BODY_LENGTH } from './chunk-
|
|
12
|
+
import { inferArtifactKind, mediaTypeForArtifactPath, WORK_ITEM_COMMENT_MAX_BODY_LENGTH } from './chunk-YTTESG7K.js';
|
|
13
13
|
import { createHash } from 'crypto';
|
|
14
14
|
import { spawnSync } from 'child_process';
|
|
15
15
|
import { existsSync, statSync, readFileSync } from 'fs';
|
|
@@ -217,14 +217,14 @@ function governingDir(cwd) {
|
|
|
217
217
|
async function testProofMode(cwd) {
|
|
218
218
|
const dir = governingDir(cwd);
|
|
219
219
|
if (dir === void 0) return "any";
|
|
220
|
-
const { testProofIn } = await import('./host-checks-
|
|
220
|
+
const { testProofIn } = await import('./host-checks-FWPDGTWF.js');
|
|
221
221
|
return testProofIn(dir);
|
|
222
222
|
}
|
|
223
223
|
async function judgeCheckName(cwd) {
|
|
224
224
|
const dir = governingDir(cwd);
|
|
225
225
|
if (dir === void 0) return {};
|
|
226
226
|
if (!existsSync(dir)) return { note: `the governed context at ${dir} is not readable` };
|
|
227
|
-
const { checksIn, isJudgeCheck } = await import('./host-checks-
|
|
227
|
+
const { checksIn, isJudgeCheck } = await import('./host-checks-FWPDGTWF.js');
|
|
228
228
|
const quiet = { line: () => void 0, error: () => void 0 };
|
|
229
229
|
const check = checksIn(dir, quiet, "").checks.find((c) => isJudgeCheck(c) && c.judge.subjects === "criteria");
|
|
230
230
|
return check === void 0 ? {} : { name: check.name };
|
|
@@ -369,7 +369,7 @@ async function runWorkProofs(opts) {
|
|
|
369
369
|
async function runWorkProofsCommand(opts) {
|
|
370
370
|
try {
|
|
371
371
|
if (opts.record) {
|
|
372
|
-
const { runWorkProofsRecord } = await import('./work-proofs-record-
|
|
372
|
+
const { runWorkProofsRecord } = await import('./work-proofs-record-RJMR37XG.js');
|
|
373
373
|
const result2 = await runWorkProofsRecord(opts);
|
|
374
374
|
process.exitCode = result2.exitCode;
|
|
375
375
|
return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-
|
|
3
|
+
import { runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-YQHUCOUL.js';
|
|
4
4
|
import { readlinkSync, realpathSync, mkdirSync, unlinkSync, symlinkSync, renameSync, readFileSync, writeFileSync, rmSync, existsSync, readdirSync } from 'fs';
|
|
5
5
|
import { join, basename, sep, resolve } from 'path';
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { C } from './chunk-
|
|
4
|
-
import { readCloudConfigStrict, removeCloudConfigKeys } from './chunk-
|
|
5
|
-
import { homeFromEnv } from './chunk-
|
|
3
|
+
import { C } from './chunk-2AM6Z5BP.js';
|
|
4
|
+
import { readCloudConfigStrict, removeCloudConfigKeys } from './chunk-HWVMRETT.js';
|
|
5
|
+
import { homeFromEnv } from './chunk-352DHUTP.js';
|
|
6
6
|
|
|
7
7
|
createRequire(import.meta.url);
|
|
8
8
|
|
|
@@ -1,17 +1,57 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { placeholderQueues, placeholderProblem } from './chunk-
|
|
4
|
-
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-
|
|
5
|
-
import { builtinKind, EGRESS_SWITCHABLE_KEYS, imageBuildOf, keepsHostBuilder } from './chunk-
|
|
6
|
-
import { realBuildDiskProbe, checkDiskFit, DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK, volumeBytes } from './chunk-
|
|
7
|
-
import { spawnRun, RUNNER_LABEL, BUILD_LABEL } from './chunk-
|
|
3
|
+
import { placeholderQueues, placeholderProblem } from './chunk-4PWOZU7R.js';
|
|
4
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-TKTVKEES.js';
|
|
5
|
+
import { isBuiltinVm, builtinKind, EGRESS_SWITCHABLE_KEYS, imageBuildOf, keepsHostBuilder } from './chunk-WDIZT56W.js';
|
|
6
|
+
import { realBuildDiskProbe, checkDiskFit, DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK, volumeBytes } from './chunk-5C7QZBLI.js';
|
|
7
|
+
import { spawnRun, RUNNER_LABEL, BUILD_LABEL } from './chunk-NM3L4JBB.js';
|
|
8
8
|
import { builderDiskPinned } from './chunk-D3CT6XQ4.js';
|
|
9
|
-
import {
|
|
9
|
+
import { getJson, WorkCommandError } from './chunk-JQOET7TF.js';
|
|
10
|
+
import { ensureHostKey } from './chunk-XU5BNWX7.js';
|
|
11
|
+
import { BUILD_SLICE_MEMORY_ENV, FORWARDED_CLAUDE_CREDENTIAL_VARIABLES, claudeCredentialVariablesSet, claudeCredential, claudeEnvPath, parseRunnerEnv } from './chunk-GANAOCHR.js';
|
|
10
12
|
import { closeSync, openSync, constants, readFileSync } from 'fs';
|
|
11
13
|
import { join, dirname } from 'path';
|
|
12
14
|
import { totalmem } from 'os';
|
|
13
15
|
|
|
14
16
|
createRequire(import.meta.url);
|
|
17
|
+
|
|
18
|
+
// src/runner/fleet/check.ts
|
|
19
|
+
var FLEET_KEY_PREFIX = "olfm_";
|
|
20
|
+
var FLEET_MACHINE_PATH = "/v1/fleet/machine";
|
|
21
|
+
function fleetConfigProblem(config) {
|
|
22
|
+
if (!config.apiKey.startsWith(FLEET_KEY_PREFIX)) {
|
|
23
|
+
return `fleet: the key does not start with ${FLEET_KEY_PREFIX}. A fleet runner holds a fleet machine key, which a platform admin makes on the fleet machines page`;
|
|
24
|
+
}
|
|
25
|
+
if (config.appId !== void 0) {
|
|
26
|
+
return `fleet: the config names an appId (${config.appId}), and a fleet machine belongs to no factory. Remove appId from the config`;
|
|
27
|
+
}
|
|
28
|
+
if (!isBuiltinVm(config.hooks.provision) || !isBuiltinVm(config.hooks.cleanup)) {
|
|
29
|
+
return "fleet: runner.hooks.provision and runner.hooks.cleanup must be builtin:vm, because a fleet runner runs microVM builds only";
|
|
30
|
+
}
|
|
31
|
+
return void 0;
|
|
32
|
+
}
|
|
33
|
+
async function askFleetMachine(config, fetchImpl = fetch) {
|
|
34
|
+
let hostKey;
|
|
35
|
+
try {
|
|
36
|
+
hostKey = await ensureHostKey(config.configPath);
|
|
37
|
+
} catch (err) {
|
|
38
|
+
return { ok: false, refused: false, message: `fleet: this host's key could not be read, so the fleet machine key was not tested: ${err instanceof Error ? err.message : String(err)}` };
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
const { data } = await getJson(config.url, `${FLEET_MACHINE_PATH}?hostKey=${hostKey.hostKey}`, config.apiKey, "", fetchImpl, hostKey.signer);
|
|
42
|
+
const answer = Object(data);
|
|
43
|
+
if (typeof answer.name !== "string" || answer.state !== "unbound" && answer.state !== "ready") {
|
|
44
|
+
return { ok: false, refused: false, message: "fleet: the gateway's answer named no fleet machine; update the gateway or the runner" };
|
|
45
|
+
}
|
|
46
|
+
return { ok: true, name: answer.name, state: answer.state };
|
|
47
|
+
} catch (err) {
|
|
48
|
+
if (err instanceof WorkCommandError && !err.retryable && err.status !== void 0 && err.status >= 400 && err.status < 500) {
|
|
49
|
+
const code = err.code ?? `http_${err.status}`;
|
|
50
|
+
return { ok: false, refused: true, code, message: `fleet: the gateway refused the fleet machine key (${code}): ${err.message}` };
|
|
51
|
+
}
|
|
52
|
+
return { ok: false, refused: false, message: `fleet: the gateway did not answer, so the fleet machine key was not tested: ${err instanceof Error ? err.message : String(err)}` };
|
|
53
|
+
}
|
|
54
|
+
}
|
|
15
55
|
function openKvm() {
|
|
16
56
|
try {
|
|
17
57
|
closeSync(openSync("/dev/kvm", constants.O_RDWR));
|
|
@@ -343,4 +383,4 @@ async function housekeepingDockerIfReachable(deps) {
|
|
|
343
383
|
return createHousekeepingDocker(deps);
|
|
344
384
|
}
|
|
345
385
|
|
|
346
|
-
export { KIND_LABEL, LARGE_BUILD_DISK_BYTES, RECIPE_KEY_LABEL, checkBlockedWithSlots, checkManagedRoom, createHousekeepingDocker, housekeepingDockerIfReachable, largeBuildMemoryBytes, managedFactsOf, managedProblems, realBlockedProbes, sliceMemoryOf };
|
|
386
|
+
export { KIND_LABEL, LARGE_BUILD_DISK_BYTES, RECIPE_KEY_LABEL, askFleetMachine, checkBlockedWithSlots, checkManagedRoom, createHousekeepingDocker, fleetConfigProblem, housekeepingDockerIfReachable, largeBuildMemoryBytes, managedFactsOf, managedProblems, realBlockedProbes, sliceMemoryOf };
|