@outerlayer/cli 0.40.0-next.20261116010428 → 0.40.0-next.20261116030912
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +1 -1
- package/dist/{caller-FJUWGSNN.js → caller-YHE7IHC7.js} +2 -2
- package/dist/{check-CDO3XBCB.js → check-GR2WNESK.js} +10 -10
- package/dist/{chunk-IQRYAAOG.js → chunk-2Q5OMKDK.js} +1 -1
- package/dist/{chunk-GJCC6GXH.js → chunk-5YEWBLLX.js} +1 -1
- package/dist/{chunk-ICY3T4MI.js → chunk-CG7326ET.js} +3 -3
- package/dist/{chunk-W2SZ5SLF.js → chunk-D7S7PQT5.js} +4 -4
- package/dist/{chunk-AEAKGO6N.js → chunk-HFVTLCI7.js} +1 -1
- package/dist/{chunk-F4HSDGFO.js → chunk-IZHE3WOW.js} +1 -1
- package/dist/{chunk-G5TK5XLA.js → chunk-LFAJCUDD.js} +49 -14
- package/dist/{chunk-V2O6KLTQ.js → chunk-PIXDSHVH.js} +1 -1
- package/dist/{chunk-VQLOZLLC.js → chunk-PSKNTGC3.js} +1 -1
- package/dist/{chunk-HQIGQL6W.js → chunk-RNZQWJSI.js} +1 -1
- package/dist/{chunk-4L3WCEOI.js → chunk-RRRW2M4B.js} +1 -1
- package/dist/{chunk-DEPV3XZE.js → chunk-S3ZX2GTO.js} +3 -3
- package/dist/{chunk-6PON5OB7.js → chunk-U5PIM7JH.js} +21 -20
- package/dist/{chunk-CPE4SWRZ.js → chunk-WEUBA44W.js} +3 -3
- package/dist/{chunk-HEJ4UYSX.js → chunk-WMXJ3XBP.js} +1 -1
- package/dist/{chunk-2HFE6POD.js → chunk-ZJ2PTV3I.js} +2 -2
- package/dist/{cli-BK35Y57F.js → cli-CNZMK32P.js} +45 -45
- package/dist/{command-7U4LHEYA.js → command-DFRKPEN7.js} +8 -8
- package/dist/{config-ME2W5VIX.js → config-TGFG7IID.js} +1 -1
- package/dist/{container-start-UCKTFOIU.js → container-start-6CECWERV.js} +7 -7
- package/dist/{doctor-EPWDQQKT.js → doctor-2PHGAJBZ.js} +7 -7
- package/dist/{find-unit-AFBSWEOE.js → find-unit-HKCVRS7L.js} +3 -3
- package/dist/{host-checks-NCV7XV2D.js → host-checks-CVNA5FU6.js} +5 -5
- package/dist/index.js +1 -1
- package/dist/{init-M3TDJHO7.js → init-6CJYRUWL.js} +5 -5
- package/dist/{init-Z7XXH24Q.js → init-N4GNHORE.js} +5 -5
- package/dist/{init-agent-3IOE4J7S.js → init-agent-6K26WOFF.js} +5 -5
- package/dist/{init-cmd-HEFGRQBE.js → init-cmd-GPESZN5W.js} +2 -2
- package/dist/{install-cmd-2BZYH77S.js → install-cmd-PEFKMYGU.js} +2 -2
- package/dist/{launch-agent-S5ZCDOJR.js → launch-agent-P5KMBBB5.js} +3 -3
- package/dist/{loop-VJF7N3KN.js → loop-ZEQTRVB5.js} +9 -9
- package/dist/{machine-FPD6GHWQ.js → machine-Y4DDIC7H.js} +5 -5
- package/dist/{runner-env-RYMF4YVJ.js → runner-env-TJE5WGPK.js} +3 -3
- package/dist/{runner-key-GYBBYSEX.js → runner-key-C7IELBJA.js} +5 -5
- package/dist/{setup-wiring-K3MWFPIV.js → setup-wiring-4GXHD73A.js} +7 -7
- package/dist/{status-HN2P42KT.js → status-WJ5W32DG.js} +5 -5
- package/dist/{update-steps-PUM35QNI.js → update-steps-DF275KW3.js} +6 -6
- package/dist/{work-claim-cmd-D35DOCE6.js → work-claim-cmd-Q4EXZDXE.js} +1 -1
- package/dist/{work-proofs-cmd-GB5D3YAW.js → work-proofs-cmd-RE7JFHXA.js} +1 -1
- package/dist/{work-proofs-record-JMWVM7FR.js → work-proofs-record-R2V7AW6S.js} +1 -1
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"2026-11-
|
|
1
|
+
{"id":"2026-11-16T03:32:16.497Z","root":"/home/runner/work/outerlayer/outerlayer","pkg":"outerlayer"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { claimCalls, claimItem, configForJob, itemCalls, leftByRunnerKey, runnerCalls, spoolHomeFor } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
export { claimCalls, claimItem, configForJob, itemCalls, leftByRunnerKey, runnerCalls, spoolHomeFor } from './chunk-IZHE3WOW.js';
|
|
4
|
+
import './chunk-PIXDSHVH.js';
|
|
5
5
|
import './chunk-OC3BSNNE.js';
|
|
6
6
|
import './chunk-TCPWJBH5.js';
|
|
7
7
|
import './chunk-ZBD2YOGH.js';
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { probeCredentials } from './chunk-
|
|
3
|
+
import { probeCredentials } from './chunk-U5PIM7JH.js';
|
|
4
4
|
import './chunk-UTSBE4MP.js';
|
|
5
5
|
import './chunk-E7R2GIAW.js';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
import './chunk-WEUBA44W.js';
|
|
7
|
+
import './chunk-5YEWBLLX.js';
|
|
8
8
|
import './chunk-TXKHD4Q6.js';
|
|
9
9
|
import './chunk-Y6FI3HCQ.js';
|
|
10
10
|
import './chunk-XOKGCNSG.js';
|
|
11
|
-
import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-
|
|
11
|
+
import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-D7S7PQT5.js';
|
|
12
12
|
import './chunk-PT3DOY6P.js';
|
|
13
|
-
import { findServiceUnit } from './chunk-
|
|
14
|
-
import { createGatewaySandboxClient, gatewayRefusalReason, placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsAgentCredential, agentCredentialCheck, claimPermissionProblem, formerSkillQueues, modellessQueues, formerSkillProblem, modellessProblem } from './chunk-
|
|
13
|
+
import { findServiceUnit } from './chunk-WMXJ3XBP.js';
|
|
14
|
+
import { createGatewaySandboxClient, gatewayRefusalReason, placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsAgentCredential, agentCredentialCheck, claimPermissionProblem, formerSkillQueues, modellessQueues, formerSkillProblem, modellessProblem } from './chunk-LFAJCUDD.js';
|
|
15
15
|
import './chunk-JXZ3LIHN.js';
|
|
16
16
|
import './chunk-PG4UW6QW.js';
|
|
17
17
|
import './chunk-I3LTIAOR.js';
|
|
18
18
|
import './chunk-2PGI6RDE.js';
|
|
19
|
-
import './chunk-
|
|
20
|
-
import './chunk-
|
|
19
|
+
import './chunk-HFVTLCI7.js';
|
|
20
|
+
import './chunk-RRRW2M4B.js';
|
|
21
21
|
import './chunk-R3RALX7H.js';
|
|
22
22
|
import './chunk-2PRLSABK.js';
|
|
23
23
|
import './chunk-55GT5FLR.js';
|
|
@@ -28,7 +28,7 @@ import './chunk-C2PZOLN7.js';
|
|
|
28
28
|
import './chunk-B4XB5QFD.js';
|
|
29
29
|
import './chunk-RIITHK4F.js';
|
|
30
30
|
import './chunk-TQMI335S.js';
|
|
31
|
-
import './chunk-
|
|
31
|
+
import './chunk-IZHE3WOW.js';
|
|
32
32
|
import './chunk-NN33FYXG.js';
|
|
33
33
|
import './chunk-SDLWJF6H.js';
|
|
34
34
|
import './chunk-YN6EKURT.js';
|
|
@@ -42,7 +42,7 @@ import './chunk-FJGYU2EK.js';
|
|
|
42
42
|
import './chunk-BAPRSDUR.js';
|
|
43
43
|
import './chunk-IKGAVS5X.js';
|
|
44
44
|
import './chunk-QFAH525L.js';
|
|
45
|
-
import { keyRunnerFactory, loadRunnerConfig, RunnerConfigError, checkHooks } from './chunk-
|
|
45
|
+
import { keyRunnerFactory, loadRunnerConfig, RunnerConfigError, checkHooks } from './chunk-PIXDSHVH.js';
|
|
46
46
|
import './chunk-OC3BSNNE.js';
|
|
47
47
|
import './chunk-TCPWJBH5.js';
|
|
48
48
|
import './chunk-ZBD2YOGH.js';
|
|
@@ -3,7 +3,7 @@ import { createRequire } from 'node:module';
|
|
|
3
3
|
import { launcherPath, pathNotes, writeLauncher, LauncherWriteError } from './chunk-BMMSIGV4.js';
|
|
4
4
|
import { currentVersion, entryIn, currentLink, versionDir, execStartLine, isInLayout, packageRootIn, switchCurrent } from './chunk-PT3DOY6P.js';
|
|
5
5
|
import { compareVersions } from './chunk-TQMI335S.js';
|
|
6
|
-
import { defaultRunnerConfigPath } from './chunk-
|
|
6
|
+
import { defaultRunnerConfigPath } from './chunk-PIXDSHVH.js';
|
|
7
7
|
import { runnerDir, RUNNER_DIR_MODE } from './chunk-DYV2OC4S.js';
|
|
8
8
|
import { lchownSync, lstatSync, realpathSync, readFileSync, mkdirSync, rmSync, cpSync, existsSync, readdirSync } from 'fs';
|
|
9
9
|
import { dirname, sep, join, resolve } from 'path';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { stripTerminalControls } from './chunk-
|
|
3
|
+
import { stripTerminalControls } from './chunk-LFAJCUDD.js';
|
|
4
4
|
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-RIITHK4F.js';
|
|
5
5
|
import { readFileSync } from 'fs';
|
|
6
6
|
|
|
@@ -129,14 +129,14 @@ function governingDir(cwd) {
|
|
|
129
129
|
async function testProofMode(cwd) {
|
|
130
130
|
const dir = governingDir(cwd);
|
|
131
131
|
if (dir === void 0) return "any";
|
|
132
|
-
const { testProofIn } = await import('./host-checks-
|
|
132
|
+
const { testProofIn } = await import('./host-checks-CVNA5FU6.js');
|
|
133
133
|
return testProofIn(dir);
|
|
134
134
|
}
|
|
135
135
|
async function judgeCheckName(cwd) {
|
|
136
136
|
const dir = governingDir(cwd);
|
|
137
137
|
if (dir === void 0) return {};
|
|
138
138
|
if (!existsSync(dir)) return { note: `the governed context at ${dir} is not readable` };
|
|
139
|
-
const { checksIn, isJudgeCheck } = await import('./host-checks-
|
|
139
|
+
const { checksIn, isJudgeCheck } = await import('./host-checks-CVNA5FU6.js');
|
|
140
140
|
const quiet = { line: () => void 0, error: () => void 0 };
|
|
141
141
|
const check = checksIn(dir, quiet, "").checks.find((c) => isJudgeCheck(c) && c.judge.subjects === "criteria");
|
|
142
142
|
return check === void 0 ? {} : { name: check.name };
|
|
@@ -372,7 +372,7 @@ async function runWorkProofs(opts) {
|
|
|
372
372
|
async function runWorkProofsCommand(opts) {
|
|
373
373
|
try {
|
|
374
374
|
if (opts.record || opts.check) {
|
|
375
|
-
const { runWorkProofsRecord } = await import('./work-proofs-record-
|
|
375
|
+
const { runWorkProofsRecord } = await import('./work-proofs-record-R2V7AW6S.js');
|
|
376
376
|
const result2 = await runWorkProofsRecord(opts);
|
|
377
377
|
process.exitCode = result2.exitCode;
|
|
378
378
|
return;
|
|
@@ -1,9 +1,9 @@
|
|
|
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-
|
|
3
|
+
import { placeholderQueues, placeholderProblem } from './chunk-LFAJCUDD.js';
|
|
4
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-RRRW2M4B.js';
|
|
5
5
|
import { getJson, WorkCommandError } from './chunk-BAPRSDUR.js';
|
|
6
|
-
import { isBuiltinVm, isBuiltinSandbox, builtinKind, EGRESS_SWITCHABLE_KEYS, imageBuildOf, keepsHostBuilder } from './chunk-
|
|
6
|
+
import { isBuiltinVm, isBuiltinSandbox, builtinKind, EGRESS_SWITCHABLE_KEYS, imageBuildOf, keepsHostBuilder } from './chunk-PIXDSHVH.js';
|
|
7
7
|
import { realBuildDiskProbe, checkDiskFit, DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-OC3BSNNE.js';
|
|
8
8
|
import { ensureHostKey } from './chunk-NDDXBJMX.js';
|
|
9
9
|
import { sandboxSettingsFrom } from './chunk-VXU5IAEQ.js';
|
|
@@ -224,7 +224,7 @@ function checkBlockedWithSlots(config, probes, agents = defaultAgents()) {
|
|
|
224
224
|
}
|
|
225
225
|
var GIB = 1024 ** 3;
|
|
226
226
|
function largeBuildMemoryBytes() {
|
|
227
|
-
return
|
|
227
|
+
return 32 * GIB;
|
|
228
228
|
}
|
|
229
229
|
var LARGE_BUILD_DISK_BYTES = 3e10;
|
|
230
230
|
function checkManagedRoom(input) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { DEFAULT_UNIT_NAME } from './chunk-
|
|
3
|
+
import { DEFAULT_UNIT_NAME } from './chunk-RRRW2M4B.js';
|
|
4
4
|
import { RUNNER_FILE_MODE } from './chunk-DYV2OC4S.js';
|
|
5
5
|
import { parseRunnerEnv, withoutCredentialLines } from './chunk-XOJRFV3U.js';
|
|
6
6
|
import { headlessNames, runnerAgentNamed, credentialAgent, orList, credentialShapes, runnerAgents, credentialForms, credentialEnvPath, forwardedVariables } from './chunk-BFKSIA3V.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { keyRunnerFactory, RunnerConfigError } from './chunk-
|
|
3
|
+
import { keyRunnerFactory, RunnerConfigError } from './chunk-PIXDSHVH.js';
|
|
4
4
|
import { orgHomeDir } from './chunk-DYV2OC4S.js';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
@@ -4,7 +4,7 @@ import { RUNNER_PROTOCOL } from './chunk-JXZ3LIHN.js';
|
|
|
4
4
|
import { MAX_TEST_FILE_BYTES, itemsSentence, criteriaOf, hostItemsOf, loadCitationFinder, testFileMatcher, planCriteria, wholeItems, judgeGroups, failedItems, inCriteriaOrder, testsByCriterion, oneLineReason, criterionInputs, parseJudgeAnswer, judgedItems } from './chunk-PG4UW6QW.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-
|
|
7
|
+
import { hasStoredCredential, storedCredentialVariables, storeAgentCredential, isAgentName, credentialFromStdin } from './chunk-HFVTLCI7.js';
|
|
8
8
|
import { upgradedStarterText } from './chunk-R3RALX7H.js';
|
|
9
9
|
import { HELPER_PATH, HELPER_RECORD, DOCKERD_LOG } from './chunk-2PRLSABK.js';
|
|
10
10
|
import { writeDockerClientConfig } from './chunk-55GT5FLR.js';
|
|
@@ -12,7 +12,7 @@ import { senderPidfile } from './chunk-LCZGMJXD.js';
|
|
|
12
12
|
import { installScrubContext } from './chunk-TQ3PXYPJ.js';
|
|
13
13
|
import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk-B4XB5QFD.js';
|
|
14
14
|
import { runnerImageVersion } from './chunk-RIITHK4F.js';
|
|
15
|
-
import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey, configForJob } from './chunk-
|
|
15
|
+
import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey, configForJob } from './chunk-IZHE3WOW.js';
|
|
16
16
|
import { receiveFiles } from './chunk-NN33FYXG.js';
|
|
17
17
|
import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, readRepositoryRecipe, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-SDLWJF6H.js';
|
|
18
18
|
import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-YN6EKURT.js';
|
|
@@ -22,7 +22,7 @@ import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-6FHMWJHK
|
|
|
22
22
|
import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-OUL5E5UC.js';
|
|
23
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-YDB72T5Z.js';
|
|
24
24
|
import { postJson, getJson, WorkCommandError, isSignatureRefusal } from './chunk-BAPRSDUR.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-
|
|
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-PIXDSHVH.js';
|
|
26
26
|
import { formatBytes, volumeBytes, allocatedBytes, DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, freeBytes } from './chunk-OC3BSNNE.js';
|
|
27
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, judgeProgramRecord, identityRunArgs, SAVED_STATE_LABEL } from './chunk-TCPWJBH5.js';
|
|
28
28
|
import { universalImagePending, RecipeError, writeSanitizedRecipe, classifyProperties, DOCKER_FEATURE } from './chunk-ZBD2YOGH.js';
|
|
@@ -4402,7 +4402,8 @@ function sandboxHost(client2, sandbox, options = {}) {
|
|
|
4402
4402
|
}
|
|
4403
4403
|
|
|
4404
4404
|
// src/runner/sandbox/hooks.ts
|
|
4405
|
-
var SANDBOX_DIR = "/
|
|
4405
|
+
var SANDBOX_DIR = "/var/lib/ol-runner";
|
|
4406
|
+
var OLD_SANDBOX_DIR = "/tmp/ol";
|
|
4406
4407
|
var CLI_DIR = `${SANDBOX_DIR}/dist`;
|
|
4407
4408
|
var SKILL_PACK_DIR = `${SANDBOX_DIR}/skill-pack`;
|
|
4408
4409
|
var SECRET_FILE = `${SANDBOX_DIR}/join-secret`;
|
|
@@ -4490,6 +4491,13 @@ var SandboxGoneError = class extends Error {
|
|
|
4490
4491
|
this.name = "SandboxGoneError";
|
|
4491
4492
|
}
|
|
4492
4493
|
};
|
|
4494
|
+
var SandboxContainerStoppedError = class extends Error {
|
|
4495
|
+
constructor(container) {
|
|
4496
|
+
super(`the build's container ${container} stopped in its sandbox: the sandbox restarted or its Docker stopped the container`);
|
|
4497
|
+
this.name = "SandboxContainerStoppedError";
|
|
4498
|
+
}
|
|
4499
|
+
};
|
|
4500
|
+
var CONTAINER_NOT_RUNNING = /is not running|no such container/i;
|
|
4493
4501
|
async function inSandbox(runtime, state) {
|
|
4494
4502
|
const sandbox = await sandboxOfBuild(runtime, state);
|
|
4495
4503
|
if (sandbox === void 0) throw new SandboxGoneError(state.sandboxId);
|
|
@@ -4653,7 +4661,7 @@ async function keepSandboxDisk(runtime, state, kept) {
|
|
|
4653
4661
|
if (emptied.status !== 0) throw new Error(`the build's command state was not removed from the volume (exit ${emptied.status})${said(emptied.stderr)}`);
|
|
4654
4662
|
const unmounted = await client(runtime).command(sandbox, `if mountpoint -q ${HOST_BUILD_DIR}; then sudo umount ${HOST_BUILD_DIR}; fi`);
|
|
4655
4663
|
if (unmounted.exitCode !== 0) throw new Error(`${HOST_BUILD_DIR} was not unmounted in the sandbox (exit ${unmounted.exitCode ?? "none"})${said(unmounted.stderr)}`);
|
|
4656
|
-
const cleared = await client(runtime).command(sandbox, `sudo rm -rf ${SANDBOX_DIR} ${SANDBOX_RUN_DIR}`);
|
|
4664
|
+
const cleared = await client(runtime).command(sandbox, `sudo rm -rf ${SANDBOX_DIR} ${OLD_SANDBOX_DIR} ${SANDBOX_RUN_DIR}`);
|
|
4657
4665
|
if (cleared.exitCode !== 0) throw new Error(`the runner's files were not removed from the sandbox (exit ${cleared.exitCode ?? "none"})${said(cleared.stderr)}`);
|
|
4658
4666
|
await kept.keep();
|
|
4659
4667
|
}
|
|
@@ -5004,7 +5012,8 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
5004
5012
|
const packDir = join(runtime.cliBuild().distDir, "..", "skill-pack");
|
|
5005
5013
|
const skillPack = existsSync(packDir) ? packDir : void 0;
|
|
5006
5014
|
try {
|
|
5007
|
-
await sandboxClient.command(sandbox, `mkdir -p ${CLI_DIR}`);
|
|
5015
|
+
const made = await sandboxClient.command(sandbox, `sudo mkdir -p ${CLI_DIR} && sudo chown -R "$(id -u):$(id -g)" ${SANDBOX_DIR}`);
|
|
5016
|
+
if (made.exitCode !== 0) return bail(`making ${SANDBOX_DIR} in the sandbox failed (exit ${made.exitCode ?? "none"})${said(made.stderr)}`);
|
|
5008
5017
|
await sandboxClient.upload(sandbox, `${SANDBOX_DIR}/dist.tgz`, gzipSync(packFolder(runtime.cliBuild().distDir)));
|
|
5009
5018
|
if (skillPack !== void 0) {
|
|
5010
5019
|
await sandboxClient.upload(sandbox, `${SANDBOX_DIR}/skill-pack.tgz`, gzipSync(packFolder(skillPack)));
|
|
@@ -5137,7 +5146,7 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
5137
5146
|
function asContainerJob(job) {
|
|
5138
5147
|
return { ...job, container: job.sandbox.container };
|
|
5139
5148
|
}
|
|
5140
|
-
var READ_SECRET_LINE = `sudo cat ${SECRET_FILE} | base64 | tr -d '\\n'`;
|
|
5149
|
+
var READ_SECRET_LINE = `{ sudo cat ${SECRET_FILE} 2>/dev/null || sudo cat ${OLD_SANDBOX_DIR}/join-secret; } | base64 | tr -d '\\n'`;
|
|
5141
5150
|
async function rejoinSandboxBuild(input) {
|
|
5142
5151
|
const { runtime, own, log } = input;
|
|
5143
5152
|
const state = own.container;
|
|
@@ -5186,15 +5195,21 @@ async function rejoinOf(runtime, own) {
|
|
|
5186
5195
|
if (sandbox === void 0) throw new SandboxGoneError(own.sandboxId);
|
|
5187
5196
|
return { sandbox, sandboxed: runtimeInSandbox(runtime, sandbox), streams: services.streams, joinSecret };
|
|
5188
5197
|
}
|
|
5189
|
-
async function
|
|
5198
|
+
async function startBuildSupportAgain(runtime, own, sandbox, sandboxed) {
|
|
5190
5199
|
const state = own.container;
|
|
5191
|
-
const
|
|
5200
|
+
const remounted = await client(runtime).command(sandbox, `if [ -d ${HOST_BUILD_DIR} ]; then ${hostMountLine(state.volume)}; fi`);
|
|
5201
|
+
if (remounted.exitCode !== 0) throw new Error(`mounting the build's volume at ${HOST_BUILD_DIR} in the sandbox again failed (exit ${remounted.exitCode ?? "none"})${said(remounted.stderr)}`);
|
|
5192
5202
|
const notReady = await ensureNetworkReady(sandboxed, state);
|
|
5193
5203
|
if (notReady !== void 0) throw new Error(notReady);
|
|
5194
5204
|
if (state.network !== void 0) {
|
|
5195
5205
|
const forwarding = await sandboxed.host.start(joinForwarderName(state.container));
|
|
5196
5206
|
if (forwarding.status !== 0) throw new Error(`the build's join forwarder could not be started again (exit ${forwarding.status})`);
|
|
5197
5207
|
}
|
|
5208
|
+
}
|
|
5209
|
+
async function startSandboxContainerAgain(runtime, own, rejoin, jobDir, log) {
|
|
5210
|
+
const state = own.container;
|
|
5211
|
+
const { sandbox, sandboxed } = rejoin;
|
|
5212
|
+
await startBuildSupportAgain(runtime, own, sandbox, sandboxed);
|
|
5198
5213
|
const started = await sandboxed.host.start(state.container);
|
|
5199
5214
|
if (started.status !== 0) throw new Error(`the build's container could not be started again (exit ${started.status})`);
|
|
5200
5215
|
if (!await waitForRelay(sandboxed, state.container)) throw new Error("the relay in the build's container did not start again");
|
|
@@ -5271,9 +5286,14 @@ async function probeSandboxCommand(runtime, state, offset) {
|
|
|
5271
5286
|
{ container: state.container.container, user: state.container.agentUser ?? ADDED_USER, env: NO_ENV, argv: probeArgvOf(offset) },
|
|
5272
5287
|
{ timeoutMs: 6e4 }
|
|
5273
5288
|
);
|
|
5274
|
-
|
|
5289
|
+
if (result.status === 0) return parseProbe(result.stdout);
|
|
5290
|
+
if (CONTAINER_NOT_RUNNING.test(result.stderr)) {
|
|
5291
|
+
state.container.stopped = true;
|
|
5292
|
+
throw new SandboxContainerStoppedError(state.container.container);
|
|
5293
|
+
}
|
|
5294
|
+
return void 0;
|
|
5275
5295
|
} catch (err) {
|
|
5276
|
-
if (err instanceof SandboxError && err.status === 404) throw await goneReason(runtime, state) ?? new SandboxGoneError(state.sandboxId);
|
|
5296
|
+
if (err instanceof SandboxError && (err.status === 404 || err.status === 410)) throw await goneReason(runtime, state) ?? new SandboxGoneError(state.sandboxId);
|
|
5277
5297
|
if (err instanceof SandboxError) return void 0;
|
|
5278
5298
|
throw err;
|
|
5279
5299
|
}
|
|
@@ -5288,7 +5308,13 @@ async function endSandboxCommand(runtime, state, jobDir, warn) {
|
|
|
5288
5308
|
const sandboxed = await inSandbox(runtime, state);
|
|
5289
5309
|
for (let reads = 0; reads < MAX_TAIL_READS2; reads++) {
|
|
5290
5310
|
const offset = commandLogOffset(jobDir, state.commandLogBase);
|
|
5291
|
-
|
|
5311
|
+
let probe;
|
|
5312
|
+
try {
|
|
5313
|
+
probe = await probeSandboxCommand(runtime, state, offset);
|
|
5314
|
+
} catch (err) {
|
|
5315
|
+
if (err instanceof SandboxContainerStoppedError) break;
|
|
5316
|
+
throw err;
|
|
5317
|
+
}
|
|
5292
5318
|
if (probe === void 0) break;
|
|
5293
5319
|
appendCommandLog(jobDir, probe.bytes);
|
|
5294
5320
|
if (probe.bytes.length === 0 || offset + probe.bytes.length >= probe.size) break;
|
|
@@ -5336,8 +5362,11 @@ async function restoreSessionIntoSandbox(runtime, own, keptDir, meta, job) {
|
|
|
5336
5362
|
}
|
|
5337
5363
|
async function ensureSandboxContainerRunning(runtime, own) {
|
|
5338
5364
|
try {
|
|
5339
|
-
const
|
|
5365
|
+
const sandbox = await sandboxOfBuild(runtime, own);
|
|
5366
|
+
if (sandbox === void 0) throw new SandboxGoneError(own.sandboxId);
|
|
5367
|
+
const sandboxed = runtimeInSandbox(runtime, sandbox);
|
|
5340
5368
|
if (own.container.stopped !== true) return void 0;
|
|
5369
|
+
await startBuildSupportAgain(runtime, own, sandbox, sandboxed);
|
|
5341
5370
|
const started = await sandboxed.host.start(own.container.container);
|
|
5342
5371
|
return started.status === 0 ? void 0 : `the build's container could not be started again (exit ${started.status})`;
|
|
5343
5372
|
} catch (err) {
|
|
@@ -9783,6 +9812,12 @@ async function stopProcessGroup(pid, opts = {}) {
|
|
|
9783
9812
|
}
|
|
9784
9813
|
}
|
|
9785
9814
|
}
|
|
9815
|
+
function jobTimeLimitMinutes(job, config) {
|
|
9816
|
+
return job.timeLimitMinutes ?? config.timeLimitMinutes;
|
|
9817
|
+
}
|
|
9818
|
+
function withJobTimeLimit(config, job) {
|
|
9819
|
+
return { ...config, timeLimitMinutes: jobTimeLimitMinutes(job, config) };
|
|
9820
|
+
}
|
|
9786
9821
|
function isTimedOut(startedAtMs, nowMs, timeLimitMinutes) {
|
|
9787
9822
|
return nowMs - startedAtMs > timeLimitMinutes * 6e4;
|
|
9788
9823
|
}
|
|
@@ -14080,4 +14115,4 @@ async function runHostChecks(input) {
|
|
|
14080
14115
|
}
|
|
14081
14116
|
}
|
|
14082
14117
|
|
|
14083
|
-
export { ADOPTED_FETCH_RETRY_WINDOW_MS, ALREADY_RELEASED, AttemptLogBook, EXIT_CODE_FILE, GUEST_USAGE_INTERVAL_MS, HELPER_ENV, KIND_LABEL, LEASE_SECONDS, MAX_CHECK_ITEMS_BYTES, MICROVM_COMMAND_DIR, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, RENEW_INTERVAL_SECONDS, RunnerInitError, SANDBOX_MACHINES, SandboxGoneError, agentCredentialCheck, appendCommandLog, attemptNote, builtOf, checksIn, claimPermissionProblem, claimRun, commandItems, commandLogOffset, containerCommandExec, createContainerRuntime, createGatewaySandboxClient, createHousekeepingDocker, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deliverCommitHooks, deliverContainerHooks, deliverExecMaven, deliverJobFiles, deliverSandboxHooks, describeHookEnd, describeMachineDocker, detectMachine, ensureFirecrackerAndJailer, ensureNetworkReady, ensureTunnel, environmentFor, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedClaudeKey, filesAreCopied, finishJob, foldSample, formerSkillProblem, formerSkillQueues, freeItemDisksUntil, gatewayRefusalReason, gitRemoteFor, helperFirecrackerNote, helperSocketPath, holdManagedBuildSettings, holdManagedClaudeKey, hookLimitsFor, hostCommandEnvironment, hostEnvironment, housekeepingDockerIfReachable, inSandbox, inTeardown, installTrust, isContainerTracked, isGroupAlive, isIdle, isIsolatedJob, isJudgeCheck, isMicroVmTracked, isPlaceholderCommand, isReadable, isSandboxTracked, isTimedOut, isTracked, isUnfinished, itemScope, itemTag, jobEnv, jobRecordsClaim, judgeCredential, judgeProbe, keepGhConfigCurrent, keptCommitsLine, keptSandboxIds, keptSessionDir, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listAdoptableJobs, listItemDisks, listTrackedJobs, listUnreadableJobs, listenOnBroker, makeRecorder, managedBuildSettingsFor, measureDisk, microVmArchSupported, microVmAssetsPinned, microVmCommandLine, microVmOomKills, missingPermissionFix, missingPermissionOf, modellessProblem, modellessQueues, nativeWindowsSandboxRefusal, needsAgentCredential, needsBuildSkill, needsRenew, outcomeFromExitCode, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, prepareBranch, prepareResume, prepareRunnerInit, probeCommand, probeHelper, probeMicroVmCommand, probeSandboxCommand, provisionContainer, provisionEnvironment, provisionMicroVm, provisionSandbox, reachDockerStep, readConfigObject, readCpuUsec, readDefinitions, readProvisionOut, readRecords, readWorkItem, recordsProofsOnly, recoverLostJobs, rejoinSandboxBuild, releaseLease, removeOldestUntil, removeRunnerBlock, renewLease, renewRun, resolveHostBuild, restartSender, restoreSessionIntoContainer, restoreSessionIntoMicroVm, restoreSessionIntoSandbox, restoreWork, retryFailedReleases, runCommand, runCommandOf, runDecision, runHook, runHostChecks, runHousekeeping, runRunnerInit, runWithSpawn, sampleGuest, savedStatesDir, scrubReason, serveLease, sessionGuestOfContainer, sessionGuestOfMicroVm, sessionGuestOfSandbox, setStage, setUpRunnerCgroup, shellQuote, startHostServices, startMicroVmCommand, startSandboxCommand, startSender, startServicesFor, stopOrphanedMicroVms, stoppedHelperReason, stripTerminalControls, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, sweepSandboxes, testProofIn, timeoutAfter, treeFileText, unfinishedJobs, usableCpus, vmAlive, withTunnelLog, workRestoredEnv, workdirProblem, writeGuestGhConfig, writeRunnerInit };
|
|
14118
|
+
export { ADOPTED_FETCH_RETRY_WINDOW_MS, ALREADY_RELEASED, AttemptLogBook, EXIT_CODE_FILE, GUEST_USAGE_INTERVAL_MS, HELPER_ENV, KIND_LABEL, LEASE_SECONDS, MAX_CHECK_ITEMS_BYTES, MICROVM_COMMAND_DIR, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, RENEW_INTERVAL_SECONDS, RunnerInitError, SANDBOX_MACHINES, SandboxContainerStoppedError, SandboxGoneError, agentCredentialCheck, appendCommandLog, attemptNote, builtOf, checksIn, claimPermissionProblem, claimRun, commandItems, commandLogOffset, containerCommandExec, createContainerRuntime, createGatewaySandboxClient, createHousekeepingDocker, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deliverCommitHooks, deliverContainerHooks, deliverExecMaven, deliverJobFiles, deliverSandboxHooks, describeHookEnd, describeMachineDocker, detectMachine, ensureFirecrackerAndJailer, ensureNetworkReady, ensureTunnel, environmentFor, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedClaudeKey, filesAreCopied, finishJob, foldSample, formerSkillProblem, formerSkillQueues, freeItemDisksUntil, gatewayRefusalReason, gitRemoteFor, helperFirecrackerNote, helperSocketPath, holdManagedBuildSettings, holdManagedClaudeKey, hookLimitsFor, hostCommandEnvironment, hostEnvironment, housekeepingDockerIfReachable, inSandbox, inTeardown, installTrust, isContainerTracked, isGroupAlive, isIdle, isIsolatedJob, isJudgeCheck, isMicroVmTracked, isPlaceholderCommand, isReadable, isSandboxTracked, isTimedOut, isTracked, isUnfinished, itemScope, itemTag, jobEnv, jobRecordsClaim, jobTimeLimitMinutes, judgeCredential, judgeProbe, keepGhConfigCurrent, keptCommitsLine, keptSandboxIds, keptSessionDir, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listAdoptableJobs, listItemDisks, listTrackedJobs, listUnreadableJobs, listenOnBroker, makeRecorder, managedBuildSettingsFor, measureDisk, microVmArchSupported, microVmAssetsPinned, microVmCommandLine, microVmOomKills, missingPermissionFix, missingPermissionOf, modellessProblem, modellessQueues, nativeWindowsSandboxRefusal, needsAgentCredential, needsBuildSkill, needsRenew, outcomeFromExitCode, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, prepareBranch, prepareResume, prepareRunnerInit, probeCommand, probeHelper, probeMicroVmCommand, probeSandboxCommand, provisionContainer, provisionEnvironment, provisionMicroVm, provisionSandbox, reachDockerStep, readConfigObject, readCpuUsec, readDefinitions, readProvisionOut, readRecords, readWorkItem, recordsProofsOnly, recoverLostJobs, rejoinSandboxBuild, releaseLease, removeOldestUntil, removeRunnerBlock, renewLease, renewRun, resolveHostBuild, restartSender, restoreSessionIntoContainer, restoreSessionIntoMicroVm, restoreSessionIntoSandbox, restoreWork, retryFailedReleases, runCommand, runCommandOf, runDecision, runHook, runHostChecks, runHousekeeping, runRunnerInit, runWithSpawn, sampleGuest, savedStatesDir, scrubReason, serveLease, sessionGuestOfContainer, sessionGuestOfMicroVm, sessionGuestOfSandbox, setStage, setUpRunnerCgroup, shellQuote, startHostServices, startMicroVmCommand, startSandboxCommand, startSender, startServicesFor, stopOrphanedMicroVms, stoppedHelperReason, stripTerminalControls, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, sweepSandboxes, testProofIn, timeoutAfter, treeFileText, unfinishedJobs, usableCpus, vmAlive, withJobTimeLimit, withTunnelLog, workRestoredEnv, workdirProblem, writeGuestGhConfig, writeRunnerInit };
|
|
@@ -108,7 +108,7 @@ var MAX_IMAGE_LENGTH = 200;
|
|
|
108
108
|
var KEYS = ["provider", "machine", "snapshot", "image", "allowHosts", "idleMinutes", "docker"];
|
|
109
109
|
var MANAGED_SNAPSHOT = "outerlayer";
|
|
110
110
|
function machineSizeOf(machine) {
|
|
111
|
-
const { vcpus, memoryGiB, diskGB } = machine === "large" ? { vcpus:
|
|
111
|
+
const { vcpus, memoryGiB, diskGB } = machine === "large" ? { vcpus: 8, memoryGiB: 32, diskGB: 30 } : { vcpus: 4, memoryGiB: 16, diskGB: 20 };
|
|
112
112
|
return { vcpu: vcpus, memoryMib: memoryGiB * 1024, diskGib: Math.ceil(diskGB * 1e9 / GIB) };
|
|
113
113
|
}
|
|
114
114
|
function sandboxSizeOf(build) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { LAUNCH_AGENT_ENV } from './chunk-TXKHD4Q6.js';
|
|
4
4
|
import { execStartArgv } from './chunk-PT3DOY6P.js';
|
|
5
|
-
import { DEFAULT_UNIT_NAME } from './chunk-
|
|
5
|
+
import { DEFAULT_UNIT_NAME } from './chunk-RRRW2M4B.js';
|
|
6
6
|
import { runnerDir } from './chunk-DYV2OC4S.js';
|
|
7
7
|
import { join, dirname } from 'path';
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
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-S3ZX2GTO.js';
|
|
4
4
|
import { shellFunctionInstalled, removeShellFunction, installShellFunction, SHELL_FUNCTION_LINE } from './chunk-IRFN2ZHJ.js';
|
|
5
5
|
import { runConnect, hasUncommittedPolicy, commitCommandsFor } from './chunk-IQWBUZ75.js';
|
|
6
6
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { builtinKind, keepsHostBuilder } from './chunk-
|
|
3
|
+
import { builtinKind, keepsHostBuilder } from './chunk-PIXDSHVH.js';
|
|
4
4
|
import { parseSize } from './chunk-TCPWJBH5.js';
|
|
5
5
|
import { runnerDir } from './chunk-DYV2OC4S.js';
|
|
6
6
|
import { FD_SLOTS_PER_BUILD, FD_STORE_ENV, BUILD_SLICE_MEMORY_ENV, credentialLineIn, withoutCredentialLines } from './chunk-XOJRFV3U.js';
|
|
@@ -1094,7 +1094,7 @@ function doctorExitCode(checks) {
|
|
|
1094
1094
|
// src/doctor-report.ts
|
|
1095
1095
|
async function gatherDoctorChecks(options = {}) {
|
|
1096
1096
|
const { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK } = await import('./build-disk-KN7OJLKB.js');
|
|
1097
|
-
const { defaultRunnerConfigPath, hasRunnerBlock, keyRunnerFactory, loadRunnerConfig, runnerVmOf } = await import('./config-
|
|
1097
|
+
const { defaultRunnerConfigPath, hasRunnerBlock, keyRunnerFactory, loadRunnerConfig, runnerVmOf } = await import('./config-TGFG7IID.js');
|
|
1098
1098
|
const configPath = options.configPath ?? defaultRunnerConfigPath();
|
|
1099
1099
|
const runnerHost = hasRunnerBlock(configPath);
|
|
1100
1100
|
const hooks = (() => {
|
|
@@ -1122,7 +1122,7 @@ async function gatherDoctorChecks(options = {}) {
|
|
|
1122
1122
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1123
1123
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1124
1124
|
} else if (hasRunnerBlock(configPath)) {
|
|
1125
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1125
|
+
const { runnerHostChecks } = await import('./doctor-2PHGAJBZ.js');
|
|
1126
1126
|
const gateway = (() => {
|
|
1127
1127
|
try {
|
|
1128
1128
|
const loaded = loadRunnerConfig(configPath);
|
|
@@ -1150,7 +1150,7 @@ async function gatherDoctorChecks(options = {}) {
|
|
|
1150
1150
|
const service = await (async () => {
|
|
1151
1151
|
const { existsSync: existsSync3 } = await import('fs');
|
|
1152
1152
|
if (process.platform !== "linux" || !existsSync3("/run/systemd/system")) return void 0;
|
|
1153
|
-
const { inspectRunnerService } = await import('./find-unit-
|
|
1153
|
+
const { inspectRunnerService } = await import('./find-unit-HKCVRS7L.js');
|
|
1154
1154
|
return inspectRunnerService(configPath);
|
|
1155
1155
|
})();
|
|
1156
1156
|
checks.push(...await runnerHostChecks({ configPath, hooks, gateway, repos, runner, service }));
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-UTSBE4MP.js';
|
|
4
4
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
|
|
5
|
-
import { reportFailedStart, fitImageBuildMemory } from './chunk-
|
|
6
|
-
import { renderUpdateSteps } from './chunk-
|
|
5
|
+
import { reportFailedStart, fitImageBuildMemory } from './chunk-WEUBA44W.js';
|
|
6
|
+
import { renderUpdateSteps } from './chunk-5YEWBLLX.js';
|
|
7
7
|
import { decideInstalledSwitch } from './chunk-TXKHD4Q6.js';
|
|
8
8
|
import { writeFleetState } from './chunk-Y6FI3HCQ.js';
|
|
9
9
|
import { writePendingUpdate } from './chunk-XOKGCNSG.js';
|
|
10
|
-
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-
|
|
10
|
+
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-D7S7PQT5.js';
|
|
11
11
|
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-PT3DOY6P.js';
|
|
12
|
-
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runDecision, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, restoreSessionIntoSandbox, restoreWork, keptSessionDir, workRestoredEnv, sessionGuestOfMicroVm, sessionGuestOfContainer, sessionGuestOfSandbox, recordsProofsOnly, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionSandbox, deliverSandboxHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, keptCommitsLine, currentSkillCommand, formerSkillProblem, commandLogOffset, startSandboxCommand, MICROVM_COMMAND_DIR, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isSandboxTracked, isContainerTracked, isMicroVmTracked, probeSandboxCommand, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, SandboxGoneError, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isIsolatedJob, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, vmAlive, filesAreCopied, inSandbox, listItemDisks, usableCpus, hookLimitsFor, runCommandOf, AttemptLogBook, environmentFor, builtOf, judgeCredential, readWorkItem, makeRecorder, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, keptSandboxIds, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, rejoinSandboxBuild, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, treeFileText, timeoutAfter, scrubReason, ensureNetworkReady, ADOPTED_FETCH_RETRY_WINDOW_MS, managedBuildSettingsFor, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, deliverJobFiles, inTeardown } from './chunk-
|
|
12
|
+
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runDecision, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, restoreSessionIntoSandbox, restoreWork, keptSessionDir, workRestoredEnv, sessionGuestOfMicroVm, sessionGuestOfContainer, sessionGuestOfSandbox, recordsProofsOnly, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, withJobTimeLimit, deliverContainerHooks, provisionSandbox, deliverSandboxHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, keptCommitsLine, currentSkillCommand, formerSkillProblem, commandLogOffset, startSandboxCommand, MICROVM_COMMAND_DIR, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isSandboxTracked, isContainerTracked, isMicroVmTracked, probeSandboxCommand, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, SandboxGoneError, SandboxContainerStoppedError, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isIsolatedJob, jobTimeLimitMinutes, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, vmAlive, filesAreCopied, inSandbox, listItemDisks, usableCpus, hookLimitsFor, runCommandOf, AttemptLogBook, environmentFor, builtOf, judgeCredential, readWorkItem, makeRecorder, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, keptSandboxIds, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, rejoinSandboxBuild, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, treeFileText, timeoutAfter, scrubReason, ensureNetworkReady, ADOPTED_FETCH_RETRY_WINDOW_MS, managedBuildSettingsFor, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, deliverJobFiles, inTeardown } from './chunk-LFAJCUDD.js';
|
|
13
13
|
import { RUNNER_PROTOCOL } from './chunk-JXZ3LIHN.js';
|
|
14
14
|
import { criteriaOf, loadCitationFinder, wholeItems, itemsSentence, oneLineReason, wholeEntries, parseJudgeAnswer } from './chunk-PG4UW6QW.js';
|
|
15
|
-
import { RUNNER_RESERVE_BYTES } from './chunk-
|
|
15
|
+
import { RUNNER_RESERVE_BYTES } from './chunk-RRRW2M4B.js';
|
|
16
16
|
import { RepoFilter } from './chunk-TQ3PXYPJ.js';
|
|
17
17
|
import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-B4XB5QFD.js';
|
|
18
18
|
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-RIITHK4F.js';
|
|
19
19
|
import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
|
|
20
|
-
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls, itemCalls, configForJob } from './chunk-
|
|
20
|
+
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls, itemCalls, configForJob } from './chunk-IZHE3WOW.js';
|
|
21
21
|
import { fetchCommit, readBranchHead, diffBetween } from './chunk-SDLWJF6H.js';
|
|
22
22
|
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-MGN525G6.js';
|
|
23
23
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
24
24
|
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-YDB72T5Z.js';
|
|
25
25
|
import { WorkCommandError, isSignatureRefusal, getJson, postJson, getBytes } from './chunk-BAPRSDUR.js';
|
|
26
|
-
import { keyRunnerFactory, readsOnly, isBuiltinSandbox, isBuiltinContainer, isBuiltinVm, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, DEFAULT_CHECK_TIME_LIMIT_MINUTES, readOnlyRemoteOf, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS, readOnlyOption } from './chunk-
|
|
26
|
+
import { keyRunnerFactory, readsOnly, isBuiltinSandbox, isBuiltinContainer, isBuiltinVm, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, DEFAULT_CHECK_TIME_LIMIT_MINUTES, readOnlyRemoteOf, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS, readOnlyOption } from './chunk-PIXDSHVH.js';
|
|
27
27
|
import { allocatedBytes, freeBytes, formatBytes } from './chunk-OC3BSNNE.js';
|
|
28
28
|
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, JUDGE_TREE, exceedsDisk, runnerLabelValue, builderName, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, judgeCommand, JUDGE_DIR, JUDGE_MAX_TURNS } from './chunk-TCPWJBH5.js';
|
|
29
29
|
import { loadHostKey, ensureHostKey, signerFor } from './chunk-NDDXBJMX.js';
|
|
@@ -44,8 +44,8 @@ createRequire(import.meta.url);
|
|
|
44
44
|
var GIB = 1024 ** 3;
|
|
45
45
|
var GB = 1e9;
|
|
46
46
|
var BUILD_SIZES = {
|
|
47
|
-
small: { memoryGiB:
|
|
48
|
-
large: { memoryGiB:
|
|
47
|
+
small: { memoryGiB: 16, vcpus: 4, diskGB: 20 },
|
|
48
|
+
large: { memoryGiB: 32, vcpus: 8, diskGB: 30 }
|
|
49
49
|
};
|
|
50
50
|
var UNLIMITED_DISK_GB = 1e9;
|
|
51
51
|
var NONE = { memoryGiB: 0, vcpus: 0, diskGB: 0 };
|
|
@@ -3476,7 +3476,8 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
3476
3476
|
...fleet === void 0 ? {} : { appId: fleet.appId, organizationId: fleet.organizationId, size: fleet.size },
|
|
3477
3477
|
...primary === void 0 ? {} : { repository: primary.repository, repositories },
|
|
3478
3478
|
...jobAgentId === void 0 ? {} : { agent: jobAgentId },
|
|
3479
|
-
startedAt: startedAt.toISOString()
|
|
3479
|
+
startedAt: startedAt.toISOString(),
|
|
3480
|
+
timeLimitMinutes: state.config.timeLimitMinutes
|
|
3480
3481
|
};
|
|
3481
3482
|
writeJobFile(jobFilePath, job);
|
|
3482
3483
|
const active = {
|
|
@@ -3492,7 +3493,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
3492
3493
|
const claimLine = `claimed ${queue} ${itemTag(job)} ${item.trackerKey} (claim ${shortClaim(claimId)}) \u2192 ${relativeToRunner(runnerRoot, dirPath)}`;
|
|
3493
3494
|
log.line(claimLine);
|
|
3494
3495
|
attemptLogsOf(state).note(item.number, claimLine, itemScope(job));
|
|
3495
|
-
const hookLimits = () => hookLimitsFor(state.config, startedAt.getTime(), state.deps.now);
|
|
3496
|
+
const hookLimits = () => hookLimitsFor(withJobTimeLimit(state.config, job), startedAt.getTime(), state.deps.now);
|
|
3496
3497
|
const tag = itemTag(job);
|
|
3497
3498
|
const noteOnce = attemptNote(log, tag);
|
|
3498
3499
|
const containerMode = isBuiltinContainer(state.config.hooks.provision);
|
|
@@ -3580,7 +3581,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
3580
3581
|
let cgroup;
|
|
3581
3582
|
if (containerMode) {
|
|
3582
3583
|
const provisioned = await provisionContainer({
|
|
3583
|
-
config: claimCalls(state.config, active.job),
|
|
3584
|
+
config: claimCalls(withJobTimeLimit(state.config, active.job), active.job),
|
|
3584
3585
|
...active.job.organizationId === void 0 ? {} : { organizationId: active.job.organizationId, claimId: active.job.claimId },
|
|
3585
3586
|
runtime: runtimeOf(state),
|
|
3586
3587
|
queue,
|
|
@@ -3601,7 +3602,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
3601
3602
|
writeJobFile(jobFilePath, active.job);
|
|
3602
3603
|
},
|
|
3603
3604
|
aborted: () => active.ending,
|
|
3604
|
-
deadlineMs:
|
|
3605
|
+
deadlineMs: hookLimits().endBy,
|
|
3605
3606
|
fetchImpl: state.deps.fetchImpl,
|
|
3606
3607
|
now: state.deps.now,
|
|
3607
3608
|
leaseExpiryMs: () => leaseExpiresAtMs(active.job),
|
|
@@ -3627,7 +3628,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
3627
3628
|
}
|
|
3628
3629
|
} else if (sandboxMode) {
|
|
3629
3630
|
const provisioned = await provisionSandbox({
|
|
3630
|
-
config: claimCalls(state.config, active.job),
|
|
3631
|
+
config: claimCalls(withJobTimeLimit(state.config, active.job), active.job),
|
|
3631
3632
|
...active.job.organizationId === void 0 ? {} : { organizationId: active.job.organizationId, claimId: active.job.claimId },
|
|
3632
3633
|
runtime: runtimeOf(state),
|
|
3633
3634
|
queue,
|
|
@@ -3679,7 +3680,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
3679
3680
|
}
|
|
3680
3681
|
} else if (vmMode) {
|
|
3681
3682
|
const provisioned = await provisionMicroVm({
|
|
3682
|
-
config: claimCalls(state.config, active.job),
|
|
3683
|
+
config: claimCalls(withJobTimeLimit(state.config, active.job), active.job),
|
|
3683
3684
|
...active.job.organizationId === void 0 ? {} : { organizationId: active.job.organizationId, claimId: active.job.claimId },
|
|
3684
3685
|
runtime: runtimeOf(state),
|
|
3685
3686
|
queue,
|
|
@@ -3700,7 +3701,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
3700
3701
|
writeJobFile(jobFilePath, active.job);
|
|
3701
3702
|
},
|
|
3702
3703
|
aborted: () => active.ending,
|
|
3703
|
-
deadlineMs:
|
|
3704
|
+
deadlineMs: hookLimits().endBy,
|
|
3704
3705
|
fetchImpl: state.deps.fetchImpl,
|
|
3705
3706
|
now: state.deps.now,
|
|
3706
3707
|
leaseTimeLeftMs: leaseTimeLeftFor(state, active),
|
|
@@ -4323,7 +4324,7 @@ async function probeBuild(state, active) {
|
|
|
4323
4324
|
return;
|
|
4324
4325
|
}
|
|
4325
4326
|
} catch (err) {
|
|
4326
|
-
if (err instanceof SandboxGoneError) {
|
|
4327
|
+
if (err instanceof SandboxGoneError || err instanceof SandboxContainerStoppedError) {
|
|
4327
4328
|
log.error(`${tag} ${err.message} \xB7 ending job as interrupted`);
|
|
4328
4329
|
void endJob(state, active, "interrupted", { stage: "command", reason: err.message });
|
|
4329
4330
|
} else {
|
|
@@ -4392,9 +4393,9 @@ async function watchTick(state, active, nowMs, logMtimeMs) {
|
|
|
4392
4393
|
await endJob(state, active, "failed", { stage: started ? "command" : "provision", reason: unreachable });
|
|
4393
4394
|
return;
|
|
4394
4395
|
}
|
|
4395
|
-
const limitMinutes = active.job.run === void 0 ? state.config
|
|
4396
|
+
const limitMinutes = active.job.run === void 0 ? jobTimeLimitMinutes(active.job, state.config) : active.job.run.timeLimitSeconds / 60;
|
|
4396
4397
|
if (isTimedOut(new Date(active.job.startedAt).getTime(), nowMs, limitMinutes)) {
|
|
4397
|
-
log.line(`${tag} past the ${active.job.run === void 0 ? `${
|
|
4398
|
+
log.line(`${tag} past the ${active.job.run === void 0 ? `${limitMinutes}m` : `${active.job.run.timeLimitSeconds}s`} time limit \xB7 ending job as timed_out`);
|
|
4398
4399
|
await endJob(state, active, "timed_out");
|
|
4399
4400
|
return;
|
|
4400
4401
|
}
|
|
@@ -4824,7 +4825,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
4824
4825
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
4825
4826
|
const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
|
|
4826
4827
|
const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
|
|
4827
|
-
return (await import('./check-
|
|
4828
|
+
return (await import('./check-GR2WNESK.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
4828
4829
|
},
|
|
4829
4830
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
4830
4831
|
log
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { scrubReason, stripTerminalControls } from './chunk-
|
|
4
|
-
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-
|
|
3
|
+
import { scrubReason, stripTerminalControls } from './chunk-LFAJCUDD.js';
|
|
4
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-RRRW2M4B.js';
|
|
5
5
|
import { RunnerAlreadyRunningError, readPidFile } from './chunk-MGN525G6.js';
|
|
6
6
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
7
7
|
import { isSignatureRefusal, postJson } from './chunk-BAPRSDUR.js';
|
|
8
|
-
import { keyRunnerFactory } from './chunk-
|
|
8
|
+
import { keyRunnerFactory } from './chunk-PIXDSHVH.js';
|
|
9
9
|
import { signerFor } from './chunk-NDDXBJMX.js';
|
|
10
10
|
import { pidFilePath } from './chunk-DYV2OC4S.js';
|
|
11
11
|
import { readFileSync } from 'fs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { escapeUnitPath, UNIT_MARKER, DEFAULT_UNIT_NAME } from './chunk-
|
|
3
|
+
import { escapeUnitPath, UNIT_MARKER, DEFAULT_UNIT_NAME } from './chunk-RRRW2M4B.js';
|
|
4
4
|
import { inspectService, realInspectProbes } from './chunk-XOJRFV3U.js';
|
|
5
5
|
import { realpathSync, readFileSync, readdirSync } from 'fs';
|
|
6
6
|
import { resolve, dirname, join } from 'path';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { helperSocketPath } from './chunk-
|
|
4
|
-
import { UNIT_MARKER } from './chunk-
|
|
3
|
+
import { helperSocketPath } from './chunk-LFAJCUDD.js';
|
|
4
|
+
import { UNIT_MARKER } from './chunk-RRRW2M4B.js';
|
|
5
5
|
import { runnerDir } from './chunk-DYV2OC4S.js';
|
|
6
6
|
import { createHash } from 'crypto';
|
|
7
7
|
import { join } from 'path';
|