@outerlayer/cli 0.30.2-next.20261020101955 → 0.31.0-next.20261020121516

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 (101) hide show
  1. package/dist/{agent-setup-ZNYAXAWI.js → agent-setup-E7CMDUR5.js} +6 -6
  2. package/dist/{bridge-FI7OF2H3.js → bridge-3EG6Q34K.js} +2 -2
  3. package/dist/{build-PXRDWSN4.js → build-7QD3VJ6U.js} +4 -4
  4. package/dist/build-info.json +1 -1
  5. package/dist/{builder-UNVHUZL7.js → builder-JG34X757.js} +4 -4
  6. package/dist/{check-Y6D7C66D.js → check-EP4F6VOP.js} +47 -34
  7. package/dist/{chunk-B5CQJBZ2.js → chunk-2DH7VRLQ.js} +2 -2
  8. package/dist/{chunk-MBZTX4V2.js → chunk-4XPAQXJF.js} +1 -1
  9. package/dist/chunk-53SPRUEA.js +211 -0
  10. package/dist/{chunk-PP3CGEQZ.js → chunk-6C5MZ7UG.js} +1 -1
  11. package/dist/{chunk-YVY3IVYV.js → chunk-77F7NGAZ.js} +3 -3
  12. package/dist/{chunk-PS3AHE6C.js → chunk-A2737R27.js} +2 -2
  13. package/dist/{chunk-DBELICD6.js → chunk-A4UGPQXT.js} +4 -4
  14. package/dist/{chunk-IRF2FKB5.js → chunk-APSYTJ6I.js} +1 -1
  15. package/dist/{chunk-TR5T5Z2L.js → chunk-BPPWINVG.js} +29 -71
  16. package/dist/{chunk-7YSR636F.js → chunk-CBEM7ZWX.js} +3 -3
  17. package/dist/{chunk-AM3GMWQK.js → chunk-F3EF56LQ.js} +1 -1
  18. package/dist/{chunk-3YLHIXLR.js → chunk-GIRXO5HA.js} +1 -1
  19. package/dist/{chunk-B7NT4YZ3.js → chunk-HB6SACVH.js} +22 -18
  20. package/dist/{chunk-WHCDULC4.js → chunk-HDSDUTX4.js} +17 -1
  21. package/dist/{chunk-TKJISBV6.js → chunk-HIGJTX5U.js} +1 -1
  22. package/dist/{chunk-SOWXLIDN.js → chunk-KP6R7CV3.js} +1 -1
  23. package/dist/{chunk-TGUWHA27.js → chunk-MCOG33O7.js} +2 -2
  24. package/dist/{chunk-4OKXGZM3.js → chunk-MIVAWAMF.js} +5 -5
  25. package/dist/{chunk-DLY22KHX.js → chunk-NIS2PIS4.js} +2 -2
  26. package/dist/{chunk-5HZDPOJI.js → chunk-NJS7JJYN.js} +3 -3
  27. package/dist/{chunk-SJ4DX2AD.js → chunk-OSVS2QVP.js} +2 -2
  28. package/dist/{chunk-3XUZPSBV.js → chunk-P2EVMNU6.js} +2 -2
  29. package/dist/{chunk-2ZMJFGOZ.js → chunk-P7BEZAEU.js} +7 -2
  30. package/dist/{chunk-MBVSVQVH.js → chunk-QQGZ5THT.js} +1 -1
  31. package/dist/{chunk-6CNNRO53.js → chunk-RJYKTWUP.js} +3 -3
  32. package/dist/{chunk-3F7RC3UA.js → chunk-RQGHHEM7.js} +3 -3
  33. package/dist/{chunk-IRTZYDZO.js → chunk-T5TBGOT6.js} +1 -1
  34. package/dist/{chunk-HMAYAMOQ.js → chunk-TYRORELN.js} +10 -10
  35. package/dist/{chunk-QWJBTFAF.js → chunk-TZQIEUDE.js} +1 -1
  36. package/dist/{chunk-ZNMVBHGJ.js → chunk-V52SJHWK.js} +2 -2
  37. package/dist/{chunk-5VWKCY2E.js → chunk-VJ4PORHS.js} +10 -10
  38. package/dist/{chunk-RJDJFRRY.js → chunk-WRW6QCI6.js} +1 -1
  39. package/dist/{chunk-44CGGHJF.js → chunk-X7UUIHGH.js} +1 -1
  40. package/dist/{chunk-I3WLYIIW.js → chunk-XAV6XCI2.js} +1 -1
  41. package/dist/{chunk-TN2XMMD7.js → chunk-XTNMIV77.js} +1 -1
  42. package/dist/{chunk-IUV6MUQB.js → chunk-Y5OU66XJ.js} +5 -5
  43. package/dist/{chunk-4SE6GXQA.js → chunk-YIOUHJQM.js} +5 -5
  44. package/dist/{chunk-D3LS7E7U.js → chunk-YV7WULXQ.js} +1 -1
  45. package/dist/{chunk-U5DC57AF.js → chunk-Z7HAIZ6X.js} +3 -3
  46. package/dist/{chunk-VL3CF4DZ.js → chunk-ZBN4JGTJ.js} +1 -1
  47. package/dist/{chunk-LJIFCG4G.js → chunk-ZZSQYOY5.js} +1 -1
  48. package/dist/{claude-launcher-ZDZQXW76.js → claude-launcher-IG7GKYIT.js} +1 -1
  49. package/dist/{cli-HRXHEXFE.js → cli-LI3WGWTD.js} +99 -99
  50. package/dist/{command-2MHSC5AE.js → command-FAXC7673.js} +22 -22
  51. package/dist/{config-VM6GKCCE.js → config-3JRFDYZL.js} +2 -2
  52. package/dist/{connect-cmd-U2DY4OZU.js → connect-cmd-BMMVPQUZ.js} +5 -5
  53. package/dist/{container-start-XMY3VOZB.js → container-start-I6CIYK3G.js} +21 -21
  54. package/dist/{control-plane-launch-2AC4BTWL.js → control-plane-launch-JCUNTTC3.js} +5 -5
  55. package/dist/{docker-K442NGCS.js → docker-4GU3IDBN.js} +4 -4
  56. package/dist/{doctor-5K4UTAT3.js → doctor-XSYJJHMJ.js} +46 -24
  57. package/dist/{emit-artifact-cmd-IK7GAS7V.js → emit-artifact-cmd-5PSOT6H6.js} +9 -9
  58. package/dist/{emit-criteria-cmd-TGBRMX3P.js → emit-criteria-cmd-T2HCUJIN.js} +6 -6
  59. package/dist/{emit-finding-cmd-KXCNLJLK.js → emit-finding-cmd-O2VWIDV3.js} +7 -7
  60. package/dist/{emit-result-cmd-WJBLCVDL.js → emit-result-cmd-D5SEY3GG.js} +9 -9
  61. package/dist/{emit-step-cmd-OYX5X65A.js → emit-step-cmd-RBAYCJVS.js} +7 -7
  62. package/dist/{exec-client-RMGGSTGR.js → exec-client-JLCFGCZT.js} +3 -3
  63. package/dist/{findings-cmd-HFDOB6AC.js → findings-cmd-R5SD5W6J.js} +7 -7
  64. package/dist/{fleet-readiness-5S2GCWZE.js → fleet-readiness-JEQ5ITV6.js} +5 -5
  65. package/dist/{governing-source-WM3WQ6J2.js → governing-source-VB2PXSWT.js} +9 -9
  66. package/dist/{guest-init-O7INUZWE.js → guest-init-BI7267TB.js} +4 -4
  67. package/dist/{hook-fast-A2N3PSXI.js → hook-fast-UFHR6EKZ.js} +1 -1
  68. package/dist/{host-key-HJ66C6MD.js → host-key-KAYMYRO3.js} +3 -3
  69. package/dist/{image-tag-LLXOFXKP.js → image-tag-OYT7UG7Y.js} +3 -3
  70. package/dist/index.js +4 -4
  71. package/dist/{init-WEFM7P2Y.js → init-MRMSJKXM.js} +21 -21
  72. package/dist/{init-IADOHXZR.js → init-UWDEHTRU.js} +21 -21
  73. package/dist/{init-cmd-6UPRZDCC.js → init-cmd-6XJVIDBZ.js} +10 -10
  74. package/dist/{init-update-RN2PZ3MT.js → init-update-OVEAWR2A.js} +8 -8
  75. package/dist/{install-GZ27NW6U.js → install-OIRIEOS7.js} +4 -4
  76. package/dist/{install-cmd-26OY23ZZ.js → install-cmd-IYWVR6WX.js} +5 -5
  77. package/dist/{logs-7O3ELY35.js → logs-C3RJ3ZTC.js} +2 -2
  78. package/dist/{loop-RL5F3GPY.js → loop-7VRNUVEM.js} +34 -34
  79. package/dist/{machine-NESBHOCL.js → machine-NFK2XNY4.js} +17 -17
  80. package/dist/{mcp-serve-cmd-AT7G6J5V.js → mcp-serve-cmd-PB4UOTGL.js} +4 -4
  81. package/dist/{paths-32THAYBB.js → paths-OK2EZS7W.js} +2 -2
  82. package/dist/{pending-6CMYQHFL.js → pending-RKVRYOTF.js} +3 -3
  83. package/dist/{pidfile-3BH6WPOA.js → pidfile-BMFAUQAI.js} +3 -3
  84. package/dist/{record-WHPJCC6Y.js → record-26AH6WDB.js} +3 -3
  85. package/dist/{runner-env-6Q45P3IE.js → runner-env-66RAFIDJ.js} +5 -5
  86. package/dist/{runner-identity-KH7HADNF.js → runner-identity-KEN3K5CP.js} +4 -4
  87. package/dist/{runner-key-C4ZWPXYD.js → runner-key-RH3LXIWA.js} +21 -21
  88. package/dist/{session-sender-N4DOGRTN.js → session-sender-3USSYBMF.js} +10 -10
  89. package/dist/{spec-cmd-2ISEEZVA.js → spec-cmd-ZMGZSFBM.js} +7 -7
  90. package/dist/{status-GDI44URF.js → status-BX42CZLS.js} +24 -24
  91. package/dist/{sync-cmd-E5VRZ5DK.js → sync-cmd-GCIBKPC3.js} +9 -9
  92. package/dist/{watch-P6XAYDM2.js → watch-BKHTTS3D.js} +9 -9
  93. package/dist/{work-claim-cmd-HNNEYMXW.js → work-claim-cmd-QFP54F4D.js} +11 -11
  94. package/dist/{work-cmd-LXDWHKMQ.js → work-cmd-PHNJNLWA.js} +7 -7
  95. package/dist/{work-comment-cmd-2HSY4JA7.js → work-comment-cmd-SK5PTWOV.js} +7 -7
  96. package/dist/{work-logs-cmd-2MQR4JHN.js → work-logs-cmd-YZNVTMZQ.js} +7 -7
  97. package/dist/{work-open-pr-cmd-QUJVL4TF.js → work-open-pr-cmd-XAT4B35J.js} +8 -8
  98. package/dist/{work-pr-cmd-HOS5ZHJI.js → work-pr-cmd-HZBADML4.js} +7 -7
  99. package/dist/{work-stop-cmd-4J2NJ7KL.js → work-stop-cmd-Z44WRD7M.js} +7 -7
  100. package/package.json +1 -1
  101. package/dist/chunk-ERXY3FXG.js +0 -116
@@ -1,86 +1,38 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, hostCommandEnvironment, execArgv, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, execCommandLine, startSender, startHostServices, finishJob, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, serveLease, vmAlive, writeGuestGhConfig, ALREADY_RELEASED, inTeardown } from './chunk-B7NT4YZ3.js';
3
+ import { releaseLease, isUnfinished, setStage, jobEnv, runHook, describeHookEnd, provisionMicroVm, deliverCommitHooks, provisionProcess, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, hostCommandEnvironment, execArgv, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, execCommandLine, startSender, startHostServices, finishJob, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, stopOrphanedMicroVms, unfinishedJobs, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, listTrackedJobs, restartSender, serveLease, vmAlive, writeGuestGhConfig, ALREADY_RELEASED, inTeardown } from './chunk-HB6SACVH.js';
4
4
  import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
5
5
  import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
6
- import { RUNNER_PROTOCOL } from './chunk-PP3CGEQZ.js';
7
- import { writePendingUpdate } from './chunk-QWJBTFAF.js';
6
+ import { RUNNER_PROTOCOL } from './chunk-6C5MZ7UG.js';
7
+ import { writePendingUpdate } from './chunk-TZQIEUDE.js';
8
8
  import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-ZVB57WI6.js';
9
- import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-44CGGHJF.js';
10
- import { currentSkillCommand, formerSkillProblem, placeholderQueues, placeholderProblem } from './chunk-ERXY3FXG.js';
9
+ import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-X7UUIHGH.js';
10
+ import { currentSkillCommand, formerSkillProblem, realBlockedProbes, checkBlocked } from './chunk-53SPRUEA.js';
11
11
  import { freeBytes, formatBytes } from './chunk-YYYRBYWG.js';
12
- import { writeMarker, readMarker, currentVersion, removeMarker, entryIn, versionDir, startedThroughCurrent, switchCurrent, isInLayout, cleanVersions, stagingDir } from './chunk-LJIFCG4G.js';
12
+ import { writeMarker, readMarker, currentVersion, removeMarker, entryIn, versionDir, startedThroughCurrent, switchCurrent, isInLayout, cleanVersions, stagingDir } from './chunk-ZZSQYOY5.js';
13
13
  import { RepoFilter } from './chunk-TBT347UY.js';
14
- import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, LEASE_SECONDS, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, lifecycleSteps, lifecycleFailureReason, prepareBranch, containerCommandExec, setUpRunnerCgroup, measureDisk, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, gitRemoteFor, startServicesFor, createLeaseChannel } from './chunk-5VWKCY2E.js';
15
- import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-4SE6GXQA.js';
16
- import { tagToPull, pullInstruction, imageTag, writeUpdateStatus } from './chunk-D3LS7E7U.js';
14
+ import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, LEASE_SECONDS, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, lifecycleSteps, lifecycleFailureReason, prepareBranch, containerCommandExec, setUpRunnerCgroup, measureDisk, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, gitRemoteFor, startServicesFor, createLeaseChannel } from './chunk-VJ4PORHS.js';
15
+ import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-YIOUHJQM.js';
16
+ import { tagToPull, pullInstruction, imageTag, writeUpdateStatus } from './chunk-YV7WULXQ.js';
17
17
  import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
18
- import { checkFit } from './chunk-3F7RC3UA.js';
19
- import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-2ZMJFGOZ.js';
20
- import { claimPidFile, writePidFile, readPidFile, releasePidFile } from './chunk-IRTZYDZO.js';
18
+ import { isBuiltinContainer, isBuiltinVm, isBuiltinProcess, loadRunnerConfig, checkHooks, builtinKind, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-P7BEZAEU.js';
19
+ import { claimPidFile, writePidFile, readPidFile, releasePidFile } from './chunk-T5TBGOT6.js';
21
20
  import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
22
- import { writeJobFile, ensureRunnerIdentity, readJobFile, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, BUILD_LABEL, RUNNER_LABEL, readJobFileChecked } from './chunk-7YSR636F.js';
21
+ import { writeJobFile, ensureRunnerIdentity, readJobFile, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun, BUILD_LABEL, RUNNER_LABEL, readJobFileChecked } from './chunk-CBEM7ZWX.js';
23
22
  import { exceedsDisk } from './chunk-YJLHUKYS.js';
24
- import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-4OKXGZM3.js';
25
- import { loadHostKey, ensureHostKey, signerFor } from './chunk-IRF2FKB5.js';
26
- import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, spoolDir, rootfsDir } from './chunk-SOWXLIDN.js';
27
- import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, sharedUserEnvironment, JOB_MOUNT, takeClaudeCredential, heldClaudeCredential, claudeCredential, currentClaudeCredential } from './chunk-WHCDULC4.js';
23
+ import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-MIVAWAMF.js';
24
+ import { loadHostKey, ensureHostKey, signerFor } from './chunk-APSYTJ6I.js';
25
+ import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, spoolDir, rootfsDir } from './chunk-KP6R7CV3.js';
26
+ import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, sharedUserEnvironment, JOB_MOUNT, takeClaudeCredential, heldClaudeCredential, currentClaudeCredential } from './chunk-HDSDUTX4.js';
28
27
  import { resolveVersion } from './chunk-RA3O54FC.js';
29
28
  import { fdName } from './chunk-XD4ZCMA4.js';
30
29
  import { COMMAND_LOST_REASON, CONTAINER_STOPPED_REASON } from './chunk-MESOOLF4.js';
31
30
  import { randomBytes } from 'crypto';
32
- import { mkdirSync, existsSync, chmodSync, writeFileSync, renameSync, statSync, readdirSync, readFileSync, closeSync, rmSync, openSync, constants, lstatSync } from 'fs';
31
+ import { mkdirSync, existsSync, chmodSync, writeFileSync, renameSync, statSync, readdirSync, readFileSync, closeSync, rmSync, lstatSync } from 'fs';
33
32
  import { join, dirname } from 'path';
34
- import { totalmem, constants as constants$1 } from 'os';
33
+ import { constants } from 'os';
35
34
 
36
35
  createRequire(import.meta.url);
37
- function openKvm() {
38
- try {
39
- closeSync(openSync("/dev/kvm", constants.O_RDWR));
40
- return "usable";
41
- } catch (err) {
42
- return err.code === "ENOENT" ? "absent" : "no-permission";
43
- }
44
- }
45
- function realBlockedProbes() {
46
- return { env: process.env, kvm: openKvm, totalMemoryBytes: totalmem, imageBuilder: "unknown" };
47
- }
48
- var DEFAULT_BUILD_MEMORY = "8g";
49
- function checkBlocked(config, probes) {
50
- const placeholders = placeholderQueues(config);
51
- if (placeholders.length > 0) return { reason: `${placeholderProblem(placeholders)}. The runner takes work again once the config is edited` };
52
- const kind = builtinKind(config.hooks.provision);
53
- if (kind === "container" || kind === "vm") {
54
- const fit = checkFit({
55
- concurrency: config.concurrency,
56
- buildMemory: config.build?.memory ?? DEFAULT_BUILD_MEMORY,
57
- usableBytes: probes.totalMemoryBytes()
58
- });
59
- if (!fit.fits) return { reason: `${fit.message}. Lower runner.concurrency or runner.build.memory` };
60
- }
61
- const kvm = kind === "vm" ? probes.kvm() : "usable";
62
- if (kvm === "absent") {
63
- return { reason: "/dev/kvm does not exist on this machine, so builtin:vm cannot start a microVM. Use a host with KVM enabled, or builtin:container hooks" };
64
- }
65
- if (kvm !== "usable") {
66
- return {
67
- reason: "the runner cannot open /dev/kvm, so builtin:vm cannot start a microVM. Add the runner's account to the kvm group, then restart the service, because a service reads its groups only when it starts"
68
- };
69
- }
70
- if (kind === "container" || kind === "vm") {
71
- const builder = probes.imageBuilder;
72
- if (builder === "unknown") {
73
- return { reason: "the runner is still preparing its image builder, the container that limits image builds to runner.build.memory, so it claims nothing yet" };
74
- }
75
- if (builder !== "usable") return { reason: `${builder.problem}. The runner takes work again once its image builder works` };
76
- }
77
- if (kind !== "own" && claudeCredential(probes.env) === void 0) {
78
- return {
79
- reason: "there is no Claude credential in the runner's environment. Store CLAUDE_CODE_OAUTH_TOKEN (from `claude setup-token`) or ANTHROPIC_API_KEY with `outerlayer runner init --agent claude`, which writes the claude.env beside the config, then restart the service"
80
- };
81
- }
82
- return void 0;
83
- }
84
36
 
85
37
  // src/runner/heartbeat.ts
86
38
  var HEARTBEAT_TIMEOUT_MS = 1e4;
@@ -1053,7 +1005,7 @@ function linuxSignalName(number) {
1053
1005
  return names[number];
1054
1006
  }
1055
1007
  function hostSignalName(number) {
1056
- return Object.entries(constants$1.signals).find(([, value]) => value === number)?.[0];
1008
+ return Object.entries(constants.signals).find(([, value]) => value === number)?.[0];
1057
1009
  }
1058
1010
  function notEndedByRunnerReason(exit, isolated) {
1059
1011
  if (exit.signal !== null) {
@@ -1641,11 +1593,16 @@ function imageBuilderState(state) {
1641
1593
  if (result === void 0) return "unknown";
1642
1594
  return result.ok ? "usable" : { problem: result.problem };
1643
1595
  }
1644
- function holdWhenBlocked(state) {
1596
+ async function jailerState(state) {
1597
+ const probe = await runtimeOf(state).vm.helper.probe();
1598
+ return probe.ok ? "usable" : { problem: probe.detail };
1599
+ }
1600
+ function holdWhenBlocked(state, jailer) {
1645
1601
  const probes = {
1646
1602
  ...realBlockedProbes(),
1647
1603
  ...state.deps.container?.hostEnv === void 0 ? {} : { env: state.deps.container.hostEnv },
1648
1604
  ...state.deps.blocked?.imageBuilder === void 0 ? { imageBuilder: imageBuilderState(state) } : {},
1605
+ ...jailer === void 0 ? {} : { jailer },
1649
1606
  ...state.deps.blocked
1650
1607
  };
1651
1608
  const blocked = checkBlocked(state.config, probes);
@@ -1728,7 +1685,8 @@ async function runTick(state) {
1728
1685
  state.holdingForUpdate = true;
1729
1686
  return;
1730
1687
  }
1731
- if (holdWhenBlocked(state)) return;
1688
+ const jailer = state.config.managed === true && state.deps.blocked?.jailer === void 0 ? await jailerState(state) : void 0;
1689
+ if (holdWhenBlocked(state, jailer)) return;
1732
1690
  if (holdOffForDisk(state)) return;
1733
1691
  const log = logOf(state);
1734
1692
  const repoFilter = new RepoFilter(state.config.repos);
@@ -1787,7 +1745,7 @@ var CLAIM_REFUSAL_CODES = new Set(
1787
1745
  "pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
1788
1746
  );
1789
1747
  async function tryClaimAndStart(state, item, queue) {
1790
- const { postJson: postJson2 } = await import('./work-cmd-LXDWHKMQ.js');
1748
+ const { postJson: postJson2 } = await import('./work-cmd-PHNJNLWA.js');
1791
1749
  const log = logOf(state);
1792
1750
  const hostKey = await loadHostKey(state.config.configPath);
1793
1751
  const claim = await retrySend(
@@ -2968,7 +2926,7 @@ async function start(configPath, deps = { fetchImpl: fetch }) {
2968
2926
  check: update.check ? () => update.check(configPath) : async () => {
2969
2927
  const held = heldClaudeCredential();
2970
2928
  const env = held === void 0 ? process.env : { ...process.env, [held.variable]: held.value };
2971
- return (await import('./check-Y6D7C66D.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
2929
+ return (await import('./check-EP4F6VOP.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
2972
2930
  },
2973
2931
  now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
2974
2932
  log
@@ -3,9 +3,9 @@ import { createRequire } from 'node:module';
3
3
  import { parseSize } from './chunk-YJLHUKYS.js';
4
4
  import { RecipeError, BUILDKIT_IMAGE } from './chunk-SJZL5F3F.js';
5
5
  import { compareVersions } from './chunk-FTGJ3DPV.js';
6
- import { ensureHostKey } from './chunk-IRF2FKB5.js';
7
- import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir } from './chunk-SOWXLIDN.js';
8
- import { CLAUDE_PORT, JOB_MOUNT, GATEWAY_PORT, GATEWAY_SOCKET, CLAUDE_SOCKET, RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-WHCDULC4.js';
6
+ import { ensureHostKey } from './chunk-APSYTJ6I.js';
7
+ import { RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, jobsDir } from './chunk-KP6R7CV3.js';
8
+ import { CLAUDE_PORT, JOB_MOUNT, GATEWAY_PORT, GATEWAY_SOCKET, CLAUDE_SOCKET, RELAY_PORT, DESTINATION_BASE_PORT } from './chunk-HDSDUTX4.js';
9
9
  import { JOIN_DIR, RELAY_ID, JOIN_SOCKET, TARGET_GATEWAY, TARGET_CLAUDE, destinationTarget, RELAY_USER } from './chunk-MESOOLF4.js';
10
10
  import { StringDecoder } from 'string_decoder';
11
11
  import { spawn } from 'child_process';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { readCloudConfigStrict, readCloudConfig, cloudConfigPath } from './chunk-PJDQPF5N.js';
4
- import { signRunnerRequest, signerFor } from './chunk-IRF2FKB5.js';
4
+ import { signRunnerRequest, signerFor } from './chunk-APSYTJ6I.js';
5
5
  import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
6
6
  import { PLAIN_VERSION, recordCliVersion, removeRecordedVersion } from './chunk-5BHIBJDA.js';
7
7
  import { resolvePackageVersion } from './chunk-RA3O54FC.js';
@@ -4,7 +4,7 @@ import { sanitizeTerminal } from './chunk-HSUUTD4E.js';
4
4
  import { remoteLookupFailed } from './chunk-FTGJ3DPV.js';
5
5
  import { isAgentsMdLayout } from './chunk-QDDPVBIS.js';
6
6
  import { DEFAULT_DASHBOARD } from './chunk-G2RRBBOX.js';
7
- import { cliFetch, resolveGatewayCredentials } from './chunk-AM3GMWQK.js';
7
+ import { cliFetch, resolveGatewayCredentials } from './chunk-F3EF56LQ.js';
8
8
  import { readCloudConfig } from './chunk-PJDQPF5N.js';
9
9
  import { writeRepoConnection, findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
10
10
  import { cliInvocation } from './chunk-CRB3POP4.js';
@@ -1,28 +1,28 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk-ZVB57WI6.js';
4
- import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-6CNNRO53.js';
4
+ import { DOCKERD_LOG, HELPER_PATH, HELPER_RECORD } from './chunk-RJYKTWUP.js';
5
5
  import { zodProblem } from './chunk-I3LTIAOR.js';
6
- import { senderPidfile } from './chunk-ZNMVBHGJ.js';
7
- import { installScrubContext } from './chunk-DBELICD6.js';
8
- import { writeDockerClientConfig } from './chunk-TN2XMMD7.js';
9
- import { ADDED_USER, shellQuote, GH_CONFIG_YML, ghHostsYml, AssetError, obtainImage, ensureRootfs, gitRemoteFor, startServicesFor, createLeaseChannel, createBuildDisk, machineConfig, resolveAgentUser, AgentUserError, runBuildSteps, LEASE_SECONDS, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, containerSenderCommand, signalInContainer, syncInContainer, copyTranscriptsFromContainer, senderAliveScript, helperFirecrackerNote, HelperRefusal, isLiteralAddress, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, DeliveryFailure, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript, containerJudgeEnvironment, copyJudgeTree } from './chunk-5VWKCY2E.js';
10
- import { waitForAgent, vmExecArgs } from './chunk-MBVSVQVH.js';
11
- import { socketPathProblem, vsockLinks, LEASE_LINK, linkVsockSockets } from './chunk-TKJISBV6.js';
12
- import { describeCallFailure, resolveGoverningSource, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, removeKeptContext, formatDuration, retrySend, formatClock, keptContextTree } from './chunk-4SE6GXQA.js';
13
- import { isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-2ZMJFGOZ.js';
14
- import { readBranchHead, fetchCommit, diffBetween } from './chunk-U5DC57AF.js';
6
+ import { senderPidfile } from './chunk-V52SJHWK.js';
7
+ import { installScrubContext } from './chunk-A4UGPQXT.js';
8
+ import { writeDockerClientConfig } from './chunk-XTNMIV77.js';
9
+ import { ADDED_USER, shellQuote, GH_CONFIG_YML, ghHostsYml, AssetError, obtainImage, ensureRootfs, gitRemoteFor, startServicesFor, createLeaseChannel, createBuildDisk, machineConfig, resolveAgentUser, AgentUserError, runBuildSteps, LEASE_SECONDS, createContainerRuntime, stopContainer, cleanupContainer, outOfMemoryReason, containerSenderCommand, signalInContainer, syncInContainer, copyTranscriptsFromContainer, senderAliveScript, helperFirecrackerNote, HelperRefusal, isLiteralAddress, deleteBuildDisk, startCheckContainer, lifecycleSteps, lifecycleFailureReason, writeEvalInput, DeliveryFailure, EVAL_INPUT_NAME, copyTranscripts, senderSignalScript, containerJudgeEnvironment, copyJudgeTree } from './chunk-VJ4PORHS.js';
10
+ import { waitForAgent, vmExecArgs } from './chunk-QQGZ5THT.js';
11
+ import { socketPathProblem, vsockLinks, LEASE_LINK, linkVsockSockets } from './chunk-HIGJTX5U.js';
12
+ import { describeCallFailure, resolveGoverningSource, refusalCode, removeStagedContext, stageGovernedContext, pinnedSourceOf, commandWithShim, logStamp, createRunnerLog, removeKeptContext, formatDuration, retrySend, formatClock, keptContextTree } from './chunk-YIOUHJQM.js';
13
+ import { isBuiltinContainer, isBuiltinProcess, isBuiltinVm, DEFAULT_CHECK_TIME_LIMIT_MINUTES } from './chunk-P7BEZAEU.js';
14
+ import { readBranchHead, fetchCommit, diffBetween } from './chunk-Z7HAIZ6X.js';
15
15
  import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
16
- import { HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, childEnvironment, withAnswerProtocol, judgeCommand, MAX_REPORT_BYTES, JUDGE_MAX_TURNS, JUDGE_DIR, COMMAND_DIR, MAX_ITEMS_BYTES } from './chunk-7YSR636F.js';
16
+ import { HASH_ARGV, parseProgramHash, JUDGE_PROGRAM, writeJobFile, readJobFile, childEnvironment, withAnswerProtocol, judgeCommand, MAX_REPORT_BYTES, JUDGE_MAX_TURNS, JUDGE_DIR, COMMAND_DIR, MAX_ITEMS_BYTES } from './chunk-CBEM7ZWX.js';
17
17
  import { parseSize } from './chunk-YJLHUKYS.js';
18
18
  import { CLAUDE_CODE_VERSION, FIRECRACKER_VERSION } from './chunk-SJZL5F3F.js';
19
- import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-4OKXGZM3.js';
19
+ import { WorkCommandError, postJson, isSignatureRefusal, getJson } from './chunk-MIVAWAMF.js';
20
20
  import { planArtifactUpload } from './chunk-HSUUTD4E.js';
21
21
  import { scrubText } from './chunk-FTGJ3DPV.js';
22
22
  import { readCloudConfig } from './chunk-PJDQPF5N.js';
23
- import { signerFor } from './chunk-IRF2FKB5.js';
24
- import { RUNNER_FILE_MODE, runnerDir, buildDir, vsockPath } from './chunk-SOWXLIDN.js';
25
- import { JOB_MOUNT, claudeCredential, repositoriesOf, primaryOf, buildEnvironment, CHECKOUT_DIR, parseIsolation, proxyEnvironment, withProxyWarningHidden, containerLocalAddress, destinationEnvironment, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, withHooksPath, startBuildServices, BUILT_IN_NAMES, AGENT_CREDENTIAL_MISSING, sharedUserEnvironment, headerVariables, authorEnvironment, withTunnelRecord, commitIdentityRecord, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, currentClaudeCredential, removedClaudeCredentialValues, checkEnvironment, EVAL_INPUT_DIR } from './chunk-WHCDULC4.js';
23
+ import { signerFor } from './chunk-APSYTJ6I.js';
24
+ import { RUNNER_FILE_MODE, runnerDir, buildDir, vsockPath } from './chunk-KP6R7CV3.js';
25
+ import { JOB_MOUNT, claudeCredential, repositoriesOf, primaryOf, buildEnvironment, CHECKOUT_DIR, parseIsolation, proxyEnvironment, withProxyWarningHidden, containerLocalAddress, destinationEnvironment, CLAUDE_CREDENTIAL_VARIABLES, builtInEnvironment, withHooksPath, startBuildServices, BUILT_IN_NAMES, AGENT_CREDENTIAL_MISSING, sharedUserEnvironment, headerVariables, authorEnvironment, withTunnelRecord, commitIdentityRecord, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, currentClaudeCredential, removedClaudeCredentialValues, checkEnvironment, EVAL_INPUT_DIR } from './chunk-HDSDUTX4.js';
26
26
  import { resolvePackRoot } from './chunk-AKKVPUGK.js';
27
27
  import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
28
28
  import { resolveVersion } from './chunk-RA3O54FC.js';
@@ -292,12 +292,14 @@ function makeBuildsDirPrivate(buildDir2) {
292
292
  const stat = statSync(builds);
293
293
  if (stat.uid === process.getuid?.() && (stat.mode & 18) !== 0) chmodSync(builds, 448);
294
294
  }
295
- async function helperFor(runtime, log) {
295
+ var MANAGED_UNJAILED_REASON = "the root helper does not answer, and a managed runner starts no build without the jailer. The build did not start; restore the helper with `outerlayer runner install --service --replace`";
296
+ async function helperFor(runtime, log, managed) {
296
297
  const probe = await runtime.vm.helper.probe();
297
298
  if (probe.ok) {
298
299
  if (probe.firecracker !== FIRECRACKER_VERSION) log(`${helperFirecrackerNote(probe.firecracker)}; run \`outerlayer runner install --service --replace\` to update it`);
299
300
  return probe.client;
300
301
  }
302
+ if (managed) return void 0;
301
303
  if (probe.reason === "unsupported") log(probe.detail);
302
304
  else if (probe.unreachable === true) log(`${probe.detail}, so this build runs without the jailer`);
303
305
  return void 0;
@@ -477,7 +479,8 @@ async function provisionMicroVm(input) {
477
479
  }
478
480
  }
479
481
  const configPath = join(buildDir2, "vm.json");
480
- const helper = await helperFor(runtime, (line) => log.line(`${tag} ${line}`));
482
+ const helper = await helperFor(runtime, (line) => log.line(`${tag} ${line}`), config.managed === true);
483
+ if (helper === void 0 && config.managed === true) return bail(MANAGED_UNJAILED_REASON);
481
484
  try {
482
485
  if (helper === void 0) linkVsockSockets({ buildDir: buildDir2, vsockPath: state.vsockPath, links: served });
483
486
  await createBuildDisk({ host: vm.rootfs, runnerDir: runnerDirPath, bytes: limits.diskBytes, dest: state.buildDisk, memoryBytes: limits.memoryBytes });
@@ -955,7 +958,8 @@ async function startCheckMicroVm(input) {
955
958
  };
956
959
  const links = vsockLinks({ destinations: config.build?.destinations?.length ?? 0, builtIns: false });
957
960
  const configPath = join(buildDir2, "vm.json");
958
- const helper = await helperFor(runtime, (line) => log.line(`${tag} ${line}`));
961
+ const helper = await helperFor(runtime, (line) => log.line(`${tag} ${line}`), config.managed === true);
962
+ if (helper === void 0 && config.managed === true) return fail(MANAGED_UNJAILED_REASON);
959
963
  try {
960
964
  if (helper === void 0) linkVsockSockets({ buildDir: buildDir2, vsockPath: state.vsockPath, links });
961
965
  await createBuildDisk({ host: vm.rootfs, runnerDir: runnerDirPath, bytes: limits.diskBytes, dest: state.buildDisk, memoryBytes: limits.memoryBytes });
@@ -40,6 +40,22 @@ function readClaudeCredential(env) {
40
40
  return void 0;
41
41
  }
42
42
  }
43
+ function claudeCredentialVariablesSet(env, options = {}) {
44
+ const found = /* @__PURE__ */ new Set();
45
+ const add = (values) => {
46
+ for (const variable of FORWARDED) if ((values[variable] ?? "") !== "") found.add(variable);
47
+ };
48
+ add(env);
49
+ const directory = env.CREDENTIALS_DIRECTORY;
50
+ if (directory) {
51
+ try {
52
+ add(parseRunnerEnv(readFileSync(join(directory, CLAUDE_CREDENTIAL_ID), "utf8")));
53
+ } catch {
54
+ }
55
+ }
56
+ if (options.ignoreHeld !== true && held !== void 0) found.add(held.variable);
57
+ return found;
58
+ }
43
59
  var complained = /* @__PURE__ */ new Set();
44
60
  function complain(path, reason) {
45
61
  if (complained.has(path)) return;
@@ -756,4 +772,4 @@ function withTunnelRecord(environment, record, onlyWhenUsed = false) {
756
772
  };
757
773
  }
758
774
 
759
- export { AGENT_CREDENTIAL_MISSING, BUILD_HOME, BUILT_IN_NAMES, CHECKOUT_DIR, CHECK_ITEMS_FILE, CLAUDE_CREDENTIAL_ID, CLAUDE_CREDENTIAL_VARIABLES, CLAUDE_ENV_FILE, CLAUDE_PORT, CLAUDE_SOCKET, DESTINATION_BASE_PORT, EVAL_INPUT_DIR, FORWARDED_CLAUDE_CREDENTIAL_VARIABLES, GATEWAY_PORT, GATEWAY_SOCKET, JOB_MOUNT, PROXY_WARNING_FLAG, RELAY_PORT, authorEnvironment, buildEnvironment, builtInEnvironment, checkEnvironment, checkoutPath, claudeCredential, claudeEnvPath, commitIdentityRecord, containerLocalAddress, credentialLineIn, currentClaudeCredential, destinationEnvironment, headerVariables, heldClaudeCredential, isRefusedInConfig, isReservedVariable, lifecycleWorkdir, parseClaimIdentity, parseClaimedRepositories, parseIsolation, parseUnreachable, primaryOf, proxyEnvironment, readClaudeCredential, removedClaudeCredentialValues, repositoriesOf, repositoryPath, resolveDestinations, sharedUserEnvironment, startBuildServices, takeClaudeCredential, tokenHeader, withGitConfig, withHooksPath, withProxyWarningHidden, withTokenHeader, withTunnelRecord, withoutCredentialLines };
775
+ export { AGENT_CREDENTIAL_MISSING, BUILD_HOME, BUILT_IN_NAMES, CHECKOUT_DIR, CHECK_ITEMS_FILE, CLAUDE_CREDENTIAL_ID, CLAUDE_CREDENTIAL_VARIABLES, CLAUDE_ENV_FILE, CLAUDE_PORT, CLAUDE_SOCKET, DESTINATION_BASE_PORT, EVAL_INPUT_DIR, FORWARDED_CLAUDE_CREDENTIAL_VARIABLES, GATEWAY_PORT, GATEWAY_SOCKET, JOB_MOUNT, PROXY_WARNING_FLAG, RELAY_PORT, authorEnvironment, buildEnvironment, builtInEnvironment, checkEnvironment, checkoutPath, claudeCredential, claudeCredentialVariablesSet, claudeEnvPath, commitIdentityRecord, containerLocalAddress, credentialLineIn, currentClaudeCredential, destinationEnvironment, headerVariables, heldClaudeCredential, isRefusedInConfig, isReservedVariable, lifecycleWorkdir, parseClaimIdentity, parseClaimedRepositories, parseIsolation, parseUnreachable, primaryOf, proxyEnvironment, readClaudeCredential, removedClaudeCredentialValues, repositoriesOf, repositoryPath, resolveDestinations, sharedUserEnvironment, startBuildServices, takeClaudeCredential, tokenHeader, withGitConfig, withHooksPath, withProxyWarningHidden, withTokenHeader, withTunnelRecord, withoutCredentialLines };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { RELAY_PORT, GATEWAY_SOCKET, GATEWAY_PORT, CLAUDE_SOCKET, CLAUDE_PORT, DESTINATION_BASE_PORT } from './chunk-WHCDULC4.js';
3
+ import { RELAY_PORT, GATEWAY_SOCKET, GATEWAY_PORT, CLAUDE_SOCKET, CLAUDE_PORT, DESTINATION_BASE_PORT } from './chunk-HDSDUTX4.js';
4
4
  import { symlinkSync, unlinkSync } from 'fs';
5
5
  import { join } from 'path';
6
6
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { BUILD_HOME } from './chunk-WHCDULC4.js';
3
+ import { BUILD_HOME } from './chunk-HDSDUTX4.js';
4
4
  import { join, dirname } from 'path';
5
5
 
6
6
  createRequire(import.meta.url);
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { autoConnect, detectActiveSession } from './chunk-SJ4DX2AD.js';
3
+ import { autoConnect, detectActiveSession } from './chunk-OSVS2QVP.js';
4
4
  import { resolveRepoIdentity } from './chunk-FTGJ3DPV.js';
5
5
  import { C } from './chunk-ANPNT6PM.js';
6
- import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-AM3GMWQK.js';
6
+ import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-F3EF56LQ.js';
7
7
  import { parseWorkItemEnv } from './chunk-T2Q7ISPE.js';
8
8
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
9
9
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { detectActiveSession, autoConnect } from './chunk-SJ4DX2AD.js';
4
- import { workPageUrl } from './chunk-3YLHIXLR.js';
3
+ import { detectActiveSession, autoConnect } from './chunk-OSVS2QVP.js';
4
+ import { workPageUrl } from './chunk-GIRXO5HA.js';
5
5
  import { sanitizeTerminal } from './chunk-HSUUTD4E.js';
6
6
  import { resolveRepoIdentity } from './chunk-FTGJ3DPV.js';
7
7
  import { C } from './chunk-ANPNT6PM.js';
8
- import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-AM3GMWQK.js';
9
- import { signRunnerRequest } from './chunk-IRF2FKB5.js';
8
+ import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-F3EF56LQ.js';
9
+ import { signRunnerRequest } from './chunk-APSYTJ6I.js';
10
10
  import { readRepoConnection } from './chunk-BJ3KTMDH.js';
11
11
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
12
12
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
@@ -441,7 +441,7 @@ async function runWorkLinkSession(opts) {
441
441
  return await linkSession(opts);
442
442
  } catch (err) {
443
443
  if (opts.logFailures) {
444
- const { logHookError } = await import('./hook-fast-A2N3PSXI.js');
444
+ const { logHookError } = await import('./hook-fast-UFHR6EKZ.js');
445
445
  const reason = err instanceof Error ? err.message : String(err);
446
446
  logHookError(opts.home ?? homeFromEnv(opts.env ?? process.env), new Error(`work link-session #${opts.number} failed: ${reason}`));
447
447
  }
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { removeRetiredSkills } from './chunk-V6IYYQU3.js';
4
- import { defaultFetch, resolveGatewayCredentials } from './chunk-AM3GMWQK.js';
5
- import { withTokenHeader } from './chunk-WHCDULC4.js';
4
+ import { defaultFetch, resolveGatewayCredentials } from './chunk-F3EF56LQ.js';
5
+ import { withTokenHeader } from './chunk-HDSDUTX4.js';
6
6
  import { appendContextProvenance } from './chunk-ZJSNLVCE.js';
7
7
  import { loadMaintainedFiles, writeMaintainedFiles } from './chunk-AKKVPUGK.js';
8
8
  import { cliInvocation } from './chunk-CRB3POP4.js';
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { DEFAULT_UNIT_NAME } from './chunk-3F7RC3UA.js';
4
- import { RUNNER_FILE_MODE } from './chunk-SOWXLIDN.js';
5
- import { claudeEnvPath, withoutCredentialLines } from './chunk-WHCDULC4.js';
3
+ import { DEFAULT_UNIT_NAME } from './chunk-RQGHHEM7.js';
4
+ import { RUNNER_FILE_MODE } from './chunk-KP6R7CV3.js';
5
+ import { claudeEnvPath, withoutCredentialLines } from './chunk-HDSDUTX4.js';
6
6
  import { parseRunnerEnv } from './chunk-XD4ZCMA4.js';
7
7
  import { existsSync, readFileSync, writeFileSync, renameSync, rmSync } from 'fs';
8
8
  import { join, dirname } from 'path';
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-3YLHIXLR.js';
3
+ import { fetchFactories, selectFactory, saveFactoryConnection, autoConnectedLine } from './chunk-GIRXO5HA.js';
4
4
  import { resolveRepoIdentity } from './chunk-FTGJ3DPV.js';
5
- import { resolveGatewayCredentials } from './chunk-AM3GMWQK.js';
5
+ import { resolveGatewayCredentials } from './chunk-F3EF56LQ.js';
6
6
  import { findGitDirs, readRepoConnection } from './chunk-BJ3KTMDH.js';
7
7
  import { cliInvocation } from './chunk-CRB3POP4.js';
8
8
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { MIN_ENGINE_MAJOR } from './chunk-5VWKCY2E.js';
4
- import { runnerImageVersion } from './chunk-D3LS7E7U.js';
3
+ import { MIN_ENGINE_MAJOR } from './chunk-VJ4PORHS.js';
4
+ import { runnerImageVersion } from './chunk-YV7WULXQ.js';
5
5
  import { firecrackerArch, MICROVM_ARCHES, guestAssetsPinned } from './chunk-SJZL5F3F.js';
6
6
  import { spawnSync } from 'child_process';
7
7
  import { existsSync, accessSync, constants, statSync, readFileSync } from 'fs';
@@ -2,7 +2,7 @@
2
2
  import { createRequire } from 'node:module';
3
3
  import { MAX_ALLOW_HOSTS, allowHostProblem } from './chunk-UXYLWVTQ.js';
4
4
  import { parseSize } from './chunk-YJLHUKYS.js';
5
- import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-WHCDULC4.js';
5
+ import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-HDSDUTX4.js';
6
6
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
7
7
  import { existsSync, statSync, accessSync, constants, readFileSync } from 'fs';
8
8
  import { hostname } from 'os';
@@ -105,6 +105,7 @@ var RUNNER_KEYS = [
105
105
  "housekeeping",
106
106
  "checks",
107
107
  "autoUpdate",
108
+ "managed",
108
109
  "update"
109
110
  ];
110
111
  var UPDATE_KEYS = ["maxWaitHours"];
@@ -213,6 +214,9 @@ function loadRunnerConfig(configPath) {
213
214
  if (runner.autoUpdate !== void 0 && typeof runner.autoUpdate !== "boolean") {
214
215
  fail(configPath, "runner.autoUpdate", "must be true or false");
215
216
  }
217
+ if (runner.managed !== void 0 && typeof runner.managed !== "boolean") {
218
+ fail(configPath, "runner.managed", "must be true or false");
219
+ }
216
220
  if (runner.name !== void 0 && runner.host !== void 0 && runner.name !== runner.host) {
217
221
  fail(configPath, "runner.name", `is "${runner.name}" and runner.host is "${runner.host}"; set runner.name only, since runner.host is its earlier name`);
218
222
  }
@@ -266,7 +270,8 @@ function loadRunnerConfig(configPath) {
266
270
  // under; it opts in. The built-in hooks are the runner's own. Provision
267
271
  // and cleanup are built-in together or not at all (checkBuiltinHooks), so
268
272
  // provision alone tells which.
269
- autoUpdate: runner.autoUpdate ?? builtinKind(runner.hooks.provision) !== "own"
273
+ autoUpdate: runner.autoUpdate ?? builtinKind(runner.hooks.provision) !== "own",
274
+ ...runner.managed === void 0 ? {} : { managed: runner.managed }
270
275
  };
271
276
  }
272
277
  function checkBuiltinHooks(configPath, hooks) {
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { EXEC_PORT } from './chunk-TKJISBV6.js';
3
+ import { EXEC_PORT } from './chunk-HIGJTX5U.js';
4
4
  import { createConnection } from 'net';
5
5
 
6
6
  createRequire(import.meta.url);
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { BRIDGE_ADDRESS, TUNNEL_PORT, BRIDGE_CIDR } from './chunk-TN2XMMD7.js';
4
- import { EXEC_PORT } from './chunk-TKJISBV6.js';
3
+ import { BRIDGE_ADDRESS, TUNNEL_PORT, BRIDGE_CIDR } from './chunk-XTNMIV77.js';
4
+ import { EXEC_PORT } from './chunk-HIGJTX5U.js';
5
5
  import { startTimeOf } from './chunk-JBJTC3UU.js';
6
- import { RELAY_PORT } from './chunk-WHCDULC4.js';
6
+ import { RELAY_PORT } from './chunk-HDSDUTX4.js';
7
7
  import { spawn, spawnSync } from 'child_process';
8
8
  import { symlinkSync, lstatSync, writeFileSync, chmodSync, mkdirSync } from 'fs';
9
9
 
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { builtinKind } from './chunk-2ZMJFGOZ.js';
3
+ import { builtinKind } from './chunk-P7BEZAEU.js';
4
4
  import { parseSize } from './chunk-YJLHUKYS.js';
5
- import { runnerDir } from './chunk-SOWXLIDN.js';
6
- import { CLAUDE_CREDENTIAL_ID, CLAUDE_ENV_FILE, credentialLineIn, withoutCredentialLines } from './chunk-WHCDULC4.js';
5
+ import { runnerDir } from './chunk-KP6R7CV3.js';
6
+ import { CLAUDE_CREDENTIAL_ID, CLAUDE_ENV_FILE, credentialLineIn, withoutCredentialLines } from './chunk-HDSDUTX4.js';
7
7
  import { FD_SLOTS_PER_BUILD, FD_STORE_ENV } from './chunk-XD4ZCMA4.js';
8
8
  import { existsSync, readFileSync, writeFileSync, chmodSync, renameSync } from 'fs';
9
9
  import { dirname, join } from 'path';
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { isSameProcess } from './chunk-JBJTC3UU.js';
4
- import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-SOWXLIDN.js';
4
+ import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-KP6R7CV3.js';
5
5
  import { existsSync, readFileSync, mkdirSync, writeFileSync, rmSync } from 'fs';
6
6
  import { dirname } from 'path';
7
7
 
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { checkStarterFiles, contextIsGoverned } from './chunk-BCWVTWS7.js';
4
- import { fleetCheck, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences } from './chunk-MBZTX4V2.js';
5
- import { resolveCredentials, getJson, WorkCommandError } from './chunk-4OKXGZM3.js';
6
- import { isLinkedRepository } from './chunk-3YLHIXLR.js';
4
+ import { fleetCheck, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences } from './chunk-4XPAQXJF.js';
5
+ import { resolveCredentials, getJson, WorkCommandError } from './chunk-MIVAWAMF.js';
6
+ import { isLinkedRepository } from './chunk-GIRXO5HA.js';
7
7
  import { sanitizeTerminal } from './chunk-HSUUTD4E.js';
8
8
  import { resolveRepoIdentity, compareVersions, SUPPORTED_VERSIONS } from './chunk-FTGJ3DPV.js';
9
9
  import { C } from './chunk-ANPNT6PM.js';
10
10
  import { checkFormerSkillNames } from './chunk-V6IYYQU3.js';
11
- import { resolveGatewayCredentials, defaultFetch } from './chunk-AM3GMWQK.js';
12
- import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-RJDJFRRY.js';
11
+ import { resolveGatewayCredentials, defaultFetch } from './chunk-F3EF56LQ.js';
12
+ import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-WRW6QCI6.js';
13
13
  import { readStatuslineState, STATE_FRESH_MS } from './chunk-I7RZHMXW.js';
14
14
  import { hookCommandEscapesControlPlane, CONTROL_PLANE_DIR_VARIABLE } from './chunk-HCVLP7XA.js';
15
15
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
@@ -1190,7 +1190,7 @@ function doctorExitCode(checks) {
1190
1190
 
1191
1191
  // src/doctor-report.ts
1192
1192
  async function gatherDoctorChecks() {
1193
- const { defaultRunnerConfigPath, hasRunnerBlock, loadRunnerConfig, runnerVmOf } = await import('./config-VM6GKCCE.js');
1193
+ const { defaultRunnerConfigPath, hasRunnerBlock, loadRunnerConfig, runnerVmOf } = await import('./config-3JRFDYZL.js');
1194
1194
  const configPath = defaultRunnerConfigPath();
1195
1195
  const runnerHost = hasRunnerBlock(configPath);
1196
1196
  const hooks = (() => {
@@ -1211,7 +1211,7 @@ async function gatherDoctorChecks() {
1211
1211
  const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
1212
1212
  checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
1213
1213
  } else if (hasRunnerBlock(configPath)) {
1214
- const { runnerHostChecks } = await import('./doctor-5K4UTAT3.js');
1214
+ const { runnerHostChecks } = await import('./doctor-XSYJJHMJ.js');
1215
1215
  const gateway = (() => {
1216
1216
  try {
1217
1217
  const { url, apiKey, appId } = loadRunnerConfig(configPath);
@@ -1229,8 +1229,8 @@ async function gatherDoctorChecks() {
1229
1229
  })();
1230
1230
  const runner = (() => {
1231
1231
  try {
1232
- const { concurrency, build, housekeeping } = loadRunnerConfig(configPath);
1233
- return { concurrency, buildMemory: build?.memory ?? "8g", minFreeDisk: housekeeping?.minFreeDisk, allowHosts: build?.allowHosts };
1232
+ const { concurrency, build, housekeeping, managed } = loadRunnerConfig(configPath);
1233
+ return { concurrency, buildMemory: build?.memory ?? "8g", minFreeDisk: housekeeping?.minFreeDisk, allowHosts: build?.allowHosts, ...managed === true ? { managed } : {} };
1234
1234
  } catch {
1235
1235
  return void 0;
1236
1236
  }
@@ -1239,7 +1239,7 @@ async function gatherDoctorChecks() {
1239
1239
  const { existsSync: existsSync3 } = await import('fs');
1240
1240
  if (process.platform !== "linux" || !existsSync3("/run/systemd/system")) return void 0;
1241
1241
  const { inspectService, realInspectProbes } = await import('./inspect-L7JIBK3Y.js');
1242
- const { DEFAULT_UNIT_NAME } = await import('./install-GZ27NW6U.js');
1242
+ const { DEFAULT_UNIT_NAME } = await import('./install-OIRIEOS7.js');
1243
1243
  const { dirname: dirname2 } = await import('path');
1244
1244
  return inspectService(DEFAULT_UNIT_NAME, dirname2(configPath), realInspectProbes());
1245
1245
  })();
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-SOWXLIDN.js';
3
+ import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-KP6R7CV3.js';
4
4
  import { readFileSync, existsSync, rmSync, mkdirSync, writeFileSync, renameSync } from 'fs';
5
5
  import { join } from 'path';
6
6
 
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { LiveUploader } from './chunk-DBELICD6.js';
3
+ import { LiveUploader } from './chunk-A4UGPQXT.js';
4
4
  import { CaptureDaemon } from './chunk-FTGJ3DPV.js';
5
- import { spoolDir } from './chunk-RJDJFRRY.js';
5
+ import { spoolDir } from './chunk-WRW6QCI6.js';
6
6
  import { parseWorkItemEnv } from './chunk-T2Q7ISPE.js';
7
7
  import { homeFromEnv } from './chunk-VNVZDWO3.js';
8
8
  import { mkdirSync, writeFileSync, rmSync } from 'fs';