@outerlayer/cli 0.39.1-next.20261114132314 → 0.40.0-next.20261114141332

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.
Files changed (28) hide show
  1. package/dist/build-info.json +1 -1
  2. package/dist/{check-DI5VHJ5P.js → check-WZBT5JLI.js} +10 -9
  3. package/dist/{chunk-4WLPTDXO.js → chunk-G4DY6M4N.js} +1 -1
  4. package/dist/{chunk-W56BXHX2.js → chunk-HIQ3NVBX.js} +3 -3
  5. package/dist/{chunk-DJDBWYH6.js → chunk-LTQOGRYT.js} +1 -1
  6. package/dist/{chunk-NZTQLBGJ.js → chunk-MOPFZXA7.js} +29 -6
  7. package/dist/{chunk-5MHV44B7.js → chunk-NRSMXWUG.js} +1 -1
  8. package/dist/{chunk-NPDT2LYJ.js → chunk-OEOIKUUY.js} +1 -1
  9. package/dist/{chunk-XTCOREPZ.js → chunk-WEAYLRPJ.js} +1 -1
  10. package/dist/{chunk-5CL3SKAJ.js → chunk-ZV3YJFOG.js} +5 -5
  11. package/dist/{cli-TPAIAAXB.js → cli-SHFL3UG3.js} +67 -26
  12. package/dist/{command-OCUZB4YQ.js → command-EOPDBE5V.js} +2 -2
  13. package/dist/{container-start-Z4ILGPD6.js → container-start-SLO564RB.js} +3 -3
  14. package/dist/{doctor-LKBK3QXH.js → doctor-M4LYRU72.js} +3 -3
  15. package/dist/{host-checks-VEPO3645.js → host-checks-LEGAWS4P.js} +1 -1
  16. package/dist/index.js +1 -1
  17. package/dist/{init-F7P4EG5H.js → init-7VJMGE5J.js} +1 -1
  18. package/dist/{init-34PPCILK.js → init-LTZDJHZN.js} +1 -1
  19. package/dist/{init-agent-P5TGLXNZ.js → init-agent-ROLUCLOH.js} +1 -1
  20. package/dist/{init-cmd-DFPLIRCH.js → init-cmd-JNY333QI.js} +1 -1
  21. package/dist/{loop-BWAF3ERY.js → loop-EA5HISX2.js} +5 -5
  22. package/dist/{machine-OFITQ4GN.js → machine-MUSRMWLN.js} +1 -1
  23. package/dist/{runner-key-DURM6HOD.js → runner-key-2HJWN4IF.js} +1 -1
  24. package/dist/{status-SG65RWUN.js → status-TWBBVHZ5.js} +1 -1
  25. package/dist/{update-steps-L7OHMVOL.js → update-steps-5YPJTFYY.js} +2 -2
  26. package/dist/{work-proofs-cmd-RMTKEPNV.js → work-proofs-cmd-AT4Q2SZM.js} +1 -1
  27. package/dist/{work-proofs-record-LGNLXOP2.js → work-proofs-record-VQYVY5G5.js} +1 -1
  28. package/package.json +1 -1
@@ -1 +1 @@
1
- {"id":"2026-11-14T13:44:25.551Z","root":"/home/runner/work/outerlayer/outerlayer","pkg":"outerlayer"}
1
+ {"id":"2026-11-14T14:21:43.384Z","root":"/home/runner/work/outerlayer/outerlayer","pkg":"outerlayer"}
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { probeCredentials } from './chunk-5CL3SKAJ.js';
3
+ import { probeCredentials } from './chunk-ZV3YJFOG.js';
4
4
  import './chunk-3JVYMD4G.js';
5
- import './chunk-XTCOREPZ.js';
5
+ import './chunk-WEAYLRPJ.js';
6
6
  import './chunk-E7R2GIAW.js';
7
7
  import './chunk-7LZYS7BO.js';
8
8
  import './chunk-3LORQC4Z.js';
9
- import './chunk-DJDBWYH6.js';
9
+ import './chunk-LTQOGRYT.js';
10
10
  import './chunk-CYZQDC6N.js';
11
- import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-4WLPTDXO.js';
11
+ import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-G4DY6M4N.js';
12
12
  import './chunk-ZM7AL7UV.js';
13
13
  import { findServiceUnit } from './chunk-I2BO2QBH.js';
14
- import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsAgentCredential, agentCredentialCheck, claimPermissionProblem, formerSkillQueues, modellessQueues, formerSkillProblem, modellessProblem, createGatewaySandboxClient, gatewayRefusalReason } from './chunk-NZTQLBGJ.js';
14
+ import { createGatewaySandboxClient, gatewayRefusalReason, placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsAgentCredential, agentCredentialCheck, claimPermissionProblem, formerSkillQueues, modellessQueues, formerSkillProblem, modellessProblem } from './chunk-MOPFZXA7.js';
15
15
  import './chunk-BY4SXNUL.js';
16
16
  import './chunk-OCVQAHQD.js';
17
17
  import './chunk-2PGI6RDE.js';
@@ -42,7 +42,7 @@ import './chunk-FJGYU2EK.js';
42
42
  import './chunk-RIZCV7GX.js';
43
43
  import './chunk-7RDHN455.js';
44
44
  import './chunk-X26S7Y2N.js';
45
- import { loadRunnerConfig, RunnerConfigError, checkHooks, keyRunnerFactory } from './chunk-T7HMGQH2.js';
45
+ import { keyRunnerFactory, loadRunnerConfig, RunnerConfigError, checkHooks } from './chunk-T7HMGQH2.js';
46
46
  import './chunk-34IH7AVH.js';
47
47
  import './chunk-6AFTYWAB.js';
48
48
  import './chunk-DF2ATCBQ.js';
@@ -63,7 +63,7 @@ import './chunk-3GBUF5VG.js';
63
63
  import './chunk-HWVMRETT.js';
64
64
  import './chunk-SHCD5V7G.js';
65
65
  import './chunk-I6MLYOGL.js';
66
- import { SANDBOX_VARIABLES, SandboxError, describeSandboxError } from './chunk-E74YOVYI.js';
66
+ import { SandboxError, describeSandboxError, SANDBOX_VARIABLES } from './chunk-E74YOVYI.js';
67
67
  import { parseRunnerEnv } from './chunk-FTV63SCQ.js';
68
68
  import './chunk-CG44IGEF.js';
69
69
  import './chunk-545P7JY7.js';
@@ -122,7 +122,8 @@ async function askManagedSandboxes(config, fetchImpl) {
122
122
  } catch (err) {
123
123
  if (!(err instanceof SandboxError)) return { unchecked: describeCallFailure(err) };
124
124
  const refused = gatewayRefusalReason(err);
125
- return refused === void 0 ? { unchecked: describeSandboxError(err) } : { refused };
125
+ if (refused === void 0) return { unchecked: describeSandboxError(err) };
126
+ return err.code === "managed_sandboxes_unavailable" ? { refused, unavailable: true } : { refused };
126
127
  }
127
128
  }
128
129
  async function runRunnerCheck(configPath, deps = {}) {
@@ -255,4 +256,4 @@ async function runRunnerCheck(configPath, deps = {}) {
255
256
  return { ok: true, lines, unverifiedReason, summary: config.fleet === true ? `${config.url} \xB7 fleet machine${fleetName === void 0 ? "" : ` ${fleetName}`}` : `${config.url} \xB7 app ${keyRunnerFactory(config)}` };
256
257
  }
257
258
 
258
- export { runRunnerCheck };
259
+ export { askManagedSandboxes, runRunnerCheck };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { placeholderQueues, placeholderProblem } from './chunk-NZTQLBGJ.js';
3
+ import { placeholderQueues, placeholderProblem } from './chunk-MOPFZXA7.js';
4
4
  import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-ZKZD4CGD.js';
5
5
  import { getJson, WorkCommandError } from './chunk-RIZCV7GX.js';
6
6
  import { isBuiltinVm, builtinKind, EGRESS_SWITCHABLE_KEYS, imageBuildOf, keepsHostBuilder } from './chunk-T7HMGQH2.js';
@@ -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-VEPO3645.js');
132
+ const { testProofIn } = await import('./host-checks-LEGAWS4P.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-VEPO3645.js');
139
+ const { checksIn, isJudgeCheck } = await import('./host-checks-LEGAWS4P.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-LGNLXOP2.js');
375
+ const { runWorkProofsRecord } = await import('./work-proofs-record-VQYVY5G5.js');
376
376
  const result2 = await runWorkProofsRecord(opts);
377
377
  process.exitCode = result2.exitCode;
378
378
  return;
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { stripTerminalControls } from './chunk-NZTQLBGJ.js';
3
+ import { stripTerminalControls } from './chunk-MOPFZXA7.js';
4
4
  import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-7QDAAW2N.js';
5
5
  import { readFileSync } from 'fs';
6
6
 
@@ -2218,10 +2218,18 @@ var RunnerInitError = class extends Error {
2218
2218
  var UNMARKED_PLACEHOLDER_COMMAND = "echo 'edit runner.commands in this config file: it must start your agent on item $OUTERLAYER_WORK' >&2; exit 1";
2219
2219
  var PLACEHOLDER_MARKER = "outerlayer-placeholder";
2220
2220
  var PLACEHOLDER_COMMAND = `${UNMARKED_PLACEHOLDER_COMMAND} # ${PLACEHOLDER_MARKER}`;
2221
+ var SANDBOX_MACHINES = ["small", "large"];
2222
+ function sandboxPlatformRefusal(machine) {
2223
+ if (machine.platform === "linux" || machine.platform === "wsl2") return void 0;
2224
+ const where = machine.platform === "darwin" ? "macOS" : machine.platform === "windows" ? "native Windows" : machine.platform;
2225
+ return `--sandbox is for Linux and WSL2: the runner's service does not install on ${where}, so a runner set up with --sandbox would have nothing to keep it running.${machine.platform === "windows" ? " Run this again from a WSL2 shell." : ""}`;
2226
+ }
2221
2227
  function isolationRefusal(machine) {
2222
2228
  const reach = reachDockerStep(machine);
2223
2229
  const needs = machine.platform === "darwin" ? "Isolated builds on a Mac run in the runner image on Docker Desktop (https://docs.outerlayer.ai/run-the-runner-in-a-container) or in a Linux VM: run this again with --vm." : reach !== void 0 ? `Isolated builds need Docker Engine ${MIN_ENGINE_MAJOR} or later: ${reach}, then run this again.` : machine.platform === "windows" ? `Isolated builds need Docker Engine ${MIN_ENGINE_MAJOR} or later inside WSL2: install it there, then run this again from a WSL2 shell. Or run the runner image on Docker Desktop (https://docs.outerlayer.ai/run-the-runner-in-a-container).` : `Isolated builds need Docker Engine ${MIN_ENGINE_MAJOR} or later on Linux or WSL2: install it, then run this again.`;
2224
- return `This machine has ${describeMachineDocker(machine)}, so it cannot isolate a build. ${needs}`;
2230
+ const hasSandboxPath = machine.platform === "linux" || machine.platform === "wsl2";
2231
+ const advice = hasSandboxPath ? `To build in sandboxes that OuterLayer provides, run \`outerlayer runner init --sandbox\`: it needs no Docker. To build on this machine, ${needs.charAt(0).toLowerCase()}${needs.slice(1)}` : needs;
2232
+ return `This machine has ${describeMachineDocker(machine)}, so it cannot isolate a build. ${advice}`;
2225
2233
  }
2226
2234
  function isPlaceholderCommand(command) {
2227
2235
  return command === UNMARKED_PLACEHOLDER_COMMAND || command.includes(PLACEHOLDER_MARKER);
@@ -2276,6 +2284,10 @@ function runRunnerInit(configPath, opts = {}) {
2276
2284
  return writeRunnerInit(prepareRunnerInit(configPath, opts));
2277
2285
  }
2278
2286
  function prepareRunnerInit(configPath, opts = {}) {
2287
+ if (opts.sandbox !== void 0) {
2288
+ if (opts.configFromStdin !== void 0) throw new RunnerInitError("--sandbox cannot be used with the VM-side hand-off: that runner builds in containers.");
2289
+ if (opts.requireContainer === true) throw new RunnerInitError("--sandbox cannot be used with a runner that requires container builds.");
2290
+ }
2279
2291
  let config;
2280
2292
  let carried;
2281
2293
  let credential = opts.credential;
@@ -2297,11 +2309,15 @@ function prepareRunnerInit(configPath, opts = {}) {
2297
2309
  agent ??= handed.agent;
2298
2310
  }
2299
2311
  const machine = opts.machine ?? detectMachine();
2312
+ if (opts.sandbox !== void 0) {
2313
+ const refusal = sandboxPlatformRefusal(machine);
2314
+ if (refusal !== void 0) throw new RunnerInitError(refusal);
2315
+ }
2300
2316
  if (opts.requireContainer === true && !supportsContainerBuilds(machine)) {
2301
2317
  const fix = reachDockerStep(machine) ?? `install Docker Engine ${MIN_ENGINE_MAJOR} or later in the VM`;
2302
2318
  throw new RunnerInitError(`the VM has ${describeMachineDocker(machine)}, but the runner in it needs container builds: ${fix}, then run this again.`);
2303
2319
  }
2304
- const hooks = opts.requireContainer !== true && supportsMicroVmBuilds(machine) ? "builtin:vm" : supportsContainerBuilds(machine) ? "builtin:container" : void 0;
2320
+ const hooks = opts.sandbox !== void 0 ? "builtin:sandbox" : opts.requireContainer !== true && supportsMicroVmBuilds(machine) ? "builtin:vm" : supportsContainerBuilds(machine) ? "builtin:container" : void 0;
2305
2321
  if (hooks === void 0) throw new RunnerInitError(isolationRefusal(machine));
2306
2322
  const named = agent === void 0 ? void 0 : runnerAgentNamed(agent, agents);
2307
2323
  if (named !== void 0 && credential === void 0 && opts.credentialInEnvironment !== true && !hasStoredCredential(configPath, agents)) {
@@ -2319,10 +2335,10 @@ function prepareRunnerInit(configPath, opts = {}) {
2319
2335
  );
2320
2336
  }
2321
2337
  }
2322
- return { configPath, config, carried, credential, agent, agents, machine, hooks, needsKey, host: opts.host };
2338
+ return { configPath, config, carried, credential, agent, agents, machine, hooks, sandbox: opts.sandbox, needsKey, host: opts.host };
2323
2339
  }
2324
2340
  function writeRunnerInit(prepared, runnerKey) {
2325
- const { configPath, config, carried, credential, agent, agents, hooks, host } = prepared;
2341
+ const { configPath, config, carried, credential, agent, agents, hooks, host, sandbox } = prepared;
2326
2342
  if (prepared.needsKey && runnerKey === void 0) {
2327
2343
  throw new RunnerInitError(`${configPath}: apiKey is missing, and no runner key was pasted.`);
2328
2344
  }
@@ -2345,7 +2361,8 @@ function writeRunnerInit(prepared, runnerKey) {
2345
2361
  ...host === void 0 ? {} : { name: host },
2346
2362
  // The agent was named on this command line, so its commands win over any the hand-off carried.
2347
2363
  ...agent === void 0 ? {} : { commands: { ...agentCommands(agent, agents) } },
2348
- hooks: { provision: hooks, cleanup: hooks }
2364
+ hooks: { provision: hooks, cleanup: hooks },
2365
+ ...sandbox === void 0 ? {} : { sandbox: { provider: "outerlayer", machine: sandbox.machine, docker: true } }
2349
2366
  };
2350
2367
  if (host !== void 0) delete config.runner.host;
2351
2368
  mkdirSync(dirname(configPath), { recursive: true });
@@ -2354,6 +2371,12 @@ function writeRunnerInit(prepared, runnerKey) {
2354
2371
  `, { mode: RUNNER_FILE_MODE });
2355
2372
  return { configPath, hooks, credential: stored };
2356
2373
  }
2374
+ function removeRunnerBlock(configPath) {
2375
+ const config = readConfigObject(configPath);
2376
+ delete config.runner;
2377
+ writeFileSync(configPath, `${JSON.stringify(config, null, 2)}
2378
+ `);
2379
+ }
2357
2380
 
2358
2381
  // src/runner/host-setup.ts
2359
2382
  function placeholderQueues(config) {
@@ -14020,4 +14043,4 @@ async function runHostChecks(input) {
14020
14043
  }
14021
14044
  }
14022
14045
 
14023
- export { ADOPTED_FETCH_RETRY_WINDOW_MS, ALREADY_RELEASED, AttemptLogBook, CRITERIA_CHECK, 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, 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, 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, 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 };
14046
+ export { ADOPTED_FETCH_RETRY_WINDOW_MS, ALREADY_RELEASED, AttemptLogBook, CRITERIA_CHECK, 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, 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, sandboxPlatformRefusal, 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 };
@@ -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-LKBK3QXH.js');
1084
+ const { runnerHostChecks } = await import('./doctor-M4LYRU72.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 { helperSocketPath } from './chunk-NZTQLBGJ.js';
3
+ import { helperSocketPath } from './chunk-MOPFZXA7.js';
4
4
  import { UNIT_MARKER } from './chunk-ZKZD4CGD.js';
5
5
  import { runnerDir } from './chunk-I6MLYOGL.js';
6
6
  import { createHash } from 'crypto';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { scrubReason, stripTerminalControls } from './chunk-NZTQLBGJ.js';
3
+ import { scrubReason, stripTerminalControls } from './chunk-MOPFZXA7.js';
4
4
  import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-ZKZD4CGD.js';
5
5
  import { RunnerAlreadyRunningError, readPidFile } from './chunk-ZI5MT4TT.js';
6
6
  import { isSameProcess } from './chunk-JBJTC3UU.js';
@@ -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-XTCOREPZ.js';
4
+ import { reportFailedStart, fitImageBuildMemory } from './chunk-WEAYLRPJ.js';
5
5
  import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
6
6
  import { writeFleetState } from './chunk-7LZYS7BO.js';
7
7
  import { writePendingUpdate } from './chunk-3LORQC4Z.js';
8
- import { renderUpdateSteps } from './chunk-DJDBWYH6.js';
8
+ import { renderUpdateSteps } from './chunk-LTQOGRYT.js';
9
9
  import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-CYZQDC6N.js';
10
- import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-4WLPTDXO.js';
10
+ import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-G4DY6M4N.js';
11
11
  import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-ZM7AL7UV.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-NZTQLBGJ.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-MOPFZXA7.js';
13
13
  import { criteriaOf, loadCitationFinder, wholeItems, itemsSentence, oneLineReason, wholeEntries, parseJudgeAnswer } from './chunk-BY4SXNUL.js';
14
14
  import { RUNNER_PROTOCOL } from './chunk-OCVQAHQD.js';
15
15
  import { RUNNER_RESERVE_BYTES } from './chunk-ZKZD4CGD.js';
@@ -4782,7 +4782,7 @@ async function startRunner(configPath, deps, startup) {
4782
4782
  check: update.check ? () => update.check(configPath) : async () => {
4783
4783
  const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
4784
4784
  const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
4785
- return (await import('./check-DI5VHJ5P.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
4785
+ return (await import('./check-WZBT5JLI.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
4786
4786
  },
4787
4787
  now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
4788
4788
  log
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { gatherDoctorChecks, doctorExitCode, summarizeChecks, renderDoctorText, recordWrapped, recordUnwrapped, recordRemoval, readManifest, recordInstall, recordStatusline } from './chunk-5MHV44B7.js';
3
+ import { gatherDoctorChecks, doctorExitCode, summarizeChecks, renderDoctorText, recordWrapped, recordUnwrapped, recordRemoval, readManifest, recordInstall, recordStatusline } from './chunk-NRSMXWUG.js';
4
4
  import './chunk-ADXJXXGU.js';
5
5
  import { verifiedTrackerNames, TRACKERS } from './chunk-RIZCV7GX.js';
6
6
  import './chunk-7RDHN455.js';
@@ -3954,13 +3954,13 @@ what CLIs older than ${FIRST_VERSION_READING_AGENTS_SKILLS} do. \`` + cliInvocat
3954
3954
  if (changed.length > 0 && !opts.json) process.stdout.write(`Removed the claude function from ${changed.join(", ")}.
3955
3955
  `);
3956
3956
  }
3957
- const shell = !opts.remove && opts.shellFunction !== void 0 ? (await import('./init-cmd-DFPLIRCH.js')).applyShellFunctionFlag(opts.shellFunction, { home: homeFromEnv(), shellPath: process.env.SHELL }) : void 0;
3957
+ const shell = !opts.remove && opts.shellFunction !== void 0 ? (await import('./init-cmd-JNY333QI.js')).applyShellFunctionFlag(opts.shellFunction, { home: homeFromEnv(), shellPath: process.env.SHELL }) : void 0;
3958
3958
  if (opts.json) writeJson(shell === void 0 ? outcome.result : { ...outcome.result, shellFunction: { outcome: shell.outcome, reason: shell.reason } });
3959
3959
  else process.stdout.write(outcome.text + skillsLine + (shell?.text ?? ""));
3960
3960
  return;
3961
3961
  }
3962
3962
  await installMachineSkillsForSetup();
3963
- const { runInitCommand } = await import('./init-cmd-DFPLIRCH.js');
3963
+ const { runInitCommand } = await import('./init-cmd-JNY333QI.js');
3964
3964
  const code = await runInitCommand(
3965
3965
  { json: opts.json, factory: opts.factory, shellFunction: opts.shellFunction },
3966
3966
  {
@@ -5250,7 +5250,7 @@ a runner build, no row is failed.
5250
5250
  fail(trackerNumberError("--pr", opts.pr));
5251
5251
  return;
5252
5252
  }
5253
- const { runWorkProofsCommand } = await import('./work-proofs-cmd-RMTKEPNV.js');
5253
+ const { runWorkProofsCommand } = await import('./work-proofs-cmd-AT4Q2SZM.js');
5254
5254
  await runWorkProofsCommand({ ...opts, ...pr === void 0 ? {} : { pr } });
5255
5255
  });
5256
5256
  workCmd.command("list").description("List live work items for this factory").option("--stage <spec|build|review>", "filter by stage").option("--section <attention|waiting|flowing>", "filter by Queue section").option("--repo <owner/name>", "repository (default: the current checkout's remote)").option("--unclaimed", "only items with no live lease").option("--claimed", "only items with a live lease, held by a host or a local session").option("--startable", "only items a host can start: a build request, no open PR, no live lease").option("--needs <amend>", "only items with a thread waiting on an agent").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)").action(async (opts) => {
@@ -5473,7 +5473,7 @@ function registerRunnerCommands(program2) {
5473
5473
  const configOption = "the cloud config file to run against (default: ~/.outerlayer/config.json)";
5474
5474
  runnerCmd.command("start").description("Run the loop: claim work, run it, report, clean up, repeat").option("--config <path>", configOption).action(async (opts) => {
5475
5475
  const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-334GXURH.js');
5476
- const { start, RunnerStartError } = await import('./loop-BWAF3ERY.js');
5476
+ const { start, RunnerStartError } = await import('./loop-EA5HISX2.js');
5477
5477
  const { RunnerAlreadyRunningError } = await import('./pidfile-ERHOAFUE.js');
5478
5478
  const configPath = opts.config ?? defaultRunnerConfigPath();
5479
5479
  try {
@@ -5497,8 +5497,8 @@ The image sets OUTERLAYER_RUNNER_IMAGE; outside the image, use \`runner start\`.
5497
5497
  `
5498
5498
  ).action(async () => {
5499
5499
  const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-334GXURH.js');
5500
- const { containerStart, containerStartExit } = await import('./container-start-Z4ILGPD6.js');
5501
- const { start, RunnerStartError } = await import('./loop-BWAF3ERY.js');
5500
+ const { containerStart, containerStartExit } = await import('./container-start-SLO564RB.js');
5501
+ const { start, RunnerStartError } = await import('./loop-EA5HISX2.js');
5502
5502
  const { RunnerAlreadyRunningError } = await import('./pidfile-ERHOAFUE.js');
5503
5503
  try {
5504
5504
  const outcome = containerStartExit(await containerStart({
@@ -5522,14 +5522,14 @@ The image sets OUTERLAYER_RUNNER_IMAGE; outside the image, use \`runner start\`.
5522
5522
  ).action(async (opts) => {
5523
5523
  const { defaultRunnerConfigPath } = await import('./config-334GXURH.js');
5524
5524
  const { runnerDir } = await import('./paths-B5GNVTVC.js');
5525
- const { runUpdateSteps } = await import('./update-steps-L7OHMVOL.js');
5525
+ const { runUpdateSteps } = await import('./update-steps-5YPJTFYY.js');
5526
5526
  const text = await runUpdateSteps({ runnerDirPath: runnerDir(opts.config ?? defaultRunnerConfigPath()) });
5527
5527
  process.stdout.write(`${text}
5528
5528
  `);
5529
5529
  });
5530
5530
  runnerCmd.command("check").description("Validate the config, the hooks and the key, and print the effective settings").option("--config <path>", configOption).action(async (opts) => {
5531
5531
  const { defaultRunnerConfigPath } = await import('./config-334GXURH.js');
5532
- const { runRunnerCheck } = await import('./check-DI5VHJ5P.js');
5532
+ const { runRunnerCheck } = await import('./check-WZBT5JLI.js');
5533
5533
  const configPath = opts.config ?? defaultRunnerConfigPath();
5534
5534
  const result = await runRunnerCheck(configPath);
5535
5535
  if (!result.ok) {
@@ -5563,13 +5563,13 @@ The image sets OUTERLAYER_RUNNER_IMAGE; outside the image, use \`runner start\`.
5563
5563
  }
5564
5564
  }
5565
5565
  const buildCpusMax = opts.buildCpusMax === void 0 ? void 0 : Number(opts.buildCpusMax);
5566
- if (buildCpusMax !== void 0 && !(await import('./command-OCUZB4YQ.js')).cpusAreValid(buildCpusMax)) {
5566
+ if (buildCpusMax !== void 0 && !(await import('./command-EOPDBE5V.js')).cpusAreValid(buildCpusMax)) {
5567
5567
  fail(`--build-cpus-max ${opts.buildCpusMax} is not a number of CPUs from 0.01 to 1024.`);
5568
5568
  return;
5569
5569
  }
5570
5570
  try {
5571
5571
  if (opts.service === true) {
5572
- const { installServiceCommand, serviceSuccessText } = await import('./command-OCUZB4YQ.js');
5572
+ const { installServiceCommand, serviceSuccessText } = await import('./command-EOPDBE5V.js');
5573
5573
  const result2 = await installServiceCommand({
5574
5574
  configPath,
5575
5575
  print: opts.print,
@@ -5624,13 +5624,13 @@ To keep it running, run ${C.yellow}${cliInvocation()} runner install --service${
5624
5624
  return;
5625
5625
  }
5626
5626
  const { defaultRunnerConfigPath } = await import('./config-334GXURH.js');
5627
- const { uninstallServiceCommand } = await import('./command-OCUZB4YQ.js');
5627
+ const { uninstallServiceCommand } = await import('./command-EOPDBE5V.js');
5628
5628
  const result = await uninstallServiceCommand({ configPath: opts.config ?? defaultRunnerConfigPath(), unitName: opts.unitName, home: homeFromEnv() });
5629
5629
  if (result.ok) for (const line of result.lines) process.stdout.write(`${C.green}\u2713${C.reset} ${line}
5630
5630
  `);
5631
5631
  else fail(result.lines.length > 0 ? result.lines.join("\n ") : "the service was not removed");
5632
5632
  });
5633
- runnerCmd.command("init").description("Write a runner block that fits this machine; on macOS, offers a Linux VM").option("--config <path>", configOption).option("--vm", "on macOS, run the runner in a Linux VM (Lima), with container builds").addOption(new Option("--config-stdin", "the VM-side hand-off: read the whole config as JSON on stdin").hideHelp()).option("--vm-cli-package <path>", "with --vm, install this packed CLI tarball in the VM").option("--unit-name <name>", "the service unit's name, to run a second runner beside the first").option("--agent <name>", `start this agent in queue commands (${headlessNames().join(", ")}); credential on stdin`).option("--factory <org/factory>", "factory to create the runner key on, as <org>/<factory>").option("--app-id <id>", "factory id, instead of --factory (Settings \u2192 General)").addHelpText(
5633
+ runnerCmd.command("init").description("Write a runner block that fits this machine; on macOS, offers a Linux VM").option("--config <path>", configOption).option("--vm", "on macOS, run the runner in a Linux VM (Lima), with container builds").addOption(new Option("--config-stdin", "the VM-side hand-off: read the whole config as JSON on stdin").hideHelp()).option("--vm-cli-package <path>", "with --vm, install this packed CLI tarball in the VM").option("--sandbox", "on Linux or WSL2, build in sandboxes that OuterLayer provides").option("--machine <size>", "with --sandbox, the machine size: small (default) or large").option("--unit-name <name>", "the service unit's name, to run a second runner beside the first").option("--agent <name>", `start this agent in queue commands (${headlessNames().join(", ")}); credential on stdin`).option("--factory <org/factory>", "factory to create the runner key on, as <org>/<factory>").option("--app-id <id>", "factory id, instead of --factory (Settings \u2192 General)").addHelpText(
5634
5634
  "after",
5635
5635
  () => `
5636
5636
  With no apiKey in the config file, and a login saved by \`${cliInvocation()} login\`,
@@ -5654,14 +5654,37 @@ already in ${words().envFile} is used.
5654
5654
  printf '%s' "$${words().variables[0]}" | ${cliInvocation()} runner init --agent ${words().runnerName} --factory <org>/<factory>
5655
5655
  `
5656
5656
  ).action(async (opts) => {
5657
- const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-334GXURH.js');
5658
- const { prepareRunnerInit, runRunnerInit, RunnerInitError, writeRunnerInit } = await import('./init-F7P4EG5H.js');
5659
- const { obtainRunnerKey, runnerKeyLogin } = await import('./runner-key-DURM6HOD.js');
5660
- const { detectMachine } = await import('./machine-OFITQ4GN.js');
5661
- const { chooseVm, runVmInit, VmInitError } = await import('./init-34PPCILK.js');
5657
+ const { defaultRunnerConfigPath, loadRunnerConfig, RunnerConfigError } = await import('./config-334GXURH.js');
5658
+ const { prepareRunnerInit, runRunnerInit, RunnerInitError, writeRunnerInit, removeRunnerBlock, sandboxPlatformRefusal, SANDBOX_MACHINES } = await import('./init-7VJMGE5J.js');
5659
+ const { askManagedSandboxes } = await import('./check-WZBT5JLI.js');
5660
+ const { obtainRunnerKey, runnerKeyLogin } = await import('./runner-key-2HJWN4IF.js');
5661
+ const { detectMachine } = await import('./machine-MUSRMWLN.js');
5662
+ const { chooseVm, runVmInit, VmInitError } = await import('./init-LTZDJHZN.js');
5662
5663
  const { credentialFromStdin, isAgentName, restartForCredential, RunnerEnvError } = await import('./runner-env-4PF5MNVO.js');
5663
5664
  const { headlessNames: headlessNames2 } = await import('./runner-agents-FCJR2SGQ.js');
5664
5665
  const configPath = opts.config ?? defaultRunnerConfigPath();
5666
+ if (opts.sandbox !== true && opts.machine !== void 0) {
5667
+ fail("--machine needs --sandbox: it sets the machine size of a sandbox that OuterLayer provides.");
5668
+ return;
5669
+ }
5670
+ let sandbox;
5671
+ if (opts.sandbox === true) {
5672
+ const size = SANDBOX_MACHINES.find((name) => name === (opts.machine ?? "small"));
5673
+ if (size === void 0) {
5674
+ fail(`--machine ${opts.machine}: a sandbox's machine size is ${SANDBOX_MACHINES.join(" or ")}.`);
5675
+ return;
5676
+ }
5677
+ if (opts.vm === true || opts.configStdin === true) {
5678
+ fail(`--sandbox cannot be used with ${opts.vm === true ? "--vm" : "--config-stdin"}: both set up a runner that builds in containers.`);
5679
+ return;
5680
+ }
5681
+ const refusal = sandboxPlatformRefusal(detectMachine());
5682
+ if (refusal !== void 0) {
5683
+ fail(refusal);
5684
+ return;
5685
+ }
5686
+ sandbox = { machine: size };
5687
+ }
5665
5688
  if (opts.agent !== void 0 && !isAgentName(opts.agent)) {
5666
5689
  fail(`--agent ${opts.agent}: runner init writes commands for ${headlessNames2().join(", ")}. For another agent, leave --agent out and edit runner.commands.`);
5667
5690
  return;
@@ -5672,7 +5695,7 @@ already in ${words().envFile} is used.
5672
5695
  return;
5673
5696
  }
5674
5697
  try {
5675
- const { agentCredentialText, credentialQuestion, initAgent, terminalQuestion } = await import('./init-agent-P5TGLXNZ.js');
5698
+ const { agentCredentialText, credentialQuestion, initAgent, terminalQuestion } = await import('./init-agent-ROLUCLOH.js');
5676
5699
  agent = await initAgent({
5677
5700
  flag: agent,
5678
5701
  handOff: opts.configStdin === true,
@@ -5757,11 +5780,20 @@ hooks: ${result2.hooks}
5757
5780
  `);
5758
5781
  return;
5759
5782
  }
5760
- const prepared = prepareRunnerInit(configPath, { machine, agent, credential, keyFromLogin: makeKey !== void 0 });
5783
+ const prepared = prepareRunnerInit(configPath, { machine, agent, credential, keyFromLogin: makeKey !== void 0, sandbox });
5761
5784
  const created = makeKey === void 0 ? void 0 : await makeKey();
5762
5785
  const result = writeRunnerInit(prepared, created);
5763
5786
  const { ensureHostKey } = await import('./host-key-Q3OKQTJF.js');
5764
5787
  const hostKey = await ensureHostKey(configPath);
5788
+ const sandboxAnswer = sandbox === void 0 ? void 0 : await askManagedSandboxes(loadRunnerConfig(configPath), void 0);
5789
+ if (sandboxAnswer?.unavailable === true) {
5790
+ removeRunnerBlock(configPath);
5791
+ const kept = [`the runner key in ${result.configPath}`, ...result.credential === void 0 ? [] : [`the agent credential in ${result.credential.path}`], "the host key"];
5792
+ fail(
5793
+ `This gateway provides no sandboxes, so a runner that builds in sandboxes cannot work here. No runner block was left in ${result.configPath}, and no service was set up. The command left ${kept.join(", ")}. To build on this machine, run ${cliInvocation()} runner init with no --sandbox.`
5794
+ );
5795
+ return;
5796
+ }
5765
5797
  if (created !== void 0) {
5766
5798
  process.stdout.write(`${C.green}\u2713${C.reset} saved the runner key in ${result.configPath}
5767
5799
  `);
@@ -5778,8 +5810,17 @@ hooks: ${result2.hooks}
5778
5810
  `${C.green}\u2713${C.reset} host key ${hostKey.fingerprint}: the runner key binds to it on its first claim
5779
5811
  `
5780
5812
  );
5781
- process.stdout.write(`${C.green}\u2713${C.reset} hooks: ${result.hooks}${result.hooks === "builtin:vm" ? " (builds run in microVMs)" : " (builds run in containers)"}
5813
+ const hooksNote = result.hooks === "builtin:vm" ? "builds run in microVMs" : result.hooks === "builtin:sandbox" ? "builds run in sandboxes that OuterLayer provides" : "builds run in containers";
5814
+ process.stdout.write(`${C.green}\u2713${C.reset} hooks: ${result.hooks} (${hooksNote})
5782
5815
  `);
5816
+ if (sandboxAnswer !== void 0) {
5817
+ if (sandboxAnswer.refused !== void 0) process.stdout.write(`${C.yellow}!${C.reset} the gateway will not start a sandbox for this runner yet: ${sandboxAnswer.refused}
5818
+ `);
5819
+ else if (sandboxAnswer.unchecked !== void 0) process.stdout.write(`${C.yellow}!${C.reset} could not check whether the gateway provides sandboxes: ${sandboxAnswer.unchecked}
5820
+ `);
5821
+ else process.stdout.write(`${C.green}\u2713${C.reset} the gateway provides sandboxes to this runner
5822
+ `);
5823
+ }
5783
5824
  const { runRunnerInstall, RunnerInstallError, RunnerDowngradeError, launcherSummary } = await import('./install-cmd-AKZE7R2E.js');
5784
5825
  let installedLayout = false;
5785
5826
  let noService = "it starts the runner from the install layout, which needs a CLI installed with npm";
@@ -5812,7 +5853,7 @@ ${C.yellow}The runner will not update itself: ${installErr.message}${C.reset}
5812
5853
  let serviceUp = false;
5813
5854
  let restart;
5814
5855
  if (installedLayout) {
5815
- const { installServiceCommand } = await import('./command-OCUZB4YQ.js');
5856
+ const { installServiceCommand } = await import('./command-EOPDBE5V.js');
5816
5857
  const service = await installServiceCommand({
5817
5858
  configPath,
5818
5859
  entryPath: process.argv[1] ?? "",
@@ -5950,7 +5991,7 @@ A repository with no devcontainer file builds on the universal image the CLI pin
5950
5991
  });
5951
5992
  runnerCmd.command("stop").description("Take no more work; finish running jobs, then exit").option("--config <path>", "the cloud config file naming the runner to stop").option("--now", "end running jobs immediately, with outcome stopped").action(async (opts) => {
5952
5993
  const { defaultRunnerConfigPath } = await import('./config-334GXURH.js');
5953
- const { requestStop } = await import('./loop-BWAF3ERY.js');
5994
+ const { requestStop } = await import('./loop-EA5HISX2.js');
5954
5995
  const configPath = opts.config ?? defaultRunnerConfigPath();
5955
5996
  const { runnerImageVersion } = await import('./image-tag-CPEVAJDD.js');
5956
5997
  await requestStop(configPath, Boolean(opts.now), void 0, { image: runnerImageVersion() !== void 0 });
@@ -5958,8 +5999,8 @@ A repository with no devcontainer file builds on the universal image the CLI pin
5958
5999
  runnerCmd.command("status").description("List running jobs; with --recent, finished ones too").option("--config <path>", "the cloud config file naming the runner to inspect").option("--recent", "also list finished jobs, newest first, capped at 20").option("--json", "machine-readable JSON output").action(async (opts) => {
5959
6000
  const { defaultRunnerConfigPath, loadRunnerConfig } = await import('./config-334GXURH.js');
5960
6001
  const { jobsDir, runnerDir } = await import('./paths-B5GNVTVC.js');
5961
- const { listJobFiles, runnerProcessState } = await import('./loop-BWAF3ERY.js');
5962
- const { renderStatus } = await import('./status-SG65RWUN.js');
6002
+ const { listJobFiles, runnerProcessState } = await import('./loop-EA5HISX2.js');
6003
+ const { renderStatus } = await import('./status-TWBBVHZ5.js');
5963
6004
  const { readHousekeepingRecord } = await import('./record-GI6LXXNB.js');
5964
6005
  const path2 = await import('path');
5965
6006
  const configPath = opts.config ?? defaultRunnerConfigPath();
@@ -6025,7 +6066,7 @@ A repository with no devcontainer file builds on the universal image the CLI pin
6025
6066
  });
6026
6067
  runnerCmd.command("logs").argument("<item>", "the work item's number in the factory, or a build's claim id").description("Print the newest attempt's log for one item or claim id").option("--config <path>", "the cloud config file naming the runner to inspect").option("-f, --follow", "keep printing as the log grows").action(async (itemArg, opts) => {
6027
6068
  const { defaultRunnerConfigPath } = await import('./config-334GXURH.js');
6028
- const { listJobFiles } = await import('./loop-BWAF3ERY.js');
6069
+ const { listJobFiles } = await import('./loop-EA5HISX2.js');
6029
6070
  const { describeAmbiguous, logPathFor, selectAttempt, tail, RunnerLogsError } = await import('./logs-BQC5UDSI.js');
6030
6071
  const configPath = opts.config ?? defaultRunnerConfigPath();
6031
6072
  const jobs = listJobFiles(configPath);
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { realOwnership, accountNamed, handOver, runRunnerInstall, launcherSummary, restartNote, accountIdentity } from './chunk-6G6FOCJW.js';
4
- import { installHelper, helperUnitFor, helperSocketFor, uninstallHelper } from './chunk-NPDT2LYJ.js';
4
+ import { installHelper, helperUnitFor, helperSocketFor, uninstallHelper } from './chunk-OEOIKUUY.js';
5
5
  import './chunk-SWYBUMUL.js';
6
6
  import { currentLink, execStartCommand } from './chunk-ZM7AL7UV.js';
7
- import { detectMachine, ensureFirecrackerAndJailer } from './chunk-NZTQLBGJ.js';
7
+ import { detectMachine, ensureFirecrackerAndJailer } from './chunk-MOPFZXA7.js';
8
8
  import './chunk-BY4SXNUL.js';
9
9
  import './chunk-OCVQAHQD.js';
10
10
  import './chunk-2PGI6RDE.js';
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { reportFailedStart, BUILD_MEMORY_VARIABLE } from './chunk-XTCOREPZ.js';
4
- import { readOwnContainer } from './chunk-DJDBWYH6.js';
5
- import { detectMachine, supportsContainerBuilds, MIN_ENGINE_MAJOR, describeMachineDocker, RunnerInitError, prepareRunnerInit, writeRunnerInit } from './chunk-NZTQLBGJ.js';
3
+ import { reportFailedStart, BUILD_MEMORY_VARIABLE } from './chunk-WEAYLRPJ.js';
4
+ import { readOwnContainer } from './chunk-LTQOGRYT.js';
5
+ import { detectMachine, supportsContainerBuilds, MIN_ENGINE_MAJOR, describeMachineDocker, RunnerInitError, prepareRunnerInit, writeRunnerInit } from './chunk-MOPFZXA7.js';
6
6
  import './chunk-BY4SXNUL.js';
7
7
  import './chunk-OCVQAHQD.js';
8
8
  import './chunk-2PGI6RDE.js';
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { managedProblems, fleetConfigProblem, askFleetMachine } from './chunk-4WLPTDXO.js';
4
- import { helperBinaryFor } from './chunk-NPDT2LYJ.js';
3
+ import { managedProblems, fleetConfigProblem, askFleetMachine } from './chunk-G4DY6M4N.js';
4
+ import { helperBinaryFor } from './chunk-OEOIKUUY.js';
5
5
  import { launcherCheck } from './chunk-SWYBUMUL.js';
6
6
  import './chunk-ZM7AL7UV.js';
7
- import { needsAgentCredential, agentCredentialCheck, detectMachine, supportsContainerBuilds, describeMachineDocker, MIN_ENGINE_MAJOR, reachDockerStep, supportsMicroVmBuilds, microVmArchSupported, microVmAssetsPinned, helperFirecrackerNote, probeHelper, helperSocketPath, KIND_LABEL, missingPermissionOf, missingPermissionFix } from './chunk-NZTQLBGJ.js';
7
+ import { needsAgentCredential, agentCredentialCheck, detectMachine, supportsContainerBuilds, describeMachineDocker, MIN_ENGINE_MAJOR, reachDockerStep, supportsMicroVmBuilds, microVmArchSupported, microVmAssetsPinned, helperFirecrackerNote, probeHelper, helperSocketPath, KIND_LABEL, missingPermissionOf, missingPermissionFix } from './chunk-MOPFZXA7.js';
8
8
  import './chunk-BY4SXNUL.js';
9
9
  import './chunk-OCVQAHQD.js';
10
10
  import './chunk-2PGI6RDE.js';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { CRITERIA_CHECK, MAX_CHECK_ITEMS_BYTES, builtOf, checksIn, commandItems, isJudgeCheck, makeRecorder, readDefinitions, runHostChecks, testProofIn, timeoutAfter } from './chunk-NZTQLBGJ.js';
3
+ export { CRITERIA_CHECK, MAX_CHECK_ITEMS_BYTES, builtOf, checksIn, commandItems, isJudgeCheck, makeRecorder, readDefinitions, runHostChecks, testProofIn, timeoutAfter } from './chunk-MOPFZXA7.js';
4
4
  import './chunk-BY4SXNUL.js';
5
5
  import './chunk-OCVQAHQD.js';
6
6
  import './chunk-2PGI6RDE.js';
package/dist/index.js CHANGED
@@ -25,5 +25,5 @@ var { runSubcommand } = await import('./agent-subcommand-FFRNWF6T.js');
25
25
  var launcherCode = await runSubcommand(argv);
26
26
  if (launcherCode !== void 0) process.exit(launcherCode);
27
27
  (await import('./hook-fast-CKQWLT6W.js')).recordLinkExitFailure(argv);
28
- var { runCli } = await import('./cli-TPAIAAXB.js');
28
+ var { runCli } = await import('./cli-SHFL3UG3.js');
29
29
  await runCli(process.argv);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { PLACEHOLDER_MARKER, RunnerInitError, isPlaceholderCommand, prepareRunnerInit, readConfigObject, runRunnerInit, writeRunnerInit } from './chunk-NZTQLBGJ.js';
3
+ export { PLACEHOLDER_MARKER, RunnerInitError, SANDBOX_MACHINES, isPlaceholderCommand, prepareRunnerInit, readConfigObject, removeRunnerBlock, runRunnerInit, sandboxPlatformRefusal, writeRunnerInit } from './chunk-MOPFZXA7.js';
4
4
  import './chunk-BY4SXNUL.js';
5
5
  import './chunk-OCVQAHQD.js';
6
6
  import './chunk-2PGI6RDE.js';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { npmSupportsProvenance } from './chunk-E7R2GIAW.js';
4
- import { RunnerInitError, readConfigObject } from './chunk-NZTQLBGJ.js';
4
+ import { RunnerInitError, readConfigObject } from './chunk-MOPFZXA7.js';
5
5
  import './chunk-BY4SXNUL.js';
6
6
  import './chunk-OCVQAHQD.js';
7
7
  import './chunk-2PGI6RDE.js';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { RunnerInitError } from './chunk-NZTQLBGJ.js';
3
+ import { RunnerInitError } from './chunk-MOPFZXA7.js';
4
4
  import './chunk-BY4SXNUL.js';
5
5
  import './chunk-OCVQAHQD.js';
6
6
  import './chunk-2PGI6RDE.js';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { summarizeChecks, summaryText, renderDoctorText } from './chunk-5MHV44B7.js';
3
+ import { summarizeChecks, summaryText, renderDoctorText } from './chunk-NRSMXWUG.js';
4
4
  import { shellFunctionInstalled, removeShellFunction, installShellFunction, SHELL_FUNCTION_LINE } from './chunk-IRFN2ZHJ.js';
5
5
  import './chunk-ADXJXXGU.js';
6
6
  import './chunk-RIZCV7GX.js';
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { LAPSED_REASON, RunnerStartError, applyComments, endWhenStartFails, fleetKeepalive, leaseTimeLeftFor, listJobFiles, logUnusableHelper, prepareSession, probeBuild, probeCredentials, provisionsBesideOthers, requestStop, runnerProcessState, runtimeOf, sampleUsage, start, tick, watchTick } from './chunk-5CL3SKAJ.js';
3
+ export { LAPSED_REASON, RunnerStartError, applyComments, endWhenStartFails, fleetKeepalive, leaseTimeLeftFor, listJobFiles, logUnusableHelper, prepareSession, probeBuild, probeCredentials, provisionsBesideOthers, requestStop, runnerProcessState, runtimeOf, sampleUsage, start, tick, watchTick } from './chunk-ZV3YJFOG.js';
4
4
  import './chunk-3JVYMD4G.js';
5
- import './chunk-XTCOREPZ.js';
5
+ import './chunk-WEAYLRPJ.js';
6
6
  import './chunk-E7R2GIAW.js';
7
7
  import './chunk-7LZYS7BO.js';
8
8
  import './chunk-3LORQC4Z.js';
9
- import './chunk-DJDBWYH6.js';
9
+ import './chunk-LTQOGRYT.js';
10
10
  import './chunk-CYZQDC6N.js';
11
- import './chunk-4WLPTDXO.js';
11
+ import './chunk-G4DY6M4N.js';
12
12
  import './chunk-ZM7AL7UV.js';
13
- import './chunk-NZTQLBGJ.js';
13
+ import './chunk-MOPFZXA7.js';
14
14
  import './chunk-BY4SXNUL.js';
15
15
  import './chunk-OCVQAHQD.js';
16
16
  import './chunk-2PGI6RDE.js';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { describeMachineDocker, detectMachine, microVmArchSupported, microVmAssetsPinned, reachDockerStep, supportsContainerBuilds, supportsMicroVmBuilds } from './chunk-NZTQLBGJ.js';
3
+ export { describeMachineDocker, detectMachine, microVmArchSupported, microVmAssetsPinned, reachDockerStep, supportsContainerBuilds, supportsMicroVmBuilds } from './chunk-MOPFZXA7.js';
4
4
  import './chunk-BY4SXNUL.js';
5
5
  import './chunk-OCVQAHQD.js';
6
6
  import './chunk-2PGI6RDE.js';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { readConfigObject, RunnerInitError } from './chunk-NZTQLBGJ.js';
3
+ import { readConfigObject, RunnerInitError } from './chunk-MOPFZXA7.js';
4
4
  import './chunk-BY4SXNUL.js';
5
5
  import './chunk-OCVQAHQD.js';
6
6
  import './chunk-2PGI6RDE.js';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { isReadable, LEASE_SECONDS, ALREADY_RELEASED, RENEW_INTERVAL_SECONDS } from './chunk-NZTQLBGJ.js';
3
+ import { isReadable, LEASE_SECONDS, ALREADY_RELEASED, RENEW_INTERVAL_SECONDS } from './chunk-MOPFZXA7.js';
4
4
  import './chunk-BY4SXNUL.js';
5
5
  import './chunk-OCVQAHQD.js';
6
6
  import './chunk-2PGI6RDE.js';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { readOwnContainer, renderUpdateSteps, runUpdateSteps } from './chunk-DJDBWYH6.js';
4
- import './chunk-NZTQLBGJ.js';
3
+ export { readOwnContainer, renderUpdateSteps, runUpdateSteps } from './chunk-LTQOGRYT.js';
4
+ import './chunk-MOPFZXA7.js';
5
5
  import './chunk-BY4SXNUL.js';
6
6
  import './chunk-OCVQAHQD.js';
7
7
  import './chunk-2PGI6RDE.js';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- export { classifyProofs, classifyProofsAt, otherPullRequestHeads, renderProofRow, resolveProofsItem, runWorkProofs, runWorkProofsCommand } from './chunk-W56BXHX2.js';
3
+ export { classifyProofs, classifyProofsAt, otherPullRequestHeads, renderProofRow, resolveProofsItem, runWorkProofs, runWorkProofsCommand } from './chunk-HIQ3NVBX.js';
4
4
  import './chunk-BY4SXNUL.js';
5
5
  import './chunk-RIZCV7GX.js';
6
6
  import './chunk-7RDHN455.js';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { runWorkComment } from './chunk-4J5KDIHZ.js';
4
- import { resolveProofsItem, ownPullRequest, otherPullRequestHeads, testProofMode, classifyProofsAt, runWorkProofs, proofsCommentId, testFilesOf, freshXmlFiles, joinResults, testSelectors, kindProblem, renderProofRow, proofsCommentBody } from './chunk-W56BXHX2.js';
4
+ import { resolveProofsItem, ownPullRequest, otherPullRequestHeads, testProofMode, classifyProofsAt, runWorkProofs, proofsCommentId, testFilesOf, freshXmlFiles, joinResults, testSelectors, kindProblem, renderProofRow, proofsCommentBody } from './chunk-HIQ3NVBX.js';
5
5
  import { runEmitDemo, planScreenshots, chapterPassed, readStill } from './chunk-QNHHD75P.js';
6
6
  import { readNewestDemo } from './chunk-ER6KQCVJ.js';
7
7
  import { runEmitArtifact } from './chunk-GD2LIK6W.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@outerlayer/cli",
3
- "version": "0.39.1-next.20261114132314",
3
+ "version": "0.40.0-next.20261114141332",
4
4
  "description": "OuterLayer CLI — commands: init, claude, opencode, connect, doctor, login, logout, sync, daemon (alias: watch), emit, demo, findings, work, run, spec, runner, hooks, mcp, context. Capture and sync coding-agent sessions, and record proof of factory work.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Magu Studios, Inc.",