@outerlayer/cli 0.36.0-next.20261102124202 → 0.36.0-next.20261102195652

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/dist/agent-setup-5UWZZMZM.js +39 -0
  2. package/dist/agent-subcommand-4TEUJJNL.js +25 -0
  3. package/dist/{bridge-DFG2GTXQ.js → bridge-4KPODDN7.js} +6 -4
  4. package/dist/{build-THAD3B4Q.js → build-3CEFKWGY.js} +13 -11
  5. package/dist/{build-disk-HO2VPIBJ.js → build-disk-DLW3WKC5.js} +11 -9
  6. package/dist/build-info.json +1 -1
  7. package/dist/{builder-AXJNIF4S.js → builder-ALMQ5AWP.js} +10 -8
  8. package/dist/caller-XNBGW4SP.js +22 -0
  9. package/dist/{check-SF2OVZXB.js → check-AEDFTYH6.js} +61 -59
  10. package/dist/{chunk-772ILTCK.js → chunk-2XN34EKQ.js} +3 -3
  11. package/dist/{chunk-KN4VIK53.js → chunk-2YC3TXWX.js} +1 -1
  12. package/dist/{chunk-6JJITHBI.js → chunk-42DBDDHP.js} +1 -1
  13. package/dist/chunk-4DLJ343I.js +38 -0
  14. package/dist/{chunk-5WYT3PPE.js → chunk-4OD45RBP.js} +4 -1
  15. package/dist/{chunk-PTPF36Q7.js → chunk-4UUKUOS7.js} +3 -3
  16. package/dist/{chunk-RK4JQRVT.js → chunk-5XX75FJ6.js} +9 -9
  17. package/dist/{chunk-TWYHSMHM.js → chunk-6JLYU322.js} +3 -2
  18. package/dist/{chunk-5GHJFETA.js → chunk-6KH3NMIT.js} +3010 -1196
  19. package/dist/{chunk-GSXGA6KF.js → chunk-6QSIK5VA.js} +1 -1
  20. package/dist/{chunk-5FIOUQGC.js → chunk-6Z7R24XA.js} +8 -8
  21. package/dist/{chunk-LVXR37OG.js → chunk-73E33ZA2.js} +9 -8
  22. package/dist/{chunk-4TNUQLXH.js → chunk-7UGMB5VS.js} +12 -11
  23. package/dist/{chunk-J7TCTARR.js → chunk-7XTLS5PG.js} +5 -5
  24. package/dist/{chunk-K3X3L5YW.js → chunk-A24PDRNU.js} +6 -6
  25. package/dist/{chunk-GDZTL6BI.js → chunk-A2U7T4ZH.js} +123 -277
  26. package/dist/{chunk-GZ75FRLB.js → chunk-B36NSEUM.js} +1 -1
  27. package/dist/{chunk-XHFSBSIA.js → chunk-B5SWBFVE.js} +3 -2
  28. package/dist/{chunk-NTMRMBLM.js → chunk-BACWWK3E.js} +22 -7
  29. package/dist/{chunk-RSRZDF3K.js → chunk-BN5U4RJU.js} +11 -9
  30. package/dist/{chunk-NC3QAHOS.js → chunk-BSPJI5T7.js} +4 -2
  31. package/dist/{chunk-A5Y2HBVU.js → chunk-BZSJ77MO.js} +1 -1
  32. package/dist/{chunk-L3JXQDVH.js → chunk-CA4OE2QT.js} +4 -4
  33. package/dist/{chunk-ESSJPSJ2.js → chunk-CI5LFLKH.js} +2 -2
  34. package/dist/{chunk-M2NIHHQI.js → chunk-CXJC3JLN.js} +3 -2
  35. package/dist/{chunk-WDQPBAFV.js → chunk-D6EXW4EB.js} +2 -1
  36. package/dist/{chunk-PQDFW422.js → chunk-D74RGORK.js} +1 -1
  37. package/dist/{chunk-NWBB2SQ4.js → chunk-DL2RYNXQ.js} +66 -25
  38. package/dist/{chunk-J7Y3PCO2.js → chunk-DTQPDMHG.js} +2 -1
  39. package/dist/{chunk-6LO62EQ5.js → chunk-F36EKGMP.js} +712 -249
  40. package/dist/{chunk-HIN4BMRW.js → chunk-FIUUESD4.js} +5 -5
  41. package/dist/{chunk-XLOM2BNL.js → chunk-FOSYM7TQ.js} +1 -1
  42. package/dist/{chunk-LCOQN6NR.js → chunk-FWKQHKCR.js} +4 -4
  43. package/dist/{chunk-IP7BIBXJ.js → chunk-FWSVWPMS.js} +16 -7
  44. package/dist/{chunk-GD6KIHOS.js → chunk-G35Y4LN5.js} +5 -2
  45. package/dist/{chunk-LSXHTBAM.js → chunk-GBGJGYEE.js} +7 -7
  46. package/dist/{chunk-Q42K6XZ6.js → chunk-H23JP73I.js} +1 -1
  47. package/dist/{chunk-WLMAGMTU.js → chunk-H2NJG3TE.js} +4 -3
  48. package/dist/{chunk-4CTVN3C5.js → chunk-HRBSEXYC.js} +5 -5
  49. package/dist/{chunk-T5Z22NA6.js → chunk-HRHWA6TZ.js} +1 -1
  50. package/dist/chunk-HTRDL42C.js +45 -0
  51. package/dist/{chunk-WNYH42PF.js → chunk-HZVS4MGL.js} +7 -7
  52. package/dist/{chunk-YBAVN6WS.js → chunk-I4DM7SNX.js} +7 -7
  53. package/dist/{chunk-CKPQOQFC.js → chunk-I6U6QPN6.js} +769 -101
  54. package/dist/{chunk-QJDX6VJS.js → chunk-IX6CFXSW.js} +10 -9
  55. package/dist/{chunk-FIO6PIZ6.js → chunk-J2OMKFYB.js} +3 -3
  56. package/dist/{chunk-C3JWWPLC.js → chunk-J6HWRVN2.js} +10 -8
  57. package/dist/{chunk-PT34C6SU.js → chunk-J6VC3JCG.js} +1 -1
  58. package/dist/{chunk-I6FRCBMU.js → chunk-JBPVEXHQ.js} +8 -8
  59. package/dist/{chunk-EBIYRRJW.js → chunk-JVHWWJ2J.js} +80 -94
  60. package/dist/{chunk-LYFLUNWK.js → chunk-KN3TDNF7.js} +7 -7
  61. package/dist/{chunk-RPZIHELI.js → chunk-LHHDX7FB.js} +5 -5
  62. package/dist/{chunk-FUJUFLDC.js → chunk-LO4CK734.js} +8 -14
  63. package/dist/chunk-LSLK4RS4.js +82 -0
  64. package/dist/{chunk-I626B72C.js → chunk-LSZUTI6O.js} +1 -1
  65. package/dist/{chunk-JVCQZDQ6.js → chunk-LZS5EYZ6.js} +1 -1
  66. package/dist/{chunk-OYKAOHX5.js → chunk-M4HH2F64.js} +6 -6
  67. package/dist/{chunk-CVGQ3BNF.js → chunk-ML5YKV3B.js} +1 -1
  68. package/dist/{chunk-H2FFONRY.js → chunk-MVPOYQQY.js} +1 -1
  69. package/dist/{chunk-JXXHLQQR.js → chunk-NMBXA3AT.js} +3 -3
  70. package/dist/{chunk-VRQM4A64.js → chunk-PBGNX3PS.js} +1 -1
  71. package/dist/{chunk-CJJDJ7AT.js → chunk-PIZA7OG2.js} +5 -3
  72. package/dist/{chunk-L2BA2HXM.js → chunk-PN4LWT5F.js} +1 -1
  73. package/dist/{chunk-TYCZVJTB.js → chunk-PSQEGJPN.js} +5 -5
  74. package/dist/{chunk-EUDG754F.js → chunk-SBZ545DH.js} +2 -2
  75. package/dist/{chunk-5FND4PIU.js → chunk-T2KBHW6P.js} +3 -3
  76. package/dist/chunk-T5QBWM6M.js +113 -0
  77. package/dist/{chunk-XABJMU5A.js → chunk-UCMIS74X.js} +2 -2
  78. package/dist/{chunk-564Q2STF.js → chunk-VKKKVYA4.js} +1 -1
  79. package/dist/{chunk-AAGU5FJF.js → chunk-WGC7UFRM.js} +1 -1
  80. package/dist/{chunk-XAOIHYPS.js → chunk-WVAXJOWG.js} +5 -4
  81. package/dist/{chunk-AYLYAOHH.js → chunk-XIDDJSQU.js} +3 -2
  82. package/dist/{chunk-OZOATEK3.js → chunk-Y2P3HWUG.js} +6 -6
  83. package/dist/{chunk-PKO5IDW4.js → chunk-Y5S2G2EZ.js} +7 -7
  84. package/dist/{chunk-WQB3XOEP.js → chunk-Z3MB7SV7.js} +6 -6
  85. package/dist/{chunk-XE3DIJJT.js → chunk-Z66CKWOM.js} +1 -1
  86. package/dist/chunk-ZHQC43NH.js +130 -0
  87. package/dist/{chunk-3FSKTGM6.js → chunk-ZSRMJOAK.js} +3 -3
  88. package/dist/{claude-launcher-LXZPTDNC.js → claude-launcher-NJGZUB3P.js} +82 -108
  89. package/dist/{cli-QFUT3UQS.js → cli-POIDBCZA.js} +323 -293
  90. package/dist/{command-45RZT4CK.js → command-ZLBFX553.js} +55 -53
  91. package/dist/config-GKSSGMXD.js +21 -0
  92. package/dist/{connect-cmd-LUCQ7FSV.js → connect-cmd-6YKNFJJR.js} +12 -10
  93. package/dist/{container-start-T776VI3M.js → container-start-55QELXPJ.js} +53 -51
  94. package/dist/{context-cleanup-QE2MIO2Q.js → context-cleanup-3K2AOECJ.js} +4 -2
  95. package/dist/{context-show-cmd-7QEHUOEL.js → context-show-cmd-FGMRJ7IG.js} +13 -11
  96. package/dist/{control-plane-launch-THUH6YU5.js → control-plane-launch-DGPA3ONU.js} +25 -21
  97. package/dist/{demo-record-cmd-SBERRQNW.js → demo-record-cmd-2OKCGST7.js} +7 -5
  98. package/dist/{demo-voice-cmd-VM3FITZU.js → demo-voice-cmd-BPTSL7JA.js} +24 -22
  99. package/dist/{dist-6KGTCWKR.js → dist-VVZIGSAF.js} +1 -1
  100. package/dist/{docker-MQNLK4OO.js → docker-GFEEV42Z.js} +10 -8
  101. package/dist/{doctor-NQOSPJGS.js → doctor-ZOQSI3HL.js} +55 -53
  102. package/dist/emit-artifact-cmd-3LDJ4VRW.js +43 -0
  103. package/dist/{emit-cmd-ZPFCPVSR.js → emit-cmd-RO4L4PFZ.js} +7 -5
  104. package/dist/emit-criteria-cmd-V3ERJXHB.js +34 -0
  105. package/dist/{emit-demo-cmd-PMQGNNVX.js → emit-demo-cmd-5KL64L74.js} +24 -22
  106. package/dist/{emit-finding-cmd-MYWQN5WW.js → emit-finding-cmd-R4OEWQQR.js} +17 -15
  107. package/dist/{emit-result-cmd-GXK3KMAP.js → emit-result-cmd-5YNQDTYG.js} +22 -20
  108. package/dist/{emit-step-cmd-ZV2XTUVT.js → emit-step-cmd-Z5WC7UEQ.js} +17 -15
  109. package/dist/{exec-client-P7RFRUCK.js → exec-client-54XKNPTI.js} +7 -5
  110. package/dist/find-unit-OI56YEX5.js +23 -0
  111. package/dist/{findings-cmd-OGMBVVSM.js → findings-cmd-J5ZCY2AT.js} +17 -15
  112. package/dist/{fleet-readiness-4RBKLXBQ.js → fleet-readiness-DKCFOUYP.js} +13 -11
  113. package/dist/{governing-source-XJMXFSAR.js → governing-source-7PD4ISRN.js} +21 -19
  114. package/dist/{guest-init-XZHRPIMG.js → guest-init-5QZRGP62.js} +8 -6
  115. package/dist/{hook-fast-ZOWGWCPO.js → hook-fast-ICT2PRQX.js} +4 -2
  116. package/dist/{pending-YU2GE2UV.js → hook-install-GDNRMML4.js} +5 -5
  117. package/dist/{hook-wrap-fast-545QJSBJ.js → hook-wrap-fast-LWWKKPGK.js} +4 -2
  118. package/dist/host-checks-GADKYJFN.js +78 -0
  119. package/dist/host-key-FI6KWMJC.js +16 -0
  120. package/dist/{image-tag-E4JK2APF.js → image-tag-RX4WTHJH.js} +7 -5
  121. package/dist/index.js +8 -9
  122. package/dist/{init-LO6U7YTW.js → init-BZXVQO22.js} +51 -49
  123. package/dist/init-EKF4ILHF.js +78 -0
  124. package/dist/{init-cmd-2JANO5EN.js → init-cmd-3LWFEKHD.js} +35 -29
  125. package/dist/{init-update-D6PRTGNE.js → init-update-THEHC25C.js} +24 -22
  126. package/dist/{install-cmd-SJMBNQEH.js → install-cmd-WBVTTE5Z.js} +9 -7
  127. package/dist/{layout-AQHIMJMO.js → layout-7XMC7S6K.js} +4 -2
  128. package/dist/{logs-NE55HOET.js → logs-7YIXBO2K.js} +6 -4
  129. package/dist/loop-RUQQ4L5A.js +89 -0
  130. package/dist/machine-IGHZW3IO.js +78 -0
  131. package/dist/{machine-skills-KK2HXYMR.js → machine-skills-HR4RNRNR.js} +4 -2
  132. package/dist/{mcp-install-cmd-2QAS3AQZ.js → mcp-install-cmd-SMPLT43Q.js} +4 -2
  133. package/dist/{mcp-serve-cmd-U6USKHYR.js → mcp-serve-cmd-HLS24XCG.js} +8 -6
  134. package/dist/{paths-O7LCWY33.js → paths-2YTU4QIO.js} +6 -4
  135. package/dist/pending-S2SKIBCB.js +16 -0
  136. package/dist/{pidfile-5GDCQ5HA.js → pidfile-SPBTMTCJ.js} +7 -5
  137. package/dist/{record-NETSDAO6.js → record-3KXRFK5C.js} +7 -5
  138. package/dist/{relay-VZ733BVJ.js → relay-I2T43PPB.js} +4 -2
  139. package/dist/{relay-protocol-24GEUGCO.js → relay-protocol-GI2GC2AM.js} +4 -2
  140. package/dist/runner-env-HOWRS6I6.js +23 -0
  141. package/dist/{runner-identity-PSCZBILD.js → runner-identity-32MTGA2F.js} +10 -8
  142. package/dist/{runner-key-VM2LYVRK.js → runner-key-FXYWHMMO.js} +51 -49
  143. package/dist/{session-sender-P2RHDM6U.js → session-sender-B6INUY7G.js} +23 -21
  144. package/dist/{shell-function-NRD4KVUK.js → shell-function-GYD2ZQQG.js} +2 -1
  145. package/dist/{spec-cmd-LGKP6MT7.js → spec-cmd-ZEZFMC4A.js} +18 -16
  146. package/dist/{starter-pack-SMK6UPRL.js → starter-pack-IMKIUA56.js} +5 -3
  147. package/dist/state-DVKFUWB3.js +16 -0
  148. package/dist/{status-HEHCNIDS.js → status-VPFIIHOZ.js} +51 -49
  149. package/dist/{statusline-fast-E7RWVREA.js → statusline-fast-NUVHCNRX.js} +4 -2
  150. package/dist/{sync-cmd-HKN45HXL.js → sync-cmd-W756BQWX.js} +22 -20
  151. package/dist/update-steps-D6L6AG6E.js +79 -0
  152. package/dist/{watch-RGZCUCR3.js → watch-6EDRJZMG.js} +22 -20
  153. package/dist/{work-claim-cmd-6DSPGCZE.js → work-claim-cmd-7HR4AVCT.js} +22 -20
  154. package/dist/{work-cmd-GPLYLWY7.js → work-cmd-ZP4UIHBT.js} +15 -13
  155. package/dist/{work-comment-cmd-V5WM7LAW.js → work-comment-cmd-CYDOEMW3.js} +18 -16
  156. package/dist/{work-demo-cmd-SWWI6AGD.js → work-demo-cmd-3A7Z3VVS.js} +15 -13
  157. package/dist/{work-launch-TTGSHLY4.js → work-launch-LWDQXLGI.js} +1 -1
  158. package/dist/{work-logs-cmd-CTFBOPCI.js → work-logs-cmd-NDPSRSCM.js} +15 -13
  159. package/dist/{work-open-pr-cmd-HX2U3YBR.js → work-open-pr-cmd-Z5B3ERAU.js} +17 -15
  160. package/dist/{work-pr-cmd-EI2R4FQG.js → work-pr-cmd-ZVPGCDWD.js} +16 -14
  161. package/dist/{work-proofs-cmd-QXNPHLYC.js → work-proofs-cmd-VAXJ5UBF.js} +18 -16
  162. package/dist/{work-proofs-record-72OKWEES.js → work-proofs-record-K467JH24.js} +28 -26
  163. package/dist/{work-stop-cmd-7M7ZYUN2.js → work-stop-cmd-J45Q2QT7.js} +15 -13
  164. package/package.json +3 -3
  165. package/dist/agent-setup-AOB76EDJ.js +0 -37
  166. package/dist/caller-GOY2X6QT.js +0 -20
  167. package/dist/chunk-KYDEBGJG.js +0 -402
  168. package/dist/config-WYQPXLOP.js +0 -19
  169. package/dist/emit-artifact-cmd-6E365VBQ.js +0 -41
  170. package/dist/emit-criteria-cmd-HWQOYZZ4.js +0 -32
  171. package/dist/find-unit-63SXQ7IM.js +0 -21
  172. package/dist/host-checks-WHW24PJR.js +0 -76
  173. package/dist/host-key-MWLXB5U5.js +0 -14
  174. package/dist/init-EZIAHBMH.js +0 -76
  175. package/dist/loop-2E34CGCX.js +0 -87
  176. package/dist/machine-6ALGG4IO.js +0 -76
  177. package/dist/runner-env-KHCONH2R.js +0 -21
  178. package/dist/settings-XB2HYBKO.js +0 -7
  179. package/dist/state-RJR4PMMX.js +0 -14
  180. package/dist/update-steps-7E4RD47J.js +0 -77
@@ -1,43 +1,47 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';
3
- import { gatherDoctorChecks, doctorExitCode, summarizeChecks, renderDoctorText, recordWrapped, recordUnwrapped, recordRemoval, readManifest, recordInstall, recordStatusline } from './chunk-GDZTL6BI.js';
4
- import './chunk-RPZIHELI.js';
5
- import './chunk-H2FFONRY.js';
6
- import './chunk-XHFSBSIA.js';
7
- import { verifiedTrackerNames, TRACKERS } from './chunk-QJDX6VJS.js';
8
- import './chunk-IP7BIBXJ.js';
9
- import './chunk-5FND4PIU.js';
10
- import './chunk-4CTVN3C5.js';
3
+ import { gatherDoctorChecks, doctorExitCode, summarizeChecks, renderDoctorText, recordWrapped, recordUnwrapped, recordRemoval, readManifest, recordInstall, recordStatusline } from './chunk-A2U7T4ZH.js';
4
+ import './chunk-LHHDX7FB.js';
5
+ import './chunk-Z3MB7SV7.js';
6
+ import './chunk-MVPOYQQY.js';
7
+ import './chunk-B5SWBFVE.js';
8
+ import { verifiedTrackerNames, TRACKERS } from './chunk-IX6CFXSW.js';
9
+ import './chunk-FWSVWPMS.js';
10
+ import './chunk-T2KBHW6P.js';
11
+ import './chunk-HRBSEXYC.js';
12
+ import './chunk-P6PHY33P.js';
13
+ import './chunk-6KH3NMIT.js';
14
+ import { FIRST_VERSION_READING_AGENTS_SKILLS } from './chunk-D6EXW4EB.js';
11
15
  import './chunk-TPMLB3VZ.js';
12
16
  import './chunk-A2LHHKTT.js';
13
17
  import { C, warnDeprecated, API_KEY_FLAG_DEPRECATION, NO_COLOR_FLAG, stripNoColor } from './chunk-2AM6Z5BP.js';
14
- import './chunk-WQB3XOEP.js';
15
- import './chunk-P6PHY33P.js';
16
- import { FIRST_VERSION_READING_AGENTS_SKILLS } from './chunk-WDQPBAFV.js';
17
- import './chunk-GZ75FRLB.js';
18
- import './chunk-JVCQZDQ6.js';
18
+ import './chunk-B36NSEUM.js';
19
+ import './chunk-LZS5EYZ6.js';
19
20
  import './chunk-HWVMRETT.js';
20
- import './chunk-6JJITHBI.js';
21
- import { hookFiredMarkerPath, installedCliDistDir } from './chunk-EBIYRRJW.js';
21
+ import './chunk-42DBDDHP.js';
22
+ import { hookFiredMarkerPath, installedCliDistDir } from './chunk-JVHWWJ2J.js';
22
23
  import './chunk-545P7JY7.js';
23
- import './chunk-YBAVN6WS.js';
24
+ import './chunk-I4DM7SNX.js';
24
25
  import './chunk-BKO6JEZI.js';
25
- import './chunk-NC3QAHOS.js';
26
+ import './chunk-4DLJ343I.js';
27
+ import './chunk-BSPJI5T7.js';
26
28
  import { findGitDirs } from './chunk-BJ3KTMDH.js';
27
- import './chunk-I626B72C.js';
28
- import './chunk-5GHJFETA.js';
29
+ import './chunk-LSZUTI6O.js';
29
30
  import './chunk-NFZMENCY.js';
30
31
  import { parseTrackerNumber, trackerNumberError } from './chunk-WZBHBH3J.js';
31
32
  import { cliInvocation, packageRunnerOf } from './chunk-FZKNTIOJ.js';
32
- import { settingsPath, readSettings, SettingsParseError, listHookCandidates, PORTABLE_BIN, wrapHooks, writeSettings, unwrapHooks, REGISTERED_EVENTS, removeHooks, removeStatusline, cliBinResolvable, mergeHooks, repointWrappedHooks, AUTO_WRAP_EVENTS, mergeStatusline } from './chunk-KYDEBGJG.js';
33
- import './chunk-VRQM4A64.js';
33
+ import { installAgents, settingsFileOf, withSettingsText } from './chunk-HTRDL42C.js';
34
+ import { cliForInstall, SettingsParseError, PORTABLE_BIN, writeSettingsText, cliBinResolvable } from './chunk-ZHQC43NH.js';
35
+ import './chunk-PBGNX3PS.js';
34
36
  import { cloneIsGoverned } from './chunk-YQR6E6OV.js';
35
37
  import { removeJournalHooks, removePreCommitGuardHook } from './chunk-CJPTUU2E.js';
36
- import './chunk-GD6KIHOS.js';
37
- import './chunk-M2NIHHQI.js';
38
- import './chunk-J7Y3PCO2.js';
39
- import './chunk-CKPQOQFC.js';
38
+ import './chunk-G35Y4LN5.js';
39
+ import './chunk-CXJC3JLN.js';
40
+ import './chunk-DTQPDMHG.js';
41
+ import { defaultAgents, legacyAgent } from './chunk-I6U6QPN6.js';
40
42
  import './chunk-WUKLQWGY.js';
43
+ import './chunk-T5QBWM6M.js';
44
+ import './chunk-LSLK4RS4.js';
41
45
  import './chunk-CDDED64E.js';
42
46
  import { resolveVersion, resolvePackageVersion } from './chunk-RA3O54FC.js';
43
47
  import { homeFromEnv } from './chunk-352DHUTP.js';
@@ -3485,21 +3489,34 @@ function installCliCopy(opts) {
3485
3489
  }
3486
3490
  function runInit(opts) {
3487
3491
  const scope = opts.scope ?? "user";
3488
- const path2 = settingsPath(scope, { home: opts.home, cwd: opts.cwd });
3489
- const current = readSettings(path2);
3492
+ const list = opts.agents ?? defaultAgents();
3493
+ const [first, ...rest] = installAgents(list);
3494
+ if (first === void 0 || first.entry.descriptor.id !== legacyAgent(list).descriptor.id) throw new Error("the legacy agent has no hook settings");
3495
+ const where = { home: opts.home ?? homeFromEnv(), cwd: opts.cwd ?? process.cwd() };
3496
+ const path2 = first.install.settingsFile(scope, where);
3497
+ const cli = cliForInstall(opts.cliBin);
3490
3498
  const manifestHome = opts.home ?? homeFromEnv();
3491
3499
  if (opts.remove) {
3492
- const hooksRemoved = removeHooks(current, opts.cliBin);
3493
- const hooksUnwrapped = unwrapHooks(hooksRemoved.next, opts.cliBin);
3494
- const statuslineRemoved = removeStatusline(hooksUnwrapped.next, opts.cliBin);
3495
- const changed2 = hooksRemoved.changed || hooksUnwrapped.changed || statuslineRemoved.changed;
3496
- const backupPath2 = changed2 ? writeSettings(path2, statuslineRemoved.next) : void 0;
3500
+ const result = withSettingsText(path2, (text) => first.install.remove(text, cli));
3501
+ const otherResults = rest.map((agent) => {
3502
+ const file = agent.install.settingsFile(scope, where);
3503
+ return { agent, file, result: withSettingsText(file, (text) => agent.install.remove(text, cli)) };
3504
+ });
3505
+ const backupPath2 = result.changed ? writeSettingsText(path2, result.text) : void 0;
3506
+ const others2 = otherResults.map(({ agent, file, result: removed }) => ({
3507
+ agent: agent.entry.descriptor.id,
3508
+ path: file,
3509
+ changed: removed.changed,
3510
+ backupPath: removed.changed ? writeSettingsText(file, removed.text) : void 0,
3511
+ events: agent.events,
3512
+ removed: true
3513
+ }));
3497
3514
  const gitHookRemoval2 = removeJournalHooks(opts.cwd ?? process.cwd());
3498
3515
  const guardHookRemoval = removePreCommitGuardHook(opts.cwd ?? process.cwd());
3499
- recordRemoval(manifestHome, path2);
3516
+ for (const file of [path2, ...others2.map((other) => other.path)]) recordRemoval(manifestHome, file);
3500
3517
  const remaining = readManifest(manifestHome);
3501
3518
  if (!remaining || Object.keys(remaining.installs).length === 0) {
3502
- for (const event of REGISTERED_EVENTS) {
3519
+ for (const event of new Set([first, ...rest].flatMap((agent) => agent.events))) {
3503
3520
  try {
3504
3521
  unlinkSync(hookFiredMarkerPath(event, manifestHome));
3505
3522
  } catch {
@@ -3508,49 +3525,30 @@ function runInit(opts) {
3508
3525
  }
3509
3526
  return {
3510
3527
  path: path2,
3511
- changed: changed2,
3528
+ changed: result.changed,
3512
3529
  backupPath: backupPath2,
3513
- events: REGISTERED_EVENTS,
3530
+ events: first.events,
3514
3531
  removed: true,
3515
3532
  gitHookRemoved: gitHookRemoval2.removed,
3516
3533
  guardHookRemoved: guardHookRemoval.removed,
3517
3534
  wrapped: [],
3518
- unwrappedCount: hooksUnwrapped.unwrapped,
3519
- ...statuslineRemoved.restoredCommand ? { statuslineWrappedCommand: statuslineRemoved.restoredCommand } : {}
3535
+ unwrappedCount: result.unwrapped,
3536
+ ...result.restoredStatusline ? { statuslineWrappedCommand: result.restoredStatusline } : {},
3537
+ ...others2.length > 0 ? { others: others2 } : {}
3520
3538
  };
3521
3539
  }
3540
+ const options = { wrap: opts.wrapHooks ?? true, statusline: opts.statusline ?? true };
3541
+ const installed = withSettingsText(path2, (text) => first.install.install(text, cli, options));
3522
3542
  if (!cliBinResolvable(opts.cliBin)) {
3523
- return { path: path2, changed: false, events: REGISTERED_EVENTS, wrapped: [], cliBinUnresolved: true };
3524
- }
3525
- const merged = mergeHooks(current, opts.cliBin);
3526
- const repointed = repointWrappedHooks(merged.next, opts.cliBin);
3527
- let next = repointed.next;
3528
- let changed = merged.changed || repointed.changed;
3529
- let wrapped = [];
3530
- if (opts.wrapHooks ?? true) {
3531
- const wrapResult = wrapHooks(next, opts.cliBin, { events: [...AUTO_WRAP_EVENTS] });
3532
- if (wrapResult.changed) {
3533
- next = wrapResult.next;
3534
- changed = true;
3535
- wrapped = wrapResult.wrapped;
3536
- }
3537
- }
3538
- let statusline;
3539
- let statuslineWrappedCommand;
3540
- if (opts.statusline ?? true) {
3541
- const slotResult = mergeStatusline(next, opts.cliBin);
3542
- statusline = slotResult.outcome;
3543
- statuslineWrappedCommand = slotResult.wrappedCommand;
3544
- if (slotResult.changed) {
3545
- next = slotResult.next;
3546
- changed = true;
3547
- }
3548
- }
3549
- const backupPath = changed ? writeSettings(path2, next) : void 0;
3550
- recordInstall(manifestHome, path2, { cliBin: opts.cliBin, events: REGISTERED_EVENTS });
3551
- recordWrapped(manifestHome, path2, wrapped.map((c) => ({ event: c.event, original: c.command })));
3543
+ return { path: path2, changed: false, events: first.events, wrapped: [], cliBinUnresolved: true };
3544
+ }
3545
+ const others = rest.map((agent) => installOther(agent, scope, where, cli, options, opts.cliBin, manifestHome));
3546
+ const backupPath = installed.changed ? writeSettingsText(path2, installed.text) : void 0;
3547
+ recordInstall(manifestHome, path2, { cliBin: opts.cliBin, events: [...first.events] });
3548
+ recordWrapped(manifestHome, path2, installed.wrapped.map((c) => ({ event: c.event, original: c.command })));
3549
+ const statusline = installed.statusline;
3552
3550
  if (statusline && statusline !== "skipped") {
3553
- recordStatusline(manifestHome, path2, statuslineWrappedCommand !== void 0 ? "wrapped" : "installed", statuslineWrappedCommand);
3551
+ recordStatusline(manifestHome, path2, installed.statuslineWrappedCommand !== void 0 ? "wrapped" : "installed", installed.statuslineWrappedCommand);
3554
3552
  }
3555
3553
  const gitHookRemoval = removeJournalHooks(opts.cwd ?? process.cwd());
3556
3554
  let gitignoreUpdated = false;
@@ -3559,16 +3557,25 @@ function runInit(opts) {
3559
3557
  }
3560
3558
  return {
3561
3559
  path: path2,
3562
- changed,
3560
+ changed: installed.changed,
3563
3561
  backupPath,
3564
- events: REGISTERED_EVENTS,
3562
+ events: first.events,
3565
3563
  gitignoreUpdated,
3566
3564
  ...gitHookRemoval.removed ? { gitHookRemoved: true } : {},
3567
- wrapped,
3565
+ wrapped: installed.wrapped,
3568
3566
  ...statusline ? { statusline } : {},
3569
- ...statuslineWrappedCommand ? { statuslineWrappedCommand } : {}
3567
+ ...installed.statuslineWrappedCommand ? { statuslineWrappedCommand: installed.statuslineWrappedCommand } : {},
3568
+ ...others.length > 0 ? { others } : {}
3570
3569
  };
3571
3570
  }
3571
+ function installOther(agent, scope, where, cli, options, cliBin, manifestHome) {
3572
+ const file = agent.install.settingsFile(scope, where);
3573
+ const installed = withSettingsText(file, (text) => agent.install.install(text, cli, options));
3574
+ const backupPath = installed.changed ? writeSettingsText(file, installed.text) : void 0;
3575
+ recordInstall(manifestHome, file, { cliBin, events: [...agent.events] });
3576
+ recordWrapped(manifestHome, file, installed.wrapped.map((c) => ({ event: c.event, original: c.command })));
3577
+ return { agent: agent.entry.descriptor.id, path: file, changed: installed.changed, backupPath, events: agent.events };
3578
+ }
3572
3579
  function tracksOwnOuterlayerDir(cwd) {
3573
3580
  try {
3574
3581
  const out = execFileSync("git", ["-C", cwd, "ls-files", "--", ".outerlayer"], {
@@ -3601,22 +3608,16 @@ function ensureGitignore(cwd) {
3601
3608
  `);
3602
3609
  return true;
3603
3610
  }
3604
- function orgRolloutSnippet() {
3605
- const hooks = {};
3606
- for (const event of REGISTERED_EVENTS) {
3607
- hooks[event] = [{ hooks: [{ type: "command", command: `${PORTABLE_BIN} hook ${event}` }] }];
3608
- }
3609
- const managed = JSON.stringify({ hooks }, null, 2);
3611
+ function orgRolloutSnippet(agents = defaultAgents()) {
3612
+ const { install } = installAgents(agents)[0];
3613
+ const managed = JSON.stringify(install.managedSettings.document((event) => `${PORTABLE_BIN} hook ${event}`), null, 2);
3610
3614
  return [
3611
3615
  "# Org-wide rollout (managed settings)",
3612
3616
  "",
3613
3617
  "Deploy this managed-settings.json to every developer machine via MDM/GPO.",
3614
3618
  "It cannot be overridden by users, guaranteeing fleet-wide capture.",
3615
3619
  "",
3616
- " macOS (MDM): /Library/Application Support/ClaudeCode/managed-settings.json",
3617
- " (domain com.anthropic.claudecode)",
3618
- " Linux: /etc/claude-code/managed-settings.json",
3619
- " Windows (GPO): HKLM\\SOFTWARE\\Policies\\ClaudeCode, as a REG_SZ value named Settings",
3620
+ ...install.managedSettings.locations,
3620
3621
  "",
3621
3622
  "managed-settings.json:",
3622
3623
  managed,
@@ -3657,14 +3658,14 @@ function apiKeyOption() {
3657
3658
  return new Option("--api-key <key>", `deprecated: use \`${cliInvocation()} login\` or OUTERLAYER_API_KEY`).hideHelp();
3658
3659
  }
3659
3660
  async function installStarterPackInRepo() {
3660
- const { installStarterPack, formatStarterPackOutput } = await import('./starter-pack-SMK6UPRL.js');
3661
+ const { installStarterPack, formatStarterPackOutput } = await import('./starter-pack-IMKIUA56.js');
3661
3662
  const cwd = process.cwd();
3662
3663
  let repoRoot = cwd;
3663
3664
  try {
3664
3665
  repoRoot = execFileSync("git", ["rev-parse", "--show-toplevel"], { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim() || cwd;
3665
3666
  } catch {
3666
3667
  }
3667
- const { declareAgentsMdLayout, isAgentsMdLayout, skillsBaseFor } = await import('./layout-AQHIMJMO.js');
3668
+ const { declareAgentsMdLayout, isAgentsMdLayout, skillsBaseFor } = await import('./layout-7XMC7S6K.js');
3668
3669
  const fresh = !isAgentsMdLayout(repoRoot) && !existsSync(join(repoRoot, ".outerlayer/skills")) && !existsSync(join(repoRoot, ".outerlayer/AGENTS.md"));
3669
3670
  const result = installStarterPack({ repoRoot, base: fresh ? ".agents/skills" : skillsBaseFor(repoRoot) });
3670
3671
  if (fresh) declareAgentsMdLayout(repoRoot);
@@ -3687,6 +3688,14 @@ ${C.dim} backup: ${result.backupPath}${C.reset}` : ""}
3687
3688
  lines.push(`${C.green}\u2713${C.reset} Restored status line to: ${C.dim}${result.statuslineWrappedCommand}${C.reset}
3688
3689
  `);
3689
3690
  }
3691
+ for (const other of result.others ?? []) {
3692
+ lines.push(
3693
+ other.changed ? `${C.green}\u2713${C.reset} Removed OuterLayer hooks from ${other.path}${other.backupPath ? `
3694
+ ${C.dim} backup: ${other.backupPath}${C.reset}` : ""}
3695
+ ` : `${C.dim}No OuterLayer hooks to remove in ${other.path}${C.reset}
3696
+ `
3697
+ );
3698
+ }
3690
3699
  return lines.join("");
3691
3700
  }
3692
3701
  if (!result.changed) {
@@ -3699,6 +3708,14 @@ ${C.dim} backup: ${result.backupPath}${C.reset}` : ""}
3699
3708
  ` : "")
3700
3709
  );
3701
3710
  }
3711
+ for (const other of result.others ?? []) {
3712
+ lines.push(
3713
+ other.changed ? `${C.green}\u2713${C.reset} Installed ${other.events.join(", ")} hooks \u2192 ${other.path}
3714
+ ` + (other.backupPath ? `${C.dim} backup: ${other.backupPath}${C.reset}
3715
+ ` : "") : `${C.green}\u2713${C.reset} Hooks already installed in ${other.path} (no change)
3716
+ `
3717
+ );
3718
+ }
3702
3719
  if (result.wrapped.length > 0) {
3703
3720
  lines.push(
3704
3721
  `${C.green}\u2713${C.reset} Auto-wrapped ${result.wrapped.length} hook(s) for execution evidence (adds one spawn per firing \u2014 see ${C.yellow}${cliInvocation()} hooks unwrap${C.reset} to undo):
@@ -3790,7 +3807,7 @@ ${starter.output}`),
3790
3807
  }
3791
3808
  }
3792
3809
  async function installMachineSkillsForSetup() {
3793
- const { setupMachineSkills } = await import('./machine-skills-KK2HXYMR.js');
3810
+ const { setupMachineSkills } = await import('./machine-skills-HR4RNRNR.js');
3794
3811
  const result = setupMachineSkills(homeFromEnv());
3795
3812
  for (const failure of result.failures) process.stderr.write(`${C.yellow}!${C.reset} Could not write a maintained skill: ${failure}
3796
3813
  `);
@@ -3798,8 +3815,8 @@ async function installMachineSkillsForSetup() {
3798
3815
  ` : "";
3799
3816
  }
3800
3817
  async function realConnectDepsForCwd() {
3801
- const { realConnectDeps } = await import('./connect-cmd-LUCQ7FSV.js');
3802
- const { resolveRepoIdentity } = await import('./dist-6KGTCWKR.js');
3818
+ const { realConnectDeps } = await import('./connect-cmd-6YKNFJJR.js');
3819
+ const { resolveRepoIdentity } = await import('./dist-VVZIGSAF.js');
3803
3820
  return {
3804
3821
  ...realConnectDeps(),
3805
3822
  home: homeFromEnv(),
@@ -3816,7 +3833,7 @@ function buildProgram(argv = process.argv) {
3816
3833
  const program2 = new Command();
3817
3834
  program2.name(cliInvocation()).description("OuterLayer \u2014 see what your coding agents actually do").enablePositionalOptions().version(resolveVersion()).hook("preAction", async (_root, command) => {
3818
3835
  if (command.opts().apiKey !== void 0) warnDeprecated(API_KEY_FLAG_DEPRECATION);
3819
- const { machineRefreshSkipped, refreshMachineSkills } = await import('./machine-skills-KK2HXYMR.js');
3836
+ const { machineRefreshSkipped, refreshMachineSkills } = await import('./machine-skills-HR4RNRNR.js');
3820
3837
  const names = [];
3821
3838
  for (let at = command; at?.parent; at = at.parent) names.push(at.name());
3822
3839
  if (!machineRefreshSkipped(names, command._hidden === true, argv)) refreshMachineSkills(homeFromEnv());
@@ -3873,8 +3890,8 @@ build, ../outerlayer-build/SKILL.md becomes ~/.agents/skills/outerlayer-build/SK
3873
3890
  what CLIs older than ${FIRST_VERSION_READING_AGENTS_SKILLS} do. \`` + cliInvocation() + " doctor` reports the same\nstates under Starter files.\n"
3874
3891
  ).action(async (opts) => {
3875
3892
  if (opts.update || opts.dryRun) {
3876
- const { runInitUpdateWithFleet, formatInitUpdate, updateFlagProblem } = await import('./init-update-D6PRTGNE.js');
3877
- const { fleetReadiness } = await import('./fleet-readiness-4RBKLXBQ.js');
3893
+ const { runInitUpdateWithFleet, formatInitUpdate, updateFlagProblem } = await import('./init-update-THEHC25C.js');
3894
+ const { fleetReadiness } = await import('./fleet-readiness-DKCFOUYP.js');
3878
3895
  const problem = updateFlagProblem(opts);
3879
3896
  if (problem !== void 0) {
3880
3897
  fail(problem);
@@ -3891,7 +3908,7 @@ what CLIs older than ${FIRST_VERSION_READING_AGENTS_SKILLS} do. \`` + cliInvocat
3891
3908
  }
3892
3909
  let starterTemplate;
3893
3910
  if (opts.template !== void 0) {
3894
- const { assertKnownTemplate, StarterPackError } = await import('./starter-pack-SMK6UPRL.js');
3911
+ const { assertKnownTemplate, StarterPackError } = await import('./starter-pack-IMKIUA56.js');
3895
3912
  try {
3896
3913
  assertKnownTemplate(opts.template);
3897
3914
  } catch (err) {
@@ -3920,18 +3937,18 @@ what CLIs older than ${FIRST_VERSION_READING_AGENTS_SKILLS} do. \`` + cliInvocat
3920
3937
  return;
3921
3938
  }
3922
3939
  if (opts.remove) {
3923
- const { removeShellFunction } = await import('./shell-function-NRD4KVUK.js');
3940
+ const { removeShellFunction } = await import('./shell-function-GYD2ZQQG.js');
3924
3941
  const changed = removeShellFunction({ home: homeFromEnv() });
3925
3942
  if (changed.length > 0 && !opts.json) process.stdout.write(`Removed the claude function from ${changed.join(", ")}.
3926
3943
  `);
3927
3944
  }
3928
- const shell = !opts.remove && opts.shellFunction !== void 0 ? (await import('./init-cmd-2JANO5EN.js')).applyShellFunctionFlag(opts.shellFunction, { home: homeFromEnv(), shellPath: process.env.SHELL }) : void 0;
3945
+ const shell = !opts.remove && opts.shellFunction !== void 0 ? (await import('./init-cmd-3LWFEKHD.js')).applyShellFunctionFlag(opts.shellFunction, { home: homeFromEnv(), shellPath: process.env.SHELL }) : void 0;
3929
3946
  if (opts.json) writeJson(shell === void 0 ? outcome.result : { ...outcome.result, shellFunction: { outcome: shell.outcome, reason: shell.reason } });
3930
3947
  else process.stdout.write(outcome.text + skillsLine + (shell?.text ?? ""));
3931
3948
  return;
3932
3949
  }
3933
3950
  await installMachineSkillsForSetup();
3934
- const { runInitCommand } = await import('./init-cmd-2JANO5EN.js');
3951
+ const { runInitCommand } = await import('./init-cmd-3LWFEKHD.js');
3935
3952
  const code = await runInitCommand(
3936
3953
  { json: opts.json, factory: opts.factory, shellFunction: opts.shellFunction },
3937
3954
  {
@@ -3943,7 +3960,7 @@ what CLIs older than ${FIRST_VERSION_READING_AGENTS_SKILLS} do. \`` + cliInvocat
3943
3960
  return { ok, text, detail };
3944
3961
  },
3945
3962
  runAgentSetup: async () => {
3946
- const { runAgentSetup } = await import('./agent-setup-AOB76EDJ.js');
3963
+ const { runAgentSetup } = await import('./agent-setup-5UWZZMZM.js');
3947
3964
  return runAgentSetup({ cwd: process.cwd(), skillsLink: opts.skillsLink !== false });
3948
3965
  },
3949
3966
  runDoctorChecks: gatherDoctorChecks,
@@ -3952,7 +3969,7 @@ what CLIs older than ${FIRST_VERSION_READING_AGENTS_SKILLS} do. \`` + cliInvocat
3952
3969
  shellPath: process.env.SHELL,
3953
3970
  interactive: Boolean(process.stdin.isTTY && process.stderr.isTTY) && opts.json !== true,
3954
3971
  ask: async () => {
3955
- const { promptOnTerminal } = await import('./connect-cmd-LUCQ7FSV.js');
3972
+ const { promptOnTerminal } = await import('./connect-cmd-6YKNFJJR.js');
3956
3973
  const answer = await promptOnTerminal({
3957
3974
  message: `Should plain claude start Claude Code through ${cliInvocation()} claude? That is how a session in a governed repository gets its control plane. It adds one block to your zsh or bash startup file.`,
3958
3975
  options: [
@@ -3991,7 +4008,7 @@ linked (true, false, or null when it could not be checked) and, when false,
3991
4008
  linkUrl.
3992
4009
  `
3993
4010
  ).action(async (opts) => {
3994
- const { runConnectCommand } = await import('./connect-cmd-LUCQ7FSV.js');
4011
+ const { runConnectCommand } = await import('./connect-cmd-6YKNFJJR.js');
3995
4012
  const code = await runConnectCommand({ factory: opts.factory, json: opts.json }, await realConnectDepsForCwd(), {
3996
4013
  stdout: process.stdout,
3997
4014
  stderr: process.stderr
@@ -4069,7 +4086,7 @@ code is 1: revoke the token on /profile/security.
4069
4086
  else fail(found.reason);
4070
4087
  return;
4071
4088
  }
4072
- const { runSync, SyncConfigError, SyncTransportError } = await import('./sync-cmd-HKN45HXL.js');
4089
+ const { runSync, SyncConfigError, SyncTransportError } = await import('./sync-cmd-W756BQWX.js');
4073
4090
  try {
4074
4091
  const result = await runSync({
4075
4092
  url: opts.url,
@@ -4098,7 +4115,7 @@ code is 1: revoke the token on /profile/security.
4098
4115
  if (invokedCommandToken(argv) === "watch") {
4099
4116
  warnDeprecated(`\`${cliInvocation()} watch\` is now \`${cliInvocation()} daemon\`; the old name will be removed in a future release.`);
4100
4117
  }
4101
- const { runWatch } = await import('./watch-RGZCUCR3.js');
4118
+ const { runWatch } = await import('./watch-6EDRJZMG.js');
4102
4119
  await runWatch({ once: opts.once });
4103
4120
  });
4104
4121
  program2.command("hook <event>", { hidden: true }).description("capture-hook fast path, installed by `init`").action(() => {
@@ -4107,11 +4124,14 @@ code is 1: revoke the token on /profile/security.
4107
4124
  });
4108
4125
  program2.command("hook-wrap", { hidden: true }).description("runs a hook wrapped by `hooks wrap`, recording exec evidence").option("--id <base64>", "the original hook command, base64-encoded").option("--capture-output", "tee stdout/stderr into a bounded tail").action(() => {
4109
4126
  });
4110
- program2.command("claude [args...]").description("start Claude Code with the repository's control plane attached").allowUnknownOption().helpOption(false).action(() => {
4111
- });
4127
+ for (const agent of defaultAgents()) {
4128
+ if (agent.adapter.launch === void 0) continue;
4129
+ program2.command(`${agent.descriptor.legacy?.subcommand ?? agent.descriptor.id} [args...]`).description(`start ${agent.descriptor.label} with the repository's control plane attached`).allowUnknownOption().helpOption(false).action(() => {
4130
+ });
4131
+ }
4112
4132
  const brokerRelay = program2.command("broker-relay", { hidden: true }).description("relay a build's loopback connections to the runner's tunnel and destinations").enablePositionalOptions().option("--port <port>", "the loopback port to listen on").option("--socket <path>", "the runner's tunnel socket").option("--join <path>", "the socket the runner's joining process connects to").option("--lease-watchdog", "exit when the runner's lease expiry passes; needs --join").option("--forward <port=target>", "also relay a loopback port to a destination; repeatable", (value, previous) => [...previous, value], []).action(async (opts) => {
4113
- const { startRelay, startSessionRelay } = await import('./relay-VZ733BVJ.js');
4114
- const { TARGET_TUNNEL, targetOfPath } = await import('./relay-protocol-24GEUGCO.js');
4133
+ const { startRelay, startSessionRelay } = await import('./relay-I2T43PPB.js');
4134
+ const { TARGET_TUNNEL, targetOfPath } = await import('./relay-protocol-GI2GC2AM.js');
4115
4135
  const port = Number(opts.port);
4116
4136
  if (!Number.isInteger(port) || port < 1 || port > 65535) {
4117
4137
  fail(opts.port === void 0 ? "--port is required" : `--port must be a port number, not ${opts.port}`);
@@ -4143,7 +4163,7 @@ code is 1: revoke the token on /profile/security.
4143
4163
  await startRelay({ port, socketPath: opts.socket, forwards: forwards.map((forward) => ({ port: forward.port, socketPath: forward.spec })) });
4144
4164
  });
4145
4165
  brokerRelay.command("join").description("carry the runner's session to the relay over standard input and output").option("--socket <path>", "the relay's joining socket", "/run/outerlayer-relay/join.sock").action(async (opts) => {
4146
- const { joinRelay } = await import('./relay-VZ733BVJ.js');
4166
+ const { joinRelay } = await import('./relay-I2T43PPB.js');
4147
4167
  try {
4148
4168
  await joinRelay({ socketPath: opts.socket, input: process.stdin, output: process.stdout });
4149
4169
  } catch (err) {
@@ -4159,7 +4179,7 @@ code is 1: revoke the token on /profile/security.
4159
4179
  }
4160
4180
  });
4161
4181
  program2.command("vm-exec", { hidden: true }).description("run a command in a microVM build's guest through its exec agent").requiredOption("--socket <path>", "the Unix socket Firecracker serves the build's vsock device on").option("--user <user>", "the user to run as", "").option("--cwd <dir>", "the working directory", "/").option("--env <NAME=value>", "an environment value the command line carries; repeatable", (value, previous) => [...previous, value], []).option("--pass <NAME>", "an environment variable whose value is read from this process; repeatable", (value, previous) => [...previous, value], []).argument("<argv...>", "the command and its arguments").action(async (argv2, opts) => {
4162
- const { runVmExec } = await import('./exec-client-P7RFRUCK.js');
4182
+ const { runVmExec } = await import('./exec-client-54XKNPTI.js');
4163
4183
  const env = {};
4164
4184
  for (const entry of opts.env) {
4165
4185
  const eq = entry.indexOf("=");
@@ -4188,7 +4208,7 @@ code is 1: revoke the token on /profile/security.
4188
4208
  process.exitCode = await runBuildCommand({ dir: opts.dir, argv: command });
4189
4209
  });
4190
4210
  program2.command("session-sender", { hidden: true }).description("stream a runner build's sessions to its work item while the build runs").action(async () => {
4191
- const { runSessionSender } = await import('./session-sender-P2RHDM6U.js');
4211
+ const { runSessionSender } = await import('./session-sender-B6INUY7G.js');
4192
4212
  try {
4193
4213
  await runSessionSender();
4194
4214
  } catch (err) {
@@ -4196,7 +4216,7 @@ code is 1: revoke the token on /profile/security.
4196
4216
  }
4197
4217
  });
4198
4218
  program2.command("vm-init", { hidden: true }).description("lay out a microVM build's guest; the guest helper runs it").action(async () => {
4199
- const { realGuestHost, runGuestInit } = await import('./guest-init-XZHRPIMG.js');
4219
+ const { realGuestHost, runGuestInit } = await import('./guest-init-5QZRGP62.js');
4200
4220
  const { readFileSync: readFileSync3 } = await import('fs');
4201
4221
  try {
4202
4222
  runGuestInit(realGuestHost(), readFileSync3("/proc/cmdline", "utf8"));
@@ -4205,7 +4225,7 @@ code is 1: revoke the token on /profile/security.
4205
4225
  }
4206
4226
  });
4207
4227
  program2.command("vm-forward", { hidden: true }).description("pipe a guest port to another; vm-init runs it").requiredOption("--listen <host:port>", "the address to listen on").requiredOption("--to <host:port>", "the address to pipe each connection to").action(async (opts) => {
4208
- const { startBridgeForward } = await import('./bridge-DFG2GTXQ.js');
4228
+ const { startBridgeForward } = await import('./bridge-4KPODDN7.js');
4209
4229
  try {
4210
4230
  await startBridgeForward(opts);
4211
4231
  } catch (err) {
@@ -4231,7 +4251,7 @@ async function runCli(processArgv) {
4231
4251
  await buildProgram(argv).parseAsync(argv);
4232
4252
  }
4233
4253
  async function compileContext(opts) {
4234
- const { runEmit, EmitError } = await import('./emit-cmd-ZPFCPVSR.js');
4254
+ const { runEmit, EmitError } = await import('./emit-cmd-RO4L4PFZ.js');
4235
4255
  try {
4236
4256
  const result = runEmit({ cwd: opts.dir, check: opts.check, json: opts.json });
4237
4257
  if (result.exitCode !== 0) process.exitCode = result.exitCode;
@@ -4284,7 +4304,7 @@ Compiling .outerlayer/ moved to \`${cliInvocation()} context emit\`.
4284
4304
  await compileContext({ dir: opts.dir, check: opts.check, json: opts.json });
4285
4305
  return;
4286
4306
  }
4287
- const { runEmitResult, EmitResultError } = await import('./emit-result-cmd-GXK3KMAP.js');
4307
+ const { runEmitResult, EmitResultError } = await import('./emit-result-cmd-5YNQDTYG.js');
4288
4308
  try {
4289
4309
  const result = await runEmitResult({
4290
4310
  name,
@@ -4335,7 +4355,7 @@ everywhere, bytes and deep link untouched; a still-queued one is cancelled
4335
4355
  locally so it never uploads. One correction can retire several duplicates.
4336
4356
  `
4337
4357
  ).action(async (file, opts) => {
4338
- const { runEmitArtifact, EmitArtifactError } = await import('./emit-artifact-cmd-6E365VBQ.js');
4358
+ const { runEmitArtifact, EmitArtifactError } = await import('./emit-artifact-cmd-3LDJ4VRW.js');
4339
4359
  let pr;
4340
4360
  if (opts.pr !== void 0) {
4341
4361
  pr = parseTrackerNumber(opts.pr);
@@ -4391,7 +4411,7 @@ its criterion, and the new record retires the old record. The id must be the ite
4391
4411
  as \`work demo --item <n> --json\` prints it.
4392
4412
  `
4393
4413
  ).action(async (manifest, opts) => {
4394
- const { runEmitDemo, EmitDemoError } = await import('./emit-demo-cmd-PMQGNNVX.js');
4414
+ const { runEmitDemo, EmitDemoError } = await import('./emit-demo-cmd-5KL64L74.js');
4395
4415
  let item;
4396
4416
  if (opts.item !== void 0) {
4397
4417
  item = parseTrackerNumber(opts.item);
@@ -4434,7 +4454,7 @@ as \`work demo --item <n> --json\` prints it.
4434
4454
  }
4435
4455
  });
4436
4456
  program2.command("demo-voice", { hidden: true }).description("Speak demo lines for a recorder: JSON lines in on stdin, out on stdout").action(async () => {
4437
- const { runDemoVoice } = await import('./demo-voice-cmd-VM3FITZU.js');
4457
+ const { runDemoVoice } = await import('./demo-voice-cmd-BPTSL7JA.js');
4438
4458
  await runDemoVoice();
4439
4459
  });
4440
4460
  const demoCmd = program2.command("demo").description("Record demos with the recorder this CLI carries");
@@ -4452,7 +4472,7 @@ and the command prints the manifest's path for \`emit demo\`. Under \`work proof
4452
4472
  to OUTERLAYER_PROOF_OUT instead. Exit 1 means the demo's test failed; its manifest is written all the same.
4453
4473
  `
4454
4474
  ).action(async (file, opts) => {
4455
- const { runDemoRecord, DemoRecordError } = await import('./demo-record-cmd-SBERRQNW.js');
4475
+ const { runDemoRecord, DemoRecordError } = await import('./demo-record-cmd-2OKCGST7.js');
4456
4476
  try {
4457
4477
  const result = await runDemoRecord({
4458
4478
  file,
@@ -4501,7 +4521,7 @@ recent events with their ids. --find <text> searches all of them.
4501
4521
  item that session was launched for is used automatically.
4502
4522
  `
4503
4523
  ).action(async (opts) => {
4504
- const { runEmitFinding, refuseRemovedFindingFlags, EmitFindingError } = await import('./emit-finding-cmd-MYWQN5WW.js');
4524
+ const { runEmitFinding, refuseRemovedFindingFlags, EmitFindingError } = await import('./emit-finding-cmd-R4OEWQQR.js');
4505
4525
  try {
4506
4526
  refuseRemovedFindingFlags(opts);
4507
4527
  const result = await runEmitFinding({
@@ -4568,7 +4588,7 @@ the whole batch. "untimed": true records one with no time on purpose.
4568
4588
  that session was launched for is used automatically.
4569
4589
  `
4570
4590
  ).action(async (file, opts) => {
4571
- const { runEmitFindings, EmitFindingError } = await import('./emit-finding-cmd-MYWQN5WW.js');
4591
+ const { runEmitFindings, EmitFindingError } = await import('./emit-finding-cmd-R4OEWQQR.js');
4572
4592
  try {
4573
4593
  const result = await runEmitFindings({
4574
4594
  file,
@@ -4603,7 +4623,7 @@ command, the command exits 0, and \`sync\` sends it later. If the gateway refuse
4603
4623
  the step, the command prints why and exits 1.
4604
4624
  `
4605
4625
  ).action(async (name, opts) => {
4606
- const { runEmitStep, EmitStepError } = await import('./emit-step-cmd-ZV2XTUVT.js');
4626
+ const { runEmitStep, EmitStepError } = await import('./emit-step-cmd-Z5WC7UEQ.js');
4607
4627
  try {
4608
4628
  await runEmitStep({
4609
4629
  name,
@@ -4646,7 +4666,7 @@ of the item, and a (proof: <kind>) annotation names its proof.
4646
4666
  ${cliInvocation()} emit criteria acceptance/412-login.md --item 412
4647
4667
  `
4648
4668
  ).action(async (file, opts) => {
4649
- const { runEmitCriteria, EmitCriteriaError } = await import('./emit-criteria-cmd-HWQOYZZ4.js');
4669
+ const { runEmitCriteria, EmitCriteriaError } = await import('./emit-criteria-cmd-V3ERJXHB.js');
4650
4670
  try {
4651
4671
  const result = await runEmitCriteria({
4652
4672
  file,
@@ -4670,9 +4690,9 @@ function registerSpecCommands(program2) {
4670
4690
  const specCmd = program2.command("spec").description("Find, file and edit the issue a spec lives in, in your factory's tracker");
4671
4691
  const credentialOptions = (command) => command.option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)");
4672
4692
  const run = async (action) => {
4673
- const { WorkCommandError } = await import('./work-cmd-GPLYLWY7.js');
4693
+ const { WorkCommandError } = await import('./work-cmd-ZP4UIHBT.js');
4674
4694
  try {
4675
- await action(await import('./spec-cmd-LGKP6MT7.js'));
4695
+ await action(await import('./spec-cmd-ZEZFMC4A.js'));
4676
4696
  } catch (err) {
4677
4697
  if (err instanceof WorkCommandError) {
4678
4698
  fail(err.message);
@@ -4707,7 +4727,7 @@ Prints each problem the item covers with its id, its reports and its result.
4707
4727
  session was launched for is used.
4708
4728
  `
4709
4729
  ).action(async (opts) => {
4710
- const { runFindingsShow, FindingsCommandError } = await import('./findings-cmd-OGMBVVSM.js');
4730
+ const { runFindingsShow, FindingsCommandError } = await import('./findings-cmd-J5ZCY2AT.js');
4711
4731
  try {
4712
4732
  const result = await runFindingsShow({
4713
4733
  item: opts.item,
@@ -4735,7 +4755,7 @@ Give exactly one of --fixed and --not-fixed, and a --note. Run it again for the
4735
4755
  problem to replace the earlier result. A problem the item does not cover is refused.
4736
4756
  `
4737
4757
  ).action(async (problem, opts) => {
4738
- const { runFindingsResult, FindingsCommandError } = await import('./findings-cmd-OGMBVVSM.js');
4758
+ const { runFindingsResult, FindingsCommandError } = await import('./findings-cmd-J5ZCY2AT.js');
4739
4759
  try {
4740
4760
  const result = await runFindingsResult({
4741
4761
  problem,
@@ -4777,7 +4797,7 @@ takes it, and prints the line that starts your session on it. That
4777
4797
  session links itself and holds the item's lease while it works.
4778
4798
  `
4779
4799
  ).action(async (opts) => {
4780
- const { runWorkBuild, WorkCommandError } = await import('./work-cmd-GPLYLWY7.js');
4800
+ const { runWorkBuild, WorkCommandError } = await import('./work-cmd-ZP4UIHBT.js');
4781
4801
  try {
4782
4802
  await runWorkBuild(opts);
4783
4803
  } catch (err) {
@@ -4800,7 +4820,7 @@ renews that session's own 20-minute lease, unless --no-lease or
4800
4820
  --ended is given, or another worker already holds a live one.
4801
4821
  `
4802
4822
  ).action(async (number, opts) => {
4803
- const { runWorkLinkSession, WorkCommandError } = await import('./work-cmd-GPLYLWY7.js');
4823
+ const { runWorkLinkSession, WorkCommandError } = await import('./work-cmd-ZP4UIHBT.js');
4804
4824
  try {
4805
4825
  await runWorkLinkSession({ ...opts, number, noLease: opts.lease === false, logFailures: opts.logFailures === true });
4806
4826
  } catch (err) {
@@ -4831,8 +4851,8 @@ thread at its source. It takes a plain answer: no --criterion and no
4831
4851
  action flag.
4832
4852
  `
4833
4853
  ).action(async (opts) => {
4834
- const { runWorkComment, WorkCommentCommandError } = await import('./work-comment-cmd-V5WM7LAW.js');
4835
- const { WorkCommandError } = await import('./work-cmd-GPLYLWY7.js');
4854
+ const { runWorkComment, WorkCommentCommandError } = await import('./work-comment-cmd-CYDOEMW3.js');
4855
+ const { WorkCommandError } = await import('./work-cmd-ZP4UIHBT.js');
4836
4856
  try {
4837
4857
  await runWorkComment(opts);
4838
4858
  } catch (err) {
@@ -4854,7 +4874,7 @@ nothing and exits 0 when the call fails: the line goes to hook-errors.log,
4854
4874
  and the comment waits for the next agent job.
4855
4875
  `
4856
4876
  ).action(async (ids, opts) => {
4857
- const { runWorkCommentsRead } = await import('./work-comment-cmd-V5WM7LAW.js');
4877
+ const { runWorkCommentsRead } = await import('./work-comment-cmd-CYDOEMW3.js');
4858
4878
  await runWorkCommentsRead({ ...opts, commentIds: ids });
4859
4879
  });
4860
4880
  workCmd.command("threads").description("Read a work item's general thread, its criterion threads and its source threads").requiredOption("--item <number>", "the item's number inside this factory").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)").addHelpText(
@@ -4870,8 +4890,8 @@ that started outside OuterLayer, such as the line comments of a
4870
4890
  GitHub review, each with its id, source and comments.
4871
4891
  `
4872
4892
  ).action(async (opts) => {
4873
- const { runWorkThreads, WorkCommentCommandError } = await import('./work-comment-cmd-V5WM7LAW.js');
4874
- const { WorkCommandError } = await import('./work-cmd-GPLYLWY7.js');
4893
+ const { runWorkThreads, WorkCommentCommandError } = await import('./work-comment-cmd-CYDOEMW3.js');
4894
+ const { WorkCommandError } = await import('./work-cmd-ZP4UIHBT.js');
4875
4895
  try {
4876
4896
  await runWorkThreads(opts);
4877
4897
  } catch (err) {
@@ -4895,8 +4915,8 @@ still running, or that an older runner released, has no log and the
4895
4915
  command exits 1.
4896
4916
  `
4897
4917
  ).action(async (opts) => {
4898
- const { runWorkLogs, WorkLogsCommandError } = await import('./work-logs-cmd-CTFBOPCI.js');
4899
- const { WorkCommandError } = await import('./work-cmd-GPLYLWY7.js');
4918
+ const { runWorkLogs, WorkLogsCommandError } = await import('./work-logs-cmd-NDPSRSCM.js');
4919
+ const { WorkCommandError } = await import('./work-cmd-ZP4UIHBT.js');
4900
4920
  try {
4901
4921
  await runWorkLogs(opts);
4902
4922
  } catch (err) {
@@ -4919,8 +4939,8 @@ item is not built again until a new build request. Exits 1 when no host
4919
4939
  build is running for the item.
4920
4940
  `
4921
4941
  ).action(async (opts) => {
4922
- const { runWorkStop, WorkStopCommandError } = await import('./work-stop-cmd-7M7ZYUN2.js');
4923
- const { WorkCommandError } = await import('./work-cmd-GPLYLWY7.js');
4942
+ const { runWorkStop, WorkStopCommandError } = await import('./work-stop-cmd-J45Q2QT7.js');
4943
+ const { WorkCommandError } = await import('./work-cmd-ZP4UIHBT.js');
4924
4944
  try {
4925
4945
  await runWorkStop(opts);
4926
4946
  } catch (err) {
@@ -4941,8 +4961,8 @@ Prints the item's newest live demo record: its artifact id, the commit it was re
4941
4961
  test file that recorded it. With --json, prints { "demo": null } for an item with no demo.
4942
4962
  `
4943
4963
  ).action(async (opts) => {
4944
- const { runWorkDemo, WorkDemoCommandError } = await import('./work-demo-cmd-SWWI6AGD.js');
4945
- const { WorkCommandError } = await import('./work-cmd-GPLYLWY7.js');
4964
+ const { runWorkDemo, WorkDemoCommandError } = await import('./work-demo-cmd-3A7Z3VVS.js');
4965
+ const { WorkCommandError } = await import('./work-cmd-ZP4UIHBT.js');
4946
4966
  try {
4947
4967
  await runWorkDemo(opts);
4948
4968
  } catch (err) {
@@ -4963,7 +4983,7 @@ deletes anything \u2014 the item is removed from Work only once no
4963
4983
  live addition remains on it.
4964
4984
  `
4965
4985
  ).action(async (opts) => {
4966
- const { runWorkRemove, WorkCommandError } = await import('./work-cmd-GPLYLWY7.js');
4986
+ const { runWorkRemove, WorkCommandError } = await import('./work-cmd-ZP4UIHBT.js');
4967
4987
  try {
4968
4988
  await runWorkRemove(opts);
4969
4989
  } catch (err) {
@@ -4975,7 +4995,7 @@ live addition remains on it.
4975
4995
  }
4976
4996
  });
4977
4997
  workCmd.command("status").description("Show one item's stage, gate ledger, and additions").option("--item <number>", "the item's number inside this factory").option("--issue <number>", "issue number, or a Linear/Jira key like ENG-123").option(TRACKER_OPTION_FLAG, "tracker for a keyed --issue, when both hold the key").option("--repo <owner/name>", "repository for an issue number (default: the checkout's remote)").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)").action(async (opts) => {
4978
- const { runWorkStatus, WorkCommandError } = await import('./work-cmd-GPLYLWY7.js');
4998
+ const { runWorkStatus, WorkCommandError } = await import('./work-cmd-ZP4UIHBT.js');
4979
4999
  try {
4980
5000
  await runWorkStatus(opts);
4981
5001
  } catch (err) {
@@ -5020,11 +5040,11 @@ differs from HEAD.
5020
5040
  fail(trackerNumberError("--pr", opts.pr));
5021
5041
  return;
5022
5042
  }
5023
- const { runWorkProofsCommand } = await import('./work-proofs-cmd-QXNPHLYC.js');
5043
+ const { runWorkProofsCommand } = await import('./work-proofs-cmd-VAXJ5UBF.js');
5024
5044
  await runWorkProofsCommand({ ...opts, ...pr === void 0 ? {} : { pr } });
5025
5045
  });
5026
5046
  workCmd.command("list").description("List live work items for this factory").option("--stage <spec|build|review>", "filter by stage").option("--section <attention|waiting|flowing>", "filter by Queue section").option("--repo <owner/name>", "repository (default: the current checkout's remote)").option("--unclaimed", "only items with no live lease").option("--claimed", "only items with a live lease, held by a host or a local session").option("--startable", "only items a host can start: a build request, no open PR, no live lease").option("--needs <amend>", "only items with a thread waiting on an agent").option("--json", "machine-readable JSON output").option("--url <url>", "cloud base URL (or OUTERLAYER_URL / config)").addOption(apiKeyOption()).option("--app-id <id>", "factory id the key is bound to (or OUTERLAYER_APP_ID / config)").action(async (opts) => {
5027
- const { runWorkList, WorkCommandError } = await import('./work-cmd-GPLYLWY7.js');
5047
+ const { runWorkList, WorkCommandError } = await import('./work-cmd-ZP4UIHBT.js');
5028
5048
  try {
5029
5049
  await runWorkList(opts);
5030
5050
  } catch (err) {
@@ -5045,7 +5065,7 @@ by a different key is refused; claiming again with the same key extends
5045
5065
  it. --host is a label only.
5046
5066
  `
5047
5067
  ).action(async (opts) => {
5048
- const { runWorkClaim, WorkCommandError } = await import('./work-claim-cmd-6DSPGCZE.js');
5068
+ const { runWorkClaim, WorkCommandError } = await import('./work-claim-cmd-7HR4AVCT.js');
5049
5069
  try {
5050
5070
  await runWorkClaim(opts);
5051
5071
  } catch (err) {
@@ -5065,7 +5085,7 @@ Extends the live lease this API key holds. Refused with a 410 if the
5065
5085
  lease has expired, or a 403 if a different key holds it.
5066
5086
  `
5067
5087
  ).action(async (opts) => {
5068
- const { runWorkRenew, WorkCommandError } = await import('./work-claim-cmd-6DSPGCZE.js');
5088
+ const { runWorkRenew, WorkCommandError } = await import('./work-claim-cmd-7HR4AVCT.js');
5069
5089
  try {
5070
5090
  await runWorkRenew(opts);
5071
5091
  } catch (err) {
@@ -5097,7 +5117,7 @@ applies to a host's lease only. A later tool call in the session
5097
5117
  takes the lease again.
5098
5118
  `
5099
5119
  ).action(async (opts) => {
5100
- const { runWorkRelease, WorkCommandError } = await import('./work-claim-cmd-6DSPGCZE.js');
5120
+ const { runWorkRelease, WorkCommandError } = await import('./work-claim-cmd-7HR4AVCT.js');
5101
5121
  try {
5102
5122
  await runWorkRelease(opts);
5103
5123
  } catch (err) {
@@ -5124,7 +5144,7 @@ Idempotent: declaring the same pull request twice is a no-op.
5124
5144
  needs your own login; an agent session or a factory key is refused.
5125
5145
  `
5126
5146
  ).action(async (number, opts) => {
5127
- const { runWorkPr, WorkPrCommandError } = await import('./work-pr-cmd-EI2R4FQG.js');
5147
+ const { runWorkPr, WorkPrCommandError } = await import('./work-pr-cmd-ZVPGCDWD.js');
5128
5148
  try {
5129
5149
  await runWorkPr({ ...opts, number });
5130
5150
  } catch (err) {
@@ -5149,8 +5169,8 @@ login, then declares the pull request on the item, as \`work pr\` does.
5149
5169
  Run it again after a change to the title or description.
5150
5170
  `
5151
5171
  ).action(async (opts) => {
5152
- const { runWorkOpenPr, WorkOpenPrCommandError } = await import('./work-open-pr-cmd-HX2U3YBR.js');
5153
- const { WorkCommandError } = await import('./work-cmd-GPLYLWY7.js');
5172
+ const { runWorkOpenPr, WorkOpenPrCommandError } = await import('./work-open-pr-cmd-Z5B3ERAU.js');
5173
+ const { WorkCommandError } = await import('./work-cmd-ZP4UIHBT.js');
5154
5174
  try {
5155
5175
  await runWorkOpenPr(opts);
5156
5176
  } catch (err) {
@@ -5166,9 +5186,9 @@ function registerRunnerCommands(program2) {
5166
5186
  const runnerCmd = program2.command("runner").description("Take work from the implement and amend queues on this machine");
5167
5187
  const configOption = "the cloud config file to run against (default: ~/.outerlayer/config.json)";
5168
5188
  runnerCmd.command("start").description("Run the loop: claim work, run it, report, clean up, repeat").option("--config <path>", configOption).action(async (opts) => {
5169
- const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-WYQPXLOP.js');
5170
- const { start, RunnerStartError } = await import('./loop-2E34CGCX.js');
5171
- const { RunnerAlreadyRunningError } = await import('./pidfile-5GDCQ5HA.js');
5189
+ const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-GKSSGMXD.js');
5190
+ const { start, RunnerStartError } = await import('./loop-RUQQ4L5A.js');
5191
+ const { RunnerAlreadyRunningError } = await import('./pidfile-SPBTMTCJ.js');
5172
5192
  const configPath = opts.config ?? defaultRunnerConfigPath();
5173
5193
  try {
5174
5194
  const { realUpdateDeps } = await import('./real-deps-QX5YH7FG.js');
@@ -5185,10 +5205,10 @@ function registerRunnerCommands(program2) {
5185
5205
  "after",
5186
5206
  "\nReads OUTERLAYER_URL, OUTERLAYER_APP_ID, OUTERLAYER_API_KEY, OUTERLAYER_RUNNER_NAME and one Claude credential\n(CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY) from the environment. OUTERLAYER_AGENT\nis optional and defaults to claude. On a later start it refuses variables that disagree with the config in the volume.\nThe image sets OUTERLAYER_RUNNER_IMAGE; outside the image, use `runner start`.\n"
5187
5207
  ).action(async () => {
5188
- const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-WYQPXLOP.js');
5189
- const { containerStart } = await import('./container-start-T776VI3M.js');
5190
- const { start, RunnerStartError } = await import('./loop-2E34CGCX.js');
5191
- const { RunnerAlreadyRunningError } = await import('./pidfile-5GDCQ5HA.js');
5208
+ const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-GKSSGMXD.js');
5209
+ const { containerStart } = await import('./container-start-55QELXPJ.js');
5210
+ const { start, RunnerStartError } = await import('./loop-RUQQ4L5A.js');
5211
+ const { RunnerAlreadyRunningError } = await import('./pidfile-SPBTMTCJ.js');
5192
5212
  try {
5193
5213
  const result = await containerStart({
5194
5214
  env: process.env,
@@ -5209,16 +5229,16 @@ function registerRunnerCommands(program2) {
5209
5229
  "after",
5210
5230
  "\nIn the runner image, run it with `docker exec <container> outerlayer runner update-steps`. It reads the\ncontainer with `docker inspect` and changes nothing. The steps rename the old container and never remove it\nbefore the new one runs. They name the container's variables and never print a value.\n"
5211
5231
  ).action(async (opts) => {
5212
- const { defaultRunnerConfigPath } = await import('./config-WYQPXLOP.js');
5213
- const { runnerDir } = await import('./paths-O7LCWY33.js');
5214
- const { runUpdateSteps } = await import('./update-steps-7E4RD47J.js');
5232
+ const { defaultRunnerConfigPath } = await import('./config-GKSSGMXD.js');
5233
+ const { runnerDir } = await import('./paths-2YTU4QIO.js');
5234
+ const { runUpdateSteps } = await import('./update-steps-D6L6AG6E.js');
5215
5235
  const text = await runUpdateSteps({ runnerDirPath: runnerDir(opts.config ?? defaultRunnerConfigPath()) });
5216
5236
  process.stdout.write(`${text}
5217
5237
  `);
5218
5238
  });
5219
5239
  runnerCmd.command("check").description("Validate the config, the hooks and the key, and print the effective settings").option("--config <path>", configOption).action(async (opts) => {
5220
- const { defaultRunnerConfigPath } = await import('./config-WYQPXLOP.js');
5221
- const { runRunnerCheck } = await import('./check-SF2OVZXB.js');
5240
+ const { defaultRunnerConfigPath } = await import('./config-GKSSGMXD.js');
5241
+ const { runRunnerCheck } = await import('./check-AEDFTYH6.js');
5222
5242
  const configPath = opts.config ?? defaultRunnerConfigPath();
5223
5243
  const result = await runRunnerCheck(configPath);
5224
5244
  if (!result.ok) {
@@ -5239,8 +5259,8 @@ function registerRunnerCommands(program2) {
5239
5259
  `);
5240
5260
  });
5241
5261
  runnerCmd.command("install").description("Put this CLI in the runner's install layout; --service adds its service").option("--config <path>", configOption).option("--service", "set up the service that keeps the runner running").option("--print", "with --service, print the unit and set up nothing").option("--user <account>", "with --service, the account the service runs as").option("--replace", "replace a unit or launcher file this command did not write").option("--allow-downgrade", "install this CLI even when it is older than the version the runner runs").option("--unit-name <name>", "with --service, the unit's name, to run a second runner beside the first").option("--build-memory-max <size>", "with --service, memory all builds may use together, such as 16g").option("--build-cpus-max <n>", "with --service, CPUs all builds may use together, such as 4").action(async (opts) => {
5242
- const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-WYQPXLOP.js');
5243
- const { runRunnerInstall, RunnerInstallError, launcherSummary, restartNote } = await import('./install-cmd-SJMBNQEH.js');
5262
+ const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-GKSSGMXD.js');
5263
+ const { runRunnerInstall, RunnerInstallError, launcherSummary, restartNote } = await import('./install-cmd-WBVTTE5Z.js');
5244
5264
  const configPath = opts.config ?? defaultRunnerConfigPath();
5245
5265
  if (opts.service !== true) {
5246
5266
  const names = { print: "print", user: "user", unitName: "unit-name", buildMemoryMax: "build-memory-max", buildCpusMax: "build-cpus-max" };
@@ -5252,13 +5272,13 @@ function registerRunnerCommands(program2) {
5252
5272
  }
5253
5273
  }
5254
5274
  const buildCpusMax = opts.buildCpusMax === void 0 ? void 0 : Number(opts.buildCpusMax);
5255
- if (buildCpusMax !== void 0 && !(await import('./command-45RZT4CK.js')).cpusAreValid(buildCpusMax)) {
5275
+ if (buildCpusMax !== void 0 && !(await import('./command-ZLBFX553.js')).cpusAreValid(buildCpusMax)) {
5256
5276
  fail(`--build-cpus-max ${opts.buildCpusMax} is not a number of CPUs from 0.01 to 1024.`);
5257
5277
  return;
5258
5278
  }
5259
5279
  try {
5260
5280
  if (opts.service === true) {
5261
- const { installServiceCommand } = await import('./command-45RZT4CK.js');
5281
+ const { installServiceCommand } = await import('./command-ZLBFX553.js');
5262
5282
  const result2 = await installServiceCommand({
5263
5283
  configPath,
5264
5284
  print: opts.print,
@@ -5315,8 +5335,8 @@ To keep it running, run ${C.yellow}${cliInvocation()} runner install --service${
5315
5335
  fail(`pass --service: \`${cliInvocation()} runner uninstall --service\` removes the runner's service.`);
5316
5336
  return;
5317
5337
  }
5318
- const { defaultRunnerConfigPath } = await import('./config-WYQPXLOP.js');
5319
- const { uninstallServiceCommand } = await import('./command-45RZT4CK.js');
5338
+ const { defaultRunnerConfigPath } = await import('./config-GKSSGMXD.js');
5339
+ const { uninstallServiceCommand } = await import('./command-ZLBFX553.js');
5320
5340
  const result = await uninstallServiceCommand({ configPath: opts.config ?? defaultRunnerConfigPath(), unitName: opts.unitName, home: homeFromEnv() });
5321
5341
  if (result.ok) for (const line of result.lines) process.stdout.write(`${C.green}\u2713${C.reset} ${line}
5322
5342
  `);
@@ -5343,12 +5363,12 @@ already in claude.env is used.
5343
5363
  printf '%s' "$CLAUDE_CODE_OAUTH_TOKEN" | ${cliInvocation()} runner init --agent claude --factory <org>/<factory>
5344
5364
  `
5345
5365
  ).action(async (opts) => {
5346
- const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-WYQPXLOP.js');
5347
- const { prepareRunnerInit, runRunnerInit, RunnerInitError, writeRunnerInit } = await import('./init-EZIAHBMH.js');
5348
- const { obtainRunnerKey, runnerKeyLogin } = await import('./runner-key-VM2LYVRK.js');
5349
- const { detectMachine } = await import('./machine-6ALGG4IO.js');
5350
- const { chooseVm, runVmInit, VmInitError } = await import('./init-LO6U7YTW.js');
5351
- const { AGENT_COMMANDS, credentialFromStdin, isAgentName, restartForCredential, RunnerEnvError } = await import('./runner-env-KHCONH2R.js');
5366
+ const { defaultRunnerConfigPath, RunnerConfigError } = await import('./config-GKSSGMXD.js');
5367
+ const { prepareRunnerInit, runRunnerInit, RunnerInitError, writeRunnerInit } = await import('./init-EKF4ILHF.js');
5368
+ const { obtainRunnerKey, runnerKeyLogin } = await import('./runner-key-FXYWHMMO.js');
5369
+ const { detectMachine } = await import('./machine-IGHZW3IO.js');
5370
+ const { chooseVm, runVmInit, VmInitError } = await import('./init-BZXVQO22.js');
5371
+ const { AGENT_COMMANDS, credentialFromStdin, isAgentName, restartForCredential, RunnerEnvError } = await import('./runner-env-HOWRS6I6.js');
5352
5372
  const configPath = opts.config ?? defaultRunnerConfigPath();
5353
5373
  if (opts.agent !== void 0 && !isAgentName(opts.agent)) {
5354
5374
  fail(`--agent ${opts.agent}: runner init writes commands for ${Object.keys(AGENT_COMMANDS).join(", ")}. For another agent, leave --agent out and edit runner.commands.`);
@@ -5379,7 +5399,7 @@ already in claude.env is used.
5379
5399
  const chunks = [];
5380
5400
  for await (const chunk of process.stdin) chunks.push(Buffer.from(chunk));
5381
5401
  const result2 = runRunnerInit(configPath, { machine, configFromStdin: Buffer.concat(chunks).toString("utf8"), requireContainer: true });
5382
- const { ensureHostKey: ensureHostKey2 } = await import('./host-key-MWLXB5U5.js');
5402
+ const { ensureHostKey: ensureHostKey2 } = await import('./host-key-FI6KWMJC.js');
5383
5403
  const hostKey2 = await ensureHostKey2(configPath);
5384
5404
  process.stdout.write(`host key ${hostKey2.fingerprint}
5385
5405
  hooks: ${result2.hooks}
@@ -5438,7 +5458,7 @@ hooks: ${result2.hooks}
5438
5458
  const prepared = prepareRunnerInit(configPath, { machine, allowProcess, agent, credential, keyFromLogin: makeKey !== void 0 });
5439
5459
  const created = makeKey === void 0 ? void 0 : await makeKey();
5440
5460
  const result = writeRunnerInit(prepared, created);
5441
- const { ensureHostKey } = await import('./host-key-MWLXB5U5.js');
5461
+ const { ensureHostKey } = await import('./host-key-FI6KWMJC.js');
5442
5462
  const hostKey = await ensureHostKey(configPath);
5443
5463
  if (created !== void 0) {
5444
5464
  process.stdout.write(`${C.green}\u2713${C.reset} saved the runner key in ${result.configPath}
@@ -5466,7 +5486,7 @@ ${C.yellow}${result.note}${C.reset}
5466
5486
  To isolate builds in containers instead, run ${C.yellow}${cliInvocation()} runner init --vm${C.reset}.
5467
5487
  `);
5468
5488
  }
5469
- const { runRunnerInstall, RunnerInstallError, RunnerDowngradeError, launcherSummary } = await import('./install-cmd-SJMBNQEH.js');
5489
+ const { runRunnerInstall, RunnerInstallError, RunnerDowngradeError, launcherSummary } = await import('./install-cmd-WBVTTE5Z.js');
5470
5490
  let installedLayout = false;
5471
5491
  let noService = "it starts the runner from the install layout, which needs a CLI installed with npm";
5472
5492
  try {
@@ -5498,7 +5518,7 @@ ${C.yellow}The runner will not update itself: ${installErr.message}${C.reset}
5498
5518
  let serviceUp = false;
5499
5519
  let restart;
5500
5520
  if (installedLayout) {
5501
- const { installServiceCommand } = await import('./command-45RZT4CK.js');
5521
+ const { installServiceCommand } = await import('./command-ZLBFX553.js');
5502
5522
  const service = await installServiceCommand({
5503
5523
  configPath,
5504
5524
  entryPath: process.argv[1] ?? "",
@@ -5542,12 +5562,12 @@ Next:
5542
5562
  "after",
5543
5563
  "\nA repository governed by a control plane builds the control plane's image, at the commit\nthe gateway has stored for it. A repository that governs itself fetches the head of its\ndefault branch into the runner's cache. Either way it reads .devcontainer/devcontainer.json\nand builds the image with the devcontainer CLI. Settings\nthat reach the host or widen the container's privileges are ignored and listed. The\nimage holds this CLI and a pinned Claude Code. Nothing runs inside the image.\nA repository with no devcontainer file builds on the universal image the CLI pins by digest.\n"
5544
5564
  ).action(async (opts) => {
5545
- const { defaultRunnerConfigPath } = await import('./config-WYQPXLOP.js');
5546
- const { baseLines, buildRepositoryImage, RecipeError } = await import('./build-THAD3B4Q.js');
5565
+ const { defaultRunnerConfigPath } = await import('./config-GKSSGMXD.js');
5566
+ const { baseLines, buildRepositoryImage, RecipeError } = await import('./build-3CEFKWGY.js');
5547
5567
  const { currentCliBuild } = await import('./cli-build-K56DK4DS.js');
5548
- const { createDockerHost } = await import('./docker-MQNLK4OO.js');
5549
- const { builderSpec } = await import('./builder-AXJNIF4S.js');
5550
- const { loadRunnerConfig } = await import('./config-WYQPXLOP.js');
5568
+ const { createDockerHost } = await import('./docker-GFEEV42Z.js');
5569
+ const { builderSpec } = await import('./builder-ALMQ5AWP.js');
5570
+ const { loadRunnerConfig } = await import('./config-GKSSGMXD.js');
5551
5571
  const configPath = opts.config ?? defaultRunnerConfigPath();
5552
5572
  const loaded = (() => {
5553
5573
  try {
@@ -5558,12 +5578,12 @@ Next:
5558
5578
  })();
5559
5579
  const memory = loaded?.build?.memory ?? "8g";
5560
5580
  try {
5561
- const { ensureRunnerIdentity } = await import('./runner-identity-PSCZBILD.js');
5581
+ const { ensureRunnerIdentity } = await import('./runner-identity-32MTGA2F.js');
5562
5582
  await ensureRunnerIdentity(configPath, { log: (line) => console.error(line) }).catch((err) => {
5563
5583
  console.error(`the runner's Docker identity could not be stored: ${err instanceof Error ? err.message : String(err)}`);
5564
5584
  });
5565
- const { imageTargetFor } = await import('./governing-source-XJMXFSAR.js');
5566
- const { runnerCalls } = await import('./caller-GOY2X6QT.js');
5585
+ const { imageTargetFor } = await import('./governing-source-7PD4ISRN.js');
5586
+ const { runnerCalls } = await import('./caller-XNBGW4SP.js');
5567
5587
  const target = await imageTargetFor({ config: loaded === void 0 || loaded.fleet === true ? void 0 : runnerCalls(loaded), repository: opts.repository, fetchImpl: fetch });
5568
5588
  if (!target.ok) {
5569
5589
  if (opts.json) {
@@ -5627,25 +5647,25 @@ Next:
5627
5647
  }
5628
5648
  });
5629
5649
  runnerCmd.command("stop").description("Take no more work; finish running jobs, then exit").option("--config <path>", "the cloud config file naming the runner to stop").option("--now", "end running jobs immediately, with outcome stopped").action(async (opts) => {
5630
- const { defaultRunnerConfigPath } = await import('./config-WYQPXLOP.js');
5631
- const { requestStop } = await import('./loop-2E34CGCX.js');
5650
+ const { defaultRunnerConfigPath } = await import('./config-GKSSGMXD.js');
5651
+ const { requestStop } = await import('./loop-RUQQ4L5A.js');
5632
5652
  const configPath = opts.config ?? defaultRunnerConfigPath();
5633
- const { runnerImageVersion } = await import('./image-tag-E4JK2APF.js');
5653
+ const { runnerImageVersion } = await import('./image-tag-RX4WTHJH.js');
5634
5654
  await requestStop(configPath, Boolean(opts.now), void 0, { image: runnerImageVersion() !== void 0 });
5635
5655
  });
5636
5656
  runnerCmd.command("status").description("List running jobs; with --recent, finished ones too").option("--config <path>", "the cloud config file naming the runner to inspect").option("--recent", "also list finished jobs, newest first, capped at 20").option("--json", "machine-readable JSON output").action(async (opts) => {
5637
- const { defaultRunnerConfigPath, loadRunnerConfig } = await import('./config-WYQPXLOP.js');
5638
- const { jobsDir, runnerDir } = await import('./paths-O7LCWY33.js');
5639
- const { listJobFiles, runnerProcessState } = await import('./loop-2E34CGCX.js');
5640
- const { renderStatus } = await import('./status-HEHCNIDS.js');
5641
- const { readHousekeepingRecord } = await import('./record-NETSDAO6.js');
5657
+ const { defaultRunnerConfigPath, loadRunnerConfig } = await import('./config-GKSSGMXD.js');
5658
+ const { jobsDir, runnerDir } = await import('./paths-2YTU4QIO.js');
5659
+ const { listJobFiles, runnerProcessState } = await import('./loop-RUQQ4L5A.js');
5660
+ const { renderStatus } = await import('./status-VPFIIHOZ.js');
5661
+ const { readHousekeepingRecord } = await import('./record-3KXRFK5C.js');
5642
5662
  const path2 = await import('path');
5643
5663
  const configPath = opts.config ?? defaultRunnerConfigPath();
5644
5664
  const all = listJobFiles(configPath);
5645
5665
  const housekeeping = readHousekeepingRecord(runnerDir(configPath));
5646
- const { readPendingUpdate } = await import('./pending-YU2GE2UV.js');
5666
+ const { readPendingUpdate } = await import('./pending-S2SKIBCB.js');
5647
5667
  const pendingUpdate = readPendingUpdate(runnerDir(configPath));
5648
- const { readImageStatus } = await import('./image-tag-E4JK2APF.js');
5668
+ const { readImageStatus } = await import('./image-tag-RX4WTHJH.js');
5649
5669
  const image = readImageStatus(runnerDir(configPath));
5650
5670
  let host = "unknown";
5651
5671
  let concurrency = 1;
@@ -5655,7 +5675,7 @@ Next:
5655
5675
  host = config.host;
5656
5676
  concurrency = config.concurrency;
5657
5677
  if (config.fleet === true) {
5658
- const { readFleetState } = await import('./state-RJR4PMMX.js');
5678
+ const { readFleetState } = await import('./state-DVKFUWB3.js');
5659
5679
  fleet = { state: readFleetState(configPath) };
5660
5680
  }
5661
5681
  } catch {
@@ -5663,7 +5683,7 @@ Next:
5663
5683
  const processState = runnerProcessState(configPath);
5664
5684
  const service = await (async () => {
5665
5685
  if (process.platform !== "linux" || !existsSync("/run/systemd/system")) return void 0;
5666
- const { inspectRunnerService } = await import('./find-unit-63SXQ7IM.js');
5686
+ const { inspectRunnerService } = await import('./find-unit-OI56YEX5.js');
5667
5687
  const facts = inspectRunnerService(configPath);
5668
5688
  return facts === void 0 ? void 0 : { unit: facts.unit, running: facts.mainPid !== void 0, delegated: facts.delegate };
5669
5689
  })();
@@ -5702,9 +5722,9 @@ Next:
5702
5722
  );
5703
5723
  });
5704
5724
  runnerCmd.command("logs").argument("<item>", "the work item's number in the factory, or a build's claim id").description("Print the newest attempt's log for one item or claim id").option("--config <path>", "the cloud config file naming the runner to inspect").option("-f, --follow", "keep printing as the log grows").action(async (itemArg, opts) => {
5705
- const { defaultRunnerConfigPath } = await import('./config-WYQPXLOP.js');
5706
- const { listJobFiles } = await import('./loop-2E34CGCX.js');
5707
- const { describeAmbiguous, logPathFor, selectAttempt, tail, RunnerLogsError } = await import('./logs-NE55HOET.js');
5725
+ const { defaultRunnerConfigPath } = await import('./config-GKSSGMXD.js');
5726
+ const { listJobFiles } = await import('./loop-RUQQ4L5A.js');
5727
+ const { describeAmbiguous, logPathFor, selectAttempt, tail, RunnerLogsError } = await import('./logs-7YIXBO2K.js');
5708
5728
  const configPath = opts.config ?? defaultRunnerConfigPath();
5709
5729
  const jobs = listJobFiles(configPath);
5710
5730
  const selected = selectAttempt(jobs, itemArg);
@@ -5742,28 +5762,35 @@ function registerHooksCommands(program2) {
5742
5762
  );
5743
5763
  hooksCmd.command("status").description("List hook entries in user and project settings, marking the wrapped ones").option("--json", "machine-readable JSON output").action((opts) => {
5744
5764
  const report = [];
5745
- for (const scope of ["user", "project"]) {
5746
- const path2 = settingsPath(scope);
5747
- let settings;
5748
- try {
5749
- settings = readSettings(path2);
5750
- } catch (err) {
5751
- if (err instanceof SettingsParseError) {
5752
- report.push({ scope, path: path2, error: err.message, entries: [] });
5753
- continue;
5765
+ const where = { home: homeFromEnv(), cwd: process.cwd() };
5766
+ const cli = cliForInstall(resolveCliBin());
5767
+ const agents = installAgents();
5768
+ for (const agent of agents) {
5769
+ const named = agent === agents[0] ? {} : { agent: agent.entry.descriptor.id };
5770
+ for (const scope of ["user", "project"]) {
5771
+ const path2 = settingsFileOf(agent, scope, where);
5772
+ let candidates;
5773
+ try {
5774
+ candidates = withSettingsText(path2, (text) => agent.install.candidates(text, cli));
5775
+ } catch (err) {
5776
+ if (err instanceof SettingsParseError) {
5777
+ report.push({ scope, path: path2, ...named, error: err.message, entries: [] });
5778
+ continue;
5779
+ }
5780
+ throw err;
5754
5781
  }
5755
- throw err;
5782
+ report.push({
5783
+ scope,
5784
+ path: path2,
5785
+ ...named,
5786
+ entries: candidates.map((c) => ({
5787
+ event: c.event,
5788
+ ...c.matcher ? { matcher: c.matcher } : {},
5789
+ command: c.command,
5790
+ wrapped: c.wrapped
5791
+ }))
5792
+ });
5756
5793
  }
5757
- report.push({
5758
- scope,
5759
- path: path2,
5760
- entries: listHookCandidates(settings, resolveCliBin()).map((c) => ({
5761
- event: c.event,
5762
- ...c.matcher ? { matcher: c.matcher } : {},
5763
- command: c.command,
5764
- wrapped: c.wrapped
5765
- }))
5766
- });
5767
5794
  }
5768
5795
  if (opts.json) {
5769
5796
  writeJson(report);
@@ -5806,94 +5833,97 @@ ${C.dim}${file.path}${C.reset}
5806
5833
  fail(`could not copy the CLI to ~/.outerlayer/cli: ${err instanceof Error ? err.message : String(err)}`);
5807
5834
  return;
5808
5835
  }
5809
- const path2 = settingsPath(scope);
5810
- let settings;
5811
- try {
5812
- settings = readSettings(path2);
5813
- } catch (err) {
5814
- if (err instanceof SettingsParseError) {
5815
- fail(err.message);
5816
- return;
5836
+ const where = { home: homeFromEnv(), cwd: process.cwd() };
5837
+ for (const agent of installAgents()) {
5838
+ const path2 = settingsFileOf(agent, scope, where);
5839
+ const readCli = cliForInstall(resolveCliBin());
5840
+ let candidates;
5841
+ try {
5842
+ candidates = withSettingsText(path2, (text2) => agent.install.candidates(text2, readCli));
5843
+ } catch (err) {
5844
+ if (err instanceof SettingsParseError) {
5845
+ fail(err.message);
5846
+ continue;
5847
+ }
5848
+ throw err;
5817
5849
  }
5818
- throw err;
5819
- }
5820
- const events = opts.event ? [opts.event] : void 0;
5821
- const candidates = listHookCandidates(settings, resolveCliBin()).filter(
5822
- (c) => !c.wrapped && (!events || events.includes(c.event))
5823
- );
5824
- if (candidates.length === 0) {
5825
- process.stdout.write(`${C.dim}No unwrapped hook candidates in ${path2}${C.reset}
5850
+ const events = opts.event ? [opts.event] : void 0;
5851
+ const unwrapped = candidates.filter((c) => !c.wrapped && (!events || events.includes(c.event)));
5852
+ if (unwrapped.length === 0) {
5853
+ process.stdout.write(`${C.dim}No unwrapped hook candidates in ${path2}${C.reset}
5826
5854
  `);
5827
- return;
5828
- }
5829
- let accept;
5830
- if (opts.all) {
5831
- accept = () => true;
5832
- } else {
5833
- const rl = createInterface({ input: process.stdin, output: process.stdout });
5834
- const accepted = /* @__PURE__ */ new Set();
5835
- for (const c of candidates) {
5836
- const answer = await rl.question(
5837
- `Wrap ${c.event}${c.matcher ? `[${c.matcher}]` : ""}: ${c.command} ? [y/N] `
5838
- );
5839
- if (/^y(es)?$/i.test(answer.trim())) accepted.add(candidateKey(c));
5855
+ continue;
5840
5856
  }
5841
- rl.close();
5842
- accept = (c) => accepted.has(candidateKey(c));
5843
- }
5844
- const { next, changed, wrapped, skippedUnresolvedBin } = wrapHooks(settings, cliBin, {
5845
- events,
5846
- captureOutput: opts.captureOutput,
5847
- select: accept
5848
- });
5849
- if (skippedUnresolvedBin) {
5850
- fail(
5851
- `the resolved CLI path (${cliBin}) does not exist \u2014 refusing to write hook entries pointing at it.
5852
- Reinstall OuterLayer, then re-run this command.`
5857
+ let accept;
5858
+ if (opts.all) {
5859
+ accept = () => true;
5860
+ } else {
5861
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
5862
+ const accepted = /* @__PURE__ */ new Set();
5863
+ for (const c of unwrapped) {
5864
+ const answer = await rl.question(
5865
+ `Wrap ${c.event}${c.matcher ? `[${c.matcher}]` : ""}: ${c.command} ? [y/N] `
5866
+ );
5867
+ if (/^y(es)?$/i.test(answer.trim())) accepted.add(candidateKey(c));
5868
+ }
5869
+ rl.close();
5870
+ accept = (c) => accepted.has(candidateKey(c));
5871
+ }
5872
+ const { text, changed, wrapped, skippedUnresolvedBin } = withSettingsText(
5873
+ path2,
5874
+ (current) => agent.install.wrap(current, cliForInstall(cliBin), { events, captureOutput: opts.captureOutput, select: accept })
5853
5875
  );
5854
- return;
5855
- }
5856
- if (!changed) {
5857
- process.stdout.write(`${C.dim}No hooks wrapped${C.reset}
5876
+ if (skippedUnresolvedBin) {
5877
+ fail(
5878
+ `the resolved CLI path (${cliBin}) does not exist \u2014 refusing to write hook entries pointing at it.
5879
+ Reinstall OuterLayer, then re-run this command.`
5880
+ );
5881
+ return;
5882
+ }
5883
+ if (!changed) {
5884
+ process.stdout.write(`${C.dim}No hooks wrapped${C.reset}
5858
5885
  `);
5859
- return;
5860
- }
5861
- const backupPath = writeSettings(path2, next);
5862
- const manifestHome = homeFromEnv();
5863
- recordWrapped(manifestHome, path2, wrapped.map((c) => ({ event: c.event, original: c.command })));
5864
- process.stdout.write(
5865
- `${C.green}\u2713${C.reset} Wrapped ${wrapped.length} hook(s) in ${path2}
5886
+ continue;
5887
+ }
5888
+ const backupPath = writeSettingsText(path2, text);
5889
+ const manifestHome = homeFromEnv();
5890
+ recordWrapped(manifestHome, path2, wrapped.map((c) => ({ event: c.event, original: c.command })));
5891
+ process.stdout.write(
5892
+ `${C.green}\u2713${C.reset} Wrapped ${wrapped.length} hook(s) in ${path2}
5866
5893
  ` + (backupPath ? `${C.dim} backup: ${backupPath}${C.reset}
5867
5894
  ` : "")
5868
- );
5895
+ );
5896
+ }
5869
5897
  });
5870
5898
  hooksCmd.command("unwrap").description("Restore wrapped hooks to their original commands").option("--project", "operate on project settings instead of user settings").addHelpText("after", "\nAlso the escape hatch if the wrapper misbehaves.\n").action((opts) => {
5871
5899
  const scope = opts.project ? "project" : "user";
5872
- const path2 = settingsPath(scope);
5873
- let settings;
5874
- try {
5875
- settings = readSettings(path2);
5876
- } catch (err) {
5877
- if (err instanceof SettingsParseError) {
5878
- fail(err.message);
5879
- return;
5900
+ const where = { home: homeFromEnv(), cwd: process.cwd() };
5901
+ for (const agent of installAgents()) {
5902
+ const path2 = settingsFileOf(agent, scope, where);
5903
+ let result;
5904
+ try {
5905
+ result = withSettingsText(path2, (text) => agent.install.unwrap(text, cliForInstall(resolveCliBin())));
5906
+ } catch (err) {
5907
+ if (err instanceof SettingsParseError) {
5908
+ fail(err.message);
5909
+ continue;
5910
+ }
5911
+ throw err;
5880
5912
  }
5881
- throw err;
5882
- }
5883
- const { next, changed, unwrapped } = unwrapHooks(settings, resolveCliBin());
5884
- const manifestHome = homeFromEnv();
5885
- recordUnwrapped(manifestHome, path2);
5886
- if (!changed) {
5887
- process.stdout.write(`${C.dim}No wrapped hooks in ${path2}${C.reset}
5913
+ const manifestHome = homeFromEnv();
5914
+ recordUnwrapped(manifestHome, path2);
5915
+ if (!result.changed) {
5916
+ process.stdout.write(`${C.dim}No wrapped hooks in ${path2}${C.reset}
5888
5917
  `);
5889
- return;
5890
- }
5891
- const backupPath = writeSettings(path2, next);
5892
- process.stdout.write(
5893
- `${C.green}\u2713${C.reset} Restored ${unwrapped} hook(s) in ${path2}
5918
+ continue;
5919
+ }
5920
+ const backupPath = writeSettingsText(path2, result.text);
5921
+ process.stdout.write(
5922
+ `${C.green}\u2713${C.reset} Restored ${result.unwrapped} hook(s) in ${path2}
5894
5923
  ` + (backupPath ? `${C.dim} backup: ${backupPath}${C.reset}
5895
5924
  ` : "")
5896
- );
5925
+ );
5926
+ }
5897
5927
  });
5898
5928
  }
5899
5929
  function registerMcpCommands(program2) {
@@ -5915,7 +5945,7 @@ Self-host deployments also need --app-id: without a key service to resolve the
5915
5945
  caller from the bearer token, the gateway answers 401 without that header.
5916
5946
  `
5917
5947
  ).action(async (opts) => {
5918
- const { runMcpInstall, handleMcpInstallError, McpInstallError } = await import('./mcp-install-cmd-2QAS3AQZ.js');
5948
+ const { runMcpInstall, handleMcpInstallError, McpInstallError } = await import('./mcp-install-cmd-SMPLT43Q.js');
5919
5949
  try {
5920
5950
  if (opts.transport !== void 0 && opts.transport !== "stdio" && opts.transport !== "http") {
5921
5951
  throw new McpInstallError(`--transport must be "stdio" or "http", got "${opts.transport}"`);
@@ -5937,7 +5967,7 @@ caller from the bearer token, the gateway answers 401 without that header.
5937
5967
  "after",
5938
5968
  "\nWhat the stdio .mcp.json entry spawns. Reads newline-delimited JSON-RPC 2.0 on\nstdin and writes responses on stdout. The API key comes from OUTERLAYER_API_KEY\nor ~/.outerlayer/config.json at start-up; with neither the command exits 1 and\nprints why, which the MCP client shows as the connect error.\n"
5939
5969
  ).action(async (opts) => {
5940
- const { runMcpServe, handleMcpServeError } = await import('./mcp-serve-cmd-U6USKHYR.js');
5970
+ const { runMcpServe, handleMcpServeError } = await import('./mcp-serve-cmd-HLS24XCG.js');
5941
5971
  try {
5942
5972
  await runMcpServe({ url: opts.url, appId: opts.appId });
5943
5973
  } catch (err) {
@@ -5958,7 +5988,7 @@ would get, the instruction files and the names of the skills. It warns when the
5958
5988
  no \`build\`. It needs the context-read permission: a login or a factory key with it is enough.
5959
5989
  `
5960
5990
  ).action(async (opts) => {
5961
- const { runContextShow, ContextShowError } = await import('./context-show-cmd-7QEHUOEL.js');
5991
+ const { runContextShow, ContextShowError } = await import('./context-show-cmd-FGMRJ7IG.js');
5962
5992
  try {
5963
5993
  const result = await runContextShow({ repo: opts.repo, json: opts.json, url: opts.url, apiKey: opts.apiKey, appId: opts.appId });
5964
5994
  process.stdout.write(result.output);