@outerlayer/cli 0.38.0-next.20261106003041 → 0.38.0-next.20261106190200

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 (165) hide show
  1. package/README.md +16 -0
  2. package/dist/{agent-setup-CBEPGNFY.js → agent-setup-RO2DJUF3.js} +18 -18
  3. package/dist/{agent-subcommand-UNSXJUHA.js → agent-subcommand-PSI3BAXM.js} +3 -3
  4. package/dist/{bridge-JI4IO7JN.js → bridge-3WAVT5SX.js} +6 -6
  5. package/dist/{build-2L3L2OJO.js → build-4KG7H2XK.js} +12 -12
  6. package/dist/{build-disk-CKBEEF4N.js → build-disk-GGGJ237B.js} +10 -10
  7. package/dist/build-info.json +1 -1
  8. package/dist/{builder-PKDA7X2H.js → builder-HV7PUSZZ.js} +9 -9
  9. package/dist/caller-3P3AEY7W.js +23 -0
  10. package/dist/{check-FG32SYJF.js → check-LENGOFUF.js} +68 -52
  11. package/dist/{chunk-DXBYNJRM.js → chunk-27P5FSZT.js} +5 -5
  12. package/dist/{chunk-T524XQKI.js → chunk-2MA2KWHN.js} +1 -1
  13. package/dist/{chunk-FGVVBYCT.js → chunk-2VN36ZPA.js} +1 -1
  14. package/dist/{chunk-ZCEM4GJ5.js → chunk-3E65OLJ4.js} +3 -3
  15. package/dist/{chunk-EXIZ3G6I.js → chunk-3KVYSJAL.js} +4 -4
  16. package/dist/{chunk-EHJYXABQ.js → chunk-4PH3KXDP.js} +1 -1
  17. package/dist/{chunk-WF2NXBOM.js → chunk-5BDYRHZZ.js} +7 -7
  18. package/dist/{chunk-ZTJTAKVW.js → chunk-5MWE5IOO.js} +1 -1
  19. package/dist/{chunk-ERQLHUWU.js → chunk-5QBTW367.js} +5 -5
  20. package/dist/{chunk-4MSEUIMK.js → chunk-6744TXEY.js} +5 -5
  21. package/dist/{chunk-MDKLSY43.js → chunk-677TCNML.js} +1 -1
  22. package/dist/{chunk-3FAJMXBA.js → chunk-6BPCEGJL.js} +8 -8
  23. package/dist/{chunk-S7CE7QCF.js → chunk-6ZSUJ3ES.js} +3 -3
  24. package/dist/{chunk-TAEDH2SU.js → chunk-76Y35TWH.js} +1 -1
  25. package/dist/{chunk-HG2ZG6ZU.js → chunk-7ATHSAAT.js} +1 -1
  26. package/dist/{chunk-KLQLQQGG.js → chunk-7B4A6PBC.js} +3 -3
  27. package/dist/{chunk-PARDL7HH.js → chunk-7KF36CVC.js} +1 -1
  28. package/dist/{chunk-ZO3RUMUR.js → chunk-A24MNKYN.js} +4 -4
  29. package/dist/{chunk-O4Z2YVC3.js → chunk-ANFGBAWY.js} +4 -4
  30. package/dist/{chunk-L4ACBB5R.js → chunk-BEKYNGLH.js} +1 -1
  31. package/dist/{chunk-YWWW47OY.js → chunk-CFTSVW7W.js} +1 -1
  32. package/dist/{chunk-RSRNZB4T.js → chunk-DF6ZHOIA.js} +6 -6
  33. package/dist/{chunk-U5EE7PGC.js → chunk-E2ZWGLNZ.js} +3 -3
  34. package/dist/{chunk-K6JOU4CT.js → chunk-F2PTLH3J.js} +152 -48
  35. package/dist/{chunk-ZLJXMXZP.js → chunk-FBBI6K7D.js} +2 -2
  36. package/dist/{chunk-OUHM6U6Z.js → chunk-FCU7WSCV.js} +144 -5
  37. package/dist/{chunk-MPE4NOKD.js → chunk-G2EWER4K.js} +2 -2
  38. package/dist/{chunk-ONOINHY4.js → chunk-G2ITKUX4.js} +1 -1
  39. package/dist/{chunk-QWDGHEQL.js → chunk-GM3H4ZHG.js} +1 -1
  40. package/dist/{chunk-AVEF3T6Y.js → chunk-GM4TY5H2.js} +1 -1
  41. package/dist/{chunk-DL5N6V3D.js → chunk-GQEVQIS6.js} +1 -1
  42. package/dist/{chunk-5R5FEPLH.js → chunk-H2L5NB5U.js} +98 -17
  43. package/dist/{chunk-CGXYPLK3.js → chunk-HTQFAHXD.js} +2 -2
  44. package/dist/{chunk-QONY6C2B.js → chunk-IOURL3LH.js} +15 -9
  45. package/dist/{chunk-XE2PXGZT.js → chunk-JKQAOSSX.js} +3 -3
  46. package/dist/{chunk-3XWZKL2P.js → chunk-JKYCEXZX.js} +7 -7
  47. package/dist/{chunk-45TFVWNT.js → chunk-JW25JVK4.js} +5 -5
  48. package/dist/{chunk-VWNQRD4I.js → chunk-KMUERD5F.js} +4 -4
  49. package/dist/{chunk-AJC5Q2NY.js → chunk-LFBQL4AP.js} +5 -5
  50. package/dist/{chunk-3DVCPRKE.js → chunk-LRE4QIMD.js} +7 -7
  51. package/dist/{chunk-GMRVWRHD.js → chunk-M4JFGNG7.js} +2 -2
  52. package/dist/{chunk-X2DX3A7H.js → chunk-MCLSXTLY.js} +1 -1
  53. package/dist/{chunk-BO3NOGKE.js → chunk-ML3O3A3Q.js} +1 -1
  54. package/dist/{chunk-ABN4UBR5.js → chunk-NMCRJ7NZ.js} +2 -2
  55. package/dist/{chunk-CCMKLF7K.js → chunk-NTRXOTO7.js} +4 -4
  56. package/dist/{chunk-256R6O56.js → chunk-OMCDOJO2.js} +8 -5
  57. package/dist/{chunk-OGQW7A4G.js → chunk-QHOC32DP.js} +8 -8
  58. package/dist/{chunk-SMFWLPXC.js → chunk-RDPLNQFI.js} +18 -17
  59. package/dist/{chunk-JTDMSQMI.js → chunk-RFBJKK2L.js} +7 -7
  60. package/dist/{chunk-BL6CCU26.js → chunk-SUMXGPSG.js} +5 -5
  61. package/dist/{chunk-XDRZ3BNA.js → chunk-T7KETYNW.js} +1 -1
  62. package/dist/{chunk-PMJ6IEUM.js → chunk-TDBP62O2.js} +7 -7
  63. package/dist/{chunk-RZ6WJTUP.js → chunk-TDUBZ4FR.js} +1 -1
  64. package/dist/{chunk-AMG5ICDO.js → chunk-TFBNHDPT.js} +4 -4
  65. package/dist/{chunk-DVFGCVTV.js → chunk-TMYBADTM.js} +5 -5
  66. package/dist/{chunk-EFAOERZH.js → chunk-TOVSIUEJ.js} +1 -1
  67. package/dist/{chunk-EERD7VI3.js → chunk-U4ZHNHCF.js} +1 -1
  68. package/dist/{chunk-VNT2IRLM.js → chunk-UF3YTRGU.js} +70 -11
  69. package/dist/{chunk-U7L4GBGS.js → chunk-USJVENIV.js} +1 -1
  70. package/dist/{chunk-2MQQASWB.js → chunk-VOSC32UF.js} +6 -6
  71. package/dist/{chunk-FOUG2R4Q.js → chunk-VRSUCU2N.js} +1 -1
  72. package/dist/{chunk-YZRDJOOR.js → chunk-XDVLF6OT.js} +3 -3
  73. package/dist/{chunk-DK5YFDYI.js → chunk-YL6GWLK5.js} +8 -8
  74. package/dist/{chunk-YKWOVYVN.js → chunk-YSIVKYLW.js} +9 -6
  75. package/dist/{chunk-5VAXNAOD.js → chunk-YZ5M7S7U.js} +1 -1
  76. package/dist/{chunk-RUJR3SDB.js → chunk-ZGN3NOVS.js} +1 -1
  77. package/dist/{chunk-OFWNBTLU.js → chunk-ZOWUJUSF.js} +1 -1
  78. package/dist/{chunk-FER7JJ3S.js → chunk-ZPCUXCQX.js} +1 -1
  79. package/dist/{chunk-Z4R36YDJ.js → chunk-ZYQT6Q5R.js} +1379 -628
  80. package/dist/{claude-launcher-FHQTSQOM.js → claude-launcher-G73I5AGW.js} +6 -6
  81. package/dist/{cli-GNC4MFMP.js → cli-5SILU2LX.js} +154 -147
  82. package/dist/{command-47EYM2FJ.js → command-DBBEP7VM.js} +56 -49
  83. package/dist/{config-EA6WVKAS.js → config-KOSTQZXG.js} +11 -11
  84. package/dist/{connect-cmd-4JO2LBUT.js → connect-cmd-UNBJYFYM.js} +10 -10
  85. package/dist/{container-start-XR7KANS6.js → container-start-AAOLPVAH.js} +45 -45
  86. package/dist/{context-cleanup-6CTKLEUT.js → context-cleanup-MKVMFRNR.js} +3 -3
  87. package/dist/{context-show-cmd-Z7NQAKNE.js → context-show-cmd-P3LBILMP.js} +11 -11
  88. package/dist/{control-plane-launch-4PLBJKBS.js → control-plane-launch-2GOJKA53.js} +13 -13
  89. package/dist/{demo-record-cmd-3B2ME2ZI.js → demo-record-cmd-BPINCNYS.js} +7 -7
  90. package/dist/{demo-voice-cmd-LIXAA3OS.js → demo-voice-cmd-HBK3TWM5.js} +17 -17
  91. package/dist/{dist-3TV6G4YF.js → dist-MUOHO52Q.js} +1 -1
  92. package/dist/{docker-FPEQS6HK.js → docker-NUPVSMVQ.js} +9 -9
  93. package/dist/{doctor-AFH6UUX6.js → doctor-GHRSOZLB.js} +53 -47
  94. package/dist/{emit-artifact-cmd-5XIEUWFX.js → emit-artifact-cmd-CULA5AM4.js} +16 -16
  95. package/dist/{emit-cmd-IKYF27IK.js → emit-cmd-746N7PYR.js} +6 -6
  96. package/dist/{emit-criteria-cmd-YS5ZSLCN.js → emit-criteria-cmd-NY4RPUPD.js} +13 -13
  97. package/dist/{emit-demo-cmd-IDC2JC46.js → emit-demo-cmd-MYXTGMJI.js} +17 -17
  98. package/dist/{emit-finding-cmd-C4NRTIZO.js → emit-finding-cmd-ZGGMPQFT.js} +13 -13
  99. package/dist/{emit-result-cmd-GC2I7JQU.js → emit-result-cmd-GNEQHIIZ.js} +15 -15
  100. package/dist/{emit-step-cmd-TTH4FYFW.js → emit-step-cmd-NYCJ3XFQ.js} +13 -13
  101. package/dist/{exec-client-DT5EWVQL.js → exec-client-QHB62OZ6.js} +7 -7
  102. package/dist/find-unit-UVS2FM7E.js +24 -0
  103. package/dist/{findings-cmd-MSV52ODM.js → findings-cmd-ZINCPCAB.js} +13 -13
  104. package/dist/{fleet-readiness-O76CSI7M.js → fleet-readiness-FZCSJ7FY.js} +12 -12
  105. package/dist/{governing-source-QEFYVBQF.js → governing-source-CQML5N2D.js} +18 -18
  106. package/dist/{guest-init-X7M5AIOI.js → guest-init-C6FWJVAQ.js} +8 -8
  107. package/dist/{hook-fast-T6FOTZHA.js → hook-fast-6IOLZ45F.js} +1 -1
  108. package/dist/{hook-install-OUSUHQ6C.js → hook-install-VL4CEO4S.js} +3 -3
  109. package/dist/host-checks-HPCMZ7XT.js +79 -0
  110. package/dist/{host-key-UFUIBFBF.js → host-key-5APXLMY2.js} +7 -7
  111. package/dist/{image-tag-AE6EKDPV.js → image-tag-IBAYH5XH.js} +7 -7
  112. package/dist/index.js +4 -4
  113. package/dist/{init-PUN3PKOT.js → init-EIQFBAZI.js} +43 -43
  114. package/dist/init-YD4MNH5U.js +79 -0
  115. package/dist/{init-agent-D3KK24QX.js → init-agent-7UQZFG5E.js} +43 -43
  116. package/dist/{init-cmd-LGRN3U7K.js → init-cmd-TNJXWFQU.js} +24 -24
  117. package/dist/{init-update-ZL2J7EQI.js → init-update-KJWMEKR3.js} +21 -21
  118. package/dist/{install-cmd-4ID4VBH2.js → install-cmd-UXH2LGVA.js} +9 -9
  119. package/dist/{layout-G6K72TXK.js → layout-YVTZDKVU.js} +3 -3
  120. package/dist/{logs-DIA3NWC2.js → logs-22Y7QG42.js} +6 -6
  121. package/dist/loop-SVE6TL6G.js +90 -0
  122. package/dist/machine-RQIO5VRG.js +79 -0
  123. package/dist/{machine-skills-JLJJDXBS.js → machine-skills-6PJOJU5J.js} +3 -3
  124. package/dist/{mcp-install-cmd-OTAX7QP2.js → mcp-install-cmd-LJ7AYDDT.js} +3 -3
  125. package/dist/{mcp-serve-cmd-63KQEQYS.js → mcp-serve-cmd-34LDKQSR.js} +8 -8
  126. package/dist/{paths-KVMMJQ7T.js → paths-2KOZGV5U.js} +6 -6
  127. package/dist/{pending-2IE3VBAN.js → pending-RYWBDJCE.js} +7 -7
  128. package/dist/{pidfile-NCBBWZNH.js → pidfile-FQBXIHX7.js} +7 -7
  129. package/dist/{record-PQDJVKYV.js → record-7ENQ7Y5M.js} +7 -7
  130. package/dist/relay-JLU7RTFS.js +474 -0
  131. package/dist/{relay-protocol-PJ2HOP6B.js → relay-protocol-AEIZCA3K.js} +4 -4
  132. package/dist/{runner-agents-CEW4Z3FR.js → runner-agents-I5YLJY7G.js} +3 -3
  133. package/dist/{runner-env-23OLQBQZ.js → runner-env-GXY2VMNH.js} +13 -13
  134. package/dist/{runner-identity-IJKE4SRJ.js → runner-identity-MW53HCYG.js} +9 -9
  135. package/dist/{runner-key-4J4MHN3S.js → runner-key-GERK5EV3.js} +43 -43
  136. package/dist/{session-sender-HKNACIH5.js → session-sender-65X5PR7Q.js} +16 -16
  137. package/dist/{spec-cmd-4R7AYTBU.js → spec-cmd-3TNVJBN7.js} +14 -14
  138. package/dist/{starter-pack-6C7HPT4O.js → starter-pack-PLSMFXBU.js} +4 -4
  139. package/dist/{state-DPEWDXQN.js → state-EKXXOPA5.js} +7 -7
  140. package/dist/{status-GMVC666R.js → status-KGSQF55G.js} +43 -43
  141. package/dist/{sync-cmd-UMAENSGZ.js → sync-cmd-FNATZ5VL.js} +15 -15
  142. package/dist/update-steps-3LOJ377U.js +80 -0
  143. package/dist/{watch-RAUF223H.js → watch-FEBBRV22.js} +15 -15
  144. package/dist/{work-claim-cmd-A3ISXUFA.js → work-claim-cmd-2EPUH3KT.js} +19 -19
  145. package/dist/{work-cmd-U7YLMDZ7.js → work-cmd-V5A3MDXV.js} +13 -13
  146. package/dist/{work-comment-cmd-CMWMOWVG.js → work-comment-cmd-PUE47SUV.js} +15 -15
  147. package/dist/{work-demo-cmd-EKTJHIVM.js → work-demo-cmd-7Q3KW2OO.js} +13 -13
  148. package/dist/{work-logs-cmd-Z3QOFYTJ.js → work-logs-cmd-SQBJX6MC.js} +13 -13
  149. package/dist/{work-open-pr-cmd-NJXIX3QZ.js → work-open-pr-cmd-PNDF2CR5.js} +14 -14
  150. package/dist/{work-pr-cmd-JUV3SN7I.js → work-pr-cmd-U7WL7KYE.js} +13 -13
  151. package/dist/{work-proofs-cmd-MIDPIFTH.js → work-proofs-cmd-YHOM2NIH.js} +15 -15
  152. package/dist/{work-proofs-record-6FTMJDQG.js → work-proofs-record-CYIZ2RDH.js} +21 -21
  153. package/dist/{work-stop-cmd-Z7MYNR7R.js → work-stop-cmd-ENRSBWFT.js} +13 -13
  154. package/package.json +1 -1
  155. package/skill-pack/maintained/outerlayer-amend/SKILL.md +13 -13
  156. package/skill-pack/maintained/outerlayer-amend/references/failed-checks.md +35 -0
  157. package/skill-pack/maintained/outerlayer-build/SKILL.md +3 -1
  158. package/dist/caller-XETCC46J.js +0 -23
  159. package/dist/find-unit-337Y4QAC.js +0 -24
  160. package/dist/host-checks-OXB5J3KR.js +0 -79
  161. package/dist/init-V7X3KA7B.js +0 -79
  162. package/dist/loop-AWBFKDV7.js +0 -90
  163. package/dist/machine-BZPKYURG.js +0 -79
  164. package/dist/relay-QDB526DJ.js +0 -223
  165. package/dist/update-steps-GTXNCG3Z.js +0 -80
@@ -2,8 +2,8 @@
2
2
  import { createRequire } from 'node:module';
3
3
  import { C } from './chunk-2AM6Z5BP.js';
4
4
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
5
- import { linkedAgentsPath } from './chunk-FOUG2R4Q.js';
6
- import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MACHINE_SKILL_PATH } from './chunk-AVEF3T6Y.js';
5
+ import { linkedAgentsPath } from './chunk-VRSUCU2N.js';
6
+ import { resolvePackRoot, OUTERLAYER_SKILLS_BASE, loadTemplateFiles, AGENTS_SKILLS_BASE, loadMaintainedFiles, rewriteSkillPaths, TEMPLATE_SKILLS, skillDir, writeMaintainedFiles, MACHINE_SKILL_PATH } from './chunk-GM4TY5H2.js';
7
7
  import { LEGACY_AGENT } from './chunk-7PZDPISM.js';
8
8
  import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
9
9
  import { resolvePackageVersion } from './chunk-RA3O54FC.js';
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { launchRefusalForSession } from './chunk-WGC7UFRM.js';
4
- import { detectActiveSession } from './chunk-DL5N6V3D.js';
5
- import { autoConnect } from './chunk-XE2PXGZT.js';
4
+ import { detectActiveSession } from './chunk-GQEVQIS6.js';
5
+ import { autoConnect } from './chunk-JKQAOSSX.js';
6
6
  import { acquireSpoolLockAt } from './chunk-IXB2IIEW.js';
7
7
  import { C } from './chunk-2AM6Z5BP.js';
8
- import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-XDRZ3BNA.js';
8
+ import { resolveGatewayCredentials, defaultFetch, unauthorizedMessage } from './chunk-T7KETYNW.js';
9
9
  import { launchedItemForSession } from './chunk-4OD45RBP.js';
10
10
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
11
11
  import { homeFromEnv } from './chunk-352DHUTP.js';
12
- import { resolveRepoIdentity } from './chunk-5R5FEPLH.js';
12
+ import { resolveRepoIdentity } from './chunk-H2L5NB5U.js';
13
13
  import { StepNameSchema, StepBodySchema } from './chunk-YXXJBHHF.js';
14
14
  import { randomUUID } from 'crypto';
15
15
  import { readFileSync, existsSync, mkdirSync, writeFileSync, renameSync, appendFileSync } from 'fs';
@@ -224,10 +224,12 @@ function assessSyncHealth(status, now = Date.now(), staleAfterMs = SYNC_STALE_AF
224
224
  const verifiedAt = status.contacted === false ? status.lastOkAt : status.at;
225
225
  const verifiedAge = verifiedAt === void 0 ? null : now - Date.parse(verifiedAt);
226
226
  if (verifiedAge !== null && verifiedAge > staleAfterMs) {
227
+ const onlyUnlaunched = status.contacted === false && (status.skippedNotLaunched ?? 0) > 0 && !status.pending && !status.held;
227
228
  return {
228
229
  level: "warn",
229
230
  headline: `last successful sync ${formatAgo(verifiedAge)}`,
230
- details: [`destination ${host}`, "expected continuously while you are coding"]
231
+ details: onlyUnlaunched ? [`destination ${host}`, `${status.skippedNotLaunched} transcript(s) were not launched with OUTERLAYER_WORK, so none may upload`] : [`destination ${host}`, "expected continuously while you are coding"],
232
+ ...onlyUnlaunched ? { notLaunched: true } : {}
231
233
  };
232
234
  }
233
235
  if (status.synced === 0 && (status.skippedNotLaunched ?? 0) > 0) {
@@ -237,7 +239,8 @@ function assessSyncHealth(status, now = Date.now(), staleAfterMs = SYNC_STALE_AF
237
239
  details: [
238
240
  `${status.skippedNotLaunched} transcript(s) were not launched with OUTERLAYER_WORK, so none may upload`,
239
241
  "launch a session with OUTERLAYER_WORK naming its issue to upload it"
240
- ]
242
+ ],
243
+ notLaunched: true
241
244
  };
242
245
  }
243
246
  if (verifiedAge === null) {
@@ -609,7 +612,7 @@ async function missingRenewalHookContext(home, cwd, codec) {
609
612
  try {
610
613
  const event = codec.events.find((name) => kindOf(codec, name) === "tool-used");
611
614
  if (event === void 0) return void 0;
612
- const { hookRegistered } = await import('./hook-install-OUSUHQ6C.js');
615
+ const { hookRegistered } = await import('./hook-install-VL4CEO4S.js');
613
616
  const registered = hookRegistered(event, { home, cwd });
614
617
  if (registered !== false) return void 0;
615
618
  return `This install has no ${event} hook, so this session's work-item lease will never be renewed while it works and may be lost to another worker mid-session. Run \`${cliInvocation()} init\` to register it.`;
@@ -809,11 +812,11 @@ async function missingControlPlane(cwd, sessionId, home, env) {
809
812
  const dirs = findGitDirs(cwd);
810
813
  if (dirs === void 0) return void 0;
811
814
  if (existsSync(join(dirs.gitCommonDir, "outerlayer", "materialized.json")) || hasExcludeBlock(dirs.gitCommonDir)) {
812
- const { cleanupEarlierCopies } = await import('./context-cleanup-6CTKLEUT.js');
815
+ const { cleanupEarlierCopies } = await import('./context-cleanup-MKVMFRNR.js');
813
816
  cleanupEarlierCopies(dirs);
814
817
  }
815
818
  if (!contextPossiblyGoverned(cwd, home)) return void 0;
816
- const { governanceOf } = await import('./control-plane-launch-4PLBJKBS.js');
819
+ const { governanceOf } = await import('./control-plane-launch-2GOJKA53.js');
817
820
  if (await governanceOf({ cwd, env, home }) !== "governed") return void 0;
818
821
  recordMissingContext(dirs, sessionId, home);
819
822
  const launcher = `${cliInvocation()} ${LEGACY.legacy.subcommand}`;
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { criteriaOf, loadCitationFinder, testFileMatcher, hostItemsOf, runnerMatcher, NO_VERDICT_REASON } from './chunk-BO3NOGKE.js';
4
- import { WorkCommandError, resolveCredentials, getJson } from './chunk-JTDMSQMI.js';
3
+ import { criteriaOf, loadCitationFinder, testFileMatcher, hostItemsOf, runnerMatcher, NO_VERDICT_REASON } from './chunk-ML3O3A3Q.js';
4
+ import { WorkCommandError, resolveCredentials, getJson } from './chunk-RFBJKK2L.js';
5
5
  import { sanitizeTerminal } from './chunk-IXB2IIEW.js';
6
6
  import { C } from './chunk-2AM6Z5BP.js';
7
- import { defaultFetch } from './chunk-XDRZ3BNA.js';
7
+ import { defaultFetch } from './chunk-T7KETYNW.js';
8
8
  import { parseWorkItemEnv } from './chunk-4OD45RBP.js';
9
9
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
10
10
  import { readDeliveryRecord } from './chunk-YQR6E6OV.js';
11
- import { parseProofsConfig } from './chunk-AVEF3T6Y.js';
12
- import { resolveRepoIdentity } from './chunk-5R5FEPLH.js';
11
+ import { parseProofsConfig } from './chunk-GM4TY5H2.js';
12
+ import { resolveRepoIdentity } from './chunk-H2L5NB5U.js';
13
13
  import { inferArtifactKind, mediaTypeForArtifactPath, WORK_ITEM_COMMENT_MAX_BODY_LENGTH, parseJunit, isTestSourcePath } from './chunk-YXXJBHHF.js';
14
14
  import { spawnSync } from 'child_process';
15
15
  import { createHash } from 'crypto';
@@ -129,14 +129,14 @@ function governingDir(cwd) {
129
129
  async function testProofMode(cwd) {
130
130
  const dir = governingDir(cwd);
131
131
  if (dir === void 0) return "any";
132
- const { testProofIn } = await import('./host-checks-OXB5J3KR.js');
132
+ const { testProofIn } = await import('./host-checks-HPCMZ7XT.js');
133
133
  return testProofIn(dir);
134
134
  }
135
135
  async function judgeCheckName(cwd) {
136
136
  const dir = governingDir(cwd);
137
137
  if (dir === void 0) return {};
138
138
  if (!existsSync(dir)) return { note: `the governed context at ${dir} is not readable` };
139
- const { checksIn, isJudgeCheck } = await import('./host-checks-OXB5J3KR.js');
139
+ const { checksIn, isJudgeCheck } = await import('./host-checks-HPCMZ7XT.js');
140
140
  const quiet = { line: () => void 0, error: () => void 0 };
141
141
  const check = checksIn(dir, quiet, "").checks.find((c) => isJudgeCheck(c) && c.judge.subjects === "criteria");
142
142
  return check === void 0 ? {} : { name: check.name };
@@ -372,7 +372,7 @@ async function runWorkProofs(opts) {
372
372
  async function runWorkProofsCommand(opts) {
373
373
  try {
374
374
  if (opts.record) {
375
- const { runWorkProofsRecord } = await import('./work-proofs-record-6FTMJDQG.js');
375
+ const { runWorkProofsRecord } = await import('./work-proofs-record-CYIZ2RDH.js');
376
376
  const result2 = await runWorkProofsRecord(opts);
377
377
  process.exitCode = result2.exitCode;
378
378
  return;
@@ -1,26 +1,26 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { checkStarterFiles, contextIsGoverned } from './chunk-ERQLHUWU.js';
4
- import { resolveCredentials, getJson, WorkCommandError } from './chunk-JTDMSQMI.js';
5
- import { fleetCheck, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences, checkIgnoredSkillFolders } from './chunk-BL6CCU26.js';
6
- import { withInjectedPrograms } from './chunk-EERD7VI3.js';
7
- import { isLinkedRepository } from './chunk-EXIZ3G6I.js';
3
+ import { checkStarterFiles, contextIsGoverned } from './chunk-5QBTW367.js';
4
+ import { resolveCredentials, getJson, WorkCommandError } from './chunk-RFBJKK2L.js';
5
+ import { fleetCheck, checkBuildSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences, checkIgnoredSkillFolders } from './chunk-SUMXGPSG.js';
6
+ import { withInjectedPrograms } from './chunk-U4ZHNHCF.js';
7
+ import { isLinkedRepository } from './chunk-3KVYSJAL.js';
8
8
  import { sanitizeTerminal } from './chunk-IXB2IIEW.js';
9
9
  import { C } from './chunk-2AM6Z5BP.js';
10
- import { checkFormerSkillNames } from './chunk-T524XQKI.js';
11
- import { resolveGatewayCredentials, defaultFetch } from './chunk-XDRZ3BNA.js';
12
- import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-256R6O56.js';
10
+ import { checkFormerSkillNames } from './chunk-2MA2KWHN.js';
11
+ import { resolveGatewayCredentials, defaultFetch } from './chunk-T7KETYNW.js';
12
+ import { sanitizeForContext, spoolDir, assessSyncHealth, readSyncStatus, SYNC_STALE_AFTER_MS, formatAgo, checkInstalledCliStaleness, workspaceRootOf, hookFiredMarkerPath, refreshCommand } from './chunk-OMCDOJO2.js';
13
13
  import { CONTROL_PLANE_DIR_VARIABLE } from './chunk-SF2TBJBP.js';
14
14
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
15
15
  import { readStatuslineState, STATE_FRESH_MS } from './chunk-M53UNEO6.js';
16
16
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
17
- import { installAgents, withSettingsText } from './chunk-EHJYXABQ.js';
17
+ import { installAgents, withSettingsText } from './chunk-4PH3KXDP.js';
18
18
  import { cliForInstall, cliBinResolvable } from './chunk-ZHQC43NH.js';
19
19
  import { readDeliveryRecord, readDegraded, readSourceCache } from './chunk-YQR6E6OV.js';
20
20
  import { deadHooksState, preparePackageManagerCommand } from './chunk-CJPTUU2E.js';
21
- import { defaultAgents, legacyAgent, contextAgents } from './chunk-AVEF3T6Y.js';
21
+ import { defaultAgents, legacyAgent, contextAgents } from './chunk-GM4TY5H2.js';
22
22
  import { homeFromEnv } from './chunk-352DHUTP.js';
23
- import { SUPPORTED_VERSIONS, resolveRepoIdentity } from './chunk-5R5FEPLH.js';
23
+ import { SUPPORTED_VERSIONS, resolveRepoIdentity } from './chunk-H2L5NB5U.js';
24
24
  import { readFileSync, mkdirSync, writeFileSync, renameSync, existsSync, accessSync, constants, statSync } from 'fs';
25
25
  import { sep, join, dirname, resolve, delimiter } from 'path';
26
26
  import { execFileSync } from 'child_process';
@@ -550,6 +550,7 @@ function checkLastSync(home, now) {
550
550
  if (health.level === "error") {
551
551
  return { name, status: "fail", detail, fix: `Check the destination and API key in ~/.outerlayer/config.json, then run \`${cliInvocation()} sync\` to see the full error.` };
552
552
  }
553
+ if (health.notLaunched === true) return { name, status: "pass", detail };
553
554
  if (health.level === "warn" || health.level === "unknown") {
554
555
  return { name, status: "warn", detail, fix: `Run \`${cliInvocation()} sync\` to confirm the connection works.` };
555
556
  }
@@ -1049,10 +1050,10 @@ function doctorExitCode(checks) {
1049
1050
  }
1050
1051
 
1051
1052
  // src/doctor-report.ts
1052
- async function gatherDoctorChecks() {
1053
- const { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK } = await import('./build-disk-CKBEEF4N.js');
1054
- const { defaultRunnerConfigPath, hasRunnerBlock, keyRunnerFactory, loadRunnerConfig, runnerVmOf } = await import('./config-EA6WVKAS.js');
1055
- const configPath = defaultRunnerConfigPath();
1053
+ async function gatherDoctorChecks(options = {}) {
1054
+ const { DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK } = await import('./build-disk-GGGJ237B.js');
1055
+ const { defaultRunnerConfigPath, hasRunnerBlock, keyRunnerFactory, loadRunnerConfig, runnerVmOf } = await import('./config-KOSTQZXG.js');
1056
+ const configPath = options.configPath ?? defaultRunnerConfigPath();
1056
1057
  const runnerHost = hasRunnerBlock(configPath);
1057
1058
  const hooks = (() => {
1058
1059
  try {
@@ -1079,7 +1080,7 @@ async function gatherDoctorChecks() {
1079
1080
  const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
1080
1081
  checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
1081
1082
  } else if (hasRunnerBlock(configPath)) {
1082
- const { runnerHostChecks } = await import('./doctor-AFH6UUX6.js');
1083
+ const { runnerHostChecks } = await import('./doctor-GHRSOZLB.js');
1083
1084
  const gateway = (() => {
1084
1085
  try {
1085
1086
  const loaded = loadRunnerConfig(configPath);
@@ -1107,7 +1108,7 @@ async function gatherDoctorChecks() {
1107
1108
  const service = await (async () => {
1108
1109
  const { existsSync: existsSync3 } = await import('fs');
1109
1110
  if (process.platform !== "linux" || !existsSync3("/run/systemd/system")) return void 0;
1110
- const { inspectRunnerService } = await import('./find-unit-337Y4QAC.js');
1111
+ const { inspectRunnerService } = await import('./find-unit-UVS2FM7E.js');
1111
1112
  return inspectRunnerService(configPath);
1112
1113
  })();
1113
1114
  checks.push(...await runnerHostChecks({ configPath, hooks, gateway, repos, runner, service }));
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { detectActiveSession } from './chunk-DL5N6V3D.js';
4
- import { autoConnect } from './chunk-XE2PXGZT.js';
5
- import { workPageUrl } from './chunk-EXIZ3G6I.js';
3
+ import { detectActiveSession } from './chunk-GQEVQIS6.js';
4
+ import { autoConnect } from './chunk-JKQAOSSX.js';
5
+ import { workPageUrl } from './chunk-3KVYSJAL.js';
6
6
  import { sanitizeTerminal } from './chunk-IXB2IIEW.js';
7
7
  import { C } from './chunk-2AM6Z5BP.js';
8
- import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-XDRZ3BNA.js';
9
- import { signRunnerRequest } from './chunk-EFAOERZH.js';
8
+ import { resolveGatewayCredentials, unauthorizedMessage, defaultFetch } from './chunk-T7KETYNW.js';
9
+ import { signRunnerRequest } from './chunk-TOVSIUEJ.js';
10
10
  import { readRepoConnection } from './chunk-BJ3KTMDH.js';
11
11
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
12
12
  import { NATIVE_AGENTS, LEGACY_AGENT } from './chunk-7PZDPISM.js';
13
13
  import { homeFromEnv } from './chunk-352DHUTP.js';
14
- import { resolveRepoIdentity } from './chunk-5R5FEPLH.js';
14
+ import { resolveRepoIdentity } from './chunk-H2L5NB5U.js';
15
15
 
16
16
  createRequire(import.meta.url);
17
17
 
@@ -486,7 +486,7 @@ async function runWorkLinkSession(opts) {
486
486
  return await linkSession(opts);
487
487
  } catch (err) {
488
488
  if (opts.logFailures) {
489
- const { logHookError } = await import('./hook-fast-T6FOTZHA.js');
489
+ const { logHookError } = await import('./hook-fast-6IOLZ45F.js');
490
490
  const reason = err instanceof Error ? err.message : String(err);
491
491
  logHookError(opts.home ?? homeFromEnv(opts.env ?? process.env), new Error(`work link-session #${opts.number} failed: ${reason}`));
492
492
  }
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
3
  import { sanitizeTerminal } from './chunk-IXB2IIEW.js';
4
- import { isAgentsMdLayout } from './chunk-YWWW47OY.js';
5
- import { resolveGatewayCredentials, defaultFetch } from './chunk-XDRZ3BNA.js';
4
+ import { isAgentsMdLayout } from './chunk-CFTSVW7W.js';
5
+ import { resolveGatewayCredentials, defaultFetch } from './chunk-T7KETYNW.js';
6
6
  import { versionAtLeast } from './chunk-SF2TBJBP.js';
7
7
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
8
- import { machineSkillsState, staleAgentSkills } from './chunk-OFWNBTLU.js';
8
+ import { machineSkillsState, staleAgentSkills } from './chunk-ZOWUJUSF.js';
9
9
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
10
- import { hasSymlinkComponent } from './chunk-FOUG2R4Q.js';
11
- import { skillDir, emitTree, targetIds, classifyTree, emitBuilders, AGENTS_SKILLS_BASE, defaultAgents, namesCore, MACHINE_SKILL_PATH, skillBases, isMaintainedCopy, contextAgents, loadTemplateFiles, splitRawFile } from './chunk-AVEF3T6Y.js';
10
+ import { hasSymlinkComponent } from './chunk-VRSUCU2N.js';
11
+ import { skillDir, emitTree, targetIds, classifyTree, emitBuilders, AGENTS_SKILLS_BASE, defaultAgents, namesCore, MACHINE_SKILL_PATH, skillBases, isMaintainedCopy, contextAgents, loadTemplateFiles, splitRawFile } from './chunk-GM4TY5H2.js';
12
12
  import { MAINTAINED_SKILLS } from './chunk-CDDED64E.js';
13
13
  import { execFileSync } from 'child_process';
14
14
  import { existsSync, readFileSync, writeFileSync, realpathSync, readdirSync } from 'fs';
@@ -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-HWVMRETT.js';
4
- import { signRunnerRequest, signerFor } from './chunk-EFAOERZH.js';
4
+ import { signRunnerRequest, signerFor } from './chunk-TOVSIUEJ.js';
5
5
  import { readRepoConnection, findGitDirs } from './chunk-BJ3KTMDH.js';
6
6
  import { PLAIN_VERSION, recordCliVersion, removeRecordedVersion } from './chunk-NFZMENCY.js';
7
7
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
@@ -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-ZYQT6Q5R.js';
4
+ import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-VOSC32UF.js';
5
+ import { RunnerAlreadyRunningError, readPidFile } from './chunk-7KF36CVC.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-RFBJKK2L.js';
8
+ import { keyRunnerFactory } from './chunk-UF3YTRGU.js';
9
+ import { signerFor } from './chunk-TOVSIUEJ.js';
10
+ import { pidFilePath } from './chunk-YZ5M7S7U.js';
11
11
  import { readFileSync } from 'fs';
12
12
 
13
13
  createRequire(import.meta.url);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { defaultAgents, agentById } from './chunk-AVEF3T6Y.js';
3
+ import { defaultAgents, agentById } from './chunk-GM4TY5H2.js';
4
4
  import { PROVIDERS, LEGACY_AGENT } from './chunk-7PZDPISM.js';
5
5
  import { join, dirname } from 'path';
6
6
 
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { detectActiveSession } from './chunk-DL5N6V3D.js';
4
- import { autoConnect } from './chunk-XE2PXGZT.js';
3
+ import { detectActiveSession } from './chunk-GQEVQIS6.js';
4
+ import { autoConnect } from './chunk-JKQAOSSX.js';
5
5
  import { C } from './chunk-2AM6Z5BP.js';
6
- import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-XDRZ3BNA.js';
6
+ import { defaultFetch, unauthorizedMessage, resolveGatewayCredentials } from './chunk-T7KETYNW.js';
7
7
  import { parseWorkItemEnv } from './chunk-4OD45RBP.js';
8
8
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
9
9
  import { homeFromEnv } from './chunk-352DHUTP.js';
10
- import { resolveRepoIdentity } from './chunk-5R5FEPLH.js';
10
+ import { resolveRepoIdentity } from './chunk-H2L5NB5U.js';
11
11
 
12
12
  createRequire(import.meta.url);
13
13
 
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { RemovedTargetError, removedTargetError } from './chunk-X2DX3A7H.js';
4
- import { removeRetiredSkills } from './chunk-T524XQKI.js';
5
- import { defaultFetch, resolveGatewayCredentials } from './chunk-XDRZ3BNA.js';
6
- import { withTokenHeader } from './chunk-OUHM6U6Z.js';
3
+ import { RemovedTargetError, removedTargetError } from './chunk-MCLSXTLY.js';
4
+ import { removeRetiredSkills } from './chunk-2MA2KWHN.js';
5
+ import { defaultFetch, resolveGatewayCredentials } from './chunk-T7KETYNW.js';
6
+ import { withTokenHeader } from './chunk-FCU7WSCV.js';
7
7
  import { appendContextProvenance } from './chunk-545P7JY7.js';
8
8
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
9
9
  import { writeDegraded, writeSourceCache, SOURCE_CACHE_TTL_RETRY_MS, writeContextManifest, SOURCE_CACHE_TTL_SUCCESS_MS, readSourceCache, isSourceCacheFresh, clearDegraded } from './chunk-YQR6E6OV.js';
10
- import { normalizeRepoName, loadMaintainedFiles, writeMaintainedFiles, parseOuterlayerConfig, targetIds, classifyTree, emitTree, emitBuilders, defaultAgents, agentRootFolders } from './chunk-AVEF3T6Y.js';
10
+ import { normalizeRepoName, loadMaintainedFiles, writeMaintainedFiles, parseOuterlayerConfig, targetIds, classifyTree, emitTree, emitBuilders, defaultAgents, agentRootFolders } from './chunk-GM4TY5H2.js';
11
11
  import { homeFromEnv } from './chunk-352DHUTP.js';
12
12
  import { execFileSync } from 'child_process';
13
13
  import { existsSync, mkdirSync, writeFileSync, chmodSync, lstatSync, readFileSync, copyFileSync } from 'fs';
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { hostKeyPath, runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-5VAXNAOD.js';
3
+ import { hostKeyPath, runnerDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-YZ5M7S7U.js';
4
4
  import { generateKeyPairSync, createPrivateKey, createPublicKey, sign } from 'crypto';
5
5
  import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
6
6
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { legacyAgent, createNodeAgentIO, ADAPTER_FACTORIES } from './chunk-AVEF3T6Y.js';
3
+ import { legacyAgent, createNodeAgentIO, ADAPTER_FACTORIES } from './chunk-GM4TY5H2.js';
4
4
 
5
5
  createRequire(import.meta.url);
6
6
 
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-MPE4NOKD.js';
4
- import { parseSize } from './chunk-3FAJMXBA.js';
5
- import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-OUHM6U6Z.js';
6
- import { builderDiskPinned } from './chunk-RZ6WJTUP.js';
3
+ import { DEFAULT_CACHE_DISK, DEFAULT_BUILD_DISK } from './chunk-G2EWER4K.js';
4
+ import { parseSize } from './chunk-6BPCEGJL.js';
5
+ import { isRefusedInConfig, resolveDestinations, isReservedVariable } from './chunk-FCU7WSCV.js';
6
+ import { builderDiskPinned } from './chunk-TDUBZ4FR.js';
7
7
  import { homeFromEnv } from './chunk-352DHUTP.js';
8
8
  import { existsSync, statSync, accessSync, constants, readFileSync } from 'fs';
9
9
  import { hostname } from 'os';
@@ -96,18 +96,72 @@ function hostAllowed(host, allowHosts) {
96
96
  });
97
97
  }
98
98
 
99
+ // src/runner/sandbox/config.ts
100
+ var DEFAULT_IDLE_MINUTES = 10;
101
+ var TIME_LIMIT_MARGIN_MINUTES = 15;
102
+ var MAX_TIME_LIMIT_MINUTES = 1440;
103
+ var MIB = 1024 ** 2;
104
+ var GIB = 1024 ** 3;
105
+ var MAX_IDLE_MINUTES = 120;
106
+ var DEFAULT_SANDBOX_IMAGE = "outerlayer-universal:latest";
107
+ var MAX_IMAGE_LENGTH = 200;
108
+ var KEYS = ["snapshot", "image", "allowHosts", "idleMinutes"];
109
+ function sandboxSizeOf(build) {
110
+ const cpus = build?.cpus ?? 4;
111
+ const memory = parseSize(build?.memory ?? "8g");
112
+ const disk = parseSize(build?.disk ?? "40g");
113
+ if (!Number.isInteger(cpus) || cpus < 1 || cpus > 16) return { ok: false, field: "runner.build.cpus", problem: "must be a whole number from 1 to 16 for a sandbox" };
114
+ if (memory === void 0 || memory < GIB || memory > 64 * GIB || memory % GIB !== 0) return { ok: false, field: "runner.build.memory", problem: "must be a whole number of GiB from 1g to 64g for a sandbox" };
115
+ if (disk === void 0 || disk < 5 * GIB || disk > 500 * GIB) return { ok: false, field: "runner.build.disk", problem: "must be from 5g to 500g for a sandbox" };
116
+ return { ok: true, size: { vcpu: cpus, memoryMib: Math.round(memory / MIB), diskGib: Math.ceil(disk / GIB) } };
117
+ }
118
+ function networkOf(allowHosts) {
119
+ return allowHosts.length === 0 ? { egress: "none" } : { egress: "allowlist", hosts: [...allowHosts] };
120
+ }
121
+ function sandboxTimeLimitMinutes(runnerLimitMinutes) {
122
+ return Math.min(MAX_TIME_LIMIT_MINUTES, runnerLimitMinutes + TIME_LIMIT_MARGIN_MINUTES);
123
+ }
124
+ function resolveSandbox(block, build, report) {
125
+ if (block === void 0) return report("runner.sandbox", "is required with the hooks builtin:sandbox: name the snapshot to start sandboxes from");
126
+ if (typeof block !== "object" || block === null || Array.isArray(block)) return report("runner.sandbox", "must be an object");
127
+ const given = block;
128
+ for (const key of Object.keys(given)) {
129
+ if (!KEYS.includes(key)) return report(`runner.sandbox.${key}`, `is not a setting; the ones that exist are ${KEYS.join(", ")}`);
130
+ }
131
+ const snapshot = given["snapshot"];
132
+ if (typeof snapshot !== "string" || snapshot.trim() === "") return report("runner.sandbox.snapshot", "is required: the name of the saved snapshot that holds Docker and the universal image");
133
+ const image = given["image"] ?? DEFAULT_SANDBOX_IMAGE;
134
+ if (typeof image !== "string" || image.length > MAX_IMAGE_LENGTH || !/^[A-Za-z0-9][A-Za-z0-9_.:/@-]*$/.test(image)) return report("runner.sandbox.image", `must be an image name of at most ${MAX_IMAGE_LENGTH} characters, such as outerlayer-universal:latest`);
135
+ const hosts = given["allowHosts"] ?? [];
136
+ if (!Array.isArray(hosts)) return report("runner.sandbox.allowHosts", "must be a list of host names");
137
+ if (hosts.length > MAX_ALLOW_HOSTS) return report("runner.sandbox.allowHosts", `holds more than ${MAX_ALLOW_HOSTS} entries`);
138
+ hosts.forEach((entry, index) => {
139
+ const problem = allowHostProblem(entry);
140
+ if (problem !== void 0) report(`runner.sandbox.allowHosts[${index}]`, problem);
141
+ });
142
+ const idle = given["idleMinutes"] ?? DEFAULT_IDLE_MINUTES;
143
+ if (typeof idle !== "number" || !Number.isInteger(idle) || idle < 1 || idle > MAX_IDLE_MINUTES) return report("runner.sandbox.idleMinutes", `must be a whole number of minutes from 1 to ${MAX_IDLE_MINUTES}`);
144
+ const size = sandboxSizeOf(build);
145
+ if (!size.ok) return report(size.field, size.problem);
146
+ return { snapshot: snapshot.trim(), image, allowHosts: hosts.map((host) => host.toLowerCase()), idleMinutes: idle };
147
+ }
148
+
99
149
  // src/runner/config.ts
100
150
  var BUILTIN_CONTAINER = "builtin:container";
101
151
  var PROCESS_HOOK = "builtin:process";
102
152
  var BUILTIN_VM = "builtin:vm";
153
+ var BUILTIN_SANDBOX = "builtin:sandbox";
103
154
  function isBuiltinContainer(hook) {
104
155
  return hook === BUILTIN_CONTAINER;
105
156
  }
106
157
  function isBuiltinVm(hook) {
107
158
  return hook === BUILTIN_VM;
108
159
  }
160
+ function isBuiltinSandbox(hook) {
161
+ return hook === BUILTIN_SANDBOX;
162
+ }
109
163
  function builtinKind(hook) {
110
- return isBuiltinContainer(hook) ? "container" : isBuiltinVm(hook) ? "vm" : "own";
164
+ return isBuiltinContainer(hook) ? "container" : isBuiltinVm(hook) ? "vm" : isBuiltinSandbox(hook) ? "sandbox" : "own";
111
165
  }
112
166
  function runnerDeliversComments(config) {
113
167
  if (config.deliverComments === false) return false;
@@ -137,6 +191,7 @@ function imageBuildOf(config) {
137
191
  return config.build?.imageBuild ?? "vm";
138
192
  }
139
193
  function keepsHostBuilder(config, builderDiskIsPinned) {
194
+ if (isBuiltinSandbox(config.hooks.provision)) return false;
140
195
  return !(imageBuildOf(config) === "vm" && (builderDiskIsPinned ?? builderDiskPinned()));
141
196
  }
142
197
  var BUILD_KEYS = ["memory", "cpus", "pids", "disk", "setupMinutes", "cacheDisk", "variables", "destinations", "allowHosts", "imageBuild", "egress"];
@@ -212,6 +267,7 @@ var RUNNER_KEYS = [
212
267
  "commands",
213
268
  "hooks",
214
269
  "build",
270
+ "sandbox",
215
271
  "housekeeping",
216
272
  "checks",
217
273
  "autoUpdate",
@@ -273,7 +329,7 @@ function checkHooks(config, env = process.env) {
273
329
  ];
274
330
  for (const [key, path] of named) {
275
331
  if (path === void 0) continue;
276
- if (isBuiltinContainer(path) || isBuiltinVm(path)) continue;
332
+ if (isBuiltinContainer(path) || isBuiltinVm(path) || isBuiltinSandbox(path)) continue;
277
333
  if (path.includes("$") || path.startsWith("~")) {
278
334
  return `${key}: ${path} \u2014 hooks are executable paths, not shell lines; $HOME and ~ are not expanded`;
279
335
  }
@@ -369,6 +425,8 @@ function loadRunnerConfig(configPath) {
369
425
  if (!runner.hooks?.cleanup) fail(configPath, "runner.hooks.cleanup", "is required");
370
426
  checkBuiltinHooks(configPath, runner.hooks);
371
427
  const build = resolveBuild(configPath, runner.build);
428
+ const sandbox = isBuiltinSandbox(runner.hooks.provision) ? resolveSandbox(runner.sandbox, build, (field, problem) => fail(configPath, field, problem)) : void 0;
429
+ if (sandbox === void 0 && runner.sandbox !== void 0) fail(configPath, "runner.sandbox", `is used only when the hooks are ${BUILTIN_SANDBOX}`);
372
430
  const housekeeping = resolveHousekeeping(configPath, runner.housekeeping, build.disk);
373
431
  const checks = resolveChecks(configPath, runner.checks);
374
432
  const update = resolveUpdate(configPath, runner.update);
@@ -400,6 +458,7 @@ function loadRunnerConfig(configPath) {
400
458
  report: runner.hooks.report
401
459
  },
402
460
  build,
461
+ ...sandbox === void 0 ? {} : { sandbox },
403
462
  housekeeping,
404
463
  checks,
405
464
  update,
@@ -423,14 +482,14 @@ function checkBuiltinHooks(configPath, hooks) {
423
482
  if (value === PROCESS_HOOK) {
424
483
  fail(configPath, `runner.hooks.${key}`, `is ${PROCESS_HOOK}, which is not supported: builds run isolated. Set both hooks to ${BUILTIN_CONTAINER} or ${BUILTIN_VM}, or remove the runner block and run \`outerlayer runner init\` again`);
425
484
  }
426
- if (!isBuiltinContainer(value) && !isBuiltinVm(value)) {
427
- fail(configPath, `runner.hooks.${key}`, `names an unknown built-in hook "${value}"; the ones that exist are ${BUILTIN_CONTAINER} and ${BUILTIN_VM}`);
485
+ if (!isBuiltinContainer(value) && !isBuiltinVm(value) && !isBuiltinSandbox(value)) {
486
+ fail(configPath, `runner.hooks.${key}`, `names an unknown built-in hook "${value}"; the ones that exist are ${BUILTIN_CONTAINER}, ${BUILTIN_VM} and ${BUILTIN_SANDBOX}`);
428
487
  }
429
488
  }
430
489
  const provision = hooks.provision;
431
490
  const cleanup = hooks.cleanup;
432
- if (isBuiltinContainer(provision) !== isBuiltinContainer(cleanup) || isBuiltinVm(provision) !== isBuiltinVm(cleanup)) {
433
- fail(configPath, "runner.hooks", `provision and cleanup must both be ${BUILTIN_CONTAINER}, both be ${BUILTIN_VM}, or neither`);
491
+ if (isBuiltinContainer(provision) !== isBuiltinContainer(cleanup) || isBuiltinVm(provision) !== isBuiltinVm(cleanup) || isBuiltinSandbox(provision) !== isBuiltinSandbox(cleanup)) {
492
+ fail(configPath, "runner.hooks", `provision and cleanup must both be ${BUILTIN_CONTAINER}, both be ${BUILTIN_VM}, both be ${BUILTIN_SANDBOX}, or neither`);
434
493
  }
435
494
  }
436
495
  function resolveHousekeeping(configPath, block, buildDisk) {
@@ -608,4 +667,4 @@ function egressLimitsOf(config) {
608
667
  return resolveEgress(config.build?.egress, config.managed === true);
609
668
  }
610
669
 
611
- export { DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_SETUP_MINUTES, DEFAULT_UPDATE_MAX_WAIT_HOURS, DEFAULT_WORKSPACE_KEEP_DAYS, EGRESS_SWITCHABLE_KEYS, MAX_ALLOW_HOSTS, RunnerConfigError, allowHostProblem, builtinKind, checkHooks, defaultRunnerConfigPath, egressSummary, emptyEgressCounts, hasRunnerBlock, hostAllowed, imageBuildOf, isBuiltinContainer, isBuiltinVm, keepsHostBuilder, keyRunnerFactory, loadRunnerConfig, optionalEgress, resolveBuild, resolveHousekeeping, runnerCredentialProblem, runnerDeliversComments, runnerVmOf, systemClock };
670
+ export { DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_SETUP_MINUTES, DEFAULT_UPDATE_MAX_WAIT_HOURS, DEFAULT_WORKSPACE_KEEP_DAYS, EGRESS_SWITCHABLE_KEYS, MAX_ALLOW_HOSTS, RunnerConfigError, allowHostProblem, builtinKind, checkHooks, defaultRunnerConfigPath, egressSummary, emptyEgressCounts, hasRunnerBlock, hostAllowed, imageBuildOf, isBuiltinContainer, isBuiltinSandbox, isBuiltinVm, keepsHostBuilder, keyRunnerFactory, loadRunnerConfig, networkOf, optionalEgress, resolveBuild, resolveHousekeeping, runnerCredentialProblem, runnerDeliversComments, runnerVmOf, sandboxSizeOf, sandboxTimeLimitMinutes, systemClock };
@@ -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-5VAXNAOD.js';
3
+ import { RUNNER_DIR_MODE, RUNNER_FILE_MODE } from './chunk-YZ5M7S7U.js';
4
4
  import { readFileSync, existsSync, rmSync, mkdirSync, writeFileSync, renameSync } from 'fs';
5
5
  import { join } from 'path';
6
6
 
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { builtinKind, keepsHostBuilder } from './chunk-VNT2IRLM.js';
4
- import { parseSize } from './chunk-3FAJMXBA.js';
5
- import { runnerDir } from './chunk-5VAXNAOD.js';
6
- import { FD_SLOTS_PER_BUILD, FD_STORE_ENV, BUILD_SLICE_MEMORY_ENV, credentialLineIn, withoutCredentialLines } from './chunk-CGXYPLK3.js';
7
- import { credentialAgent, credentialNames, credentialForms } from './chunk-RZ6WJTUP.js';
8
- import { defaultAgents } from './chunk-AVEF3T6Y.js';
3
+ import { builtinKind, keepsHostBuilder } from './chunk-UF3YTRGU.js';
4
+ import { parseSize } from './chunk-6BPCEGJL.js';
5
+ import { runnerDir } from './chunk-YZ5M7S7U.js';
6
+ import { FD_SLOTS_PER_BUILD, FD_STORE_ENV, BUILD_SLICE_MEMORY_ENV, credentialLineIn, withoutCredentialLines } from './chunk-HTQFAHXD.js';
7
+ import { credentialAgent, credentialNames, credentialForms } from './chunk-TDUBZ4FR.js';
8
+ import { defaultAgents } from './chunk-GM4TY5H2.js';
9
9
  import { existsSync, readFileSync, writeFileSync, chmodSync, renameSync } from 'fs';
10
10
  import { dirname, join } from 'path';
11
11
  import { spawnSync } from 'child_process';
@@ -2,7 +2,7 @@
2
2
  import { createRequire } from 'node:module';
3
3
  import { readContextManifest, removeContextManifest } from './chunk-YQR6E6OV.js';
4
4
  import { removePreCommitGuardHook } from './chunk-CJPTUU2E.js';
5
- import { CONTEXT_PIN_FILENAME, agentRootFolders } from './chunk-AVEF3T6Y.js';
5
+ import { CONTEXT_PIN_FILENAME, agentRootFolders } from './chunk-GM4TY5H2.js';
6
6
  import { execFileSync } from 'child_process';
7
7
  import { lstatSync, existsSync, unlinkSync, readdirSync, rmdirSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
8
8
  import { join, dirname, isAbsolute } from 'path';
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { TUNNEL_PORT, BRIDGE_ADDRESS, BRIDGE_CIDR } from './chunk-ONOINHY4.js';
3
+ import { TUNNEL_PORT, BRIDGE_ADDRESS, BRIDGE_CIDR } from './chunk-G2ITKUX4.js';
4
4
  import { startTimeOf } from './chunk-JBJTC3UU.js';
5
- import { EXEC_PORT } from './chunk-U5EE7PGC.js';
6
- import { RELAY_PORT } from './chunk-OUHM6U6Z.js';
5
+ import { EXEC_PORT } from './chunk-E2ZWGLNZ.js';
6
+ import { RELAY_PORT } from './chunk-FCU7WSCV.js';
7
7
  import { spawn, spawnSync } from 'child_process';
8
8
  import { symlinkSync, lstatSync, writeFileSync, chmodSync, mkdirSync, existsSync } from 'fs';
9
9
 
@@ -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-A24MNKYN.js';
4
+ import { addStdioMcpEntryIfAbsent, addDocsMcpEntryIfAbsent, DOCS_MCP_SERVER_NAME } from './chunk-2VN36ZPA.js';
5
+ import { installStarterPack } from './chunk-NMCRJ7NZ.js';
6
+ import { listWithAnd } from './chunk-3KVYSJAL.js';
7
+ import { AGENTS_MD_LAYOUT, mcpFiles, declareAgentsMdLayout, linkAgentSkills, describeSkillsLink, isAgentsMdLayout, holdsTodaysLayoutSources, discoverOuterlayerPaths } from './chunk-CFTSVW7W.js';
8
8
  import { C } from './chunk-2AM6Z5BP.js';
9
- import { resolveGitCommonDir, defaultGitRunner } from './chunk-DVFGCVTV.js';
9
+ import { resolveGitCommonDir, defaultGitRunner } from './chunk-TMYBADTM.js';
10
10
  import { cliInvocation } from './chunk-FZKNTIOJ.js';
11
- import { linkedAgentsPath } from './chunk-FOUG2R4Q.js';
11
+ import { linkedAgentsPath } from './chunk-VRSUCU2N.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-GM4TY5H2.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';