@joshuafolkken/kit 1.3044.0 → 1.3092.0

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 (1236) hide show
  1. package/.claude/skills/workflow-commands/backlogrun-steps.md +1 -1
  2. package/.claude/skills/workflow-commands/fullrun-steps.md +3 -3
  3. package/.claude/skills/workflow-commands/halfrun.md +3 -2
  4. package/.claude/skills/workflow-commands/kickoff.md +9 -2
  5. package/.claude/skills/workflow-commands/prerequisite.md +2 -0
  6. package/.claude/skills/workflow-commands/retrospective.md +2 -1
  7. package/.claude/skills/workflow-commands/split-assessment.md +4 -0
  8. package/.github/workflows/ci.yml +0 -20
  9. package/.github/workflows/pr-classification.yml +0 -5
  10. package/.github/workflows/publish.yml +0 -1
  11. package/.github/workflows/sonar-qube.yml +0 -5
  12. package/README.md +2 -0
  13. package/SECURITY.md +2 -1
  14. package/dist/.inputs-verified.json +1 -1
  15. package/dist/commands/adopt.js +29 -20
  16. package/dist/commands/auto-ok-judge-cli.js +43 -33
  17. package/dist/commands/auto-ok-main.js +73 -74
  18. package/dist/commands/backlog-budget-main.js +5 -6
  19. package/dist/commands/backlog-drive-cli.js +286 -305
  20. package/dist/commands/backlog-next-main.js +111 -108
  21. package/dist/commands/backlog-offer-main.js +148 -112
  22. package/dist/commands/backlog-plan-cli.js +123 -120
  23. package/dist/commands/backlog-triage-cli.js +131 -128
  24. package/dist/commands/backlogrun-cli.js +273 -264
  25. package/dist/commands/behavior-cli.js +23 -26
  26. package/dist/commands/bytes-command.js +56 -59
  27. package/dist/commands/cases-cli.js +4 -5
  28. package/dist/commands/check-commit-message-main.js +3 -4
  29. package/dist/commands/check-related.js +125 -119
  30. package/dist/commands/chunk-26JL4UU4.js +365 -0
  31. package/dist/commands/chunk-2BIVHPCA.js +85 -0
  32. package/dist/commands/chunk-2CKJODCK.js +245 -0
  33. package/dist/commands/chunk-2E6PSONB.js +46 -0
  34. package/dist/commands/chunk-2GA4775H.js +77 -0
  35. package/dist/commands/chunk-2O64H5UJ.js +462 -0
  36. package/dist/commands/chunk-2OEXY4GM.js +252 -0
  37. package/dist/commands/chunk-2OMIHPPE.js +51 -0
  38. package/dist/commands/chunk-2ONSHOAY.js +46 -0
  39. package/dist/commands/chunk-2Q7MGFYB.js +1208 -0
  40. package/dist/commands/chunk-2SA3W4JF.js +41 -0
  41. package/dist/commands/chunk-2VY7CJ2R.js +212 -0
  42. package/dist/commands/chunk-2WRDAQPJ.js +74 -0
  43. package/dist/commands/chunk-2XLR7R6E.js +541 -0
  44. package/dist/commands/chunk-2XZF3YFY.js +47 -0
  45. package/dist/commands/chunk-33TAOZUE.js +29 -0
  46. package/dist/commands/chunk-374XGAWD.js +158 -0
  47. package/dist/commands/chunk-3CJNQU7P.js +179 -0
  48. package/dist/commands/chunk-3D5T6KMW.js +59 -0
  49. package/dist/commands/chunk-3EW5LTN3.js +114 -0
  50. package/dist/commands/chunk-3F3RNIG2.js +128 -0
  51. package/dist/commands/chunk-3FLTEJZY.js +74 -0
  52. package/dist/commands/chunk-3JWPTRNI.js +60 -0
  53. package/dist/commands/chunk-3MQTOUXT.js +94 -0
  54. package/dist/commands/chunk-3PCUERXE.js +19 -0
  55. package/dist/commands/chunk-3U6A5WON.js +173 -0
  56. package/dist/commands/chunk-3YT3RCSI.js +140 -0
  57. package/dist/commands/chunk-43DU7DYZ.js +540 -0
  58. package/dist/commands/chunk-43H725LG.js +132 -0
  59. package/dist/commands/chunk-46STCE6Q.js +48 -0
  60. package/dist/commands/chunk-46WEC6HZ.js +82 -0
  61. package/dist/commands/chunk-47J4KOZP.js +46 -0
  62. package/dist/commands/chunk-47W7PF4T.js +22 -0
  63. package/dist/commands/chunk-4F4KARQN.js +229 -0
  64. package/dist/commands/chunk-4GUGC4IW.js +338 -0
  65. package/dist/commands/chunk-4HB7NWXP.js +263 -0
  66. package/dist/commands/chunk-4HOTJAO6.js +89 -0
  67. package/dist/commands/chunk-4I5AA4P5.js +237 -0
  68. package/dist/commands/chunk-4IDINPBE.js +525 -0
  69. package/dist/commands/chunk-4K7KLR7L.js +69 -0
  70. package/dist/commands/chunk-4MGTNY2L.js +347 -0
  71. package/dist/commands/chunk-4NSIW3UB.js +104 -0
  72. package/dist/commands/chunk-4YTKV6WV.js +37 -0
  73. package/dist/commands/chunk-5ARNFMQK.js +1263 -0
  74. package/dist/commands/chunk-5AZTSESD.js +114 -0
  75. package/dist/commands/chunk-5FUI2MLY.js +89 -0
  76. package/dist/commands/chunk-5GI5GLC4.js +214 -0
  77. package/dist/commands/chunk-5IHEBIPD.js +333 -0
  78. package/dist/commands/chunk-5KAW5GPF.js +44 -0
  79. package/dist/commands/chunk-5KSJEWXR.js +77 -0
  80. package/dist/commands/chunk-5OF2B4BF.js +35 -0
  81. package/dist/commands/chunk-5PLJ7R3D.js +126 -0
  82. package/dist/commands/chunk-5PPWXOCF.js +64 -0
  83. package/dist/commands/chunk-5VQCL33M.js +46 -0
  84. package/dist/commands/chunk-5Y7FOJLX.js +186 -0
  85. package/dist/commands/chunk-5YTEMF4O.js +110 -0
  86. package/dist/commands/chunk-62NYXZCC.js +241 -0
  87. package/dist/commands/chunk-6KUA7MRG.js +64 -0
  88. package/dist/commands/chunk-6LDEZFYR.js +88 -0
  89. package/dist/commands/chunk-6NXIZMIK.js +122 -0
  90. package/dist/commands/chunk-6O45F6YI.js +86 -0
  91. package/dist/commands/chunk-6OHJBQDE.js +184 -0
  92. package/dist/commands/chunk-6WDCCG3M.js +1249 -0
  93. package/dist/commands/chunk-6ZHXEQAI.js +715 -0
  94. package/dist/commands/chunk-736NECRD.js +16 -0
  95. package/dist/commands/chunk-77LEKVEE.js +32 -0
  96. package/dist/commands/chunk-7CX5VYOL.js +50 -0
  97. package/dist/commands/chunk-7DGHFBU7.js +247 -0
  98. package/dist/commands/chunk-7E43YW53.js +128 -0
  99. package/dist/commands/chunk-7EAYFMDN.js +235 -0
  100. package/dist/commands/chunk-7HP3FQGQ.js +51 -0
  101. package/dist/commands/chunk-7JOOMFDI.js +155 -0
  102. package/dist/commands/chunk-7OEBSPPU.js +321 -0
  103. package/dist/commands/chunk-A3JYZWBS.js +803 -0
  104. package/dist/commands/chunk-A3LCN4KA.js +84 -0
  105. package/dist/commands/chunk-ABLXBG6C.js +98 -0
  106. package/dist/commands/chunk-AN7BFVHU.js +244 -0
  107. package/dist/commands/chunk-AQCVEQSM.js +99 -0
  108. package/dist/commands/chunk-AT46EY7H.js +393 -0
  109. package/dist/commands/chunk-AU563VKH.js +75 -0
  110. package/dist/commands/chunk-AUTD5FV2.js +1077 -0
  111. package/dist/commands/chunk-AV26CMY6.js +304 -0
  112. package/dist/commands/chunk-B2PJEV3S.js +246 -0
  113. package/dist/commands/chunk-B545ENGY.js +214 -0
  114. package/dist/commands/chunk-B5HP6T4L.js +170 -0
  115. package/dist/commands/chunk-B5XYAWNN.js +37 -0
  116. package/dist/commands/chunk-B73IIRMS.js +207 -0
  117. package/dist/commands/chunk-BAEDHPXW.js +160 -0
  118. package/dist/commands/chunk-BDSG6JKH.js +977 -0
  119. package/dist/commands/chunk-BE6F4YK2.js +769 -0
  120. package/dist/commands/chunk-BFKTUD3V.js +33 -0
  121. package/dist/commands/chunk-BLRXHK2V.js +17 -0
  122. package/dist/commands/chunk-BLUAO4QW.js +173 -0
  123. package/dist/commands/chunk-BML6MEUB.js +326 -0
  124. package/dist/commands/chunk-BPDNGJXY.js +63 -0
  125. package/dist/commands/chunk-BQLKWGGC.js +118 -0
  126. package/dist/commands/chunk-BRMJVCP7.js +167 -0
  127. package/dist/commands/chunk-BRWR5YKU.js +268 -0
  128. package/dist/commands/chunk-BUZAYEBD.js +319 -0
  129. package/dist/commands/chunk-BVUL57IX.js +139 -0
  130. package/dist/commands/chunk-CC4BIGCA.js +20 -0
  131. package/dist/commands/chunk-CCHJZEF5.js +4220 -0
  132. package/dist/commands/chunk-CDK7QZWG.js +44 -0
  133. package/dist/commands/chunk-CDYFUCDC.js +72 -0
  134. package/dist/commands/chunk-CEADAQIL.js +170 -0
  135. package/dist/commands/chunk-CNL3SLM6.js +116 -0
  136. package/dist/commands/chunk-CNQ7D2GZ.js +104 -0
  137. package/dist/commands/chunk-CTXJVMHW.js +48 -0
  138. package/dist/commands/chunk-CUWT6UQO.js +13 -0
  139. package/dist/commands/chunk-CVRDJCOE.js +125 -0
  140. package/dist/commands/chunk-D6CF5QGM.js +80 -0
  141. package/dist/commands/chunk-DACNQAXC.js +20 -0
  142. package/dist/commands/chunk-DDOS32JU.js +74 -0
  143. package/dist/commands/chunk-DDZVMXZD.js +481 -0
  144. package/dist/commands/chunk-DF6QD4AF.js +52 -0
  145. package/dist/commands/chunk-DFEXNB44.js +159 -0
  146. package/dist/commands/chunk-DHDKG5HZ.js +151 -0
  147. package/dist/commands/chunk-DHJRFBKO.js +223 -0
  148. package/dist/commands/chunk-DKDWOE3C.js +78 -0
  149. package/dist/commands/chunk-DKO5VTEH.js +65 -0
  150. package/dist/commands/chunk-DLHH3MLS.js +85 -0
  151. package/dist/commands/chunk-DOYNK72G.js +81 -0
  152. package/dist/commands/chunk-DS53UUDH.js +679 -0
  153. package/dist/commands/chunk-DUA4E4ES.js +230 -0
  154. package/dist/commands/chunk-DURHGVRC.js +33 -0
  155. package/dist/commands/chunk-DVCMQMRN.js +191 -0
  156. package/dist/commands/chunk-E3YKMCCJ.js +108 -0
  157. package/dist/commands/chunk-E4F2RTKC.js +272 -0
  158. package/dist/commands/chunk-E4PFCTXN.js +127 -0
  159. package/dist/commands/chunk-EAOTR2WL.js +24 -0
  160. package/dist/commands/chunk-EE4VOZJP.js +167 -0
  161. package/dist/commands/chunk-EHVEWJQ4.js +33 -0
  162. package/dist/commands/chunk-EMFSPPMH.js +98 -0
  163. package/dist/commands/chunk-EN65ZS3S.js +73 -0
  164. package/dist/commands/chunk-ES42XPAD.js +123 -0
  165. package/dist/commands/chunk-ESUY7KTZ.js +137 -0
  166. package/dist/commands/chunk-ET6IRQ3L.js +330 -0
  167. package/dist/commands/chunk-EWCUT7U2.js +1314 -0
  168. package/dist/commands/chunk-EWXXEGXL.js +149 -0
  169. package/dist/commands/chunk-EZYW54OQ.js +7569 -0
  170. package/dist/commands/chunk-F2RDEF2J.js +205 -0
  171. package/dist/commands/chunk-F2U46HAE.js +52 -0
  172. package/dist/commands/chunk-F2VYWU6Z.js +653 -0
  173. package/dist/commands/chunk-F4SGOTUF.js +36 -0
  174. package/dist/commands/chunk-F4YMLVWN.js +183 -0
  175. package/dist/commands/chunk-F5N2QIFD.js +213 -0
  176. package/dist/commands/chunk-F7B4ESZE.js +80 -0
  177. package/dist/commands/chunk-FJM2HWKW.js +299 -0
  178. package/dist/commands/chunk-FJMXUDEY.js +3985 -0
  179. package/dist/commands/chunk-FM7VVAK6.js +426 -0
  180. package/dist/commands/chunk-FQWRM5FC.js +67 -0
  181. package/dist/commands/chunk-FT33ZCSB.js +298 -0
  182. package/dist/commands/chunk-G2DNS74C.js +53 -0
  183. package/dist/commands/chunk-G75GWNNY.js +101 -0
  184. package/dist/commands/chunk-GA2YSPFH.js +32 -0
  185. package/dist/commands/chunk-GAVSK6P6.js +230 -0
  186. package/dist/commands/chunk-GB2BRQVL.js +300 -0
  187. package/dist/commands/chunk-GBMZXFFC.js +44 -0
  188. package/dist/commands/chunk-GDP7QXYE.js +76 -0
  189. package/dist/commands/chunk-GGWXF7RJ.js +70 -0
  190. package/dist/commands/chunk-GHOTKHI4.js +30 -0
  191. package/dist/commands/chunk-GMVN6ZP2.js +48 -0
  192. package/dist/commands/chunk-GNTTGRCX.js +133 -0
  193. package/dist/commands/chunk-GOY5JECO.js +130 -0
  194. package/dist/commands/chunk-GVDRRBHZ.js +507 -0
  195. package/dist/commands/chunk-GWTBIGYC.js +550 -0
  196. package/dist/commands/chunk-GZL6ISVM.js +72 -0
  197. package/dist/commands/chunk-HALHQILI.js +51 -0
  198. package/dist/commands/chunk-HAT7AFBF.js +85 -0
  199. package/dist/commands/chunk-HDVSZ6CZ.js +292 -0
  200. package/dist/commands/chunk-HE3GOMR7.js +88 -0
  201. package/dist/commands/chunk-HEFUC4ZW.js +65 -0
  202. package/dist/commands/chunk-HESWKELD.js +60 -0
  203. package/dist/commands/chunk-HNFBEB4L.js +77 -0
  204. package/dist/commands/chunk-HRN73FQJ.js +77 -0
  205. package/dist/commands/chunk-HYE3MBAN.js +113 -0
  206. package/dist/commands/chunk-IAB6LCJL.js +18 -0
  207. package/dist/commands/chunk-IAGENI2U.js +42 -0
  208. package/dist/commands/chunk-ICPVBHIX.js +48 -0
  209. package/dist/commands/chunk-IEKW3ON6.js +161 -0
  210. package/dist/commands/chunk-IOKOHB7P.js +109 -0
  211. package/dist/commands/chunk-IONGJJYM.js +179 -0
  212. package/dist/commands/chunk-IP23WOWP.js +126 -0
  213. package/dist/commands/chunk-IPS7EBE5.js +140 -0
  214. package/dist/commands/chunk-IXZZSST7.js +459 -0
  215. package/dist/commands/chunk-J4XHEOOW.js +156 -0
  216. package/dist/commands/chunk-JDHLHYJJ.js +208 -0
  217. package/dist/commands/chunk-JEYITIWB.js +423 -0
  218. package/dist/commands/chunk-JGX7JIW4.js +126 -0
  219. package/dist/commands/chunk-JHIGDFBS.js +59 -0
  220. package/dist/commands/chunk-JI2EGXZX.js +53 -0
  221. package/dist/commands/chunk-JNV3VRK2.js +47 -0
  222. package/dist/commands/chunk-JPMAW2VZ.js +91 -0
  223. package/dist/commands/chunk-JQEY6KDP.js +90 -0
  224. package/dist/commands/chunk-JSJDIEGZ.js +88 -0
  225. package/dist/commands/chunk-JT5ICRFF.js +44 -0
  226. package/dist/commands/chunk-JUCJ4Y42.js +77 -0
  227. package/dist/commands/chunk-K3OZBV3L.js +49 -0
  228. package/dist/commands/chunk-K5H3CLZZ.js +430 -0
  229. package/dist/commands/chunk-K6P5PISC.js +114 -0
  230. package/dist/commands/chunk-KD3SEAMV.js +402 -0
  231. package/dist/commands/chunk-KDCHY7XO.js +88 -0
  232. package/dist/commands/chunk-KDGX3JTV.js +51 -0
  233. package/dist/commands/chunk-KGSEWOKI.js +353 -0
  234. package/dist/commands/chunk-KHGDZQRG.js +271 -0
  235. package/dist/commands/chunk-KIS7JFNP.js +217 -0
  236. package/dist/commands/chunk-KKHD3C2P.js +114 -0
  237. package/dist/commands/chunk-KKIIY5I5.js +67 -0
  238. package/dist/commands/chunk-KN46UC77.js +114 -0
  239. package/dist/commands/chunk-KP2BVAS5.js +125 -0
  240. package/dist/commands/chunk-KPAJBJXG.js +63 -0
  241. package/dist/commands/chunk-KPMAJP6D.js +145 -0
  242. package/dist/commands/chunk-KR6WUAJM.js +122 -0
  243. package/dist/commands/chunk-KWLNK2NJ.js +391 -0
  244. package/dist/commands/chunk-L2CLCNXW.js +144 -0
  245. package/dist/commands/chunk-L7MDU6D7.js +155 -0
  246. package/dist/commands/chunk-L7VD4MLF.js +78 -0
  247. package/dist/commands/chunk-LBMAJDGN.js +124 -0
  248. package/dist/commands/chunk-LBVYFW3I.js +38 -0
  249. package/dist/commands/chunk-LE3M42CF.js +350 -0
  250. package/dist/commands/chunk-LIPUSINQ.js +140 -0
  251. package/dist/commands/chunk-LJVZWE3A.js +1885 -0
  252. package/dist/commands/chunk-LKSSQVDA.js +49 -0
  253. package/dist/commands/chunk-LL6G34MF.js +93 -0
  254. package/dist/commands/chunk-LNQOL2CL.js +321 -0
  255. package/dist/commands/chunk-LS7P324N.js +72 -0
  256. package/dist/commands/chunk-LU5EOGFQ.js +50 -0
  257. package/dist/commands/chunk-LX2ENXHZ.js +197 -0
  258. package/dist/commands/chunk-M32UPB2D.js +110 -0
  259. package/dist/commands/chunk-M3UGRNNB.js +103 -0
  260. package/dist/commands/chunk-M4WG74Q7.js +260 -0
  261. package/dist/commands/chunk-M5HA2ZCG.js +105 -0
  262. package/dist/commands/chunk-MDGPJOLK.js +351 -0
  263. package/dist/commands/chunk-MDKRTUE4.js +288 -0
  264. package/dist/commands/chunk-MFZVRWRS.js +34 -0
  265. package/dist/commands/chunk-MHXIJKGP.js +304 -0
  266. package/dist/commands/chunk-MK4CARBI.js +90 -0
  267. package/dist/commands/chunk-MLJDW7YN.js +64 -0
  268. package/dist/commands/chunk-MNLHYAJO.js +80 -0
  269. package/dist/commands/chunk-MOD3FG4V.js +419 -0
  270. package/dist/commands/chunk-MRAEJLXL.js +83 -0
  271. package/dist/commands/chunk-MRW2WYJS.js +68 -0
  272. package/dist/commands/chunk-MXPCEZL5.js +23 -0
  273. package/dist/commands/chunk-N2XH7QBY.js +103 -0
  274. package/dist/commands/chunk-N2ZF6T4E.js +332 -0
  275. package/dist/commands/chunk-N36NZMAL.js +79 -0
  276. package/dist/commands/chunk-N4EMFHQ6.js +114 -0
  277. package/dist/commands/chunk-N4P64UIH.js +211 -0
  278. package/dist/commands/chunk-NABSSY4P.js +204 -0
  279. package/dist/commands/chunk-NDQIJBRQ.js +100 -0
  280. package/dist/commands/chunk-NDR4PCVG.js +29 -0
  281. package/dist/commands/chunk-NEOCCN6D.js +302 -0
  282. package/dist/commands/chunk-NFKWFOFM.js +45 -0
  283. package/dist/commands/chunk-NFUPJBBG.js +516 -0
  284. package/dist/commands/chunk-NHEBKL7X.js +170 -0
  285. package/dist/commands/chunk-NHTEC5U4.js +99 -0
  286. package/dist/commands/chunk-NOSG3RUP.js +84 -0
  287. package/dist/commands/chunk-NOSODWWK.js +1132 -0
  288. package/dist/commands/chunk-NPXXYG6Z.js +580 -0
  289. package/dist/commands/chunk-NR2JDBPV.js +75 -0
  290. package/dist/commands/chunk-NRULNBYI.js +1153 -0
  291. package/dist/commands/chunk-NTGF5N3N.js +110 -0
  292. package/dist/commands/chunk-NTIVNQKF.js +73 -0
  293. package/dist/commands/chunk-NUCFIYZL.js +119 -0
  294. package/dist/commands/chunk-NVMV7BYX.js +88 -0
  295. package/dist/commands/chunk-NYWPTYGL.js +169 -0
  296. package/dist/commands/chunk-NZ45KOLL.js +104 -0
  297. package/dist/commands/chunk-O45BX4EL.js +39 -0
  298. package/dist/commands/chunk-O46T4ANI.js +229 -0
  299. package/dist/commands/chunk-O5JGV7NA.js +245 -0
  300. package/dist/commands/chunk-O7ESC4HL.js +566 -0
  301. package/dist/commands/chunk-OBYLXHCH.js +86 -0
  302. package/dist/commands/chunk-OKN63ZH5.js +109 -0
  303. package/dist/commands/chunk-ON4IKRGS.js +469 -0
  304. package/dist/commands/chunk-OT74RSQO.js +82 -0
  305. package/dist/commands/chunk-OVCVINYW.js +143 -0
  306. package/dist/commands/chunk-OZKLVTYI.js +342 -0
  307. package/dist/commands/chunk-P3LJ2Q4N.js +555 -0
  308. package/dist/commands/chunk-P43GWYR6.js +185 -0
  309. package/dist/commands/chunk-P6ASP2DY.js +132 -0
  310. package/dist/commands/chunk-PBAEJ5PT.js +38 -0
  311. package/dist/commands/chunk-PCZROH3R.js +100 -0
  312. package/dist/commands/chunk-PF3PMT2Q.js +46 -0
  313. package/dist/commands/chunk-PILH72AV.js +170 -0
  314. package/dist/commands/chunk-PJYTUUTH.js +34 -0
  315. package/dist/commands/chunk-PKXTISWR.js +58 -0
  316. package/dist/commands/chunk-PSGLUBSB.js +74 -0
  317. package/dist/commands/chunk-PUQA7F6Y.js +186 -0
  318. package/dist/commands/chunk-PVRDJU2B.js +126 -0
  319. package/dist/commands/chunk-Q3HM2BEH.js +45 -0
  320. package/dist/commands/chunk-Q42NF2TL.js +47 -0
  321. package/dist/commands/chunk-Q4ULMZAS.js +106 -0
  322. package/dist/commands/chunk-QCRUPRQ2.js +207 -0
  323. package/dist/commands/chunk-QFIKPGMC.js +280 -0
  324. package/dist/commands/chunk-QSBYULSS.js +100 -0
  325. package/dist/commands/chunk-QSJCZATC.js +18 -0
  326. package/dist/commands/chunk-QTJPCXEW.js +23 -0
  327. package/dist/commands/chunk-QTQAI2M2.js +179 -0
  328. package/dist/commands/chunk-QTVVFV4Q.js +127 -0
  329. package/dist/commands/chunk-QX2EMUXV.js +102 -0
  330. package/dist/commands/chunk-QXBOECGL.js +272 -0
  331. package/dist/commands/chunk-QXCG3SG4.js +88 -0
  332. package/dist/commands/chunk-QZVMGAWV.js +307 -0
  333. package/dist/commands/chunk-R36VZIKU.js +53 -0
  334. package/dist/commands/chunk-R3F7F3TX.js +94 -0
  335. package/dist/commands/chunk-R5AABJZJ.js +1062 -0
  336. package/dist/commands/chunk-R7PYR4HW.js +389 -0
  337. package/dist/commands/chunk-RDUFVQVJ.js +997 -0
  338. package/dist/commands/chunk-RESNXNDG.js +54 -0
  339. package/dist/commands/chunk-RFIOZTXY.js +305 -0
  340. package/dist/commands/chunk-RFWB2KAV.js +102 -0
  341. package/dist/commands/chunk-RFXON3FK.js +25 -0
  342. package/dist/commands/chunk-RGEB5L37.js +66 -0
  343. package/dist/commands/chunk-RGRLLF2J.js +119 -0
  344. package/dist/commands/chunk-RLRIMYXM.js +178 -0
  345. package/dist/commands/chunk-RNB3DQOZ.js +70 -0
  346. package/dist/commands/chunk-RO4QEZJO.js +172 -0
  347. package/dist/commands/chunk-RS5HBJY6.js +161 -0
  348. package/dist/commands/chunk-RV7EQIE4.js +202 -0
  349. package/dist/commands/chunk-RWPCK3CO.js +41 -0
  350. package/dist/commands/chunk-RWYSVFIA.js +250 -0
  351. package/dist/commands/chunk-RYKK75YT.js +289 -0
  352. package/dist/commands/chunk-S4JE63QE.js +704 -0
  353. package/dist/commands/chunk-S4OZJIXD.js +134 -0
  354. package/dist/commands/chunk-SD4EX75H.js +177 -0
  355. package/dist/commands/chunk-SJITWFNY.js +480 -0
  356. package/dist/commands/chunk-SKGDMAIA.js +33 -0
  357. package/dist/commands/chunk-SNSZ25XZ.js +393 -0
  358. package/dist/commands/chunk-SQZZHK6X.js +119 -0
  359. package/dist/commands/chunk-SRTEE34O.js +93 -0
  360. package/dist/commands/chunk-SYTCTLMD.js +285 -0
  361. package/dist/commands/chunk-T6JUDQMW.js +181 -0
  362. package/dist/commands/chunk-T6OUNP7E.js +426 -0
  363. package/dist/commands/chunk-TEXUEBGE.js +208 -0
  364. package/dist/commands/chunk-TFDVTU6O.js +910 -0
  365. package/dist/commands/chunk-TFYYXETQ.js +472 -0
  366. package/dist/commands/chunk-TMFKVJUW.js +121 -0
  367. package/dist/commands/chunk-TNJU4CXD.js +32 -0
  368. package/dist/commands/chunk-TRHWBUWE.js +61 -0
  369. package/dist/commands/chunk-TROCFVCU.js +45 -0
  370. package/dist/commands/chunk-TTTZZN7F.js +269 -0
  371. package/dist/commands/chunk-TUBBESHU.js +85 -0
  372. package/dist/commands/chunk-TVZIFZZN.js +62 -0
  373. package/dist/commands/chunk-TXRWAL63.js +144 -0
  374. package/dist/commands/chunk-U46YTYJQ.js +92 -0
  375. package/dist/commands/chunk-U5EO4QEV.js +48 -0
  376. package/dist/commands/chunk-UCO333EX.js +47 -0
  377. package/dist/commands/chunk-UIXQ4IYT.js +445 -0
  378. package/dist/commands/chunk-UJGNYPMD.js +716 -0
  379. package/dist/commands/chunk-URZ4RDC4.js +220 -0
  380. package/dist/commands/chunk-UUH3DE77.js +57 -0
  381. package/dist/commands/chunk-UVY5ODCM.js +60 -0
  382. package/dist/commands/chunk-UWMB6EOU.js +45 -0
  383. package/dist/commands/chunk-UX3HCPLX.js +449 -0
  384. package/dist/commands/chunk-UY62WJV6.js +120 -0
  385. package/dist/commands/chunk-V2T5DP3B.js +224 -0
  386. package/dist/commands/chunk-VAHQ4AFM.js +585 -0
  387. package/dist/commands/chunk-VCWNMRH7.js +71 -0
  388. package/dist/commands/chunk-VHLDQ3PH.js +30 -0
  389. package/dist/commands/chunk-VL5I2IOD.js +332 -0
  390. package/dist/commands/chunk-VLN6TSPJ.js +139 -0
  391. package/dist/commands/chunk-VMG3QB6C.js +81 -0
  392. package/dist/commands/chunk-VO25PMGS.js +58 -0
  393. package/dist/commands/chunk-VTLWODJ2.js +133 -0
  394. package/dist/commands/chunk-VXE3V3OC.js +335 -0
  395. package/dist/commands/chunk-VY7ZJMDT.js +469 -0
  396. package/dist/commands/chunk-W3MDLQZF.js +137 -0
  397. package/dist/commands/chunk-W4BR6QNU.js +1241 -0
  398. package/dist/commands/chunk-WCYRNNKF.js +76 -0
  399. package/dist/commands/chunk-WEUUJIWQ.js +84 -0
  400. package/dist/commands/chunk-WNBJK6QE.js +84 -0
  401. package/dist/commands/chunk-WR5PKCQW.js +61 -0
  402. package/dist/commands/chunk-WR73HTRG.js +121 -0
  403. package/dist/commands/chunk-WRNMUQTD.js +95 -0
  404. package/dist/commands/chunk-WROJTXWZ.js +138 -0
  405. package/dist/commands/chunk-WTIPX5NG.js +43 -0
  406. package/dist/commands/chunk-WWLCQREY.js +225 -0
  407. package/dist/commands/chunk-WXLW7S4M.js +71 -0
  408. package/dist/commands/chunk-WXXLJQBO.js +67 -0
  409. package/dist/commands/chunk-X4LYH6Q4.js +56 -0
  410. package/dist/commands/chunk-XAEL24EG.js +66 -0
  411. package/dist/commands/chunk-XCCT6GKA.js +74 -0
  412. package/dist/commands/chunk-XDR2BRDL.js +216 -0
  413. package/dist/commands/chunk-XRQMVAB4.js +85 -0
  414. package/dist/commands/chunk-XSKJAG72.js +91 -0
  415. package/dist/commands/chunk-XTJA34ND.js +492 -0
  416. package/dist/commands/chunk-XUXCFPDK.js +218 -0
  417. package/dist/commands/chunk-XXPDFJRI.js +48 -0
  418. package/dist/commands/chunk-Y6OGDG5I.js +49 -0
  419. package/dist/commands/chunk-YEAE46TS.js +98 -0
  420. package/dist/commands/chunk-YEQFAEVW.js +112 -0
  421. package/dist/commands/chunk-YJZAD4Z5.js +103 -0
  422. package/dist/commands/chunk-YMAEYY5R.js +278 -0
  423. package/dist/commands/chunk-YNCF66RK.js +1052 -0
  424. package/dist/commands/chunk-YOA25SII.js +210 -0
  425. package/dist/commands/chunk-YOZTZMAT.js +38 -0
  426. package/dist/commands/chunk-YSGRHVZG.js +897 -0
  427. package/dist/commands/chunk-YSLGWRQN.js +646 -0
  428. package/dist/commands/chunk-YTXCLGGL.js +168 -0
  429. package/dist/commands/chunk-YVHJN2HS.js +74 -0
  430. package/dist/commands/chunk-YY7XVVSB.js +43 -0
  431. package/dist/commands/chunk-Z5GZV4DV.js +16 -0
  432. package/dist/commands/chunk-Z6QLFPFB.js +907 -0
  433. package/dist/commands/chunk-ZB52ZIEA.js +1629 -0
  434. package/dist/commands/chunk-ZCD4AV2P.js +73 -0
  435. package/dist/commands/chunk-ZCHZU6NX.js +799 -0
  436. package/dist/commands/chunk-ZEH2B3DF.js +239 -0
  437. package/dist/commands/chunk-ZEUKX3RZ.js +245 -0
  438. package/dist/commands/chunk-ZGANVZCA.js +92 -0
  439. package/dist/commands/chunk-ZGBXUY7R.js +198 -0
  440. package/dist/commands/chunk-ZGEUWHFF.js +297 -0
  441. package/dist/commands/chunk-ZHSNQ2F7.js +161 -0
  442. package/dist/commands/chunk-ZIIUBGON.js +773 -0
  443. package/dist/commands/chunk-ZJ5S4VFD.js +258 -0
  444. package/dist/commands/chunk-ZNIIA275.js +59 -0
  445. package/dist/commands/chunk-ZV6BZZJ2.js +271 -0
  446. package/dist/commands/ci-timing-cli.js +22 -3
  447. package/dist/commands/code-symbol-cli.js +21 -7
  448. package/dist/commands/codex-hook-adapter.js +124 -119
  449. package/dist/commands/command-derive.js +9 -11
  450. package/dist/commands/cost-audit-main.js +118 -119
  451. package/dist/commands/cost-main.js +5 -7
  452. package/dist/commands/cspell-cached.js +55 -57
  453. package/dist/commands/defect-origin-main.js +42 -37
  454. package/dist/commands/defect-report-main.js +33 -25
  455. package/dist/commands/diff-summary-cli.js +3 -4
  456. package/dist/commands/disposition-cli.js +117 -118
  457. package/dist/commands/doctor.js +24 -11
  458. package/dist/commands/document-read-cli.js +50 -53
  459. package/dist/commands/document-section-main.js +50 -53
  460. package/dist/commands/dogfood-commit-cli.js +19 -4
  461. package/dist/commands/effect-audit-cli.js +40 -41
  462. package/dist/commands/epic-audit-main.js +88 -86
  463. package/dist/commands/epic-bundle-main.js +122 -119
  464. package/dist/commands/epic-check.js +37 -31
  465. package/dist/commands/epic-main.js +129 -126
  466. package/dist/commands/epic-next-main.js +85 -83
  467. package/dist/commands/eval-run.js +6 -7
  468. package/dist/commands/format-edited-cli.js +71 -46
  469. package/dist/commands/format.js +41 -56
  470. package/dist/commands/fresh-machine-cli.js +24 -7
  471. package/dist/commands/gh-usage-cli.js +22 -22
  472. package/dist/commands/git-followup-workflow.js +158 -158
  473. package/dist/commands/git-gh-checks-failed-main.js +23 -15
  474. package/dist/commands/git-workflow.js +52 -53
  475. package/dist/commands/github-release-cli.js +3 -3
  476. package/dist/commands/hook-ledger-cli.js +93 -94
  477. package/dist/commands/init-main.js +40 -40
  478. package/dist/commands/inputs.json +2020 -1980
  479. package/dist/commands/issue-ack-cli.js +28 -21
  480. package/dist/commands/issue-already-done-cli.js +107 -110
  481. package/dist/commands/issue-body-cli.js +71 -73
  482. package/dist/commands/issue-cite-main.js +35 -28
  483. package/dist/commands/issue-comment-main.js +36 -30
  484. package/dist/commands/issue-consolidate-cli.js +54 -54
  485. package/dist/commands/issue-file-main.js +274 -148
  486. package/dist/commands/issue-fold-existing-cli.js +126 -123
  487. package/dist/commands/issue-fold-main.js +57 -60
  488. package/dist/commands/issue-lint-main.js +59 -61
  489. package/dist/commands/issue-measured-cli.js +108 -110
  490. package/dist/commands/issue-plan-cli.js +156 -155
  491. package/dist/commands/issue-premise-unmet-cli.js +111 -113
  492. package/dist/commands/issue-priority-cli.js +38 -32
  493. package/dist/commands/issue-read-main.js +38 -33
  494. package/dist/commands/issue-release-class-cli.js +37 -31
  495. package/dist/commands/issue-release-main.js +35 -29
  496. package/dist/commands/issue-scout-main.js +123 -120
  497. package/dist/commands/issue-spill-main.js +149 -144
  498. package/dist/commands/issue-state-main.js +36 -31
  499. package/dist/commands/issue-tick-cli.js +37 -31
  500. package/dist/commands/josh-completion.js +21 -24
  501. package/dist/commands/lane-adopt-cli.js +53 -55
  502. package/dist/commands/lane-breakdown-cli.js +193 -172
  503. package/dist/commands/lane-cli.js +199 -180
  504. package/dist/commands/lane-launch-main.js +106 -56
  505. package/dist/commands/lane-limit-cli.js +119 -116
  506. package/dist/commands/lane-measure-cli.js +408 -245
  507. package/dist/commands/lane-pause-cli.js +51 -54
  508. package/dist/commands/lane-plan-cli.js +148 -147
  509. package/dist/commands/lane-resolve-cli.js +48 -50
  510. package/dist/commands/lane-restart-cli.js +185 -168
  511. package/dist/commands/lane-why-cli.js +121 -122
  512. package/dist/commands/lane-withdraw-cli.js +84 -86
  513. package/dist/commands/latest-corepack.js +3 -2
  514. package/dist/commands/latest-if-required-cli.js +12 -15
  515. package/dist/commands/latest-lane-guard-main.js +2 -3
  516. package/dist/commands/latest-scope-main.js +5 -7
  517. package/dist/commands/latest-update.js +3 -2
  518. package/dist/commands/lines-command.js +8 -10
  519. package/dist/commands/lint-parallel-main.js +65 -67
  520. package/dist/commands/lint-related.js +149 -133
  521. package/dist/commands/lint-rule.js +64 -66
  522. package/dist/commands/lockfile-policy.js +29 -32
  523. package/dist/commands/main-merge-main.js +23 -25
  524. package/dist/commands/main-sync-main.js +23 -24
  525. package/dist/commands/managed-config-scope-cli.js +11 -10
  526. package/dist/commands/measure-rerun-cli.js +31 -26
  527. package/dist/commands/metrics-command.js +97 -100
  528. package/dist/commands/observation-record-cli.js +24 -14
  529. package/dist/commands/observations-flush-cli.js +50 -52
  530. package/dist/commands/overrides-check.js +1 -1
  531. package/dist/commands/package-scout-cli.js +70 -73
  532. package/dist/commands/pin-verify-cli.js +21 -2
  533. package/dist/commands/plan-consumers-main.js +3 -4
  534. package/dist/commands/plan-scaffold-cli.js +145 -146
  535. package/dist/commands/pr-classification-main.js +22 -3
  536. package/dist/commands/pre-commit-lint.js +30 -34
  537. package/dist/commands/pre-commit-type-check.js +55 -55
  538. package/dist/commands/pre-push-unit.js +69 -70
  539. package/dist/commands/pretool-guard-cli.js +111 -113
  540. package/dist/commands/prevent-main-commit.js +2 -3
  541. package/dist/commands/project-profile-cli.js +24 -9
  542. package/dist/commands/propagate.js +31 -23
  543. package/dist/commands/prose-stale-cli.js +48 -42
  544. package/dist/commands/publishable-range-check.js +3 -3
  545. package/dist/commands/read-set-cli.js +58 -61
  546. package/dist/commands/refactor-scan-cli.js +8 -9
  547. package/dist/commands/release-cli.js +57 -57
  548. package/dist/commands/release-scope-main.js +41 -36
  549. package/dist/commands/rename-cli.js +64 -36
  550. package/dist/commands/repo-party-cli.js +3 -4
  551. package/dist/commands/report-template-cli.js +4 -5
  552. package/dist/commands/reserved-run.js +17 -20
  553. package/dist/commands/retrospective-cli.js +126 -127
  554. package/dist/commands/review-attest-cli.js +28 -20
  555. package/dist/commands/review-brief-main.js +184 -167
  556. package/dist/commands/review-findings-cli.js +23 -13
  557. package/dist/commands/review-pair-cli.js +180 -156
  558. package/dist/commands/review-record-main.js +171 -147
  559. package/dist/commands/review-round2-cli.js +89 -91
  560. package/dist/commands/review-stops-cli.js +51 -54
  561. package/dist/commands/review-submit-cli.js +184 -167
  562. package/dist/commands/rule-list.js +78 -80
  563. package/dist/commands/rule-value-cli.js +115 -116
  564. package/dist/commands/ruleset-check-cli.js +23 -6
  565. package/dist/commands/run-add-cli.js +115 -75
  566. package/dist/commands/run-board-main.js +172 -169
  567. package/dist/commands/run-carry-cli.js +182 -174
  568. package/dist/commands/run-chain-cli.js +184 -160
  569. package/dist/commands/run-cut-cli.js +206 -168
  570. package/dist/commands/run-ending-cli.js +51 -54
  571. package/dist/commands/run-entry-cli.js +230 -283
  572. package/dist/commands/run-event-cli.js +18 -21
  573. package/dist/commands/run-handoff-cli.js +75 -78
  574. package/dist/commands/run-handoff-lanes-cli.js +48 -51
  575. package/dist/commands/run-hold-main.js +105 -107
  576. package/dist/commands/run-liveness-cli.js +47 -49
  577. package/dist/commands/run-merge-main.js +159 -151
  578. package/dist/commands/run-next-cli.js +128 -129
  579. package/dist/commands/run-park-cli.js +137 -140
  580. package/dist/commands/run-pause-cli.js +190 -186
  581. package/dist/commands/run-pickup-cli.js +49 -52
  582. package/dist/commands/run-prep-main.js +124 -125
  583. package/dist/commands/run-prime-cli.js +175 -147
  584. package/dist/commands/run-progress-main.js +149 -146
  585. package/dist/commands/run-report-cli.js +60 -60
  586. package/dist/commands/run-review-cli.js +229 -214
  587. package/dist/commands/run-ship-cli.js +258 -252
  588. package/dist/commands/run-ship-evidence-cli.js +71 -72
  589. package/dist/commands/run-ship-lap-W66LTXJJ.js +28 -0
  590. package/dist/commands/run-ship-wait-main.js +83 -85
  591. package/dist/commands/run-split-cli.js +176 -172
  592. package/dist/commands/run-stale-main.js +72 -75
  593. package/dist/commands/run-status-cli.js +44 -44
  594. package/dist/commands/run-step-cli.js +213 -211
  595. package/dist/commands/run-tail-cli.js +23 -18
  596. package/dist/commands/run-tidy-main.js +67 -69
  597. package/dist/commands/run-wake-main.js +206 -187
  598. package/dist/commands/run-watcher-guard-cli.js +63 -66
  599. package/dist/commands/security-audit-main.js +21 -24
  600. package/dist/commands/security-audit-provision-main.js +9 -11
  601. package/dist/commands/selfcheck-cli.js +63 -57
  602. package/dist/commands/session-language-main.js +70 -73
  603. package/dist/commands/sonar-hotspots-cli.js +9 -8
  604. package/dist/commands/sonar-new-code-cli.js +3 -4
  605. package/dist/commands/split-assess-cli.js +55 -58
  606. package/dist/commands/split-child-recover-cli.js +38 -39
  607. package/dist/commands/start.js +64 -64
  608. package/dist/commands/stash-pop-main.js +4 -5
  609. package/dist/commands/stash-push-main.js +7 -9
  610. package/dist/commands/stop-guard.js +180 -176
  611. package/dist/commands/sync-main.js +30 -15
  612. package/dist/commands/telegram-test-main.js +29 -22
  613. package/dist/commands/test-declared.js +29 -15
  614. package/dist/commands/test-e2e-guard.js +54 -54
  615. package/dist/commands/test-pinned-main.js +57 -56
  616. package/dist/commands/test-reach-cli.js +40 -32
  617. package/dist/commands/test-red-main.js +12 -14
  618. package/dist/commands/test-related-Z6YY2GFH.js +113 -0
  619. package/dist/commands/test-related-main.js +89 -89
  620. package/dist/commands/test-unit-guard-main.js +37 -37
  621. package/dist/commands/time-cli.js +54 -57
  622. package/dist/commands/time-density-cli.js +26 -29
  623. package/dist/commands/tree-status-cli.js +6 -8
  624. package/dist/commands/type-check-command.js +26 -11
  625. package/dist/commands/ui-routes-cli.js +5 -6
  626. package/dist/commands/ui-shot-cli.js +1 -1
  627. package/dist/commands/uninstall.js +44 -43
  628. package/dist/commands/unused-members-KVKZDTXD.js +329 -0
  629. package/dist/commands/unused-members-cli.js +27 -12
  630. package/dist/commands/upstream-interrupt-main.js +159 -151
  631. package/dist/commands/verification-gate.js +85 -86
  632. package/dist/commands/version-check.js +25 -8
  633. package/dist/hooks/chunk-3SA3FIQC.js +6869 -0
  634. package/dist/hooks/chunk-46PTTMGE.js +1625 -0
  635. package/dist/hooks/chunk-5NIBRHWG.js +77 -0
  636. package/dist/hooks/chunk-76QKN2K3.js +258 -0
  637. package/dist/hooks/chunk-CHEKMGFP.js +321 -0
  638. package/dist/hooks/chunk-DCILEVDR.js +5173 -0
  639. package/dist/hooks/chunk-HVNGIM5W.js +5092 -0
  640. package/dist/hooks/chunk-L6IZZ2IL.js +11219 -0
  641. package/dist/hooks/chunk-UZXMFOVK.js +9170 -0
  642. package/dist/hooks/chunk-WCJ2GWYJ.js +1381 -0
  643. package/dist/hooks/chunk-YRKS5ZKE.js +1915 -0
  644. package/dist/hooks/codex-hook-adapter.js +11 -12
  645. package/dist/hooks/daemon.js +2140 -1387
  646. package/dist/hooks/format-edited.js +6 -6
  647. package/dist/hooks/inputs.json +521 -497
  648. package/dist/hooks/pretool-guard.js +8 -8
  649. package/dist/hooks/run-ship-lap-P5555IG7.js +8 -0
  650. package/dist/hooks/session-lang.js +9 -7
  651. package/dist/hooks/stop-guard.js +962 -669
  652. package/dist/inputs.json +63 -54
  653. package/dist/josh.js +1029 -577
  654. package/dist/registry-migrate.mjs +33938 -0
  655. package/dist/version/index.js +4251 -175
  656. package/package.json +4 -1
  657. package/prompts/collaboration-workflow/principles.md +4 -1
  658. package/prompts/collaboration-workflow/rule-delivery.md +1 -1
  659. package/scripts/agent/codex-launch-identity.ts +70 -0
  660. package/scripts/auto-ok/auto-ok-cli.ts +2 -0
  661. package/scripts/auto-ok/auto-ok-judge-write.ts +2 -0
  662. package/scripts/auto-ok/auto-ok-judge.ts +3 -1
  663. package/scripts/backlog/backlog-arrival.ts +1 -1
  664. package/scripts/backlog/backlog-budget.ts +5 -2
  665. package/scripts/backlog/backlog-defect-priority.ts +1 -1
  666. package/scripts/backlog/backlog-dispatch-bound.ts +17 -0
  667. package/scripts/backlog/backlog-drain-flush.ts +38 -3
  668. package/scripts/backlog/backlog-drive-cli.ts +1 -1
  669. package/scripts/backlog/backlog-drive-hold.ts +28 -5
  670. package/scripts/backlog/backlog-drive-launch.ts +37 -15
  671. package/scripts/backlog/backlog-drive-listing.ts +39 -23
  672. package/scripts/backlog/backlog-drive-retrospective-unit.ts +3 -2
  673. package/scripts/backlog/backlog-drive-split-unit.ts +1 -0
  674. package/scripts/backlog/backlog-hold-codes.ts +7 -0
  675. package/scripts/backlog/backlog-hold-text.ts +14 -1
  676. package/scripts/backlog/backlog-measure-close.ts +6 -0
  677. package/scripts/backlog/backlog-next-shared.ts +20 -2
  678. package/scripts/backlog/backlog-next.ts +24 -3
  679. package/scripts/backlog/backlog-offer-cli.ts +69 -16
  680. package/scripts/build/build-migration.ts +25 -0
  681. package/scripts/build/build.ts +2 -0
  682. package/scripts/epic/epic-classify.ts +6 -1
  683. package/scripts/epic/epic-live.ts +46 -0
  684. package/scripts/followup/followup-failed-tests.ts +71 -10
  685. package/scripts/followup/followup-job-rerun.ts +2 -2
  686. package/scripts/gate/change-scope-action.integration.test.ts +88 -0
  687. package/scripts/gate/change-scope-action.ts +2 -0
  688. package/scripts/gate/check-related-order.ts +6 -7
  689. package/scripts/gate/check-related.ts +18 -8
  690. package/scripts/gate/core-admission.ts +17 -30
  691. package/scripts/gate/core-budget-poll.ts +183 -0
  692. package/scripts/gate/core-budget-timing.ts +1 -1
  693. package/scripts/gate/core-budget.ts +24 -112
  694. package/scripts/gate/core-wait-record.ts +52 -7
  695. package/scripts/gate/machine-capacity.ts +6 -2
  696. package/scripts/gate/metrics-totals.ts +11 -0
  697. package/scripts/gate/path-glob.test.ts +18 -0
  698. package/scripts/gate/toolchain-inputs.consumer.test.ts +36 -0
  699. package/scripts/gh/fix-gh-packages-logic.ts +22 -15
  700. package/scripts/gh/gh-request-tally.ts +4 -0
  701. package/scripts/hooks/bash-revert.ts +79 -31
  702. package/scripts/hooks/format-edited-file.ts +6 -8
  703. package/scripts/hooks/implementation-shell.ts +3 -2
  704. package/scripts/init/distributed-paths.ts +18 -5
  705. package/scripts/init/init-actions.ts +16 -1
  706. package/scripts/init/init-bootstrap.ts +2 -0
  707. package/scripts/init/init-logic.ts +40 -8
  708. package/scripts/init/init.ts +11 -3
  709. package/scripts/issue/defect-rate-cli.ts +19 -13
  710. package/scripts/issue/issue-file-batch.ts +7 -3
  711. package/scripts/issue/issue-file-cli.ts +19 -6
  712. package/scripts/issue/issue-file-main.ts +6 -1
  713. package/scripts/issue/issue-file-pass.ts +17 -0
  714. package/scripts/issue/issue-file.ts +3 -0
  715. package/scripts/issue/issue-not-before.ts +9 -2
  716. package/scripts/issue/issue-observation-gate.ts +141 -0
  717. package/scripts/issue/issue-observation-prime.ts +83 -0
  718. package/scripts/issue/issue-publication-state.ts +61 -0
  719. package/scripts/issue/issue-publication.ts +144 -0
  720. package/scripts/issue/issue-sample-prime.ts +2 -0
  721. package/scripts/issue/issue-search-count.ts +26 -0
  722. package/scripts/issue/issue-search.ts +128 -3
  723. package/scripts/issue/issue-spill-cli.ts +4 -0
  724. package/scripts/issue/upstream-interrupt-cli.ts +21 -5
  725. package/scripts/josh/josh-commands-ai.ts +1 -1
  726. package/scripts/josh/josh-commands-development.ts +1 -1
  727. package/scripts/josh/josh-commands-issue-write.ts +9 -0
  728. package/scripts/josh/josh-commands-run.ts +6 -1
  729. package/scripts/josh/josh-commands-ship.ts +5 -5
  730. package/scripts/josh/josh-run.ts +5 -2
  731. package/scripts/josh/shared-cache.ts +16 -1
  732. package/scripts/lane/lane-await.ts +15 -0
  733. package/scripts/lane/lane-cli.ts +2 -0
  734. package/scripts/lane/lane-dispatch-dependency.ts +102 -0
  735. package/scripts/lane/lane-dispatch-wait-stats.ts +239 -0
  736. package/scripts/lane/lane-dispatch.ts +44 -5
  737. package/scripts/lane/lane-early-push-count.ts +21 -0
  738. package/scripts/lane/lane-install.ts +15 -5
  739. package/scripts/lane/lane-launch-cli.ts +35 -14
  740. package/scripts/lane/lane-ledger-kind.ts +2 -0
  741. package/scripts/lane/lane-ledger-schema-ship.ts +5 -1
  742. package/scripts/lane/lane-ledger-schema.ts +15 -1
  743. package/scripts/lane/lane-ledger-write.ts +4 -1
  744. package/scripts/lane/lane-relaunch.ts +25 -2
  745. package/scripts/lane/lane-state-record.ts +2 -0
  746. package/scripts/lane/lane-state.ts +8 -1
  747. package/scripts/lane/lane-stats-tables.ts +2 -0
  748. package/scripts/lane/openai-lane-supervisor.ts +16 -1
  749. package/scripts/lib/inherited-scope.ts +48 -0
  750. package/scripts/lint/format-steps.ts +93 -0
  751. package/scripts/lint/format.ts +6 -49
  752. package/scripts/lint/lint-related-fix.ts +35 -0
  753. package/scripts/lint/lint-related.ts +22 -35
  754. package/scripts/propagate/propagate-steps.ts +9 -4
  755. package/scripts/registry-migration/migrate-cli.ts +50 -0
  756. package/scripts/registry-migration/migrate-files.ts +154 -0
  757. package/scripts/registry-migration/migrate-lock.ts +147 -0
  758. package/scripts/registry-migration/migrate.ts +235 -0
  759. package/scripts/registry-migration/npm-acquisition.ts +118 -0
  760. package/scripts/review/review-record-cli.ts +27 -13
  761. package/scripts/review/review-record-pinned.ts +15 -6
  762. package/scripts/run/add/run-add-cli.ts +21 -3
  763. package/scripts/run/add/run-add.ts +26 -9
  764. package/scripts/run/board/run-board-layout.ts +2 -2
  765. package/scripts/run/board/run-board-reason.ts +12 -0
  766. package/scripts/run/board/run-board-retry-wait.ts +35 -0
  767. package/scripts/run/board/run-board-seat.ts +9 -2
  768. package/scripts/run/board/run-board-setup.ts +6 -4
  769. package/scripts/run/carry/run-carry-reclaim.ts +12 -2
  770. package/scripts/run/carry/run-carry-session.ts +48 -0
  771. package/scripts/run/carry/run-carry.ts +21 -14
  772. package/scripts/run/cut/run-cut-resume.ts +15 -3
  773. package/scripts/run/cut/run-cut.ts +1 -1
  774. package/scripts/run/detached-launch.ts +14 -5
  775. package/scripts/run/early-push-record.ts +6 -2
  776. package/scripts/run/event/run-event-setup.ts +2 -0
  777. package/scripts/run/event/run-event-stream-emit.ts +27 -7
  778. package/scripts/run/hold/run-hold-cli.ts +40 -5
  779. package/scripts/run/merge/run-merge-cut-release.ts +17 -0
  780. package/scripts/run/merge/run-merge-human-review.ts +6 -0
  781. package/scripts/run/merge/run-merge-steps.ts +4 -57
  782. package/scripts/run/merge/run-merge-waits.ts +54 -0
  783. package/scripts/run/prime/run-prime-cli.ts +16 -2
  784. package/scripts/run/review/run-review-cli.ts +5 -7
  785. package/scripts/run/review/run-review-early-push.ts +19 -8
  786. package/scripts/run/review/run-review-join-read.ts +33 -6
  787. package/scripts/run/review/run-review-pinned-remaining.ts +124 -0
  788. package/scripts/run/review/run-review-pinned-steps.ts +7 -1
  789. package/scripts/run/run-halfrun-resume.ts +49 -6
  790. package/scripts/run/run-headless.ts +3 -0
  791. package/scripts/run/run-pr-return.ts +14 -5
  792. package/scripts/run/run-repair-attempt.ts +219 -0
  793. package/scripts/run/ship/run-ship-lap.ts +5 -17
  794. package/scripts/run/ship/run-ship-pre-detach-pinned.ts +4 -13
  795. package/scripts/run/ship/run-ship-scoped.ts +66 -30
  796. package/scripts/run/startup/run-startup-schema.ts +31 -0
  797. package/scripts/run/startup/run-startup-store.ts +130 -0
  798. package/scripts/run/startup/run-startup.ts +119 -0
  799. package/scripts/run/wake/run-wake-codex.ts +144 -0
  800. package/scripts/run/wake/run-wake-driver.ts +32 -7
  801. package/scripts/run/wake/run-wake-handoff.ts +9 -8
  802. package/scripts/run/wake/run-wake-loop.ts +23 -3
  803. package/scripts/run/wake/run-wake-ports.ts +17 -3
  804. package/scripts/run/wake/run-wake-takeover.ts +6 -3
  805. package/scripts/run/wake/run-wake-window.ts +4 -1
  806. package/scripts/run/wake/run-wake.ts +5 -0
  807. package/scripts/sync/sync-ai-files.ts +17 -0
  808. package/scripts/sync/sync-configs.ts +11 -1
  809. package/scripts/sync/sync.ts +5 -1
  810. package/scripts/test/test-related-cap.ts +7 -3
  811. package/scripts/test/test-related-imports.ts +92 -0
  812. package/scripts/test/vitest-failure-summary.ts +7 -0
  813. package/scripts/version/npm-registry.ts +45 -7
  814. package/scripts/version/upgrade-shell-command.ts +34 -2
  815. package/templates/workflows/ci.yml +0 -15
  816. package/templates/workflows/github-release.yml +0 -5
  817. package/dist/commands/chunk-23GH6B3D.js +0 -333
  818. package/dist/commands/chunk-24OATKOF.js +0 -7534
  819. package/dist/commands/chunk-24ZDAWML.js +0 -48
  820. package/dist/commands/chunk-2BB5ZR2F.js +0 -128
  821. package/dist/commands/chunk-2BJJUTZA.js +0 -59
  822. package/dist/commands/chunk-2CXT6MBR.js +0 -51
  823. package/dist/commands/chunk-2DJLAUYB.js +0 -109
  824. package/dist/commands/chunk-2EZTYLO4.js +0 -179
  825. package/dist/commands/chunk-2FJJYCBD.js +0 -149
  826. package/dist/commands/chunk-2PHOLX62.js +0 -43
  827. package/dist/commands/chunk-2QM72JCJ.js +0 -338
  828. package/dist/commands/chunk-2VRITY55.js +0 -41
  829. package/dist/commands/chunk-2XAH3MHV.js +0 -23
  830. package/dist/commands/chunk-34KZDKQJ.js +0 -304
  831. package/dist/commands/chunk-352KLSFX.js +0 -67
  832. package/dist/commands/chunk-36LOGVJ7.js +0 -38
  833. package/dist/commands/chunk-3AEDZZNL.js +0 -223
  834. package/dist/commands/chunk-3B2HEFNO.js +0 -51
  835. package/dist/commands/chunk-3PEXBHRN.js +0 -33
  836. package/dist/commands/chunk-3Z425MM3.js +0 -61
  837. package/dist/commands/chunk-3ZOX4G4U.js +0 -88
  838. package/dist/commands/chunk-452HWOJ7.js +0 -395
  839. package/dist/commands/chunk-475EFIJV.js +0 -178
  840. package/dist/commands/chunk-47UZB54M.js +0 -73
  841. package/dist/commands/chunk-4DN4XVPL.js +0 -716
  842. package/dist/commands/chunk-4DVM57T7.js +0 -86
  843. package/dist/commands/chunk-4EADHJVC.js +0 -247
  844. package/dist/commands/chunk-4HERA2GY.js +0 -95
  845. package/dist/commands/chunk-4JI35CVO.js +0 -70
  846. package/dist/commands/chunk-4L4LNWZ7.js +0 -143
  847. package/dist/commands/chunk-4N32QKJZ.js +0 -170
  848. package/dist/commands/chunk-4NRSFLG7.js +0 -185
  849. package/dist/commands/chunk-4OKRPAUT.js +0 -98
  850. package/dist/commands/chunk-4PUKDAXL.js +0 -42
  851. package/dist/commands/chunk-4Q64PG46.js +0 -478
  852. package/dist/commands/chunk-4UDTQVDD.js +0 -278
  853. package/dist/commands/chunk-4WR2LEZL.js +0 -123
  854. package/dist/commands/chunk-4ZJOC6OK.js +0 -298
  855. package/dist/commands/chunk-4ZQM4I7R.js +0 -533
  856. package/dist/commands/chunk-54X37JEJ.js +0 -170
  857. package/dist/commands/chunk-56KW5EOK.js +0 -85
  858. package/dist/commands/chunk-5CG3XU3O.js +0 -74
  859. package/dist/commands/chunk-5ESZLHDZ.js +0 -514
  860. package/dist/commands/chunk-5FBRMARM.js +0 -578
  861. package/dist/commands/chunk-5RG4S66L.js +0 -47
  862. package/dist/commands/chunk-5UJGACVN.js +0 -137
  863. package/dist/commands/chunk-5Y7B7FDL.js +0 -44
  864. package/dist/commands/chunk-5Z6E5ZUV.js +0 -89
  865. package/dist/commands/chunk-5ZNUH4LV.js +0 -1722
  866. package/dist/commands/chunk-5ZTQX7OS.js +0 -125
  867. package/dist/commands/chunk-66NX6EXR.js +0 -29
  868. package/dist/commands/chunk-66TGK5XL.js +0 -84
  869. package/dist/commands/chunk-6CFHLMKM.js +0 -555
  870. package/dist/commands/chunk-6DDK5XWK.js +0 -74
  871. package/dist/commands/chunk-6GQX752S.js +0 -145
  872. package/dist/commands/chunk-6HRRZANN.js +0 -55
  873. package/dist/commands/chunk-6MAZ55GF.js +0 -1241
  874. package/dist/commands/chunk-6OP63TBT.js +0 -78
  875. package/dist/commands/chunk-6Q3XUCLM.js +0 -204
  876. package/dist/commands/chunk-6RUWU2SB.js +0 -45
  877. package/dist/commands/chunk-6UCWAFQY.js +0 -245
  878. package/dist/commands/chunk-6WKJ3GDA.js +0 -408
  879. package/dist/commands/chunk-6YURRFRU.js +0 -461
  880. package/dist/commands/chunk-6YVURZAJ.js +0 -350
  881. package/dist/commands/chunk-6Z4YZG7P.js +0 -169
  882. package/dist/commands/chunk-77BIN247.js +0 -122
  883. package/dist/commands/chunk-7ABHNNY3.js +0 -529
  884. package/dist/commands/chunk-7C7FOKJK.js +0 -115
  885. package/dist/commands/chunk-7HAGC6SW.js +0 -1062
  886. package/dist/commands/chunk-7KKUFLH5.js +0 -56
  887. package/dist/commands/chunk-7LJQMM2K.js +0 -102
  888. package/dist/commands/chunk-7MJYLUF4.js +0 -99
  889. package/dist/commands/chunk-7NHZCI5Y.js +0 -704
  890. package/dist/commands/chunk-7OQ56DVW.js +0 -239
  891. package/dist/commands/chunk-7VWPGTZO.js +0 -260
  892. package/dist/commands/chunk-7YZXS3AK.js +0 -30
  893. package/dist/commands/chunk-A4HOQKOG.js +0 -85
  894. package/dist/commands/chunk-A6T2N7VC.js +0 -159
  895. package/dist/commands/chunk-AAUDI7WJ.js +0 -250
  896. package/dist/commands/chunk-AC26ZUG5.js +0 -259
  897. package/dist/commands/chunk-ACZ52JPI.js +0 -140
  898. package/dist/commands/chunk-AJ65WNJB.js +0 -230
  899. package/dist/commands/chunk-AK7SEO4Y.js +0 -177
  900. package/dist/commands/chunk-AKK56GNX.js +0 -205
  901. package/dist/commands/chunk-AKQYYHP2.js +0 -461
  902. package/dist/commands/chunk-ALDAS2WG.js +0 -137
  903. package/dist/commands/chunk-ANUTT56I.js +0 -85
  904. package/dist/commands/chunk-AVVMDVGO.js +0 -68
  905. package/dist/commands/chunk-B3M5WSGN.js +0 -72
  906. package/dist/commands/chunk-B7ZNIEDV.js +0 -351
  907. package/dist/commands/chunk-BCUDQWYK.js +0 -77
  908. package/dist/commands/chunk-BF6YX4HE.js +0 -70
  909. package/dist/commands/chunk-BHRS7HAM.js +0 -272
  910. package/dist/commands/chunk-BIKGPT52.js +0 -29
  911. package/dist/commands/chunk-BJA5U4Q7.js +0 -75
  912. package/dist/commands/chunk-BMKWSWWE.js +0 -126
  913. package/dist/commands/chunk-BMTYUJNT.js +0 -59
  914. package/dist/commands/chunk-BRHPRDDV.js +0 -127
  915. package/dist/commands/chunk-BRUBX64M.js +0 -33
  916. package/dist/commands/chunk-BTZJDHQT.js +0 -46
  917. package/dist/commands/chunk-BYFC6MD2.js +0 -72
  918. package/dist/commands/chunk-BYGJ3BCJ.js +0 -803
  919. package/dist/commands/chunk-C2SEDMZ3.js +0 -238
  920. package/dist/commands/chunk-C54QXJD6.js +0 -4208
  921. package/dist/commands/chunk-C6QSVO5K.js +0 -56
  922. package/dist/commands/chunk-CBAKBWSZ.js +0 -332
  923. package/dist/commands/chunk-CFHRNTE5.js +0 -326
  924. package/dist/commands/chunk-CGLLAEKZ.js +0 -110
  925. package/dist/commands/chunk-CHKYPF5O.js +0 -82
  926. package/dist/commands/chunk-CJBW6BWG.js +0 -800
  927. package/dist/commands/chunk-CJKPF5DJ.js +0 -156
  928. package/dist/commands/chunk-CKUKK7JG.js +0 -252
  929. package/dist/commands/chunk-CMHGDCGN.js +0 -263
  930. package/dist/commands/chunk-CNGTHSUS.js +0 -750
  931. package/dist/commands/chunk-CP2J4RV2.js +0 -3987
  932. package/dist/commands/chunk-CQZI7RIK.js +0 -72
  933. package/dist/commands/chunk-CWCKCZS6.js +0 -188
  934. package/dist/commands/chunk-D5HIP4HT.js +0 -289
  935. package/dist/commands/chunk-D6D6WQR6.js +0 -125
  936. package/dist/commands/chunk-D7JRJI44.js +0 -297
  937. package/dist/commands/chunk-D7OAU32Z.js +0 -119
  938. package/dist/commands/chunk-DAAX7XDS.js +0 -1208
  939. package/dist/commands/chunk-DBKTFB5V.js +0 -18
  940. package/dist/commands/chunk-DEZF7QZZ.js +0 -184
  941. package/dist/commands/chunk-DMD74E3F.js +0 -39
  942. package/dist/commands/chunk-DPJVKTO4.js +0 -41
  943. package/dist/commands/chunk-DXJQHJQ4.js +0 -73
  944. package/dist/commands/chunk-DYZOOWVW.js +0 -912
  945. package/dist/commands/chunk-EBI2BAKQ.js +0 -47
  946. package/dist/commands/chunk-EDKOSZ3K.js +0 -88
  947. package/dist/commands/chunk-EFDVE5P5.js +0 -121
  948. package/dist/commands/chunk-EGIHAEMT.js +0 -72
  949. package/dist/commands/chunk-EKLU6QR7.js +0 -507
  950. package/dist/commands/chunk-ELY76WAR.js +0 -65
  951. package/dist/commands/chunk-EM3HAZF6.js +0 -52
  952. package/dist/commands/chunk-EMTZAGT5.js +0 -51
  953. package/dist/commands/chunk-ENKFCOVY.js +0 -472
  954. package/dist/commands/chunk-ERG4QRNG.js +0 -224
  955. package/dist/commands/chunk-EUGNQCYK.js +0 -139
  956. package/dist/commands/chunk-EW4NPUMQ.js +0 -363
  957. package/dist/commands/chunk-EWVR5AEX.js +0 -140
  958. package/dist/commands/chunk-EXDFKKMH.js +0 -113
  959. package/dist/commands/chunk-EXWB34R2.js +0 -238
  960. package/dist/commands/chunk-EYMPBHDN.js +0 -61
  961. package/dist/commands/chunk-EZ7IPKIH.js +0 -20
  962. package/dist/commands/chunk-EZSO25UZ.js +0 -80
  963. package/dist/commands/chunk-F6IQHZYY.js +0 -94
  964. package/dist/commands/chunk-FDS65XOJ.js +0 -212
  965. package/dist/commands/chunk-FFHEGWPK.js +0 -91
  966. package/dist/commands/chunk-FGL6DBZU.js +0 -71
  967. package/dist/commands/chunk-FHFWNNUC.js +0 -144
  968. package/dist/commands/chunk-FIUCHMCF.js +0 -32
  969. package/dist/commands/chunk-FJX7AENO.js +0 -74
  970. package/dist/commands/chunk-FKZ5E4JD.js +0 -97
  971. package/dist/commands/chunk-FMZWRDKH.js +0 -302
  972. package/dist/commands/chunk-FOKCRIAN.js +0 -67
  973. package/dist/commands/chunk-FQGWO2ZH.js +0 -43
  974. package/dist/commands/chunk-FROACLVU.js +0 -525
  975. package/dist/commands/chunk-FURNDIT3.js +0 -34
  976. package/dist/commands/chunk-FVDQNMP6.js +0 -93
  977. package/dist/commands/chunk-FVVZIJUC.js +0 -425
  978. package/dist/commands/chunk-FWU3H4TX.js +0 -17
  979. package/dist/commands/chunk-G3HBYHFA.js +0 -16
  980. package/dist/commands/chunk-G4E4M2P4.js +0 -299
  981. package/dist/commands/chunk-G5KSL2Q2.js +0 -151
  982. package/dist/commands/chunk-G6XC7V6Y.js +0 -58
  983. package/dist/commands/chunk-GCPP5XIG.js +0 -90
  984. package/dist/commands/chunk-GITT5A5A.js +0 -198
  985. package/dist/commands/chunk-GJYMI2CM.js +0 -48
  986. package/dist/commands/chunk-GLC47H7I.js +0 -285
  987. package/dist/commands/chunk-GUR54ELE.js +0 -328
  988. package/dist/commands/chunk-GW4UWR3O.js +0 -126
  989. package/dist/commands/chunk-GY4DMCKS.js +0 -306
  990. package/dist/commands/chunk-H6JQRHDC.js +0 -80
  991. package/dist/commands/chunk-HATKF6VX.js +0 -173
  992. package/dist/commands/chunk-HG2NZQD5.js +0 -135
  993. package/dist/commands/chunk-HH3CVIFU.js +0 -93
  994. package/dist/commands/chunk-HHMMGDMP.js +0 -469
  995. package/dist/commands/chunk-HI5WPM6C.js +0 -127
  996. package/dist/commands/chunk-HQGNXR6I.js +0 -245
  997. package/dist/commands/chunk-HTIDHEEN.js +0 -108
  998. package/dist/commands/chunk-HVCQYZVD.js +0 -38
  999. package/dist/commands/chunk-HWEZRNPL.js +0 -66
  1000. package/dist/commands/chunk-HX3FFIO5.js +0 -74
  1001. package/dist/commands/chunk-HXDTA5VU.js +0 -208
  1002. package/dist/commands/chunk-I2KCGKJI.js +0 -107
  1003. package/dist/commands/chunk-I63RNFFR.js +0 -213
  1004. package/dist/commands/chunk-IAD4WLLI.js +0 -98
  1005. package/dist/commands/chunk-IB5TT73I.js +0 -177
  1006. package/dist/commands/chunk-IBAYXCMU.js +0 -156
  1007. package/dist/commands/chunk-IGDJNXX2.js +0 -49
  1008. package/dist/commands/chunk-ILGPZ47M.js +0 -33
  1009. package/dist/commands/chunk-IYJEBWW5.js +0 -44
  1010. package/dist/commands/chunk-J22PSIXR.js +0 -418
  1011. package/dist/commands/chunk-J66YBAAM.js +0 -161
  1012. package/dist/commands/chunk-J6WKZRV2.js +0 -391
  1013. package/dist/commands/chunk-J7IO3AYH.js +0 -179
  1014. package/dist/commands/chunk-JAKC2BHX.js +0 -88
  1015. package/dist/commands/chunk-JCAQ7B6J.js +0 -124
  1016. package/dist/commands/chunk-JHN6RCE6.js +0 -123
  1017. package/dist/commands/chunk-JIGBNCDR.js +0 -88
  1018. package/dist/commands/chunk-JJHWTFWQ.js +0 -76
  1019. package/dist/commands/chunk-JJRKTWLK.js +0 -64
  1020. package/dist/commands/chunk-JKOGWGQM.js +0 -92
  1021. package/dist/commands/chunk-JM6EVOFN.js +0 -172
  1022. package/dist/commands/chunk-JQXPLMCO.js +0 -81
  1023. package/dist/commands/chunk-JV24VP2O.js +0 -81
  1024. package/dist/commands/chunk-JVKXJ763.js +0 -45
  1025. package/dist/commands/chunk-K275REYP.js +0 -37
  1026. package/dist/commands/chunk-K4G3HOKS.js +0 -105
  1027. package/dist/commands/chunk-K64EIHD2.js +0 -138
  1028. package/dist/commands/chunk-KB3OQWDT.js +0 -71
  1029. package/dist/commands/chunk-KCFOP5RI.js +0 -1310
  1030. package/dist/commands/chunk-KGE4AS2Y.js +0 -134
  1031. package/dist/commands/chunk-KIILCKQR.js +0 -220
  1032. package/dist/commands/chunk-KK2SL42W.js +0 -241
  1033. package/dist/commands/chunk-KKIMVXAP.js +0 -280
  1034. package/dist/commands/chunk-KODXWMBX.js +0 -77
  1035. package/dist/commands/chunk-KPSKWTOS.js +0 -208
  1036. package/dist/commands/chunk-KVHNQHX3.js +0 -100
  1037. package/dist/commands/chunk-KWYQR5MK.js +0 -269
  1038. package/dist/commands/chunk-KXHXMERX.js +0 -214
  1039. package/dist/commands/chunk-KZ5BBBMO.js +0 -271
  1040. package/dist/commands/chunk-KZ7HD37E.js +0 -121
  1041. package/dist/commands/chunk-KZSM5M5P.js +0 -89
  1042. package/dist/commands/chunk-KZZWPUJW.js +0 -25
  1043. package/dist/commands/chunk-L7DAL54N.js +0 -347
  1044. package/dist/commands/chunk-LAR76BFA.js +0 -114
  1045. package/dist/commands/chunk-LB557AHJ.js +0 -192
  1046. package/dist/commands/chunk-LJXKVLYI.js +0 -229
  1047. package/dist/commands/chunk-LOOFYHUM.js +0 -773
  1048. package/dist/commands/chunk-LQXFVZTS.js +0 -13
  1049. package/dist/commands/chunk-LT7QSHR4.js +0 -995
  1050. package/dist/commands/chunk-LUXWDMKI.js +0 -426
  1051. package/dist/commands/chunk-LWAXXZPS.js +0 -118
  1052. package/dist/commands/chunk-LX7TIEMI.js +0 -1612
  1053. package/dist/commands/chunk-LZ5QXE5N.js +0 -244
  1054. package/dist/commands/chunk-LZPPSOTP.js +0 -122
  1055. package/dist/commands/chunk-M4UV3BEV.js +0 -313
  1056. package/dist/commands/chunk-M6JDU5EK.js +0 -133
  1057. package/dist/commands/chunk-MDLOETXL.js +0 -211
  1058. package/dist/commands/chunk-MFBNNTBM.js +0 -44
  1059. package/dist/commands/chunk-MGF64OHV.js +0 -32
  1060. package/dist/commands/chunk-MI2OS6TL.js +0 -132
  1061. package/dist/commands/chunk-MLW4S35K.js +0 -389
  1062. package/dist/commands/chunk-MN425CU6.js +0 -63
  1063. package/dist/commands/chunk-MPGJ4ONJ.js +0 -634
  1064. package/dist/commands/chunk-MRORPFSO.js +0 -402
  1065. package/dist/commands/chunk-MUGTOJUL.js +0 -319
  1066. package/dist/commands/chunk-MVHPRYHE.js +0 -91
  1067. package/dist/commands/chunk-MWO6FOSZ.js +0 -393
  1068. package/dist/commands/chunk-MXC4IBZ7.js +0 -104
  1069. package/dist/commands/chunk-N7QTMTST.js +0 -210
  1070. package/dist/commands/chunk-NDBX7LSS.js +0 -32
  1071. package/dist/commands/chunk-NEGJ77RV.js +0 -173
  1072. package/dist/commands/chunk-NEGRE5VW.js +0 -101
  1073. package/dist/commands/chunk-NFPD2P3V.js +0 -53
  1074. package/dist/commands/chunk-NHIW7JE6.js +0 -335
  1075. package/dist/commands/chunk-NILSN7A4.js +0 -158
  1076. package/dist/commands/chunk-NOLFSPOB.js +0 -74
  1077. package/dist/commands/chunk-NSAVEXVR.js +0 -353
  1078. package/dist/commands/chunk-NT67QTZO.js +0 -65
  1079. package/dist/commands/chunk-NU7W6QGT.js +0 -155
  1080. package/dist/commands/chunk-NYWGJLBU.js +0 -19
  1081. package/dist/commands/chunk-OAAVY2JK.js +0 -49
  1082. package/dist/commands/chunk-OGS2DK7I.js +0 -47
  1083. package/dist/commands/chunk-OHNP3QL2.js +0 -186
  1084. package/dist/commands/chunk-OIPV3PWW.js +0 -870
  1085. package/dist/commands/chunk-OIX2363L.js +0 -16
  1086. package/dist/commands/chunk-OJ65BZBV.js +0 -646
  1087. package/dist/commands/chunk-OKZWEVR4.js +0 -352
  1088. package/dist/commands/chunk-OL6IF4JC.js +0 -20
  1089. package/dist/commands/chunk-OMPRILFH.js +0 -29
  1090. package/dist/commands/chunk-OOWGH2RG.js +0 -85
  1091. package/dist/commands/chunk-OP2RFVLS.js +0 -102
  1092. package/dist/commands/chunk-ORKVN2LO.js +0 -56
  1093. package/dist/commands/chunk-OSBWXZJ4.js +0 -492
  1094. package/dist/commands/chunk-OT3UMEWK.js +0 -47
  1095. package/dist/commands/chunk-OVWPZDWP.js +0 -64
  1096. package/dist/commands/chunk-OWYK2BEJ.js +0 -1222
  1097. package/dist/commands/chunk-OX3VQLV2.js +0 -488
  1098. package/dist/commands/chunk-OZJP77UM.js +0 -103
  1099. package/dist/commands/chunk-OZZWRJQI.js +0 -246
  1100. package/dist/commands/chunk-P3H3DKTE.js +0 -69
  1101. package/dist/commands/chunk-P4D5RESF.js +0 -88
  1102. package/dist/commands/chunk-P4KIQRSL.js +0 -119
  1103. package/dist/commands/chunk-P5SOYWH2.js +0 -37
  1104. package/dist/commands/chunk-P7FPXAHP.js +0 -29
  1105. package/dist/commands/chunk-PE7B7242.js +0 -84
  1106. package/dist/commands/chunk-PFO7EYAP.js +0 -45
  1107. package/dist/commands/chunk-PHLOTUB7.js +0 -366
  1108. package/dist/commands/chunk-PTNQCCIB.js +0 -41
  1109. package/dist/commands/chunk-PTZEFQUX.js +0 -211
  1110. package/dist/commands/chunk-Q5Q2QYVU.js +0 -112
  1111. package/dist/commands/chunk-Q7EEIOAD.js +0 -120
  1112. package/dist/commands/chunk-QABRNGQV.js +0 -88
  1113. package/dist/commands/chunk-QAHFPCFR.js +0 -50
  1114. package/dist/commands/chunk-QDFVVRQP.js +0 -92
  1115. package/dist/commands/chunk-QGAERR7D.js +0 -99
  1116. package/dist/commands/chunk-QHWJJ6X5.js +0 -53
  1117. package/dist/commands/chunk-QJRVDE7T.js +0 -307
  1118. package/dist/commands/chunk-QMDKDQKW.js +0 -114
  1119. package/dist/commands/chunk-QOSC5RKD.js +0 -18
  1120. package/dist/commands/chunk-QQ4CIYMF.js +0 -132
  1121. package/dist/commands/chunk-QV5FKMOU.js +0 -80
  1122. package/dist/commands/chunk-QWWTC3XR.js +0 -109
  1123. package/dist/commands/chunk-QXQ56E56.js +0 -27
  1124. package/dist/commands/chunk-R54Z2Z3X.js +0 -114
  1125. package/dist/commands/chunk-R6QE5VJG.js +0 -46
  1126. package/dist/commands/chunk-RG53UFNW.js +0 -418
  1127. package/dist/commands/chunk-RGGEQM6G.js +0 -140
  1128. package/dist/commands/chunk-RH6ZWJOA.js +0 -77
  1129. package/dist/commands/chunk-RHKCWJQX.js +0 -62
  1130. package/dist/commands/chunk-RKIAX4DZ.js +0 -191
  1131. package/dist/commands/chunk-RLBFEHHC.js +0 -300
  1132. package/dist/commands/chunk-RN2YDNLF.js +0 -229
  1133. package/dist/commands/chunk-RRAIRS2T.js +0 -54
  1134. package/dist/commands/chunk-RS764ZMU.js +0 -46
  1135. package/dist/commands/chunk-RUIBQMOV.js +0 -38
  1136. package/dist/commands/chunk-RUQY5TS3.js +0 -83
  1137. package/dist/commands/chunk-RVUJ6F5L.js +0 -181
  1138. package/dist/commands/chunk-RW64VHEB.js +0 -130
  1139. package/dist/commands/chunk-RXYMJPJB.js +0 -114
  1140. package/dist/commands/chunk-S4M6UWR2.js +0 -103
  1141. package/dist/commands/chunk-SASX3W2M.js +0 -99
  1142. package/dist/commands/chunk-SFNBUB6D.js +0 -110
  1143. package/dist/commands/chunk-SJ2ZN575.js +0 -90
  1144. package/dist/commands/chunk-SP7DKYGU.js +0 -1263
  1145. package/dist/commands/chunk-SSL6A3Y4.js +0 -165
  1146. package/dist/commands/chunk-SVAKCXZ7.js +0 -44
  1147. package/dist/commands/chunk-SYOXIKB7.js +0 -705
  1148. package/dist/commands/chunk-SZG5HDNP.js +0 -321
  1149. package/dist/commands/chunk-T25S4QHL.js +0 -52
  1150. package/dist/commands/chunk-T4F33UKZ.js +0 -114
  1151. package/dist/commands/chunk-T4UYEHWG.js +0 -50
  1152. package/dist/commands/chunk-TAEGXID2.js +0 -58
  1153. package/dist/commands/chunk-TCBUX52E.js +0 -701
  1154. package/dist/commands/chunk-TEPYEUYG.js +0 -585
  1155. package/dist/commands/chunk-TFLHYC2F.js +0 -141
  1156. package/dist/commands/chunk-TJKM56WJ.js +0 -109
  1157. package/dist/commands/chunk-TLAB552K.js +0 -445
  1158. package/dist/commands/chunk-TP6L4W3W.js +0 -82
  1159. package/dist/commands/chunk-TR7WWYD5.js +0 -60
  1160. package/dist/commands/chunk-TVZXG4Y4.js +0 -197
  1161. package/dist/commands/chunk-TYNH2R66.js +0 -1150
  1162. package/dist/commands/chunk-U3IVVR4W.js +0 -33
  1163. package/dist/commands/chunk-U5P6G3UV.js +0 -77
  1164. package/dist/commands/chunk-U7XU5RG3.js +0 -86
  1165. package/dist/commands/chunk-UKBBWMLE.js +0 -1189
  1166. package/dist/commands/chunk-ULVVGGTY.js +0 -64
  1167. package/dist/commands/chunk-UNMSZGSG.js +0 -269
  1168. package/dist/commands/chunk-URDT2O2K.js +0 -36
  1169. package/dist/commands/chunk-UTHUX7VU.js +0 -88
  1170. package/dist/commands/chunk-V4Z7G4UH.js +0 -73
  1171. package/dist/commands/chunk-V5FD7DVV.js +0 -48
  1172. package/dist/commands/chunk-VCPGFBMN.js +0 -655
  1173. package/dist/commands/chunk-VGPIQNDB.js +0 -24
  1174. package/dist/commands/chunk-VJE3RJAX.js +0 -23
  1175. package/dist/commands/chunk-VK6D5CWA.js +0 -161
  1176. package/dist/commands/chunk-VOF3N4WO.js +0 -114
  1177. package/dist/commands/chunk-VQVPAVQ3.js +0 -45
  1178. package/dist/commands/chunk-VV4TQYGD.js +0 -38
  1179. package/dist/commands/chunk-W3FX7FYN.js +0 -84
  1180. package/dist/commands/chunk-W7DRUOF7.js +0 -122
  1181. package/dist/commands/chunk-WAEN2RTT.js +0 -161
  1182. package/dist/commands/chunk-WCEUMOKK.js +0 -84
  1183. package/dist/commands/chunk-WJ4NEDNI.js +0 -288
  1184. package/dist/commands/chunk-WMMGXJXP.js +0 -92
  1185. package/dist/commands/chunk-WOFLW2LX.js +0 -26
  1186. package/dist/commands/chunk-WTH6NTXU.js +0 -128
  1187. package/dist/commands/chunk-WWVYEHQT.js +0 -272
  1188. package/dist/commands/chunk-X3TNPALI.js +0 -213
  1189. package/dist/commands/chunk-XC6GG5JR.js +0 -78
  1190. package/dist/commands/chunk-XDF25GSU.js +0 -536
  1191. package/dist/commands/chunk-XFPEUYDV.js +0 -67
  1192. package/dist/commands/chunk-XFWI6WHH.js +0 -60
  1193. package/dist/commands/chunk-XGMRAKSL.js +0 -85
  1194. package/dist/commands/chunk-XHGWMD3L.js +0 -104
  1195. package/dist/commands/chunk-XKSUBUIH.js +0 -116
  1196. package/dist/commands/chunk-XPBF5DG3.js +0 -419
  1197. package/dist/commands/chunk-XUMYPESL.js +0 -160
  1198. package/dist/commands/chunk-XXC32PVL.js +0 -541
  1199. package/dist/commands/chunk-XXN2EZBY.js +0 -133
  1200. package/dist/commands/chunk-XXNEY4B3.js +0 -110
  1201. package/dist/commands/chunk-Y27PTXXI.js +0 -258
  1202. package/dist/commands/chunk-Y4EBUI6M.js +0 -237
  1203. package/dist/commands/chunk-YAU3LYNF.js +0 -60
  1204. package/dist/commands/chunk-YDURQICF.js +0 -204
  1205. package/dist/commands/chunk-YGFOGA7C.js +0 -1153
  1206. package/dist/commands/chunk-YHJ2AJMA.js +0 -66
  1207. package/dist/commands/chunk-YIA6FC3K.js +0 -78
  1208. package/dist/commands/chunk-YM77CF4D.js +0 -183
  1209. package/dist/commands/chunk-YNPRJCEO.js +0 -81
  1210. package/dist/commands/chunk-YTBQAD5W.js +0 -170
  1211. package/dist/commands/chunk-YVH2OLDS.js +0 -104
  1212. package/dist/commands/chunk-ZAAHZY2A.js +0 -19
  1213. package/dist/commands/chunk-ZBZ5DDCH.js +0 -1866
  1214. package/dist/commands/chunk-ZLRUHSOP.js +0 -48
  1215. package/dist/commands/chunk-ZNR75OXP.js +0 -444
  1216. package/dist/commands/chunk-ZSOR4ISJ.js +0 -75
  1217. package/dist/commands/chunk-ZVAIIHBE.js +0 -63
  1218. package/dist/commands/chunk-ZYFHYQA7.js +0 -51
  1219. package/dist/commands/chunk-ZZFFSQF4.js +0 -218
  1220. package/dist/commands/chunk-ZZULXNC2.js +0 -47
  1221. package/dist/commands/chunk-ZZXO6TFH.js +0 -232
  1222. package/dist/commands/run-ship-lap-W5T2VHFC.js +0 -30
  1223. package/dist/commands/test-related-ZCNC46MS.js +0 -113
  1224. package/dist/commands/unused-members-STULPRBU.js +0 -331
  1225. package/dist/hooks/chunk-5CUXGQT6.js +0 -8353
  1226. package/dist/hooks/chunk-5R5YFQR5.js +0 -931
  1227. package/dist/hooks/chunk-6RLY27FT.js +0 -232
  1228. package/dist/hooks/chunk-6YGMIODI.js +0 -86
  1229. package/dist/hooks/chunk-AO4TOV4V.js +0 -5026
  1230. package/dist/hooks/chunk-FOW4B7OQ.js +0 -1795
  1231. package/dist/hooks/chunk-G5WSPYJ6.js +0 -5663
  1232. package/dist/hooks/chunk-HHIVWGHX.js +0 -6869
  1233. package/dist/hooks/chunk-IURJANNZ.js +0 -1082
  1234. package/dist/hooks/chunk-OV22V63P.js +0 -10980
  1235. package/dist/hooks/chunk-SXABK6UV.js +0 -321
  1236. package/dist/hooks/run-ship-lap-VCEOUHQI.js +0 -8
package/dist/josh.js CHANGED
@@ -678,8 +678,8 @@ function run_socket_probe(target2, kill_after_ms = PROBE_TIMEOUT_MS) {
678
678
  }).status ?? void 0;
679
679
  }
680
680
  function is_live_beacon(target2, probe = run_socket_probe) {
681
- const own2 = beacons.get(`${BEACON_SCHEME}${target2}`);
682
- if (own2 !== void 0) return own2.listening;
681
+ const own3 = beacons.get(`${BEACON_SCHEME}${target2}`);
682
+ if (own3 !== void 0) return own3.listening;
683
683
  const status2 = probe(target2);
684
684
  if (status2 === BEACON_LIVE_STATUS) return true;
685
685
  return status2 === BEACON_GONE_STATUS ? false : void 0;
@@ -884,89 +884,83 @@ var init_agent_session_environment = __esm({
884
884
  }
885
885
  });
886
886
 
887
- // scripts/agent/agent-provider.ts
888
- import { z as z7 } from "zod";
889
- function trimmed(value2) {
890
- const result = value2?.trim();
891
- return result === void 0 || result.length === EMPTY_LENGTH ? void 0 : result;
892
- }
893
- function rejection(key2, value2, expected) {
894
- return { kind: "rejected", note: `${key2}=${value2} ${expected}, so the agent was not started` };
895
- }
896
- function has_session(environment2, keys) {
897
- return keys.some((key2) => trimmed(environment2[key2]) !== void 0);
898
- }
899
- function handed_provider(environment2) {
900
- const value2 = trimmed(environment2[HANDED_PROVIDER_KEY]);
901
- if (value2 === void 0) return DEFAULT_PROVIDER;
902
- const parsed = PROVIDER_SCHEMA.safeParse(value2);
903
- return parsed.success ? { kind: "provider", provider: parsed.data } : rejection(HANDED_PROVIDER_KEY, value2, "is not an allowed provider");
904
- }
905
- function detected_provider(environment2) {
906
- const has_codex = has_session(environment2, [CODEX_SESSION_KEY]);
907
- const has_claude = has_session(environment2, agent_session_environment.PARENT_SESSION_KEYS);
908
- if (has_codex === has_claude) return has_codex ? CONFLICTING_SESSIONS : void 0;
909
- return { kind: "provider", provider: has_codex ? OPENAI_PROVIDER : ANTHROPIC_PROVIDER };
910
- }
911
- function resolve_provider(environment2 = process.env) {
912
- return detected_provider(environment2) ?? handed_provider(environment2);
913
- }
914
- function default_notice(environment2 = process.env) {
915
- const selected = resolve_provider(environment2);
916
- return selected.kind === "provider" && selected.is_default === true ? DEFAULT_NOTICE : "";
917
- }
918
- function warn_of_default(environment2 = process.env) {
919
- const notice = default_notice(environment2).trim();
920
- if (notice !== "") console.error(notice);
921
- }
922
- function has_completion_callback(environment2 = process.env) {
923
- const selected = resolve_provider(environment2);
924
- return selected.kind !== "provider" || selected.provider !== OPENAI_PROVIDER;
887
+ // scripts/lane/lane-ledger-kind.ts
888
+ var KIND, lane_ledger_kind;
889
+ var init_lane_ledger_kind = __esm({
890
+ "scripts/lane/lane-ledger-kind.ts"() {
891
+ "use strict";
892
+ KIND = {
893
+ STARTUP: "startup",
894
+ MERGE: "merge",
895
+ GATE: "gate",
896
+ LOAD: "load",
897
+ DISPATCH: "dispatch",
898
+ STAGE: "stage",
899
+ STOP: "stop",
900
+ CHAIN: "chain",
901
+ OVERLAP: "overlap",
902
+ HELD: "held",
903
+ RELEASED: "released",
904
+ ROUND_ONE: "round-one",
905
+ ROUND_TWO: "round-two",
906
+ OFFERABLE: "offerable",
907
+ OFFER: "offer",
908
+ CORE_WAIT: "core-wait",
909
+ CORE_ADMISSION: "core-admission",
910
+ UNIT_FILES: "unit-files",
911
+ TEST_RELATED: "test-related",
912
+ TEST_PINNED: "test-pinned",
913
+ SPLIT_NOTICE: "split-notice",
914
+ SPLIT_FILED: "split-filed",
915
+ UNPLANNED_NOTICE: "unplanned-notice",
916
+ LANE_STATE: "lane-state",
917
+ PUSH_MISS: "push-miss",
918
+ EARLY_PUSH: "early-push",
919
+ SHIP_LAP: "ship-lap",
920
+ SIZE: "size",
921
+ LIMIT: "limit"
922
+ };
923
+ lane_ledger_kind = { KIND };
924
+ }
925
+ });
926
+
927
+ // scripts/lib/inherited-scope.ts
928
+ import { AsyncLocalStorage } from "node:async_hooks";
929
+ function storage(key2) {
930
+ const symbol = Symbol.for(key2);
931
+ const existing = Reflect.get(globalThis, symbol);
932
+ const scope3 = existing instanceof AsyncLocalStorage ? existing : new AsyncLocalStorage();
933
+ Reflect.set(globalThis, symbol, scope3);
934
+ return scope3;
925
935
  }
926
- function handoff_environment(environment2 = process.env) {
927
- const selected = resolve_provider(environment2);
928
- return selected.kind === "provider" ? { [HANDED_PROVIDER_KEY]: selected.provider } : {};
936
+ function create(key2, schema) {
937
+ const scope3 = storage(key2);
938
+ function local() {
939
+ return schema.safeParse(scope3.getStore()).data;
940
+ }
941
+ function current() {
942
+ return local() ?? json_value.parse_with(process.env[key2] ?? "", schema);
943
+ }
944
+ async function within2(value2, run3) {
945
+ return await scope3.run(value2, run3);
946
+ }
947
+ function environment2() {
948
+ const value2 = current();
949
+ return value2 === void 0 ? {} : { [key2]: JSON.stringify(value2) };
950
+ }
951
+ return { current, local, within: within2, environment: environment2 };
929
952
  }
930
- var EMPTY_LENGTH, PROVIDER_SCHEMA, ANTHROPIC_PROVIDER, OPENAI_PROVIDER, CODEX_SESSION_KEY, CONFLICTING_SESSIONS, HANDED_PROVIDER_KEY, DEFAULT_PROVIDER, DEFAULT_NOTICE, agent_provider;
931
- var init_agent_provider = __esm({
932
- "scripts/agent/agent-provider.ts"() {
953
+ var inherited_scope;
954
+ var init_inherited_scope = __esm({
955
+ "scripts/lib/inherited-scope.ts"() {
933
956
  "use strict";
934
- init_agent_session_environment();
935
- EMPTY_LENGTH = 0;
936
- PROVIDER_SCHEMA = z7.enum(["anthropic", "openai"]);
937
- ANTHROPIC_PROVIDER = "anthropic";
938
- OPENAI_PROVIDER = "openai";
939
- CODEX_SESSION_KEY = "CODEX_THREAD_ID";
940
- CONFLICTING_SESSIONS = {
941
- kind: "rejected",
942
- note: "both Codex and Claude Code sessions were detected"
943
- };
944
- HANDED_PROVIDER_KEY = "JOSH_AGENT_PROVIDER";
945
- DEFAULT_PROVIDER = {
946
- kind: "provider",
947
- provider: ANTHROPIC_PROVIDER,
948
- is_default: true
949
- };
950
- DEFAULT_NOTICE = ` No agent session or ${HANDED_PROVIDER_KEY} was found, so the provider defaulted to ${ANTHROPIC_PROVIDER} (Claude Code).`;
951
- agent_provider = {
952
- ANTHROPIC_PROVIDER,
953
- CODEX_SESSION_KEY,
954
- HANDED_PROVIDER_KEY,
955
- OPENAI_PROVIDER,
956
- PROVIDER_SCHEMA,
957
- default_notice,
958
- handoff_environment,
959
- has_completion_callback,
960
- rejection,
961
- resolve_provider,
962
- trimmed,
963
- warn_of_default
964
- };
957
+ init_json_value();
958
+ inherited_scope = { create };
965
959
  }
966
960
  });
967
961
 
968
962
  // scripts/git/git-ssh-keepalive.ts
969
- import { execa as execa3 } from "execa";
963
+ import { execa } from "execa";
970
964
  function to_environment_value(name) {
971
965
  return process.env[name]?.trim() ?? "";
972
966
  }
@@ -978,7 +972,7 @@ async function has_configured_ssh_command() {
978
972
  if (to_configured_ssh_command() !== "") return true;
979
973
  try {
980
974
  const git_command_bin = git_utilities.get_git_command_for_spawn();
981
- const { stdout } = await execa3(git_command_bin, CONFIG_PROBE_ARGUMENTS, PROBE_OPTIONS);
975
+ const { stdout } = await execa(git_command_bin, CONFIG_PROBE_ARGUMENTS, PROBE_OPTIONS);
982
976
  return stdout.trim() !== "";
983
977
  } catch (error) {
984
978
  return has_timed_out(error);
@@ -1009,7 +1003,7 @@ var init_git_ssh_keepalive = __esm({
1009
1003
  });
1010
1004
 
1011
1005
  // scripts/git/git-push-transport.ts
1012
- import { execa as execa4 } from "execa";
1006
+ import { execa as execa2 } from "execa";
1013
1007
  async function to_push_options() {
1014
1008
  return {
1015
1009
  stdio: "inherit",
@@ -1021,7 +1015,7 @@ async function did_push_time_out(arguments_list) {
1021
1015
  const git_command_bin = git_utilities.get_git_command_for_spawn();
1022
1016
  const options = await to_push_options();
1023
1017
  try {
1024
- await execa4(git_command_bin, [PUSH_SUBCOMMAND, ...arguments_list], options);
1018
+ await execa2(git_command_bin, [PUSH_SUBCOMMAND, ...arguments_list], options);
1025
1019
  return false;
1026
1020
  } catch (error) {
1027
1021
  if (has_timed_out(error)) return true;
@@ -1064,10 +1058,10 @@ var init_git_push_transport = __esm({
1064
1058
  });
1065
1059
 
1066
1060
  // scripts/git/git-spawn.ts
1067
- import { execa as execa5 } from "execa";
1061
+ import { execa as execa3 } from "execa";
1068
1062
  async function read2(arguments_, timeout_ms = GIT_TIMEOUT_MS) {
1069
1063
  const git_cmd = git_utilities.get_git_command_for_spawn();
1070
- const { stdout } = await execa5(git_cmd, arguments_, { timeout: timeout_ms });
1064
+ const { stdout } = await execa3(git_cmd, arguments_, { timeout: timeout_ms });
1071
1065
  return stdout.trimEnd();
1072
1066
  }
1073
1067
  function to_budget_error(command, error, timeout_ms) {
@@ -1080,7 +1074,7 @@ function to_budget_error(command, error, timeout_ms) {
1080
1074
  async function spawn_remote(arguments_, options) {
1081
1075
  const git_cmd = git_utilities.get_git_command_for_spawn();
1082
1076
  try {
1083
- const { stdout } = await execa5(git_cmd, arguments_, options);
1077
+ const { stdout } = await execa3(git_cmd, arguments_, options);
1084
1078
  return typeof stdout === "string" ? stdout.trimEnd() : "";
1085
1079
  } catch (error) {
1086
1080
  throw to_budget_error(arguments_[0] ?? "", error, options.timeout);
@@ -1104,7 +1098,7 @@ async function with_output(command, arguments_list, options = {}) {
1104
1098
  const git_command_bin = git_utilities.get_git_command_for_spawn();
1105
1099
  const spawn_arguments = [...config_options, command, ...arguments_list];
1106
1100
  try {
1107
- await execa5(git_command_bin, spawn_arguments, { stdio: "inherit", timeout: timeout_ms });
1101
+ await execa3(git_command_bin, spawn_arguments, { stdio: "inherit", timeout: timeout_ms });
1108
1102
  } catch (error) {
1109
1103
  throw to_budget_error(command, error, timeout_ms);
1110
1104
  }
@@ -1800,6 +1794,87 @@ var init_durable_state = __esm({
1800
1794
  }
1801
1795
  });
1802
1796
 
1797
+ // scripts/agent/agent-provider.ts
1798
+ import { z as z6 } from "zod";
1799
+ function trimmed(value2) {
1800
+ const result = value2?.trim();
1801
+ return result === void 0 || result.length === EMPTY_LENGTH ? void 0 : result;
1802
+ }
1803
+ function rejection(key2, value2, expected) {
1804
+ return { kind: "rejected", note: `${key2}=${value2} ${expected}, so the agent was not started` };
1805
+ }
1806
+ function has_session(environment2, keys) {
1807
+ return keys.some((key2) => trimmed(environment2[key2]) !== void 0);
1808
+ }
1809
+ function handed_provider(environment2) {
1810
+ const value2 = trimmed(environment2[HANDED_PROVIDER_KEY]);
1811
+ if (value2 === void 0) return DEFAULT_PROVIDER;
1812
+ const parsed = PROVIDER_SCHEMA.safeParse(value2);
1813
+ return parsed.success ? { kind: "provider", provider: parsed.data } : rejection(HANDED_PROVIDER_KEY, value2, "is not an allowed provider");
1814
+ }
1815
+ function detected_provider(environment2) {
1816
+ const has_codex = has_session(environment2, [CODEX_SESSION_KEY]);
1817
+ const has_claude = has_session(environment2, agent_session_environment.PARENT_SESSION_KEYS);
1818
+ if (has_codex === has_claude) return has_codex ? CONFLICTING_SESSIONS : void 0;
1819
+ return { kind: "provider", provider: has_codex ? OPENAI_PROVIDER : ANTHROPIC_PROVIDER };
1820
+ }
1821
+ function resolve_provider(environment2 = process.env) {
1822
+ return detected_provider(environment2) ?? handed_provider(environment2);
1823
+ }
1824
+ function default_notice(environment2 = process.env) {
1825
+ const selected = resolve_provider(environment2);
1826
+ return selected.kind === "provider" && selected.is_default === true ? DEFAULT_NOTICE : "";
1827
+ }
1828
+ function warn_of_default(environment2 = process.env) {
1829
+ const notice = default_notice(environment2).trim();
1830
+ if (notice !== "") console.error(notice);
1831
+ }
1832
+ function has_completion_callback(environment2 = process.env) {
1833
+ const selected = resolve_provider(environment2);
1834
+ return selected.kind !== "provider" || selected.provider !== OPENAI_PROVIDER;
1835
+ }
1836
+ function handoff_environment(environment2 = process.env) {
1837
+ const selected = resolve_provider(environment2);
1838
+ return selected.kind === "provider" ? { [HANDED_PROVIDER_KEY]: selected.provider } : {};
1839
+ }
1840
+ var EMPTY_LENGTH, PROVIDER_SCHEMA, ANTHROPIC_PROVIDER, OPENAI_PROVIDER, CODEX_SESSION_KEY, CONFLICTING_SESSIONS, HANDED_PROVIDER_KEY, DEFAULT_PROVIDER, DEFAULT_NOTICE, agent_provider;
1841
+ var init_agent_provider = __esm({
1842
+ "scripts/agent/agent-provider.ts"() {
1843
+ "use strict";
1844
+ init_agent_session_environment();
1845
+ EMPTY_LENGTH = 0;
1846
+ PROVIDER_SCHEMA = z6.enum(["anthropic", "openai"]);
1847
+ ANTHROPIC_PROVIDER = "anthropic";
1848
+ OPENAI_PROVIDER = "openai";
1849
+ CODEX_SESSION_KEY = "CODEX_THREAD_ID";
1850
+ CONFLICTING_SESSIONS = {
1851
+ kind: "rejected",
1852
+ note: "both Codex and Claude Code sessions were detected"
1853
+ };
1854
+ HANDED_PROVIDER_KEY = "JOSH_AGENT_PROVIDER";
1855
+ DEFAULT_PROVIDER = {
1856
+ kind: "provider",
1857
+ provider: ANTHROPIC_PROVIDER,
1858
+ is_default: true
1859
+ };
1860
+ DEFAULT_NOTICE = ` No agent session or ${HANDED_PROVIDER_KEY} was found, so the provider defaulted to ${ANTHROPIC_PROVIDER} (Claude Code).`;
1861
+ agent_provider = {
1862
+ ANTHROPIC_PROVIDER,
1863
+ CODEX_SESSION_KEY,
1864
+ HANDED_PROVIDER_KEY,
1865
+ OPENAI_PROVIDER,
1866
+ PROVIDER_SCHEMA,
1867
+ default_notice,
1868
+ handoff_environment,
1869
+ has_completion_callback,
1870
+ rejection,
1871
+ resolve_provider,
1872
+ trimmed,
1873
+ warn_of_default
1874
+ };
1875
+ }
1876
+ });
1877
+
1803
1878
  // scripts/lib/cli-flags.ts
1804
1879
  import { parseArgs } from "node:util";
1805
1880
  function usage_line(known_flags, command) {
@@ -2027,7 +2102,7 @@ var init_run_invocation = __esm({
2027
2102
 
2028
2103
  // scripts/run/carry/run-carry-added.ts
2029
2104
  function issues_of2(added, is_priority) {
2030
- return added.filter((entry) => entry.is_priority === is_priority).map((entry) => entry.issue);
2105
+ return added.filter((entry2) => entry2.is_priority === is_priority).map((entry2) => entry2.issue);
2031
2106
  }
2032
2107
  function ordered(declared2, added = []) {
2033
2108
  const sequence = [...issues_of2(added, true), ...declared2, ...issues_of2(added, false)];
@@ -2036,7 +2111,7 @@ function ordered(declared2, added = []) {
2036
2111
  function next_added(carry, additions) {
2037
2112
  const next = [...carry.added ?? []];
2038
2113
  for (const addition of additions) {
2039
- if (next.every((entry) => entry.issue !== addition.issue)) next.push(addition);
2114
+ if (next.every((entry2) => entry2.issue !== addition.issue)) next.push(addition);
2040
2115
  }
2041
2116
  return next;
2042
2117
  }
@@ -2180,7 +2255,7 @@ var init_time_instant = __esm({
2180
2255
  });
2181
2256
 
2182
2257
  // scripts/cost-runtime/cost-usage.ts
2183
- import { z as z8 } from "zod";
2258
+ import { z as z7 } from "zod";
2184
2259
  function split_cache_write(usage) {
2185
2260
  const total = usage.cache_creation_input_tokens ?? 0;
2186
2261
  const detail = usage.cache_creation;
@@ -2241,10 +2316,10 @@ function later_instant(left, right) {
2241
2316
  }
2242
2317
  function dedupe(records) {
2243
2318
  const by_id = /* @__PURE__ */ new Map();
2244
- for (const record2 of records) {
2245
- const seen = by_id.get(record2.request_id);
2246
- const at_ms = later_instant(seen?.at_ms, record2.at_ms);
2247
- by_id.set(record2.request_id, { ...seen ?? record2, at_ms });
2319
+ for (const record4 of records) {
2320
+ const seen = by_id.get(record4.request_id);
2321
+ const at_ms = later_instant(seen?.at_ms, record4.at_ms);
2322
+ by_id.set(record4.request_id, { ...seen ?? record4, at_ms });
2248
2323
  }
2249
2324
  return [...by_id.values()];
2250
2325
  }
@@ -2261,7 +2336,7 @@ function add_totals(left, right) {
2261
2336
  }
2262
2337
  function sum_totals(records) {
2263
2338
  let total = EMPTY_TOTALS;
2264
- for (const record2 of records) total = add_totals(total, record2.totals);
2339
+ for (const record4 of records) total = add_totals(total, record4.totals);
2265
2340
  return total;
2266
2341
  }
2267
2342
  function billed_input(totals) {
@@ -2273,29 +2348,29 @@ var init_cost_usage = __esm({
2273
2348
  "use strict";
2274
2349
  init_json_value();
2275
2350
  init_time_instant();
2276
- CACHE_CREATION_SCHEMA = z8.object({
2277
- ephemeral_1h_input_tokens: z8.number().nullish(),
2278
- ephemeral_5m_input_tokens: z8.number().nullish()
2351
+ CACHE_CREATION_SCHEMA = z7.object({
2352
+ ephemeral_1h_input_tokens: z7.number().nullish(),
2353
+ ephemeral_5m_input_tokens: z7.number().nullish()
2279
2354
  });
2280
- USAGE_SCHEMA = z8.object({
2281
- input_tokens: z8.number(),
2282
- cache_creation_input_tokens: z8.number().nullish(),
2283
- cache_read_input_tokens: z8.number().nullish(),
2284
- output_tokens: z8.number(),
2285
- output_tokens_details: z8.object({ thinking_tokens: z8.number().nullish() }).nullish(),
2355
+ USAGE_SCHEMA = z7.object({
2356
+ input_tokens: z7.number(),
2357
+ cache_creation_input_tokens: z7.number().nullish(),
2358
+ cache_read_input_tokens: z7.number().nullish(),
2359
+ output_tokens: z7.number(),
2360
+ output_tokens_details: z7.object({ thinking_tokens: z7.number().nullish() }).nullish(),
2286
2361
  cache_creation: CACHE_CREATION_SCHEMA.nullish()
2287
2362
  });
2288
- MESSAGE_SCHEMA = z8.object({
2289
- id: z8.string().nullish(),
2290
- model: z8.string().nullish(),
2363
+ MESSAGE_SCHEMA = z7.object({
2364
+ id: z7.string().nullish(),
2365
+ model: z7.string().nullish(),
2291
2366
  usage: USAGE_SCHEMA.nullish()
2292
2367
  });
2293
- LINE_SCHEMA = z8.object({
2294
- type: z8.string(),
2295
- requestId: z8.string().nullish(),
2296
- uuid: z8.string().nullish(),
2297
- gitBranch: z8.string().nullish(),
2298
- timestamp: z8.string().nullish(),
2368
+ LINE_SCHEMA = z7.object({
2369
+ type: z7.string(),
2370
+ requestId: z7.string().nullish(),
2371
+ uuid: z7.string().nullish(),
2372
+ gitBranch: z7.string().nullish(),
2373
+ timestamp: z7.string().nullish(),
2299
2374
  message: MESSAGE_SCHEMA.nullish()
2300
2375
  });
2301
2376
  SYNTHETIC_MODEL = "<synthetic>";
@@ -2363,9 +2438,9 @@ function lane_transcript_directories(main_cwd, home) {
2363
2438
  ).map((name) => path18.join(projects, name));
2364
2439
  }
2365
2440
  function transcript_directories(cwd, home = homedir()) {
2366
- const own2 = transcript_directory(cwd, home);
2441
+ const own3 = transcript_directory(cwd, home);
2367
2442
  const lanes = session_cwd(cwd) === cwd ? lane_transcript_directories(cwd, home) : [];
2368
- return [.../* @__PURE__ */ new Set([own2, ...lanes])];
2443
+ return [.../* @__PURE__ */ new Set([own3, ...lanes])];
2369
2444
  }
2370
2445
  function home_directory() {
2371
2446
  return homedir();
@@ -2457,7 +2532,7 @@ function empty_session() {
2457
2532
  baseline_tokens: 0
2458
2533
  };
2459
2534
  }
2460
- function tally2(content) {
2535
+ function tally(content) {
2461
2536
  const outcomes = content.split("\n").map((line2) => cost_usage.parse_line(line2));
2462
2537
  const records = outcomes.flatMap(
2463
2538
  (outcome) => outcome.kind === "record" ? [outcome.record] : []
@@ -2475,7 +2550,7 @@ function tally2(content) {
2475
2550
  function read_session(file) {
2476
2551
  const content = file_reader.read_if_readable(file.path);
2477
2552
  if (content === void 0) return { session_id: file.session_id, ...empty_session() };
2478
- return { session_id: file.session_id, ...tally2(content) };
2553
+ return { session_id: file.session_id, ...tally(content) };
2479
2554
  }
2480
2555
  function read_raw(file) {
2481
2556
  return file_reader.read_if_readable(file.path) ?? "";
@@ -2544,7 +2619,7 @@ var init_cost_transcript = __esm({
2544
2619
  owning_session_id,
2545
2620
  parent_session_id,
2546
2621
  latest_own_index,
2547
- tally: tally2,
2622
+ tally,
2548
2623
  read_session,
2549
2624
  read_raw,
2550
2625
  read_optional: read_optional2,
@@ -2633,8 +2708,117 @@ var init_run_carry_conversation = __esm({
2633
2708
  }
2634
2709
  });
2635
2710
 
2711
+ // scripts/lane/lane-child-mark-keys.ts
2712
+ var KEY, OVERRUN_KEY, MARK_KEYS, lane_child_mark_keys;
2713
+ var init_lane_child_mark_keys = __esm({
2714
+ "scripts/lane/lane-child-mark-keys.ts"() {
2715
+ "use strict";
2716
+ KEY = "JOSH_LANE_CHILD";
2717
+ OVERRUN_KEY = "JOSH_LANE_OVERRUN";
2718
+ MARK_KEYS = [KEY, OVERRUN_KEY];
2719
+ lane_child_mark_keys = { KEY, MARK_KEYS, OVERRUN_KEY };
2720
+ }
2721
+ });
2722
+
2723
+ // scripts/lane/lane-child-marker.ts
2724
+ function environment_for(issue) {
2725
+ issue_number_shape.require_issue_number(issue);
2726
+ return { [KEY2]: issue, [CACHE_TTL_KEY]: CACHE_TTL };
2727
+ }
2728
+ function marked_issue(source = process.env) {
2729
+ const value2 = source[KEY2];
2730
+ if (value2 === void 0) return void 0;
2731
+ return issue_number_shape.ISSUE_NUMBER_PATTERN.test(value2) ? value2 : void 0;
2732
+ }
2733
+ function overrun_environment_for(issue) {
2734
+ return { ...environment_for(issue), [OVERRUN_KEY2]: OVERRUN_VALUE };
2735
+ }
2736
+ function is_overrun(source = process.env) {
2737
+ return source[OVERRUN_KEY2] === OVERRUN_VALUE && marked_issue(source) !== void 0;
2738
+ }
2739
+ function is_child_of(directory, source = process.env) {
2740
+ const marked = marked_issue(source);
2741
+ return marked !== void 0 && marked === lane_paths.lane_issue_of(directory, { ...source });
2742
+ }
2743
+ var KEY2, OVERRUN_KEY2, CACHE_TTL_KEY, CACHE_TTL, OVERRUN_VALUE, lane_child_marker;
2744
+ var init_lane_child_marker = __esm({
2745
+ "scripts/lane/lane-child-marker.ts"() {
2746
+ "use strict";
2747
+ init_issue_number_shape();
2748
+ init_lane_child_mark_keys();
2749
+ init_lane_paths();
2750
+ ({ KEY: KEY2, OVERRUN_KEY: OVERRUN_KEY2 } = lane_child_mark_keys);
2751
+ CACHE_TTL_KEY = "CLAUDE_CODE_PROMPT_CACHE_TTL";
2752
+ CACHE_TTL = "5m";
2753
+ OVERRUN_VALUE = "1";
2754
+ lane_child_marker = {
2755
+ KEY: KEY2,
2756
+ OVERRUN_KEY: OVERRUN_KEY2,
2757
+ env_for: environment_for,
2758
+ overrun_env_for: overrun_environment_for,
2759
+ is_child_of,
2760
+ is_overrun,
2761
+ marked_issue
2762
+ };
2763
+ }
2764
+ });
2765
+
2766
+ // scripts/run/run-headless-keys.ts
2767
+ var HEADLESS_ENV_KEY, HANDOFF_CHILD_KEY, BESIDE_CHILD_KEY, MARK_KEYS2, run_headless_keys;
2768
+ var init_run_headless_keys = __esm({
2769
+ "scripts/run/run-headless-keys.ts"() {
2770
+ "use strict";
2771
+ HEADLESS_ENV_KEY = "JOSH_RUN_HEADLESS";
2772
+ HANDOFF_CHILD_KEY = "JOSH_HANDOFF_CHILD";
2773
+ BESIDE_CHILD_KEY = "JOSH_BESIDE_CHILD";
2774
+ MARK_KEYS2 = [HEADLESS_ENV_KEY, HANDOFF_CHILD_KEY, BESIDE_CHILD_KEY];
2775
+ run_headless_keys = {
2776
+ BESIDE_CHILD_KEY,
2777
+ HANDOFF_CHILD_KEY,
2778
+ HEADLESS_ENV_KEY,
2779
+ MARK_KEYS: MARK_KEYS2
2780
+ };
2781
+ }
2782
+ });
2783
+
2784
+ // scripts/run/carry/run-carry-session.ts
2785
+ function own2() {
2786
+ if (lane_child_marker.marked_issue(process.env) !== void 0 || process.env[run_headless_keys.BESIDE_CHILD_KEY] === "1" || process.env[run_headless_keys.HANDOFF_CHILD_KEY] === "1") {
2787
+ return void 0;
2788
+ }
2789
+ return process.env[KEY3];
2790
+ }
2791
+ function is_owned_by(carry, owner) {
2792
+ if (carry.owner_session !== void 0) return carry.owner_session === owner.session;
2793
+ if (run_carry_conversation.is_same_conversation(carry, owner)) return true;
2794
+ return carry.owner_pid === owner.pid && carry.owner_start === owner.start;
2795
+ }
2796
+ function retain_execution(carry, owner) {
2797
+ if (owner.session === void 0 || owner.session !== carry.owner_session || owner.pid !== void 0) {
2798
+ return owner;
2799
+ }
2800
+ return {
2801
+ ...owner,
2802
+ pid: carry.owner_pid,
2803
+ start: carry.owner_start,
2804
+ provider: carry.scheduler_provider,
2805
+ is_headless: carry.is_owner_headless
2806
+ };
2807
+ }
2808
+ var KEY3, run_carry_session;
2809
+ var init_run_carry_session = __esm({
2810
+ "scripts/run/carry/run-carry-session.ts"() {
2811
+ "use strict";
2812
+ init_lane_child_marker();
2813
+ init_run_headless_keys();
2814
+ init_run_carry_conversation();
2815
+ KEY3 = "JOSH_CARRY_SESSION";
2816
+ run_carry_session = { KEY: KEY3, own: own2, is_owned_by, retain_execution };
2817
+ }
2818
+ });
2819
+
2636
2820
  // scripts/run/carry/run-carry.ts
2637
- import { z as z9 } from "zod";
2821
+ import { z as z8 } from "zod";
2638
2822
  function carry_path(git_directory2) {
2639
2823
  return durable_state.path(CARRY_PREFIX, git_directory2);
2640
2824
  }
@@ -2661,7 +2845,9 @@ function owner_of(pid, read3 = process_identity.read_start, transcript = run_car
2661
2845
  }
2662
2846
  function session_owner() {
2663
2847
  const pid = agent_session_environment.own_session_pid();
2664
- return pid === void 0 ? NO_OWNER : owner_of(pid);
2848
+ const owner = pid === void 0 ? NO_OWNER : owner_of(pid);
2849
+ const session = run_carry_session.own();
2850
+ return session === void 0 ? owner : { ...owner, session };
2665
2851
  }
2666
2852
  function fresh_carry(invocation, owner, now) {
2667
2853
  return {
@@ -2674,6 +2860,7 @@ function fresh_carry(invocation, owner, now) {
2674
2860
  failures: NO_INCREMENT3,
2675
2861
  outages: NO_INCREMENT3,
2676
2862
  owner_pid: owner.pid,
2863
+ owner_session: owner.session,
2677
2864
  owner_start: owner.start,
2678
2865
  owner_transcript: owner.transcript,
2679
2866
  is_owner_headless: owner.is_headless
@@ -2684,13 +2871,15 @@ function begin_carry(target2, invocation, owner = NO_OWNER, now = /* @__PURE__ *
2684
2871
  return stamp_file.create_stamp(target2, carry) ? carry : void 0;
2685
2872
  }
2686
2873
  function adopt_carry(target2, carry, owner = NO_OWNER) {
2874
+ const next_owner = run_carry_session.retain_execution(carry, owner);
2687
2875
  const next = {
2688
2876
  ...carry,
2689
- scheduler_provider: owner.provider,
2690
- owner_pid: owner.pid,
2691
- owner_start: owner.start,
2877
+ scheduler_provider: next_owner.provider,
2878
+ owner_pid: next_owner.pid,
2879
+ owner_session: owner.session,
2880
+ owner_start: next_owner.start,
2692
2881
  owner_transcript: owner.transcript,
2693
- is_owner_headless: owner.is_headless,
2882
+ is_owner_headless: next_owner.is_headless,
2694
2883
  is_handed_off: false
2695
2884
  };
2696
2885
  stamp_file.remove_stamp(target2);
@@ -2700,17 +2889,14 @@ function is_owner_live(carry, now = /* @__PURE__ */ new Date(), same_process = p
2700
2889
  if (same_process(carry.owner_pid, carry.owner_start) !== false) return true;
2701
2890
  return carry.is_owner_headless !== true && run_carry_conversation.is_conversation_live(carry, now);
2702
2891
  }
2703
- function is_owned_by(carry, owner) {
2704
- if (run_carry_conversation.is_same_conversation(carry, owner)) return true;
2705
- return carry.owner_pid === owner.pid && carry.owner_start === owner.start;
2706
- }
2707
2892
  function is_foreign_live_owner(carry, owner) {
2708
- return is_owner_live(carry) && !is_owned_by(carry, owner);
2893
+ return is_owner_live(carry) && !is_owned_by2(carry, owner);
2894
+ }
2895
+ function is_held_by_self(carry, caller = owner_of(process.pid)) {
2896
+ return carry.owner_pid === caller.pid && carry.owner_start === caller.start;
2709
2897
  }
2710
2898
  function is_held_by_another(carry, is_live = is_owner_live) {
2711
- const caller = owner_of(process.pid);
2712
- const is_own = carry.owner_pid === caller.pid && carry.owner_start === caller.start;
2713
- return !is_own && is_live(carry);
2899
+ return !is_held_by_self(carry) && is_live(carry);
2714
2900
  }
2715
2901
  function is_handed_off_to(carry, invocation) {
2716
2902
  return carry.is_handed_off === true && carry.invocation === invocation;
@@ -2780,7 +2966,7 @@ function unreadable_message() {
2780
2966
  function unknown_message() {
2781
2967
  return "This repository\u2019s git directory could not be read, so no run record was established.";
2782
2968
  }
2783
- var CARRY_PREFIX, REPOSITORY_DIRECTORY_INDEX, NO_INCREMENT3, MAX_CUTS, END_COMMAND, RESUME_COMMAND, READ_COMMAND, NO_OWNER, carry_addition_schema, run_carry_schema, run_carry;
2969
+ var CARRY_PREFIX, REPOSITORY_DIRECTORY_INDEX, NO_INCREMENT3, MAX_CUTS, END_COMMAND, RESUME_COMMAND, READ_COMMAND, NO_OWNER, carry_addition_schema, run_carry_schema, is_owned_by2, run_carry;
2784
2970
  var init_run_carry = __esm({
2785
2971
  "scripts/run/carry/run-carry.ts"() {
2786
2972
  "use strict";
@@ -2795,6 +2981,7 @@ var init_run_carry = __esm({
2795
2981
  init_run_carry_added();
2796
2982
  init_run_carry_change();
2797
2983
  init_run_carry_conversation();
2984
+ init_run_carry_session();
2798
2985
  CARRY_PREFIX = durable_state.PREFIX.CARRY;
2799
2986
  REPOSITORY_DIRECTORY_INDEX = 1;
2800
2987
  NO_INCREMENT3 = 0;
@@ -2803,32 +2990,34 @@ var init_run_carry = __esm({
2803
2990
  RESUME_COMMAND = "pnpm josh run:carry --resume";
2804
2991
  READ_COMMAND = "pnpm josh run:carry --json";
2805
2992
  NO_OWNER = {};
2806
- carry_addition_schema = z9.object({ issue: z9.number(), is_priority: z9.boolean() });
2807
- run_carry_schema = z9.object({
2993
+ carry_addition_schema = z8.object({ issue: z8.number(), is_priority: z8.boolean() });
2994
+ run_carry_schema = z8.object({
2808
2995
  scheduler_provider: agent_provider.PROVIDER_SCHEMA.optional(),
2809
- invocation: z9.string(),
2810
- started_at: z9.string(),
2811
- merged: z9.number(),
2812
- merged_issues: z9.array(z9.number()).optional(),
2813
- filed: z9.number(),
2814
- cuts: z9.number(),
2996
+ invocation: z8.string(),
2997
+ started_at: z8.string(),
2998
+ merged: z8.number(),
2999
+ merged_issues: z8.array(z8.number()).optional(),
3000
+ filed: z8.number(),
3001
+ cuts: z8.number(),
2815
3002
  // Defaulted, so a record that lacks the streak parses with a zero streak rather than failing to read.
2816
- failures: z9.number().default(0),
2817
- outages: z9.number().default(0),
2818
- last_outage_at: z9.string().optional(),
3003
+ failures: z8.number().default(0),
3004
+ outages: z8.number().default(0),
3005
+ last_outage_at: z8.string().optional(),
2819
3006
  // An absent owner reads as "no owner declared", which is the not-provably-live answer rather than a
2820
3007
  // live one.
2821
- owner_pid: z9.number().optional(),
2822
- owner_start: z9.string().optional(),
2823
- owner_transcript: z9.string().optional(),
2824
- is_owner_headless: z9.boolean().optional(),
2825
- is_handed_off: z9.boolean().optional(),
2826
- done: z9.array(z9.number()).optional(),
2827
- retrospective: z9.boolean().optional(),
2828
- added: z9.array(carry_addition_schema).optional(),
2829
- lane_limit: z9.number().int().positive().optional(),
2830
- launch_limit: z9.number().int().positive().optional()
3008
+ owner_pid: z8.number().optional(),
3009
+ owner_session: z8.string().optional(),
3010
+ owner_start: z8.string().optional(),
3011
+ owner_transcript: z8.string().optional(),
3012
+ is_owner_headless: z8.boolean().optional(),
3013
+ is_handed_off: z8.boolean().optional(),
3014
+ done: z8.array(z8.number()).optional(),
3015
+ retrospective: z8.boolean().optional(),
3016
+ added: z8.array(carry_addition_schema).optional(),
3017
+ lane_limit: z8.number().int().positive().optional(),
3018
+ launch_limit: z8.number().int().positive().optional()
2831
3019
  });
3020
+ ({ is_owned_by: is_owned_by2 } = run_carry_session);
2832
3021
  run_carry = {
2833
3022
  END_COMMAND,
2834
3023
  MAX_CUTS,
@@ -2851,6 +3040,7 @@ var init_run_carry = __esm({
2851
3040
  is_count_refused,
2852
3041
  is_foreign_live_owner,
2853
3042
  is_held_by_another,
3043
+ is_held_by_self,
2854
3044
  is_owner_live,
2855
3045
  lost_message,
2856
3046
  nothing_to_resume_message,
@@ -2868,73 +3058,35 @@ var init_run_carry = __esm({
2868
3058
  }
2869
3059
  });
2870
3060
 
2871
- // scripts/lane/lane-ledger-kind.ts
2872
- var KIND, lane_ledger_kind;
2873
- var init_lane_ledger_kind = __esm({
2874
- "scripts/lane/lane-ledger-kind.ts"() {
2875
- "use strict";
2876
- KIND = {
2877
- MERGE: "merge",
2878
- GATE: "gate",
2879
- LOAD: "load",
2880
- DISPATCH: "dispatch",
2881
- STAGE: "stage",
2882
- STOP: "stop",
2883
- CHAIN: "chain",
2884
- OVERLAP: "overlap",
2885
- HELD: "held",
2886
- RELEASED: "released",
2887
- ROUND_ONE: "round-one",
2888
- ROUND_TWO: "round-two",
2889
- OFFERABLE: "offerable",
2890
- OFFER: "offer",
2891
- CORE_WAIT: "core-wait",
2892
- UNIT_FILES: "unit-files",
2893
- TEST_RELATED: "test-related",
2894
- TEST_PINNED: "test-pinned",
2895
- SPLIT_NOTICE: "split-notice",
2896
- SPLIT_FILED: "split-filed",
2897
- UNPLANNED_NOTICE: "unplanned-notice",
2898
- LANE_STATE: "lane-state",
2899
- PUSH_MISS: "push-miss",
2900
- EARLY_PUSH: "early-push",
2901
- SHIP_LAP: "ship-lap",
2902
- SIZE: "size",
2903
- LIMIT: "limit"
2904
- };
2905
- lane_ledger_kind = { KIND };
2906
- }
2907
- });
2908
-
2909
3061
  // scripts/lane/lane-ledger-write.ts
2910
3062
  import { closeSync, constants as constants3, openSync, writeSync } from "node:fs";
2911
- function target_of2(repository2) {
3063
+ function target_of(repository2) {
2912
3064
  return durable_state.path(LEDGER_PREFIX, repository2, LEDGER_SUFFIX);
2913
3065
  }
2914
3066
  async function target() {
2915
3067
  if (process.env["VITEST"] !== void 0) return void 0;
2916
3068
  try {
2917
3069
  const repository2 = await run_carry.repository_directory();
2918
- return repository2 === void 0 ? void 0 : target_of2(repository2);
3070
+ return repository2 === void 0 ? void 0 : target_of(repository2);
2919
3071
  } catch {
2920
3072
  return void 0;
2921
3073
  }
2922
3074
  }
2923
- function append2(path25, entry) {
3075
+ function append(path25, entry2) {
2924
3076
  const descriptor = openSync(path25, APPEND_FLAGS, LEDGER_FILE_MODE);
2925
3077
  try {
2926
3078
  if (!stamp_file.is_own_regular_file(path25)) {
2927
3079
  throw new Error("Ledger is not an owned regular file");
2928
3080
  }
2929
- writeSync(descriptor, `${JSON.stringify(entry)}${LINE_SEPARATOR2}`);
3081
+ writeSync(descriptor, `${JSON.stringify(entry2)}${LINE_SEPARATOR}`);
2930
3082
  } finally {
2931
3083
  closeSync(descriptor);
2932
3084
  }
2933
3085
  }
2934
- async function record(entry, path25) {
3086
+ async function record(entry2, path25) {
2935
3087
  try {
2936
3088
  const destination = path25 ?? await target();
2937
- if (destination !== void 0) append2(destination, entry);
3089
+ if (destination !== void 0) append(destination, entry2);
2938
3090
  } catch {
2939
3091
  }
2940
3092
  }
@@ -2963,8 +3115,8 @@ async function record_overlap(overlap, path25) {
2963
3115
  await record({ kind: KIND2.OVERLAP, at: now_iso(), ...overlap }, path25);
2964
3116
  }
2965
3117
  async function record_held(held, path25) {
2966
- const waiting = held.waiting ?? [];
2967
- const named = waiting.length > 0 ? { waiting: [...waiting] } : {};
3118
+ const waiting2 = held.waiting ?? [];
3119
+ const named = waiting2.length > 0 ? { waiting: [...waiting2] } : {};
2968
3120
  await record({ kind: KIND2.HELD, at: now_iso(), reason: held.reason, ...named }, path25);
2969
3121
  }
2970
3122
  async function record_released(path25) {
@@ -2986,7 +3138,9 @@ async function record_round_two(round_two, path25) {
2986
3138
  await record({ kind: KIND2.ROUND_TWO, at: now_iso(), ...round_two }, path25);
2987
3139
  }
2988
3140
  async function record_core_wait(wait, path25) {
2989
- await record({ kind: KIND2.CORE_WAIT, at: now_iso(), ...wait }, path25);
3141
+ const is_immediate = wait.admission_reason !== void 0 && wait.wait_reason === void 0;
3142
+ const kind = is_immediate ? KIND2.CORE_ADMISSION : KIND2.CORE_WAIT;
3143
+ await record({ kind, at: now_iso(), ...wait }, path25);
2990
3144
  }
2991
3145
  async function record_unit_files(files, path25) {
2992
3146
  await record({ kind: KIND2.UNIT_FILES, at: now_iso(), files: [...files] }, path25);
@@ -3003,7 +3157,7 @@ async function record_split_notice(notice, path25) {
3003
3157
  async function record_split_filed(filed, path25) {
3004
3158
  const destination = path25 ?? await target();
3005
3159
  if (destination === void 0) throw new Error("Could not resolve the split-child ledger");
3006
- append2(destination, { kind: KIND2.SPLIT_FILED, at: now_iso(), ...filed });
3160
+ append(destination, { kind: KIND2.SPLIT_FILED, at: now_iso(), ...filed });
3007
3161
  }
3008
3162
  async function record_push_miss(miss, path25) {
3009
3163
  await record({ kind: KIND2.PUSH_MISS, at: now_iso(), ...miss }, path25);
@@ -3020,7 +3174,7 @@ async function record_size(size, path25) {
3020
3174
  async function record_unplanned_notice(notice, path25) {
3021
3175
  await record({ kind: KIND2.UNPLANNED_NOTICE, at: now_iso(), ...notice }, path25);
3022
3176
  }
3023
- var LEDGER_PREFIX, LEDGER_SUFFIX, LINE_SEPARATOR2, CI_WAIT_STAGE, CODERABBIT_WAIT_STAGE, CODERABBIT_RATE_LIMIT_STAGE, CODERABBIT_RETRIGGER_STAGE, PRE_DETACH_STAGE, ROUND_ONE_REUSED, LEDGER_FILE_MODE, O_APPEND, O_CREAT, O_NOFOLLOW, O_WRONLY, APPEND_FLAGS, KIND2, lane_ledger_write;
3177
+ var LEDGER_PREFIX, LEDGER_SUFFIX, LINE_SEPARATOR, CI_WAIT_STAGE, CODERABBIT_WAIT_STAGE, CODERABBIT_RATE_LIMIT_STAGE, CODERABBIT_RETRIGGER_STAGE, PRE_DETACH_STAGE, ROUND_ONE_REUSED, LEDGER_FILE_MODE, O_APPEND, O_CREAT, O_NOFOLLOW, O_WRONLY, APPEND_FLAGS, KIND2, lane_ledger_write;
3024
3178
  var init_lane_ledger_write = __esm({
3025
3179
  "scripts/lane/lane-ledger-write.ts"() {
3026
3180
  "use strict";
@@ -3030,7 +3184,7 @@ var init_lane_ledger_write = __esm({
3030
3184
  init_lane_ledger_kind();
3031
3185
  LEDGER_PREFIX = durable_state.PREFIX.LANE_LEDGER;
3032
3186
  LEDGER_SUFFIX = ".jsonl";
3033
- LINE_SEPARATOR2 = "\n";
3187
+ LINE_SEPARATOR = "\n";
3034
3188
  CI_WAIT_STAGE = "ci-wait";
3035
3189
  CODERABBIT_WAIT_STAGE = "coderabbit-wait";
3036
3190
  CODERABBIT_RATE_LIMIT_STAGE = "coderabbit-rate-limit";
@@ -3047,10 +3201,10 @@ var init_lane_ledger_write = __esm({
3047
3201
  CODERABBIT_RETRIGGER_STAGE,
3048
3202
  CODERABBIT_WAIT_STAGE,
3049
3203
  KIND: KIND2,
3050
- LINE_SEPARATOR: LINE_SEPARATOR2,
3204
+ LINE_SEPARATOR,
3051
3205
  PRE_DETACH_STAGE,
3052
3206
  ROUND_ONE_REUSED,
3053
- append: append2,
3207
+ append,
3054
3208
  record,
3055
3209
  record_chain,
3056
3210
  record_core_wait,
@@ -3078,7 +3232,7 @@ var init_lane_ledger_write = __esm({
3078
3232
  record_unit_files,
3079
3233
  record_unplanned_notice,
3080
3234
  target,
3081
- target_of: target_of2
3235
+ target_of
3082
3236
  };
3083
3237
  }
3084
3238
  });
@@ -3088,31 +3242,21 @@ var run_ship_lap_exports = {};
3088
3242
  __export(run_ship_lap_exports, {
3089
3243
  run_ship_lap: () => run_ship_lap
3090
3244
  });
3091
- import { AsyncLocalStorage } from "node:async_hooks";
3092
- import { z as z12 } from "zod";
3245
+ import { z as z13 } from "zod";
3093
3246
  async function to_ledger2(lap) {
3094
3247
  await lane_ledger_write.record_ship_lap(lap);
3095
3248
  }
3096
3249
  async function within(issue, stage, run3, parent) {
3097
- return await scope.run({ issue: Number(issue), stage, parent }, run3);
3250
+ return await scope2.within({ issue: Number(issue), stage, parent }, run3);
3098
3251
  }
3099
- function inherited() {
3100
- const text = process.env[ENVIRONMENT_KEY];
3101
- if (text === void 0 || text === "") return void 0;
3102
- try {
3103
- return lap_scope_schema.safeParse(JSON.parse(text)).data;
3104
- } catch {
3105
- return void 0;
3106
- }
3107
- }
3108
- function current_scope() {
3109
- return scope.getStore() ?? inherited();
3252
+ function current_scope2() {
3253
+ return scope2.current();
3110
3254
  }
3111
3255
  function environment(parent) {
3112
- const current = current_scope();
3256
+ const current = current_scope2();
3113
3257
  if (current === void 0) return {};
3114
3258
  return {
3115
- [ENVIRONMENT_KEY]: JSON.stringify({ issue: current.issue, stage: current.stage, parent })
3259
+ [ENVIRONMENT_KEY2]: JSON.stringify({ issue: current.issue, stage: current.stage, parent })
3116
3260
  };
3117
3261
  }
3118
3262
  function lap_of(current, step, started_ms, note) {
@@ -3124,12 +3268,12 @@ function no_note() {
3124
3268
  return {};
3125
3269
  }
3126
3270
  async function record_startup(current, sink, is_wanted) {
3127
- if (!is_wanted || startup.recorded || scope.getStore() !== void 0) return;
3271
+ if (!is_wanted || startup.recorded || scope2.local() !== void 0) return;
3128
3272
  startup.recorded = true;
3129
3273
  await sink(lap_of(current, STARTUP_STEP, 0, {}));
3130
3274
  }
3131
3275
  async function timed(step, run3, { sink = to_ledger2, note_of = no_note, startup: with_startup } = {}) {
3132
- const current = current_scope();
3276
+ const current = current_scope2();
3133
3277
  if (current === void 0) return await run3();
3134
3278
  await record_startup(current, sink, with_startup !== false);
3135
3279
  const started_ms = performance.now();
@@ -3142,18 +3286,19 @@ async function timed(step, run3, { sink = to_ledger2, note_of = no_note, startup
3142
3286
  await sink(lap_of(current, step, started_ms, noted.note));
3143
3287
  }
3144
3288
  }
3145
- var ENVIRONMENT_KEY, PARENT_SEPARATOR, STARTUP_STEP, lap_scope_schema, STEP, scope, startup, run_ship_lap;
3289
+ var ENVIRONMENT_KEY2, PARENT_SEPARATOR, STARTUP_STEP, lap_scope_schema, STEP, scope2, startup, run_ship_lap;
3146
3290
  var init_run_ship_lap = __esm({
3147
3291
  "scripts/run/ship/run-ship-lap.ts"() {
3148
3292
  "use strict";
3149
3293
  init_lane_ledger_write();
3150
- ENVIRONMENT_KEY = "JOSH_SHIP_LAP_SCOPE";
3294
+ init_inherited_scope();
3295
+ ENVIRONMENT_KEY2 = "JOSH_SHIP_LAP_SCOPE";
3151
3296
  PARENT_SEPARATOR = " \u203A ";
3152
3297
  STARTUP_STEP = "startup";
3153
- lap_scope_schema = z12.object({
3154
- issue: z12.number(),
3155
- stage: z12.string(),
3156
- parent: z12.string().optional()
3298
+ lap_scope_schema = z13.object({
3299
+ issue: z13.number(),
3300
+ stage: z13.string(),
3301
+ parent: z13.string().optional()
3157
3302
  });
3158
3303
  STEP = {
3159
3304
  PRECONDITIONS: "preconditions",
@@ -3165,9 +3310,9 @@ var init_run_ship_lap = __esm({
3165
3310
  PUSH: "push",
3166
3311
  COMMIT: "josh git"
3167
3312
  };
3168
- scope = new AsyncLocalStorage();
3313
+ scope2 = inherited_scope.create(ENVIRONMENT_KEY2, lap_scope_schema);
3169
3314
  startup = { recorded: false };
3170
- run_ship_lap = { ENVIRONMENT_KEY, STARTUP_STEP, STEP, environment, timed, within };
3315
+ run_ship_lap = { ENVIRONMENT_KEY: ENVIRONMENT_KEY2, STARTUP_STEP, STEP, environment, timed, within };
3171
3316
  }
3172
3317
  });
3173
3318
 
@@ -4538,6 +4683,14 @@ var ISSUE_WRITE_COMMANDS = {
4538
4683
  names: ["--no-auto-ok"],
4539
4684
  description: "needs human judgement or a verified user prohibition; no `auto-ok`."
4540
4685
  },
4686
+ {
4687
+ names: ["--prepare"],
4688
+ description: "create an unpublished child; `--route split` implies this."
4689
+ },
4690
+ {
4691
+ names: ["--publish <E>"],
4692
+ description: "validate/publish epic E's prepared children; retry the same epic on failure."
4693
+ },
4541
4694
  {
4542
4695
  names: ["--release"],
4543
4696
  description: "a consumer can use the change only once it is published. The filed issue becomes a blocker of the target's release issue (step 10)."
@@ -5297,7 +5450,7 @@ var RUN_COMMANDS = {
5297
5450
  // A `--halfrun-stop` / `--human-review-stop` / `--prrun-stop` sends the stop confirmation.
5298
5451
  tsx_arguments: OPTIONAL_ENV_FILE_FLAGS,
5299
5452
  reference: [
5300
- "[<issue> [--fullrun | --halfrun-stop | --human-review-stop | --prrun-stop]] | --adopt <issue>",
5453
+ "[<issue> [--fullrun | --halfrun-stop | --halfrun-round | --human-review-stop | --prrun-stop]] | --adopt <issue>",
5301
5454
  "automation",
5302
5455
  ["files"]
5303
5456
  ],
@@ -5317,6 +5470,10 @@ var RUN_COMMANDS = {
5317
5470
  names: ["--halfrun-stop"],
5318
5471
  description: "marks a `halfrun` stop for `run:entry` to adopt, and sends its `confirmation` Telegram; answers `e2e-owed` (exit 1) until `test:e2e` answered green on this tree."
5319
5472
  },
5473
+ {
5474
+ names: ["--halfrun-round"],
5475
+ description: "starts a `halfrun` fix round: re-opens the issue's stopped `halfrun` record as running, owned by this session; answers `busy` (exit 1) when the tree holds no such stop."
5476
+ },
5320
5477
  {
5321
5478
  names: ["--human-review-stop"],
5322
5479
  description: "marks a `halfrun` stop and a `human-review` lane, retaining its tree and hold. Sends `confirmation`; its worker's exit frees the execution place. Answers `e2e-owed` (exit 1) until `test:e2e` is green on this tree."
@@ -5622,7 +5779,7 @@ var SHIP_COMMANDS = {
5622
5779
  description: "Start test:pinned in the background, run the gate and, once it is green, write the /code-review brief to a file, printing its path (--join to join them; it stops on an unpinned change)",
5623
5780
  category: "AI tools",
5624
5781
  reference: [
5625
- '[--code-only] [--unpinned-ok "<reason>"] | --join [--fixing] | --pinned | --push',
5782
+ '[--code-only] [--unpinned-ok "<reason>"] | --join [--fixing] | --pinned | --push [<slots>]',
5626
5783
  "automation",
5627
5784
  ["processes", "files", "git", "network"]
5628
5785
  ],
@@ -5650,11 +5807,11 @@ var SHIP_COMMANDS = {
5650
5807
  },
5651
5808
  {
5652
5809
  arguments: "--pinned",
5653
- note: "read test:pinned alone (the ship's pre-detach reads it anyway); a lane child returns at once"
5810
+ note: "collect a stopped ship's remaining verdicts before editing or retrying; a lane child waits only for this continuation"
5654
5811
  },
5655
5812
  {
5656
- arguments: "--push",
5657
- note: "launched by a lane open: push and open the PR at a green gate"
5813
+ arguments: "--push 2",
5814
+ note: "launched by a lane open: push and open the PR at a green gate, recording the review plan\u2019s slot count on the ledger"
5658
5815
  }
5659
5816
  ]
5660
5817
  }
@@ -5750,7 +5907,7 @@ var SHIP_COMMANDS = {
5750
5907
  { names: ["--notify-message <text>"], description: "forwarded to `followup` alone." },
5751
5908
  {
5752
5909
  names: ["--review"],
5753
- description: "runs round 1 beside the gate; after sync and round 1, an owed round 2 runs beside the gate and joins before the PR opens. A High or unfixed Medium stops the ship. A pre-detach `test:pinned` stop probes remaining hunks in the background for the next pre-detach."
5910
+ description: "runs round 1 beside the gate; after sync and round 1, an owed round 2 runs beside the gate and joins before the PR opens. A High or unfixed Medium stops the ship. After a pre-detach `test:pinned` stop, collect remaining verdicts with `pnpm josh run:review --pinned` before editing or retrying."
5754
5911
  },
5755
5912
  {
5756
5913
  names: ["--unpinned-ok <reason>"],
@@ -6316,7 +6473,7 @@ var AI_COMMANDS = {
6316
6473
  },
6317
6474
  "lane:stats": {
6318
6475
  ...MEASURE_ARGUMENTS,
6319
- description: "Print period lane throughput, stage, stop (by failed CI check, longest first), check and machine-load statistics; --sinks shows stage totals, --over lane chains, --why cause groups above a net-minute threshold, and --pairs scoped pair runs",
6476
+ description: "Print period lane throughput, stage, stop (by failed CI check, longest first), check, runnable-to-dispatch wait and machine-load statistics; --sinks shows stage totals, --over lane chains, --why cause groups above a net-minute threshold, and --pairs scoped pair runs",
6320
6477
  category: "AI tools",
6321
6478
  reference: [
6322
6479
  "(--period <days> | --since <instant>) [--limit <lane-limit> | --sinks [<minutes>] | --over <minutes> | --why <minutes> | --pairs]",
@@ -6494,12 +6651,12 @@ var GATE_UNVERIFIED_PREFIX = `${WARN_ICON2} ${GATE_SUBJECT} not verified`;
6494
6651
  var PASSED_VERDICT = "passed";
6495
6652
  var FAILED_VERDICT = "failed";
6496
6653
  var UNVERIFIED_VERDICT = "unverified";
6497
- function format_counts(counts) {
6498
- if (counts.skipped === 0) return `${String(counts.ran)} checks`;
6499
- return `${String(counts.ran)} ran, ${String(counts.skipped)} skipped`;
6654
+ function format_counts(counts2) {
6655
+ if (counts2.skipped === 0) return `${String(counts2.ran)} checks`;
6656
+ return `${String(counts2.ran)} ran, ${String(counts2.skipped)} skipped`;
6500
6657
  }
6501
- function format_gate_passed(counts, total) {
6502
- return `${GATE_PASSED_PREFIX} (${format_counts(counts)}) in ${total}.`;
6658
+ function format_gate_passed(counts2, total) {
6659
+ return `${GATE_PASSED_PREFIX} (${format_counts(counts2)}) in ${total}.`;
6503
6660
  }
6504
6661
  function format_gate_unverified(skipped, total) {
6505
6662
  return `${GATE_UNVERIFIED_PREFIX} (0 ran, ${String(skipped)} skipped) in ${total}.`;
@@ -6590,6 +6747,7 @@ init_json_value();
6590
6747
  import path11 from "node:path";
6591
6748
  import { z as z3 } from "zod";
6592
6749
  var STATE_SUFFIX = ".json";
6750
+ var DEPENDENCY_WAIT_COMMAND = "lane:dependency-wait";
6593
6751
  var HUMAN_REVIEW = "human-review";
6594
6752
  var LANE_STATES = ["open", "running", "paused", HUMAN_REVIEW, "ended"];
6595
6753
  var IDLE_STATES = /* @__PURE__ */ new Set(["paused", HUMAN_REVIEW, "ended"]);
@@ -6616,10 +6774,11 @@ function read_record_file(source) {
6616
6774
  return raw === void 0 ? void 0 : json_value.parse_with(raw, lane_state_schema);
6617
6775
  }
6618
6776
  function is_idle(state_root3, common, issue) {
6619
- const record2 = read_record_file(path11.join(state_root3, record_name(common, issue)));
6620
- return record2 !== void 0 && IDLE_STATES.has(record2.state);
6777
+ const record4 = read_record_file(path11.join(state_root3, record_name(common, issue)));
6778
+ return record4 !== void 0 && IDLE_STATES.has(record4.state);
6621
6779
  }
6622
6780
  var lane_state_record = {
6781
+ DEPENDENCY_WAIT_COMMAND,
6623
6782
  HUMAN_REVIEW,
6624
6783
  LANE_STATES,
6625
6784
  STATE_SUFFIX,
@@ -6642,11 +6801,11 @@ function own_lane(checkout2, environment2) {
6642
6801
  function live_lane_count(checkout2 = process.cwd(), environment2 = process.env) {
6643
6802
  try {
6644
6803
  const lanes_root = lane_paths.lanes_root_of(checkout2, environment2);
6645
- const own2 = own_lane(checkout2, environment2);
6804
+ const own3 = own_lane(checkout2, environment2);
6646
6805
  const issues = readdirSync(lanes_root).filter(
6647
6806
  (name) => issue_number_shape.ISSUE_NUMBER_PATTERN.test(name)
6648
6807
  );
6649
- return issues.filter((issue) => issue === own2 || !is_idle_lane(lanes_root, issue, environment2)).length;
6808
+ return issues.filter((issue) => issue === own3 || !is_idle_lane(lanes_root, issue, environment2)).length;
6650
6809
  } catch {
6651
6810
  return 0;
6652
6811
  }
@@ -7293,7 +7452,7 @@ var DEV_COMMANDS = {
7293
7452
  },
7294
7453
  "lint:related": {
7295
7454
  script: "scripts/lint/lint-related.ts",
7296
- description: "Check only the changed files with prettier and eslint, and in kit the source guard tests (whole tree on fallback)",
7455
+ description: "Apply eslint fixes and prettier to the resolved scope, then check remaining errors and in kit the source guard tests (whole tree on fallback)",
7297
7456
  category: "Development",
7298
7457
  reference: [FILE_ARGUMENTS, "developer", ["processes"]],
7299
7458
  core_weight: core_weights.CORE_WEIGHTS.lint,
@@ -8645,11 +8804,11 @@ function format_usage(name) {
8645
8804
  }
8646
8805
  function format_command_help(input) {
8647
8806
  const name = canonical_command(input);
8648
- const entry = Object.hasOwn(COMMAND_MAP, name) ? COMMAND_MAP[name] : void 0;
8649
- if (entry === void 0) return void 0;
8650
- const [synopsis] = entry.reference;
8807
+ const entry2 = Object.hasOwn(COMMAND_MAP, name) ? COMMAND_MAP[name] : void 0;
8808
+ if (entry2 === void 0) return void 0;
8809
+ const [synopsis] = entry2.reference;
8651
8810
  const head = synopsis ? `josh ${name} ${synopsis}` : `josh ${name}`;
8652
- return [head, "", entry.description, "", format_usage(name)].join("\n");
8811
+ return [head, "", entry2.description, "", format_usage(name)].join("\n");
8653
8812
  }
8654
8813
  var command_usage = {
8655
8814
  USAGE_PAGES,
@@ -8660,7 +8819,7 @@ var command_usage = {
8660
8819
  // scripts/gh/gh-core-rate-limit.ts
8661
8820
  init_json_value();
8662
8821
  init_timeouts();
8663
- import { z as z6 } from "zod";
8822
+ import { z as z10 } from "zod";
8664
8823
 
8665
8824
  // scripts/gh/git-gh-exec.ts
8666
8825
  init_git_execa_error();
@@ -8677,8 +8836,8 @@ function throw_first_failure(failures) {
8677
8836
  throw first;
8678
8837
  }
8679
8838
  async function drain(pool, worker) {
8680
- for (let entry = pool.queue.shift(); entry !== void 0 && pool.failures.length === 0; entry = pool.queue.shift()) {
8681
- const [index, item] = entry;
8839
+ for (let entry2 = pool.queue.shift(); entry2 !== void 0 && pool.failures.length === 0; entry2 = pool.queue.shift()) {
8840
+ const [index, item] = entry2;
8682
8841
  try {
8683
8842
  pool.results.push({ index, value: await worker(item, index) });
8684
8843
  } catch (error) {
@@ -8701,20 +8860,20 @@ async function bounded_map(items, limit, worker) {
8701
8860
  }
8702
8861
  function limiter(limit) {
8703
8862
  const width = pool_width(limit, Infinity);
8704
- const waiting = [];
8863
+ const waiting2 = [];
8705
8864
  let active = 0;
8706
8865
  return {
8707
8866
  async run(task) {
8708
8867
  if (active < width) active += 1;
8709
8868
  else {
8710
8869
  await new Promise((resolve2) => {
8711
- waiting.push(resolve2);
8870
+ waiting2.push(resolve2);
8712
8871
  });
8713
8872
  }
8714
8873
  try {
8715
8874
  return await task();
8716
8875
  } finally {
8717
- const next = waiting.shift();
8876
+ const next = waiting2.shift();
8718
8877
  if (next === void 0) active -= 1;
8719
8878
  else next();
8720
8879
  }
@@ -8788,7 +8947,7 @@ function redact(text) {
8788
8947
  function string_leaves(value2) {
8789
8948
  if (typeof value2 === "string") return [value2];
8790
8949
  if (typeof value2 !== "object" || value2 === null) return [];
8791
- return Object.values(value2).flatMap((entry) => string_leaves(entry));
8950
+ return Object.values(value2).flatMap((entry2) => string_leaves(entry2));
8792
8951
  }
8793
8952
  function decoded(body) {
8794
8953
  const value2 = json_value.parse_or_undefined(body);
@@ -8806,7 +8965,7 @@ var token_shape = {
8806
8965
  };
8807
8966
 
8808
8967
  // scripts/gh/git-gh-exec.ts
8809
- import { execa as execa2, execaSync as execaSync2 } from "execa";
8968
+ import { execa as execa5, execaSync as execaSync2 } from "execa";
8810
8969
 
8811
8970
  // scripts/rules/git-argv.ts
8812
8971
  var ENV_ASSIGNMENT = /^[A-Za-z_]\w*=/u;
@@ -9133,6 +9292,196 @@ function class_of(kind) {
9133
9292
  }
9134
9293
  var gh_call_kind = { of, of_api, class_of };
9135
9294
 
9295
+ // scripts/run/startup/run-startup.ts
9296
+ init_stamp_file();
9297
+ init_lane_ledger_kind();
9298
+ init_inherited_scope();
9299
+ import { randomUUID as randomUUID4 } from "node:crypto";
9300
+
9301
+ // scripts/run/startup/run-startup-schema.ts
9302
+ init_lane_ledger_kind();
9303
+ import { z as z5 } from "zod";
9304
+ var scope_schema = z5.object({
9305
+ run: z5.string(),
9306
+ attempt: z5.string(),
9307
+ issue: z5.string().optional(),
9308
+ span: z5.string().optional(),
9309
+ parent: z5.string().optional(),
9310
+ destination: z5.string().optional()
9311
+ });
9312
+ var entry_schema = scope_schema.omit({ destination: true }).extend({
9313
+ kind: z5.literal(lane_ledger_kind.KIND.STARTUP),
9314
+ at: z5.string(),
9315
+ at_ms: z5.number().nonnegative().optional(),
9316
+ id: z5.string(),
9317
+ parent: z5.string().optional(),
9318
+ phase: z5.string(),
9319
+ edge: z5.enum(["start", "done", "failed", "waiting", "api", "cache"]),
9320
+ elapsed_ms: z5.number().nonnegative().optional(),
9321
+ metric: z5.string().optional(),
9322
+ key: z5.string().optional()
9323
+ });
9324
+ var run_startup_schema = { scope_schema, entry_schema };
9325
+
9326
+ // scripts/run/startup/run-startup-store.ts
9327
+ init_lane_ledger_write();
9328
+ init_run_carry();
9329
+ import { randomUUID as randomUUID3 } from "node:crypto";
9330
+ async function carried_identity(issue) {
9331
+ const repository2 = await run_carry.repository_directory();
9332
+ if (repository2 === void 0) return void 0;
9333
+ const read3 = run_carry.read_carry(run_carry.carry_path(repository2));
9334
+ if (read3.kind !== "carried") return void 0;
9335
+ return {
9336
+ run: `${repository2}:${read3.carry.started_at}`,
9337
+ attempt: randomUUID3(),
9338
+ destination: lane_ledger_write.target_of(repository2),
9339
+ ...issue !== void 0 && { issue }
9340
+ };
9341
+ }
9342
+ async function identity(issue) {
9343
+ try {
9344
+ if (process.env["VITEST"] !== void 0) return void 0;
9345
+ return await carried_identity(issue);
9346
+ } catch {
9347
+ return void 0;
9348
+ }
9349
+ }
9350
+ async function record2(entry2, destination) {
9351
+ await lane_ledger_write.record(entry2, destination);
9352
+ }
9353
+ function counts(rows, edge) {
9354
+ const result = {};
9355
+ for (const row of rows) {
9356
+ if (row.edge !== edge) continue;
9357
+ const key2 = row.metric ?? "unknown";
9358
+ result[key2] = (result[key2] ?? 0) + 1;
9359
+ }
9360
+ return result;
9361
+ }
9362
+ function is_terminal(row) {
9363
+ return row.edge === "done" || row.edge === "failed" || row.edge === "waiting";
9364
+ }
9365
+ function summary(start, rows) {
9366
+ const ending = rows.find(is_terminal);
9367
+ return {
9368
+ start,
9369
+ status: ending?.edge ?? "incomplete",
9370
+ elapsed_ms: ending?.elapsed_ms,
9371
+ api: counts(rows, "api"),
9372
+ cache: counts(rows, "cache")
9373
+ };
9374
+ }
9375
+ function by_span(entries) {
9376
+ const groups = /* @__PURE__ */ new Map();
9377
+ for (const row of entries) {
9378
+ const group = groups.get(row.id) ?? [];
9379
+ group.push(row);
9380
+ groups.set(row.id, group);
9381
+ }
9382
+ return groups;
9383
+ }
9384
+ function summarize(entries) {
9385
+ const groups = by_span(entries);
9386
+ return entries.filter((row) => row.edge === "start").map((start) => summary(start, groups.get(start.id) ?? []));
9387
+ }
9388
+ function timestamp(row) {
9389
+ return row.at_ms ?? Date.parse(row.at);
9390
+ }
9391
+ function before_end(row, other, endings) {
9392
+ const end = endings.get(other.id);
9393
+ return end !== void 0 && timestamp(row) < end;
9394
+ }
9395
+ function overlaps(left, right, endings) {
9396
+ if (left.id === right.id || left.key !== right.key) return false;
9397
+ return before_end(left, right, endings) && before_end(right, left, endings);
9398
+ }
9399
+ function concurrent_misses(entries) {
9400
+ const fills = entries.filter((row) => row.edge === "cache" && row.metric === "fill");
9401
+ const endings = new Map(entries.filter(is_terminal).map((row) => [row.id, timestamp(row)]));
9402
+ return fills.filter((row) => fills.some((other) => overlaps(row, other, endings)));
9403
+ }
9404
+ var run_startup_store = { identity, record: record2, summarize, concurrent_misses };
9405
+
9406
+ // scripts/run/startup/run-startup.ts
9407
+ var ENVIRONMENT_KEY = "JOSH_STARTUP_SCOPE";
9408
+ var scope = inherited_scope.create(ENVIRONMENT_KEY, run_startup_schema.scope_schema);
9409
+ async function record3(row) {
9410
+ try {
9411
+ await run_startup_store.record(row, scope.current()?.destination);
9412
+ } catch {
9413
+ }
9414
+ }
9415
+ function entry(current, name, edge) {
9416
+ return run_startup_schema.entry_schema.parse({
9417
+ ...current,
9418
+ kind: lane_ledger_kind.KIND.STARTUP,
9419
+ at: (/* @__PURE__ */ new Date()).toISOString(),
9420
+ at_ms: performance.timeOrigin + performance.now(),
9421
+ id: current.span ?? randomUUID4(),
9422
+ phase: name,
9423
+ edge
9424
+ });
9425
+ }
9426
+ async function completed(name, run3, options) {
9427
+ const current = scope.current();
9428
+ if (current === void 0) return await run3();
9429
+ const started = performance.now();
9430
+ await record3(entry(current, name, "start"));
9431
+ const ending = { edge: "failed" };
9432
+ try {
9433
+ const value2 = await run3();
9434
+ ending.edge = options.edge_of?.(value2) ?? "done";
9435
+ return value2;
9436
+ } finally {
9437
+ await record3({ ...entry(current, name, ending.edge), elapsed_ms: performance.now() - started });
9438
+ }
9439
+ }
9440
+ async function current_scope(options) {
9441
+ return scope.current() ?? (options.root === true ? await run_startup_store.identity(options.issue) : void 0);
9442
+ }
9443
+ async function phase(name, run3, options = {}) {
9444
+ const current = await current_scope(options);
9445
+ if (current === void 0) return await run3();
9446
+ const next = {
9447
+ ...current,
9448
+ parent: current.span,
9449
+ span: randomUUID4(),
9450
+ ...options.issue !== void 0 && { issue: options.issue }
9451
+ };
9452
+ return await scope.within(next, async () => await completed(name, run3, options));
9453
+ }
9454
+ function metric(edge, name, key2) {
9455
+ const current = scope.current();
9456
+ if (current === void 0) return;
9457
+ void record3({
9458
+ ...entry(current, "", edge),
9459
+ metric: name,
9460
+ ...key2 !== void 0 && { key: stamp_file.digest(key2) }
9461
+ });
9462
+ }
9463
+ async function waiting(name) {
9464
+ const current = scope.current();
9465
+ const started = performance.now();
9466
+ const place2 = { ...current, span: randomUUID4(), parent: current?.span };
9467
+ if (current !== void 0) await record3(entry({ ...current, ...place2 }, name, "start"));
9468
+ return async () => {
9469
+ if (current === void 0) return;
9470
+ await record3({
9471
+ ...entry({ ...current, ...place2 }, name, "waiting"),
9472
+ elapsed_ms: performance.now() - started
9473
+ });
9474
+ };
9475
+ }
9476
+ var run_startup = {
9477
+ ENVIRONMENT_KEY,
9478
+ phase,
9479
+ metric,
9480
+ waiting,
9481
+ environment: scope.environment,
9482
+ within: scope.within
9483
+ };
9484
+
9136
9485
  // scripts/gh/gh-request-tally.ts
9137
9486
  var STATE_KEY = /* @__PURE__ */ Symbol.for("josh.gh-request-tally");
9138
9487
  function is_state(value2) {
@@ -9149,7 +9498,7 @@ function shared_state() {
9149
9498
  Reflect.set(globalThis, STATE_KEY, state2);
9150
9499
  return state2;
9151
9500
  }
9152
- var { tally, endpoints, core } = shared_state();
9501
+ var { tally: tally2, endpoints, core } = shared_state();
9153
9502
  function watch_core(read3) {
9154
9503
  core.read = async () => {
9155
9504
  try {
@@ -9166,15 +9515,16 @@ function endpoint_of(kind) {
9166
9515
  }
9167
9516
  function snapshot() {
9168
9517
  const entries = [...endpoints].map(([kind, count]) => [kind, { ...count }]);
9169
- return { ...tally, endpoints: Object.fromEntries(entries) };
9518
+ return { ...tally2, endpoints: Object.fromEntries(entries) };
9170
9519
  }
9171
9520
  function count_call(kind) {
9521
+ run_startup.metric("api", gh_call_kind.class_of(kind));
9172
9522
  if (core.read !== void 0) core.start ??= core.read();
9173
- tally.calls += 1;
9523
+ tally2.calls += 1;
9174
9524
  endpoint_of(kind).calls += 1;
9175
9525
  }
9176
9526
  function count_not_modified(kind) {
9177
- tally.not_modified += 1;
9527
+ tally2.not_modified += 1;
9178
9528
  endpoint_of(kind).not_modified += 1;
9179
9529
  }
9180
9530
  function to_delta(start, end) {
@@ -9187,8 +9537,8 @@ async function core_delta() {
9187
9537
  return to_delta(start, end);
9188
9538
  }
9189
9539
  function reset() {
9190
- tally.calls = 0;
9191
- tally.not_modified = 0;
9540
+ tally2.calls = 0;
9541
+ tally2.not_modified = 0;
9192
9542
  endpoints.clear();
9193
9543
  core.read = void 0;
9194
9544
  core.start = void 0;
@@ -9204,12 +9554,12 @@ var gh_request_tally = {
9204
9554
 
9205
9555
  // scripts/gh/git-gh-check.ts
9206
9556
  init_timeouts();
9207
- import { execa } from "execa";
9557
+ import { execa as execa4 } from "execa";
9208
9558
  var GH_NOT_INSTALLED_MSG = "gh CLI is not installed. Install it from https://cli.github.com/";
9209
9559
  var gh_check = {};
9210
9560
  async function run_gh_check() {
9211
9561
  try {
9212
- await execa("gh", ["--version"], { timeout: COMMAND_TIMEOUT_MS });
9562
+ await execa4("gh", ["--version"], { timeout: COMMAND_TIMEOUT_MS });
9213
9563
  } catch {
9214
9564
  delete gh_check.promise;
9215
9565
  throw new Error(GH_NOT_INSTALLED_MSG);
@@ -9235,8 +9585,8 @@ var parse_json = {
9235
9585
  };
9236
9586
 
9237
9587
  // scripts/gh/git-gh-failure.ts
9238
- import { z as z5 } from "zod";
9239
- var error_document_schema = z5.object({ status: z5.union([z5.string(), z5.number()]).optional() }).catch({});
9588
+ import { z as z9 } from "zod";
9589
+ var error_document_schema = z9.object({ status: z9.union([z9.string(), z9.number()]).optional() }).catch({});
9240
9590
  var GH_FAILURE_FIELD = "gh_failure";
9241
9591
  function has_stdout_field(error) {
9242
9592
  return error instanceof Error && "stdout" in error && typeof error.stdout === "string";
@@ -9392,9 +9742,9 @@ function to_timeout_prefix(error) {
9392
9742
  function to_gh_error(error) {
9393
9743
  const stderr = has_stderr_field(error) ? error.stderr.trim() : "";
9394
9744
  const stdout = has_stdout_field(error) ? error.stdout.trim() : "";
9395
- const summary = stderr.length > 0 ? stderr : error_text.message_of(error);
9396
- const detail = stdout.length > 0 ? `${summary}
9397
- ${stdout}` : summary;
9745
+ const summary2 = stderr.length > 0 ? stderr : error_text.message_of(error);
9746
+ const detail = stdout.length > 0 ? `${summary2}
9747
+ ${stdout}` : summary2;
9398
9748
  return gh_failure.attach(
9399
9749
  new Error(`${to_timeout_prefix(error)}${detail}`, { cause: error }),
9400
9750
  gh_failure.classify_stdout(stdout)
@@ -9406,7 +9756,7 @@ async function spawn_gh_command(arguments_, timeout_ms, cwd) {
9406
9756
  const options = to_spawn_options(timeout_ms, cwd);
9407
9757
  gh_request_tally.count_call(gh_call_kind.of(arguments_));
9408
9758
  try {
9409
- const { stdout } = await execa2("gh", arguments_, options);
9759
+ const { stdout } = await execa5("gh", arguments_, options);
9410
9760
  return stdout.trimEnd();
9411
9761
  } catch (error) {
9412
9762
  throw to_gh_error(error);
@@ -9420,7 +9770,7 @@ async function spawn_gh_command_with_stdin(input) {
9420
9770
  const options = { input: input.stdin_body, ...to_spawn_options(input.timeout_ms, input.cwd) };
9421
9771
  gh_request_tally.count_call(gh_call_kind.of(input.args));
9422
9772
  try {
9423
- const { stdout } = await execa2("gh", input.args, options);
9773
+ const { stdout } = await execa5("gh", input.args, options);
9424
9774
  return stdout.trimEnd();
9425
9775
  } catch (error) {
9426
9776
  throw to_gh_error(error);
@@ -9442,7 +9792,7 @@ async function spawn_gh_api_status(path25, timeout_ms) {
9442
9792
  try {
9443
9793
  await check_gh_installed();
9444
9794
  gh_request_tally.count_call(gh_call_kind.of_api(path25));
9445
- const { stdout } = await execa2("gh", ["api", "--include", "--silent", path25], options);
9795
+ const { stdout } = await execa5("gh", ["api", "--include", "--silent", path25], options);
9446
9796
  return parse_status_line(stdout);
9447
9797
  } catch (error) {
9448
9798
  return status_of_failure(error);
@@ -9511,7 +9861,7 @@ async function exec_gh_api(request) {
9511
9861
  async function exec_gh_api_uncounted(request) {
9512
9862
  const options = to_spawn_options(request.timeout_ms, request.cwd);
9513
9863
  try {
9514
- const { stdout } = await execa2("gh", to_gh_api_args(request), options);
9864
+ const { stdout } = await execa5("gh", to_gh_api_args(request), options);
9515
9865
  return stdout.trimEnd();
9516
9866
  } catch (error) {
9517
9867
  throw to_gh_error(error);
@@ -9552,13 +9902,13 @@ var git_gh_exec = {
9552
9902
 
9553
9903
  // scripts/gh/gh-core-rate-limit.ts
9554
9904
  var FRESH_MS = 3e4;
9555
- var core_schema = z6.object({
9556
- used: z6.number().int().nonnegative(),
9557
- remaining: z6.number().int().nonnegative(),
9558
- limit: z6.number().int().positive(),
9559
- reset: z6.number().int().nonnegative()
9905
+ var core_schema = z10.object({
9906
+ used: z10.number().int().nonnegative(),
9907
+ remaining: z10.number().int().nonnegative(),
9908
+ limit: z10.number().int().positive(),
9909
+ reset: z10.number().int().nonnegative()
9560
9910
  });
9561
- var resources_schema = z6.object({
9911
+ var resources_schema = z10.object({
9562
9912
  core: core_schema,
9563
9913
  graphql: core_schema.optional().catch(void 0)
9564
9914
  });
@@ -9579,8 +9929,8 @@ function kept_reader(request, schema) {
9579
9929
  const kept = /* @__PURE__ */ new Map();
9580
9930
  return async function read3(exec) {
9581
9931
  const now_ms = Date.now();
9582
- const entry = kept.get(exec);
9583
- if (entry !== void 0 && now_ms - entry.at_ms < FRESH_MS) return entry.value;
9932
+ const entry2 = kept.get(exec);
9933
+ if (entry2 !== void 0 && now_ms - entry2.at_ms < FRESH_MS) return entry2.value;
9584
9934
  const value2 = await read_with(exec, request, schema);
9585
9935
  if (value2 !== void 0) kept.set(exec, { at_ms: now_ms, value: value2 });
9586
9936
  return value2;
@@ -9621,7 +9971,7 @@ init_run_carry();
9621
9971
 
9622
9972
  // scripts/git/repository-lock.ts
9623
9973
  init_process_identity();
9624
- import { randomUUID as randomUUID3 } from "node:crypto";
9974
+ import { randomUUID as randomUUID5 } from "node:crypto";
9625
9975
  import { linkSync, renameSync as renameSync2, rmSync as rmSync5 } from "node:fs";
9626
9976
  init_stamp_file();
9627
9977
  init_json_value();
@@ -9719,7 +10069,7 @@ function stale_record(target2, is_gone) {
9719
10069
  return owner !== void 0 && is_gone(owner) ? raw : void 0;
9720
10070
  }
9721
10071
  function move_aside(target2) {
9722
- const aside = `${target2}.${String(process.pid)}.${randomUUID3()}`;
10072
+ const aside = `${target2}.${String(process.pid)}.${randomUUID5()}`;
9723
10073
  try {
9724
10074
  renameSync2(target2, aside);
9725
10075
  return aside;
@@ -9791,26 +10141,26 @@ var USAGE_SUFFIX = ".jsonl";
9791
10141
  var USAGE_CAP = 2e3;
9792
10142
  var LOCK_SUFFIX = ".lock";
9793
10143
  var LOCK_WAIT_MS = 5e3;
9794
- var LINE_SEPARATOR = "\n";
9795
- function target_of(repository2) {
10144
+ var LINE_SEPARATOR2 = "\n";
10145
+ function target_of2(repository2) {
9796
10146
  return durable_state.path(durable_state.PREFIX.GH_USAGE, repository2, USAGE_SUFFIX);
9797
10147
  }
9798
10148
  function read_lines(target2) {
9799
10149
  const raw = stamp_file.read_stamp_text(target2) ?? "";
9800
- return raw.split(LINE_SEPARATOR).filter((line2) => line2 !== "");
10150
+ return raw.split(LINE_SEPARATOR2).filter((line2) => line2 !== "");
9801
10151
  }
9802
10152
  function append_held(target2, line2) {
9803
10153
  const lines = [...read_lines(target2), line2].slice(-USAGE_CAP);
9804
- stamp_file.replace_text_stamp(target2, `${lines.join(LINE_SEPARATOR)}${LINE_SEPARATOR}`);
10154
+ stamp_file.replace_text_stamp(target2, `${lines.join(LINE_SEPARATOR2)}${LINE_SEPARATOR2}`);
9805
10155
  return true;
9806
10156
  }
9807
- function append(target2, record2) {
10157
+ function append2(target2, record4) {
9808
10158
  const lock = `${target2}${LOCK_SUFFIX}`;
9809
- const line2 = JSON.stringify(record2);
10159
+ const line2 = JSON.stringify(record4);
9810
10160
  if (repository_lock.with_lock_sync(() => append_held(target2, line2), lock, LOCK_WAIT_MS)) return;
9811
10161
  throw new Error(`gh usage log: gave up waiting for the lock at ${lock}`);
9812
10162
  }
9813
- var gh_usage_log = { USAGE_CAP, append, read_lines, target_of };
10163
+ var gh_usage_log = { USAGE_CAP, append: append2, read_lines, target_of: target_of2 };
9814
10164
 
9815
10165
  // scripts/gh/gh-usage-event.ts
9816
10166
  var state = { is_written: false };
@@ -9883,86 +10233,46 @@ var NOT_ON_PATH_NOTICE = [
9883
10233
  ].join("\n");
9884
10234
 
9885
10235
  // scripts/lib/schemas.ts
9886
- import { z as z10 } from "zod";
9887
- var overrides_snapshot_schema = z10.record(z10.string(), z10.string());
9888
- var package_version_schema = z10.object({ version: z10.string() });
9889
- var package_named_version_schema = z10.looseObject({ name: z10.string(), version: z10.string() });
9890
- var package_with_version_schema = z10.looseObject({ version: z10.string() });
9891
- var ls_global_dependency_schema = z10.looseObject({ version: z10.string() });
9892
- var ls_global_dependencies_schema = z10.record(z10.string(), ls_global_dependency_schema).optional();
9893
- var pnpm_ls_global_schema = z10.array(
9894
- z10.looseObject({
10236
+ import { z as z11 } from "zod";
10237
+ var overrides_snapshot_schema = z11.record(z11.string(), z11.string());
10238
+ var package_version_schema = z11.object({ version: z11.string() });
10239
+ var package_named_version_schema = z11.looseObject({ name: z11.string(), version: z11.string() });
10240
+ var package_with_version_schema = z11.looseObject({ version: z11.string() });
10241
+ var ls_global_dependency_schema = z11.looseObject({ version: z11.string() });
10242
+ var ls_global_dependencies_schema = z11.record(z11.string(), ls_global_dependency_schema).optional();
10243
+ var pnpm_ls_global_schema = z11.array(
10244
+ z11.looseObject({
9895
10245
  dependencies: ls_global_dependencies_schema
9896
10246
  })
9897
10247
  );
9898
- var vscode_settings_schema = z10.record(z10.string(), z10.unknown());
9899
- var with_scripts_schema = z10.looseObject({
9900
- scripts: z10.record(z10.string(), z10.string()).optional()
10248
+ var vscode_settings_schema = z11.record(z11.string(), z11.unknown());
10249
+ var with_scripts_schema = z11.looseObject({
10250
+ scripts: z11.record(z11.string(), z11.string()).optional()
9901
10251
  });
9902
- var with_development_deps_schema = z10.looseObject({
9903
- devDependencies: z10.record(z10.string(), z10.string()).optional()
10252
+ var with_development_deps_schema = z11.looseObject({
10253
+ devDependencies: z11.record(z11.string(), z11.string()).optional()
9904
10254
  });
9905
- var with_package_manager_schema = z10.looseObject({
9906
- packageManager: z10.string().optional()
10255
+ var with_package_manager_schema = z11.looseObject({
10256
+ packageManager: z11.string().optional()
9907
10257
  });
9908
- var with_development_engine_schema = z10.looseObject({
9909
- devEngines: z10.record(z10.string(), z10.unknown()).optional()
10258
+ var with_development_engine_schema = z11.looseObject({
10259
+ devEngines: z11.record(z11.string(), z11.unknown()).optional()
9910
10260
  });
9911
- var bin_entry_schema = z10.union([z10.string(), z10.record(z10.string(), z10.string())]).optional();
9912
- var package_bin_schema = z10.looseObject({ bin: bin_entry_schema });
9913
- var json_object_schema = z10.record(z10.string(), z10.unknown());
9914
- var string_array_schema = z10.array(z10.string());
9915
- var string_record_schema = z10.record(z10.string(), z10.string());
10261
+ var bin_entry_schema = z11.union([z11.string(), z11.record(z11.string(), z11.string())]).optional();
10262
+ var package_bin_schema = z11.looseObject({ bin: bin_entry_schema });
10263
+ var json_object_schema = z11.record(z11.string(), z11.unknown());
10264
+ var string_array_schema = z11.array(z11.string());
10265
+ var string_record_schema = z11.record(z11.string(), z11.string());
9916
10266
 
9917
10267
  // scripts/gate/core-budget.ts
9918
10268
  init_platform_temporary();
9919
10269
  init_process_identity();
9920
10270
  init_stamp_file();
9921
- import { randomUUID as randomUUID4 } from "node:crypto";
10271
+ import { randomUUID as randomUUID6 } from "node:crypto";
9922
10272
  import { readdirSync as readdirSync5 } from "node:fs";
9923
10273
  import { availableParallelism as availableParallelism4 } from "node:os";
9924
10274
  import path21 from "node:path";
9925
10275
 
9926
- // scripts/gate/busy-average.ts
9927
- var AVERAGE_WINDOW_MS = 3e3;
9928
- function with_reading(samples, reading, ledger_cores, now) {
9929
- const kept = samples.filter((sample) => now - sample.at < AVERAGE_WINDOW_MS);
9930
- const { busy_cores } = reading;
9931
- if (busy_cores === void 0) return kept;
9932
- return [...kept, { at: now, external_cores: Math.max(0, busy_cores - ledger_cores), busy_cores }];
9933
- }
9934
- function mean_busy(samples) {
9935
- if (samples.length === 0) return void 0;
9936
- let total = 0;
9937
- for (const sample of samples) total += sample.busy_cores;
9938
- return total / samples.length;
9939
- }
9940
- function averaged(reading, samples, ledger_cores) {
9941
- if (reading.busy_cores === void 0 || samples.length === 0) return reading;
9942
- let total = 0;
9943
- for (const sample of samples) total += sample.external_cores;
9944
- return { ...reading, busy_cores: ledger_cores + total / samples.length };
9945
- }
9946
- var EASE_CORES = 1;
9947
- function with_ease(ease, busy_cores, now) {
9948
- if (busy_cores === void 0) return ease;
9949
- if (ease === void 0 || busy_cores <= ease.level - EASE_CORES) {
9950
- return { level: busy_cores, eased_at: now };
9951
- }
9952
- return ease;
9953
- }
9954
- function is_unrelieved(ease, now, window_ms) {
9955
- return ease !== void 0 && now - ease.eased_at >= window_ms;
9956
- }
9957
- var busy_average = {
9958
- AVERAGE_WINDOW_MS,
9959
- averaged,
9960
- is_unrelieved,
9961
- mean_busy,
9962
- with_ease,
9963
- with_reading
9964
- };
9965
-
9966
10276
  // scripts/gate/core-admission.ts
9967
10277
  init_timeouts();
9968
10278
 
@@ -10016,72 +10326,73 @@ function exceeds(totals, budget) {
10016
10326
  }
10017
10327
  function sum_load(reservations) {
10018
10328
  const load = { cores: 0, memory_mb: 0 };
10019
- for (const entry of reservations) add_load(load, entry.reservation);
10329
+ for (const entry2 of reservations) add_load(load, entry2.reservation);
10020
10330
  return load;
10021
10331
  }
10022
- function is_waiting(entry) {
10023
- return entry.reservation.admitted_at === void 0;
10332
+ function is_waiting(entry2) {
10333
+ return entry2.reservation.admitted_at === void 0;
10024
10334
  }
10025
10335
  function fits(entries, limit) {
10026
10336
  return !exceeds(sum_load(entries), limit);
10027
10337
  }
10028
10338
  function place(key2, reservations) {
10029
10339
  const ordered2 = reservations.toSorted(compare_claim);
10030
- const index = ordered2.findIndex((entry) => entry.key === key2);
10031
- const own2 = ordered2[index];
10032
- if (own2 === void 0) return void 0;
10340
+ const index = ordered2.findIndex((entry2) => entry2.key === key2);
10341
+ const own3 = ordered2[index];
10342
+ if (own3 === void 0) return void 0;
10033
10343
  return {
10034
- own: own2,
10344
+ own: own3,
10035
10345
  is_oldest: index === 0,
10036
- ahead: ordered2.slice(0, index).filter((entry) => is_waiting(entry)),
10037
- running: ordered2.filter((entry) => entry.key !== key2 && !is_waiting(entry))
10346
+ ahead: ordered2.slice(0, index).filter((entry2) => is_waiting(entry2)),
10347
+ running: ordered2.filter((entry2) => entry2.key !== key2 && !is_waiting(entry2))
10038
10348
  };
10039
10349
  }
10040
10350
  function first_waiter_limit(budget) {
10041
10351
  if (budget.is_overloaded === true) return budget;
10042
10352
  return { cores: budget.cores + (budget.busy_excess ?? 0), memory_mb: budget.memory_mb };
10043
10353
  }
10044
- function may_pass_waiter(own2, waiter) {
10045
- const since_ms = own2.claimed_at - waiter.claimed_at;
10046
- if (priority_rank(waiter) < priority_rank(own2)) return false;
10354
+ function may_pass_waiter(own3, waiter) {
10355
+ const since_ms = own3.claimed_at - waiter.claimed_at;
10356
+ if (priority_rank(waiter) < priority_rank(own3)) return false;
10047
10357
  if (since_ms < BYPASS_WINDOW_MS) return true;
10048
- return waiter.weight > own2.weight && since_ms < HEAVIER_BYPASS_WINDOW_MS;
10358
+ return waiter.weight > own3.weight && since_ms < HEAVIER_BYPASS_WINDOW_MS;
10049
10359
  }
10050
- function may_pass({ own: own2, ahead, running }, budget) {
10051
- const is_passable = ahead.every((entry) => may_pass_waiter(own2.reservation, entry.reservation));
10052
- return is_passable && fits([...running, own2], budget);
10360
+ function may_pass({ own: own3, ahead, running }, budget) {
10361
+ const is_passable = ahead.every((entry2) => may_pass_waiter(own3.reservation, entry2.reservation));
10362
+ return is_passable && fits([...running, own3], budget);
10053
10363
  }
10054
- function fits_in_order({ own: own2, ahead, running }, budget) {
10364
+ function fits_in_order({ own: own3, ahead, running }, budget) {
10055
10365
  const limit = ahead.length === 0 ? first_waiter_limit(budget) : budget;
10056
- return fits([...running, ...ahead, own2], limit);
10057
- }
10058
- function is_swap_stalled({ own: own2, running }, budget) {
10059
- const needed_mb = sum_load([...running, own2]).memory_mb;
10060
- return budget.memory_pressured === true && needed_mb > budget.memory_mb;
10366
+ return fits([...running, ...ahead, own3], limit);
10061
10367
  }
10062
- function is_swap_held(key2, reservations, budget) {
10368
+ function is_memory_held(key2, reservations, budget) {
10063
10369
  const placement = place(key2, reservations);
10064
- return placement !== void 0 && is_swap_stalled(placement, budget);
10370
+ if (placement === void 0) return false;
10371
+ if (placement.own.reservation.is_unit === true && budget.memory_pressured !== true) return false;
10372
+ return !fits([...placement.running, placement.own], {
10373
+ cores: Infinity,
10374
+ memory_mb: budget.memory_mb
10375
+ });
10065
10376
  }
10066
10377
  function runs_alone(placement, budget) {
10067
10378
  if (!placement.is_oldest || placement.running.length > 0 || placement.own.reservation.is_strict_admission === true) {
10068
10379
  return false;
10069
10380
  }
10070
- return budget.is_overloaded !== true && !is_swap_stalled(placement, budget);
10381
+ return budget.is_overloaded !== true;
10071
10382
  }
10072
10383
  function is_admitted(key2, reservations, budget) {
10073
10384
  const placement = place(key2, reservations);
10074
- if (placement === void 0) return false;
10385
+ if (placement === void 0 || is_memory_held(key2, reservations, budget)) return false;
10075
10386
  if (runs_alone(placement, budget)) return true;
10076
10387
  return fits_in_order(placement, budget) || may_pass(placement, budget);
10077
10388
  }
10078
10389
  function mark_admitted(entries, key2) {
10079
- const index = entries.findIndex((entry2) => entry2.key === key2);
10080
- const entry = entries[index];
10081
- if (entry === void 0) return;
10390
+ const index = entries.findIndex((entry3) => entry3.key === key2);
10391
+ const entry2 = entries[index];
10392
+ if (entry2 === void 0) return;
10082
10393
  entries[index] = {
10083
- ...entry,
10084
- reservation: { ...entry.reservation, admitted_at: entry.reservation.claimed_at }
10394
+ ...entry2,
10395
+ reservation: { ...entry2.reservation, admitted_at: entry2.reservation.claimed_at }
10085
10396
  };
10086
10397
  }
10087
10398
  function admitted_keys(reservations, budget, memory_budget = Infinity) {
@@ -10100,36 +10411,36 @@ function is_ramped(reservation, now) {
10100
10411
  return reservation.is_memory_pending !== true && admitted_at !== void 0 && now - admitted_at >= RAMP_UP_MS;
10101
10412
  }
10102
10413
  function ledger_load(reservations, now) {
10103
- const admitted = reservations.filter((entry) => entry.reservation.admitted_at !== void 0);
10104
- const ramped = admitted.filter((entry) => is_ramped(entry.reservation, now));
10414
+ const admitted = reservations.filter((entry2) => entry2.reservation.admitted_at !== void 0);
10415
+ const ramped = admitted.filter((entry2) => is_ramped(entry2.reservation, now));
10105
10416
  return { cores: sum_load(admitted).cores, memory_mb: sum_load(ramped).memory_mb };
10106
10417
  }
10107
10418
  function total_weight(reservations) {
10108
10419
  return sum_load(reservations).cores;
10109
10420
  }
10110
10421
  function narrowed_weight(key2, reservations, budget) {
10111
- const own2 = reservations.find((entry) => entry.key === key2)?.reservation;
10112
- if (own2?.is_unit !== true) return void 0;
10422
+ const own3 = reservations.find((entry2) => entry2.key === key2)?.reservation;
10423
+ if (own3?.is_unit !== true) return void 0;
10113
10424
  const others = reservations.filter(
10114
- (entry) => entry.key !== key2 && entry.reservation.admitted_at !== void 0
10425
+ (entry2) => entry2.key !== key2 && entry2.reservation.admitted_at !== void 0
10115
10426
  );
10116
10427
  const room = Math.max(MIN_GRANT, Math.floor(budget - total_weight(others)));
10117
- return room >= own2.weight ? void 0 : room;
10428
+ return room >= own3.weight ? void 0 : room;
10118
10429
  }
10119
10430
  function is_too_narrow(key2, reservations, granted) {
10120
10431
  if (granted === void 0) return false;
10121
- const own2 = reservations.find((entry) => entry.key === key2)?.reservation;
10122
- return own2 !== void 0 && granted * NARROW_DIVISOR < own2.weight;
10432
+ const own3 = reservations.find((entry2) => entry2.key === key2)?.reservation;
10433
+ return own3 !== void 0 && granted * NARROW_DIVISOR < own3.weight;
10123
10434
  }
10124
10435
  function with_grant(key2, reservations, granted) {
10125
10436
  if (granted === void 0) return [...reservations];
10126
10437
  return reservations.map(
10127
- (entry) => entry.key === key2 ? { ...entry, reservation: { ...entry.reservation, granted } } : entry
10438
+ (entry2) => entry2.key === key2 ? { ...entry2, reservation: { ...entry2.reservation, granted } } : entry2
10128
10439
  );
10129
10440
  }
10130
10441
  function admitted_load(reservations, budget) {
10131
10442
  const admitted = admitted_keys(reservations, budget);
10132
- return total_weight(reservations.filter((entry) => admitted.has(entry.key)));
10443
+ return total_weight(reservations.filter((entry2) => admitted.has(entry2.key)));
10133
10444
  }
10134
10445
  function describe_memory(ledger, budget) {
10135
10446
  if (!Number.isFinite(budget.memory_mb)) return "";
@@ -10152,7 +10463,7 @@ var core_admission = {
10152
10463
  compare_claim,
10153
10464
  describe_overflow,
10154
10465
  is_admitted,
10155
- is_swap_held,
10466
+ is_memory_held,
10156
10467
  is_too_narrow,
10157
10468
  ledger_load,
10158
10469
  narrowed_weight,
@@ -10160,11 +10471,51 @@ var core_admission = {
10160
10471
  with_grant
10161
10472
  };
10162
10473
 
10474
+ // scripts/gate/busy-average.ts
10475
+ var AVERAGE_WINDOW_MS = 3e3;
10476
+ function with_reading(samples, reading, ledger_cores, now) {
10477
+ const kept = samples.filter((sample) => now - sample.at < AVERAGE_WINDOW_MS);
10478
+ const { busy_cores } = reading;
10479
+ if (busy_cores === void 0) return kept;
10480
+ return [...kept, { at: now, external_cores: Math.max(0, busy_cores - ledger_cores), busy_cores }];
10481
+ }
10482
+ function mean_busy(samples) {
10483
+ if (samples.length === 0) return void 0;
10484
+ let total = 0;
10485
+ for (const sample of samples) total += sample.busy_cores;
10486
+ return total / samples.length;
10487
+ }
10488
+ function averaged(reading, samples, ledger_cores) {
10489
+ if (reading.busy_cores === void 0 || samples.length === 0) return reading;
10490
+ let total = 0;
10491
+ for (const sample of samples) total += sample.external_cores;
10492
+ return { ...reading, busy_cores: ledger_cores + total / samples.length };
10493
+ }
10494
+ var EASE_CORES = 1;
10495
+ function with_ease(ease, busy_cores, now) {
10496
+ if (busy_cores === void 0) return ease;
10497
+ if (ease === void 0 || busy_cores <= ease.level - EASE_CORES) {
10498
+ return { level: busy_cores, eased_at: now };
10499
+ }
10500
+ return ease;
10501
+ }
10502
+ function is_unrelieved(ease, now, window_ms) {
10503
+ return ease !== void 0 && now - ease.eased_at >= window_ms;
10504
+ }
10505
+ var busy_average = {
10506
+ AVERAGE_WINDOW_MS,
10507
+ averaged,
10508
+ is_unrelieved,
10509
+ mean_busy,
10510
+ with_ease,
10511
+ with_reading
10512
+ };
10513
+
10163
10514
  // scripts/gate/core-reservation.ts
10164
10515
  init_process_identity();
10165
10516
  init_stamp_file();
10166
10517
  init_json_value();
10167
- import { z as z11 } from "zod";
10518
+ import { z as z12 } from "zod";
10168
10519
 
10169
10520
  // scripts/gate/core-priority.ts
10170
10521
  var PRIORITY_KEY = "JOSH_CORE_PRIORITY";
@@ -10215,10 +10566,10 @@ function is_outside_held(key2, reservations, budget) {
10215
10566
  return hold_reason(key2, reservations, unloaded, granted) === void 0;
10216
10567
  }
10217
10568
  var SMALL_CLAIM_CORES = core_weights.CORE_WEIGHTS.lint;
10218
- function unseen_cores(own2, reservations, now) {
10219
- const fresh = reservations.filter((entry) => {
10220
- const { admitted_at } = entry.reservation;
10221
- if (admitted_at === void 0) return core_admission.compare_claim(entry, own2) < 0;
10569
+ function unseen_cores(own3, reservations, now) {
10570
+ const fresh = reservations.filter((entry2) => {
10571
+ const { admitted_at } = entry2.reservation;
10572
+ if (admitted_at === void 0) return core_admission.compare_claim(entry2, own3) < 0;
10222
10573
  return now - admitted_at < busy_average.AVERAGE_WINDOW_MS;
10223
10574
  });
10224
10575
  return core_admission.sum_load(fresh).cores;
@@ -10228,10 +10579,10 @@ function has_room(weight, budget, room, unseen) {
10228
10579
  return room.busy_cores !== void 0 && room.busy_cores + unseen + weight <= room.cores;
10229
10580
  }
10230
10581
  function is_ledger_held_small(key2, reservations, budget, room) {
10231
- const own2 = reservations.find((entry) => entry.key === key2);
10232
- if (own2 === void 0) return false;
10233
- const unseen = unseen_cores(own2, reservations, room.now);
10234
- if (!has_room(own2.reservation.weight, budget, room, unseen)) return false;
10582
+ const own3 = reservations.find((entry2) => entry2.key === key2);
10583
+ if (own3 === void 0) return false;
10584
+ const unseen = unseen_cores(own3, reservations, room.now);
10585
+ if (!has_room(own3.reservation.weight, budget, room, unseen)) return false;
10235
10586
  return core_admission.is_admitted(key2, reservations, { ...budget, cores: Infinity });
10236
10587
  }
10237
10588
  function is_held_in_vain(key2, reservations, budget, room) {
@@ -10263,7 +10614,7 @@ function wait_of(marker, now, home_root) {
10263
10614
  }
10264
10615
  function waits_of(entries, now, home) {
10265
10616
  const home_root = lane_paths.lanes_root_of(home);
10266
- return entries.flatMap((entry) => wait_of(entry.reservation, now, home_root)).toSorted((left, right) => right.waited_ms - left.waited_ms);
10617
+ return entries.flatMap((entry2) => wait_of(entry2.reservation, now, home_root)).toSorted((left, right) => right.waited_ms - left.waited_ms);
10267
10618
  }
10268
10619
  var core_wait = {
10269
10620
  WAIT_REASONS,
@@ -10278,20 +10629,20 @@ var core_wait = {
10278
10629
 
10279
10630
  // scripts/gate/core-reservation.ts
10280
10631
  var reservation_schema = process_owner_schema.extend({
10281
- weight: z11.number(),
10282
- claimed_at: z11.number(),
10283
- memory_mb: z11.number().optional(),
10284
- admitted_at: z11.number().optional(),
10285
- is_unit: z11.boolean().optional(),
10286
- is_strict_admission: z11.boolean().optional(),
10287
- is_memory_pending: z11.boolean().optional(),
10288
- is_priority: z11.boolean().optional(),
10289
- granted: z11.number().optional(),
10290
- command: z11.string().optional(),
10291
- checkout: z11.string().optional(),
10292
- lane: z11.string().optional(),
10293
- lanes_root: z11.string().optional(),
10294
- wait_reason: z11.enum(core_wait.WAIT_REASONS).optional()
10632
+ weight: z12.number(),
10633
+ claimed_at: z12.number(),
10634
+ memory_mb: z12.number().optional(),
10635
+ admitted_at: z12.number().optional(),
10636
+ is_unit: z12.boolean().optional(),
10637
+ is_strict_admission: z12.boolean().optional(),
10638
+ is_memory_pending: z12.boolean().optional(),
10639
+ is_priority: z12.boolean().optional(),
10640
+ granted: z12.number().optional(),
10641
+ command: z12.string().optional(),
10642
+ checkout: z12.string().optional(),
10643
+ lane: z12.string().optional(),
10644
+ lanes_root: z12.string().optional(),
10645
+ wait_reason: z12.enum(core_wait.WAIT_REASONS).optional()
10295
10646
  });
10296
10647
  function claim_fields(weight, claimed_at, options) {
10297
10648
  const { memory_mb, command, is_unit, is_strict_admission, is_memory_pending } = options;
@@ -10329,57 +10680,6 @@ function transfer(handle, pid) {
10329
10680
  }
10330
10681
  var core_reservation = { claim_fields, read_reservation, transfer, write_reservation };
10331
10682
 
10332
- // scripts/gate/core-wait-record.ts
10333
- init_lane_ledger_write();
10334
- var UNNAMED_COMMAND = "a step";
10335
- async function to_ledger(wait) {
10336
- await lane_ledger_write.record_core_wait(wait);
10337
- }
10338
- function wait_of2(claim3, now) {
10339
- if (claim3.wait_reason === void 0) return void 0;
10340
- const wait = { command: claim3.command ?? UNNAMED_COMMAND, waited_ms: now - claim3.claimed_at };
10341
- return claim3.lane === void 0 ? wait : { ...wait, issue: Number(claim3.lane) };
10342
- }
10343
- async function record_admitted(claim3, now, sink = to_ledger) {
10344
- const wait = wait_of2(claim3, now);
10345
- if (wait !== void 0) await sink(wait);
10346
- }
10347
- var core_wait_record = { record_admitted, wait_of: wait_of2 };
10348
-
10349
- // scripts/gate/held-mark.ts
10350
- var HELD_KEY = "JOSH_CORE_RESERVED";
10351
- var HELD_VALUE = "1";
10352
- var HELD_RESERVATION_KEY = "JOSH_CORE_RESERVATION";
10353
- function is_held() {
10354
- return process.env[HELD_KEY] === HELD_VALUE;
10355
- }
10356
- function held_reservation() {
10357
- const key2 = process.env[HELD_RESERVATION_KEY] ?? "";
10358
- return key2 === "" ? void 0 : key2;
10359
- }
10360
- function set_held_mark(value2, reservation) {
10361
- process.env[HELD_KEY] = value2;
10362
- process.env[HELD_RESERVATION_KEY] = reservation;
10363
- }
10364
- async function with_held_mark(run3, reservation = "") {
10365
- const previous = process.env[HELD_KEY] ?? "";
10366
- const previous_reservation = process.env[HELD_RESERVATION_KEY] ?? "";
10367
- set_held_mark(HELD_VALUE, reservation);
10368
- try {
10369
- return await run3();
10370
- } finally {
10371
- set_held_mark(previous, previous_reservation);
10372
- }
10373
- }
10374
- var held_mark = {
10375
- HELD_KEY,
10376
- HELD_RESERVATION_KEY,
10377
- HELD_VALUE,
10378
- held_reservation,
10379
- is_held,
10380
- with_held_mark
10381
- };
10382
-
10383
10683
  // scripts/gate/machine-capacity.ts
10384
10684
  init_timeouts();
10385
10685
  import { readFile } from "node:fs/promises";
@@ -10546,7 +10846,9 @@ async function read_machine(sleep2 = default_sleep2) {
10546
10846
  busy_cores,
10547
10847
  run_queue: is_host ? loadavg()[0] : void 0,
10548
10848
  available_mb: pressured_available(memory_after, memory_before),
10549
- memory_pressured: is_pressured(memory_before, memory_after)
10849
+ memory_pressured: is_pressured(memory_before, memory_after),
10850
+ memory_supported: process.platform === "darwin" || process.platform === "linux",
10851
+ total_mb: totalmem() / BYTES_PER_MB2
10550
10852
  };
10551
10853
  }
10552
10854
  async function read_sample() {
@@ -10588,6 +10890,193 @@ var machine_capacity = {
10588
10890
  swapped_between
10589
10891
  };
10590
10892
 
10893
+ // scripts/gate/core-budget-poll.ts
10894
+ function check_measurement(command, reading) {
10895
+ if (reading.memory_supported === true && !Number.isFinite(reading.available_mb)) {
10896
+ throw new Error(`${command}: memory measurement failed; admission refused`);
10897
+ }
10898
+ }
10899
+ function check_capacity(command, requested, total_mb) {
10900
+ if (total_mb === void 0) return;
10901
+ if (requested > total_mb) {
10902
+ throw new Error(
10903
+ `${command}: requested ${String(requested)} MB exceeds physical memory ${String(total_mb)} MB`
10904
+ );
10905
+ }
10906
+ }
10907
+ function check_memory2(context, reading) {
10908
+ const requested = context.fields.memory_mb ?? 0;
10909
+ if (requested === 0) return;
10910
+ const command = context.fields.command ?? "a step";
10911
+ const minimum = context.fields.is_unit === true ? requested / Math.max(1, context.fields.weight) : requested;
10912
+ check_measurement(command, reading);
10913
+ check_capacity(command, minimum, reading.total_mb);
10914
+ }
10915
+ async function current_reading(context, reservations) {
10916
+ const reading = await context.read_machine();
10917
+ const ledger = core_admission.ledger_load(reservations, context.now());
10918
+ check_memory2(context, reading);
10919
+ context.busy_samples = busy_average.with_reading(
10920
+ context.busy_samples,
10921
+ reading,
10922
+ ledger.cores,
10923
+ context.now()
10924
+ );
10925
+ const mean = busy_average.averaged(reading, context.busy_samples, ledger.cores);
10926
+ context.ease = busy_average.with_ease(context.ease, mean.busy_cores, context.now());
10927
+ return { budget: machine_capacity.machine_budget(context.budget, mean, ledger), reading };
10928
+ }
10929
+ function admit(context, decision) {
10930
+ const admitted_at = context.now();
10931
+ const { granted, overflow, reason, budget, reading } = decision;
10932
+ core_reservation.write_reservation(context.target, { ...context.fields, admitted_at, granted });
10933
+ return {
10934
+ overflow,
10935
+ granted,
10936
+ waited_ms: admitted_at - context.fields.claimed_at,
10937
+ decision: { reason, budget, reading }
10938
+ };
10939
+ }
10940
+ function mark_waiting(context, reason) {
10941
+ const previous = context.fields.wait_reason;
10942
+ if (previous === reason) return;
10943
+ context.fields = { ...context.fields, wait_reason: reason };
10944
+ core_reservation.write_reservation(context.target, context.fields);
10945
+ if (previous === void 0) context.report(core_wait.wait_line(context.fields.command, reason));
10946
+ }
10947
+ function spent_reason(context, reservations, budget) {
10948
+ const now = context.now();
10949
+ if (now >= context.deadline) return "cpu-deadline";
10950
+ const busy_cores = busy_average.mean_busy(context.busy_samples);
10951
+ const room = { busy_cores, cores: context.budget, now };
10952
+ return busy_average.is_unrelieved(context.ease, now, context.ease_window_ms) && core_wait.is_held_in_vain(context.key, reservations, budget, room) ? "cpu-unrelieved" : void 0;
10953
+ }
10954
+ function overflow_reason(context, reservations, budget) {
10955
+ if (context.fields.is_strict_admission === true || core_admission.is_memory_held(context.key, reservations, budget)) {
10956
+ return void 0;
10957
+ }
10958
+ return spent_reason(context, reservations, budget);
10959
+ }
10960
+ function overflow_of(context, reservations, decision) {
10961
+ const held = core_admission.with_grant(context.key, reservations, decision.granted);
10962
+ const overflow = {
10963
+ waited_ms: context.now() - context.fields.claimed_at,
10964
+ ledger: core_admission.sum_load(held),
10965
+ budget: decision.budget
10966
+ };
10967
+ return admit(context, { ...decision, overflow });
10968
+ }
10969
+ function fit_reason(context, reservations, budget) {
10970
+ const requested = context.fields.memory_mb ?? 0;
10971
+ if (context.fields.is_unit === true && requested > budget.memory_mb) {
10972
+ return "unit-memory-narrowing";
10973
+ }
10974
+ const strict = { ...budget, busy_excess: 0, is_overloaded: true };
10975
+ return core_admission.is_admitted(context.key, reservations, strict) ? "budget-fit" : "cpu-first-waiter";
10976
+ }
10977
+ async function poll_admission(context, reservations) {
10978
+ const { budget, reading } = await current_reading(context, reservations);
10979
+ const granted = core_admission.narrowed_weight(context.key, reservations, budget.cores);
10980
+ const reason = core_wait.hold_reason(context.key, reservations, budget, granted);
10981
+ if (reason === void 0) {
10982
+ return admit(context, {
10983
+ budget,
10984
+ reading,
10985
+ granted,
10986
+ reason: fit_reason(context, reservations, budget)
10987
+ });
10988
+ }
10989
+ const overflow = overflow_reason(context, reservations, budget);
10990
+ if (overflow !== void 0) {
10991
+ return overflow_of(context, reservations, { budget, reading, granted, reason: overflow });
10992
+ }
10993
+ mark_waiting(context, reason);
10994
+ return void 0;
10995
+ }
10996
+ var core_budget_poll = { poll_admission };
10997
+
10998
+ // scripts/gate/core-wait-record.ts
10999
+ init_lane_ledger_write();
11000
+ var UNNAMED_COMMAND = "a step";
11001
+ async function to_ledger(wait) {
11002
+ await lane_ledger_write.record_core_wait(wait);
11003
+ }
11004
+ function request_fields(claim3, admission) {
11005
+ return {
11006
+ requested_cores: claim3.weight,
11007
+ granted_cores: admission?.granted ?? claim3.weight,
11008
+ memory_mb: claim3.memory_mb ?? 0,
11009
+ wait_reason: claim3.wait_reason,
11010
+ admission_waited_ms: admission?.waited_ms
11011
+ };
11012
+ }
11013
+ function admission_fields(claim3, admission) {
11014
+ const decision = admission?.decision;
11015
+ if (decision === void 0) return {};
11016
+ return {
11017
+ ...request_fields(claim3, admission),
11018
+ admission_reason: decision.reason,
11019
+ overflow: admission?.overflow !== void 0,
11020
+ budget_cores: decision.budget.cores,
11021
+ budget_memory_mb: Number.isFinite(decision.budget.memory_mb) ? decision.budget.memory_mb : void 0,
11022
+ available_mb: decision.reading.available_mb,
11023
+ busy_cores: decision.reading.busy_cores,
11024
+ memory_pressured: decision.reading.memory_pressured
11025
+ };
11026
+ }
11027
+ function should_record(claim3, admission) {
11028
+ return claim3.wait_reason !== void 0 || admission?.decision !== void 0;
11029
+ }
11030
+ function wait_of2(claim3, now, admission) {
11031
+ if (!should_record(claim3, admission)) return void 0;
11032
+ const waited_ms = claim3.wait_reason === void 0 ? 0 : now - claim3.claimed_at;
11033
+ const wait = {
11034
+ command: claim3.command ?? UNNAMED_COMMAND,
11035
+ waited_ms,
11036
+ ...admission_fields(claim3, admission)
11037
+ };
11038
+ return claim3.lane === void 0 ? wait : { ...wait, issue: Number(claim3.lane) };
11039
+ }
11040
+ async function record_admitted(claim3, now, sink = to_ledger, admission) {
11041
+ const wait = wait_of2(claim3, now, admission);
11042
+ if (wait !== void 0) await sink(wait);
11043
+ }
11044
+ var core_wait_record = { record_admitted, wait_of: wait_of2 };
11045
+
11046
+ // scripts/gate/held-mark.ts
11047
+ var HELD_KEY = "JOSH_CORE_RESERVED";
11048
+ var HELD_VALUE = "1";
11049
+ var HELD_RESERVATION_KEY = "JOSH_CORE_RESERVATION";
11050
+ function is_held() {
11051
+ return process.env[HELD_KEY] === HELD_VALUE;
11052
+ }
11053
+ function held_reservation() {
11054
+ const key2 = process.env[HELD_RESERVATION_KEY] ?? "";
11055
+ return key2 === "" ? void 0 : key2;
11056
+ }
11057
+ function set_held_mark(value2, reservation) {
11058
+ process.env[HELD_KEY] = value2;
11059
+ process.env[HELD_RESERVATION_KEY] = reservation;
11060
+ }
11061
+ async function with_held_mark(run3, reservation = "") {
11062
+ const previous = process.env[HELD_KEY] ?? "";
11063
+ const previous_reservation = process.env[HELD_RESERVATION_KEY] ?? "";
11064
+ set_held_mark(HELD_VALUE, reservation);
11065
+ try {
11066
+ return await run3();
11067
+ } finally {
11068
+ set_held_mark(previous, previous_reservation);
11069
+ }
11070
+ }
11071
+ var held_mark = {
11072
+ HELD_KEY,
11073
+ HELD_RESERVATION_KEY,
11074
+ HELD_VALUE,
11075
+ held_reservation,
11076
+ is_held,
11077
+ with_held_mark
11078
+ };
11079
+
10591
11080
  // scripts/gate/core-budget.ts
10592
11081
  var RESERVED_PREFIX = "josh-core-reserved-";
10593
11082
  var RESERVED_SUFFIX = ".json";
@@ -10634,67 +11123,25 @@ function report_wait(line2) {
10634
11123
  process.stderr.write(`${line2}
10635
11124
  `);
10636
11125
  }
10637
- async function current_budget(context, reservations) {
10638
- const reading = await context.read_machine();
10639
- const ledger = core_admission.ledger_load(reservations, context.now());
10640
- context.busy_samples = busy_average.with_reading(
10641
- context.busy_samples,
10642
- reading,
10643
- ledger.cores,
10644
- context.now()
10645
- );
10646
- const mean = busy_average.averaged(reading, context.busy_samples, ledger.cores);
10647
- context.ease = busy_average.with_ease(context.ease, mean.busy_cores, context.now());
10648
- return machine_capacity.machine_budget(context.budget, mean, ledger);
10649
- }
10650
- function admit(context, overflow, granted) {
10651
- const admitted_at = context.now();
10652
- write_reservation2(context.target, { ...context.fields, admitted_at, granted });
10653
- return { overflow, granted, waited_ms: admitted_at - context.fields.claimed_at };
10654
- }
10655
- function overflow_of(context, reservations, budget) {
10656
- return {
10657
- waited_ms: context.now() - context.fields.claimed_at,
10658
- ledger: core_admission.sum_load(reservations),
10659
- budget
10660
- };
10661
- }
10662
- function mark_waiting(context, reason) {
10663
- const previous = context.fields.wait_reason;
10664
- if (previous === reason) return;
10665
- context.fields = { ...context.fields, wait_reason: reason };
10666
- write_reservation2(context.target, context.fields);
10667
- if (previous === void 0) context.report(core_wait.wait_line(context.fields.command, reason));
10668
- }
10669
- function is_wait_spent(context, reservations, budget) {
10670
- if (context.fields.is_strict_admission === true || core_admission.is_swap_held(context.key, reservations, budget)) {
10671
- return false;
10672
- }
10673
- const now = context.now();
10674
- if (now >= context.deadline) return true;
10675
- const busy_cores = busy_average.mean_busy(context.busy_samples);
10676
- const room = { busy_cores, cores: context.budget, now };
10677
- return busy_average.is_unrelieved(context.ease, now, context.ease_window_ms) && core_wait.is_held_in_vain(context.key, reservations, budget, room);
10678
- }
10679
- async function poll_admission(context) {
10680
- const reservations = live_reservations(context.directory);
10681
- const budget = await current_budget(context, reservations);
10682
- const granted = core_admission.narrowed_weight(context.key, reservations, budget.cores);
10683
- const reason = core_wait.hold_reason(context.key, reservations, budget, granted);
10684
- if (reason === void 0) return admit(context, void 0, granted);
10685
- if (is_wait_spent(context, reservations, budget)) {
10686
- const held = core_admission.with_grant(context.key, reservations, granted);
10687
- return admit(context, overflow_of(context, held, budget), granted);
11126
+ async function poll_admission2(context) {
11127
+ try {
11128
+ return await core_budget_poll.poll_admission(context, live_reservations(context.directory));
11129
+ } catch (error) {
11130
+ sweep_marker2(context.target);
11131
+ throw error;
10688
11132
  }
10689
- mark_waiting(context, reason);
10690
- return void 0;
10691
11133
  }
10692
11134
  async function await_admission(context) {
10693
- const admission = await poll.wait_for(async () => await poll_admission(context), {
11135
+ const admission = await poll.wait_for(async () => await poll_admission2(context), {
10694
11136
  interval_ms: context.poll_interval_ms,
10695
11137
  sleeper: context.sleep
10696
11138
  });
10697
- await core_wait_record.record_admitted(context.fields, context.now(), context.record_wait);
11139
+ await core_wait_record.record_admitted(
11140
+ context.fields,
11141
+ context.now(),
11142
+ context.record_wait,
11143
+ admission
11144
+ );
10698
11145
  return admission;
10699
11146
  }
10700
11147
  function resolve_ports(options) {
@@ -10708,7 +11155,7 @@ function claim2(weight, options = {}) {
10708
11155
  const timing = core_budget_timing.resolve_timing(options);
10709
11156
  const directory = options.directory ?? PLATFORM_TEMP_ROOT;
10710
11157
  const claimed_at = timing.now();
10711
- const name = marker_name(randomUUID4());
11158
+ const name = marker_name(randomUUID6());
10712
11159
  const target2 = path21.join(directory, name);
10713
11160
  const fields = claim_fields2(weight, claimed_at, options);
10714
11161
  write_reservation2(target2, fields);
@@ -10730,9 +11177,14 @@ async function reserve(weight, options = {}) {
10730
11177
  return { target: context.target, admission };
10731
11178
  }
10732
11179
  async function poll_claim(context) {
10733
- const admission = await poll_admission(context);
11180
+ const admission = await poll_admission2(context);
10734
11181
  if (admission === void 0) return void 0;
10735
- await core_wait_record.record_admitted(context.fields, context.now(), context.record_wait);
11182
+ await core_wait_record.record_admitted(
11183
+ context.fields,
11184
+ context.now(),
11185
+ context.record_wait,
11186
+ admission
11187
+ );
10736
11188
  return { target: context.target, admission };
10737
11189
  }
10738
11190
  function budget_waits(directory = PLATFORM_TEMP_ROOT, now = Date.now(), home = process.cwd()) {
@@ -10763,7 +11215,7 @@ async function with_command_reservation(weight, run3, options = {}) {
10763
11215
  function held_unit_claim(directory = PLATFORM_TEMP_ROOT) {
10764
11216
  const key2 = held_mark.held_reservation();
10765
11217
  if (key2 === void 0) return void 0;
10766
- const held = live_reservations(directory).find((entry) => entry.key === key2);
11218
+ const held = live_reservations(directory).find((entry2) => entry2.key === key2);
10767
11219
  return held?.reservation.is_unit === true ? held.reservation : void 0;
10768
11220
  }
10769
11221
  var core_budget = {
@@ -10881,9 +11333,9 @@ function format_rejection(cmd, targets) {
10881
11333
  const hint = targets.length > 0 ? `pass them to ${format_targets(targets)} instead` : "it runs a fixed sequence and forwards nothing";
10882
11334
  return `josh ${cmd} takes no extra arguments \u2014 ${hint}`;
10883
11335
  }
10884
- function reject_extra_arguments(cmd, entry, extra) {
10885
- if (extra.length === 0 || !is_composite_shell(entry.shell)) return void 0;
10886
- return format_rejection(cmd, entry.argument_targets ?? []);
11336
+ function reject_extra_arguments(cmd, entry2, extra) {
11337
+ if (extra.length === 0 || !is_composite_shell(entry2.shell)) return void 0;
11338
+ return format_rejection(cmd, entry2.argument_targets ?? []);
10887
11339
  }
10888
11340
  var composite_arguments = { format_rejection, is_composite_shell, reject_extra_arguments };
10889
11341
 
@@ -10966,11 +11418,11 @@ var josh_in_process = { bundled_script_path, in_process_target, run_in_process }
10966
11418
  function kit_only_notice(cmd) {
10967
11419
  return `\`josh ${cmd}\` is a kit-only command \u2014 run it from the kit repository (joshuafolkken/kit), not from a consumer project.`;
10968
11420
  }
10969
- function is_kit_only(entry) {
10970
- return entry.is_kit_only === true;
11421
+ function is_kit_only(entry2) {
11422
+ return entry2.is_kit_only === true;
10971
11423
  }
10972
11424
  function kit_only_command_names() {
10973
- return Object.entries(COMMAND_MAP).filter(([, entry]) => is_kit_only(entry)).map(([name]) => name);
11425
+ return Object.entries(COMMAND_MAP).filter(([, entry2]) => is_kit_only(entry2)).map(([name]) => name);
10974
11426
  }
10975
11427
  var kit_only = {
10976
11428
  is_kit_only,
@@ -11074,8 +11526,8 @@ function parse_remote_urls_from_config(content) {
11074
11526
  const lines = content.split("\n").map((line2) => line2.trim());
11075
11527
  return section_groups(lines).filter((group) => REMOTE_SECTION.test(group[0] ?? "")).flatMap((group) => group.map((line2) => url_value(line2))).filter((url) => url !== void 0);
11076
11528
  }
11077
- function format_identity(identity) {
11078
- return `${identity.owner}${PATH_SEPARATOR4}${identity.repo}`.toLowerCase();
11529
+ function format_identity(identity2) {
11530
+ return `${identity2.owner}${PATH_SEPARATOR4}${identity2.repo}`.toLowerCase();
11079
11531
  }
11080
11532
  var repo_origin = {
11081
11533
  GITHUB_HOST,
@@ -11128,27 +11580,27 @@ function build_alias_lookup() {
11128
11580
  function resolve_alias(cmd) {
11129
11581
  return Object.hasOwn(ALIASES, cmd) ? ALIASES[cmd] ?? cmd : cmd;
11130
11582
  }
11131
- function format_command_line(cmd, entry, alias) {
11583
+ function format_command_line(cmd, entry2, alias) {
11132
11584
  const prefix2 = alias ? `${alias}, `.padEnd(ALIAS_PAD_WIDTH + ALIAS_PAD_WIDTH) : "";
11133
- return ` ${(prefix2 + cmd).padEnd(COLUMN_WIDTH)}${entry.description}`;
11585
+ return ` ${(prefix2 + cmd).padEnd(COLUMN_WIDTH)}${entry2.description}`;
11134
11586
  }
11135
11587
  function format_category_section(category, entries, alias_lookup) {
11136
11588
  const lines = entries.map(
11137
- ([cmd, entry]) => format_command_line(cmd, entry, alias_lookup.get(cmd))
11589
+ ([cmd, entry2]) => format_command_line(cmd, entry2, alias_lookup.get(cmd))
11138
11590
  );
11139
11591
  return [`${category}:`, ...lines].join("\n");
11140
11592
  }
11141
- function is_visible_command(entry, is_all, is_consumer) {
11142
- if (is_consumer && kit_only.is_kit_only(entry)) return false;
11143
- return is_all || entry.reference[1] === "developer";
11593
+ function is_visible_command(entry2, is_all, is_consumer) {
11594
+ if (is_consumer && kit_only.is_kit_only(entry2)) return false;
11595
+ return is_all || entry2.reference[1] === "developer";
11144
11596
  }
11145
11597
  function collect_visible(is_all, is_consumer) {
11146
11598
  const by_category = new Map(
11147
11599
  CATEGORY_ORDER.map((cat) => [cat, []])
11148
11600
  );
11149
- for (const [cmd, entry] of Object.entries(COMMAND_MAP)) {
11150
- if (is_visible_command(entry, is_all, is_consumer)) {
11151
- by_category.get(entry.category)?.push([cmd, entry]);
11601
+ for (const [cmd, entry2] of Object.entries(COMMAND_MAP)) {
11602
+ if (is_visible_command(entry2, is_all, is_consumer)) {
11603
+ by_category.get(entry2.category)?.push([cmd, entry2]);
11152
11604
  }
11153
11605
  }
11154
11606
  return by_category;
@@ -11177,10 +11629,10 @@ function run_shell_command(shell, extra) {
11177
11629
  });
11178
11630
  return resolve_spawn_exit(executable, result);
11179
11631
  }
11180
- async function run_script_entry(entry, script, subcommand_arguments) {
11181
- const script_arguments = [...entry.default_script_arguments ?? [], ...subcommand_arguments];
11632
+ async function run_script_entry(entry2, script, subcommand_arguments) {
11633
+ const script_arguments = [...entry2.default_script_arguments ?? [], ...subcommand_arguments];
11182
11634
  const target2 = josh_in_process.in_process_target(script, PACKAGE_DIR2, import.meta.url);
11183
- josh_environment_file.apply_node_flags(entry.tsx_arguments ?? []);
11635
+ josh_environment_file.apply_node_flags(entry2.tsx_arguments ?? []);
11184
11636
  return await josh_in_process.run_in_process(target2, script_arguments);
11185
11637
  }
11186
11638
  function github_prerequisite_exit(resolved, is_consumer) {
@@ -11190,8 +11642,8 @@ function github_prerequisite_exit(resolved, is_consumer) {
11190
11642
  console.error(prerequisite);
11191
11643
  return USAGE_ERROR_EXIT_CODE;
11192
11644
  }
11193
- function pre_dispatch_exit(resolved, entry, subcommand_arguments, is_consumer) {
11194
- if (is_consumer && kit_only.is_kit_only(entry)) {
11645
+ function pre_dispatch_exit(resolved, entry2, subcommand_arguments, is_consumer) {
11646
+ if (is_consumer && kit_only.is_kit_only(entry2)) {
11195
11647
  console.error(kit_only.notice(resolved));
11196
11648
  return USAGE_ERROR_EXIT_CODE;
11197
11649
  }
@@ -11199,40 +11651,40 @@ function pre_dispatch_exit(resolved, entry, subcommand_arguments, is_consumer) {
11199
11651
  if (prerequisite_exit !== void 0) return prerequisite_exit;
11200
11652
  const rejection2 = composite_arguments.reject_extra_arguments(
11201
11653
  resolved,
11202
- entry,
11654
+ entry2,
11203
11655
  subcommand_arguments
11204
11656
  );
11205
11657
  if (rejection2 === void 0) return void 0;
11206
11658
  console.error(rejection2);
11207
11659
  return USAGE_ERROR_EXIT_CODE;
11208
11660
  }
11209
- async function run_entry(entry, subcommand_arguments) {
11210
- if (entry.shell) return run_shell_command(entry.shell, subcommand_arguments);
11211
- return await run_script_entry(entry, entry.script ?? "", subcommand_arguments);
11661
+ async function run_entry(entry2, subcommand_arguments) {
11662
+ if (entry2.shell) return run_shell_command(entry2.shell, subcommand_arguments);
11663
+ return await run_script_entry(entry2, entry2.script ?? "", subcommand_arguments);
11212
11664
  }
11213
11665
  function declared(value2) {
11214
11666
  return typeof value2 === "function" ? value2() : value2;
11215
11667
  }
11216
- async function dispatch_entry(command, entry, subcommand_arguments) {
11217
- const weight = declared(entry.core_weight);
11218
- if (weight === void 0) return await run_entry(entry, subcommand_arguments);
11668
+ async function dispatch_entry(command, entry2, subcommand_arguments) {
11669
+ const weight = declared(entry2.core_weight);
11670
+ if (weight === void 0) return await run_entry(entry2, subcommand_arguments);
11219
11671
  return await core_budget.with_command_reservation(
11220
11672
  weight,
11221
- async () => await run_entry(entry, subcommand_arguments),
11222
- { memory_mb: declared(entry.memory_mb), command, is_unit: entry.is_unit_claim }
11673
+ async () => await run_entry(entry2, subcommand_arguments),
11674
+ { memory_mb: declared(entry2.memory_mb), command, is_unit: entry2.is_unit_claim }
11223
11675
  );
11224
11676
  }
11225
11677
  async function run_command(cmd, subcommand_arguments, is_consumer = false) {
11226
11678
  const resolved = resolve_alias(cmd);
11227
- const entry = Object.hasOwn(COMMAND_MAP, resolved) ? COMMAND_MAP[resolved] : void 0;
11228
- if (!entry) return UNKNOWN_COMMAND_EXIT_CODE;
11229
- const early_exit = pre_dispatch_exit(resolved, entry, subcommand_arguments, is_consumer);
11679
+ const entry2 = Object.hasOwn(COMMAND_MAP, resolved) ? COMMAND_MAP[resolved] : void 0;
11680
+ if (!entry2) return UNKNOWN_COMMAND_EXIT_CODE;
11681
+ const early_exit = pre_dispatch_exit(resolved, entry2, subcommand_arguments, is_consumer);
11230
11682
  if (early_exit !== void 0) return early_exit;
11231
11683
  return await hook_lap.timed_command(
11232
11684
  resolved,
11233
- entry.category,
11685
+ entry2.category,
11234
11686
  subcommand_arguments,
11235
- async () => await dispatch_entry(resolved, entry, subcommand_arguments)
11687
+ async () => await dispatch_entry(resolved, entry2, subcommand_arguments)
11236
11688
  );
11237
11689
  }
11238
11690
  var josh_logic = {
@@ -11253,18 +11705,18 @@ function entry_of(name) {
11253
11705
  const command = canonical_command(name);
11254
11706
  return Object.hasOwn(COMMAND_MAP, command) ? COMMAND_MAP[command] : void 0;
11255
11707
  }
11256
- function is_read_only_call(entry, rest) {
11257
- const write_flags = entry.write_flags ?? [];
11708
+ function is_read_only_call(entry2, rest) {
11709
+ const write_flags = entry2.write_flags ?? [];
11258
11710
  if (rest.some((argument) => write_flags.includes(argument.split("=", 1)[0] ?? ""))) return false;
11259
- if (entry.is_read_only === true) return true;
11260
- const flags = entry.read_only_flags ?? [];
11711
+ if (entry2.is_read_only === true) return true;
11712
+ const flags = entry2.read_only_flags ?? [];
11261
11713
  return rest.some((argument) => flags.includes(argument));
11262
11714
  }
11263
11715
  function refusal(args) {
11264
11716
  const [command = "", ...rest] = args;
11265
11717
  if (is_help_request(args[0])) return void 0;
11266
- const entry = entry_of(command);
11267
- if (entry !== void 0 && is_read_only_call(entry, rest)) return void 0;
11718
+ const entry2 = entry_of(command);
11719
+ if (entry2 !== void 0 && is_read_only_call(entry2, rest)) return void 0;
11268
11720
  return `\`josh ${command}\` is not read-only: it carries a declared write flag, or its entry is not declared read-only and it carries no read-only flag its entry declares; read its usage with \`pnpm josh help ${command}\``;
11269
11721
  }
11270
11722
  var josh_read_only = { ALL_FLAG, entry_of, is_help_request, refusal };