@outerlayer/cli 0.38.0-next.20261106012958 → 0.38.0-next.20261106232046

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 (180) hide show
  1. package/README.md +19 -3
  2. package/dist/agent-setup-IJNDJ4XL.js +40 -0
  3. package/dist/{agent-subcommand-UNSXJUHA.js → agent-subcommand-XECZFIAS.js} +4 -4
  4. package/dist/{artifact-link-cmd-QP6VO7AJ.js → artifact-link-cmd-F6M2BDT7.js} +2 -2
  5. package/dist/{bridge-JI4IO7JN.js → bridge-LDKKFAHH.js} +7 -7
  6. package/dist/{build-2L3L2OJO.js → build-PTFRHSXI.js} +13 -13
  7. package/dist/{build-disk-CKBEEF4N.js → build-disk-EO2VG3MF.js} +11 -11
  8. package/dist/build-info.json +1 -1
  9. package/dist/{builder-PKDA7X2H.js → builder-LCIBBOWQ.js} +10 -10
  10. package/dist/caller-Y3RGYXHU.js +23 -0
  11. package/dist/{check-FG32SYJF.js → check-BNDMAAVS.js} +72 -56
  12. package/dist/{chunk-T524XQKI.js → chunk-2IVRTP6M.js} +1 -1
  13. package/dist/{chunk-NEEMG462.js → chunk-2KL345FW.js} +1 -1
  14. package/dist/{chunk-YXXJBHHF.js → chunk-2VNT47DG.js} +10 -2
  15. package/dist/{chunk-FGVVBYCT.js → chunk-3HEBSWNE.js} +1 -1
  16. package/dist/{chunk-RUJR3SDB.js → chunk-3UKDQNFF.js} +1 -1
  17. package/dist/{chunk-O4Z2YVC3.js → chunk-6AKP3FBS.js} +5 -5
  18. package/dist/{chunk-VWNQRD4I.js → chunk-6IXZHORY.js} +4 -4
  19. package/dist/{chunk-VNT2IRLM.js → chunk-6Y4ZE74I.js} +70 -11
  20. package/dist/{chunk-ONOINHY4.js → chunk-7GQE5D72.js} +1 -1
  21. package/dist/{chunk-EXIZ3G6I.js → chunk-7VVTZNUP.js} +6 -6
  22. package/dist/{chunk-DXBYNJRM.js → chunk-B7CAUXSV.js} +6 -6
  23. package/dist/{chunk-TAEDH2SU.js → chunk-BEQYO2VO.js} +1 -1
  24. package/dist/{chunk-QWDGHEQL.js → chunk-BJYX3PMU.js} +1 -1
  25. package/dist/{chunk-CGXYPLK3.js → chunk-BU25W7GF.js} +2 -2
  26. package/dist/{chunk-X2DX3A7H.js → chunk-C3P637LO.js} +1 -1
  27. package/dist/{chunk-4MSEUIMK.js → chunk-DDPCKTVN.js} +7 -7
  28. package/dist/{chunk-EERD7VI3.js → chunk-DRUM7NWK.js} +1 -1
  29. package/dist/{chunk-GMRVWRHD.js → chunk-EOXQCUFJ.js} +2 -2
  30. package/dist/{chunk-U7L4GBGS.js → chunk-FPPBL7ZC.js} +1 -1
  31. package/dist/{chunk-EFAOERZH.js → chunk-FSQDS7A6.js} +1 -1
  32. package/dist/{chunk-YWWW47OY.js → chunk-FSYEDSSA.js} +1 -1
  33. package/dist/{chunk-3FAJMXBA.js → chunk-FZD6GIW5.js} +9 -9
  34. package/dist/{chunk-KLQLQQGG.js → chunk-GMLYSAKU.js} +3 -3
  35. package/dist/{chunk-ABN4UBR5.js → chunk-HCIOUSUX.js} +2 -3
  36. package/dist/{chunk-QONY6C2B.js → chunk-HI5FSBWD.js} +15 -9
  37. package/dist/{chunk-3XWZKL2P.js → chunk-ICKFR2DB.js} +7 -7
  38. package/dist/{chunk-JTDMSQMI.js → chunk-IQHREL5T.js} +8 -8
  39. package/dist/{chunk-FOUG2R4Q.js → chunk-LPTMKPCD.js} +1 -1
  40. package/dist/{chunk-HG2ZG6ZU.js → chunk-LQEI4HZF.js} +1 -1
  41. package/dist/{chunk-ZTJTAKVW.js → chunk-LYBHKNEG.js} +1 -1
  42. package/dist/{chunk-5VAXNAOD.js → chunk-LYORNXIT.js} +1 -1
  43. package/dist/{chunk-OVHBDADU.js → chunk-MLM4BYK2.js} +1 -1
  44. package/dist/{chunk-RSRNZB4T.js → chunk-MXSQINKG.js} +7 -7
  45. package/dist/{chunk-L4ACBB5R.js → chunk-NDLWXIVK.js} +1 -1
  46. package/dist/{chunk-S7CE7QCF.js → chunk-NMSWL2N3.js} +3 -3
  47. package/dist/{chunk-XDRZ3BNA.js → chunk-NOBB3LEO.js} +1 -1
  48. package/dist/{chunk-256R6O56.js → chunk-O3TOA2KE.js} +8 -5
  49. package/dist/{chunk-YZRDJOOR.js → chunk-OAOZDJYT.js} +3 -3
  50. package/dist/{chunk-IXB2IIEW.js → chunk-OCQ5FQZR.js} +1 -1
  51. package/dist/{chunk-AVEF3T6Y.js → chunk-OO33S4AF.js} +7 -5
  52. package/dist/{chunk-BO3NOGKE.js → chunk-OSHKKESX.js} +77 -8
  53. package/dist/{chunk-RZ6WJTUP.js → chunk-PJNOTSB5.js} +1 -1
  54. package/dist/{chunk-ZLJXMXZP.js → chunk-PVLDVUNJ.js} +2 -2
  55. package/dist/{chunk-MPE4NOKD.js → chunk-QF6US5YN.js} +2 -2
  56. package/dist/{chunk-OUHM6U6Z.js → chunk-QHT6PIFP.js} +144 -5
  57. package/dist/{chunk-45TFVWNT.js → chunk-QQSXVGVH.js} +6 -6
  58. package/dist/{chunk-DVFGCVTV.js → chunk-QZAZPRDW.js} +5 -5
  59. package/dist/{chunk-XE2PXGZT.js → chunk-RWNVQSGX.js} +3 -3
  60. package/dist/{chunk-EHJYXABQ.js → chunk-RZXP427Z.js} +1 -1
  61. package/dist/{chunk-OGQW7A4G.js → chunk-S35KTDTM.js} +10 -10
  62. package/dist/{chunk-3DVCPRKE.js → chunk-SDUCKX46.js} +9 -9
  63. package/dist/{chunk-CCMKLF7K.js → chunk-SEAVWMW2.js} +6 -6
  64. package/dist/{chunk-BL6CCU26.js → chunk-SOB4KVRZ.js} +6 -6
  65. package/dist/{chunk-U5EE7PGC.js → chunk-SYENSVOK.js} +3 -3
  66. package/dist/{chunk-2MQQASWB.js → chunk-SZQKS4QK.js} +6 -6
  67. package/dist/{chunk-ERQLHUWU.js → chunk-TWWAV67F.js} +5 -5
  68. package/dist/{chunk-Z4R36YDJ.js → chunk-V26DDAWZ.js} +1367 -548
  69. package/dist/{chunk-OFWNBTLU.js → chunk-V43NFQE3.js} +1 -1
  70. package/dist/{chunk-WF2NXBOM.js → chunk-VLAVNWM4.js} +7 -7
  71. package/dist/{chunk-SMFWLPXC.js → chunk-VW5NG2AR.js} +19 -18
  72. package/dist/{chunk-PARDL7HH.js → chunk-VYAFSV43.js} +1 -1
  73. package/dist/{chunk-DL5N6V3D.js → chunk-VZGTPITG.js} +1 -1
  74. package/dist/{chunk-AJC5Q2NY.js → chunk-WCBLLIPD.js} +5 -5
  75. package/dist/{chunk-AMG5ICDO.js → chunk-WCQJNDQC.js} +4 -4
  76. package/dist/{chunk-YKWOVYVN.js → chunk-WDJPGE6K.js} +9 -6
  77. package/dist/{chunk-MDKLSY43.js → chunk-WX7XACEU.js} +1 -1
  78. package/dist/{chunk-5R5FEPLH.js → chunk-X25VXXCF.js} +99 -18
  79. package/dist/{chunk-ZO3RUMUR.js → chunk-X32HZMMA.js} +4 -4
  80. package/dist/{chunk-K6JOU4CT.js → chunk-XDURUWQP.js} +156 -51
  81. package/dist/{chunk-FER7JJ3S.js → chunk-XKJZHY4J.js} +1 -1
  82. package/dist/{chunk-PMJ6IEUM.js → chunk-XSEAGCYW.js} +7 -7
  83. package/dist/{chunk-ZCEM4GJ5.js → chunk-YFARFA4Y.js} +3 -3
  84. package/dist/{chunk-DK5YFDYI.js → chunk-YSCRMX2T.js} +8 -8
  85. package/dist/{claude-launcher-FHQTSQOM.js → claude-launcher-62NZAUKT.js} +7 -7
  86. package/dist/{cli-GNC4MFMP.js → cli-GJQGNNFM.js} +161 -154
  87. package/dist/{command-47EYM2FJ.js → command-3QXN5ZTK.js} +59 -52
  88. package/dist/config-4YPIDOHH.js +22 -0
  89. package/dist/{connect-cmd-4JO2LBUT.js → connect-cmd-GAWR7QSH.js} +13 -13
  90. package/dist/{container-start-XR7KANS6.js → container-start-FZCTPBZG.js} +48 -48
  91. package/dist/{context-cleanup-6CTKLEUT.js → context-cleanup-L3ZKG6EU.js} +4 -4
  92. package/dist/{context-show-cmd-Z7NQAKNE.js → context-show-cmd-YJ4IJ2WI.js} +14 -14
  93. package/dist/{control-plane-launch-4PLBJKBS.js → control-plane-launch-GOKEVTPX.js} +14 -14
  94. package/dist/{demo-record-cmd-3B2ME2ZI.js → demo-record-cmd-AZSEQXO4.js} +8 -8
  95. package/dist/{demo-voice-cmd-LIXAA3OS.js → demo-voice-cmd-KHEMTR5T.js} +20 -20
  96. package/dist/{dist-3TV6G4YF.js → dist-RMEOTTVL.js} +2 -2
  97. package/dist/{docker-FPEQS6HK.js → docker-QMKIWXHF.js} +10 -10
  98. package/dist/{doctor-AFH6UUX6.js → doctor-5PTO2DN7.js} +56 -50
  99. package/dist/{emit-artifact-cmd-5XIEUWFX.js → emit-artifact-cmd-72QEOEJH.js} +19 -19
  100. package/dist/{emit-cmd-IKYF27IK.js → emit-cmd-X5F5HUTQ.js} +7 -7
  101. package/dist/{emit-criteria-cmd-YS5ZSLCN.js → emit-criteria-cmd-HTHETRH6.js} +16 -16
  102. package/dist/{emit-demo-cmd-IDC2JC46.js → emit-demo-cmd-LFYJURFC.js} +20 -20
  103. package/dist/{emit-finding-cmd-C4NRTIZO.js → emit-finding-cmd-GFWCMJFY.js} +16 -16
  104. package/dist/{emit-result-cmd-GC2I7JQU.js → emit-result-cmd-FTWLKM6G.js} +18 -18
  105. package/dist/{emit-step-cmd-TTH4FYFW.js → emit-step-cmd-J4L2OAWE.js} +16 -16
  106. package/dist/{exec-client-DT5EWVQL.js → exec-client-YQH4ZSRM.js} +8 -8
  107. package/dist/find-unit-F3Q54LLR.js +24 -0
  108. package/dist/{findings-cmd-MSV52ODM.js → findings-cmd-VFE7VINC.js} +16 -16
  109. package/dist/{fleet-readiness-O76CSI7M.js → fleet-readiness-FGQPCFSP.js} +14 -14
  110. package/dist/{governing-source-QEFYVBQF.js → governing-source-NMZSHEHR.js} +21 -21
  111. package/dist/{guest-init-X7M5AIOI.js → guest-init-DPZAVCWH.js} +9 -9
  112. package/dist/{hook-fast-T6FOTZHA.js → hook-fast-3VMKCCUO.js} +1 -1
  113. package/dist/{hook-install-OUSUHQ6C.js → hook-install-TTF6LASI.js} +4 -4
  114. package/dist/host-checks-ANVIJJZI.js +79 -0
  115. package/dist/host-key-QZWN6ECO.js +18 -0
  116. package/dist/{image-tag-AE6EKDPV.js → image-tag-5TZ7MF5H.js} +8 -8
  117. package/dist/index.js +4 -4
  118. package/dist/{init-PUN3PKOT.js → init-5ZTKM5KM.js} +46 -46
  119. package/dist/init-6AAXECDJ.js +79 -0
  120. package/dist/{init-agent-D3KK24QX.js → init-agent-FOR3XGZ2.js} +46 -46
  121. package/dist/{init-cmd-LGRN3U7K.js → init-cmd-7X22EFRG.js} +27 -27
  122. package/dist/{init-update-ZL2J7EQI.js → init-update-JLOPXC5U.js} +24 -24
  123. package/dist/{install-cmd-4ID4VBH2.js → install-cmd-JDA4CNYW.js} +10 -10
  124. package/dist/{layout-G6K72TXK.js → layout-AKKICGLZ.js} +4 -4
  125. package/dist/{login-browser-I6CWBA7K.js → login-browser-VNPN4FVO.js} +2 -2
  126. package/dist/{logs-DIA3NWC2.js → logs-WPNNAY5E.js} +7 -7
  127. package/dist/loop-DFDQQC2Q.js +90 -0
  128. package/dist/machine-W3R5I6EM.js +79 -0
  129. package/dist/{machine-skills-JLJJDXBS.js → machine-skills-GGLBQANZ.js} +4 -4
  130. package/dist/{mcp-install-cmd-OTAX7QP2.js → mcp-install-cmd-3NHDPAML.js} +4 -4
  131. package/dist/{mcp-serve-cmd-63KQEQYS.js → mcp-serve-cmd-CLVZFL37.js} +9 -9
  132. package/dist/{paths-KVMMJQ7T.js → paths-PSLRVOVY.js} +7 -7
  133. package/dist/pending-GWDAXQSA.js +18 -0
  134. package/dist/{pidfile-NCBBWZNH.js → pidfile-5E4YPCTC.js} +8 -8
  135. package/dist/{record-PQDJVKYV.js → record-7ZMZA5QE.js} +8 -8
  136. package/dist/relay-UUIHK5TY.js +474 -0
  137. package/dist/{relay-protocol-PJ2HOP6B.js → relay-protocol-MQVXSFN4.js} +5 -5
  138. package/dist/{runner-agents-CEW4Z3FR.js → runner-agents-M5CMF2ZA.js} +4 -4
  139. package/dist/runner-env-3S64BNCU.js +24 -0
  140. package/dist/{runner-identity-IJKE4SRJ.js → runner-identity-3GMF6FKI.js} +10 -10
  141. package/dist/{runner-key-4J4MHN3S.js → runner-key-NS5C5TTT.js} +46 -46
  142. package/dist/{session-sender-HKNACIH5.js → session-sender-M325MH5U.js} +19 -19
  143. package/dist/{spec-cmd-4R7AYTBU.js → spec-cmd-QIVFOHR4.js} +17 -17
  144. package/dist/{starter-pack-6C7HPT4O.js → starter-pack-P5BRWSAP.js} +5 -5
  145. package/dist/state-5H5LGYWN.js +18 -0
  146. package/dist/{status-GMVC666R.js → status-5YK3LOVJ.js} +46 -46
  147. package/dist/{sync-cmd-UMAENSGZ.js → sync-cmd-JHFRUMM5.js} +18 -18
  148. package/dist/update-steps-KFULBARX.js +80 -0
  149. package/dist/{watch-RAUF223H.js → watch-TVHFOLVK.js} +18 -18
  150. package/dist/{work-claim-cmd-A3ISXUFA.js → work-claim-cmd-LTIAXIWH.js} +23 -23
  151. package/dist/{work-cmd-U7YLMDZ7.js → work-cmd-VC353JLU.js} +16 -16
  152. package/dist/{work-comment-cmd-CMWMOWVG.js → work-comment-cmd-SRQXRRJT.js} +18 -18
  153. package/dist/{work-demo-cmd-EKTJHIVM.js → work-demo-cmd-INUFIHU4.js} +16 -16
  154. package/dist/{work-logs-cmd-Z3QOFYTJ.js → work-logs-cmd-TMJC7RRS.js} +16 -16
  155. package/dist/{work-open-pr-cmd-NJXIX3QZ.js → work-open-pr-cmd-O6XW2YGD.js} +17 -17
  156. package/dist/{work-pr-cmd-JUV3SN7I.js → work-pr-cmd-QSE3BH3Z.js} +16 -16
  157. package/dist/{work-proofs-cmd-MIDPIFTH.js → work-proofs-cmd-FXSVPQZC.js} +18 -18
  158. package/dist/{work-proofs-record-6FTMJDQG.js → work-proofs-record-KPRP3UAQ.js} +24 -24
  159. package/dist/{work-stop-cmd-Z7MYNR7R.js → work-stop-cmd-J77H7RLL.js} +16 -16
  160. package/package.json +1 -1
  161. package/skill-pack/maintained/outerlayer-build/SKILL.md +6 -7
  162. package/skill-pack/maintained/outerlayer-build/references/code-review-judge.md +80 -0
  163. package/skill-pack/maintained/outerlayer-build/references/release.md +0 -15
  164. package/skill-pack/maintained/outerlayer-build/references/review-loop.md +1 -3
  165. package/skill-pack/maintained/outerlayer-evidence/SKILL.md +3 -7
  166. package/dist/agent-setup-CBEPGNFY.js +0 -40
  167. package/dist/caller-XETCC46J.js +0 -23
  168. package/dist/config-EA6WVKAS.js +0 -22
  169. package/dist/find-unit-337Y4QAC.js +0 -24
  170. package/dist/host-checks-OXB5J3KR.js +0 -79
  171. package/dist/host-key-UFUIBFBF.js +0 -18
  172. package/dist/init-V7X3KA7B.js +0 -79
  173. package/dist/loop-AWBFKDV7.js +0 -90
  174. package/dist/machine-BZPKYURG.js +0 -79
  175. package/dist/pending-2IE3VBAN.js +0 -18
  176. package/dist/relay-QDB526DJ.js +0 -223
  177. package/dist/runner-env-23OLQBQZ.js +0 -24
  178. package/dist/state-DPEWDXQN.js +0 -18
  179. package/dist/update-steps-GTXNCG3Z.js +0 -80
  180. package/skill-pack/validators/code-review.yaml +0 -30
@@ -1,36 +1,36 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { writeFleetState } from './chunk-MDKLSY43.js';
4
- import { writePendingUpdate } from './chunk-U7L4GBGS.js';
5
- import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-L4ACBB5R.js';
3
+ import { writeFleetState } from './chunk-WX7XACEU.js';
4
+ import { writePendingUpdate } from './chunk-FPPBL7ZC.js';
5
+ import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-NDLWXIVK.js';
6
6
  import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
7
7
  import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
8
- import { reportFailedStart, fitImageBuildMemory } from './chunk-PMJ6IEUM.js';
9
- import { renderUpdateSteps } from './chunk-S7CE7QCF.js';
10
- import { RUNNER_PROTOCOL } from './chunk-OVHBDADU.js';
11
- import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-QONY6C2B.js';
12
- import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-ZTJTAKVW.js';
13
- import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, releaseLease, LEASE_SECONDS, itemTag, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, currentSkillCommand, formerSkillProblem, MICROVM_COMMAND_DIR, commandLogOffset, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isContainerTracked, isMicroVmTracked, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, listItemDisks, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, vmAlive, writeGuestGhConfig, shellQuote, deliverJobFiles, inTeardown } from './chunk-Z4R36YDJ.js';
14
- import { RUNNER_RESERVE_BYTES } from './chunk-2MQQASWB.js';
15
- import { RepoFilter } from './chunk-3DVCPRKE.js';
8
+ import { reportFailedStart, fitImageBuildMemory } from './chunk-XSEAGCYW.js';
9
+ import { renderUpdateSteps } from './chunk-NMSWL2N3.js';
10
+ import { RUNNER_PROTOCOL } from './chunk-MLM4BYK2.js';
11
+ import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-HI5FSBWD.js';
12
+ import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-LYBHKNEG.js';
13
+ import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, releaseLease, LEASE_SECONDS, itemTag, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, 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, listItemDisks, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, parseCpuList, ensureTunnel, keepGhConfigCurrent, filesAreCopied, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, vmAlive, writeGuestGhConfig, shellQuote, deliverJobFiles, inTeardown } from './chunk-V26DDAWZ.js';
14
+ import { RUNNER_RESERVE_BYTES } from './chunk-SZQKS4QK.js';
15
+ import { RepoFilter } from './chunk-SDUCKX46.js';
16
16
  import { JOB_STATE_FORMAT, readsJobState, jobStateFormatOf } from './chunk-ZVB57WI6.js';
17
- import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-TAEDH2SU.js';
17
+ import { imageTag, writeUpdateStatus, pullInstruction, tagToPull } from './chunk-BEQYO2VO.js';
18
18
  import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js';
19
- import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls } from './chunk-ZLJXMXZP.js';
20
- import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-PARDL7HH.js';
19
+ import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls } from './chunk-PVLDVUNJ.js';
20
+ import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-VYAFSV43.js';
21
21
  import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
22
- import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-3XWZKL2P.js';
23
- import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-JTDMSQMI.js';
24
- import { keyRunnerFactory, isBuiltinContainer, isBuiltinVm, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-VNT2IRLM.js';
25
- import { allocatedBytes, freeBytes, formatBytes } from './chunk-MPE4NOKD.js';
26
- import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, builderName, runnerLabelValue, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-3FAJMXBA.js';
27
- import { loadHostKey, ensureHostKey, signerFor } from './chunk-EFAOERZH.js';
28
- import { RUNNER_DIR_MODE, runnerDir, buildDir, attemptStamp, jobDir, RUNNER_FILE_MODE, jobsDir, pidFilePath, storeScopes, imagesDir } from './chunk-5VAXNAOD.js';
29
- import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, JOB_MOUNT } from './chunk-OUHM6U6Z.js';
30
- import { jobCredentialProblem, COMMAND_LOST_REASON, takeAgentCredentials, heldAgentCredential, CONTAINER_STOPPED_REASON, currentAgentCredential, fdName } from './chunk-CGXYPLK3.js';
31
- import { jobAgent, jobCommandEnv, runnerAgents } from './chunk-RZ6WJTUP.js';
22
+ import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-ICKFR2DB.js';
23
+ import { isSignatureRefusal, WorkCommandError, getJson, postJson } from './chunk-IQHREL5T.js';
24
+ import { keyRunnerFactory, isBuiltinContainer, isBuiltinVm, isBuiltinSandbox, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS } from './chunk-6Y4ZE74I.js';
25
+ import { allocatedBytes, freeBytes, formatBytes } from './chunk-QF6US5YN.js';
26
+ import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, runnerLabelValue, builderName, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-FZD6GIW5.js';
27
+ import { loadHostKey, ensureHostKey, signerFor } from './chunk-FSQDS7A6.js';
28
+ import { RUNNER_DIR_MODE, runnerDir, RUNNER_FILE_MODE, buildDir, attemptStamp, jobDir, jobsDir, pidFilePath, storeScopes, imagesDir } from './chunk-LYORNXIT.js';
29
+ import { parseClaimIdentity, parseClaimedRepositories, parseUnreachable, repositoriesOf, primaryOf, JOB_MOUNT } from './chunk-QHT6PIFP.js';
30
+ import { jobCredentialProblem, COMMAND_LOST_REASON, takeAgentCredentials, heldAgentCredential, CONTAINER_STOPPED_REASON, currentAgentCredential, fdName } from './chunk-BU25W7GF.js';
31
+ import { jobAgent, jobCommandEnv, runnerAgents } from './chunk-PJNOTSB5.js';
32
32
  import { resolveVersion } from './chunk-RA3O54FC.js';
33
- import { mkdirSync, existsSync, chmodSync, writeFileSync, renameSync, statSync, readdirSync, readFileSync, rmSync, closeSync } from 'fs';
33
+ import { mkdirSync, existsSync, writeFileSync, chmodSync, renameSync, statSync, readdirSync, readFileSync, rmSync, closeSync } from 'fs';
34
34
  import { join, dirname } from 'path';
35
35
  import { randomBytes, createHash } from 'crypto';
36
36
  import { totalmem, userInfo, constants } from 'os';
@@ -627,7 +627,9 @@ function stageReason(job) {
627
627
  }
628
628
  }
629
629
  function ownReason({ job, ending }) {
630
- if (job.microvm !== void 0) {
630
+ if (job.sandbox !== void 0) {
631
+ return "is a sandbox build that a restarted runner cannot adopt";
632
+ } else if (job.microvm !== void 0) {
631
633
  if (!isMicroVmTracked(job)) return "is a microVM build that a restarted runner cannot adopt";
632
634
  } else if (!isContainerTracked(job)) {
633
635
  return "is not a container build tracked inside its container";
@@ -993,6 +995,19 @@ var HOOKS = [
993
995
  "post-index-change"
994
996
  ];
995
997
  var READS_STDIN = /* @__PURE__ */ new Set(["pre-push", "pre-receive", "post-receive", "reference-transaction", "post-rewrite"]);
998
+ function noticesWhenMissing(name) {
999
+ return name === "pre-commit" || name === "pre-push";
1000
+ }
1001
+ var DECLARES_HOOKS = `{ [ -f "$top/lefthook.yml" ] || [ -f "$top/lefthook.yaml" ] || [ -f "$top/.lefthook.yml" ] || [ -f "$top/.lefthook.yaml" ] || [ -d "$top/.husky" ] ||
1002
+ grep -Eq '"(prepare|postinstall)"[[:space:]]*:[[:space:]]*"[^"]*(husky|lefthook)' "$top/package.json" 2>/dev/null; }`;
1003
+ var HAS_INSTALLED_HOOK = `{ installed=false; for f in "$path"/*; do case $f in *.sample) ;; *) if [ -f "$f" ] && [ -x "$f" ]; then installed=true; break; fi ;; esac; done; $installed; }`;
1004
+ function missingHookNotice(name) {
1005
+ return ` top=$(git rev-parse --show-toplevel 2>/dev/null) || top=
1006
+ if [ -n "$top" ] && ! [ "$path" -ef "$here" ] && ! ${HAS_INSTALLED_HOOK} && ${DECLARES_HOOKS}; then
1007
+ echo "outerlayer: the repository declares git hooks, but none is installed in $path, so no ${name} hook ran. Install the repository's hooks in $path." >&2
1008
+ fi
1009
+ `;
1010
+ }
996
1011
  var ADD_TRAILER = `
997
1012
  # Every commit of the build names the requester once: a trailer already there is left alone.
998
1013
  file=\${1-}
@@ -1032,7 +1047,7 @@ fi
1032
1047
  hook=$path/${name}
1033
1048
  status=0
1034
1049
  if [ "$path" -ef "$here" ] || [ ! -f "$hook" ] || [ ! -x "$hook" ]; then
1035
- ${READS_STDIN.has(name) ? " cat >/dev/null\n" : ""} :
1050
+ ${noticesWhenMissing(name) ? missingHookNotice(name) : ""}${READS_STDIN.has(name) ? " cat >/dev/null\n" : ""} :
1036
1051
  else
1037
1052
  ${adds ? ` "$hook" "$@" || status=$?` : ` exec "$hook" "$@"`}
1038
1053
  fi
@@ -1191,7 +1206,7 @@ function notEndedByRunnerReason(exit, isolated) {
1191
1206
  return `the command exited ${exit.code}, the status of a process killed by ${name}; the runner did not end it`;
1192
1207
  }
1193
1208
  function jobNotEndedByRunnerReason(exit, job) {
1194
- return notEndedByRunnerReason(exit, job.container !== void 0 || job.microvm !== void 0);
1209
+ return notEndedByRunnerReason(exit, job.container !== void 0 || job.microvm !== void 0 || job.sandbox !== void 0);
1195
1210
  }
1196
1211
  var HelperInUseError = class extends Error {
1197
1212
  constructor(socketPath, holder) {
@@ -2179,6 +2194,25 @@ function recordHousekeeping(state, root, patch) {
2179
2194
  logOf(state).error(`could not write housekeeping.json: ${describeCallFailure(err)}`);
2180
2195
  }
2181
2196
  }
2197
+ async function sweepOwnSandboxes(state) {
2198
+ const runtime = runtimeOf(state);
2199
+ const log = logOf(state);
2200
+ try {
2201
+ await sweepSandboxes({
2202
+ client: runtime.sandbox.client(),
2203
+ runnerId: runnerLabelValue(state.config.configPath),
2204
+ // Read after the list: a sandbox made while the list was read is held by the runtime, then by its job file.
2205
+ heldBuilds: () => /* @__PURE__ */ new Set([
2206
+ ...unfinishedJobs(jobsDir(state.config.configPath)).flatMap(({ job }) => job.sandbox === void 0 ? [] : [job.sandbox.buildId]),
2207
+ ...runtime.sandbox.sandboxes.keys(),
2208
+ ...runtime.sandbox.creating
2209
+ ]),
2210
+ log: (line) => log.line(line)
2211
+ });
2212
+ } catch (err) {
2213
+ log.error(`sandboxes could not be swept: ${describeCallFailure(err)}`);
2214
+ }
2215
+ }
2182
2216
  async function housekeepingPass(state) {
2183
2217
  const config = state.config.housekeeping;
2184
2218
  if (config === void 0 || state.housekeepingRunning) return;
@@ -2187,8 +2221,9 @@ async function housekeepingPass(state) {
2187
2221
  state.deps.housekeeping ??= {};
2188
2222
  const hostBuilder = keepsHostBuilder(state.config, state.deps.blocked?.builderDiskPinned);
2189
2223
  const names2 = { run: state.deps.housekeeping.run, runnerId: runnerLabelValue(state.config.configPath), builder: builderName(state.config.configPath) };
2190
- const docker = state.deps.housekeeping.docker ?? (hostBuilder ? createHousekeepingDocker(names2) : await housekeepingDockerIfReachable(names2));
2191
- if (hostBuilder) state.deps.housekeeping.docker ??= docker;
2224
+ const own = isBuiltinSandbox(state.config.hooks.provision);
2225
+ const docker = own ? void 0 : state.deps.housekeeping.docker ?? (hostBuilder ? createHousekeepingDocker(names2) : await housekeepingDockerIfReachable(names2));
2226
+ if (hostBuilder && docker !== void 0) state.deps.housekeeping.docker ??= docker;
2192
2227
  const result = await runHousekeeping({
2193
2228
  configPath: state.config.configPath,
2194
2229
  keepDays: config.jobsKeepDays,
@@ -2198,11 +2233,12 @@ async function housekeepingPass(state) {
2198
2233
  workspaceOrgMax: config.workspaceOrgMax,
2199
2234
  workspaceKeepDays: config.workspaceKeepDays,
2200
2235
  itemStates: (ids) => askItemStates(state.config, state.deps.fetchImpl, ids),
2201
- removeHostBuilder: !hostBuilder,
2236
+ removeHostBuilder: !own && !hostBuilder,
2202
2237
  docker,
2203
2238
  now: state.deps.now ?? (() => /* @__PURE__ */ new Date()),
2204
2239
  log: logOf(state)
2205
2240
  });
2241
+ if (isBuiltinSandbox(state.config.hooks.provision)) await sweepOwnSandboxes(state);
2206
2242
  recordHousekeeping(state, runnerDir(state.config.configPath), { lastRunAt: nowOf(state).toISOString(), freedBytes: result.freedBytes });
2207
2243
  } catch (err) {
2208
2244
  logOf(state).error(`housekeeping failed: ${describeCallFailure(err)}`);
@@ -2287,7 +2323,7 @@ var CLAIM_REFUSAL_CODES = new Set(
2287
2323
  "pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
2288
2324
  );
2289
2325
  async function tryClaimAndStart(state, item, queue) {
2290
- const { postJson: postJson2 } = await import('./work-cmd-U7YLMDZ7.js');
2326
+ const { postJson: postJson2 } = await import('./work-cmd-VC353JLU.js');
2291
2327
  const log = logOf(state);
2292
2328
  const hostKey = await loadHostKey(state.config.configPath);
2293
2329
  const claim = await retrySend(
@@ -2425,7 +2461,7 @@ async function startClaimedBuild(state, item, queue, data, fleet) {
2425
2461
  log.line(`${tag}: ${entry.repository} is left out of this build because its GitHub App installation is suspended`);
2426
2462
  }
2427
2463
  try {
2428
- await startJob(state, item, queue, claimId, itemKey, branch, identity, repositories, fleet, data.freshDisk === true, data.diskHeldElsewhere === true);
2464
+ await startJob(state, item, queue, claimId, itemKey, branch, identity, repositories, fleet, data.freshDisk === true, data.diskHeldElsewhere === true, data.codeReview === true);
2429
2465
  } catch (err) {
2430
2466
  const stranded = [...state.jobs.values()].find((active) => active.job.claimId === claimId);
2431
2467
  if (stranded === void 0) throw err;
@@ -2483,7 +2519,7 @@ async function prepareSession(state, active, item, queue, tag) {
2483
2519
  return void 0;
2484
2520
  }
2485
2521
  }
2486
- async function startJob(state, item, queue, claimId, itemKey, branch, identity, claimed, fleet, freshDisk, diskHeldElsewhere) {
2522
+ async function startJob(state, item, queue, claimId, itemKey, branch, identity, claimed, fleet, freshDisk, diskHeldElsewhere, codeReview) {
2487
2523
  const log = logOf(state);
2488
2524
  const startedAt = nowOf(state);
2489
2525
  const repositories = repositoriesOf({ repositories: claimed, repository: item.specRepository, branch });
@@ -2505,6 +2541,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
2505
2541
  workItemId: item.id,
2506
2542
  ...freshDisk ? { freshDisk: true } : {},
2507
2543
  ...diskHeldElsewhere ? { diskHeldElsewhere: true } : {},
2544
+ ...codeReview === true ? { codeReview: true } : {},
2508
2545
  ...fleet === void 0 ? {} : { appId: fleet.appId, organizationId: fleet.organizationId, size: fleet.size },
2509
2546
  ...primary === void 0 ? {} : { repository: primary.repository, repositories },
2510
2547
  ...jobAgentId === void 0 ? {} : { agent: jobAgentId },
@@ -2529,9 +2566,10 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
2529
2566
  const noteOnce = attemptNote(log, tag);
2530
2567
  const containerMode = isBuiltinContainer(state.config.hooks.provision);
2531
2568
  const vmMode = isBuiltinVm(state.config.hooks.provision);
2569
+ const sandboxMode = isBuiltinSandbox(state.config.hooks.provision);
2532
2570
  let tokens;
2533
- if (containerMode || vmMode) {
2534
- active.job.environment = { isolation: vmMode ? "vm" : "container", cliVersion: state.deps.cliVersion ?? resolveVersion() };
2571
+ if (containerMode || vmMode || sandboxMode) {
2572
+ active.job.environment = { isolation: vmMode || sandboxMode ? "vm" : "container", cliVersion: state.deps.cliVersion ?? resolveVersion() };
2535
2573
  writeJobFile(jobFilePath, active.job);
2536
2574
  tokens = buildTokensFor(state, active);
2537
2575
  runtimeOf(state).credentials.set(dirPath, tokens);
@@ -2651,6 +2689,49 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
2651
2689
  await endOnProvisionFailure(state, active, tokens, provisionTook, hooksDelivered.reason);
2652
2690
  return;
2653
2691
  }
2692
+ } else if (sandboxMode) {
2693
+ const provisioned = await provisionSandbox({
2694
+ config: claimCalls(state.config, active.job),
2695
+ ...active.job.organizationId === void 0 ? {} : { organizationId: active.job.organizationId, claimId: active.job.claimId },
2696
+ runtime: runtimeOf(state),
2697
+ queue,
2698
+ workItemId: item.id,
2699
+ item,
2700
+ itemKey,
2701
+ tokens,
2702
+ branch: primary?.branch ?? branch,
2703
+ repositories,
2704
+ jobDir: dirPath,
2705
+ cliVersion,
2706
+ log,
2707
+ save: (own, environment) => {
2708
+ active.job.sandbox = own;
2709
+ active.job.environment = environment;
2710
+ writeJobFile(jobFilePath, active.job);
2711
+ },
2712
+ aborted: () => active.ending,
2713
+ fetchImpl: state.deps.fetchImpl,
2714
+ now: state.deps.now,
2715
+ leaseExpiryMs: () => leaseExpiresAtMs(active.job),
2716
+ requireBuildSkill,
2717
+ job: active.job
2718
+ }).catch((err) => ({ ok: false, reason: `provision failed: ${describeCallFailure(err)}`, aborted: false }));
2719
+ const provisionTook = formatDuration(nowOf(state).getTime() - provisionStartedMs);
2720
+ if (active.ending) return;
2721
+ if (!provisioned.ok) {
2722
+ await endOnProvisionFailure(state, active, tokens, provisionTook, provisioned.reason);
2723
+ return;
2724
+ }
2725
+ log.line(`${tag} provision ok (${provisionTook}) \xB7 sandbox ${provisioned.state.sandboxId}`);
2726
+ workdir = provisioned.workdir;
2727
+ active.job.sandbox = provisioned.state;
2728
+ active.job.environment = provisioned.environment;
2729
+ installCommitHooks(active.job, log, tag);
2730
+ const hooksDelivered = await deliverSandboxHooks(runtimeOf(state), provisioned.state, dirPath);
2731
+ if (!hooksDelivered.ok) {
2732
+ await endOnProvisionFailure(state, active, tokens, provisionTook, hooksDelivered.reason);
2733
+ return;
2734
+ }
2654
2735
  } else if (vmMode) {
2655
2736
  const provisioned = await provisionMicroVm({
2656
2737
  config: claimCalls(state.config, active.job),
@@ -2836,7 +2917,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
2836
2917
  writeJobFile(jobFilePath, job);
2837
2918
  const skillDecision = await decideHostBuildSkill({
2838
2919
  requireBuildSkill,
2839
- containerMode,
2920
+ containerMode: containerMode || sandboxMode,
2840
2921
  vmMode,
2841
2922
  workdir,
2842
2923
  repository: primary?.repository,
@@ -2848,10 +2929,11 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
2848
2929
  return;
2849
2930
  }
2850
2931
  if (skillDecision.kind === "warn") log.line(`${tag} warning: the clone has no \`build\` skill; the control plane's context may deliver one, so the command starts`);
2851
- if (!containerMode && !vmMode) {
2932
+ if (!containerMode && !vmMode && !sandboxMode) {
2852
2933
  if (existsSync(join(workdir, ".git"))) {
2853
2934
  try {
2854
2935
  const prepared = await prepareBranch({ workdir, branch });
2936
+ if (prepared.kept !== void 0) log.line(`${tag} ${keptCommitsLine(branch, prepared.kept)}`);
2855
2937
  log.line(`${tag} on ${branch} at ${prepared.head.slice(0, 8)}`);
2856
2938
  } catch (err) {
2857
2939
  log.error(`${tag} could not put the workdir on ${branch}: ${describeCallFailure(err)} \xB7 ending job as failed`);
@@ -2874,7 +2956,13 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
2874
2956
  job = active.job;
2875
2957
  let running;
2876
2958
  try {
2877
- if (job.microvm !== void 0) {
2959
+ if (job.sandbox !== void 0) {
2960
+ job.sandbox.tracking = "sandbox";
2961
+ job.sandbox.commandLogBase = commandLogOffset(dirPath, 0);
2962
+ writeJobFile(jobFilePath, job);
2963
+ writeFileSync(join(dirPath, "command.log"), "", { flag: "a", mode: RUNNER_FILE_MODE });
2964
+ await startSandboxCommand({ job, cmdline, runtime: runtimeOf(state), config: state.config, extraEnv: commandEnv });
2965
+ } else if (job.microvm !== void 0) {
2878
2966
  const runtime = runtimeOf(state);
2879
2967
  if (job.microvm.jailed !== void 0 && (job.microvm.fdStore?.length ?? 0) > 0) {
2880
2968
  job.microvm.tracking = "microvm";
@@ -2915,7 +3003,7 @@ async function startJob(state, item, queue, claimId, itemKey, branch, identity,
2915
3003
  const commandStartedMs = nowOf(state).getTime();
2916
3004
  active.commandStartedMs = commandStartedMs;
2917
3005
  log.line(
2918
- running !== void 0 ? `${tag} command started \xB7 pid ${running.pid}` : job.container !== void 0 ? `${tag} command started \xB7 in container ${job.container.container}` : `${tag} command started \xB7 in microVM build ${job.microvm.buildId}`
3006
+ running !== void 0 ? `${tag} command started \xB7 pid ${running.pid}` : job.sandbox !== void 0 ? `${tag} command started \xB7 in sandbox ${job.sandbox.sandboxId}` : job.container !== void 0 ? `${tag} command started \xB7 in container ${job.container.container}` : `${tag} command started \xB7 in microVM build ${job.microvm.buildId}`
2919
3007
  );
2920
3008
  const sender = await startSender({
2921
3009
  config: state.config,
@@ -3017,14 +3105,14 @@ async function endOnProvisionFailure(state, active, tokens, took, reason) {
3017
3105
  function installCommitHooks(job, log, tag) {
3018
3106
  const identity = job.commitIdentity;
3019
3107
  if (identity?.coAuthor === void 0) return;
3020
- const buildDir2 = job.container?.buildDir ?? job.microvm?.buildDir ?? (job.build.exec === void 0 ? job.build.buildDir : void 0);
3108
+ const buildDir2 = job.container?.buildDir ?? job.sandbox?.container.buildDir ?? job.microvm?.buildDir ?? (job.build.exec === void 0 ? job.build.buildDir : void 0);
3021
3109
  if (buildDir2 === void 0) {
3022
3110
  log.line(`${tag} the build runs through an exec, so its commits are not given a co-author line`);
3023
3111
  return;
3024
3112
  }
3025
3113
  try {
3026
3114
  const dir = writeCommitHooks(buildDir2, identity.coAuthor);
3027
- identity.hooksPath = job.container === void 0 && job.microvm === void 0 ? dir : `${JOB_MOUNT}/${HOOKS_DIR_NAME}`;
3115
+ identity.hooksPath = job.container === void 0 && job.microvm === void 0 && job.sandbox === void 0 ? dir : `${JOB_MOUNT}/${HOOKS_DIR_NAME}`;
3028
3116
  } catch (err) {
3029
3117
  log.error(`${tag} could not write the commit hooks: ${describeCallFailure(err)} \xB7 continuing without a co-author line`);
3030
3118
  }
@@ -3097,6 +3185,7 @@ async function renewLeaseIfDue(state, active, nowMs) {
3097
3185
  writeJobFile(join(active.dirPath, "job.json"), active.job);
3098
3186
  log.line(`${tag} lease renewed \xB7 expires ${formatClock(new Date(nowMs + LEASE_SECONDS * 1e3), new Date(nowMs))}`);
3099
3187
  if (active.job.container !== void 0) state.containerRuntime?.leases.get(active.job.container.buildId)?.publish();
3188
+ if (active.job.sandbox !== void 0) state.containerRuntime?.leases.get(active.job.sandbox.buildId)?.publish();
3100
3189
  if (active.job.microvm !== void 0) state.containerRuntime?.leases.get(active.job.microvm.buildId)?.publish();
3101
3190
  } else {
3102
3191
  log.error(`${tag} renew did not land \xB7 retrying in ${RENEW_INTERVAL_SECONDS / 60}m`);
@@ -3192,7 +3281,8 @@ async function sampleUsage(state, active) {
3192
3281
  }
3193
3282
  async function probeBuild(state, active) {
3194
3283
  const container = active.job.container;
3195
- const tracked = container !== void 0 && isContainerTracked(active.job) ? container : isMicroVmTracked(active.job) ? active.job.microvm : void 0;
3284
+ const own = active.job.sandbox;
3285
+ const tracked = own !== void 0 && isSandboxTracked(active.job) ? own : container !== void 0 && isContainerTracked(active.job) ? container : isMicroVmTracked(active.job) ? active.job.microvm : void 0;
3196
3286
  if (tracked === void 0 || active.ending || active.probing) return;
3197
3287
  active.probing = true;
3198
3288
  const log = logOf(state);
@@ -3201,9 +3291,16 @@ async function probeBuild(state, active) {
3201
3291
  const runtime = runtimeOf(state);
3202
3292
  for (; ; ) {
3203
3293
  const offset = commandLogOffset(active.dirPath, tracked.commandLogBase);
3204
- const probe = container === void 0 ? await probeMicroVmCommand(runtime, active.job.microvm, offset) : await probeCommand(runtime, container, offset);
3294
+ const probe = own !== void 0 ? await probeSandboxCommand(runtime, own, offset) : container === void 0 ? await probeMicroVmCommand(runtime, active.job.microvm, offset) : await probeCommand(runtime, container, offset);
3205
3295
  if (active.ending) return;
3206
3296
  if (probe === void 0) {
3297
+ if (own !== void 0) {
3298
+ if (active.probeFailing !== true) {
3299
+ active.probeFailing = true;
3300
+ log.error(`${tag} the build's command could not be read from its sandbox \xB7 trying again`);
3301
+ }
3302
+ return;
3303
+ }
3207
3304
  if (container === void 0) {
3208
3305
  await endOrWaitForMicroVm(state, active);
3209
3306
  return;
@@ -3232,7 +3329,12 @@ async function probeBuild(state, active) {
3232
3329
  return;
3233
3330
  }
3234
3331
  } catch (err) {
3235
- log.error(`${tag} reading the build's command failed: ${describeCallFailure(err)}`);
3332
+ if (err instanceof SandboxGoneError) {
3333
+ log.error(`${tag} ${err.message} \xB7 ending job as interrupted`);
3334
+ void endJob(state, active, "interrupted", { stage: "command", reason: err.message });
3335
+ } else {
3336
+ log.error(`${tag} reading the build's command failed: ${describeCallFailure(err)}`);
3337
+ }
3236
3338
  } finally {
3237
3339
  active.probing = false;
3238
3340
  }
@@ -3274,7 +3376,7 @@ async function watchTick(state, active, nowMs, logMtimeMs) {
3274
3376
  return;
3275
3377
  }
3276
3378
  if (!await renewLeaseIfDue(state, active, nowMs)) return;
3277
- const tokens = active.job.container === void 0 && active.job.microvm === void 0 ? void 0 : runtimeOf(state).credentials.get(active.dirPath);
3379
+ const tokens = !isIsolatedJob(active.job) ? void 0 : runtimeOf(state).credentials.get(active.dirPath);
3278
3380
  if (tokens !== void 0) {
3279
3381
  await tokens.renewReadIfDue();
3280
3382
  const refusal = tokens.refusal();
@@ -3289,7 +3391,8 @@ async function watchTick(state, active, nowMs, logMtimeMs) {
3289
3391
  return;
3290
3392
  }
3291
3393
  }
3292
- const unreachable = active.job.container === void 0 ? void 0 : runtimeOf(state).relayFatal.get(active.job.container.buildId);
3394
+ const relayBuildId = active.job.container?.buildId ?? active.job.sandbox?.buildId;
3395
+ const unreachable = relayBuildId === void 0 ? void 0 : runtimeOf(state).relayFatal.get(relayBuildId);
3293
3396
  if (unreachable !== void 0) {
3294
3397
  log.error(`${tag} ${unreachable} \xB7 ending job as failed`);
3295
3398
  await endJob(state, active, "failed", { stage: started ? "command" : "provision", reason: unreachable });
@@ -3663,7 +3766,7 @@ async function startRunner(configPath, deps, startup) {
3663
3766
  check: update.check ? () => update.check(configPath) : async () => {
3664
3767
  const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
3665
3768
  const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
3666
- return (await import('./check-FG32SYJF.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
3769
+ return (await import('./check-BNDMAAVS.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
3667
3770
  },
3668
3771
  now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
3669
3772
  log
@@ -3689,9 +3792,10 @@ async function startRunner(configPath, deps, startup) {
3689
3792
  check = "host-key";
3690
3793
  await ensureHostKey(configPath);
3691
3794
  check = "identity";
3692
- if (builtinKind(config.hooks.provision) === "container" || builtinKind(config.hooks.provision) === "vm") {
3795
+ const providerKind = builtinKind(config.hooks.provision);
3796
+ if (providerKind === "container" || providerKind === "vm" || providerKind === "sandbox") {
3693
3797
  await ensureRunnerIdentity(configPath, {
3694
- docker: deps.runnerIdentity ?? identityDockerFor({ keepsHostBuilder: keepsHostBuilder(config, deps.blocked?.builderDiskPinned) }) ?? (deps.container?.host === void 0 ? void 0 : { holdsObjects: async () => false }),
3798
+ docker: providerKind === "sandbox" ? { holdsObjects: async () => false } : deps.runnerIdentity ?? identityDockerFor({ keepsHostBuilder: keepsHostBuilder(config, deps.blocked?.builderDiskPinned) }) ?? (deps.container?.host === void 0 ? void 0 : { holdsObjects: async () => false }),
3695
3799
  log: (line) => log.error(line)
3696
3800
  }).catch((err) => log.error(`the runner's Docker identity could not be stored: ${describeCallFailure(err)} \xB7 using the names its folder's path gives`));
3697
3801
  }
@@ -3765,6 +3869,7 @@ async function startRunner(configPath, deps, startup) {
3765
3869
  return [];
3766
3870
  });
3767
3871
  for (const buildId of sweptBuilders) log.line(`removed builder microVM ${buildId}, left by an earlier runner`);
3872
+ if (isBuiltinSandbox(config.hooks.provision)) await sweepOwnSandboxes(state);
3768
3873
  const attemptLogs = attemptLogsOf(state);
3769
3874
  for (const { job, format } of listUnreadableJobs(jobsDir(configPath))) {
3770
3875
  log.error(`leaving job ${job.queue} ${itemTag(job)} alone: its job-state format ${format} is not one this version reads`);
@@ -3814,7 +3919,7 @@ async function startRunner(configPath, deps, startup) {
3814
3919
  let pollTimer = fleetPoller === void 0 ? setInterval(() => void tick(state), state.pollTimerSeconds * 1e3) : void 0;
3815
3920
  fleetPoller?.start();
3816
3921
  const hooksKind = builtinKind(config.hooks.provision);
3817
- const housekeepingTimer = hooksKind === "container" || hooksKind === "vm" ? (() => {
3922
+ const housekeepingTimer = hooksKind === "container" || hooksKind === "vm" || hooksKind === "sandbox" ? (() => {
3818
3923
  const everyMs = deps.housekeeping?.intervalMs ?? HOUSEKEEPING_INTERVAL_MS;
3819
3924
  void housekeepingPass(state);
3820
3925
  return setInterval(() => void housekeepingPass(state), everyMs);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { UNIVERSAL_IMAGE_REPOSITORY, UNIVERSAL_IMAGE_DIGEST } from './chunk-RZ6WJTUP.js';
3
+ import { UNIVERSAL_IMAGE_REPOSITORY, UNIVERSAL_IMAGE_DIGEST } from './chunk-PJNOTSB5.js';
4
4
  import { existsSync, readdirSync, readFileSync, lstatSync, realpathSync, writeFileSync } from 'fs';
5
5
  import { join, resolve, relative, dirname, sep, basename } from 'path';
6
6
  import { createRequire as createRequire$1 } from 'module';
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { scrubReason, stripTerminalControls } from './chunk-Z4R36YDJ.js';
4
- import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-2MQQASWB.js';
5
- import { RunnerAlreadyRunningError, readPidFile } from './chunk-PARDL7HH.js';
3
+ import { scrubReason, stripTerminalControls } from './chunk-V26DDAWZ.js';
4
+ import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-SZQKS4QK.js';
5
+ import { RunnerAlreadyRunningError, readPidFile } from './chunk-VYAFSV43.js';
6
6
  import { isSameProcess } from './chunk-JBJTC3UU.js';
7
- import { isSignatureRefusal, postJson } from './chunk-JTDMSQMI.js';
8
- import { keyRunnerFactory } from './chunk-VNT2IRLM.js';
9
- import { signerFor } from './chunk-EFAOERZH.js';
10
- import { pidFilePath } from './chunk-5VAXNAOD.js';
7
+ import { isSignatureRefusal, postJson } from './chunk-IQHREL5T.js';
8
+ import { keyRunnerFactory } from './chunk-6Y4ZE74I.js';
9
+ import { signerFor } from './chunk-FSQDS7A6.js';
10
+ import { pidFilePath } from './chunk-LYORNXIT.js';
11
11
  import { readFileSync } from 'fs';
12
12
 
13
13
  createRequire(import.meta.url);
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { launcherPath, pathNotes, writeLauncher, LauncherWriteError } from './chunk-RUJR3SDB.js';
4
- import { currentVersion, currentLink, versionDir, execStartLine, isInLayout, packageRootIn, switchCurrent } from './chunk-ZTJTAKVW.js';
3
+ import { launcherPath, pathNotes, writeLauncher, LauncherWriteError } from './chunk-3UKDQNFF.js';
4
+ import { currentVersion, currentLink, versionDir, execStartLine, isInLayout, packageRootIn, switchCurrent } from './chunk-LYBHKNEG.js';
5
5
  import { compareVersions } from './chunk-TQMI335S.js';
6
- import { runnerDir, RUNNER_DIR_MODE } from './chunk-5VAXNAOD.js';
6
+ import { runnerDir, RUNNER_DIR_MODE } from './chunk-LYORNXIT.js';
7
7
  import { lchownSync, lstatSync, realpathSync, readFileSync, mkdirSync, rmSync, cpSync, existsSync, readdirSync } from 'fs';
8
8
  import { dirname, sep, join } from 'path';
9
9
  import { spawnSync } from 'child_process';
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { runEmit } from './chunk-ZO3RUMUR.js';
4
- import { addStdioMcpEntryIfAbsent, addDocsMcpEntryIfAbsent, DOCS_MCP_SERVER_NAME } from './chunk-FGVVBYCT.js';
5
- import { installStarterPack } from './chunk-ABN4UBR5.js';
6
- import { listWithAnd } from './chunk-EXIZ3G6I.js';
7
- import { AGENTS_MD_LAYOUT, mcpFiles, declareAgentsMdLayout, linkAgentSkills, describeSkillsLink, isAgentsMdLayout, holdsTodaysLayoutSources, discoverOuterlayerPaths } from './chunk-YWWW47OY.js';
3
+ import { runEmit } from './chunk-X32HZMMA.js';
4
+ import { addStdioMcpEntryIfAbsent, addDocsMcpEntryIfAbsent, DOCS_MCP_SERVER_NAME } from './chunk-3HEBSWNE.js';
5
+ import { installStarterPack } from './chunk-HCIOUSUX.js';
6
+ import { listWithAnd } from './chunk-7VVTZNUP.js';
7
+ import { AGENTS_MD_LAYOUT, mcpFiles, declareAgentsMdLayout, linkAgentSkills, describeSkillsLink, isAgentsMdLayout, holdsTodaysLayoutSources, discoverOuterlayerPaths } from './chunk-FSYEDSSA.js';
8
8
  import { C } from './chunk-2AM6Z5BP.js';
9
- import { resolveGitCommonDir, defaultGitRunner } from './chunk-DVFGCVTV.js';
9
+ import { resolveGitCommonDir, defaultGitRunner } from './chunk-QZAZPRDW.js';
10
10
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
11
- import { linkedAgentsPath } from './chunk-FOUG2R4Q.js';
11
+ import { linkedAgentsPath } from './chunk-LPTMKPCD.js';
12
12
  import { cloneIsGoverned } from './chunk-YQR6E6OV.js';
13
- import { generatedHeaderSource, defaultAgents, loadTemplateFiles, loadMaintainedFiles, skillDir, AGENTS_SKILLS_BASE, legacyAgent, laptopAgents } from './chunk-AVEF3T6Y.js';
13
+ import { generatedHeaderSource, defaultAgents, loadTemplateFiles, loadMaintainedFiles, skillDir, AGENTS_SKILLS_BASE, legacyAgent, laptopAgents } from './chunk-OO33S4AF.js';
14
14
  import { LEGACY_AGENT } from './chunk-7PZDPISM.js';
15
15
  import { execFileSync } from 'child_process';
16
16
  import { existsSync, mkdirSync, writeFileSync } from 'fs';
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { withInjectedPrograms } from './chunk-EERD7VI3.js';
4
- import { sharedSkillNames } from './chunk-QWDGHEQL.js';
3
+ import { withInjectedPrograms } from './chunk-DRUM7NWK.js';
4
+ import { sharedSkillNames } from './chunk-BJYX3PMU.js';
5
5
  import { GOVERNANCE_VARIABLE, versionAtLeast, CONTROL_PLANE_DIR_VARIABLE } from './chunk-SF2TBJBP.js';
6
6
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
7
- import { setupMachineSkills } from './chunk-OFWNBTLU.js';
8
- import { defaultAgents, agentById, legacyAgent } from './chunk-AVEF3T6Y.js';
7
+ import { setupMachineSkills } from './chunk-V43NFQE3.js';
8
+ import { defaultAgents, agentById, legacyAgent } from './chunk-OO33S4AF.js';
9
9
  import './chunk-PLVHIQJN.js';
10
10
  import { LEGACY_AGENT } from './chunk-7PZDPISM.js';
11
11
  import './chunk-CDDED64E.js';
12
12
  import './chunk-RA3O54FC.js';
13
13
  import { homeFromEnv } from './chunk-352DHUTP.js';
14
- import './chunk-5R5FEPLH.js';
15
- import './chunk-YXXJBHHF.js';
14
+ import './chunk-X25VXXCF.js';
15
+ import './chunk-2VNT47DG.js';
16
16
  import './chunk-Z5GEFMRW.js';
17
17
  import { spawn, execFileSync } from 'child_process';
18
18
  import { existsSync, readdirSync, lstatSync, readFileSync, writeFileSync, rmSync, mkdirSync, realpathSync, symlinkSync, renameSync, readlinkSync, statSync } from 'fs';
@@ -325,7 +325,7 @@ async function runAgentLauncher(agentId, args, deps = {}) {
325
325
  return 1;
326
326
  }
327
327
  } else {
328
- const { resolveLaunchPlane } = await import('./control-plane-launch-4PLBJKBS.js');
328
+ const { resolveLaunchPlane } = await import('./control-plane-launch-GOKEVTPX.js');
329
329
  const plane = env[GOVERNANCE_VARIABLE] === "self" ? { kind: "none" } : await resolveLaunchPlane({ cwd, env, home, fetchImpl: deps.fetchImpl, stderr });
330
330
  if (plane.kind === "none") {
331
331
  const own2 = ownSkillsDirFor(prefix, cwd, home, /* @__PURE__ */ new Set(), stderr);