@outerlayer/cli 0.38.0-next.20261112002049 → 0.38.0-next.20261112043334
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/{build-SD44TP2B.js → build-FNUOBMFG.js} +1 -1
- package/dist/build-info.json +1 -1
- package/dist/{check-JNQVYVHI.js → check-6JV4M2U6.js} +8 -8
- package/dist/{chunk-T4FSZ7LA.js → chunk-2PJO6QS2.js} +2 -2
- package/dist/{chunk-C4R6LMPQ.js → chunk-37WGI6GZ.js} +6 -5
- package/dist/{chunk-Q7J4T2VP.js → chunk-5AVYYNGU.js} +21 -1
- package/dist/{chunk-ZU6LNR3G.js → chunk-6M3GJTGE.js} +1 -1
- package/dist/{chunk-OTWTUHWY.js → chunk-BBIFZCCB.js} +142 -29
- package/dist/{chunk-VRDHLSR2.js → chunk-C5NJHYLO.js} +4 -4
- package/dist/{chunk-5OSY3LK3.js → chunk-DNXYI22V.js} +1 -1
- package/dist/{chunk-ZUUA6ZGD.js → chunk-KRYTOYH5.js} +104 -40
- package/dist/{chunk-3VWX5BYV.js → chunk-LM2MCACJ.js} +2 -2
- package/dist/{chunk-OYRAQXRQ.js → chunk-LSU3LXDM.js} +1 -1
- package/dist/{chunk-VV445Q2R.js → chunk-RTMIEV5N.js} +1 -1
- package/dist/{chunk-VBSKVGWP.js → chunk-SFN7K33S.js} +1 -1
- package/dist/{cli-2FFCAE62.js → cli-7MJFFRYI.js} +59 -59
- package/dist/{command-ASXZLHXU.js → command-XLJ75AS5.js} +5 -5
- package/dist/{container-start-6FHPPHMU.js → container-start-F6T3JPRM.js} +6 -6
- package/dist/{doctor-FATFZWEA.js → doctor-F7TCZO3O.js} +6 -6
- package/dist/{governing-source-C7MY7KB2.js → governing-source-R64FW4CP.js} +2 -2
- package/dist/{host-checks-CZGNR4VC.js → host-checks-VWWXDWV2.js} +4 -4
- package/dist/index.js +1 -1
- package/dist/{init-WDYDTJW2.js → init-OIHCYS4S.js} +4 -4
- package/dist/{init-5S6A2SYN.js → init-W4X47BR5.js} +4 -4
- package/dist/{init-agent-PJFH7OFD.js → init-agent-QQF3VGIJ.js} +4 -4
- package/dist/{init-cmd-5SCU7AVL.js → init-cmd-QXAL75UY.js} +2 -2
- package/dist/{init-update-6EJKXKFH.js → init-update-G5MKJ7RO.js} +4 -3
- package/dist/{loop-Q76PDO7L.js → loop-U5AUIWQG.js} +8 -8
- package/dist/{machine-GI6SZMEK.js → machine-6DFKQ3LQ.js} +4 -4
- package/dist/{run-cmd-M5THCWDD.js → run-cmd-U3MPDIT5.js} +1 -1
- package/dist/{runner-key-ZXNXWBSP.js → runner-key-WZXU64C7.js} +4 -4
- package/dist/{spec-cmd-4EB45ELL.js → spec-cmd-DHCZHM2L.js} +1 -1
- package/dist/{status-R4JD34DO.js → status-QBQAN35R.js} +4 -4
- package/dist/{update-steps-CGWJJ2IA.js → update-steps-QRRCMRL4.js} +5 -5
- package/dist/{work-claim-cmd-4KQYRNRC.js → work-claim-cmd-QDNRGX2N.js} +2 -2
- package/dist/{work-cmd-GNYWSA2O.js → work-cmd-3BDBBKGG.js} +1 -1
- package/dist/{work-comment-cmd-7D3DHQ3O.js → work-comment-cmd-2HI4FP5R.js} +2 -2
- package/dist/{work-demo-cmd-PDILNMRF.js → work-demo-cmd-RXV5DRM3.js} +1 -1
- package/dist/{work-logs-cmd-ER3AYV62.js → work-logs-cmd-Q7YA3AHY.js} +1 -1
- package/dist/{work-needs-attention-cmd-MAFPEANV.js → work-needs-attention-cmd-WAWSJIHS.js} +1 -1
- package/dist/{work-no-change-cmd-GDN5EE6N.js → work-no-change-cmd-NTXYEPEW.js} +1 -1
- package/dist/{work-open-pr-cmd-56TRIE5I.js → work-open-pr-cmd-GFIMFDAR.js} +1 -1
- package/dist/{work-proofs-cmd-Y2OMM37N.js → work-proofs-cmd-DSDVAM6V.js} +2 -2
- package/dist/{work-proofs-record-I2VLOMRD.js → work-proofs-record-AC5UQ2ME.js} +3 -3
- package/dist/{work-stop-cmd-PREZOSNY.js → work-stop-cmd-UGFPCTRT.js} +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
4
|
-
import { reportFailedStart, fitImageBuildMemory } from './chunk-
|
|
4
|
+
import { reportFailedStart, fitImageBuildMemory } from './chunk-2PJO6QS2.js';
|
|
5
5
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
|
|
6
6
|
import { writeFleetState } from './chunk-6X2BSMRM.js';
|
|
7
7
|
import { writePendingUpdate } from './chunk-WFYKTAXZ.js';
|
|
8
|
-
import { renderUpdateSteps } from './chunk-
|
|
8
|
+
import { renderUpdateSteps } from './chunk-RTMIEV5N.js';
|
|
9
9
|
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-2UCTMANO.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-37WGI6GZ.js';
|
|
11
11
|
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-POBH5YCG.js';
|
|
12
|
-
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runIsolation, runCommandOf, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, restoreSessionIntoSandbox, 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, AttemptLogBook, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, keptSandboxIds, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady,
|
|
12
|
+
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runIsolation, runCommandOf, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, restoreSessionIntoSandbox, 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, AttemptLogBook, 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, ensureNetworkReady, ADOPTED_FETCH_RETRY_WINDOW_MS, managedBuildSettingsFor, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, deliverJobFiles, inTeardown } from './chunk-BBIFZCCB.js';
|
|
13
13
|
import { RUNNER_PROTOCOL } from './chunk-KVWFAAAQ.js';
|
|
14
14
|
import { RUNNER_RESERVE_BYTES } from './chunk-WG5OBUIZ.js';
|
|
15
15
|
import { RepoFilter } from './chunk-3T7PXUHN.js';
|
|
@@ -19,8 +19,8 @@ import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js'
|
|
|
19
19
|
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls, configForJob } from './chunk-RCK2MJRG.js';
|
|
20
20
|
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-NDQC2WUJ.js';
|
|
21
21
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
22
|
-
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-
|
|
23
|
-
import { WorkCommandError, isSignatureRefusal, getJson, postJson, getBytes } from './chunk-
|
|
22
|
+
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-SFN7K33S.js';
|
|
23
|
+
import { WorkCommandError, isSignatureRefusal, getJson, postJson, getBytes } from './chunk-DNXYI22V.js';
|
|
24
24
|
import { keyRunnerFactory, isBuiltinSandbox, isBuiltinContainer, isBuiltinVm, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, readOnlyRemoteOf, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS, readOnlyOption } from './chunk-EUHUIIGT.js';
|
|
25
25
|
import { allocatedBytes, freeBytes, formatBytes } from './chunk-3C23ZPWR.js';
|
|
26
26
|
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, runnerLabelValue, builderName, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-ERG3WCEC.js';
|
|
@@ -745,7 +745,7 @@ function stageReason(job) {
|
|
|
745
745
|
}
|
|
746
746
|
function ownReason({ job, ending }) {
|
|
747
747
|
if (job.sandbox !== void 0) {
|
|
748
|
-
return "is a sandbox build
|
|
748
|
+
return "is a sandbox build, which the runner does not hand to another version";
|
|
749
749
|
} else if (job.microvm !== void 0) {
|
|
750
750
|
if (!isMicroVmTracked(job)) return "is a microVM build that a restarted runner cannot adopt";
|
|
751
751
|
} else if (!isContainerTracked(job)) {
|
|
@@ -1803,6 +1803,7 @@ function clearUpdateWait(state) {
|
|
|
1803
1803
|
}
|
|
1804
1804
|
function holdWithoutRoomForLarge(state) {
|
|
1805
1805
|
if (state.config.managed !== true) return false;
|
|
1806
|
+
if (isBuiltinSandbox(state.config.hooks.provision)) return false;
|
|
1806
1807
|
const probes = {
|
|
1807
1808
|
...realBlockedProbes(),
|
|
1808
1809
|
...state.deps.container?.hostEnv === void 0 ? {} : { env: state.deps.container.hostEnv },
|
|
@@ -2573,7 +2574,7 @@ var CLAIM_REFUSAL_CODES = new Set(
|
|
|
2573
2574
|
"pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
|
|
2574
2575
|
);
|
|
2575
2576
|
async function tryClaimAndStart(state, item, queue) {
|
|
2576
|
-
const { postJson: postJson2 } = await import('./work-cmd-
|
|
2577
|
+
const { postJson: postJson2 } = await import('./work-cmd-3BDBBKGG.js');
|
|
2577
2578
|
const log = logOf(state);
|
|
2578
2579
|
const hostKey = await loadHostKey(state.config.configPath);
|
|
2579
2580
|
const claim = await retrySend(
|
|
@@ -3257,7 +3258,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
|
|
|
3257
3258
|
job.sandbox.commandLogBase = commandLogOffset(dirPath, 0);
|
|
3258
3259
|
writeJobFile(jobFilePath, job);
|
|
3259
3260
|
writeFileSync(join(dirPath, "command.log"), "", { flag: "a", mode: RUNNER_FILE_MODE });
|
|
3260
|
-
await startSandboxCommand({ job, cmdline, runtime: runtimeOf(state), config: state.config, extraEnv: commandEnv });
|
|
3261
|
+
await startSandboxCommand({ job, jobDir: dirPath, cmdline, runtime: runtimeOf(state), config: state.config, extraEnv: commandEnv });
|
|
3261
3262
|
} else if (job.microvm !== void 0) {
|
|
3262
3263
|
const runtime = runtimeOf(state);
|
|
3263
3264
|
if (job.microvm.jailed !== void 0 && (job.microvm.fdStore?.length ?? 0) > 0) {
|
|
@@ -3809,6 +3810,96 @@ async function adoptTrackedBuilds(state, jobsDirPath) {
|
|
|
3809
3810
|
void probeBuild(state, adopted);
|
|
3810
3811
|
}
|
|
3811
3812
|
}
|
|
3813
|
+
async function holdManagedAgain(state, dirPath, job, tag) {
|
|
3814
|
+
const config = state.config;
|
|
3815
|
+
const log = logOf(state);
|
|
3816
|
+
if (config.managed !== true) return void 0;
|
|
3817
|
+
const fetched = await fetchManagedClaudeKey(claimCalls(config, job), claimItem(config, job), {
|
|
3818
|
+
fetchImpl: state.deps.fetchImpl,
|
|
3819
|
+
now: state.deps.now,
|
|
3820
|
+
sleep: state.deps.sleep,
|
|
3821
|
+
windowMs: ADOPTED_FETCH_RETRY_WINDOW_MS
|
|
3822
|
+
});
|
|
3823
|
+
if (!fetched.ok) {
|
|
3824
|
+
const code = fetched.code ?? "unavailable";
|
|
3825
|
+
log.error(`${tag} the adopted build's Anthropic key could not be had: ${code}`);
|
|
3826
|
+
const cause = fetched.retryable ? "the gateway could not be reached for it" : `the gateway refused it (${code})`;
|
|
3827
|
+
return { reason: `the adopted build's Anthropic key could not be had after the runner restarted: ${cause}`, why: "the gateway did not give its Anthropic key again" };
|
|
3828
|
+
}
|
|
3829
|
+
holdManagedClaudeKey(dirPath, fetched.apiKey);
|
|
3830
|
+
const settings = await fetchManagedBuildSettings(claimCalls(config, job), claimItem(config, job), {
|
|
3831
|
+
fetchImpl: state.deps.fetchImpl,
|
|
3832
|
+
now: state.deps.now,
|
|
3833
|
+
sleep: state.deps.sleep,
|
|
3834
|
+
windowMs: ADOPTED_FETCH_RETRY_WINDOW_MS
|
|
3835
|
+
});
|
|
3836
|
+
if (!settings.ok) {
|
|
3837
|
+
const code = settings.code ?? "unavailable";
|
|
3838
|
+
log.error(`${tag} the adopted build's settings could not be had: ${code}`);
|
|
3839
|
+
const cause = settings.retryable ? "the gateway could not be reached for them" : `the gateway refused them (${code})`;
|
|
3840
|
+
return { reason: `the adopted build's settings could not be had after the runner restarted: ${cause}`, why: "the gateway did not give its settings again" };
|
|
3841
|
+
}
|
|
3842
|
+
holdManagedBuildSettings(dirPath, settings.settings);
|
|
3843
|
+
job.managedVariables = [.../* @__PURE__ */ new Set([...job.managedVariables ?? [], ...[...settings.settings.variables, ...settings.settings.proxied ?? []].map(({ name }) => name)])];
|
|
3844
|
+
writeJobFile(join(dirPath, "job.json"), job);
|
|
3845
|
+
return void 0;
|
|
3846
|
+
}
|
|
3847
|
+
function sandboxAwayReason(found, sandboxId) {
|
|
3848
|
+
return found === "gone" ? new SandboxGoneError(sandboxId).message : CONTAINER_STOPPED_REASON;
|
|
3849
|
+
}
|
|
3850
|
+
async function adoptTrackedSandboxes(state, jobsDirPath) {
|
|
3851
|
+
const log = logOf(state);
|
|
3852
|
+
const attemptLogs = attemptLogsOf(state);
|
|
3853
|
+
const runtime = runtimeOf(state);
|
|
3854
|
+
for (const { dirPath, job, known } of listTrackedJobs(jobsDirPath)) {
|
|
3855
|
+
if (!known || job.sandbox === void 0) continue;
|
|
3856
|
+
if (leftByRunnerKey(state.config, job)) continue;
|
|
3857
|
+
const own = job.sandbox;
|
|
3858
|
+
const tag = itemTag(job);
|
|
3859
|
+
const adopted = { job, dirPath, lastRenewAtMs: 0, cmd: null, cpuSample: null, ending: false };
|
|
3860
|
+
const unheld = await holdManagedAgain(state, dirPath, job, tag);
|
|
3861
|
+
if (unheld !== void 0) {
|
|
3862
|
+
const finished = await finishJob(job, dirPath, "interrupted", state.config, finishDepsOf(state), { reason: unheld.reason });
|
|
3863
|
+
log.line(`recovered job ${finished.queue} ${itemTag(finished)} (claim ${shortClaim(finished.claimId)}) as interrupted: ${unheld.why}`);
|
|
3864
|
+
continue;
|
|
3865
|
+
}
|
|
3866
|
+
const tokens = buildTokensFor(state, adopted);
|
|
3867
|
+
runtime.credentials.set(dirPath, tokens);
|
|
3868
|
+
let found;
|
|
3869
|
+
try {
|
|
3870
|
+
found = await rejoinSandboxBuild({
|
|
3871
|
+
runtime,
|
|
3872
|
+
config: configForJob(state.config, job),
|
|
3873
|
+
own,
|
|
3874
|
+
jobDir: dirPath,
|
|
3875
|
+
itemKey: job.itemKey,
|
|
3876
|
+
tokens,
|
|
3877
|
+
branch: job.branch,
|
|
3878
|
+
repositories: job.repositories,
|
|
3879
|
+
queue: job.queue,
|
|
3880
|
+
log: (line2) => log.line(`${tag} ${line2}`),
|
|
3881
|
+
warn: (line2) => log.error(`${tag} ${line2}`),
|
|
3882
|
+
leaseExpiryMs: () => leaseExpiresAtMs(adopted.job)
|
|
3883
|
+
});
|
|
3884
|
+
} catch (err) {
|
|
3885
|
+
log.error(`${tag} the relay of the build an earlier runner left could not be joined again: ${describeCallFailure(err)} \xB7 the build goes on without its network until its limit`);
|
|
3886
|
+
}
|
|
3887
|
+
if (found !== void 0 && found !== "joined") {
|
|
3888
|
+
const reason = sandboxAwayReason(found, own.sandboxId);
|
|
3889
|
+
const finished = await finishJob(job, dirPath, "interrupted", state.config, finishDepsOf(state), { reason });
|
|
3890
|
+
log.line(`recovered job ${finished.queue} ${itemTag(finished)} (claim ${shortClaim(finished.claimId)}) as interrupted: ${reason}`);
|
|
3891
|
+
continue;
|
|
3892
|
+
}
|
|
3893
|
+
state.jobs.set(dirPath, adopted);
|
|
3894
|
+
attemptLogs.open(job.item, dirPath, itemScope(job));
|
|
3895
|
+
if (!await renewLeaseIfDue(state, adopted, nowOf(state).getTime())) continue;
|
|
3896
|
+
await restartSender({ config: state.config, job: adopted.job, jobDir: dirPath, deps: { spawnFn: state.deps.spawnFn, runtime, log, sleep: state.deps.sleep } });
|
|
3897
|
+
const line = `adopted job ${job.queue} ${tag} (claim ${shortClaim(job.claimId)}) \xB7 command tracked in sandbox ${own.sandboxId}`;
|
|
3898
|
+
log.line(line);
|
|
3899
|
+
attemptLogs.note(job.item, line, itemScope(job));
|
|
3900
|
+
void probeBuild(state, adopted);
|
|
3901
|
+
}
|
|
3902
|
+
}
|
|
3812
3903
|
async function planMicroVmAdoption(state, jobsDirPath) {
|
|
3813
3904
|
const plan = { adopt: [], away: [], unservable: [], unasked: [] };
|
|
3814
3905
|
for (const { dirPath, job, known } of listTrackedJobs(jobsDirPath)) {
|
|
@@ -3831,36 +3922,8 @@ async function rejoinMicroVmBuild(state, adopted) {
|
|
|
3831
3922
|
const fd = inherited.get(fdName(microvm.buildId, socket.replace(/\.sock$/, "")));
|
|
3832
3923
|
return fd === void 0 ? void 0 : (server) => runtime.vm.fdStore.listenOn(server, fd);
|
|
3833
3924
|
};
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
fetchImpl: state.deps.fetchImpl,
|
|
3837
|
-
now: state.deps.now,
|
|
3838
|
-
sleep: state.deps.sleep,
|
|
3839
|
-
windowMs: ADOPTED_FETCH_RETRY_WINDOW_MS
|
|
3840
|
-
});
|
|
3841
|
-
if (!fetched.ok) {
|
|
3842
|
-
const code = fetched.code ?? "unavailable";
|
|
3843
|
-
log.error(`${tag} the adopted build's Anthropic key could not be had: ${code}`);
|
|
3844
|
-
const cause = fetched.retryable ? "the gateway could not be reached for it" : `the gateway refused it (${code})`;
|
|
3845
|
-
return { reason: `the adopted build's Anthropic key could not be had after the runner restarted: ${cause}`, why: "the gateway did not give its Anthropic key again" };
|
|
3846
|
-
}
|
|
3847
|
-
holdManagedClaudeKey(dirPath, fetched.apiKey);
|
|
3848
|
-
const settings = await fetchManagedBuildSettings(claimCalls(config, job), claimItem(config, job), {
|
|
3849
|
-
fetchImpl: state.deps.fetchImpl,
|
|
3850
|
-
now: state.deps.now,
|
|
3851
|
-
sleep: state.deps.sleep,
|
|
3852
|
-
windowMs: ADOPTED_FETCH_RETRY_WINDOW_MS
|
|
3853
|
-
});
|
|
3854
|
-
if (!settings.ok) {
|
|
3855
|
-
const code = settings.code ?? "unavailable";
|
|
3856
|
-
log.error(`${tag} the adopted build's settings could not be had: ${code}`);
|
|
3857
|
-
const cause = settings.retryable ? "the gateway could not be reached for them" : `the gateway refused them (${code})`;
|
|
3858
|
-
return { reason: `the adopted build's settings could not be had after the runner restarted: ${cause}`, why: "the gateway did not give its settings again" };
|
|
3859
|
-
}
|
|
3860
|
-
holdManagedBuildSettings(dirPath, settings.settings);
|
|
3861
|
-
job.managedVariables = [.../* @__PURE__ */ new Set([...job.managedVariables ?? [], ...[...settings.settings.variables, ...settings.settings.proxied ?? []].map(({ name }) => name)])];
|
|
3862
|
-
writeJobFile(join(dirPath, "job.json"), job);
|
|
3863
|
-
}
|
|
3925
|
+
const unheld = await holdManagedAgain(state, dirPath, job, tag);
|
|
3926
|
+
if (unheld !== void 0) return unheld;
|
|
3864
3927
|
const tokens = buildTokensFor(state, adopted);
|
|
3865
3928
|
runtime.credentials.set(dirPath, tokens);
|
|
3866
3929
|
let servicesServed = false;
|
|
@@ -4064,7 +4127,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
4064
4127
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
4065
4128
|
const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
|
|
4066
4129
|
const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
|
|
4067
|
-
return (await import('./check-
|
|
4130
|
+
return (await import('./check-6JV4M2U6.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
4068
4131
|
},
|
|
4069
4132
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
4070
4133
|
log
|
|
@@ -4188,6 +4251,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
4188
4251
|
attemptLogs.note(job.item, adoptedLine, itemScope(job));
|
|
4189
4252
|
}
|
|
4190
4253
|
await adoptTrackedBuilds(state, jobsDir(configPath));
|
|
4254
|
+
await adoptTrackedSandboxes(state, jobsDir(configPath));
|
|
4191
4255
|
await adoptTrackedMicroVms(state, microVmPlan);
|
|
4192
4256
|
for (const retried of await retryFailedReleases(jobsDir(configPath), config, {
|
|
4193
4257
|
fetchImpl: deps.fetchImpl,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { checkStarterFiles, contextIsGoverned } from './chunk-4T2NBVC4.js';
|
|
4
|
-
import { resolveCredentials, getJson, WorkCommandError } from './chunk-
|
|
4
|
+
import { resolveCredentials, getJson, WorkCommandError } from './chunk-DNXYI22V.js';
|
|
5
5
|
import { fleetCheck, checkBuildSkill, checkSpecSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences, checkIgnoredSkillFolders } from './chunk-SFSE6YDX.js';
|
|
6
6
|
import { withInjectedPrograms } from './chunk-RUX4M4AX.js';
|
|
7
7
|
import { isLinkedRepository } from './chunk-Z42UKOZ6.js';
|
|
@@ -1081,7 +1081,7 @@ async function gatherDoctorChecks(options = {}) {
|
|
|
1081
1081
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1082
1082
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1083
1083
|
} else if (hasRunnerBlock(configPath)) {
|
|
1084
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1084
|
+
const { runnerHostChecks } = await import('./doctor-F7TCZO3O.js');
|
|
1085
1085
|
const gateway = (() => {
|
|
1086
1086
|
try {
|
|
1087
1087
|
const loaded = loadRunnerConfig(configPath);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { resolveCredentials, postBytes, RateLimitedError, postJson, getJson, getBytes } from './chunk-
|
|
3
|
+
import { resolveCredentials, postBytes, RateLimitedError, postJson, getJson, getBytes } from './chunk-DNXYI22V.js';
|
|
4
4
|
import { detectActiveSession } from './chunk-2VJVPP5Y.js';
|
|
5
5
|
import { sanitizeTerminal } from './chunk-26BFN6DH.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 { stripTerminalControls } from './chunk-
|
|
3
|
+
import { stripTerminalControls } from './chunk-BBIFZCCB.js';
|
|
4
4
|
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-UXARYJQ4.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 { WorkCommandError, postJson } from './chunk-
|
|
3
|
+
import { WorkCommandError, postJson } from './chunk-DNXYI22V.js';
|
|
4
4
|
import { defaultGitRunner, materializeContext, fetchControlPlaneCommit, lookupGoverningSource } from './chunk-43R7JHQI.js';
|
|
5
5
|
import { buildRefusalReason } from './chunk-MVERFCX4.js';
|
|
6
6
|
import { unsupportedLayout, layoutRefusalReason, composeDelivery } from './chunk-I62FX622.js';
|