@hawkeyexl/manni 4.22.0 → 4.23.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 (235) hide show
  1. package/README.md +1 -1
  2. package/dist/{batch-C3NN2YXB.js → batch-DPYBMRVD.js} +13 -13
  3. package/dist/{build-CEVEAHN7.js → build-LEKUMGEC.js} +13 -13
  4. package/dist/{calibrate-CSKPY5AK.js → calibrate-TYONPNG4.js} +14 -14
  5. package/dist/{capture-3HDBIHH6.js → capture-2EPHIAZT.js} +12 -12
  6. package/dist/check-ADCSXGBK.js +57 -0
  7. package/dist/{check-KGJBV42O.js → check-HWEDHABD.js} +10 -10
  8. package/dist/{check-MZSXCS2M.js → check-J2KQI7IW.js} +14 -14
  9. package/dist/check-L5AUSTE6.js +57 -0
  10. package/dist/{check-QNHLTYPN.js → check-SQVQE4E4.js} +13 -13
  11. package/dist/{chunk-6UHEMPEY.js → chunk-2GPF4OEF.js} +2 -2
  12. package/dist/{chunk-MR5JWMC2.js → chunk-2MOXVM6H.js} +2 -2
  13. package/dist/{chunk-E3HYSNS6.js → chunk-2QK25SLZ.js} +3 -3
  14. package/dist/{chunk-BLDL23RY.js → chunk-2UJOQ6CB.js} +9 -9
  15. package/dist/{chunk-S7V4F7HC.js → chunk-3CBGLUJX.js} +3 -3
  16. package/dist/{chunk-OHMLEITS.js → chunk-3USSSKLA.js} +2 -2
  17. package/dist/{chunk-A67EJ3J6.js → chunk-5JXA75XB.js} +45 -6
  18. package/dist/chunk-5JXA75XB.js.map +1 -0
  19. package/dist/{chunk-CQTESLC5.js → chunk-6QNA7UX2.js} +2 -2
  20. package/dist/{chunk-IDDRHB7E.js → chunk-6RENCXLC.js} +10 -5
  21. package/dist/chunk-6RENCXLC.js.map +1 -0
  22. package/dist/{chunk-ZT3ERG4B.js → chunk-72UN462G.js} +11 -3
  23. package/dist/chunk-72UN462G.js.map +1 -0
  24. package/dist/{chunk-ZKIXGFID.js → chunk-76Y3JATE.js} +2 -2
  25. package/dist/{chunk-ZTRC37NH.js → chunk-7M3MBFG7.js} +3 -3
  26. package/dist/{chunk-JA7DWOVV.js → chunk-7NSFGAAQ.js} +8 -7
  27. package/dist/chunk-7NSFGAAQ.js.map +1 -0
  28. package/dist/{chunk-PX7OTUNU.js → chunk-AJCUKL43.js} +5 -5
  29. package/dist/{chunk-4LYVTR2T.js → chunk-AOLCEULZ.js} +8 -8
  30. package/dist/{chunk-LCMBG4LY.js → chunk-AZKNB2T3.js} +4 -4
  31. package/dist/{chunk-VZSATUI7.js → chunk-B4ECIBLF.js} +3 -3
  32. package/dist/{chunk-CHTSA3YR.js → chunk-B4POKRCS.js} +5 -5
  33. package/dist/chunk-BA7BQBWV.js +311 -0
  34. package/dist/chunk-BA7BQBWV.js.map +1 -0
  35. package/dist/{chunk-XQKRD5A3.js → chunk-BOCJTOKA.js} +2 -2
  36. package/dist/{chunk-O6IDYZVW.js → chunk-C2QE4FSZ.js} +3 -3
  37. package/dist/{chunk-A5YUK3SG.js → chunk-CLUUSZDY.js} +10 -10
  38. package/dist/{chunk-Q7FFJMFO.js → chunk-CWPRB7SA.js} +5 -5
  39. package/dist/{chunk-WW4JATBJ.js → chunk-DWUK6YNX.js} +11 -11
  40. package/dist/{chunk-JVE5YQN4.js → chunk-E75CMOR3.js} +3 -3
  41. package/dist/{chunk-64DULZIG.js → chunk-EAF4K7IK.js} +3 -3
  42. package/dist/{chunk-64DULZIG.js.map → chunk-EAF4K7IK.js.map} +1 -1
  43. package/dist/{chunk-FXE5K56B.js → chunk-EBBJFXMX.js} +3 -3
  44. package/dist/{chunk-FTSNG6DZ.js → chunk-EPN67ZNX.js} +14 -14
  45. package/dist/{chunk-K5LBIAOM.js → chunk-FBIBR4CH.js} +10 -9
  46. package/dist/{chunk-ZX4TOTZS.js → chunk-FJYIPHWK.js} +3 -3
  47. package/dist/{chunk-V27DOGAO.js → chunk-GCHEVTCJ.js} +2 -2
  48. package/dist/{chunk-GMOAW2EG.js → chunk-GIHIONJH.js} +3 -2
  49. package/dist/chunk-GIHIONJH.js.map +1 -0
  50. package/dist/{chunk-QJJPTS6L.js → chunk-I4KDAO6P.js} +3 -3
  51. package/dist/{chunk-JL5FHNQK.js → chunk-JZWQQOUN.js} +6 -6
  52. package/dist/{chunk-LMS2RWDS.js → chunk-K4YR4PY2.js} +6 -6
  53. package/dist/{chunk-562QZKAB.js → chunk-KX6HRTLH.js} +2 -2
  54. package/dist/{chunk-ZW4YASUB.js → chunk-L3DOX3UL.js} +4 -4
  55. package/dist/{chunk-CPYQ4BJK.js → chunk-LHP56Q45.js} +5 -5
  56. package/dist/{chunk-57LZPG4V.js → chunk-LT3STF5K.js} +4 -4
  57. package/dist/{chunk-5LQX57BW.js → chunk-MGQNGW6I.js} +2 -2
  58. package/dist/{chunk-TJYJ4BNK.js → chunk-MPRVAMO3.js} +4 -4
  59. package/dist/{chunk-TR5TNPWT.js → chunk-N2T6RLSE.js} +2 -2
  60. package/dist/{chunk-TR5TNPWT.js.map → chunk-N2T6RLSE.js.map} +1 -1
  61. package/dist/{chunk-37Q7WEJJ.js → chunk-OL3Z7KPQ.js} +7 -7
  62. package/dist/{chunk-RAN3CF33.js → chunk-P6LRDWMJ.js} +12 -12
  63. package/dist/{chunk-IXFFVI5S.js → chunk-QJGPOFNB.js} +3 -3
  64. package/dist/{chunk-46MMIJWR.js → chunk-QJL57GPX.js} +2 -2
  65. package/dist/{chunk-2VLZDU4E.js → chunk-QR55QXJ7.js} +10 -10
  66. package/dist/{chunk-YB3KD5RI.js → chunk-QWVIGKBM.js} +2 -2
  67. package/dist/{chunk-KIUFBUUZ.js → chunk-RZ6OONZU.js} +4 -4
  68. package/dist/{chunk-UQI463L3.js → chunk-SZMJ24FR.js} +8 -8
  69. package/dist/{chunk-W5OZMYMX.js → chunk-TLY44PCL.js} +2 -2
  70. package/dist/{chunk-IC3FJWIF.js → chunk-TOVSR2YO.js} +2 -2
  71. package/dist/{chunk-XSP3TUFN.js → chunk-TVLIJ6ZM.js} +4 -4
  72. package/dist/{chunk-BY3635RR.js → chunk-UQYDLEBS.js} +7 -7
  73. package/dist/{chunk-TWYJ2TVS.js → chunk-VTJAY3WN.js} +5 -5
  74. package/dist/{chunk-EL2KNRC3.js → chunk-WHECOVH2.js} +3 -3
  75. package/dist/{chunk-63EQKVNT.js → chunk-WPHPLVS3.js} +16 -16
  76. package/dist/{chunk-SCKVDD4E.js → chunk-XVL7DYWM.js} +4 -4
  77. package/dist/{chunk-HYEKQ22B.js → chunk-Y4O737F7.js} +3 -3
  78. package/dist/{chunk-VSHMXMBZ.js → chunk-YBPXVBSY.js} +2 -2
  79. package/dist/{chunk-6SVHI2U6.js → chunk-YJHH2DHV.js} +2 -2
  80. package/dist/{chunk-XTMONCQE.js → chunk-YUCH6WJY.js} +2 -2
  81. package/dist/{cli-YGMXZ46V.js → cli-4R5HIGG4.js} +31 -16
  82. package/dist/{cli-YGMXZ46V.js.map → cli-4R5HIGG4.js.map} +1 -1
  83. package/dist/{cli-W7B2PNZO.js → cli-BF6KB3EJ.js} +32 -17
  84. package/dist/{cli-W7B2PNZO.js.map → cli-BF6KB3EJ.js.map} +1 -1
  85. package/dist/{cli-6476FRBK.js → cli-DXOHHWZK.js} +13 -13
  86. package/dist/{cli-FGCHGJYZ.js → cli-MPMECIQH.js} +143 -55
  87. package/dist/cli-MPMECIQH.js.map +1 -0
  88. package/dist/{cli-Z3ART5DN.js → cli-NDYBQ755.js} +18 -18
  89. package/dist/{cli-YINQL2NI.js → cli-SJA66MIP.js} +20 -20
  90. package/dist/{cli-7XT7O5YM.js → cli-TBAOKTMV.js} +13 -13
  91. package/dist/{cli-ULHJTJHH.js → cli-TWGGMUXX.js} +39 -27
  92. package/dist/{cli-ULHJTJHH.js.map → cli-TWGGMUXX.js.map} +1 -1
  93. package/dist/{cli-JE4LG35H.js → cli-V2BJYNMF.js} +2 -2
  94. package/dist/{cli-U3622DIB.js → cli-XGCK2LUV.js} +17 -17
  95. package/dist/{cli-4QAH3DBX.js → cli-XXN75A42.js} +7 -7
  96. package/dist/cli.js +15 -15
  97. package/dist/docmeta.js +6 -6
  98. package/dist/{github-YHJABBUI.js → github-NQQTH5JK.js} +14 -14
  99. package/dist/github-NWL2XGE7.js +48 -0
  100. package/dist/{github-64ZVAUIT.js → github-WBIEYSM7.js} +10 -10
  101. package/dist/index.d.ts +31 -2
  102. package/dist/index.js +117 -111
  103. package/dist/index.js.map +1 -1
  104. package/dist/{json-QNGJFUY2.js → json-IVHRVOGQ.js} +15 -15
  105. package/dist/{json-YTKUFNO3.js → json-J4TONMKY.js} +2 -2
  106. package/dist/{json-CVOVXB7O.js → json-QQAK73QQ.js} +10 -10
  107. package/dist/{labels-5WOKC3VR.js → labels-VI2I5YFD.js} +9 -9
  108. package/dist/{lint-OQGB4DWJ.js → lint-VB5A3ENL.js} +10 -10
  109. package/dist/{list-PN6JKYNX.js → list-3XRFX2Y3.js} +11 -11
  110. package/dist/{list-OQ3IYV2W.js → list-LMYCD5G5.js} +14 -14
  111. package/dist/{list-EDAB7X5Y.js → list-LOS7FTFD.js} +10 -10
  112. package/dist/{page-TPNMHL27.js → page-3Y4EGYUO.js} +9 -9
  113. package/dist/{prepare-3V2QYBKL.js → prepare-JK6XKBZB.js} +11 -11
  114. package/dist/{pretty-K3M4AW2D.js → pretty-DR4GHOJG.js} +10 -10
  115. package/dist/{pretty-HO2LYG5N.js → pretty-G2J5UEXC.js} +14 -14
  116. package/dist/pretty-GCEIQ3FP.js +65 -0
  117. package/dist/{reporters-YVLLFBO5.js → reporters-43LBUWEE.js} +9 -9
  118. package/dist/{reporters-4R2E7PRJ.js → reporters-OWYFZD4S.js} +4 -4
  119. package/dist/{run-H4BOR2FR.js → run-G6G55SWJ.js} +11 -11
  120. package/dist/{sarif-GWHWJJFP.js → sarif-CN7RSIKH.js} +8 -8
  121. package/dist/sarif-FR26WNVT.js +49 -0
  122. package/dist/{sarif-YBFD5OUL.js → sarif-GWTNYCZJ.js} +8 -8
  123. package/dist/strategy-3EZUOE2T.js +59 -0
  124. package/dist/{term-33YSMISR.js → term-5WITRS3M.js} +18 -18
  125. package/dist/{validate-6R5UBDGU.js → validate-TDIEFXRQ.js} +4 -4
  126. package/dist/validate-TDIEFXRQ.js.map +1 -0
  127. package/package.json +1 -1
  128. package/plugin/manni/.claude-plugin/plugin.json +1 -1
  129. package/dist/check-555TCJGF.js +0 -45
  130. package/dist/check-KXWHSCCR.js +0 -42
  131. package/dist/chunk-A67EJ3J6.js.map +0 -1
  132. package/dist/chunk-GMOAW2EG.js.map +0 -1
  133. package/dist/chunk-IDDRHB7E.js.map +0 -1
  134. package/dist/chunk-JA7DWOVV.js.map +0 -1
  135. package/dist/chunk-ZT3ERG4B.js.map +0 -1
  136. package/dist/cli-FGCHGJYZ.js.map +0 -1
  137. package/dist/github-ARGPMQD2.js +0 -32
  138. package/dist/pretty-EZ2NFU3C.js +0 -49
  139. package/dist/sarif-SJFVSOBV.js +0 -33
  140. package/dist/strategy-T56PH2VK.js +0 -205
  141. package/dist/strategy-T56PH2VK.js.map +0 -1
  142. /package/dist/{batch-C3NN2YXB.js.map → batch-DPYBMRVD.js.map} +0 -0
  143. /package/dist/{build-CEVEAHN7.js.map → build-LEKUMGEC.js.map} +0 -0
  144. /package/dist/{calibrate-CSKPY5AK.js.map → calibrate-TYONPNG4.js.map} +0 -0
  145. /package/dist/{capture-3HDBIHH6.js.map → capture-2EPHIAZT.js.map} +0 -0
  146. /package/dist/{check-555TCJGF.js.map → check-ADCSXGBK.js.map} +0 -0
  147. /package/dist/{check-KGJBV42O.js.map → check-HWEDHABD.js.map} +0 -0
  148. /package/dist/{check-KXWHSCCR.js.map → check-J2KQI7IW.js.map} +0 -0
  149. /package/dist/{check-MZSXCS2M.js.map → check-L5AUSTE6.js.map} +0 -0
  150. /package/dist/{check-QNHLTYPN.js.map → check-SQVQE4E4.js.map} +0 -0
  151. /package/dist/{chunk-6UHEMPEY.js.map → chunk-2GPF4OEF.js.map} +0 -0
  152. /package/dist/{chunk-MR5JWMC2.js.map → chunk-2MOXVM6H.js.map} +0 -0
  153. /package/dist/{chunk-E3HYSNS6.js.map → chunk-2QK25SLZ.js.map} +0 -0
  154. /package/dist/{chunk-BLDL23RY.js.map → chunk-2UJOQ6CB.js.map} +0 -0
  155. /package/dist/{chunk-S7V4F7HC.js.map → chunk-3CBGLUJX.js.map} +0 -0
  156. /package/dist/{chunk-OHMLEITS.js.map → chunk-3USSSKLA.js.map} +0 -0
  157. /package/dist/{chunk-CQTESLC5.js.map → chunk-6QNA7UX2.js.map} +0 -0
  158. /package/dist/{chunk-ZKIXGFID.js.map → chunk-76Y3JATE.js.map} +0 -0
  159. /package/dist/{chunk-ZTRC37NH.js.map → chunk-7M3MBFG7.js.map} +0 -0
  160. /package/dist/{chunk-PX7OTUNU.js.map → chunk-AJCUKL43.js.map} +0 -0
  161. /package/dist/{chunk-4LYVTR2T.js.map → chunk-AOLCEULZ.js.map} +0 -0
  162. /package/dist/{chunk-LCMBG4LY.js.map → chunk-AZKNB2T3.js.map} +0 -0
  163. /package/dist/{chunk-VZSATUI7.js.map → chunk-B4ECIBLF.js.map} +0 -0
  164. /package/dist/{chunk-CHTSA3YR.js.map → chunk-B4POKRCS.js.map} +0 -0
  165. /package/dist/{chunk-XQKRD5A3.js.map → chunk-BOCJTOKA.js.map} +0 -0
  166. /package/dist/{chunk-O6IDYZVW.js.map → chunk-C2QE4FSZ.js.map} +0 -0
  167. /package/dist/{chunk-A5YUK3SG.js.map → chunk-CLUUSZDY.js.map} +0 -0
  168. /package/dist/{chunk-Q7FFJMFO.js.map → chunk-CWPRB7SA.js.map} +0 -0
  169. /package/dist/{chunk-WW4JATBJ.js.map → chunk-DWUK6YNX.js.map} +0 -0
  170. /package/dist/{chunk-JVE5YQN4.js.map → chunk-E75CMOR3.js.map} +0 -0
  171. /package/dist/{chunk-FXE5K56B.js.map → chunk-EBBJFXMX.js.map} +0 -0
  172. /package/dist/{chunk-FTSNG6DZ.js.map → chunk-EPN67ZNX.js.map} +0 -0
  173. /package/dist/{chunk-K5LBIAOM.js.map → chunk-FBIBR4CH.js.map} +0 -0
  174. /package/dist/{chunk-ZX4TOTZS.js.map → chunk-FJYIPHWK.js.map} +0 -0
  175. /package/dist/{chunk-V27DOGAO.js.map → chunk-GCHEVTCJ.js.map} +0 -0
  176. /package/dist/{chunk-QJJPTS6L.js.map → chunk-I4KDAO6P.js.map} +0 -0
  177. /package/dist/{chunk-JL5FHNQK.js.map → chunk-JZWQQOUN.js.map} +0 -0
  178. /package/dist/{chunk-LMS2RWDS.js.map → chunk-K4YR4PY2.js.map} +0 -0
  179. /package/dist/{chunk-562QZKAB.js.map → chunk-KX6HRTLH.js.map} +0 -0
  180. /package/dist/{chunk-ZW4YASUB.js.map → chunk-L3DOX3UL.js.map} +0 -0
  181. /package/dist/{chunk-CPYQ4BJK.js.map → chunk-LHP56Q45.js.map} +0 -0
  182. /package/dist/{chunk-57LZPG4V.js.map → chunk-LT3STF5K.js.map} +0 -0
  183. /package/dist/{chunk-5LQX57BW.js.map → chunk-MGQNGW6I.js.map} +0 -0
  184. /package/dist/{chunk-TJYJ4BNK.js.map → chunk-MPRVAMO3.js.map} +0 -0
  185. /package/dist/{chunk-37Q7WEJJ.js.map → chunk-OL3Z7KPQ.js.map} +0 -0
  186. /package/dist/{chunk-RAN3CF33.js.map → chunk-P6LRDWMJ.js.map} +0 -0
  187. /package/dist/{chunk-IXFFVI5S.js.map → chunk-QJGPOFNB.js.map} +0 -0
  188. /package/dist/{chunk-46MMIJWR.js.map → chunk-QJL57GPX.js.map} +0 -0
  189. /package/dist/{chunk-2VLZDU4E.js.map → chunk-QR55QXJ7.js.map} +0 -0
  190. /package/dist/{chunk-YB3KD5RI.js.map → chunk-QWVIGKBM.js.map} +0 -0
  191. /package/dist/{chunk-KIUFBUUZ.js.map → chunk-RZ6OONZU.js.map} +0 -0
  192. /package/dist/{chunk-UQI463L3.js.map → chunk-SZMJ24FR.js.map} +0 -0
  193. /package/dist/{chunk-W5OZMYMX.js.map → chunk-TLY44PCL.js.map} +0 -0
  194. /package/dist/{chunk-IC3FJWIF.js.map → chunk-TOVSR2YO.js.map} +0 -0
  195. /package/dist/{chunk-XSP3TUFN.js.map → chunk-TVLIJ6ZM.js.map} +0 -0
  196. /package/dist/{chunk-BY3635RR.js.map → chunk-UQYDLEBS.js.map} +0 -0
  197. /package/dist/{chunk-TWYJ2TVS.js.map → chunk-VTJAY3WN.js.map} +0 -0
  198. /package/dist/{chunk-EL2KNRC3.js.map → chunk-WHECOVH2.js.map} +0 -0
  199. /package/dist/{chunk-63EQKVNT.js.map → chunk-WPHPLVS3.js.map} +0 -0
  200. /package/dist/{chunk-SCKVDD4E.js.map → chunk-XVL7DYWM.js.map} +0 -0
  201. /package/dist/{chunk-HYEKQ22B.js.map → chunk-Y4O737F7.js.map} +0 -0
  202. /package/dist/{chunk-VSHMXMBZ.js.map → chunk-YBPXVBSY.js.map} +0 -0
  203. /package/dist/{chunk-6SVHI2U6.js.map → chunk-YJHH2DHV.js.map} +0 -0
  204. /package/dist/{chunk-XTMONCQE.js.map → chunk-YUCH6WJY.js.map} +0 -0
  205. /package/dist/{cli-6476FRBK.js.map → cli-DXOHHWZK.js.map} +0 -0
  206. /package/dist/{cli-Z3ART5DN.js.map → cli-NDYBQ755.js.map} +0 -0
  207. /package/dist/{cli-YINQL2NI.js.map → cli-SJA66MIP.js.map} +0 -0
  208. /package/dist/{cli-7XT7O5YM.js.map → cli-TBAOKTMV.js.map} +0 -0
  209. /package/dist/{cli-JE4LG35H.js.map → cli-V2BJYNMF.js.map} +0 -0
  210. /package/dist/{cli-U3622DIB.js.map → cli-XGCK2LUV.js.map} +0 -0
  211. /package/dist/{cli-4QAH3DBX.js.map → cli-XXN75A42.js.map} +0 -0
  212. /package/dist/{github-64ZVAUIT.js.map → github-NQQTH5JK.js.map} +0 -0
  213. /package/dist/{github-ARGPMQD2.js.map → github-NWL2XGE7.js.map} +0 -0
  214. /package/dist/{github-YHJABBUI.js.map → github-WBIEYSM7.js.map} +0 -0
  215. /package/dist/{json-CVOVXB7O.js.map → json-IVHRVOGQ.js.map} +0 -0
  216. /package/dist/{json-QNGJFUY2.js.map → json-J4TONMKY.js.map} +0 -0
  217. /package/dist/{json-YTKUFNO3.js.map → json-QQAK73QQ.js.map} +0 -0
  218. /package/dist/{labels-5WOKC3VR.js.map → labels-VI2I5YFD.js.map} +0 -0
  219. /package/dist/{lint-OQGB4DWJ.js.map → lint-VB5A3ENL.js.map} +0 -0
  220. /package/dist/{list-EDAB7X5Y.js.map → list-3XRFX2Y3.js.map} +0 -0
  221. /package/dist/{list-OQ3IYV2W.js.map → list-LMYCD5G5.js.map} +0 -0
  222. /package/dist/{list-PN6JKYNX.js.map → list-LOS7FTFD.js.map} +0 -0
  223. /package/dist/{page-TPNMHL27.js.map → page-3Y4EGYUO.js.map} +0 -0
  224. /package/dist/{prepare-3V2QYBKL.js.map → prepare-JK6XKBZB.js.map} +0 -0
  225. /package/dist/{pretty-EZ2NFU3C.js.map → pretty-DR4GHOJG.js.map} +0 -0
  226. /package/dist/{pretty-HO2LYG5N.js.map → pretty-G2J5UEXC.js.map} +0 -0
  227. /package/dist/{pretty-K3M4AW2D.js.map → pretty-GCEIQ3FP.js.map} +0 -0
  228. /package/dist/{reporters-4R2E7PRJ.js.map → reporters-43LBUWEE.js.map} +0 -0
  229. /package/dist/{reporters-YVLLFBO5.js.map → reporters-OWYFZD4S.js.map} +0 -0
  230. /package/dist/{run-H4BOR2FR.js.map → run-G6G55SWJ.js.map} +0 -0
  231. /package/dist/{sarif-GWHWJJFP.js.map → sarif-CN7RSIKH.js.map} +0 -0
  232. /package/dist/{sarif-SJFVSOBV.js.map → sarif-FR26WNVT.js.map} +0 -0
  233. /package/dist/{sarif-YBFD5OUL.js.map → sarif-GWTNYCZJ.js.map} +0 -0
  234. /package/dist/{validate-6R5UBDGU.js.map → strategy-3EZUOE2T.js.map} +0 -0
  235. /package/dist/{term-33YSMISR.js.map → term-5WITRS3M.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/cite/reporters/github.ts"],"sourcesContent":["/**\n * GitHub workflow commands, one per finding:\n * `::error file=<file>,line=<n>,title=<ruleId>::<id or src> (<src>): <message>`\n * with `::warning` and `::notice` for the lower levels: the family scale is\n * GitHub's, so the level is the severity. The rule's guidance lines follow\n * the message after `%0A`. Uses meta's escapes. A baselined\n * finding is not an annotation; a clean run is the empty string.\n */\nimport {\n escapeWorkflowCommandMessage,\n escapeWorkflowCommandProperty,\n} from \"../../meta/internal.js\";\nimport { guidanceLines } from \"../../shared/guidance.js\";\nimport { errorSite } from \"../core/adapt.js\";\nimport type { CheckRun, CitationFinding, CiteRule } from \"../types.js\";\nimport { resultFor, splitBaselined } from \"./pretty.js\";\n\n/**\n * The rules whose message already names what it is about: every claim,\n * marker and anchor message is written as a sentence about the entry, so\n * prefixing it with the subject again would say the name twice. Exported so\n * a test asserting the composed messages reads this set rather than a copy.\n */\nexport const NAMES_ITS_SUBJECT = new Set<CiteRule>([\n \"claim-moved\",\n \"claim-moved-ambiguous\",\n \"claim-changed\",\n \"marker-orphan\",\n \"marker-invalid\",\n \"marker-repeated\",\n \"anchor-invalid\",\n]);\n\n/**\n * `<id> (<src>): <message>`, or `<src>: <message>` when the entry has no id.\n * A message that names its own subject, by its rule or by opening with the\n * id (an `entry-invalid` about a pin prefix does), is left to say it once.\n * SARIF and JUnit carry the same message.\n */\nexport function findingMessage(finding: CitationFinding): string {\n const subject = finding.id ?? finding.src;\n if (subject === undefined) return finding.message;\n if (NAMES_ITS_SUBJECT.has(finding.rule)) return finding.message;\n if (finding.id !== undefined && finding.message.startsWith(finding.id)) return finding.message;\n const where = finding.id !== undefined && finding.src !== undefined ? ` (${finding.src})` : \"\";\n return `${subject}${where}: ${finding.message}`;\n}\n\nexport function renderCheckGithub(run: CheckRun): string {\n const lines: string[] = [];\n run.pages.forEach((page, index) => {\n const { reported } = splitBaselined(page, resultFor(run, index));\n for (const finding of reported) {\n // A finding about an entry a manifest owns is annotated on the\n // manifest, unless that manifest is outside the tree, where an\n // annotation would land nowhere: then the page carries it.\n const site = errorSite(finding);\n const params = [`file=${escapeWorkflowCommandProperty(site.file ?? page.file)}`];\n if (site.line !== undefined) params.push(`line=${String(site.line)}`);\n params.push(`title=${escapeWorkflowCommandProperty(finding.ruleId)}`);\n const message = [findingMessage(finding), ...guidanceLines(finding.guidance)].join(\"\\n\");\n lines.push(`::${finding.severity} ${params.join(\",\")}::${escapeWorkflowCommandMessage(message)}`);\n }\n });\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;;;;AAuBO,IAAM,oBAAoB,oBAAI,IAAc;AAAA,EACjD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAQM,SAAS,eAAe,SAAkC;AAC/D,QAAM,UAAU,QAAQ,MAAM,QAAQ;AACtC,MAAI,YAAY,OAAW,QAAO,QAAQ;AAC1C,MAAI,kBAAkB,IAAI,QAAQ,IAAI,EAAG,QAAO,QAAQ;AACxD,MAAI,QAAQ,OAAO,UAAa,QAAQ,QAAQ,WAAW,QAAQ,EAAE,EAAG,QAAO,QAAQ;AACvF,QAAM,QAAQ,QAAQ,OAAO,UAAa,QAAQ,QAAQ,SAAY,KAAK,QAAQ,GAAG,MAAM;AAC5F,SAAO,GAAG,OAAO,GAAG,KAAK,KAAK,QAAQ,OAAO;AAC/C;AAEO,SAAS,kBAAkB,KAAuB;AACvD,QAAM,QAAkB,CAAC;AACzB,MAAI,MAAM,QAAQ,CAAC,MAAM,UAAU;AACjC,UAAM,EAAE,SAAS,IAAI,eAAe,MAAM,UAAU,KAAK,KAAK,CAAC;AAC/D,eAAW,WAAW,UAAU;AAI9B,YAAM,OAAO,UAAU,OAAO;AAC9B,YAAM,SAAS,CAAC,QAAQ,8BAA8B,KAAK,QAAQ,KAAK,IAAI,CAAC,EAAE;AAC/E,UAAI,KAAK,SAAS,OAAW,QAAO,KAAK,QAAQ,OAAO,KAAK,IAAI,CAAC,EAAE;AACpE,aAAO,KAAK,SAAS,8BAA8B,QAAQ,MAAM,CAAC,EAAE;AACpE,YAAM,UAAU,CAAC,eAAe,OAAO,GAAG,GAAG,cAAc,QAAQ,QAAQ,CAAC,EAAE,KAAK,IAAI;AACvF,YAAM,KAAK,KAAK,QAAQ,QAAQ,IAAI,OAAO,KAAK,GAAG,CAAC,KAAK,6BAA6B,OAAO,CAAC,EAAE;AAAA,IAClG;AAAA,EACF,CAAC;AACD,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/cite/reporters/sarif.ts"],"sourcesContent":["/**\n * SARIF for `check`. Meta's renderer builds the envelope, the\n * repository-relative uris and the fingerprints the baseline shares, from the\n * adapted results. What it cannot know is what a cite rule is: it describes\n * every rule as a schema keyword, links meta's fix page, and prefixes each\n * message with the JSON Pointer of the entry, `(root)` for a finding about no\n * entry. This renderer replaces those three with the cite rule's own\n * description, a link to its section of the cite fix page, and the message\n * the github annotation carries, which names the citation the pointer only\n * numbered. Each result also carries the rule's guidance, in its message and\n * in `properties.guidance`. A message is no part of a fingerprint, so the\n * baseline is unaffected.\n */\nimport { renderSarif, type FieldError, type ValidationResult } from \"../../meta/index.js\";\nimport { guidanceLines } from \"../../shared/guidance.js\";\nimport { errorSite } from \"../core/adapt.js\";\nimport { RULE_ID_PREFIX, guidanceFor, isCiteRule } from \"../core/severity.js\";\nimport type { CheckRun, CitationFinding } from \"../types.js\";\nimport { findingMessage } from \"./github.js\";\n\nconst INFORMATION_URI = \"https://hawkeyexl.github.io/manni/cite/\";\n\n/**\n * The label meta's reporters put before a message: `(root) ` for a finding\n * about no entry, `/citations/N ` for one about an entry. Nothing else ever\n * opens a cite finding's adapted message.\n */\nexport const ENTRY_LABEL = /^(?:\\(root\\)|\\/citations\\/\\d+) /;\n\nexport interface SarifRule {\n id: string;\n shortDescription: { text: string };\n fullDescription?: { text: string };\n helpUri?: string;\n}\n\n/** As much of meta's SARIF as this renderer and its tests read back. */\nexport interface SarifLog {\n runs: {\n tool: { driver: { informationUri: string; rules: SarifRule[] } };\n results: { ruleId: string; message: { text: string }; properties?: Record<string, unknown> }[];\n }[];\n}\n\n/**\n * The adapted results with each message rewritten by `compose`, the github\n * annotation's message unless told otherwise. An error is paired with its\n * finding by rule, entry, line and message, as the baseline split pairs them;\n * the baseline has already dropped the errors it forgives. `paired` hears\n * each rewritten error with the finding it came from.\n */\nexport function withFindingMessages(\n run: CheckRun,\n compose: (finding: CitationFinding) => string = findingMessage,\n paired?: (error: FieldError, finding: CitationFinding) => void,\n): ValidationResult[] {\n return run.results.map((result) => {\n const page = run.pages.find((p) => p.file === result.file);\n if (page === undefined) return result;\n const errors = result.errors.map((error) => {\n const finding = page.findings.find(\n (f) =>\n f.rule === error.keyword &&\n (f.index === undefined ? \"\" : `/citations/${String(f.index)}`) === error.instancePath &&\n f.message === error.message &&\n (errorSite(f).line ?? null) === (error.line ?? null),\n );\n if (finding === undefined) return error;\n const rewritten = { ...error, message: compose(finding) };\n paired?.(rewritten, finding);\n return rewritten;\n });\n return { ...result, errors };\n });\n}\n\n/** A rule as the citation tool describes it, linked to its section of the fix page. */\nfunction describe(rule: SarifRule): SarifRule {\n const name = rule.id.slice(RULE_ID_PREFIX.length + 1);\n if (!isCiteRule(name)) return rule;\n const { description, guide } = guidanceFor(name);\n const text = description ?? \"\";\n return {\n id: rule.id,\n shortDescription: { text },\n fullDescription: { text },\n ...(guide === null ? {} : { helpUri: guide }),\n };\n}\n\nexport function renderCheckSarif(run: CheckRun, opts: { onNotice?: (message: string) => void } = {}): string {\n const origin = new Map<FieldError, CitationFinding>();\n const results = withFindingMessages(\n run,\n (finding) => [findingMessage(finding), ...guidanceLines(finding.guidance)].join(\"\\n\"),\n (error, finding) => origin.set(error, finding),\n );\n const log = JSON.parse(\n renderSarif(results, {\n frame: run.frame,\n ...(opts.onNotice === undefined ? {} : { onNotice: opts.onNotice }),\n resultProperties: (error) => {\n const guidance = origin.get(error)?.guidance;\n return guidance == null ? undefined : { guidance };\n },\n }),\n ) as SarifLog;\n for (const sarifRun of log.runs) {\n sarifRun.tool.driver.informationUri = INFORMATION_URI;\n sarifRun.tool.driver.rules = sarifRun.tool.driver.rules.map(describe);\n for (const result of sarifRun.results) result.message.text = result.message.text.replace(ENTRY_LABEL, \"\");\n }\n return JSON.stringify(log, null, 2);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,IAAM,kBAAkB;AAOjB,IAAM,cAAc;AAwBpB,SAAS,oBACd,KACA,UAAgD,gBAChD,QACoB;AACpB,SAAO,IAAI,QAAQ,IAAI,CAAC,WAAW;AACjC,UAAM,OAAO,IAAI,MAAM,KAAK,CAAC,MAAM,EAAE,SAAS,OAAO,IAAI;AACzD,QAAI,SAAS,OAAW,QAAO;AAC/B,UAAM,SAAS,OAAO,OAAO,IAAI,CAAC,UAAU;AAC1C,YAAM,UAAU,KAAK,SAAS;AAAA,QAC5B,CAAC,MACC,EAAE,SAAS,MAAM,YAChB,EAAE,UAAU,SAAY,KAAK,cAAc,OAAO,EAAE,KAAK,CAAC,QAAQ,MAAM,gBACzE,EAAE,YAAY,MAAM,YACnB,UAAU,CAAC,EAAE,QAAQ,WAAW,MAAM,QAAQ;AAAA,MACnD;AACA,UAAI,YAAY,OAAW,QAAO;AAClC,YAAM,YAAY,EAAE,GAAG,OAAO,SAAS,QAAQ,OAAO,EAAE;AACxD,eAAS,WAAW,OAAO;AAC3B,aAAO;AAAA,IACT,CAAC;AACD,WAAO,EAAE,GAAG,QAAQ,OAAO;AAAA,EAC7B,CAAC;AACH;AAGA,SAAS,SAAS,MAA4B;AAC5C,QAAM,OAAO,KAAK,GAAG,MAAM,eAAe,SAAS,CAAC;AACpD,MAAI,CAAC,WAAW,IAAI,EAAG,QAAO;AAC9B,QAAM,EAAE,aAAa,MAAM,IAAI,YAAY,IAAI;AAC/C,QAAM,OAAO,eAAe;AAC5B,SAAO;AAAA,IACL,IAAI,KAAK;AAAA,IACT,kBAAkB,EAAE,KAAK;AAAA,IACzB,iBAAiB,EAAE,KAAK;AAAA,IACxB,GAAI,UAAU,OAAO,CAAC,IAAI,EAAE,SAAS,MAAM;AAAA,EAC7C;AACF;AAEO,SAAS,iBAAiB,KAAe,OAAiD,CAAC,GAAW;AAC3G,QAAM,SAAS,oBAAI,IAAiC;AACpD,QAAM,UAAU;AAAA,IACd;AAAA,IACA,CAAC,YAAY,CAAC,eAAe,OAAO,GAAG,GAAG,cAAc,QAAQ,QAAQ,CAAC,EAAE,KAAK,IAAI;AAAA,IACpF,CAAC,OAAO,YAAY,OAAO,IAAI,OAAO,OAAO;AAAA,EAC/C;AACA,QAAM,MAAM,KAAK;AAAA,IACf,YAAY,SAAS;AAAA,MACnB,OAAO,IAAI;AAAA,MACX,GAAI,KAAK,aAAa,SAAY,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS;AAAA,MACjE,kBAAkB,CAAC,UAAU;AAC3B,cAAM,WAAW,OAAO,IAAI,KAAK,GAAG;AACpC,eAAO,YAAY,OAAO,SAAY,EAAE,SAAS;AAAA,MACnD;AAAA,IACF,CAAC;AAAA,EACH;AACA,aAAW,YAAY,IAAI,MAAM;AAC/B,aAAS,KAAK,OAAO,iBAAiB;AACtC,aAAS,KAAK,OAAO,QAAQ,SAAS,KAAK,OAAO,MAAM,IAAI,QAAQ;AACpE,eAAW,UAAU,SAAS,QAAS,QAAO,QAAQ,OAAO,OAAO,QAAQ,KAAK,QAAQ,aAAa,EAAE;AAAA,EAC1G;AACA,SAAO,KAAK,UAAU,KAAK,MAAM,CAAC;AACpC;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/cite/reporters/pretty.ts"],"sourcesContent":["/**\n * Pretty output for `check`, `update`, `remove` and `history`.\n *\n * A citation is one row: its name, its claim end, its source end, and, when a\n * manifest owns the entry, where that is. Both ends read in file lines, the\n * only lines a person sees. Marks: ✓ current, ✗ error, ↕ warning, ℹ notice,\n * · skipped or baselined; a file line is ✓, ✗ (an error), ⚠ (a warning, no\n * error) or ℹ (notices only). Diffs, commit subjects and a changed claim's\n * current lines print only under `showDiff`; a decrypted path only under\n * `reveal`. Colour via `shouldColor`; never under `--no-color`/`NO_COLOR`.\n */\nimport type { ValidationResult } from \"../../meta/index.js\";\nimport { palette } from \"../../shared/color.js\";\nimport { guidanceLines } from \"../../shared/guidance.js\";\nimport { errorSite, messageFor, remedyFor } from \"../core/adapt.js\";\nimport { parseSrc } from \"../core/range.js\";\nimport { shortCommit, shortPin, shortSrc, spellAt } from \"../core/spell.js\";\nimport type {\n CheckRun,\n CitationFinding,\n CitationResult,\n HistoryRun,\n PageCitationReport,\n RecommitReason,\n StaleWindow,\n Removal,\n RemoveRun,\n UpdateRewrite,\n UpdateRun,\n} from \"../types.js\";\n\nexport interface PrettyOptions {\n color: boolean;\n quiet?: boolean;\n showDiff?: boolean;\n reveal?: boolean;\n /** `remove --dry-run`: the footer says what the run would have removed. */\n dryRun?: boolean;\n}\n\n/** Diff lines printed under a `changed` row before the rest is elided. */\nexport const DIFF_LINE_CAP = 60;\n\nconst plural = (n: number, one: string, many = `${one}s`): string =>\n `${String(n)} ${n === 1 ? one : many}`;\n\n/** A finding's mark, by severity: ✗ error, ↕ warning, ℹ notice. */\nfunction severityMark(severity: CitationFinding[\"severity\"], c: ReturnType<typeof palette>): string {\n switch (severity) {\n case \"error\":\n return c.red(\"✗\");\n case \"warning\":\n return c.yellow(\"↕\");\n case \"notice\":\n return c.dim(\"ℹ\");\n }\n}\n\n/** A page's findings, split into the ones the baseline let through and the ones it forgave. */\nexport interface SplitFindings {\n reported: CitationFinding[];\n baselined: CitationFinding[];\n}\n\n/**\n * Which of a page's findings the run actually reported.\n *\n * The baseline works on the adapted `ValidationResult`: a forgiven finding is\n * removed from `errors` and counted in `baselined`, while `pages[].findings`\n * keeps every finding the check produced. So a finding is baselined exactly\n * when no error in the adapted result is left to account for it. Each error\n * is consumed once, so two identical findings need two identical errors.\n */\nexport function splitBaselined(\n page: PageCitationReport,\n result: ValidationResult | undefined,\n): SplitFindings {\n if (result === undefined) return { reported: [...page.findings], baselined: [] };\n const pool = [...result.errors];\n const out: SplitFindings = { reported: [], baselined: [] };\n for (const finding of page.findings) {\n const instancePath =\n finding.index === undefined ? \"\" : `/citations/${String(finding.index)}`;\n // A finding that sits on a manifest carries that file's line, and one\n // whose manifest lies outside the tree carries no line at all.\n const line = errorSite(finding).line;\n const at = pool.findIndex(\n (e) =>\n e.keyword === finding.rule &&\n e.instancePath === instancePath &&\n e.message === finding.message &&\n (e.line ?? null) === (line ?? null),\n );\n if (at === -1) {\n out.baselined.push(finding);\n } else {\n pool.splice(at, 1);\n out.reported.push(finding);\n }\n }\n return out;\n}\n\n/** The adapted result for a page: same position first, then by file label. */\nexport function resultFor(run: CheckRun, index: number): ValidationResult | undefined {\n const page = run.pages[index];\n if (page === undefined) return undefined;\n const aligned = run.results[index];\n if (aligned !== undefined && aligned.file === page.file) return aligned;\n return run.results.find((r) => r.file === page.file);\n}\n\n/** Whether a finding is about this citation. Every entry has an index, in either channel. */\nfunction belongsTo(finding: CitationFinding, result: CitationResult): boolean {\n return finding.index !== undefined && finding.index === result.origin.index;\n}\n\n/** `<id>`, else nothing: the ends say which entry it is. */\nfunction labelOf(result: CitationResult): string {\n return result.citation.id ?? \"\";\n}\n\n/** A page-level finding's label: its id, its index, or the source it names. */\nfunction labelOfFinding(finding: CitationFinding): string {\n if (finding.id !== undefined) return finding.id;\n if (finding.index !== undefined) return `#${String(finding.index)}`;\n return finding.src ?? \"page\";\n}\n\n/** Whether the entry spelled this source encrypted. */\nfunction citesEncrypted(src: string): boolean {\n try {\n return parseSrc(src).encrypted;\n } catch {\n return false;\n }\n}\n\n/**\n * The claim end column: where it is, in file lines, and how it reads. A marker\n * says where it is and, when it is misplaced, where it belongs. Its claim\n * status reads bare: the marker's own line is what a reader acts on.\n */\nfunction claimColumn(result: CitationResult): string {\n const { claim, marker } = result;\n const anchoredByMarker = result.anchor === \"marker\" && result.markerLine !== undefined;\n const moves = marker?.misplaced === undefined ? \"\" : ` -> :${String(marker.misplaced.to)}`;\n const where = anchoredByMarker\n ? `marker :${String(result.markerLine ?? 0)}${moves}`\n : claim?.fileLines === undefined\n ? \"\"\n : `:${claim.fileLines}`;\n if (claim === null) return where;\n let status: string;\n switch (claim.status) {\n case \"moved\":\n status = anchoredByMarker ? \"moved\" : `moved -> :${claim.newFileLines ?? \"?\"}`;\n break;\n case \"moved-ambiguous\": {\n const at = (claim.candidateFileLines ?? []).map((lines) => `:${lines}`);\n status = `moved, ${plural(at.length, \"candidate\")} (${at.join(\", \")})`;\n break;\n }\n case \"reanchored\": {\n const since = claim.commitSha === undefined ? \"\" : ` since ${shortCommit(claim.commitSha)}`;\n const to = claim.newFileLines === undefined ? \"\" : ` -> :${claim.newFileLines}`;\n status = `reanchored${since}${to}`;\n break;\n }\n case \"changed\":\n status = changedText(claim);\n break;\n default:\n status = claim.status;\n }\n return where === \"\" ? status : `${where} ${status}`;\n}\n\n/** How a changed claim's column says since when, as the source column does. */\nfunction changedText(claim: NonNullable<CitationResult[\"claim\"]>): string {\n if (claim.historyAvailable === false) return \"changed (history unavailable; fetch-depth: 0)\";\n if (claim.commitSha === undefined) return \"changed\";\n const since = claim.commitsSince ?? [];\n const count = since.length === 0 ? \"uncommitted\" : plural(since.length, \"commit\");\n return `changed since ${shortCommit(claim.commitSha)}, ${count}`;\n}\n\n/**\n * The source end column: the source as the entry spelled it, plus the\n * decrypted path only under `reveal`, and only beside an encrypted source,\n * the one spelling that hides it.\n */\nfunction sourceColumn(\n result: CitationResult,\n opts: PrettyOptions,\n dim: (s: string) => string,\n): string {\n const { source } = result;\n const src = shortSrc(source.src);\n const encrypted = citesEncrypted(source.src);\n const reveal = (path: string | undefined): string =>\n opts.reveal === true && path !== undefined && encrypted ? ` ${dim(`(${path})`)}` : \"\";\n // A source that followed its text to another file has a second ciphertext\n // in the message, and `--reveal` is the one place either is a path.\n return `${src}${reveal(source.resolvedPath)} ${messageFor(source)}${reveal(source.resolvedNewPath)}`;\n}\n\n/** The subjects and diff under a changed source, dim, the diff capped. */\nfunction diffLines(result: CitationResult, dim: (s: string) => string): string[] {\n const out: string[] = [];\n for (const subject of result.source.commitsSince ?? []) out.push(dim(` ${subject}`));\n const diff = result.source.diff;\n if (diff === undefined || diff === \"\") return out;\n const lines = diff.split(/\\r?\\n/);\n while (lines.length > 0 && lines[lines.length - 1] === \"\") lines.pop();\n const shown = lines.slice(0, DIFF_LINE_CAP);\n for (const line of shown) out.push(dim(` ${line}`));\n const more = lines.length - shown.length;\n if (more > 0) out.push(dim(` … (${plural(more, \"more line\")})`));\n return out;\n}\n\n/**\n * What `--show-diff` adds under a claim row: the page's commit subjects since\n * the baseline and the claim's own diff. With no baseline there is no diff to\n * print, so a changed claim shows the lines it covers now instead.\n */\nfunction claimLines(result: CitationResult, dim: (s: string) => string): string[] {\n const claim = result.claim;\n const diff = claim?.diff;\n if (claim === null || diff === undefined || diff === \"\") {\n return capped(claim?.text ?? [], dim);\n }\n const out: string[] = [];\n for (const subject of claim.commitsSince ?? []) out.push(dim(` ${subject}`));\n return [...out, ...capped(diff.split(/\\r?\\n/), dim)];\n}\n\n/** Lines under a row, dim and capped, with a count of the ones left out. */\nfunction capped(lines: readonly string[], dim: (s: string) => string): string[] {\n const shown = lines.slice(0, DIFF_LINE_CAP);\n const out = shown.map((line) => dim(` ${line}`));\n const more = lines.length - shown.length;\n if (more > 0) out.push(dim(` … (${plural(more, \"more line\")})`));\n return out;\n}\n\n/**\n * The line a row sorts on: the marker's line for a marker-anchored entry,\n * else the claim's first file line. That is the line the row opens with, so\n * the claim column climbs down the page. A bare pin anchors nowhere and has\n * none.\n */\nfunction anchorSortLine(result: CitationResult): number | undefined {\n if (result.anchor === \"marker\" && result.markerLine !== undefined) return result.markerLine;\n const first = result.claim?.fileLines?.split(\"-\")[0];\n if (first === undefined) return undefined;\n const line = Number.parseInt(first, 10);\n return Number.isNaN(line) ? undefined : line;\n}\n\n/**\n * A page's citations in the order their rows print: by anchor line, with the\n * bare pins after them in the order the page keeps them. The entries\n * themselves are left alone, so json and the findings keep frontmatter order.\n */\nfunction rowOrder(citations: readonly CitationResult[]): CitationResult[] {\n return [...citations].sort((a, b) => {\n const left = anchorSortLine(a);\n const right = anchorSortLine(b);\n if (left === undefined) return right === undefined ? 0 : 1;\n if (right === undefined) return -1;\n return left - right;\n });\n}\n\n/** One row of a page's citation table, before the columns are padded. */\ninterface Row {\n mark: string;\n label: string;\n claim: string;\n source: string;\n where: string;\n /** Lines printed under the row: findings that are not an end, and diffs. */\n under: string[];\n}\n\n/**\n * The one manifest every citation of a page came from, or `undefined` when\n * the page has none, or when its rows come from more than one place (a\n * frontmatter entry among them counts as another place).\n */\nfunction oneManifest(citations: readonly CitationResult[]): string | undefined {\n const files = new Set(\n citations.map((result) => (result.origin.kind === \"manifest\" ? result.origin.file : undefined)),\n );\n const [only, ...rest] = [...files];\n return rest.length === 0 ? only : undefined;\n}\n\nfunction padTo(text: string, width: number, plain: number): string {\n // Colour codes are not width, so the visible length is passed in.\n return width <= plain ? text : text + \" \".repeat(width - plain);\n}\n\nexport function renderCheckPretty(run: CheckRun, opts: PrettyOptions): string {\n const c = palette(opts.color);\n const lines: string[] = [];\n const quiet = opts.quiet ?? false;\n // A finding about an entry a manifest owns names the manifest, because\n // its line is a line of that file and not of the page above it.\n const location = (finding: CitationFinding): string => {\n const { file, line } = errorSite(finding);\n if (line === undefined) return \"\";\n if (file === undefined) return c.dim(` (line ${String(line)})`);\n return c.dim(` (${file}:${String(line)})`);\n };\n // The rule behind a finding, dim, two spaces deeper than the finding's line.\n const guidance = (finding: CitationFinding, indent: number): string[] =>\n guidanceLines(finding.guidance).map((line) => `${\" \".repeat(indent)}${c.dim(line)}`);\n\n run.pages.forEach((page, index) => {\n const { reported, baselined } = splitBaselined(page, resultFor(run, index));\n const errors = reported.filter((f) => f.severity === \"error\").length;\n const warned = reported.some((f) => f.severity === \"warning\");\n // \"baselined\" is a participle, not a noun: 1 baselined, 2 baselined.\n const forgiven =\n baselined.length > 0 ? c.dim(` (${String(baselined.length)} baselined)`) : \"\";\n // Every row names one manifest: a page's own under `{page}` (proposal\n // 0058), or a shared one. Said once on the page's line, not on each row.\n const manifest = oneManifest(page.citations);\n const heading = manifest === undefined ? page.file : `${page.file} ${c.dim(manifest)}`;\n\n if (reported.length === 0) {\n if (quiet) return;\n lines.push(`${c.green(\"✓\")} ${heading}${forgiven}`);\n } else {\n // The most severe finding marks the file. Only ✗ is a failure.\n const mark = errors > 0 ? c.red(\"✗\") : warned ? c.yellow(\"⚠\") : c.dim(\"ℹ\");\n lines.push(`${mark} ${heading}${forgiven}`);\n }\n\n const isBaselined = new Set(baselined);\n const placed = new Set<CitationFinding>();\n const rows: Row[] = [];\n\n for (const result of rowOrder(page.citations)) {\n const own = page.findings.filter((f) => belongsTo(f, result) && !placed.has(f));\n for (const finding of own) placed.add(finding);\n const live = own.filter((f) => !isBaselined.has(f));\n if (own.length === 0 && quiet) continue;\n const worst =\n live.find((f) => f.severity === \"error\") ??\n live.find((f) => f.severity === \"warning\") ??\n live[0];\n const mark =\n worst !== undefined\n ? severityMark(worst.severity, c)\n : own.length > 0\n ? c.dim(\"·\")\n : result.source.status === \"skipped\" && result.claim === null\n ? c.dim(\"·\")\n : c.green(\"✓\");\n\n // The ends are the row; anything else about the entry is a line under\n // it. A misplaced marker is part of the row too: it reads there as\n // `marker :<line> -> :<place>`.\n const endRules = new Set([\"claim-\", \"source-\", \"marker-misplaced\"]);\n const under: string[] = [];\n for (const finding of own) {\n const isEnd = [...endRules].some((prefix) => finding.rule.startsWith(prefix));\n if (isEnd) {\n // The row says the status; what to do and the rule go under it.\n // finding.message carries the remedy too, for the formats that print\n // one line per finding, but the row prints the status alone, so the\n // remedy is derived here rather than cut back out of the message.\n if (isBaselined.has(finding)) continue;\n const remedy = remedyFor(finding.rule, result);\n if (remedy !== undefined) under.push(` ${remedy}`);\n under.push(...guidance(finding, 6));\n continue;\n }\n const text = isBaselined.has(finding)\n ? c.dim(`${finding.message} (baselined)`)\n : finding.message;\n under.push(` ${severityMark(finding.severity, c)} ${text}${location(finding)}`);\n if (!isBaselined.has(finding)) under.push(...guidance(finding, 8));\n }\n if (opts.showDiff) {\n if (own.some((f) => f.rule === \"source-changed\")) under.push(...diffLines(result, c.dim));\n if (own.some((f) => f.rule === \"claim-changed\" || f.rule === \"claim-reanchored\")) {\n under.push(...claimLines(result, c.dim));\n }\n }\n const forgivenEnd = own.length > 0 && live.length === 0 ? c.dim(\" (baselined)\") : \"\";\n rows.push({\n mark,\n label: labelOf(result),\n claim: claimColumn(result),\n source: `${sourceColumn(result, opts, c.dim)}${forgivenEnd}`,\n where:\n result.origin.kind === \"manifest\" && manifest === undefined\n ? `${result.origin.file}${result.origin.line === undefined ? \"\" : `:${String(result.origin.line)}`}`\n : \"\",\n under,\n });\n }\n\n // Columns are as wide as this page needs them, and no wider.\n const width = (pick: (row: Row) => string): number =>\n rows.reduce((n, row) => Math.max(n, pick(row).length), 0);\n const labelWidth = width((row) => row.label);\n const claimWidth = width((row) => row.claim);\n const anyWhere = rows.some((row) => row.where !== \"\");\n const sourceWidth = anyWhere ? width((row) => row.source) : 0;\n for (const row of rows) {\n const label = padTo(c.cyan(row.label), labelWidth, row.label.length);\n const source = padTo(row.source, sourceWidth, row.source.length);\n const text = ` ${row.mark} ${label} ${padTo(row.claim, claimWidth, row.claim.length)} ${source}${row.where === \"\" ? \"\" : ` ${c.dim(row.where)}`}`;\n lines.push(text.replace(/\\s+$/, \"\"));\n lines.push(...row.under);\n }\n\n // Findings about no entry: a marker naming nothing, a reserved page key.\n for (const finding of page.findings) {\n if (placed.has(finding)) continue;\n const label = c.cyan(labelOfFinding(finding));\n if (isBaselined.has(finding)) {\n lines.push(\n ` ${c.dim(\"·\")} ${label} ${c.dim(`${finding.message} (baselined)`)}${location(finding)}`,\n );\n continue;\n }\n lines.push(` ${severityMark(finding.severity, c)} ${label} ${finding.message}${location(finding)}`);\n lines.push(...guidance(finding, 6));\n }\n });\n\n const { summary } = run;\n const warnings = summary.warnings ?? 0;\n const notices = summary.notices ?? 0;\n const baselined = summary.baseline?.suppressed ?? 0;\n const findings = summary.errors + warnings + notices + baselined;\n const parts = [plural(findings, \"finding\")];\n if (warnings > 0) parts.push(`(${plural(warnings, \"warning\")})`);\n if (notices > 0) parts.push(`(${plural(notices, \"notice\")})`);\n if (baselined > 0) parts.push(`(${String(baselined)} baselined)`);\n const summaryText = `${plural(summary.files, \"file\")} checked, ${String(summary.passed)} passed, ${String(summary.failed)} failed, ${parts.join(\" \")}`;\n if (lines.length > 0) lines.push(\"\");\n lines.push(summary.failed > 0 ? c.red(summaryText) : c.green(summaryText));\n if (summary.baseline?.written) {\n lines.push(c.dim(`Baseline written to ${summary.baseline.path}`));\n }\n return lines.join(\"\\n\");\n}\n\n/** `line 9`, or `lines 9-12`, from a line spec. */\nfunction spellAtSpec(spec: string): string {\n const span = spanOf(spec);\n return span === undefined ? `lines ${spec}` : spellAt(span);\n}\n\n/** A line spec as numbers, or undefined when it does not read as one. */\nfunction spanOf(spec: string): { start: number; end: number } | undefined {\n const [first, second] = spec.split(\"-\");\n const start = Number(first);\n const end = second === undefined ? start : Number(second);\n if (!Number.isFinite(start) || !Number.isFinite(end)) return undefined;\n return { start, end };\n}\n\n/**\n * What a re-pin over the unit newly covers, so the widening is in the log as\n * well as in the diff. A span that only lost marker lines gains nothing, and\n * says that instead.\n */\nfunction widening(held: string, now: string): string {\n const was = spanOf(held);\n const is = spanOf(now);\n if (was === undefined || is === undefined) return \"\";\n const parts: string[] = [];\n if (is.start < was.start) {\n parts.push(spellAt({ start: is.start, end: Math.min(was.start - 1, is.end) }));\n }\n if (is.end > was.end) {\n parts.push(spellAt({ start: Math.max(was.end + 1, is.start), end: is.end }));\n }\n if (parts.length === 0) return \", which held a marker line\";\n return `, ${parts.join(\" and \")} newly pinned`;\n}\n\n/** Whether a re-pin covered a span other than the stored one. */\nfunction widened(rewrite: UpdateRewrite): boolean {\n return (\n rewrite.fromLines !== undefined &&\n rewrite.toLines !== undefined &&\n rewrite.fromLines !== rewrite.toLines\n );\n}\n\n/** `lines 9 -> 9-12` for a re-pin that moved, `at line 9` for one that did not. */\nfunction movedSpan(rewrite: UpdateRewrite): string {\n if (widened(rewrite)) return `lines ${rewrite.fromLines ?? \"\"} -> ${rewrite.toLines ?? \"\"}`;\n const at = rewrite.toLines ?? rewrite.fromLines ?? String(rewrite.at ?? 0);\n return `at ${spellAtSpec(at)}`;\n}\n\n/**\n * What one claim `--accept` refused to re-pin says, and what to do about it.\n * The line names which test refused it: the share is printed when overlap is\n * what fired, and the text is called different when no sentence was shared.\n */\nexport function refusalLine(rewrite: UpdateRewrite): string {\n const at = shortCommit(rewrite.commitSha ?? \"\");\n const where = `claim at ${spellAtSpec(String(rewrite.at ?? 0))} skipped:`;\n if (rewrite.wordShare !== undefined) {\n const share = Math.round(rewrite.wordShare * 100);\n return `${where} that line now holds text sharing ${String(share)}% of the claim's words at ${at}. Re-add it with cite add.`;\n }\n return `${where} that line now holds different text than the claim at ${at}. Re-add it with cite add.`;\n}\n\n/**\n * Why a pin was re-committed, as its row says it. Exhaustive, so a new reason\n * is a type error here rather than a row that quietly reads as the old one. No\n * reason at all is the containment case, which is all `--recommit` once knew.\n */\nfunction recommitWhy(because: RecommitReason | undefined): string {\n switch (because) {\n case \"not-in-history\":\n return \"not in this branch's history\";\n case \"not-contained\":\n case undefined:\n return \"did not contain the pinned lines\";\n }\n}\n\n/** What one rewritten end says it did. */\nexport function rewriteLine(rewrite: UpdateRewrite): string {\n const word = rewrite.from.includes(\"-\") ? \"lines\" : \"line\";\n const status = rewrite.status === \"never-true\" ? \"never true\" : rewrite.status;\n if (rewrite.end === \"marker\") {\n return `marker line ${rewrite.from} -> ${rewrite.to} (misplaced)`;\n }\n // The pin held; only its date was wrong. The row names both commits, so the\n // log says what the entry claimed before it was corrected.\n if (rewrite.reason === \"recommitted\") {\n const from = shortCommit(rewrite.fromCommit ?? \"\");\n const to = shortCommit(rewrite.toCommit ?? \"\");\n return `source ${shortSrc(rewrite.src ?? \"\")} commit ${from} -> ${to} (${recommitWhy(rewrite.because)})`;\n }\n if (rewrite.reason === \"shifted\") {\n return `claim ${word} ${rewrite.from} -> ${rewrite.to} (shifted by a marker)`;\n }\n // The words held while the anchor moved (0053). A claim-lines entry moved\n // onto its new run, so the row names both spans.\n if (rewrite.reason === \"re-anchored\" && rewrite.status === \"reanchored\") {\n const since = rewrite.commitSha === undefined ? \"\" : ` since ${shortCommit(rewrite.commitSha)}`;\n return `claim ${movedSpan(rewrite)} re-pinned (reanchored; words unchanged${since})`;\n }\n if (rewrite.reason === \"re-anchored\") {\n const held = rewrite.lines ?? \"\";\n const now = rewrite.newLines ?? \"\";\n return `claim re-pinned over ${spellAtSpec(now)} (moved; was ${spellAtSpec(held)}${widening(held, now)})`;\n }\n if (rewrite.reason === \"moved\") {\n return rewrite.end === \"claim\"\n ? `claim ${word} ${rewrite.from} -> ${rewrite.to} (moved)`\n : `source ${shortSrc(rewrite.from)} -> ${shortSrc(rewrite.to)} (moved)`;\n }\n if (rewrite.end === \"claim\") {\n // A re-pin over a unit wider than the stored lines names both spans, so\n // the widening is in the log as well as in the diff.\n if (widened(rewrite)) {\n return `claim ${movedSpan(rewrite)} re-pinned (${status}; now \"${rewrite.text ?? \"\"}\")`;\n }\n // A marker anchors its claim, so the marker's line is where the entry is,\n // as `check` reports it. A claim-lines entry reads at the claim.\n const where =\n rewrite.markerLine === undefined\n ? `line ${String(rewrite.at ?? 0)}`\n : `marker line ${String(rewrite.markerLine)}`;\n return `claim at ${where} re-pinned (${status}; now \"${rewrite.text ?? \"\"}\")`;\n }\n const at = rewrite.commitSha === undefined ? \"\" : ` at ${shortCommit(rewrite.commitSha)}`;\n const src = shortSrc(rewrite.src ?? \"\");\n // A re-mint over the span the old first and last line now bracket names both\n // ranges, so the log says which lines were accepted.\n const where = rewrite.toLines === undefined ? src : `${src} -> ${atLines(src, rewrite.toLines)}`;\n return `source ${where} re-pinned${at} (${status}; ${shortPin(rewrite.from)} -> ${shortPin(rewrite.to)})`;\n}\n\n/** The same source spelled at other lines: `path:200-212` and `\"200-215\"` read `path:200-215`. */\nfunction atLines(src: string, lines: string): string {\n const colon = src.lastIndexOf(\":\");\n return `${colon === -1 ? src : src.slice(0, colon)}:${lines}`;\n}\n\nexport function renderUpdatePretty(run: UpdateRun, opts: PrettyOptions): string {\n const c = palette(opts.color);\n const lines: string[] = [];\n let files = 0;\n for (const page of run.pages) {\n if (page.rewritten.length > 0) files += 1;\n if (opts.showDiff && page.diff !== \"\") {\n for (const line of page.diff.split(/\\r?\\n/)) {\n if (line !== \"\") lines.push(c.dim(line));\n }\n }\n for (const rewrite of page.rewritten) {\n const label = rewrite.id ?? `#${String(rewrite.index)}`;\n lines.push(`${page.file}: ${c.cyan(label)} ${rewriteLine(rewrite)}`);\n }\n // A claim `--accept` refused reads beside the rewrites, because it is the\n // one row `--accept` was asked for and did not write.\n for (const rewrite of page.refused) {\n const label = rewrite.id ?? `#${String(rewrite.index)}`;\n lines.push(`${page.file}: ${c.cyan(label)} ${refusalLine(rewrite)}`);\n }\n for (const finding of page.skipped) {\n const mark = severityMark(finding.severity, c);\n lines.push(\n `${page.file}: ${c.cyan(labelOfFinding(finding))} ${mark} skipped: ${finding.message}`,\n );\n }\n }\n // The manifests, after the pages: a dry run owes the diff of every file it\n // would have written, and an entry a manifest owns is written there.\n if (opts.showDiff) {\n for (const manifest of run.manifests ?? []) {\n for (const line of manifest.diff.split(/\\r?\\n/)) {\n if (line !== \"\") lines.push(c.dim(line));\n }\n }\n }\n const summary = `${plural(run.rewritten, \"citation\")} rewritten in ${plural(files, \"file\")}, ${String(run.skipped)} skipped`;\n lines.push(run.exitCode === 0 ? c.green(summary) : c.red(summary));\n return lines.join(\"\\n\");\n}\n\n/** `line 30`, or `lines 30 and 42` for several, as a sentence reads them. */\nfunction spellLineList(at: readonly number[], noun: string): string {\n // No lines is the noun alone. Every caller has at least one, and a\n // sentence reading \"lines and \" would be the only sign that one did not.\n if (at.length === 0) return noun;\n const spelled = at.map((line) => String(line));\n if (spelled.length === 1) return `${noun} ${spelled[0] ?? \"\"}`;\n const last = spelled[spelled.length - 1] ?? \"\";\n return `${noun}s ${spelled.slice(0, -1).join(\", \")} and ${last}`;\n}\n\n/** What one removal says it did: the entry, where it was kept, and its markers. */\nexport function removalLine(removal: Removal, c: ReturnType<typeof palette>): string {\n const markers = spellLineList(removal.markerLines, \"line\");\n if (removal.origin === undefined) {\n // A marker naming no entry: there is nothing else to report about it.\n const named = removal.markerLines.length === 1 ? \"the marker\" : \"the markers\";\n return `removed ${named} ${c.cyan(removal.id ?? \"\")} at ${markers}, which named no entry`;\n }\n const name = removal.id ?? `/citations/${String(removal.index ?? 0)}`;\n const where =\n removal.origin.kind === \"manifest\"\n ? `${removal.origin.file}${removal.origin.line === undefined ? \"\" : `:${String(removal.origin.line)}`}`\n : \"frontmatter\";\n const also =\n removal.markerLines.length === 0\n ? \"\"\n : `, and ${removal.markerLines.length === 1 ? \"its marker\" : \"its markers\"} at ${markers}`;\n return `removed ${c.cyan(name)} from ${where}${also}`;\n}\n\nexport function renderRemovePretty(run: RemoveRun, opts: PrettyOptions): string {\n const c = palette(opts.color);\n const lines: string[] = [];\n let files = 0;\n for (const page of run.pages) {\n if (page.removed.length > 0) files += 1;\n if (opts.showDiff && page.diff !== \"\") {\n for (const line of page.diff.split(/\\r?\\n/)) {\n if (line !== \"\") lines.push(c.dim(line));\n }\n }\n for (const removal of page.removed) {\n lines.push(`${page.file}: ${removalLine(removal, c)}`);\n }\n }\n // The manifests, after the pages, as `update` prints them.\n if (opts.showDiff) {\n for (const manifest of run.manifests ?? []) {\n for (const line of manifest.diff.split(/\\r?\\n/)) {\n if (line !== \"\") lines.push(c.dim(line));\n }\n }\n }\n const verb = opts.dryRun === true ? \"would be removed\" : \"removed\";\n lines.push(c.green(`${plural(run.removed, \"citation\")} ${verb} from ${plural(files, \"file\")}`));\n return lines.join(\"\\n\");\n}\n\n/** `45 minutes`, `5 hours` or `47 days`: minutes under an hour, hours under two days. */\nexport function staleFor(seconds: number): string {\n if (seconds < 3600) return plural(Math.round(seconds / 60), \"minute\");\n if (seconds < 2 * 86400) return plural(Math.round(seconds / 3600), \"hour\");\n return plural(Math.round(seconds / 86400), \"day\");\n}\n\n/** A window's releases: up to three by name, more as a range, none as `-`. */\nexport function releasesCell(names: readonly string[]): string {\n const [first] = names;\n const last = names[names.length - 1];\n if (first === undefined || last === undefined) return \"-\";\n if (names.length <= 3) return names.join(\", \");\n return `${first} through ${last} (${String(names.length)} releases)`;\n}\n\nconst CAUSES: Record<NonNullable<StaleWindow[\"closed\"]>[\"by\"], string> = {\n \"re-pinned\": \"closed by a re-pin\",\n \"source-restored\": \"closed when the source was restored\",\n removed: \"closed when the entry was removed\",\n};\n\n/**\n * `history`: one row per stale window under its page, a dim line naming the\n * commits, the rule and the cause, then the totals.\n */\nexport function renderHistoryPretty(run: HistoryRun, opts: Pick<PrettyOptions, \"color\">): string {\n const c = palette(opts.color);\n const { summary } = run;\n const lines: string[] = [];\n const walked = `Walked ${plural(summary.walked.commits, \"commit\")}, ${summary.walked.from.slice(0, 10)} to ${summary.walked.to.slice(0, 10)}.`;\n if (summary.windows === 0) {\n lines.push(`No stale windows on ${plural(summary.citations, \"citation\")} in ${plural(summary.files, \"page\")}.`, walked);\n return lines.join(\"\\n\");\n }\n const word = { error: c.red, warning: c.yellow, notice: c.dim } as const;\n const cited = new Set<string>();\n let pages = 0;\n for (const page of run.pages) {\n if (page.windows.length === 0) continue;\n pages += 1;\n lines.push(page.file);\n for (const window of page.windows) {\n cited.add(`${page.file}\\0${window.id}`);\n const open = window.closed === null ? \", open\" : \"\";\n lines.push(\n ` ${word[window.severity](window.severity)} ${window.id} ${shortSrc(window.source)} stale ${staleFor(window.seconds)}${open} ${releasesCell(window.releases)}`,\n );\n const span = `${shortCommit(window.opened.commit)}..${window.closed === null ? \"HEAD\" : shortCommit(window.closed.commit)}`;\n const bounded = window.opened.bounded ? \", bounded\" : \"\";\n const cause = window.closed === null ? \"still open at HEAD\" : CAUSES[window.closed.by];\n const formerly = window.formerly.length === 0 ? \"\" : ` (formerly ${window.formerly.join(\", \")})`;\n lines.push(`${\" \".repeat(4 + window.severity.length)}${c.dim(`${span} ${window.rule}${bounded}, ${cause}${formerly}`)}`);\n }\n }\n const open = summary.open === 0 ? \"none\" : String(summary.open);\n lines.push(\n \"\",\n `${plural(summary.windows, \"stale window\")} on ${plural(cited.size, \"citation\")} in ${plural(pages, \"page\")}, ${open} open. ${(summary.staleSeconds / 3600).toFixed(1)} stale pin-hours.`,\n );\n const [first] = summary.releases;\n const last = summary.releases[summary.releases.length - 1];\n if (first !== undefined && last !== undefined) {\n const named = summary.releases.length <= 3 ? summary.releases.join(\", \") : `${first} through ${last}`;\n lines.push(`${plural(summary.releases.length, \"release\")} shipped a stale pin: ${named}.`);\n }\n lines.push(walked);\n return lines.join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAyCO,IAAM,gBAAgB;AAE7B,IAAM,SAAS,CAAC,GAAW,KAAa,OAAO,GAAG,GAAG,QACnD,GAAG,OAAO,CAAC,CAAC,IAAI,MAAM,IAAI,MAAM,IAAI;AAGtC,SAAS,aAAa,UAAuC,GAAuC;AAClG,UAAQ,UAAU;AAAA,IAChB,KAAK;AACH,aAAO,EAAE,IAAI,QAAG;AAAA,IAClB,KAAK;AACH,aAAO,EAAE,OAAO,QAAG;AAAA,IACrB,KAAK;AACH,aAAO,EAAE,IAAI,QAAG;AAAA,EACpB;AACF;AAiBO,SAAS,eACd,MACA,QACe;AACf,MAAI,WAAW,OAAW,QAAO,EAAE,UAAU,CAAC,GAAG,KAAK,QAAQ,GAAG,WAAW,CAAC,EAAE;AAC/E,QAAM,OAAO,CAAC,GAAG,OAAO,MAAM;AAC9B,QAAM,MAAqB,EAAE,UA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O,EAAE;AACrF,YAAM,WAAW,OAAO,SAAS,WAAW,IAAI,KAAK,cAAc,OAAO,SAAS,KAAK,IAAI,CAAC;AAC7F,YAAM,KAAK,GAAG,IAAI,OAAO,IAAI,OAAO,SAAS,MAAM,CAAC,GAAG,EAAE,IAAI,GAAG,IAAI,KAAK,OAAO,IAAI,GAAG,OAAO,KAAK,KAAK,GAAG,QAAQ,EAAE,CAAC,EAAE;AAAA,IAC1H;AAAA,EACF;AACA,QAAM,OAAO,QAAQ,SAAS,IAAI,SAAS,OAAO,QAAQ,IAAI;AAC9D,QAAM;AAAA,IACJ;AAAA,IACA,GAAG,OAAO,QAAQ,SAAS,cAAc,CAAC,OAAO,OAAO,MAAM,MAAM,UAAU,CAAC,OAAO,OAAO,OAAO,MAAM,CAAC,KAAK,IAAI,WAAW,QAAQ,eAAe,MAAM,QAAQ,CAAC,CAAC;AAAA,EACxK;AACA,QAAM,CAAC,KAAK,IAAI,QAAQ;AACxB,QAAM,OAAO,QAAQ,SAAS,QAAQ,SAAS,SAAS,CAAC;AACzD,MAAI,UAAU,UAAa,SAAS,QAAW;AAC7C,UAAM,QAAQ,QAAQ,SAAS,UAAU,IAAI,QAAQ,SAAS,KAAK,IAAI,IAAI,GAAG,KAAK,YAAY,IAAI;AACnG,UAAM,KAAK,GAAG,OAAO,QAAQ,SAAS,QAAQ,SAAS,CAAC,yBAAyB,KAAK,GAAG;AAAA,EAC3F;AACA,QAAM,KAAK,MAAM;AACjB,SAAO,MAAM,KAAK,IAAI;AACxB;","names":["baselined","where","open"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/family/cli.ts","../src/family/core/envelope.ts","../src/family/core/in-play.ts","../src/family/commands/check.ts","../src/family/core/changed.ts","../src/family/core/said-once.ts","../src/family/commands/status.ts"],"sourcesContent":["/**\n * The two family verbs, `manni check` and `manni status`, mounted on the\n * umbrella with `addCommand`. They are the only verbs it carries: each\n * orchestrates other domains' command cores and owns no checks of its own.\n *\n * Run by hand or in CI they follow the family contract: 0 clean, 1 errors, 2\n * operational, the report on stdout and notices on stderr. Under a Claude\n * Code hook envelope on stdin they speak the hook protocol instead, which\n * changes where output goes and what the exit code means, never what is\n * checked beyond the scope.\n */\nimport { resolve } from \"node:path\";\nimport { Command, Option } from \"commander\";\nimport { shouldColor } from \"../shared/color.js\";\nimport { errorMessage } from \"../shared/errors.js\";\nimport { programName } from \"../shared/program-name.js\";\nimport { fail } from \"../shared/run.js\";\nimport { notice } from \"../shared/warn.js\";\nimport { readEnvelope, type Envelope } from \"./core/envelope.js\";\nimport { FamilyError, labelFrom } from \"./core/in-play.js\";\nimport {\n CHECK_FORMATS,\n EDIT_TOOLS,\n exitCodeFor,\n hookFailure,\n hookReply,\n render,\n runFamilyCheck,\n runTurnCheck,\n turnReply,\n type CheckFormat,\n type FamilyCheckRun,\n type HookReply,\n type Scope,\n} from \"./commands/check.js\";\nimport {\n STATUS_FORMATS,\n agentLines,\n exportGeneratedBy,\n renderStatus,\n runStatus,\n type StatusFormat,\n} from \"./commands/status.js\";\n\ninterface CheckCliOptions {\n config?: string;\n format: CheckFormat;\n /** `--no-color`: `false` when given. */\n color: boolean;\n}\n\ninterface StatusCliOptions {\n config?: string;\n format: StatusFormat;\n}\n\nfunction send(reply: HookReply): void {\n if (reply.stdout !== undefined) process.stdout.write(reply.stdout);\n if (reply.stderr !== undefined) process.stderr.write(reply.stderr);\n process.exitCode = reply.exitCode;\n}\n\n/**\n * The file checks a hook asks for, or `undefined` when this event runs none.\n * A SubagentStop runs none: its subagent's turn is judged alone.\n */\nexport function hookScope(envelope: Envelope, cwd: string): { scope: Scope; file?: string } | undefined {\n if (envelope.event === \"Stop\") return { scope: { kind: \"changed\" } };\n if (envelope.event !== \"PostToolUse\") return undefined;\n if (envelope.toolName === undefined || !EDIT_TOOLS.includes(envelope.toolName)) return undefined;\n if (envelope.filePath === undefined) return undefined;\n const file = labelFrom(cwd, resolve(cwd, envelope.filePath));\n return { scope: { kind: \"paths\", paths: [file] }, file };\n}\n\n/** The events that end a turn, which tracevals judges (proposal 0079). */\nconst TURN_EVENTS: readonly string[] = [\"Stop\", \"SubagentStop\"];\n\nasync function checkUnderHook(paths: string[], options: CheckCliOptions, envelope: Envelope): Promise<void> {\n const cwd = resolve(envelope.cwd ?? process.cwd());\n // Positional paths win over the envelope's own scope.\n const asked: { scope: Scope; file?: string } | undefined =\n paths.length > 0 ? { scope: { kind: \"paths\", paths }, file: paths.join(\", \") } : hookScope(envelope, cwd);\n const turnEvent = TURN_EVENTS.includes(envelope.event);\n if (asked === undefined && !turnEvent) return;\n let run: FamilyCheckRun | undefined;\n if (asked !== undefined) {\n try {\n run = await runFamilyCheck({\n cwd,\n scope: asked.scope,\n allowMissing: true,\n ...(options.config === undefined ? {} : { configPath: options.config }),\n // stdout and stderr are the hook's channels; a notice is not for the agent.\n onNotice: () => undefined,\n });\n } catch (err) {\n // Nothing set up for the file checks is not the end of a turn's judgement.\n if (!(err instanceof FamilyError && err.quiet) && !turnEvent) {\n send(hookFailure(errorMessage(err), envelope, asked.file));\n return;\n }\n }\n }\n if (!turnEvent) {\n if (run !== undefined) send(hookReply(run, envelope));\n return;\n }\n send(turnReply(run, await runTurnCheck(envelope, cwd), envelope));\n}\n\nexport function buildCheck(): Command {\n return new Command(\"check\")\n .description(\"Run every check this repository has set up, and nothing else\")\n .argument(\"[paths...]\", \"files, directories, or globs; the per-file checks run on the collection members among them\")\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .addOption(\n new Option(\"-f, --format <format>\", \"output (not read under a hook)\")\n .choices(CHECK_FORMATS)\n .default(\"pretty\"),\n )\n .option(\"--no-color\", \"disable colored output\")\n .showHelpAfterError(\"(add --help for usage)\")\n .exitOverride()\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni check # every in-play check, the CI gate\",\n \" manni check docs/limits.md # per-file checks on one page\",\n \" manni check -f github # in a GitHub workflow\",\n \" manni check -f sarif > manni.sarif # one SARIF log for code scanning\",\n \" manni check docs/ -f json # scripting form\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: CheckCliOptions) => {\n const envelope = await readEnvelope();\n if (envelope !== undefined) {\n await checkUnderHook(paths, options, envelope);\n return;\n }\n try {\n const run = await runFamilyCheck({\n scope: paths.length > 0 ? { kind: \"paths\", paths } : { kind: \"all\" },\n ...(options.config === undefined ? {} : { configPath: options.config }),\n onNotice: notice,\n });\n for (const check of run.checks) {\n if (check.status === \"error\") {\n process.stderr.write(`${programName()} ${check.command} could not run: ${check.message}\\n`);\n }\n }\n const color = shouldColor({ noColor: !options.color, isTTY: process.stdout.isTTY });\n const text = render(run, options.format, color);\n if (text.length > 0) process.stdout.write(`${text}\\n`);\n process.exitCode = exitCodeFor(run);\n } catch (err) {\n fail(err);\n }\n });\n}\n\nexport function buildStatus(): Command {\n return new Command(\"status\")\n .description(\"Say what is set up here, and so what manni check runs\")\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .addOption(\n new Option(\"-f, --format <format>\", \"output\").choices(STATUS_FORMATS).default(\"pretty\"),\n )\n .showHelpAfterError(\"(add --help for usage)\")\n .exitOverride()\n .action(async (options: StatusCliOptions) => {\n const envelope = await readEnvelope();\n const configOption = options.config === undefined ? {} : { configPath: options.config };\n if (envelope?.event === \"SessionStart\") {\n try {\n const report = await runStatus({ cwd: resolve(envelope.cwd ?? process.cwd()), ...configOption });\n // The agent lines promise checks, so they need a domain in play to be true.\n const lines = report.domains.some((d) => d.status === \"in-play\") ? `\\n\\n${agentLines(report)}` : \"\";\n // The next steps are advice for whoever owns the config, not the agent.\n process.stdout.write(`${renderStatus(report, \"pretty\", { next: false })}${lines}\\n`);\n exportGeneratedBy(envelope);\n } catch {\n // No config, or one that cannot be read: the session starts without a word.\n }\n return;\n }\n try {\n const report = await runStatus(configOption);\n process.stdout.write(`${renderStatus(report, options.format)}\\n`);\n } catch (err) {\n fail(err);\n }\n });\n}\n","/**\n * The Claude Code hook envelope, detected rather than switched.\n *\n * A hook command gets one JSON object on stdin, and Claude Code closes the\n * stream after it. When stdin is not a terminal and parses as an object with a\n * string `hook_event_name`, `manni check` and `manni status` speak the hook\n * protocol. Anything else is a run by hand, and stdin is left unread beyond\n * that one look. The look never hangs: `readStdin` gives up on a stream that\n * stays silent, which is what an inherited pipe nobody writes to looks like.\n */\nimport { readStdin } from \"../../tracevals/capture/hook.js\";\n\nexport interface Envelope {\n /** `hook_event_name`: `PostToolUse`, `Stop`, `SessionStart`, … */\n event: string;\n /** The directory the hook fired in; relative paths resolve from it. */\n cwd?: string;\n /** `tool_name`, on a tool event. */\n toolName?: string;\n /** `tool_input.file_path`, or `tool_input.notebook_path` for a notebook. */\n filePath?: string;\n /** `stop_hook_active`: this stop already follows one repair pass. */\n stopHookActive: boolean;\n /** `model`, on `SessionStart`: a string, or an object carrying `id`. */\n model?: string;\n /** `session_id`. */\n sessionId?: string;\n /** `transcript_path`: the session's own transcript. */\n transcriptPath?: string;\n /** `agent_transcript_path`, on `SubagentStop`: the subagent's own transcript. */\n agentTranscriptPath?: string;\n /** `agent_id`, on `SubagentStop`. */\n agentId?: string;\n /** `agent_type`, on `SubagentStop`. */\n agentType?: string;\n /** `last_assistant_message`, on `Stop` and `SubagentStop`. */\n lastAssistantMessage?: string;\n}\n\nfunction str(value: unknown): string | undefined {\n return typeof value === \"string\" && value.length > 0 ? value : undefined;\n}\n\nfunction record(value: unknown): Record<string, unknown> | undefined {\n return value !== null && typeof value === \"object\" && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : undefined;\n}\n\n/** The envelope in `text`, or `undefined` when `text` is not one. */\nexport function parseEnvelope(text: string): Envelope | undefined {\n let parsed: unknown;\n try {\n parsed = JSON.parse(text);\n } catch {\n return undefined;\n }\n const doc = record(parsed);\n const event = str(doc?.hook_event_name);\n if (doc === undefined || event === undefined) return undefined;\n const input = record(doc.tool_input);\n const filePath = str(input?.file_path) ?? str(input?.notebook_path);\n const cwd = str(doc.cwd);\n const toolName = str(doc.tool_name);\n const model = str(doc.model) ?? str(record(doc.model)?.id);\n const strings = {\n sessionId: str(doc.session_id),\n transcriptPath: str(doc.transcript_path),\n agentTranscriptPath: str(doc.agent_transcript_path),\n agentId: str(doc.agent_id),\n agentType: str(doc.agent_type),\n lastAssistantMessage: str(doc.last_assistant_message),\n };\n const given = Object.fromEntries(Object.entries(strings).filter(([, v]) => v !== undefined)) as Partial<\n Record<keyof typeof strings, string>\n >;\n return {\n event,\n stopHookActive: doc.stop_hook_active === true,\n ...(cwd === undefined ? {} : { cwd }),\n ...(toolName === undefined ? {} : { toolName }),\n ...(filePath === undefined ? {} : { filePath }),\n ...(model === undefined ? {} : { model }),\n ...given,\n };\n}\n\n/** The envelope on stdin, or `undefined` for a run by hand. */\nexport async function readEnvelope(\n stream: NodeJS.ReadStream = process.stdin,\n): Promise<Envelope | undefined> {\n if (stream.isTTY) return undefined;\n try {\n return parseEnvelope(await readStdin(stream));\n } catch {\n // Too large to be an envelope: a run by hand with something piped in.\n return undefined;\n }\n}\n","/**\n * What is set up, and so what `manni check` runs.\n *\n * There are no keys of the family's own. A domain is in play when its own\n * section of `manni.config.yaml` exists, or when the content carries its\n * declarations. Nothing manni would apply by default counts as set up:\n *\n * | Domain | In play when |\n * |---|---|\n * | meta | a file's schema set is more than the built-in defaults: `meta:` covers it, or it names its own `$schema` |\n * | cite | a page carries citations |\n * | lint | `lint:` exists |\n * | docevals | a page resolves evals, from `docevals:` or its own declarations |\n * | term | the collections hold a term |\n * | strategy | the collections hold a record of type audience, persona or journey |\n * | graph | `graph:` exists |\n * | tracevals | `tracevals.runtime` exists and `MANNI_TRACEVALS_HOOKS` is 1; it judges the turn a Stop or SubagentStop hook ends |\n * | a11y | never run by `check`: it needs a running site |\n * | test | never run by `check`: it runs the pages' shell steps and synthetic users |\n *\n * Only members of a declared collection are file-checked. tracevals judges a\n * turn, not files, so it needs no collection.\n */\nimport { relative, resolve, sep } from \"node:path\";\nimport { parse as parseYaml } from \"yaml\";\nimport type { CollectionConfig } from \"../../shared/collections.js\";\nimport {\n findFamilyConfigFile,\n readFamilyConfigFile,\n type ConfigFile,\n} from \"../../shared/config-file.js\";\nimport { ToolError } from \"../../shared/errors.js\";\nimport { warn } from \"../../shared/warn.js\";\nimport { memberOf, retainMembers } from \"../../meta/core/collections.js\";\nimport { resolveTargetSet } from \"../../meta/internal.js\";\n\n/** An operational error of `manni check` or `manni status`: exit 2. */\nexport class FamilyError extends ToolError {\n constructor(\n message: string,\n /** Set for the two conditions a hook answers with silence. */\n readonly quiet = false,\n ) {\n super(message);\n this.name = \"FamilyError\";\n }\n}\n\nexport function noConfigError(cwd: string): FamilyError {\n return new FamilyError(\n `No manni.config.yaml found from ${cwd} up to the repository root. Create one there with a collections: entry for your docs.`,\n true,\n );\n}\n\nexport function nothingSetUpError(): FamilyError {\n return new FamilyError(\n \"Nothing is set up to check in manni.config.yaml. Run manni status to see what each domain needs.\",\n true,\n );\n}\n\n/** The domains `check` can run, in the order it runs and reports them. */\nexport const DOMAINS = [\"meta\", \"cite\", \"lint\", \"docevals\", \"term\", \"strategy\", \"graph\"] as const;\nexport type Domain = (typeof DOMAINS)[number];\n\n/** Each domain's check, as `check` names it. */\nexport const COMMANDS: Readonly<Record<Domain, string>> = {\n meta: \"meta validate\",\n cite: \"cite check\",\n lint: \"lint check\",\n docevals: \"docevals run\",\n term: \"term check\",\n strategy: \"strategy check\",\n graph: \"graph check\",\n};\n\n/** Why a domain is not in play, as both `check` and `status` say it. */\nexport const NOT_SET_UP: Readonly<Record<Domain, string>> = {\n meta: \"no meta: section\",\n cite: \"no page carries citations\",\n lint: \"no lint: section\",\n docevals: \"no page resolves any evals\",\n term: \"no terms in any collection\",\n strategy: \"no strategy records in any collection\",\n graph: \"no graph: section\",\n};\n\n/**\n * What would put each domain in play, as `status` says it. It is advice for\n * whoever owns the config, so the SessionStart briefing leaves it out.\n */\nexport const NEXT: Readonly<Record<Domain, string>> = {\n meta: \"Add a meta: section that names your schemas. manni meta schemas lists the built-in ones.\",\n cite: \"Pin a sentence to its source with manni cite add.\",\n lint: \"Add a lint: section. manni lint templates lists the templates it can apply.\",\n docevals: \"Add a docevals: section, or declare evals in a page's frontmatter.\",\n term: \"Add a page with type: term to a collection.\",\n strategy: \"Add a page with type: journey to a collection.\",\n graph: \"Run manni graph init to add a starter graph: section.\",\n};\n\n/** Why every domain is not set up when the config declares no collections, and what to do. */\nexport const NO_COLLECTIONS = \"no collections: in manni.config.yaml\";\nexport const NO_COLLECTIONS_NEXT = \"Add a collections: entry that names your docs.\";\n\n/** Why `meta` skips files when `meta:` exists but covers none of them. */\nexport const META_DEFAULTS_ONLY = \"only the built-in default schemas cover these files\";\n\n/**\n * The domains `check` does not run here: why, and what to run instead.\n * tracevals leaves this list when `tracevals.runtime` exists (`Family.runtime`)\n * and `MANNI_TRACEVALS_HOOKS` is 1 (`tracevalsHooks`).\n */\nexport const NOT_CHECKED: ReadonlyArray<readonly [name: string, reason: string, next: string]> = [\n [\"a11y\", \"needs a running site and a browser\", \"Run manni site preview, then manni a11y check.\"],\n // Doc Detective runs the shell steps pages carry, so a hook never starts it.\n [\"test\", \"runs the pages' shell steps and synthetic users\", \"Run manni test procedures or manni test tasks.\"],\n [\n \"tracevals\",\n \"judges recorded sessions with a model\",\n \"Run manni tracevals run over sessions, or add tracevals.runtime to judge each turn.\",\n ],\n];\n\n/** The variable that turns the tracevals hooks on for one user. */\nconst TRACEVALS_HOOKS_ENV = \"MANNI_TRACEVALS_HOOKS\";\n\n/**\n * Whether tracevals acts under Claude Code hooks here: exactly `1`. Unset or\n * empty is off. Any other value is off too, and warns once, so a `true`\n * typed by hand does not pass for on.\n */\nexport function tracevalsHooks(env: Record<string, string | undefined> = process.env): boolean {\n const value = env[TRACEVALS_HOOKS_ENV] ?? \"\";\n if (value === \"1\") return true;\n if (value !== \"\") warn(`${TRACEVALS_HOOKS_ENV} is \"${value}\"; only 1 turns the tracevals hooks on.`);\n return false;\n}\n\n/** `1 page`, `2 pages`. */\nexport function plural(n: number, one: string, many = `${one}s`): string {\n return `${String(n)} ${n === 1 ? one : many}`;\n}\n\nexport interface Family {\n file: ConfigFile;\n /**\n * The config each domain core is handed, so every one reads this file\n * rather than discovering its own: as typed, or as discovery found it,\n * relative to `cwd`.\n */\n configPath: string;\n /** The top-level keys of the file: `meta`, `lint`, `graph`, … */\n sections: ReadonlySet<string>;\n /**\n * `tracevals.runtime` exists: tracevals judges each turn under the hooks,\n * where `tracevalsHooks` also holds.\n */\n runtime: boolean;\n collections: readonly CollectionConfig[];\n}\n\nfunction toError(message: string): FamilyError {\n return new FamilyError(message);\n}\n\nexport async function loadFamily(cwd: string, configPath?: string): Promise<Family> {\n const file =\n configPath === undefined\n ? await findFamilyConfigFile(cwd, toError)\n : await readFamilyConfigFile(configPath, cwd, toError);\n if (file === null) throw noConfigError(cwd);\n // Already parsed once by the loader, which would have thrown on bad YAML.\n const doc = parseYaml(file.text) as unknown;\n const top = record(doc);\n const sections = new Set(top === undefined ? [] : Object.keys(top));\n const tracevals = record(top?.tracevals);\n // The old `conformance` key counts too. tracevals' loader refuses it and\n // names `runtime`, and only a tracevals in play loads that config, so with\n // the hooks on a config not yet migrated reaches `status` as an error, not\n // as a silent skip. With them off nothing runs, so the old key costs nothing.\n const runtime = tracevals?.runtime !== undefined || tracevals?.conformance !== undefined;\n return { file, configPath: configPath ?? file.source, sections, runtime, collections: file.collections };\n}\n\nfunction record(value: unknown): Record<string, unknown> | undefined {\n return value !== null && typeof value === \"object\" && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : undefined;\n}\n\n/** A path as a label relative to `cwd`, posix, the way the domains print one. */\nexport function labelFrom(cwd: string, path: string): string {\n return relative(cwd, path).split(sep).join(\"/\");\n}\n\n/** The collections a file at `label` (relative to `cwd`) belongs to. */\nexport function collectionsOf(family: Family, cwd: string, label: string): string[] {\n return memberOf(family.collections, family.file.dir, cwd, label);\n}\n\n/** Every member of every collection, labelled from `cwd`. */\nexport async function listMembers(family: Family, cwd: string): Promise<string[]> {\n const dir = family.file.dir;\n const { files } = await resolveTargetSet({\n inputs: family.collections.flatMap((c) => c.paths),\n cwd: dir,\n allowEmpty: true,\n });\n return retainMembers(files, (label) => memberOf(family.collections, dir, dir, label)).map(\n (label) => labelFrom(cwd, resolve(dir, label)),\n );\n}\n","/**\n * `manni check`: every check the repository has set up, and nothing else.\n *\n * It owns no checks. Each one is a domain's own command core, run in process\n * with the family config handed to it, and each report is that domain's own\n * reporter's output. What this adds is the choice of what runs (`in-play.ts`),\n * the scope, and one verdict over all of it.\n *\n * Scope:\n *\n * - `all`: every in-play check over every collection, per-file and set-wide.\n * Each domain runs bare, exactly as its own CI step would.\n * - `paths`: the per-file checks on the collection members among the paths.\n * - `changed`: the per-file checks on the git working tree's changes, plus\n * `cite` and `strategy` set-wide. `term` runs set-wide too when a\n * collection document changed or was removed. `graph` never runs here;\n * only `all` checks it. A clean tree runs nothing.\n *\n * `cite` is per-file on paths and set-wide otherwise: a source edit can drift\n * any page's citation, so after a session the whole set is what is checked.\n * `strategy` never runs on paths, and runs on any change: a page's\n * `personas:` and `journeys:` mostly sit in its `{page}.meta.yaml`, which is\n * neither a document nor a collection member.\n */\nimport { basename, extname, resolve } from \"node:path\";\nimport pkg from \"../../../package.json\" with { type: \"json\" };\nimport { ToolError, errorMessage } from \"../../shared/errors.js\";\nimport { warn } from \"../../shared/warn.js\";\nimport { resolveTargetSet } from \"../../meta/internal.js\";\nimport { supportedExtensions } from \"../../meta/extractors/index.js\";\nimport type { TurnCheckInput, TurnCheckResult } from \"../../tracevals/commands/check.js\";\nimport { changedFiles } from \"../core/changed.js\";\nimport { sayOnce } from \"../core/said-once.js\";\nimport type { Envelope } from \"../core/envelope.js\";\nimport {\n COMMANDS,\n DOMAINS,\n META_DEFAULTS_ONLY,\n NOT_SET_UP,\n collectionsOf,\n labelFrom,\n listMembers,\n loadFamily,\n nothingSetUpError,\n plural,\n tracevalsHooks,\n type Domain,\n type Family,\n} from \"../core/in-play.js\";\nimport { withSharedWalks } from \"../../meta/core/load-files.js\";\nimport { FIX_SENTENCE } from \"./status.js\";\n\nexport const CHECK_FORMATS = [\"pretty\", \"json\", \"github\", \"sarif\"] as const;\nexport type CheckFormat = (typeof CHECK_FORMATS)[number];\n\nexport type Scope =\n | { kind: \"all\" }\n | { kind: \"paths\"; paths: string[] }\n | { kind: \"changed\" };\n\nexport interface FamilyCheckOptions {\n /** Where paths resolve and the domains run. Default `process.cwd()`. */\n cwd?: string;\n /** `-c, --config`. */\n configPath?: string;\n scope: Scope;\n /**\n * Leave out a named path that does not exist, rather than failing on it. A\n * hook names a file the edit may have just removed.\n */\n allowMissing?: boolean;\n /** Diagnostics: the outside-every-collection notice, and the domains' own. */\n onNotice?: (message: string) => void;\n}\n\n/** A check that ran. `render` is the domain's own reporter. */\nexport interface RanCheck {\n command: string;\n status: \"pass\" | \"fail\";\n render: (format: CheckFormat, color: boolean) => string;\n}\n\n/** A check that did not run: not in play, or it could not. */\nexport interface NotRunCheck {\n command: string;\n status: \"skipped\" | \"error\";\n message: string;\n}\n\nexport type CheckOutcome = RanCheck | NotRunCheck;\n\nexport interface FamilyCheckRun {\n status: \"pass\" | \"fail\";\n /** The collection members the per-file checks covered, labelled from `cwd`. */\n files: string[];\n checks: CheckOutcome[];\n}\n\ntype Outcome =\n | { skipped: string }\n | { failed: boolean; render: (format: CheckFormat, color: boolean) => string };\n\ninterface Context {\n family: Family;\n cwd: string;\n /** The per-file inputs, or `[]` for a bare run over the collections. */\n inputs: string[];\n onNotice: (message: string) => void;\n}\n\n/**\n * Each domain's command core and reporter are imported where it runs: a hook\n * checks one page with four domains, and the other two (the RDF stack among\n * them) are worth not loading.\n */\nasync function runDomain(domain: Domain, ctx: Context): Promise<Outcome> {\n const { family, cwd, inputs, onNotice } = ctx;\n const configPath = family.configPath;\n switch (domain) {\n case \"meta\": {\n const [{ runValidate }, { render: renderMeta }] = await Promise.all([\n import(\"../../meta/commands/validate.js\"),\n import(\"../../meta/reporters/index.js\"),\n ]);\n const run = await runValidate({ inputs, configPath, cwd, skipDefaultOnly: true, onNotice });\n if (run.results.length === 0) {\n return { skipped: family.sections.has(\"meta\") ? META_DEFAULTS_ONLY : NOT_SET_UP.meta };\n }\n return {\n failed: run.summary.failed > 0,\n render: (format, color) =>\n renderMeta(format, run.results, run.summary, { color, quiet: true, frame: run.frame, onNotice }),\n };\n }\n case \"cite\": {\n const [\n { runCheck: runCite },\n { renderCheckPretty: citePretty },\n { renderCheckJson: citeJson },\n { renderCheckGithub: citeGithub },\n { renderCheckSarif: citeSarif },\n ] = await Promise.all([\n import(\"../../cite/commands/check.js\"),\n import(\"../../cite/reporters/pretty.js\"),\n import(\"../../cite/reporters/json.js\"),\n import(\"../../cite/reporters/github.js\"),\n import(\"../../cite/reporters/sarif.js\"),\n ]);\n const run = await runCite({ inputs, configPath, cwd, onNotice });\n if (!run.pages.some((p) => p.citations.length > 0 || p.findings.length > 0)) {\n return { skipped: NOT_SET_UP.cite };\n }\n return {\n failed: run.summary.failed > 0,\n render: (format, color) => {\n switch (format) {\n case \"pretty\":\n return citePretty(run, { color, quiet: true });\n case \"json\":\n return citeJson(run);\n case \"github\":\n return citeGithub(run);\n case \"sarif\":\n return citeSarif(run, { onNotice });\n }\n },\n };\n }\n case \"lint\": {\n if (!family.sections.has(\"lint\")) return { skipped: NOT_SET_UP.lint };\n const [{ runLint }, { render: renderLint }] = await Promise.all([\n import(\"../../lint/commands/lint.js\"),\n import(\"../../lint/reporters/index.js\"),\n ]);\n const run = await runLint({ inputs, configPath, cwd, onNotice });\n return {\n failed: run.summary.failed > 0,\n // SARIF locations resolve from `root`, which is where the run's labels\n // start: the config's directory for a bare run, else the working one.\n render: (format, color) =>\n renderLint(run, format, { color, root: inputs.length === 0 ? resolve(cwd, family.file.dir) : cwd }),\n };\n }\n case \"docevals\": {\n const [{ runRun: runDocevals }, { render: renderDocevals }, { DocevalsError }] = await Promise.all([\n import(\"../../docevals/commands/run.js\"),\n import(\"../../docevals/reporters/index.js\"),\n import(\"../../docevals/types.js\"),\n ]);\n let report;\n try {\n report = await runDocevals(inputs, {\n config: configPath,\n cwd,\n deterministicOnly: true,\n generate: false,\n execution: false,\n toolVersion: pkg.version,\n });\n } catch (err) {\n if (err instanceof DocevalsError && err.code === \"nothing-resolved\") {\n return { skipped: NOT_SET_UP.docevals };\n }\n throw err;\n }\n return {\n failed: report.exitCode !== 0,\n render: (format, color) => renderDocevals(report, format, { color }),\n };\n }\n case \"term\": {\n const [\n { runCheck: runTerm },\n { renderFindingsPretty: termPretty },\n { renderFindingsJson: termJson },\n { renderFindingsGithub: termGithub },\n { renderFindingsSarif: termSarif },\n ] = await Promise.all([\n import(\"../../term/commands/check.js\"),\n import(\"../../term/reporters/pretty.js\"),\n import(\"../../term/reporters/json.js\"),\n import(\"../../term/reporters/github.js\"),\n import(\"../../term/reporters/sarif.js\"),\n ]);\n const report = await runTerm({ inputs, configPath, cwd, allowEmpty: true, onNotice });\n if (report.terms === 0) return { skipped: NOT_SET_UP.term };\n return {\n failed: report.summary.failed > 0,\n render: (format, color) => {\n switch (format) {\n case \"pretty\":\n return termPretty(report, { color, references: true });\n case \"json\":\n return termJson(report);\n case \"github\":\n return termGithub(report);\n case \"sarif\":\n return termSarif(report, { onNotice });\n }\n },\n };\n }\n case \"strategy\": {\n const [\n { runCheck: runStrategy },\n { renderFindingsPretty: strategyPretty },\n { renderFindingsJson: strategyJson },\n { renderFindingsGithub: strategyGithub },\n { renderFindingsSarif: strategySarif },\n ] = await Promise.all([\n import(\"../../strategy/commands/check.js\"),\n import(\"../../strategy/reporters/pretty.js\"),\n import(\"../../strategy/reporters/json.js\"),\n import(\"../../strategy/reporters/github.js\"),\n import(\"../../strategy/reporters/sarif.js\"),\n ]);\n const report = await runStrategy({ inputs, configPath, cwd, allowEmpty: true, onNotice });\n if (report.records === 0) return { skipped: NOT_SET_UP.strategy };\n return {\n failed: report.summary.failed > 0,\n render: (format, color) => {\n switch (format) {\n case \"pretty\":\n return strategyPretty(report, { color });\n case \"json\":\n return strategyJson(report);\n case \"github\":\n return strategyGithub(report);\n case \"sarif\":\n return strategySarif(report, { onNotice });\n }\n },\n };\n }\n case \"graph\": {\n if (!family.sections.has(\"graph\")) return { skipped: NOT_SET_UP.graph };\n const [{ buildGraph }, { runCheck: runGraph, renderCheck: renderGraph }] = await Promise.all([\n import(\"../../graph/commands/build.js\"),\n import(\"../../graph/commands/check.js\"),\n ]);\n const built = await buildGraph({ config: configPath, cwd });\n for (const warning of built.warnings) onNotice(warning);\n const report = await runGraph({ config: configPath, cwd, turtle: built.turtle });\n return {\n failed: report.exitCode !== 0,\n render: (format) => renderGraph(report, format),\n };\n }\n }\n}\n\nasync function outcome(domain: Domain, ctx: Context): Promise<CheckOutcome> {\n const command = COMMANDS[domain];\n try {\n const result = await runDomain(domain, ctx);\n if (\"skipped\" in result) return { command, status: \"skipped\", message: result.skipped };\n return { command, status: result.failed ? \"fail\" : \"pass\", render: result.render };\n } catch (err) {\n return { command, status: \"error\", message: errorMessage(err) };\n }\n}\n\n/** A hook or a git status names files by any extension; a walk keeps the documents. */\nfunction isDocument(label: string): boolean {\n return supportedExtensions().includes(extname(label).toLowerCase());\n}\n\n/** Every domain walks the same collections, so the run shares one walk per target set. */\nexport function runFamilyCheck(opts: FamilyCheckOptions): Promise<FamilyCheckRun> {\n return withSharedWalks(() => checkUnshared(opts));\n}\n\nasync function checkUnshared(opts: FamilyCheckOptions): Promise<FamilyCheckRun> {\n const cwd = resolve(opts.cwd ?? process.cwd());\n const onNotice = opts.onNotice ?? ((): void => undefined);\n const family = await loadFamily(cwd, opts.configPath);\n if (family.collections.length === 0) throw nothingSetUpError();\n const isMember = (label: string): boolean => collectionsOf(family, cwd, label).length > 0;\n\n let files: string[];\n let domains: Domain[];\n let inputs: string[];\n switch (opts.scope.kind) {\n case \"all\":\n files = await listMembers(family, cwd);\n inputs = [];\n domains = [...DOMAINS];\n break;\n case \"paths\": {\n const { files: named } = await resolveTargetSet({\n inputs: opts.scope.paths,\n cwd,\n ...(opts.allowMissing === true ? { allowEmpty: true } : {}),\n });\n const outside = named.filter((label) => !isMember(label));\n if (outside.length > 0) {\n onNotice(`Skipped ${plural(outside.length, \"file\")} outside every collection: ${outside.join(\", \")}`);\n }\n // A collection globbed wide holds assets too; only documents are checked.\n files = named.filter((label) => isMember(label) && isDocument(label));\n inputs = files;\n domains = files.length > 0 ? [\"meta\", \"cite\", \"lint\", \"docevals\"] : [];\n break;\n }\n case \"changed\": {\n const changed = await changedFiles(cwd);\n if (!changed.dirty) return { status: \"pass\", files: [], checks: [] };\n const memberDocuments = (paths: string[]): string[] =>\n paths.map((path) => labelFrom(cwd, path)).filter((l) => isDocument(l) && isMember(l));\n files = memberDocuments(changed.files);\n inputs = files;\n // term reads only collection documents, so a session that changed or\n // removed none of them leaves the glossary as it was. graph never runs\n // here: it is the slowest set-wide check, and its findings span pages\n // rather than the one an agent just wrote, so a bare run (CI) owns it.\n // strategy runs on any change, as cite does: a sidecar edit alone can\n // move a page's personas: or journeys:.\n const pageChanged = files.length > 0 || memberDocuments(changed.removed).length > 0;\n domains = [\n ...(files.length > 0 ? ([\"meta\", \"lint\", \"docevals\"] as const) : []),\n \"cite\",\n ...(pageChanged ? ([\"term\"] as const) : []),\n \"strategy\",\n ];\n break;\n }\n }\n\n const checks: CheckOutcome[] = [];\n for (const domain of domains) {\n // The set-wide checks run bare, over every collection, whatever the scope.\n const setWide =\n domain === \"term\" ||\n domain === \"strategy\" ||\n domain === \"graph\" ||\n (domain === \"cite\" && opts.scope.kind !== \"paths\");\n checks.push(await outcome(domain, { family, cwd, inputs: setWide ? [] : inputs, onNotice }));\n }\n if (opts.scope.kind === \"all\" && checks.every((c) => c.status === \"skipped\")) {\n throw nothingSetUpError();\n }\n return { status: checks.some((c) => c.status === \"fail\") ? \"fail\" : \"pass\", files, checks };\n}\n\n/** The exit code a run by hand ends with: 2 when a check could not run. */\nexport function exitCodeFor(run: FamilyCheckRun): 0 | 1 | 2 {\n if (run.checks.some((c) => c.status === \"error\")) return 2;\n return run.status === \"fail\" ? 1 : 0;\n}\n\nfunction isRan(check: CheckOutcome): check is RanCheck {\n return check.status === \"pass\" || check.status === \"fail\";\n}\n\n/** The first line of a message, for a one-line context. */\nfunction firstLine(message: string): string {\n return message.split(\"\\n\", 1)[0] ?? \"\";\n}\n\n/**\n * What an agent is told when a check could not run. The cause is the\n * config owner's to fix, so the agent reports it rather than editing config.\n */\nfunction couldNotCheck(command: string, files: string, message: string): string {\n return (\n `manni ${command} could not check ${files}. The cause is in manni's setup, not in the file. ` +\n `Tell the user what it says, and leave manni.config.yaml as it is.\\n${message}`\n );\n}\n\n/** What an agent is handed when a hook blocks: the failing checks' reports, nothing else. */\nfunction renderFailures(run: FamilyCheckRun): string {\n return run.checks\n .filter((c): c is RanCheck => c.status === \"fail\")\n .map((c) => `${c.command}\\n${c.render(\"pretty\", false)}`)\n .join(\"\\n\\n\");\n}\n\nexport function renderPretty(run: FamilyCheckRun, color: boolean): string {\n const blocks: string[] = [];\n for (const check of run.checks) {\n if (isRan(check)) blocks.push(`${check.command}\\n${check.render(\"pretty\", color)}`);\n }\n const notRun = run.checks.filter((c): c is NotRunCheck => !isRan(c));\n if (notRun.length > 0) {\n const width = Math.max(...notRun.map((c) => c.command.length)) + 3;\n blocks.push(\n notRun\n .map((c) => `${c.status.padEnd(9)}${c.command.padEnd(width)}${firstLine(c.message)}`)\n .join(\"\\n\"),\n );\n }\n const count = (status: CheckOutcome[\"status\"]): number =>\n run.checks.filter((c) => c.status === status).length;\n const errors = count(\"error\");\n blocks.push(\n `${plural(run.checks.length, \"check\")} over ${plural(run.files.length, \"file\")}: ` +\n `${String(count(\"fail\"))} failed, ${String(count(\"skipped\"))} skipped` +\n (errors > 0 ? `, ${String(errors)} could not run` : \"\"),\n );\n return blocks.join(\"\\n\\n\");\n}\n\n/** A check's JSON entry: its own report, or why there is none. */\nfunction jsonEntry(c: CheckOutcome): object {\n if (!isRan(c)) return { command: c.command, status: c.status, message: c.message };\n try {\n return { command: c.command, status: c.status, report: JSON.parse(c.render(\"json\", false)) as unknown };\n } catch {\n // One reporter's bad output must not take the other checks' reports with it.\n // `error` on purpose, whatever the run's own status: with no report to\n // embed, a `pass` or `fail` here would be a verdict nobody can inspect.\n // The reference documents `error` for this case too.\n return { command: c.command, status: \"error\", message: `${c.command} -f json printed output that is not JSON` };\n }\n}\n\nexport function renderJson(run: FamilyCheckRun): string {\n return JSON.stringify(\n {\n status: run.status,\n files: run.files,\n checks: run.checks.map(jsonEntry),\n },\n null,\n 2,\n );\n}\n\nexport function renderGithub(run: FamilyCheckRun): string {\n return run.checks\n .filter(isRan)\n .map((c) => c.render(\"github\", false))\n .filter((text) => text.length > 0)\n .join(\"\\n\");\n}\n\ninterface SarifRun {\n automationDetails?: { id: string };\n invocations?: unknown[];\n [key: string]: unknown;\n}\n\ninterface SarifNotification {\n level: \"note\" | \"error\";\n message: { text: string };\n}\n\n/**\n * One SARIF 2.1.0 log for the whole run. Each check that ran contributes its\n * domain's own runs, each under the category `manni/<domain>/`: meta, cite,\n * term and strategy share the driver `manni`, so the category is what tells\n * them apart.\n * A last `manni-check` run, with no results, names the checks that were\n * skipped or could not run. A check that could not run gets no run of its\n * own: an empty run would tell code scanning every open alert in its\n * category is fixed.\n */\nexport function renderSarif(run: FamilyCheckRun): string {\n const runs: SarifRun[] = [];\n const notifications: SarifNotification[] = [];\n const say = (level: SarifNotification[\"level\"], text: string): void => {\n notifications.push({ level, message: { text } });\n };\n for (const c of run.checks) {\n if (!isRan(c)) {\n if (c.status === \"skipped\") say(\"note\", `${c.command} skipped: ${c.message}.`);\n else say(\"error\", `${c.command} could not run: ${c.message}`);\n continue;\n }\n const domain = c.command.split(\" \", 1)[0] ?? c.command;\n let own: SarifRun[];\n try {\n // Parsed output is untrusted: `runs` may be missing or not an array. An\n // empty `runs` would drop the domain from the log without a word, so it\n // counts as bad output too.\n const runs = (JSON.parse(c.render(\"sarif\", false)) as { runs?: unknown }).runs;\n if (!Array.isArray(runs) || runs.length === 0) throw new TypeError(\"no runs\");\n own = runs as SarifRun[];\n } catch {\n // As in JSON: one reporter's bad output must not take the others with it.\n say(\"error\", `${c.command} -f sarif printed output that is not SARIF.`);\n continue;\n }\n for (const r of own) {\n runs.push({\n ...r,\n automationDetails: { id: `manni/${domain}/` },\n invocations: r.invocations ?? [{ executionSuccessful: true }],\n });\n }\n }\n runs.push({\n tool: {\n driver: {\n name: \"manni-check\",\n version: pkg.version,\n informationUri: \"https://hawkeyexl.github.io/manni/family/reference/cli/\",\n },\n },\n automationDetails: { id: \"manni/check/\" },\n invocations: [\n {\n executionSuccessful: !notifications.some((n) => n.level === \"error\"),\n ...(notifications.length > 0 ? { toolExecutionNotifications: notifications } : {}),\n },\n ],\n results: [],\n });\n return JSON.stringify(\n { $schema: \"https://json.schemastore.org/sarif-2.1.0.json\", version: \"2.1.0\", runs },\n null,\n 2,\n );\n}\n\nexport function render(run: FamilyCheckRun, format: CheckFormat, color: boolean): string {\n switch (format) {\n case \"pretty\":\n return renderPretty(run, color);\n case \"json\":\n return renderJson(run);\n case \"github\":\n return renderGithub(run);\n case \"sarif\":\n return renderSarif(run);\n }\n}\n\n/** What a hook command ends with: its exit code, and what it prints where. */\nexport interface HookReply {\n exitCode: 0 | 2;\n stdout?: string;\n stderr?: string;\n}\n\n/** The PostToolUse tools whose edit `check` answers. */\nexport const EDIT_TOOLS: readonly string[] = [\"Edit\", \"Write\", \"MultiEdit\", \"NotebookEdit\"];\n\n/**\n * The hook protocol's answer to a run. Never exit 2 for a check that could\n * not run: 2 means \"block\" to Claude Code, and an operational error is not\n * the agent's to fix.\n */\nexport function hookReply(run: FamilyCheckRun, envelope: Envelope): HookReply {\n const failed = run.status === \"fail\";\n if (envelope.event === \"PostToolUse\") {\n const files = run.files.join(\", \");\n if (failed) {\n return {\n exitCode: 2,\n stderr: `manni found errors in ${files}. Fix them before you continue. ${FIX_SENTENCE}\\n\\n${renderFailures(run)}\\n`,\n };\n }\n const errors = run.checks.filter((c): c is NotRunCheck => c.status === \"error\");\n if (errors.length === 0) return { exitCode: 0 };\n const additionalContext = errors.map((c) => couldNotCheck(c.command, files, c.message)).join(\"\\n\");\n return {\n exitCode: 0,\n stdout: `${JSON.stringify({ hookSpecificOutput: { hookEventName: \"PostToolUse\", additionalContext } })}\\n`,\n };\n }\n if (envelope.event === \"Stop\") return turnReply(run, undefined, envelope);\n return { exitCode: 0 };\n}\n\n/** What tracevals found in the turn a Stop or SubagentStop ended, for the reply. */\nexport interface TurnVerdict {\n /** Rules broken with a confident verdict: how many, the report, the trace judged. */\n broken?: { rules: number; report: string; trace: string };\n /** A skip not yet said this session. */\n skipMessage?: string;\n}\n\n/**\n * The reply to a Stop or a SubagentStop: 0078's file checks first, then the\n * turn. One block carries both reasons; after the repair pass, one message\n * carries both sentences. Always exit 0, as 0078's Stop is.\n */\nexport function turnReply(\n run: FamilyCheckRun | undefined,\n turn: TurnVerdict | undefined,\n envelope: Envelope,\n): HookReply {\n const reasons: string[] = [];\n const messages: string[] = [];\n if (run?.status === \"fail\") {\n if (envelope.stopHookActive) {\n messages.push(\"manni still reports errors after one repair pass. Run manni check to see them.\");\n } else {\n reasons.push(\n `manni found errors in the files you changed. Fix them, then finish. ${FIX_SENTENCE}\\n\\n${renderFailures(run)}`,\n );\n }\n }\n if (turn?.broken !== undefined) {\n const { rules, report, trace } = turn.broken;\n if (envelope.stopHookActive) {\n messages.push(\n `tracevals still finds broken rules after one repair pass. Run manni tracevals check ${trace} to see them.`,\n );\n } else {\n reasons.push(\n `This turn broke ${plural(rules, \"rule\")} from the files and requests that governed it. ` +\n `Fix the work, or say why the rule does not apply here, then finish.\\n\\n${report}`,\n );\n }\n }\n if (turn?.skipMessage !== undefined) messages.push(turn.skipMessage);\n if (reasons.length === 0 && messages.length === 0) return { exitCode: 0 };\n const reply = {\n ...(reasons.length > 0 ? { decision: \"block\", reason: reasons.join(\"\\n\\n\") } : {}),\n ...(messages.length > 0 ? { systemMessage: messages.join(\" \") } : {}),\n };\n return { exitCode: 0, stdout: `${JSON.stringify(reply)}\\n` };\n}\n\n/** Test seams `checkTurn` takes; production builds each from config. */\nexport type TurnSeams = Partial<Pick<TurnCheckInput, \"judge\" | \"extractor\" | \"localModels\" | \"env\">>;\n\n/**\n * Judge the turn a Stop or SubagentStop ended, with every gate of proposal\n * 0079. Silent (`undefined`) when the hooks are off (`MANNI_TRACEVALS_HOOKS`\n * is not 1) or tracevals is not in play, the turn is clean\n * or only needs review, a skip was already said this session, or the run\n * could not happen: an operational failure is not the agent's to fix.\n */\nexport async function runTurnCheck(\n envelope: Envelope,\n cwd: string,\n seams: TurnSeams = {},\n): Promise<TurnVerdict | undefined> {\n // Off unless this user turned it on: nothing loads and no transcript is read.\n if (!tracevalsHooks(seams.env)) return undefined;\n const subagent = envelope.event === \"SubagentStop\";\n const judged = subagent ? envelope.agentTranscriptPath : envelope.transcriptPath;\n if (judged === undefined) return undefined;\n const trace = resolve(cwd, judged);\n const sessionId = envelope.sessionId ?? basename(trace, \".jsonl\");\n let result: TurnCheckResult;\n let renderTurn: (typeof import(\"../../tracevals/reporters/runtime.js\"))[\"renderCheck\"];\n try {\n // Loaded here, as every domain is, so a run that never judges a turn never\n // loads tracevals.\n const [{ checkTurn }, reporters] = await Promise.all([\n import(\"../../tracevals/commands/check.js\"),\n import(\"../../tracevals/reporters/runtime.js\"),\n ]);\n renderTurn = reporters.renderCheck;\n result = await checkTurn({\n transcriptPath: resolve(cwd, envelope.transcriptPath ?? judged),\n ...(subagent ? { agentTranscriptPath: trace } : {}),\n ...(subagent && envelope.agentId !== undefined ? { agentId: envelope.agentId } : {}),\n ...(subagent && envelope.agentType !== undefined ? { agentType: envelope.agentType } : {}),\n ...(envelope.lastAssistantMessage !== undefined\n ? { lastAssistantMessage: envelope.lastAssistantMessage }\n : {}),\n sessionId,\n cwd,\n inLoop: true,\n ...seams,\n });\n } catch (err) {\n // An operational failure is not the agent's to fix, so it stays silent, as\n // 0078's Stop failures do. Anything else is a bug: say so on stderr, which\n // a hook that exits 0 sends to the debug log, and still never block.\n if (!(err instanceof ToolError)) warn(`the turn check failed unexpectedly: ${errorMessage(err)}`);\n return undefined;\n }\n const { skipped } = result;\n if (skipped?.message !== undefined) {\n return sayOnce(cwd, sessionId, skipped.gate) ? { skipMessage: skipped.message } : undefined;\n }\n if (result.exitCode !== 1 || result.report === undefined) return undefined;\n return {\n broken: {\n rules: result.report.summary.fail,\n report: renderTurn(result.report, { color: false }),\n trace: judged,\n },\n };\n}\n\n/** The reply when the run itself could not happen, under a hook. */\nexport function hookFailure(message: string, envelope: Envelope, file: string | undefined): HookReply {\n if (envelope.event !== \"PostToolUse\" || file === undefined) return { exitCode: 0 };\n const additionalContext = couldNotCheck(\"check\", file, message);\n return {\n exitCode: 0,\n stdout: `${JSON.stringify({ hookSpecificOutput: { hookEventName: \"PostToolUse\", additionalContext } })}\\n`,\n };\n}\n","/**\n * The files a session changed: the git working tree against `HEAD`.\n *\n * Modified, added, renamed (by the new name) and untracked files, staged or\n * not. A deleted file, or a renamed one's old name, is named apart, since\n * there is nothing left to check. Paths come back absolute, resolved from\n * `cwd`: porcelain status names them from the repository root whatever\n * directory git ran in.\n */\nimport { execFile } from \"node:child_process\";\nimport { posix, resolve } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nconst run = promisify(execFile);\n\nasync function git(args: string[], cwd: string): Promise<string> {\n // shell:false: nothing here is ever parsed as shell syntax.\n const { stdout } = await run(\"git\", args, {\n cwd,\n shell: false,\n windowsHide: true,\n maxBuffer: 64 * 1024 * 1024,\n });\n return stdout;\n}\n\n/** Parse `git status --porcelain=v1 -z` into repository-relative paths. */\nexport function parsePorcelain(output: string): { files: string[]; removed: string[] } {\n const fields = output.split(\"\\0\");\n const files: string[] = [];\n const removed: string[] = [];\n for (let i = 0; i < fields.length; i++) {\n const entry = fields[i] ?? \"\";\n if (entry.length < 4) continue;\n const xy = entry.slice(0, 2);\n const path = entry.slice(3);\n // A rename or copy is followed by its old name, which is not a change to\n // check. A rename's old name is gone; a copy's is still there.\n if (xy.includes(\"R\") || xy.includes(\"C\")) {\n i++;\n if (xy.includes(\"R\")) removed.push(fields[i] ?? \"\");\n }\n // `RD`, a staged rename then deleted in the tree, removes both names:\n // the old one above and the new one here. Two files, not one twice.\n if (xy.includes(\"D\")) removed.push(path);\n else files.push(path);\n }\n return { files, removed };\n}\n\nexport interface ChangedTree {\n /** The changed files left to check, absolute. */\n files: string[];\n /** The files the tree no longer has: deleted, or renamed away. Absolute. */\n removed: string[];\n /**\n * Whether the tree differs from `HEAD` at all. A deletion alone leaves no\n * file to check, but it can still break a citation to what it removed.\n */\n dirty: boolean;\n}\n\nexport async function changedFiles(cwd: string): Promise<ChangedTree> {\n // Rebased through `cwd`'s own prefix rather than resolved from the\n // top-level git prints: on Windows that is the long spelling of a path the\n // caller may hold in its 8.3 short form, and the two would never compare.\n const prefix = (await git([\"rev-parse\", \"--show-prefix\"], cwd)).trim();\n const status = await git(\n [\"status\", \"--porcelain=v1\", \"-z\", \"--untracked-files=all\"],\n cwd,\n );\n const { files, removed } = parsePorcelain(status);\n const absolute = (path: string): string => resolve(cwd, posix.relative(prefix, path));\n return { files: files.map(absolute), removed: removed.map(absolute), dirty: status.length > 0 };\n}\n","/**\n * What a hook has already told the user this session (proposal 0079: \"A skip\n * message is said once per session\").\n *\n * Each hook is a process of its own, and parallel subagents end in parallel\n * SubagentStop hooks, so the memory is one marker file per message, created\n * exclusively. The process whose create succeeds is the one that says it, so\n * no two hooks can both read \"not said yet\".\n */\nimport { mkdirSync, writeFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\nimport { DEFAULT_CAPTURE_DIR } from \"../../tracevals/capture/types.js\";\nimport { idHash } from \"../../tracevals/rules/ledger.js\";\n\n/**\n * `<project>/.manni/tracevals/sessions/<session hash>.<key>.said`. The session\n * id is hashed, so nothing in it can climb out of the directory and two ids\n * never share a marker. The key is a gate name, which is already safe.\n */\nexport function saidPath(projectDir: string, sessionId: string, key: string): string {\n return join(projectDir, DEFAULT_CAPTURE_DIR, `${idHash(sessionId)}.${key}.said`);\n}\n\n/**\n * True the first time `key` comes up in a session, and records it. A marker\n * that cannot be written says the message rather than lose it.\n */\nexport function sayOnce(projectDir: string, sessionId: string, key: string): boolean {\n const path = saidPath(projectDir, sessionId, key);\n try {\n mkdirSync(dirname(path), { recursive: true });\n writeFileSync(path, \"\", { flag: \"wx\" });\n return true;\n } catch (err) {\n // EEXIST: another hook said it first. Anything else is an unwritable\n // project, which repeats the message each stop rather than lose it.\n return (err as NodeJS.ErrnoException).code !== \"EEXIST\";\n }\n}\n","/**\n * `manni status`: what is set up here, and so what `manni check` runs.\n *\n * It reads the same table `check` does (`in-play.ts`), counting what the\n * content declares where a domain is in play by declaration: the pages that\n * name their own `$schema`, carry citations or resolve evals, the terms, and\n * the strategy records.\n * It checks nothing, so it exits 0 whatever it finds.\n */\nimport { appendFileSync, existsSync, readFileSync } from \"node:fs\";\nimport { extname, resolve } from \"node:path\";\nimport pkg from \"../../../package.json\" with { type: \"json\" };\nimport { errorMessage } from \"../../shared/errors.js\";\nimport { extractorForExtension } from \"../../meta/extractors/index.js\";\nimport type { HostStatus } from \"../../tracevals/rules/host.js\";\nimport type { Envelope } from \"../core/envelope.js\";\nimport {\n COMMANDS,\n DOMAINS,\n NEXT,\n NOT_CHECKED,\n NOT_SET_UP,\n NO_COLLECTIONS,\n NO_COLLECTIONS_NEXT,\n collectionsOf,\n listMembers,\n loadFamily,\n plural,\n tracevalsHooks,\n type Domain,\n type Family,\n} from \"../core/in-play.js\";\nimport { withSharedWalks } from \"../../meta/core/load-files.js\";\n\nexport const STATUS_FORMATS = [\"pretty\", \"json\"] as const;\nexport type StatusFormat = (typeof STATUS_FORMATS)[number];\n\nexport type DomainState = \"in-play\" | \"not-set-up\" | \"not-checked\" | \"unknown\";\n\nexport interface ModelRole {\n provider: string;\n model: string;\n}\n\nexport interface DomainRow {\n name: string;\n status: DomainState;\n reason: string;\n /** What to do about it. Absent on an `in-play` row. */\n next?: string;\n /** tracevals in play: the model judging inside a hook, and the one extracting rules. */\n models?: { hook: ModelRole; extraction: ModelRole };\n /** tracevals in play with a model host running: each model it holds. */\n host?: HostStatus[\"models\"];\n}\n\nexport interface StatusReport {\n version: string;\n /** The config file, as discovery found it or as it was typed. */\n config: string;\n collections: { name: string; files: number }[];\n domains: DomainRow[];\n}\n\nexport interface StatusOptions {\n cwd?: string;\n configPath?: string;\n /** Test seam: the running model host. Default: ask the inference library. */\n hostStatus?: () => Promise<HostStatus | null>;\n /** Test seam: the environment `MANNI_TRACEVALS_HOOKS` is read from. Default: `process.env`. */\n env?: Record<string, string | undefined>;\n}\n\n/** tracevals' row when `tracevals.runtime` exists and the hooks are off. */\nconst TURNED_OFF: DomainRow = {\n name: \"tracevals\",\n status: \"not-checked\",\n reason: \"runtime evals are set up, and turned off here\",\n next: \"Turn on the manni plugin's tracevals option, or set MANNI_TRACEVALS_HOOKS=1.\",\n};\n\n/**\n * tracevals' row when `tracevals.runtime` exists and the hooks are on: both models, resolved\n * the way `check` and `prepare` resolve them, and the host when one runs.\n */\nasync function tracevalsRow(cwd: string, opts: StatusOptions): Promise<DomainRow> {\n try {\n const [\n { discoverConfig },\n { assertProviderSelection, resolveSelectionIdentity, selectHookProvider, selectProvider },\n { hostStatus },\n ] = await Promise.all([\n import(\"../../tracevals/core/config.js\"),\n import(\"../../tracevals/judge/provider.js\"),\n import(\"../../tracevals/rules/host.js\"),\n ]);\n const { config } = await discoverConfig(cwd, opts.configPath === undefined ? {} : { configPath: opts.configPath });\n const hook = await resolveSelectionIdentity(config, selectHookProvider(config));\n const selection = selectProvider(config);\n assertProviderSelection(selection);\n const extraction = await resolveSelectionIdentity(config, selection);\n const host = await (opts.hostStatus ?? hostStatus)().catch(() => null);\n return {\n name: \"tracevals\",\n status: \"in-play\",\n reason: `hook: ${hook.provider} ${hook.model} · extraction: ${extraction.provider} ${extraction.model}`,\n models: {\n hook: { provider: hook.provider, model: hook.model },\n extraction: { provider: extraction.provider, model: extraction.model },\n },\n ...(host === null || host.models.length === 0 ? {} : { host: host.models }),\n };\n } catch (err) {\n const message = errorMessage(err).split(\"\\n\", 1)[0] ?? \"\";\n // `tracevals check` needs a trace, so running it again is no way to see more.\n return {\n name: \"tracevals\",\n status: \"unknown\",\n reason: `manni tracevals check could not run: ${message}`,\n next: \"Fix what the reason names, then run manni status again.\",\n };\n }\n}\n\n/** `1 page names`, `3 pages name`: a count and the verb that agrees with it. */\nfunction pages(n: number, one: string, many: string): string {\n return n === 1 ? `1 page ${one}` : `${String(n)} pages ${many}`;\n}\n\n/** The pages naming their own `$schema`, read the way `meta validate` extracts them. */\nfunction ownSchemaCount(cwd: string, members: readonly string[]): number {\n let n = 0;\n for (const label of members) {\n const extractor = extractorForExtension(extname(label));\n if (extractor === undefined) continue;\n try {\n const { data } = extractor.extract(readFileSync(resolve(cwd, label), \"utf8\"), label);\n if (data.$schema !== undefined) n++;\n } catch {\n // A page that does not parse names nothing; `meta validate` reports it.\n }\n }\n return n;\n}\n\n/**\n * The pages carrying citations, read the way `cite check` reads them: its\n * targets, its manifests, its entry rules. Nothing is classified, so no claim\n * or source is looked at and no git history is read.\n */\nasync function citedPages(cwd: string, configPath: string): Promise<number> {\n // Imported where they run, so `manni check` never loads them.\n const { prepareRun, readTarget } = await import(\"../../cite/commands/check.js\");\n const { readPage } = await import(\"../../cite/core/page.js\");\n const prepared = await prepareRun({ inputs: [], configPath, cwd, checkSources: false }, \"checked\", \"check\");\n let n = 0;\n for (const file of prepared.files) {\n const content = await readTarget(prepared.run, file);\n const { citations } = (await prepared.setupFor(file, content)).options;\n const read = readPage(file, content, { markers: false, ...(citations === undefined ? {} : { citations }) });\n if (read.citations.length > 0) n++;\n }\n return n;\n}\n\nasync function row(domain: Domain, family: Family, cwd: string, members: readonly string[]): Promise<DomainRow> {\n const configPath = family.configPath;\n const inPlay = (reason: string): DomainRow => ({ name: domain, status: \"in-play\", reason });\n const notSetUp: DomainRow = { name: domain, status: \"not-set-up\", reason: NOT_SET_UP[domain], next: NEXT[domain] };\n const section = family.sections.has(domain);\n switch (domain) {\n case \"meta\": {\n if (section) return inPlay(\"meta: section\");\n const n = ownSchemaCount(cwd, members);\n return n > 0 ? inPlay(pages(n, \"names its own $schema\", \"name their own $schema\")) : notSetUp;\n }\n case \"cite\": {\n const n = await citedPages(cwd, configPath);\n return n > 0 ? inPlay(pages(n, \"carries citations\", \"carry citations\")) : notSetUp;\n }\n case \"docevals\": {\n const { runList: listEvals } = await import(\"../../docevals/commands/list.js\");\n const { plans } = await listEvals([], { config: configPath, cwd });\n const n = plans.filter((p) => !p.skip && p.evals.length > 0).length;\n if (n === 0) return notSetUp;\n return inPlay(section ? \"docevals: section\" : pages(n, \"declares evals\", \"declare evals\"));\n }\n case \"term\": {\n const { runList: listTerms } = await import(\"../../term/commands/list.js\");\n const { terms } = await listTerms({ inputs: [], configPath, cwd, allowEmpty: true });\n return terms.length > 0 ? inPlay(plural(terms.length, \"term\")) : notSetUp;\n }\n case \"strategy\": {\n const [{ runList: listStrategy }, { countsLine }] = await Promise.all([\n import(\"../../strategy/commands/list.js\"),\n import(\"../../strategy/reporters/pretty.js\"),\n ]);\n const { set } = await listStrategy({ inputs: [], configPath, cwd, allowEmpty: true });\n return set.records.length > 0 ? inPlay(countsLine(set.records)) : notSetUp;\n }\n case \"lint\":\n case \"graph\":\n return section ? inPlay(`${domain}: section`) : notSetUp;\n }\n}\n\n/** Every domain walks the same collections, so the run shares one walk per target set. */\nexport function runStatus(opts: StatusOptions = {}): Promise<StatusReport> {\n return withSharedWalks(() => statusUnshared(opts));\n}\n\nasync function statusUnshared(opts: StatusOptions): Promise<StatusReport> {\n const cwd = resolve(opts.cwd ?? process.cwd());\n const family = await loadFamily(cwd, opts.configPath);\n const members = family.collections.length === 0 ? [] : await listMembers(family, cwd);\n const domains: DomainRow[] = [];\n for (const domain of DOMAINS) {\n // `check` only reads collection members, so with no collections every\n // domain has nothing to check, whatever sections the config carries.\n if (family.collections.length === 0) {\n domains.push({ name: domain, status: \"not-set-up\", reason: NO_COLLECTIONS, next: NO_COLLECTIONS_NEXT });\n continue;\n }\n try {\n domains.push(await row(domain, family, cwd, members));\n } catch (err) {\n // Status checks nothing, so a domain that cannot read its own setup is\n // reported in its row rather than ending the run, as unknown: whether it is\n // set up is the thing it could not read.\n const message = errorMessage(err).split(\"\\n\", 1)[0] ?? \"\";\n domains.push({\n name: domain,\n status: \"unknown\",\n reason: `manni ${COMMANDS[domain]} could not run: ${message}`,\n next: `Run manni ${COMMANDS[domain]} to see the whole error.`,\n });\n }\n }\n for (const [name, reason, next] of NOT_CHECKED) {\n if (name === \"tracevals\" && family.runtime) {\n domains.push(tracevalsHooks(opts.env) ? await tracevalsRow(cwd, opts) : { ...TURNED_OFF });\n continue;\n }\n domains.push({ name, status: \"not-checked\", reason, next });\n }\n return {\n version: pkg.version,\n config: family.file.source,\n collections: family.collections.map((c) => ({\n name: c.name,\n files: members.filter((label) => collectionsOf(family, cwd, label).includes(c.name)).length,\n })),\n domains,\n };\n}\n\nconst STATE_LABEL: Readonly<Record<DomainState, string>> = {\n \"in-play\": \"in play\",\n \"not-set-up\": \"not set up\",\n \"not-checked\": \"not checked\",\n unknown: \"unknown\",\n};\n\nexport interface RenderStatusOptions {\n /** Print each row's next step. Default true; the SessionStart briefing turns it off. */\n next?: boolean;\n}\n\nexport function renderStatus(report: StatusReport, format: StatusFormat, opts: RenderStatusOptions = {}): string {\n if (format === \"json\") return JSON.stringify(report, null, 2);\n const head = [\n `manni ${report.version}`,\n `config ${report.config}`,\n ...report.collections.map((c) => `collection ${c.name} (${plural(c.files, \"file\")})`),\n ].join(\" \");\n // tracevals in play judges each turn, which is what its row says.\n const label = (d: DomainRow): string => (d.models !== undefined ? \"judges each turn\" : STATE_LABEL[d.status]);\n const width = Math.max(14, ...report.domains.map((d) => label(d).length + 3));\n const indent = \"\".padEnd(11 + width);\n const rows = report.domains.flatMap((d, i) => [\n `${d.name.padEnd(11)}${label(d).padEnd(width)}${d.reason}`,\n ...(d.host ?? []).map(\n (m) =>\n `${\"\".padEnd(11)}${\"model host\".padEnd(width)}${m.model} loaded, ${plural(m.sessions, \"session\")}, ` +\n `idle ${String(Math.floor(m.idleMs / 60_000))}m`,\n ),\n // A next step a run of rows shares is said once, under the last of them.\n ...(opts.next !== false && d.next !== undefined && report.domains[i + 1]?.next !== d.next\n ? [`${indent}${d.next}`]\n : []),\n ]);\n return [head, \"\", ...rows].join(\"\\n\");\n}\n\n/**\n * The plugin skill the briefing points an agent at, as `<plugin>:<skill>`.\n * `test/plugin.test.ts` checks both halves against `plugin/manni`.\n */\nexport const FIX_SKILL = \"manni:fix\";\n\n/** The sentence the briefing and every hook block end on. */\nexport const FIX_SENTENCE = `The ${FIX_SKILL} skill says how to repair each finding.`;\n\n/** The briefing's line when strategy is in play, which means a record exists. */\nconst STRATEGY_SENTENCE =\n \"Pages name their readers and jobs in audiences:, personas: and journeys:. Write each page for the ones it names; manni strategy list prints every record.\";\n\n/** The set-wide checks a stop runs whenever the tree changed, as the briefing names them. */\nconst TREE_WIDE: ReadonlyArray<readonly [Domain, string]> = [\n // A source edit can drift any citation.\n [\"cite\", \"every citation\"],\n // A sidecar edit alone can move a page's personas: or journeys:.\n [\"strategy\", \"the content strategy\"],\n];\n\n/** The set-wide checks a stop runs when a collection document changed, as the briefing names them. */\nconst PAGE_WIDE: ReadonlyArray<readonly [Domain, string]> = [[\"term\", \"the glossary\"]];\n\n/** `a`, `a or b`, `a, b or c`: a list in prose, joined by `conjunction`. */\nfunction prose(items: readonly string[], conjunction: string): string {\n return items.length <= 1\n ? (items[0] ?? \"\")\n : `${items.slice(0, -1).join(\", \")} ${conjunction} ${items.at(-1) ?? \"\"}`;\n}\n\n/** What an agent is told at the start of a session, after the table. */\nexport function agentLines(report: StatusReport): string {\n const names = prose(report.collections.map((c) => c.name), \"or\");\n const inPlay = new Set(report.domains.filter((d) => d.status === \"in-play\").map((d) => d.name));\n const treeWide = TREE_WIDE.filter(([domain]) => inPlay.has(domain)).map(([, what]) => what);\n const plus = treeWide.length === 0 ? \"\" : `, plus ${prose(treeWide, \"and\")}`;\n const pageWide = PAGE_WIDE.filter(([domain]) => inPlay.has(domain)).map(([, what]) => what);\n const also = pageWide.length === 0 ? \"\" : ` It checks ${prose(pageWide, \"and\")} too when you changed a page.`;\n return [\n `After you edit a file in ${names}, manni check runs on it, and errors come back to you at once.`,\n `Before you finish, manni check runs on every file you changed${plus}.${also} You get one repair pass.`,\n // A Write of a new page has no Read, so the briefing is what reaches it.\n ...(inPlay.has(\"strategy\") ? [STRATEGY_SENTENCE] : []),\n FIX_SENTENCE,\n ].join(\"\\n\");\n}\n\n/** A model id as Claude Code spells one, and nothing a shell would read as more. */\nconst MODEL_ID = /^[A-Za-z0-9._:/@-]+$/;\n\n/**\n * Append `export MANNI_GENERATED_BY=<model>` to `$CLAUDE_ENV_FILE`, so every\n * command the session runs records which model wrote what. Only when the\n * envelope names the model, the file is offered, and nobody set the variable.\n */\nexport function exportGeneratedBy(envelope: Envelope, env: NodeJS.ProcessEnv = process.env): boolean {\n const file = env.CLAUDE_ENV_FILE;\n // A context-window suffix such as `[1m]` is a session setting, not the model.\n const model = envelope.model?.replace(/\\[[^\\]]*\\]$/, \"\");\n if (model === undefined || !MODEL_ID.test(model)) return false;\n if (file === undefined || file === \"\" || env.MANNI_GENERATED_BY !== undefined) return false;\n const existing = existsSync(file) ? readFileSync(file, \"utf8\") : \"\";\n const lead = existing === \"\" || existing.endsWith(\"\\n\") ? \"\" : \"\\n\";\n appendFileSync(file, `${lead}export MANNI_GENERATED_BY=${model}\\n`, \"utf8\");\n return true;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,SAAS,WAAAA,gBAAe;AACxB,SAAS,SAAS,cAAc;;;AC2BhC,SAAS,IAAI,OAAoC;AAC/C,SAAO,OAAO,UAAU,YAAY,MAAM,SAAS,IAAI,QAAQ;AACjE;AAEA,SAAS,OAAO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EO,SAAS,cAAuB;AACrC,SAAO,IAAI,QAAQ,QAAQ,EACxB,YAAY,uDAAuD,EACnE,OAAO,uBAAuB,6BAA6B,EAC3D;AAAA,IACC,IAAI,OAAO,yBAAyB,QAAQ,EAAE,QAAQ,cAAc,EAAE,QAAQ,QAAQ;AAAA,EACxF,EACC,mBAAmB,wBAAwB,EAC3C,aAAa,EACb,OAAO,OAAO,YAA8B;AAC3C,UAAM,WAAW,MAAM,aAAa;AACpC,UAAM,eAAe,QAAQ,WAAW,SAAY,CAAC,IAAI,EAAE,YAAY,QAAQ,OAAO;AACtF,QAAI,UAAU,UAAU,gBAAgB;AACtC,UAAI;AACF,cAAM,SAAS,MAAM,UAAU,EAAE,KAAKD,SAAQ,SAAS,OAAO,QAAQ,IAAI,CAAC,GAAG,GAAG,aAAa,CAAC;AAE/F,cAAM,QAAQ,OAAO,QAAQ,KAAK,CAAC,MAAM,EAAE,WAAW,SAAS,IAAI;AAAA;AAAA,EAAO,WAAW,MAAM,CAAC,KAAK;AAEjG,gBAAQ,OAAO,MAAM,GAAG,aAAa,QAAQ,UAAU,EAAE,MAAM,MAAM,CAAC,CAAC,GAAG,KAAK;AAAA,CAAI;AACnF,0BAAkB,QAAQ;AAAA,MAC5B,QAAQ;AAAA,MAER;AACA;AAAA,IACF;AACA,QAAI;AACF,YAAM,SAAS,MAAM,UAAU,YAAY;AAC3C,cAAQ,OAAO,MAAM,GAAG,aAAa,QAAQ,QAAQ,MAAM,CAAC;AAAA,CAAI;AAAA,IAClE,SAAS,KAAK;AACZ,WAAK,GAAG;AAAA,IACV;AAAA,EACF,CAAC;AACL;","names":["resolve","record","extname","resolve","resolve","resolve","resolve","run","resolve","extname","runs","resolve","run"]}
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- NAMES_ITS_SUBJECT,
4
- findingMessage,
5
- renderCheckGithub
6
- } from "./chunk-IDDRHB7E.js";
7
- import "./chunk-ZT3ERG4B.js";
8
- import "./chunk-SCKVDD4E.js";
9
- import "./chunk-64DULZIG.js";
10
- import "./chunk-FXE5K56B.js";
11
- import "./chunk-VZSATUI7.js";
12
- import "./chunk-LCMBG4LY.js";
13
- import "./chunk-E3HYSNS6.js";
14
- import "./chunk-562QZKAB.js";
15
- import "./chunk-DSWKBZWW.js";
16
- import "./chunk-YB3KD5RI.js";
17
- import "./chunk-QK6VYJHV.js";
18
- import "./chunk-RNVYGWIC.js";
19
- import "./chunk-YEUYKR62.js";
20
- import "./chunk-JF4BC7ZD.js";
21
- import "./chunk-HX44GB4Z.js";
22
- import "./chunk-NVYDWVXN.js";
23
- import "./chunk-TR5TNPWT.js";
24
- import "./chunk-OWBRDNRZ.js";
25
- import "./chunk-G3T47CFV.js";
26
- import "./chunk-2H7UOFLK.js";
27
- export {
28
- NAMES_ITS_SUBJECT,
29
- findingMessage,
30
- renderCheckGithub
31
- };
32
- //# sourceMappingURL=github-ARGPMQD2.js.map
@@ -1,49 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- DIFF_LINE_CAP,
4
- refusalLine,
5
- releasesCell,
6
- removalLine,
7
- renderCheckPretty,
8
- renderHistoryPretty,
9
- renderRemovePretty,
10
- renderUpdatePretty,
11
- resultFor,
12
- rewriteLine,
13
- splitBaselined,
14
- staleFor
15
- } from "./chunk-ZT3ERG4B.js";
16
- import "./chunk-SCKVDD4E.js";
17
- import "./chunk-64DULZIG.js";
18
- import "./chunk-FXE5K56B.js";
19
- import "./chunk-VZSATUI7.js";
20
- import "./chunk-LCMBG4LY.js";
21
- import "./chunk-E3HYSNS6.js";
22
- import "./chunk-562QZKAB.js";
23
- import "./chunk-DSWKBZWW.js";
24
- import "./chunk-YB3KD5RI.js";
25
- import "./chunk-QK6VYJHV.js";
26
- import "./chunk-RNVYGWIC.js";
27
- import "./chunk-YEUYKR62.js";
28
- import "./chunk-JF4BC7ZD.js";
29
- import "./chunk-HX44GB4Z.js";
30
- import "./chunk-NVYDWVXN.js";
31
- import "./chunk-TR5TNPWT.js";
32
- import "./chunk-OWBRDNRZ.js";
33
- import "./chunk-G3T47CFV.js";
34
- import "./chunk-2H7UOFLK.js";
35
- export {
36
- DIFF_LINE_CAP,
37
- refusalLine,
38
- releasesCell,
39
- removalLine,
40
- renderCheckPretty,
41
- renderHistoryPretty,
42
- renderRemovePretty,
43
- renderUpdatePretty,
44
- resultFor,
45
- rewriteLine,
46
- splitBaselined,
47
- staleFor
48
- };
49
- //# sourceMappingURL=pretty-EZ2NFU3C.js.map
@@ -1,33 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- ENTRY_LABEL,
4
- renderCheckSarif,
5
- withFindingMessages
6
- } from "./chunk-JA7DWOVV.js";
7
- import "./chunk-IDDRHB7E.js";
8
- import "./chunk-ZT3ERG4B.js";
9
- import "./chunk-SCKVDD4E.js";
10
- import "./chunk-64DULZIG.js";
11
- import "./chunk-FXE5K56B.js";
12
- import "./chunk-VZSATUI7.js";
13
- import "./chunk-LCMBG4LY.js";
14
- import "./chunk-E3HYSNS6.js";
15
- import "./chunk-562QZKAB.js";
16
- import "./chunk-DSWKBZWW.js";
17
- import "./chunk-YB3KD5RI.js";
18
- import "./chunk-QK6VYJHV.js";
19
- import "./chunk-RNVYGWIC.js";
20
- import "./chunk-YEUYKR62.js";
21
- import "./chunk-JF4BC7ZD.js";
22
- import "./chunk-HX44GB4Z.js";
23
- import "./chunk-NVYDWVXN.js";
24
- import "./chunk-TR5TNPWT.js";
25
- import "./chunk-OWBRDNRZ.js";
26
- import "./chunk-G3T47CFV.js";
27
- import "./chunk-2H7UOFLK.js";
28
- export {
29
- ENTRY_LABEL,
30
- renderCheckSarif,
31
- withFindingMessages
32
- };
33
- //# sourceMappingURL=sarif-SJFVSOBV.js.map