@outerlayer/cli 0.40.0-next.20261116222734 → 0.40.0-next.20261117002704
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 +1 -1
- package/dist/build-info.json +1 -1
- package/dist/{caller-MVRKFUPB.js → caller-LKNUKTP3.js} +2 -2
- package/dist/{check-WLMKHMCL.js → check-XYWYU6GK.js} +15 -14
- package/dist/{chunk-WD23Q7ML.js → chunk-2SVXVICA.js} +8 -8
- package/dist/{chunk-QNIUSZLK.js → chunk-3AH7ZUAK.js} +1 -1
- package/dist/{chunk-D3IU5TVW.js → chunk-5VRVDHNH.js} +1 -1
- package/dist/{chunk-NUJE7OQ6.js → chunk-BFR4W3RX.js} +3 -3
- package/dist/{chunk-EXRGYNAG.js → chunk-EJWKKEOB.js} +1 -1
- package/dist/{chunk-AUCEBDHF.js → chunk-EX4QXXYW.js} +3 -3
- package/dist/{chunk-AXDEXXW7.js → chunk-H6VZZCGC.js} +21 -16
- package/dist/{chunk-OXI2EYW2.js → chunk-HZIY7YCX.js} +3 -3
- package/dist/{chunk-5CJHLY2E.js → chunk-LQHCJUA3.js} +2 -2
- package/dist/{chunk-ZZTHYE3Q.js → chunk-NMFZCE4P.js} +1 -1
- package/dist/{chunk-EU4BCIV5.js → chunk-OBXKW6VF.js} +1 -1
- package/dist/{chunk-27RFAEUO.js → chunk-PHWQHRZG.js} +3 -3
- package/dist/{chunk-VLA3DLFW.js → chunk-SOTFSLYA.js} +1 -1
- package/dist/{chunk-XB46SR6E.js → chunk-VLCUYNED.js} +1 -1
- package/dist/{chunk-ARQEDDVJ.js → chunk-Z4R7JF6C.js} +1 -1
- package/dist/{chunk-H2SUWKUA.js → chunk-Z5J6IPYQ.js} +3 -4
- package/dist/{cli-YT6KBDV3.js → cli-APYYEGI6.js} +50 -60
- package/dist/{command-4AEE7LZV.js → command-LTPHM4KZ.js} +8 -8
- package/dist/{config-AOOU7S5D.js → config-K6RF5TY6.js} +1 -1
- package/dist/{container-start-2YFB7N2U.js → container-start-FPLQOZTD.js} +7 -7
- package/dist/{doctor-B3H3ZEL4.js → doctor-S3QZPQ2F.js} +7 -7
- package/dist/{find-unit-HWDRJ75M.js → find-unit-3WJF7RFR.js} +3 -3
- package/dist/{host-checks-2RGIXCFD.js → host-checks-DQVDLDZG.js} +5 -5
- package/dist/index.js +1 -1
- package/dist/{init-N4KXWTN7.js → init-6PQ4UZ56.js} +5 -5
- package/dist/{init-BPYRQ2ZW.js → init-DADXCFJX.js} +5 -5
- package/dist/{init-agent-H6CRATMS.js → init-agent-I7R4HUIQ.js} +5 -5
- package/dist/{init-cmd-QSWFPSGC.js → init-cmd-6YT5MOGN.js} +2 -2
- package/dist/{install-cmd-UJCTAZW5.js → install-cmd-VCLVT3GB.js} +2 -2
- package/dist/{launch-agent-6PFFYQQQ.js → launch-agent-425NNQPI.js} +3 -3
- package/dist/{loop-UW2AVKUY.js → loop-AUAQVFAU.js} +9 -9
- package/dist/{machine-N3PCQXIZ.js → machine-HPME6PXN.js} +5 -5
- package/dist/{runner-env-JVFGDYQJ.js → runner-env-6KNKI2TZ.js} +3 -3
- package/dist/{runner-key-CHVGBBF6.js → runner-key-E64VN3MQ.js} +5 -5
- package/dist/{setup-wiring-UABJKAG2.js → setup-wiring-EX7C5PTG.js} +7 -7
- package/dist/{status-AWDOSN4J.js → status-LW5OM4ON.js} +5 -5
- package/dist/{update-steps-5GB4G27J.js → update-steps-JFVCPZ24.js} +6 -6
- package/dist/{work-claim-cmd-77RLQXAT.js → work-claim-cmd-W6SPUUDJ.js} +1 -1
- package/dist/{work-proofs-cmd-EKDMBBAJ.js → work-proofs-cmd-4CB6GZD4.js} +1 -1
- package/dist/{work-proofs-record-ARWWRX2W.js → work-proofs-record-IFVCQU2J.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -373,7 +373,7 @@ content:
|
|
|
373
373
|
`runner.sandbox.provider: "outerlayer"`. The runner calls no sandbox
|
|
374
374
|
provider's API and holds no provider key. It asks your gateway for the
|
|
375
375
|
sandbox of each claim with `POST /v1/work-items/{id}/claim/sandbox`, and sends
|
|
376
|
-
the
|
|
376
|
+
the idle and time limits and the runner's own label. It
|
|
377
377
|
ends, reads and lists its sandboxes, and asks for the address of the build's
|
|
378
378
|
relay, on `/v1/managed-sandboxes`. The gateway answers with one sandbox's
|
|
379
379
|
address and secret. The runner then calls that sandbox's data plane with the
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"2026-11-
|
|
1
|
+
{"id":"2026-11-17T00:34:05.861Z","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-EJWKKEOB.js';
|
|
4
|
+
import './chunk-Z5J6IPYQ.js';
|
|
5
5
|
import './chunk-5QF3CFE3.js';
|
|
6
6
|
import './chunk-RSD4TQOD.js';
|
|
7
7
|
import './chunk-47NQTKLX.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-2SVXVICA.js';
|
|
4
4
|
import './chunk-ENVJDHAN.js';
|
|
5
5
|
import './chunk-E7R2GIAW.js';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
import './chunk-HZIY7YCX.js';
|
|
7
|
+
import './chunk-VLCUYNED.js';
|
|
8
8
|
import './chunk-TXKHD4Q6.js';
|
|
9
9
|
import './chunk-BPAVTBGG.js';
|
|
10
10
|
import './chunk-W4QHG6VM.js';
|
|
11
|
-
import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-
|
|
11
|
+
import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-BFR4W3RX.js';
|
|
12
12
|
import './chunk-SU6GA65D.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-3AH7ZUAK.js';
|
|
14
|
+
import { createGatewaySandboxClient, gatewayRefusalReason, placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsAgentCredential, agentCredentialCheck, claimPermissionProblem, formerSkillQueues, modellessQueues, formerSkillProblem, modellessProblem } from './chunk-H6VZZCGC.js';
|
|
15
15
|
import './chunk-6YKJ2RKQ.js';
|
|
16
16
|
import './chunk-46D7LPS3.js';
|
|
17
17
|
import './chunk-I3LTIAOR.js';
|
|
18
18
|
import './chunk-2PGI6RDE.js';
|
|
19
|
-
import './chunk-
|
|
20
|
-
import './chunk-
|
|
19
|
+
import './chunk-SOTFSLYA.js';
|
|
20
|
+
import './chunk-OBXKW6VF.js';
|
|
21
21
|
import './chunk-UU3A53VB.js';
|
|
22
22
|
import './chunk-VAXBKKG4.js';
|
|
23
23
|
import './chunk-35MTVD6X.js';
|
|
@@ -28,7 +28,7 @@ import './chunk-C2PZOLN7.js';
|
|
|
28
28
|
import './chunk-B4XB5QFD.js';
|
|
29
29
|
import './chunk-3UK6W752.js';
|
|
30
30
|
import './chunk-TQMI335S.js';
|
|
31
|
-
import './chunk-
|
|
31
|
+
import './chunk-EJWKKEOB.js';
|
|
32
32
|
import './chunk-NN33FYXG.js';
|
|
33
33
|
import './chunk-3EK3YMRS.js';
|
|
34
34
|
import './chunk-BDB3DZ7X.js';
|
|
@@ -42,7 +42,7 @@ import './chunk-FJGYU2EK.js';
|
|
|
42
42
|
import './chunk-3XGZLUEU.js';
|
|
43
43
|
import './chunk-A7M4QXVX.js';
|
|
44
44
|
import './chunk-YRF7F2TQ.js';
|
|
45
|
-
import { keyRunnerFactory, loadRunnerConfig, RunnerConfigError, checkHooks } from './chunk-
|
|
45
|
+
import { keyRunnerFactory, loadRunnerConfig, RunnerConfigError, checkHooks } from './chunk-Z5J6IPYQ.js';
|
|
46
46
|
import './chunk-5QF3CFE3.js';
|
|
47
47
|
import './chunk-RSD4TQOD.js';
|
|
48
48
|
import './chunk-47NQTKLX.js';
|
|
@@ -126,6 +126,7 @@ async function askManagedSandboxes(config, fetchImpl) {
|
|
|
126
126
|
return err.code === "managed_sandboxes_unavailable" ? { refused, unavailable: true } : { refused };
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
+
var IGNORED_MACHINE_NOTE = "runner.sandbox.machine has no effect: the factory's build settings choose the size of each sandbox. Remove the key from the config";
|
|
129
130
|
async function runRunnerCheck(configPath, deps = {}) {
|
|
130
131
|
let config;
|
|
131
132
|
try {
|
|
@@ -203,10 +204,9 @@ async function runRunnerCheck(configPath, deps = {}) {
|
|
|
203
204
|
if (config.sandbox?.provider === "outerlayer" && config.fleet === true) {
|
|
204
205
|
sandboxLine = "sandboxes OuterLayer provides them for each claim, at the size the claim's factory sets";
|
|
205
206
|
} else if (config.sandbox?.provider === "outerlayer") {
|
|
206
|
-
const machine = config.sandbox.machine ?? "small";
|
|
207
207
|
const asked = await askManagedSandboxes(config, deps.fetchImpl);
|
|
208
208
|
if (asked.refused !== void 0) return { ok: false, check: "sandboxes", message: `${configPath}: ${asked.refused}` };
|
|
209
|
-
sandboxLine = `sandboxes OuterLayer provides them
|
|
209
|
+
sandboxLine = `sandboxes OuterLayer provides them, at the machine size in the factory's build settings${asked.unchecked === void 0 ? "" : ` \xB7 not checked: ${asked.unchecked}`}`;
|
|
210
210
|
} else if (config.sandbox !== void 0) {
|
|
211
211
|
const found = sandboxVariablesIn([deps.env ?? process.env], join(dirname(configPath), "runner.env"));
|
|
212
212
|
if ("error" in found) return { ok: false, check: "sandbox key", message: `${SANDBOX_VARIABLES.join(", ")} are not all in this shell, and ${found.path} could not be read to look for them: ${found.error}` };
|
|
@@ -253,9 +253,10 @@ async function runRunnerCheck(configPath, deps = {}) {
|
|
|
253
253
|
`repos include ${config.repos?.include?.join(", ") ?? "(all)"}`,
|
|
254
254
|
`repos exclude ${config.repos?.exclude?.join(", ") ?? "(none)"}`,
|
|
255
255
|
...formerSkill.length > 0 ? [`note ${formerSkillProblem(formerSkill)}`] : [],
|
|
256
|
-
...modelless.length > 0 ? [`note ${modellessProblem(modelless, agents)}`] : []
|
|
256
|
+
...modelless.length > 0 ? [`note ${modellessProblem(modelless, agents)}`] : [],
|
|
257
|
+
...config.sandbox?.machineIgnored === true ? [`note ${IGNORED_MACHINE_NOTE}`] : []
|
|
257
258
|
];
|
|
258
259
|
return { ok: true, lines, unverifiedReason, summary: config.fleet === true ? `${config.url} \xB7 fleet machine${fleetName === void 0 ? "" : ` ${fleetName}`}` : `${config.url} \xB7 app ${keyRunnerFactory(config)}` };
|
|
259
260
|
}
|
|
260
261
|
|
|
261
|
-
export { askManagedSandboxes, runRunnerCheck };
|
|
262
|
+
export { IGNORED_MACHINE_NOTE, askManagedSandboxes, runRunnerCheck };
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-ENVJDHAN.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-HZIY7YCX.js';
|
|
6
|
+
import { renderUpdateSteps } from './chunk-VLCUYNED.js';
|
|
7
7
|
import { decideInstalledSwitch } from './chunk-TXKHD4Q6.js';
|
|
8
8
|
import { writeFleetState } from './chunk-BPAVTBGG.js';
|
|
9
9
|
import { writePendingUpdate } from './chunk-W4QHG6VM.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-BFR4W3RX.js';
|
|
11
11
|
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-SU6GA65D.js';
|
|
12
|
-
import { leaseTimeLeftMs, createContainerRuntime, heldSandboxClaimsOf, unfinishedJobs, 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, 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, heldSandboxClaimsOf, unfinishedJobs, 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, 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-H6VZZCGC.js';
|
|
13
13
|
import { RUNNER_PROTOCOL } from './chunk-6YKJ2RKQ.js';
|
|
14
14
|
import { criteriaOf, loadCitationFinder, wholeItems, itemsSentence, oneLineReason, wholeEntries, parseJudgeAnswer } from './chunk-46D7LPS3.js';
|
|
15
|
-
import { RUNNER_RESERVE_BYTES } from './chunk-
|
|
15
|
+
import { RUNNER_RESERVE_BYTES } from './chunk-OBXKW6VF.js';
|
|
16
16
|
import { RepoFilter } from './chunk-F7YGXLOV.js';
|
|
17
17
|
import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-B4XB5QFD.js';
|
|
18
18
|
import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-3UK6W752.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-EJWKKEOB.js';
|
|
21
21
|
import { fetchCommit, readBranchHead, diffBetween } from './chunk-3EK3YMRS.js';
|
|
22
22
|
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-IX2ELMBR.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-Z5BXBH6M.js';
|
|
25
25
|
import { WorkCommandError, isSignatureRefusal, getJson, postJson, getBytes } from './chunk-3XGZLUEU.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-Z5J6IPYQ.js';
|
|
27
27
|
import { allocatedBytes, freeBytes, formatBytes } from './chunk-5QF3CFE3.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-RSD4TQOD.js';
|
|
29
29
|
import { loadHostKey, ensureHostKey, signerFor } from './chunk-KFUCIJF7.js';
|
|
@@ -4865,7 +4865,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
4865
4865
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
4866
4866
|
const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
|
|
4867
4867
|
const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
|
|
4868
|
-
return (await import('./check-
|
|
4868
|
+
return (await import('./check-XYWYU6GK.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
4869
4869
|
},
|
|
4870
4870
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
4871
4871
|
log
|
|
@@ -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-OBXKW6VF.js';
|
|
4
4
|
import { inspectService, realInspectProbes } from './chunk-5XEO7FJW.js';
|
|
5
5
|
import { realpathSync, readFileSync, readdirSync } from 'fs';
|
|
6
6
|
import { resolve, dirname, join } from 'path';
|
|
@@ -3,7 +3,7 @@ import { createRequire } from 'node:module';
|
|
|
3
3
|
import { launcherPath, pathNotes, writeLauncher, LauncherWriteError } from './chunk-VJWRB7BK.js';
|
|
4
4
|
import { currentVersion, entryIn, currentLink, versionDir, execStartLine, isInLayout, packageRootIn, switchCurrent } from './chunk-SU6GA65D.js';
|
|
5
5
|
import { compareVersions } from './chunk-TQMI335S.js';
|
|
6
|
-
import { defaultRunnerConfigPath } from './chunk-
|
|
6
|
+
import { defaultRunnerConfigPath } from './chunk-Z5J6IPYQ.js';
|
|
7
7
|
import { runnerDir, RUNNER_DIR_MODE } from './chunk-JS2AM7BN.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,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-H6VZZCGC.js';
|
|
4
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-OBXKW6VF.js';
|
|
5
5
|
import { getJson, WorkCommandError } from './chunk-3XGZLUEU.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-Z5J6IPYQ.js';
|
|
7
7
|
import { realBuildDiskProbe, checkDiskFit, DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-5QF3CFE3.js';
|
|
8
8
|
import { ensureHostKey } from './chunk-KFUCIJF7.js';
|
|
9
9
|
import { sandboxSettingsFrom } from './chunk-VPD2TY6U.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-Z5J6IPYQ.js';
|
|
4
4
|
import { orgHomeDir } from './chunk-JS2AM7BN.js';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
@@ -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-DQVDLDZG.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-DQVDLDZG.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-IFVCQU2J.js');
|
|
376
376
|
const result2 = await runWorkProofsRecord(opts);
|
|
377
377
|
process.exitCode = result2.exitCode;
|
|
378
378
|
return;
|
|
@@ -4,7 +4,7 @@ import { RUNNER_PROTOCOL } from './chunk-6YKJ2RKQ.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-46D7LPS3.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-SOTFSLYA.js';
|
|
8
8
|
import { upgradedStarterText } from './chunk-UU3A53VB.js';
|
|
9
9
|
import { HELPER_PATH, HELPER_RECORD, DOCKERD_LOG } from './chunk-VAXBKKG4.js';
|
|
10
10
|
import { writeDockerClientConfig } from './chunk-35MTVD6X.js';
|
|
@@ -12,7 +12,7 @@ import { senderPidfile } from './chunk-K6BIAGPB.js';
|
|
|
12
12
|
import { installScrubContext } from './chunk-F7YGXLOV.js';
|
|
13
13
|
import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk-B4XB5QFD.js';
|
|
14
14
|
import { runnerImageVersion } from './chunk-3UK6W752.js';
|
|
15
|
-
import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey, configForJob } from './chunk-
|
|
15
|
+
import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey, configForJob } from './chunk-EJWKKEOB.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-3EK3YMRS.js';
|
|
18
18
|
import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-BDB3DZ7X.js';
|
|
@@ -22,7 +22,7 @@ import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-TU4PQ4CD
|
|
|
22
22
|
import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-THAESND6.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-Z5BXBH6M.js';
|
|
24
24
|
import { postJson, getJson, WorkCommandError, isSignatureRefusal } from './chunk-3XGZLUEU.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-Z5J6IPYQ.js';
|
|
26
26
|
import { formatBytes, volumeBytes, allocatedBytes, DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, freeBytes } from './chunk-5QF3CFE3.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-RSD4TQOD.js';
|
|
28
28
|
import { universalImagePending, RecipeError, writeSanitizedRecipe, classifyProperties, DOCKER_FEATURE } from './chunk-47NQTKLX.js';
|
|
@@ -1461,7 +1461,8 @@ function createGatewaySandboxClient(opts) {
|
|
|
1461
1461
|
dataPlaneUrl,
|
|
1462
1462
|
secret: typeof raw.secret === "string" ? raw.secret : "",
|
|
1463
1463
|
urlToken: typeof raw.urlToken === "string" ? raw.urlToken : "",
|
|
1464
|
-
metadata: typeof raw.metadata === "object" && raw.metadata !== null ? raw.metadata : {}
|
|
1464
|
+
metadata: typeof raw.metadata === "object" && raw.metadata !== null ? raw.metadata : {},
|
|
1465
|
+
...raw.machine === "small" || raw.machine === "large" ? { machine: raw.machine } : {}
|
|
1465
1466
|
};
|
|
1466
1467
|
}
|
|
1467
1468
|
async function gateway(factory, send) {
|
|
@@ -1489,9 +1490,9 @@ function createGatewaySandboxClient(opts) {
|
|
|
1489
1490
|
return {
|
|
1490
1491
|
async create(input) {
|
|
1491
1492
|
if (input.workItem === void 0) throw new SandboxError("the build names no work item, and OuterLayer makes a sandbox only for the claim on one", 0);
|
|
1492
|
-
const machine = input.machine
|
|
1493
|
+
const machine = input.machine === void 0 ? {} : { machine: input.machine };
|
|
1493
1494
|
return sandboxOf(
|
|
1494
|
-
await post(input.factory, claimed(input.workItem), { machine, waits: true, idleMinutes: input.idleMinutes, timeLimitMinutes: input.timeLimitMinutes, metadata: input.metadata }),
|
|
1495
|
+
await post(input.factory, claimed(input.workItem), { ...machine, waits: true, idleMinutes: input.idleMinutes, timeLimitMinutes: input.timeLimitMinutes, metadata: input.metadata }),
|
|
1495
1496
|
input.factory
|
|
1496
1497
|
);
|
|
1497
1498
|
},
|
|
@@ -1560,7 +1561,6 @@ function createSandboxPorts(opts, hostEnv) {
|
|
|
1560
1561
|
factoryOf: (id) => heldClaims().find((claim) => claim.sandboxId === id)?.factory,
|
|
1561
1562
|
factories: () => heldClaims().map((claim) => claim.factory)
|
|
1562
1563
|
} : {},
|
|
1563
|
-
machine: () => runnerConfig().sandbox?.machine ?? "small",
|
|
1564
1564
|
sleep: (ms) => ports.sleep(ms)
|
|
1565
1565
|
});
|
|
1566
1566
|
return viaGateway;
|
|
@@ -2241,7 +2241,6 @@ var RunnerInitError = class extends Error {
|
|
|
2241
2241
|
var UNMARKED_PLACEHOLDER_COMMAND = "echo 'edit runner.commands in this config file: it must start your agent on item $OUTERLAYER_WORK' >&2; exit 1";
|
|
2242
2242
|
var PLACEHOLDER_MARKER = "outerlayer-placeholder";
|
|
2243
2243
|
var PLACEHOLDER_COMMAND = `${UNMARKED_PLACEHOLDER_COMMAND} # ${PLACEHOLDER_MARKER}`;
|
|
2244
|
-
var SANDBOX_MACHINES = ["small", "large"];
|
|
2245
2244
|
function nativeWindowsSandboxRefusal(machine) {
|
|
2246
2245
|
if (machine.platform !== "windows") return void 0;
|
|
2247
2246
|
return "--sandbox is for Linux, WSL2 and macOS: the runner's service does not install on native Windows, so a runner set up with --sandbox would have nothing to keep it running. Run this again from a WSL2 shell.";
|
|
@@ -2306,7 +2305,7 @@ function runRunnerInit(configPath, opts = {}) {
|
|
|
2306
2305
|
return writeRunnerInit(prepareRunnerInit(configPath, opts));
|
|
2307
2306
|
}
|
|
2308
2307
|
function prepareRunnerInit(configPath, opts = {}) {
|
|
2309
|
-
if (opts.sandbox
|
|
2308
|
+
if (opts.sandbox === true) {
|
|
2310
2309
|
if (opts.configFromStdin !== void 0) throw new RunnerInitError("--sandbox cannot be used with the VM-side hand-off: that runner builds in containers.");
|
|
2311
2310
|
if (opts.requireContainer === true) throw new RunnerInitError("--sandbox cannot be used with a runner that requires container builds.");
|
|
2312
2311
|
}
|
|
@@ -2321,7 +2320,7 @@ function prepareRunnerInit(configPath, opts = {}) {
|
|
|
2321
2320
|
if (config.runner !== void 0) {
|
|
2322
2321
|
throw new RunnerInitError(`${configPath}: a runner block is already here. Edit it, or remove it and run this again.`);
|
|
2323
2322
|
}
|
|
2324
|
-
if (opts.sandbox
|
|
2323
|
+
if (opts.sandbox === true && config.runnerVm !== void 0) {
|
|
2325
2324
|
throw new RunnerInitError(`${configPath}: this file sets up a runner in a Linux VM, and --sandbox sets up another kind. Name another file with --config, then run this again.`);
|
|
2326
2325
|
}
|
|
2327
2326
|
needsKey = opts.keyFromLogin === true && config.apiKey === void 0;
|
|
@@ -2334,7 +2333,7 @@ function prepareRunnerInit(configPath, opts = {}) {
|
|
|
2334
2333
|
agent ??= handed.agent;
|
|
2335
2334
|
}
|
|
2336
2335
|
const machine = opts.machine ?? detectMachine();
|
|
2337
|
-
if (opts.sandbox
|
|
2336
|
+
if (opts.sandbox === true) {
|
|
2338
2337
|
const refusal = nativeWindowsSandboxRefusal(machine);
|
|
2339
2338
|
if (refusal !== void 0) throw new RunnerInitError(refusal);
|
|
2340
2339
|
}
|
|
@@ -2342,7 +2341,7 @@ function prepareRunnerInit(configPath, opts = {}) {
|
|
|
2342
2341
|
const fix = reachDockerStep(machine) ?? `install Docker Engine ${MIN_ENGINE_MAJOR} or later in the VM`;
|
|
2343
2342
|
throw new RunnerInitError(`the VM has ${describeMachineDocker(machine)}, but the runner in it needs container builds: ${fix}, then run this again.`);
|
|
2344
2343
|
}
|
|
2345
|
-
const hooks = opts.sandbox
|
|
2344
|
+
const hooks = opts.sandbox === true ? "builtin:sandbox" : opts.requireContainer !== true && supportsMicroVmBuilds(machine) ? "builtin:vm" : supportsContainerBuilds(machine) ? "builtin:container" : void 0;
|
|
2346
2345
|
if (hooks === void 0) throw new RunnerInitError(isolationRefusal(machine));
|
|
2347
2346
|
const named = agent === void 0 ? void 0 : runnerAgentNamed(agent, agents);
|
|
2348
2347
|
if (named !== void 0 && credential === void 0 && opts.credentialInEnvironment !== true && !hasStoredCredential(configPath, agents)) {
|
|
@@ -2387,7 +2386,7 @@ function writeRunnerInit(prepared, runnerKey) {
|
|
|
2387
2386
|
// The agent was named on this command line, so its commands win over any the hand-off carried.
|
|
2388
2387
|
...agent === void 0 ? {} : { commands: { ...agentCommands(agent, agents) } },
|
|
2389
2388
|
hooks: { provision: hooks, cleanup: hooks },
|
|
2390
|
-
...sandbox ===
|
|
2389
|
+
...sandbox === true ? { sandbox: { provider: "outerlayer", docker: true } } : {}
|
|
2391
2390
|
};
|
|
2392
2391
|
if (host !== void 0) delete config.runner.host;
|
|
2393
2392
|
mkdirSync(dirname(configPath), { recursive: true });
|
|
@@ -4729,7 +4728,7 @@ async function cleanupSandbox(runtime, state, keepDisk) {
|
|
|
4729
4728
|
var PROXIED_IN_SANDBOX_REASON = "the factory has a proxied variable, and a sandbox build cannot use one yet. Remove the proxied variable from the factory's build settings, or build on a runner with builtin:vm hooks";
|
|
4730
4729
|
function sandboxSizeFor(config, jobDir) {
|
|
4731
4730
|
const settings = managedBuildSettingsFor(jobDir);
|
|
4732
|
-
if (settings === void 0 && config.sandbox?.
|
|
4731
|
+
if (settings === void 0 && config.sandbox?.provider === "outerlayer") return { ok: true, size: machineSizeOf("small") };
|
|
4733
4732
|
if (settings === void 0) {
|
|
4734
4733
|
const sized2 = sandboxSizeOf(config.build);
|
|
4735
4734
|
return sized2.ok ? sized2 : { ok: false, reason: `${sized2.field} ${sized2.problem}` };
|
|
@@ -4738,6 +4737,12 @@ function sandboxSizeFor(config, jobDir) {
|
|
|
4738
4737
|
const sized = sandboxSizeOf({ cpus: limits2.cpus, memory: String(limits2.memoryBytes), disk: String(limits2.diskBytes) });
|
|
4739
4738
|
return sized.ok ? sized : { ok: false, reason: `the factory's ${settings.machine.size} machine does not fit a sandbox: ${sized.field.replace("runner.build.", "its ")} ${sized.problem}` };
|
|
4740
4739
|
}
|
|
4740
|
+
function containerLimitsOf(size, build) {
|
|
4741
|
+
return { memory: `${Math.max(512, size.memoryMib - SANDBOX_RESERVE_MIB)}m`, cpus: size.vcpu, pids: build?.pids ?? 4096 };
|
|
4742
|
+
}
|
|
4743
|
+
function containerSizeOf(sandbox, asked) {
|
|
4744
|
+
return sandbox.machine === void 0 ? asked : machineSizeOf(sandbox.machine);
|
|
4745
|
+
}
|
|
4741
4746
|
function sandboxClaimOf(config, item, workItemId, settings) {
|
|
4742
4747
|
const workItem = claimItem(config, { item, workItemId, appId: config.appId });
|
|
4743
4748
|
if (config.fleet !== true || settings === void 0) return { workItem, factory: config.appId };
|
|
@@ -5064,7 +5069,7 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
5064
5069
|
}
|
|
5065
5070
|
const engine = await host.version();
|
|
5066
5071
|
if (engine === null) return bail("Docker is not available in the sandbox: `docker version` failed");
|
|
5067
|
-
const limits2 =
|
|
5072
|
+
const limits2 = containerLimitsOf(containerSizeOf(sandbox, sized.size), config.build);
|
|
5068
5073
|
const volume = await host.createVolume(volumeName, { [BUILD_LABEL]: buildId, [RUNNER_LABEL]: runnerId });
|
|
5069
5074
|
if (volume.status !== 0) return dockerFailed("creating the build's volume", volume);
|
|
5070
5075
|
const runInput = {
|
|
@@ -14147,4 +14152,4 @@ async function runHostChecks(input) {
|
|
|
14147
14152
|
}
|
|
14148
14153
|
}
|
|
14149
14154
|
|
|
14150
|
-
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,
|
|
14155
|
+
export { ADOPTED_FETCH_RETRY_WINDOW_MS, ALREADY_RELEASED, AttemptLogBook, EXIT_CODE_FILE, GUEST_USAGE_INTERVAL_MS, HELPER_ENV, KIND_LABEL, LEASE_SECONDS, MAX_CHECK_ITEMS_BYTES, MICROVM_COMMAND_DIR, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, RENEW_INTERVAL_SECONDS, RunnerInitError, SandboxContainerStoppedError, SandboxGoneError, agentCredentialCheck, appendCommandLog, attemptNote, builtOf, checksIn, claimPermissionProblem, claimRun, commandItems, commandLogOffset, containerCommandExec, createContainerRuntime, createGatewaySandboxClient, createHousekeepingDocker, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deliverCommitHooks, deliverContainerHooks, deliverExecMaven, deliverJobFiles, deliverSandboxHooks, describeHookEnd, describeMachineDocker, detectMachine, ensureFirecrackerAndJailer, ensureNetworkReady, ensureTunnel, environmentFor, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedClaudeKey, filesAreCopied, finishJob, foldSample, formerSkillProblem, formerSkillQueues, freeItemDisksUntil, gatewayRefusalReason, gitRemoteFor, heldSandboxClaimsOf, 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 };
|
|
@@ -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-H6VZZCGC.js';
|
|
4
|
+
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-OBXKW6VF.js';
|
|
5
5
|
import { RunnerAlreadyRunningError, readPidFile } from './chunk-IX2ELMBR.js';
|
|
6
6
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
7
7
|
import { isSignatureRefusal, postJson } from './chunk-3XGZLUEU.js';
|
|
8
|
-
import { keyRunnerFactory } from './chunk-
|
|
8
|
+
import { keyRunnerFactory } from './chunk-Z5J6IPYQ.js';
|
|
9
9
|
import { signerFor } from './chunk-KFUCIJF7.js';
|
|
10
10
|
import { pidFilePath } from './chunk-JS2AM7BN.js';
|
|
11
11
|
import { readFileSync } from 'fs';
|
|
@@ -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-H6VZZCGC.js';
|
|
4
|
+
import { UNIT_MARKER } from './chunk-OBXKW6VF.js';
|
|
5
5
|
import { runnerDir } from './chunk-JS2AM7BN.js';
|
|
6
6
|
import { createHash } from 'crypto';
|
|
7
7
|
import { join } from 'path';
|
|
@@ -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-SU6GA65D.js';
|
|
5
|
-
import { DEFAULT_UNIT_NAME } from './chunk-
|
|
5
|
+
import { DEFAULT_UNIT_NAME } from './chunk-OBXKW6VF.js';
|
|
6
6
|
import { runnerDir } from './chunk-JS2AM7BN.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 { builtinKind, keepsHostBuilder } from './chunk-
|
|
3
|
+
import { builtinKind, keepsHostBuilder } from './chunk-Z5J6IPYQ.js';
|
|
4
4
|
import { parseSize } from './chunk-RSD4TQOD.js';
|
|
5
5
|
import { runnerDir } from './chunk-JS2AM7BN.js';
|
|
6
6
|
import { FD_SLOTS_PER_BUILD, FD_STORE_ENV, BUILD_SLICE_MEMORY_ENV, credentialLineIn, withoutCredentialLines } from './chunk-5XEO7FJW.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-ZGHQ6OLM.js');
|
|
1097
|
-
const { defaultRunnerConfigPath, hasRunnerBlock, keyRunnerFactory, loadRunnerConfig, runnerVmOf } = await import('./config-
|
|
1097
|
+
const { defaultRunnerConfigPath, hasRunnerBlock, keyRunnerFactory, loadRunnerConfig, runnerVmOf } = await import('./config-K6RF5TY6.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-S3QZPQ2F.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-3WJF7RFR.js');
|
|
1154
1154
|
return inspectRunnerService(configPath);
|
|
1155
1155
|
})();
|
|
1156
1156
|
checks.push(...await runnerHostChecks({ configPath, hooks, gateway, repos, runner, service }));
|
|
@@ -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-OBXKW6VF.js';
|
|
4
4
|
import { RUNNER_FILE_MODE } from './chunk-JS2AM7BN.js';
|
|
5
5
|
import { parseRunnerEnv, withoutCredentialLines } from './chunk-5XEO7FJW.js';
|
|
6
6
|
import { headlessNames, runnerAgentNamed, credentialAgent, orList, credentialShapes, runnerAgents, credentialForms, credentialEnvPath, forwardedVariables } from './chunk-MHXUQI67.js';
|
|
@@ -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-H6VZZCGC.js';
|
|
4
4
|
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-3UK6W752.js';
|
|
5
5
|
import { readFileSync } from 'fs';
|
|
6
6
|
|
|
@@ -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-PHWQHRZG.js';
|
|
4
4
|
import { shellFunctionInstalled, removeShellFunction, installShellFunction, SHELL_FUNCTION_LINE } from './chunk-4KCWAP5L.js';
|
|
5
5
|
import { runConnect, hasUncommittedPolicy, commitCommandsFor } from './chunk-BGRPYWUU.js';
|
|
6
6
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
@@ -139,10 +139,9 @@ function resolveSandbox(block, build, report) {
|
|
|
139
139
|
if (given["snapshot"] !== void 0) return report("runner.sandbox.snapshot", "is not set with runner.sandbox.provider: OuterLayer chooses the snapshot");
|
|
140
140
|
if (given["allowHosts"] !== void 0) return report("runner.sandbox.allowHosts", "is not set for a sandbox that OuterLayer provides, which reaches the network only through the runner");
|
|
141
141
|
} else if (given["machine"] !== void 0) {
|
|
142
|
-
return report("runner.sandbox.machine", "is
|
|
142
|
+
return report("runner.sandbox.machine", "is not a setting of this block. The size of the sandbox comes from runner.build");
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
if (machine !== "small" && machine !== "large") return report("runner.sandbox.machine", 'must be "small" or "large"');
|
|
144
|
+
const machineIgnored = managed && given["machine"] !== void 0;
|
|
146
145
|
const snapshot = managed ? MANAGED_SNAPSHOT : given["snapshot"];
|
|
147
146
|
if (typeof snapshot !== "string" || snapshot.trim() === "") return report("runner.sandbox.snapshot", "is required: the name of the saved snapshot that holds Docker and the universal image");
|
|
148
147
|
const image = given["image"] ?? DEFAULT_SANDBOX_IMAGE;
|
|
@@ -160,7 +159,7 @@ function resolveSandbox(block, build, report) {
|
|
|
160
159
|
if (typeof docker !== "boolean") return report("runner.sandbox.docker", "must be true or false");
|
|
161
160
|
const size = managed ? void 0 : sandboxSizeOf(build);
|
|
162
161
|
if (size !== void 0 && !size.ok) return report(size.field, size.problem);
|
|
163
|
-
return { ...managed ? { provider: "outerlayer",
|
|
162
|
+
return { ...managed ? { provider: "outerlayer" } : {}, ...machineIgnored ? { machineIgnored: true } : {}, snapshot: snapshot.trim(), image, allowHosts: hosts.map((host) => host.toLowerCase()), idleMinutes: idle, docker };
|
|
164
163
|
}
|
|
165
164
|
|
|
166
165
|
// src/runner/config.ts
|