@hawkeyexl/manni 4.26.1 → 4.27.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 (280) hide show
  1. package/README.md +1 -1
  2. package/dist/{batch-NEN7H55G.js → batch-TFGOULLM.js} +14 -14
  3. package/dist/build-TOTJTK5K.js +37 -0
  4. package/dist/{calibrate-3ABLKPCL.js → calibrate-7O4RKGZS.js} +15 -15
  5. package/dist/{capture-EOC6VNIP.js → capture-K6ZKOSIK.js} +14 -14
  6. package/dist/check-4LK34QVH.js +34 -0
  7. package/dist/check-6XN46NLH.js +31 -0
  8. package/dist/check-JBSRU724.js +58 -0
  9. package/dist/check-LZQ3PW6G.js +58 -0
  10. package/dist/{check-5QIOVMIM.js → check-WFJMMSD7.js} +15 -15
  11. package/dist/{chunk-DMTREFXP.js → chunk-2E5OBVLC.js} +4 -4
  12. package/dist/{chunk-MM5HXSYQ.js → chunk-2LLCV66Q.js} +9 -9
  13. package/dist/{chunk-ERBT4WDL.js → chunk-43KMLS4Y.js} +3 -3
  14. package/dist/{chunk-BREAC43H.js → chunk-43VLZO4W.js} +2 -2
  15. package/dist/{chunk-K4ZXCV26.js → chunk-46EEHYA4.js} +65 -12
  16. package/dist/chunk-46EEHYA4.js.map +1 -0
  17. package/dist/{chunk-TVXA4IYY.js → chunk-4KK6TVFD.js} +7 -7
  18. package/dist/{chunk-MMYFT7FI.js → chunk-4NCNVKZS.js} +5 -5
  19. package/dist/{chunk-PMX67E4G.js → chunk-4QOXP5K4.js} +6 -6
  20. package/dist/{chunk-6I7DQ4RL.js → chunk-5QPLKYLM.js} +4 -4
  21. package/dist/{chunk-IJFTUE6Y.js → chunk-5XEZ7FQT.js} +2 -2
  22. package/dist/{chunk-QZOJ2UXP.js → chunk-7BPOYION.js} +2 -2
  23. package/dist/{chunk-ZACMNF3K.js → chunk-7MKAJCU2.js} +2 -2
  24. package/dist/{chunk-ZACMNF3K.js.map → chunk-7MKAJCU2.js.map} +1 -1
  25. package/dist/{chunk-CP6QSXA7.js → chunk-A4DPDPKJ.js} +2 -2
  26. package/dist/{chunk-QJJI6LKA.js → chunk-ACTUV3CQ.js} +52 -4
  27. package/dist/chunk-ACTUV3CQ.js.map +1 -0
  28. package/dist/{chunk-Y23L2GNH.js → chunk-AONT5QCO.js} +10 -10
  29. package/dist/{chunk-7EFXQOTZ.js → chunk-AXMVISW7.js} +3 -3
  30. package/dist/{chunk-MC7U5IH4.js → chunk-BCRMMIY5.js} +1 -1
  31. package/dist/chunk-BCRMMIY5.js.map +1 -0
  32. package/dist/{chunk-LJDIRJLG.js → chunk-BMPQLKQS.js} +10 -8
  33. package/dist/chunk-BMPQLKQS.js.map +1 -0
  34. package/dist/{chunk-K352TYME.js → chunk-BN3SQUXK.js} +14 -14
  35. package/dist/{chunk-3ZVRGBK6.js → chunk-BTFXOKCP.js} +2 -2
  36. package/dist/{chunk-JF4BC7ZD.js → chunk-CDX4QK6O.js} +29 -2
  37. package/dist/chunk-CDX4QK6O.js.map +1 -0
  38. package/dist/{chunk-R4BRS4AE.js → chunk-CJWFDJEX.js} +9 -9
  39. package/dist/{chunk-3YF2DCKQ.js → chunk-D3FJVKE2.js} +3 -3
  40. package/dist/{chunk-ZV3VLKG4.js → chunk-DRMCY64Q.js} +15 -7
  41. package/dist/chunk-DRMCY64Q.js.map +1 -0
  42. package/dist/{chunk-Q56IULOH.js → chunk-DSTEX7SK.js} +3 -3
  43. package/dist/{chunk-466GMD3F.js → chunk-DZC2OALR.js} +4 -4
  44. package/dist/{chunk-PSXEBABJ.js → chunk-FK2FAE3J.js} +4 -4
  45. package/dist/{chunk-XXMPPQMJ.js → chunk-FRAEUYJE.js} +56 -27
  46. package/dist/chunk-FRAEUYJE.js.map +1 -0
  47. package/dist/{chunk-BRUD25F4.js → chunk-H7SFSZ3I.js} +300 -58
  48. package/dist/chunk-H7SFSZ3I.js.map +1 -0
  49. package/dist/chunk-HMJZHUCJ.js +337 -0
  50. package/dist/chunk-HMJZHUCJ.js.map +1 -0
  51. package/dist/{chunk-3D7VBQXN.js → chunk-HQRXE6QY.js} +354 -51
  52. package/dist/chunk-HQRXE6QY.js.map +1 -0
  53. package/dist/{chunk-OQK7J4VE.js → chunk-IFAOEGSU.js} +32 -22
  54. package/dist/chunk-IFAOEGSU.js.map +1 -0
  55. package/dist/{chunk-KP44XIY4.js → chunk-IQJ4WBJZ.js} +173 -83
  56. package/dist/chunk-IQJ4WBJZ.js.map +1 -0
  57. package/dist/{chunk-WPIBGNKM.js → chunk-JWS4OKOZ.js} +4 -4
  58. package/dist/{chunk-MNUGG3B4.js → chunk-K5DKRGUV.js} +6 -6
  59. package/dist/{chunk-KDV7GPCU.js → chunk-LESYV3TT.js} +3 -3
  60. package/dist/{chunk-UZ7BMGDD.js → chunk-LWWO4C6P.js} +3 -3
  61. package/dist/{chunk-63FAVBEK.js → chunk-MABRQ46L.js} +14 -7
  62. package/dist/chunk-MABRQ46L.js.map +1 -0
  63. package/dist/{chunk-O4MKNFMM.js → chunk-MMS3I5ZH.js} +7 -7
  64. package/dist/{chunk-KKCOXRSU.js → chunk-NXJMRIKW.js} +5 -5
  65. package/dist/{chunk-MJBGGFSN.js → chunk-OBFIWPEB.js} +3 -3
  66. package/dist/{chunk-TI4DA6DF.js → chunk-OPF3NOKF.js} +1 -1
  67. package/dist/chunk-OPF3NOKF.js.map +1 -0
  68. package/dist/{chunk-CLH4ZYNG.js → chunk-OZH46DBT.js} +1 -1
  69. package/dist/{chunk-CLH4ZYNG.js.map → chunk-OZH46DBT.js.map} +1 -1
  70. package/dist/{chunk-IUSVWJOF.js → chunk-PBR4TVEL.js} +7 -7
  71. package/dist/{chunk-LZCBMMSG.js → chunk-PHZ7VWSL.js} +31 -13
  72. package/dist/chunk-PHZ7VWSL.js.map +1 -0
  73. package/dist/{chunk-JDV6UC34.js → chunk-Q34NWLGY.js} +2 -2
  74. package/dist/{chunk-ZFLGCCOO.js → chunk-QFVBBRHW.js} +2 -2
  75. package/dist/{chunk-TDQ445D5.js → chunk-QLK6LXSS.js} +3 -3
  76. package/dist/{chunk-XU24F36U.js → chunk-QSABWNXP.js} +4 -4
  77. package/dist/{chunk-T6ZSLK7G.js → chunk-R3FCSRTX.js} +6 -6
  78. package/dist/{chunk-JR4CHN6I.js → chunk-RA3QM7X6.js} +8 -8
  79. package/dist/{chunk-OCJR7ZML.js → chunk-RCGR4NKY.js} +2 -2
  80. package/dist/{chunk-LFA2AMF5.js → chunk-S2ZOXAFY.js} +2 -2
  81. package/dist/{chunk-PAKXJGQF.js → chunk-SYZ75Q5F.js} +65 -47
  82. package/dist/chunk-SYZ75Q5F.js.map +1 -0
  83. package/dist/{chunk-NMYN46MG.js → chunk-TF4VEEDJ.js} +3 -3
  84. package/dist/{chunk-4I3K7QHO.js → chunk-TNOML4XE.js} +3 -3
  85. package/dist/{chunk-GW45SXGE.js → chunk-UVI6JXRM.js} +8 -8
  86. package/dist/{chunk-ZTH67IDP.js → chunk-VHAQJ6KU.js} +34 -28
  87. package/dist/chunk-VHAQJ6KU.js.map +1 -0
  88. package/dist/{chunk-SMDE7RY3.js → chunk-VLPUC4MH.js} +3 -3
  89. package/dist/{chunk-N2AZOLIA.js → chunk-WJ7IGOBI.js} +21 -12
  90. package/dist/chunk-WJ7IGOBI.js.map +1 -0
  91. package/dist/{chunk-3MYJ6BI6.js → chunk-WLN4A2OJ.js} +4 -4
  92. package/dist/{chunk-RGOULVBF.js → chunk-WNL2T7LK.js} +4 -4
  93. package/dist/{chunk-PLUIVONN.js → chunk-WOPKA4ZB.js} +3 -3
  94. package/dist/{chunk-VK34UKBY.js → chunk-X3FSKK53.js} +13 -7
  95. package/dist/chunk-X3FSKK53.js.map +1 -0
  96. package/dist/{chunk-XX7GNK4F.js → chunk-XZFJAVX7.js} +3 -3
  97. package/dist/{chunk-WSRK3PN4.js → chunk-Y72JZVMX.js} +3 -3
  98. package/dist/{chunk-KBZM4HI2.js → chunk-YQ4XWJTB.js} +26 -16
  99. package/dist/chunk-YQ4XWJTB.js.map +1 -0
  100. package/dist/{chunk-K7UK72VN.js → chunk-YUTRYEDG.js} +3 -3
  101. package/dist/{chunk-H7UPMVBK.js → chunk-Z3YNYZR2.js} +2 -2
  102. package/dist/{chunk-XDARBEJA.js → chunk-Z66LHZRV.js} +2 -2
  103. package/dist/{chunk-G5I2JTDK.js → chunk-ZWVYT2G6.js} +2 -2
  104. package/dist/{chunk-D4BGNAN5.js → chunk-ZZGHTXZ2.js} +159 -23
  105. package/dist/chunk-ZZGHTXZ2.js.map +1 -0
  106. package/dist/{cli-BIRTWKQ5.js → cli-4Q22IFXX.js} +16 -15
  107. package/dist/{cli-BIRTWKQ5.js.map → cli-4Q22IFXX.js.map} +1 -1
  108. package/dist/{cli-EYDOJUG7.js → cli-6Y2V6OI6.js} +29 -28
  109. package/dist/{cli-EYDOJUG7.js.map → cli-6Y2V6OI6.js.map} +1 -1
  110. package/dist/{cli-HBVAUPIC.js → cli-A3E4KJ5U.js} +21 -21
  111. package/dist/{cli-XGY7JUEI.js → cli-H4SH5A6M.js} +37 -36
  112. package/dist/{cli-XGY7JUEI.js.map → cli-H4SH5A6M.js.map} +1 -1
  113. package/dist/{cli-RJTB3BWZ.js → cli-ODMYZEFY.js} +68 -58
  114. package/dist/{cli-RJTB3BWZ.js.map → cli-ODMYZEFY.js.map} +1 -1
  115. package/dist/{cli-V3UM6B6F.js → cli-PKCV3N4H.js} +8 -8
  116. package/dist/{cli-HRQCVZQY.js → cli-QQIIFRKE.js} +20 -19
  117. package/dist/{cli-HRQCVZQY.js.map → cli-QQIIFRKE.js.map} +1 -1
  118. package/dist/{cli-XDPMDMZU.js → cli-SN7N4WCV.js} +29 -28
  119. package/dist/{cli-XDPMDMZU.js.map → cli-SN7N4WCV.js.map} +1 -1
  120. package/dist/{cli-VI76NFWN.js → cli-WFC3CJOJ.js} +3 -3
  121. package/dist/{cli-KOATS2ZY.js → cli-YP5KKGZP.js} +30 -29
  122. package/dist/{cli-KOATS2ZY.js.map → cli-YP5KKGZP.js.map} +1 -1
  123. package/dist/{cli-S36TXD3Z.js → cli-Z6IVPISQ.js} +24 -42
  124. package/dist/cli-Z6IVPISQ.js.map +1 -0
  125. package/dist/cli.js +15 -15
  126. package/dist/{config-2YJPJ36T.js → config-Z3FYLJ6X.js} +3 -3
  127. package/dist/docmeta.js +7 -7
  128. package/dist/github-7MZOPO6F.js +49 -0
  129. package/dist/github-MERFCTC7.js +29 -0
  130. package/dist/{github-KGQPHQQJ.js → github-MQPACOAB.js} +15 -14
  131. package/dist/index.d.ts +169 -8
  132. package/dist/index.js +58 -57
  133. package/dist/index.js.map +1 -1
  134. package/dist/{json-5GDD64P6.js → json-7RZPISH3.js} +13 -12
  135. package/dist/{json-BO5XIJWF.js → json-GOM7GQ6C.js} +16 -15
  136. package/dist/{labels-N7GKDSDM.js → labels-3ZOCWOT6.js} +12 -11
  137. package/dist/{labels-N7GKDSDM.js.map → labels-3ZOCWOT6.js.map} +1 -1
  138. package/dist/lint-XQMOP6UX.js +33 -0
  139. package/dist/{list-ZQJOVVUU.js → list-5PR56LNP.js} +15 -14
  140. package/dist/list-AV4DCGP3.js +31 -0
  141. package/dist/list-PLVWVFAV.js +49 -0
  142. package/dist/{page-WXPSHZJY.js → page-7EML6WFG.js} +10 -10
  143. package/dist/{prepare-V76CXWW4.js → prepare-A7NZ5BPZ.js} +13 -13
  144. package/dist/{pretty-RTIATRSO.js → pretty-5QHFDOSO.js} +15 -14
  145. package/dist/{pretty-AR6FVUJO.js → pretty-E4FJRLZZ.js} +25 -24
  146. package/dist/{pretty-VOC2SKHD.js → pretty-Y4UZL35B.js} +13 -12
  147. package/dist/{reporters-LJZLZDFQ.js → reporters-A63SJIY7.js} +12 -12
  148. package/dist/{reporters-A4VULNIK.js → reporters-BFST46C2.js} +5 -5
  149. package/dist/{reporters-6CNOPRDA.js → reporters-MK62LRGW.js} +4 -4
  150. package/dist/run-2MWSIAGL.js +52 -0
  151. package/dist/{sarif-TMQEXFHP.js → sarif-BBNFOFUZ.js} +9 -9
  152. package/dist/sarif-MDBTPWQN.js +50 -0
  153. package/dist/{sarif-UHITXNLM.js → sarif-MTFYXIRJ.js} +11 -11
  154. package/dist/{strategy-TGJGFZHD.js → strategy-3EJODC6O.js} +22 -21
  155. package/dist/{term-GJURJ3FM.js → term-UYCZLVVA.js} +19 -18
  156. package/dist/{term-GJURJ3FM.js.map → term-UYCZLVVA.js.map} +1 -1
  157. package/dist/{types-VWL35P4F.js → types-GV2THIRC.js} +2 -2
  158. package/dist/{validate-YTMGOZAP.js → validate-3C3RWYMR.js} +5 -5
  159. package/package.json +1 -1
  160. package/plugin/manni/.claude-plugin/plugin.json +1 -1
  161. package/plugin/manni/hooks/page-metadata.mjs +1 -1
  162. package/dist/build-UYQEHJ2O.js +0 -36
  163. package/dist/check-34N4PI6C.js +0 -57
  164. package/dist/check-7SUZMJDK.js +0 -33
  165. package/dist/check-D7W7CUPQ.js +0 -30
  166. package/dist/check-RFLS3OB4.js +0 -57
  167. package/dist/chunk-3D7VBQXN.js.map +0 -1
  168. package/dist/chunk-63FAVBEK.js.map +0 -1
  169. package/dist/chunk-BRUD25F4.js.map +0 -1
  170. package/dist/chunk-D4BGNAN5.js.map +0 -1
  171. package/dist/chunk-JF4BC7ZD.js.map +0 -1
  172. package/dist/chunk-K4ZXCV26.js.map +0 -1
  173. package/dist/chunk-KBZM4HI2.js.map +0 -1
  174. package/dist/chunk-KP44XIY4.js.map +0 -1
  175. package/dist/chunk-LJDIRJLG.js.map +0 -1
  176. package/dist/chunk-LZCBMMSG.js.map +0 -1
  177. package/dist/chunk-MC7U5IH4.js.map +0 -1
  178. package/dist/chunk-N2AZOLIA.js.map +0 -1
  179. package/dist/chunk-OQK7J4VE.js.map +0 -1
  180. package/dist/chunk-PAKXJGQF.js.map +0 -1
  181. package/dist/chunk-QJJI6LKA.js.map +0 -1
  182. package/dist/chunk-TI4DA6DF.js.map +0 -1
  183. package/dist/chunk-VK34UKBY.js.map +0 -1
  184. package/dist/chunk-XXMPPQMJ.js.map +0 -1
  185. package/dist/chunk-ZTH67IDP.js.map +0 -1
  186. package/dist/chunk-ZV3VLKG4.js.map +0 -1
  187. package/dist/cli-S36TXD3Z.js.map +0 -1
  188. package/dist/github-EKVVPQPD.js +0 -48
  189. package/dist/github-FQ5MCP3E.js +0 -28
  190. package/dist/lint-U6VEL4ZA.js +0 -32
  191. package/dist/list-5LRPJRJJ.js +0 -48
  192. package/dist/list-GWP3Y2SR.js +0 -30
  193. package/dist/run-4B25K2SV.js +0 -51
  194. package/dist/sarif-Z34PKKFQ.js +0 -49
  195. /package/dist/{batch-NEN7H55G.js.map → batch-TFGOULLM.js.map} +0 -0
  196. /package/dist/{build-UYQEHJ2O.js.map → build-TOTJTK5K.js.map} +0 -0
  197. /package/dist/{calibrate-3ABLKPCL.js.map → calibrate-7O4RKGZS.js.map} +0 -0
  198. /package/dist/{capture-EOC6VNIP.js.map → capture-K6ZKOSIK.js.map} +0 -0
  199. /package/dist/{check-34N4PI6C.js.map → check-4LK34QVH.js.map} +0 -0
  200. /package/dist/{check-7SUZMJDK.js.map → check-6XN46NLH.js.map} +0 -0
  201. /package/dist/{check-D7W7CUPQ.js.map → check-JBSRU724.js.map} +0 -0
  202. /package/dist/{check-RFLS3OB4.js.map → check-LZQ3PW6G.js.map} +0 -0
  203. /package/dist/{check-5QIOVMIM.js.map → check-WFJMMSD7.js.map} +0 -0
  204. /package/dist/{chunk-DMTREFXP.js.map → chunk-2E5OBVLC.js.map} +0 -0
  205. /package/dist/{chunk-MM5HXSYQ.js.map → chunk-2LLCV66Q.js.map} +0 -0
  206. /package/dist/{chunk-ERBT4WDL.js.map → chunk-43KMLS4Y.js.map} +0 -0
  207. /package/dist/{chunk-BREAC43H.js.map → chunk-43VLZO4W.js.map} +0 -0
  208. /package/dist/{chunk-TVXA4IYY.js.map → chunk-4KK6TVFD.js.map} +0 -0
  209. /package/dist/{chunk-MMYFT7FI.js.map → chunk-4NCNVKZS.js.map} +0 -0
  210. /package/dist/{chunk-PMX67E4G.js.map → chunk-4QOXP5K4.js.map} +0 -0
  211. /package/dist/{chunk-6I7DQ4RL.js.map → chunk-5QPLKYLM.js.map} +0 -0
  212. /package/dist/{chunk-IJFTUE6Y.js.map → chunk-5XEZ7FQT.js.map} +0 -0
  213. /package/dist/{chunk-QZOJ2UXP.js.map → chunk-7BPOYION.js.map} +0 -0
  214. /package/dist/{chunk-CP6QSXA7.js.map → chunk-A4DPDPKJ.js.map} +0 -0
  215. /package/dist/{chunk-Y23L2GNH.js.map → chunk-AONT5QCO.js.map} +0 -0
  216. /package/dist/{chunk-7EFXQOTZ.js.map → chunk-AXMVISW7.js.map} +0 -0
  217. /package/dist/{chunk-K352TYME.js.map → chunk-BN3SQUXK.js.map} +0 -0
  218. /package/dist/{chunk-3ZVRGBK6.js.map → chunk-BTFXOKCP.js.map} +0 -0
  219. /package/dist/{chunk-R4BRS4AE.js.map → chunk-CJWFDJEX.js.map} +0 -0
  220. /package/dist/{chunk-3YF2DCKQ.js.map → chunk-D3FJVKE2.js.map} +0 -0
  221. /package/dist/{chunk-Q56IULOH.js.map → chunk-DSTEX7SK.js.map} +0 -0
  222. /package/dist/{chunk-466GMD3F.js.map → chunk-DZC2OALR.js.map} +0 -0
  223. /package/dist/{chunk-PSXEBABJ.js.map → chunk-FK2FAE3J.js.map} +0 -0
  224. /package/dist/{chunk-WPIBGNKM.js.map → chunk-JWS4OKOZ.js.map} +0 -0
  225. /package/dist/{chunk-MNUGG3B4.js.map → chunk-K5DKRGUV.js.map} +0 -0
  226. /package/dist/{chunk-KDV7GPCU.js.map → chunk-LESYV3TT.js.map} +0 -0
  227. /package/dist/{chunk-UZ7BMGDD.js.map → chunk-LWWO4C6P.js.map} +0 -0
  228. /package/dist/{chunk-O4MKNFMM.js.map → chunk-MMS3I5ZH.js.map} +0 -0
  229. /package/dist/{chunk-KKCOXRSU.js.map → chunk-NXJMRIKW.js.map} +0 -0
  230. /package/dist/{chunk-MJBGGFSN.js.map → chunk-OBFIWPEB.js.map} +0 -0
  231. /package/dist/{chunk-IUSVWJOF.js.map → chunk-PBR4TVEL.js.map} +0 -0
  232. /package/dist/{chunk-JDV6UC34.js.map → chunk-Q34NWLGY.js.map} +0 -0
  233. /package/dist/{chunk-ZFLGCCOO.js.map → chunk-QFVBBRHW.js.map} +0 -0
  234. /package/dist/{chunk-TDQ445D5.js.map → chunk-QLK6LXSS.js.map} +0 -0
  235. /package/dist/{chunk-XU24F36U.js.map → chunk-QSABWNXP.js.map} +0 -0
  236. /package/dist/{chunk-T6ZSLK7G.js.map → chunk-R3FCSRTX.js.map} +0 -0
  237. /package/dist/{chunk-JR4CHN6I.js.map → chunk-RA3QM7X6.js.map} +0 -0
  238. /package/dist/{chunk-OCJR7ZML.js.map → chunk-RCGR4NKY.js.map} +0 -0
  239. /package/dist/{chunk-LFA2AMF5.js.map → chunk-S2ZOXAFY.js.map} +0 -0
  240. /package/dist/{chunk-NMYN46MG.js.map → chunk-TF4VEEDJ.js.map} +0 -0
  241. /package/dist/{chunk-4I3K7QHO.js.map → chunk-TNOML4XE.js.map} +0 -0
  242. /package/dist/{chunk-GW45SXGE.js.map → chunk-UVI6JXRM.js.map} +0 -0
  243. /package/dist/{chunk-SMDE7RY3.js.map → chunk-VLPUC4MH.js.map} +0 -0
  244. /package/dist/{chunk-3MYJ6BI6.js.map → chunk-WLN4A2OJ.js.map} +0 -0
  245. /package/dist/{chunk-RGOULVBF.js.map → chunk-WNL2T7LK.js.map} +0 -0
  246. /package/dist/{chunk-PLUIVONN.js.map → chunk-WOPKA4ZB.js.map} +0 -0
  247. /package/dist/{chunk-XX7GNK4F.js.map → chunk-XZFJAVX7.js.map} +0 -0
  248. /package/dist/{chunk-WSRK3PN4.js.map → chunk-Y72JZVMX.js.map} +0 -0
  249. /package/dist/{chunk-K7UK72VN.js.map → chunk-YUTRYEDG.js.map} +0 -0
  250. /package/dist/{chunk-H7UPMVBK.js.map → chunk-Z3YNYZR2.js.map} +0 -0
  251. /package/dist/{chunk-XDARBEJA.js.map → chunk-Z66LHZRV.js.map} +0 -0
  252. /package/dist/{chunk-G5I2JTDK.js.map → chunk-ZWVYT2G6.js.map} +0 -0
  253. /package/dist/{cli-HBVAUPIC.js.map → cli-A3E4KJ5U.js.map} +0 -0
  254. /package/dist/{cli-V3UM6B6F.js.map → cli-PKCV3N4H.js.map} +0 -0
  255. /package/dist/{cli-VI76NFWN.js.map → cli-WFC3CJOJ.js.map} +0 -0
  256. /package/dist/{config-2YJPJ36T.js.map → config-Z3FYLJ6X.js.map} +0 -0
  257. /package/dist/{github-EKVVPQPD.js.map → github-7MZOPO6F.js.map} +0 -0
  258. /package/dist/{github-FQ5MCP3E.js.map → github-MERFCTC7.js.map} +0 -0
  259. /package/dist/{github-KGQPHQQJ.js.map → github-MQPACOAB.js.map} +0 -0
  260. /package/dist/{json-5GDD64P6.js.map → json-7RZPISH3.js.map} +0 -0
  261. /package/dist/{json-BO5XIJWF.js.map → json-GOM7GQ6C.js.map} +0 -0
  262. /package/dist/{lint-U6VEL4ZA.js.map → lint-XQMOP6UX.js.map} +0 -0
  263. /package/dist/{list-5LRPJRJJ.js.map → list-5PR56LNP.js.map} +0 -0
  264. /package/dist/{list-GWP3Y2SR.js.map → list-AV4DCGP3.js.map} +0 -0
  265. /package/dist/{list-ZQJOVVUU.js.map → list-PLVWVFAV.js.map} +0 -0
  266. /package/dist/{page-WXPSHZJY.js.map → page-7EML6WFG.js.map} +0 -0
  267. /package/dist/{prepare-V76CXWW4.js.map → prepare-A7NZ5BPZ.js.map} +0 -0
  268. /package/dist/{pretty-AR6FVUJO.js.map → pretty-5QHFDOSO.js.map} +0 -0
  269. /package/dist/{pretty-RTIATRSO.js.map → pretty-E4FJRLZZ.js.map} +0 -0
  270. /package/dist/{pretty-VOC2SKHD.js.map → pretty-Y4UZL35B.js.map} +0 -0
  271. /package/dist/{reporters-6CNOPRDA.js.map → reporters-A63SJIY7.js.map} +0 -0
  272. /package/dist/{reporters-A4VULNIK.js.map → reporters-BFST46C2.js.map} +0 -0
  273. /package/dist/{reporters-LJZLZDFQ.js.map → reporters-MK62LRGW.js.map} +0 -0
  274. /package/dist/{run-4B25K2SV.js.map → run-2MWSIAGL.js.map} +0 -0
  275. /package/dist/{sarif-TMQEXFHP.js.map → sarif-BBNFOFUZ.js.map} +0 -0
  276. /package/dist/{sarif-UHITXNLM.js.map → sarif-MDBTPWQN.js.map} +0 -0
  277. /package/dist/{sarif-Z34PKKFQ.js.map → sarif-MTFYXIRJ.js.map} +0 -0
  278. /package/dist/{strategy-TGJGFZHD.js.map → strategy-3EJODC6O.js.map} +0 -0
  279. /package/dist/{types-VWL35P4F.js.map → types-GV2THIRC.js.map} +0 -0
  280. /package/dist/{validate-YTMGOZAP.js.map → validate-3C3RWYMR.js.map} +0 -0
@@ -6,7 +6,7 @@ import {
6
6
  canonicalSchemaRef,
7
7
  fingerprint,
8
8
  isErrorSeverity
9
- } from "./chunk-3D7VBQXN.js";
9
+ } from "./chunk-HQRXE6QY.js";
10
10
  import {
11
11
  escapeWorkflowCommandMessage,
12
12
  escapeWorkflowCommandProperty,
@@ -17,10 +17,10 @@ import {
17
17
  } from "./chunk-RNVYGWIC.js";
18
18
  import {
19
19
  findGitRoot
20
- } from "./chunk-JF4BC7ZD.js";
20
+ } from "./chunk-CDX4QK6O.js";
21
21
  import {
22
22
  package_default
23
- } from "./chunk-ZACMNF3K.js";
23
+ } from "./chunk-7MKAJCU2.js";
24
24
 
25
25
  // src/meta/reporters/rule-id.ts
26
26
  var SYNTHETIC_SCHEMA = "(parse)";
@@ -407,4 +407,4 @@ export {
407
407
  renderGithub,
408
408
  render
409
409
  };
410
- //# sourceMappingURL=chunk-WPIBGNKM.js.map
410
+ //# sourceMappingURL=chunk-JWS4OKOZ.js.map
@@ -4,7 +4,7 @@ import {
4
4
  guidanceFor,
5
5
  resolveSeverity,
6
6
  ruleId
7
- } from "./chunk-BREAC43H.js";
7
+ } from "./chunk-43VLZO4W.js";
8
8
  import {
9
9
  closestName
10
10
  } from "./chunk-XTKJNRJ6.js";
@@ -15,18 +15,18 @@ import {
15
15
  TermError,
16
16
  languageKey,
17
17
  loadTerms
18
- } from "./chunk-KP44XIY4.js";
18
+ } from "./chunk-IQJ4WBJZ.js";
19
19
  import {
20
20
  TERM_MATCH_FIELDS
21
- } from "./chunk-MC7U5IH4.js";
21
+ } from "./chunk-BCRMMIY5.js";
22
22
  import {
23
23
  TERM_RELATION_FIELDS
24
- } from "./chunk-VK34UKBY.js";
24
+ } from "./chunk-X3FSKK53.js";
25
25
  import {
26
26
  isErrorSeverity,
27
27
  resolveBaselineRequest,
28
28
  settleBaseline
29
- } from "./chunk-3D7VBQXN.js";
29
+ } from "./chunk-HQRXE6QY.js";
30
30
 
31
31
  // src/term/commands/check.ts
32
32
  import { existsSync } from "node:fs";
@@ -713,4 +713,4 @@ export {
713
713
  reportedFindings,
714
714
  runCheck
715
715
  };
716
- //# sourceMappingURL=chunk-MNUGG3B4.js.map
716
+ //# sourceMappingURL=chunk-K5DKRGUV.js.map
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  resultFor,
4
4
  splitBaselined
5
- } from "./chunk-3MYJ6BI6.js";
5
+ } from "./chunk-WLN4A2OJ.js";
6
6
  import {
7
7
  errorSite
8
- } from "./chunk-6I7DQ4RL.js";
8
+ } from "./chunk-5QPLKYLM.js";
9
9
  import {
10
10
  escapeWorkflowCommandMessage,
11
11
  escapeWorkflowCommandProperty,
@@ -56,4 +56,4 @@ export {
56
56
  findingMessage,
57
57
  renderCheckGithub
58
58
  };
59
- //# sourceMappingURL=chunk-KDV7GPCU.js.map
59
+ //# sourceMappingURL=chunk-LESYV3TT.js.map
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  titleOf
4
- } from "./chunk-4I3K7QHO.js";
4
+ } from "./chunk-TNOML4XE.js";
5
5
  import {
6
6
  displayPath
7
- } from "./chunk-TVXA4IYY.js";
7
+ } from "./chunk-4KK6TVFD.js";
8
8
 
9
9
  // src/strategy/reporters/json.ts
10
10
  function recordJson(entry) {
@@ -77,4 +77,4 @@ export {
77
77
  renderGetJson,
78
78
  renderFindingsJson
79
79
  };
80
- //# sourceMappingURL=chunk-UZ7BMGDD.js.map
80
+ //# sourceMappingURL=chunk-LWWO4C6P.js.map
@@ -8,24 +8,27 @@ import {
8
8
  loadTemplateFile,
9
9
  resolveLintRun,
10
10
  resolveStructureTool
11
- } from "./chunk-LZCBMMSG.js";
11
+ } from "./chunk-PHZ7VWSL.js";
12
12
  import {
13
13
  BLOCK_KINDS,
14
14
  BLOCK_KIND_NODE,
15
15
  occurrenceRange,
16
16
  quoteList
17
- } from "./chunk-G5I2JTDK.js";
17
+ } from "./chunk-ZWVYT2G6.js";
18
18
  import {
19
19
  parserByName,
20
20
  parserForExtension,
21
21
  unsupportedFormatMessage
22
- } from "./chunk-BRUD25F4.js";
22
+ } from "./chunk-H7SFSZ3I.js";
23
23
  import {
24
24
  LintError
25
- } from "./chunk-TI4DA6DF.js";
25
+ } from "./chunk-OPF3NOKF.js";
26
+ import {
27
+ flareRun
28
+ } from "./chunk-HMJZHUCJ.js";
26
29
  import {
27
30
  writeTextAtomic
28
- } from "./chunk-MJBGGFSN.js";
31
+ } from "./chunk-OBFIWPEB.js";
29
32
  import {
30
33
  palette
31
34
  } from "./chunk-RNVYGWIC.js";
@@ -247,7 +250,11 @@ async function runTemplatesInfer(opts) {
247
250
  }
248
251
  let tree;
249
252
  try {
250
- tree = await parser.parse(content, opts.page === STDIN ? "<stdin>" : opts.page);
253
+ const label = opts.page === STDIN ? "<stdin>" : opts.page;
254
+ tree = await parser.parse(content, label, {
255
+ absPath: resolve(cwd, label),
256
+ flare: flareRun(run.tools)
257
+ });
251
258
  } catch (err) {
252
259
  if (err instanceof ToolError) throw new LintError(err.message);
253
260
  throw err;
@@ -525,4 +532,4 @@ export {
525
532
  occurrenceWords,
526
533
  renderTemplateShow
527
534
  };
528
- //# sourceMappingURL=chunk-63FAVBEK.js.map
535
+ //# sourceMappingURL=chunk-MABRQ46L.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lint/core/infer.ts","../src/lint/commands/templates.ts","../src/lint/commands/tools.ts","../src/lint/reporters/template-show.ts"],"sourcesContent":["/**\n * Write a first template from a page that already has the shape its author\n * wants.\n *\n * The format is strict by default: every rule is one occurrence, and a section\n * no rule describes is a finding. A new author's first run against a\n * hand-written template is therefore a screen of unexpected sections, and this\n * is the escape. Proposal 0061's stress test 5 records it, and says the two\n * ship together.\n *\n * Two rules govern everything here.\n *\n * **The output must lint its input clean.** That is the whole contract, and it\n * is why each inference below is the weakest claim that still describes the\n * page. `contains:` lists only the kinds that are there, at `min: 1`, so a\n * section holding more of something still passes. A table's `columns:` is\n * claimed only where every table in that section agrees about them, and a code\n * block's `language:` only where every block in that section declares one -\n * both rules report per offending node, so a claim drawn from one node would\n * fail on its neighbour. A template that fails the page it was inferred from is\n * worse than no template: it hands a new author findings about the very\n * document they pointed at.\n *\n * **Nothing is optional and nothing repeats.** One page cannot show what\n * varies, so no `min: 0`, no `max`, no `repeat` and no `pattern` is invented.\n * Two sections with one heading are two rules. Loosening a heading into a list\n * or a pattern, marking a rule optional, and adding a trailing wildcard are the\n * author's edits, and the reference page says so.\n */\nimport { stringify as stringifyYaml } from \"yaml\";\nimport { LintError } from \"../types.js\";\nimport type {\n CodeNode,\n ContentKind,\n ContentNode,\n DocumentTree,\n Position,\n SectionNode,\n TableNode,\n} from \"../types.js\";\nimport { BLOCK_KINDS, BLOCK_KIND_NODE } from \"./template.js\";\nimport type {\n BlockKind,\n BlockRule,\n HeadingRule,\n Rule,\n Template,\n TemplateFile,\n} from \"./template.js\";\n\n/** How an inferred template is written out. */\nexport const INFER_FORMATS = [\"yaml\", \"json\"] as const;\nexport type InferFormat = (typeof INFER_FORMATS)[number];\n\nexport function isInferFormat(value: string): value is InferFormat {\n return (INFER_FORMATS as readonly string[]).includes(value);\n}\n\n/**\n * Template names the schema's `templates` map accepts.\n *\n * Checked here rather than left to Ajv. `templates` is `additionalProperties:\n * false` beside a `patternProperties` key, so a name outside the pattern is\n * reported as an unexpected property - which names the offending key and says\n * nothing whatsoever about what is wrong with it.\n */\nconst TEMPLATE_NAME = /^[A-Za-z][A-Za-z0-9\\-_]*$/;\n\n/** The node each block-rule key counts, inverted: `codeBlock` -> `codeBlocks`. */\nconst KIND_KEY = new Map<ContentKind, BlockKind>(\n BLOCK_KINDS.map((key) => [BLOCK_KIND_NODE[key], key]),\n);\n\n/* -------------------------------------------------------------------------- *\n * The page as the template's subject\n * -------------------------------------------------------------------------- */\n\n/** A zero-width span at the top of a file, for a document with no sections. */\nfunction origin(): Position {\n return {\n start: { line: 1, column: 1, offset: 0 },\n end: { line: 1, column: 1, offset: 0 },\n };\n}\n\n/** First section's start through the last one's end. */\nfunction span(sections: SectionNode[]): Position {\n const first = sections[0];\n const last = sections[sections.length - 1];\n if (!first || !last) return origin();\n return { start: { ...first.position.start }, end: { ...last.position.end } };\n}\n\n/**\n * The section the template describes: the page itself.\n *\n * Deliberately the same reading `validator.ts` applies, because the template\n * this produces is checked by that one. A page whose body is a single `# Title`\n * *is* that section; anything else - several top-level headings, or a body that\n * starts at `##` with no lead content - has no section standing for the page,\n * so one is synthesised with no heading of its own. The duplication is small\n * and the alternative is worse: an inference that read the page differently\n * from the checker would produce templates that fail their own source.\n */\nfunction pageSection(tree: DocumentTree): SectionNode {\n const [only] = tree.sections;\n if (tree.sections.length === 1 && only && only.level <= 1) return only;\n return {\n slug: \"\",\n title: \"\",\n level: 0,\n order: 0,\n parentSlug: null,\n titlePosition: null,\n position: span(tree.sections),\n children: [],\n sections: tree.sections,\n };\n}\n\n/* -------------------------------------------------------------------------- *\n * Content\n * -------------------------------------------------------------------------- */\n\n/** The header row's cells, in order, or none where the table has no header. */\nfunction headerCells(table: TableNode): string[] {\n const header = table.children.find((row) => row.header);\n return header ? header.children.map((cell) => cell.text) : [];\n}\n\n/**\n * `columns:` for a run of tables, where they all agree about it.\n *\n * `tables.columns` reports once per table whose header differs, so a claim\n * taken from the first of two unlike tables fails on the second - in the very\n * page it was drawn from. Where the tables disagree, or any of them has no\n * header row, the count alone is what the page can honestly be said to show.\n */\nfunction columnsOf(tables: TableNode[]): { columns?: string[] } {\n const headers = tables.map(headerCells);\n const [first] = headers;\n if (first === undefined || first.length === 0) return {};\n const same = (cells: string[]): boolean =>\n cells.length === first.length && cells.every((c, i) => c === first[i]);\n return headers.every(same) ? { columns: [...first] } : {};\n}\n\n/**\n * `language:` for a run of code blocks, where every one of them declares one.\n *\n * `codeBlocks.language` holds every block in the run to the accepted set, so a\n * section mixing a tagged fence with a bare one can claim nothing: the bare one\n * would fail. Where the tags differ the list form says what the page shows,\n * which is what \"one of these\" is for.\n */\nfunction languageOf(blocks: CodeNode[]): { language?: string | string[] } {\n const declared: string[] = [];\n for (const block of blocks) {\n if (block.language === undefined || block.language.length === 0) return {};\n declared.push(block.language);\n }\n const distinct = [...new Set(declared)];\n const [only] = distinct;\n if (only === undefined) return {};\n return { language: distinct.length === 1 ? only : distinct };\n}\n\n/**\n * What a section holds, as a `contains:` rule, or nothing where it holds none\n * of the kinds a template can count.\n *\n * `contains` rather than `sequence`: the page shows one order, and asserting it\n * would make moving a paragraph below a list a finding. Order is a claim its\n * author makes deliberately.\n */\nfunction inferContains(children: ContentNode[]): BlockRule | undefined {\n const byKey = new Map<BlockKind, ContentNode[]>();\n for (const node of children) {\n const key = KIND_KEY.get(node.kind);\n if (key === undefined) continue;\n const bucket = byKey.get(key);\n if (bucket) bucket.push(node);\n else byKey.set(key, [node]);\n }\n\n const rule: BlockRule = {};\n let any = false;\n // In `BLOCK_KINDS` order, not the order the page happens to put them in, so\n // two pages holding the same kinds produce byte-identical rules.\n for (const key of BLOCK_KINDS) {\n const nodes = byKey.get(key);\n if (nodes === undefined) continue;\n any = true;\n if (key === \"tables\") {\n rule.tables = { min: 1, ...columnsOf(nodes as TableNode[]) };\n } else if (key === \"codeBlocks\") {\n rule.codeBlocks = { min: 1, ...languageOf(nodes as CodeNode[]) };\n } else {\n // A computed key, as `validator.ts` does it: every other block rule is a\n // bare count, and nine near-identical branches would say less.\n Object.assign(rule, { [key]: { min: 1 } });\n }\n }\n return any ? rule : undefined;\n}\n\n/* -------------------------------------------------------------------------- *\n * Rules\n * -------------------------------------------------------------------------- */\n\n/**\n * A section's heading, as a rule about it.\n *\n * Exact text, because that is what the page shows; a one-of list or a pattern\n * is a generalisation only its author can make. `false` for a section with no\n * heading of its own - the implicit lead section, and the synthesised page -\n * because that is as specific a claim as naming one.\n *\n * An empty title is the one case with no spelling: the schema's `heading`\n * requires a non-empty string, and `false` would be a lie about a section that\n * does have a heading. The key is omitted, which matches any heading.\n */\nfunction inferHeading(section: SectionNode): HeadingRule | undefined {\n if (section.titlePosition === null) return false;\n return section.title.length > 0 ? section.title : undefined;\n}\n\n/** One section, and every section under it. */\nfunction inferRule(section: SectionNode): Rule {\n const rule: Rule = {};\n const heading = inferHeading(section);\n if (heading !== undefined) rule.heading = heading;\n const contains = inferContains(section.children);\n if (contains) rule.contains = contains;\n // Omitted, never `[]`. An absent `sections:` says nothing about the\n // subsections; an empty list says none are permitted.\n if (section.sections.length > 0) {\n rule.sections = section.sections.map(inferRule);\n }\n return rule;\n}\n\n/** The template one page describes: the page rule, with its sections under it. */\nexport function inferTemplate(tree: DocumentTree): Template {\n return inferRule(pageSection(tree));\n}\n\n/* -------------------------------------------------------------------------- *\n * The file\n * -------------------------------------------------------------------------- */\n\n/** Refuse a name the `templates` map cannot hold, in words that name the rule. */\nexport function assertTemplateName(name: string): string {\n if (TEMPLATE_NAME.test(name)) return name;\n throw new LintError(\n `\"${name}\" is not a usable template name. A name starts with a letter and ` +\n `holds only letters, digits, \"-\" and \"_\". Pass --name <name>.`,\n );\n}\n\n/** A one-template file, ready to serialize. */\nexport function inferTemplateFile(\n tree: DocumentTree,\n name: string,\n): TemplateFile {\n return { templates: { [assertTemplateName(name)]: inferTemplate(tree) } };\n}\n\n/**\n * Serialize a template file.\n *\n * `lineWidth: 0` turns off YAML's folding. A folded heading still parses back\n * to the same string, but a template is read and edited by hand, and a heading\n * broken across two lines is the one thing in this output a reader would\n * mistrust.\n */\nexport function renderTemplateFile(\n file: TemplateFile,\n format: InferFormat,\n): string {\n const text =\n format === \"json\"\n ? JSON.stringify(file, null, 2)\n : stringifyYaml(file, { lineWidth: 0 });\n return text.endsWith(\"\\n\") ? text : `${text}\\n`;\n}\n","/**\n * `templates` command cores.\n *\n * `runTemplates` reports the templates a run could resolve: the built-ins, plus\n * the named templates in any files given by `--templates` or by\n * `lint.templates` in the config, with the doctypes each serves.\n *\n * The `types` column is the part worth printing. It is what frontmatter\n * routing will match a page against, so seeing it is how someone works out\n * which `type:` value to write in a page - or that no template claims the one\n * they already wrote.\n *\n * `runTemplatesInfer` writes a first template from a page that already has the\n * shape its author wants. The inference itself is `../core/infer.ts`; what\n * lives here is the plumbing around it - which parser reads the page, what the\n * template is called, and where the file goes.\n *\n * `runTemplateShow` resolves one ref the way `--template` does and returns the\n * template it names, for `src/lint/reporters/template-show.ts` to print.\n *\n * All three return data; `src/lint/reporters/index.ts` renders the listing, and\n * an inferred template is already the text it will be written as.\n */\nimport { existsSync } from \"node:fs\";\nimport { mkdir, readFile } from \"node:fs/promises\";\nimport { basename, dirname, extname, resolve } from \"node:path\";\nimport { errorMessage, ToolError } from \"../../shared/errors.js\";\nimport { writeTextAtomic } from \"../../shared/write-file.js\";\nimport { flareRun } from \"../../shared/flare/index.js\";\nimport { LintError } from \"../types.js\";\nimport type { DocumentParser, DocumentTree } from \"../types.js\";\nimport {\n parserByName,\n parserForExtension,\n unsupportedFormatMessage,\n} from \"../parsers/index.js\";\nimport {\n assertTemplateName,\n inferTemplateFile,\n isInferFormat,\n renderTemplateFile,\n type InferFormat,\n} from \"../core/infer.js\";\nimport type { Template, TemplateFile } from \"../core/template.js\";\nimport { resolveLintRun } from \"../core/config.js\";\nimport {\n classifyRef,\n listBuiltins,\n loadResolvedTemplate,\n loadTemplate,\n loadTemplateFile,\n} from \"../core/template-registry.js\";\n\n/** `TemplateInfo.source` for a template that ships with the tool. */\nexport const BUILTIN_SOURCE = \"builtin\";\n\nexport interface TemplateInfo {\n /** The ref to pass to `--template`. */\n id: string;\n /**\n * Human-readable title. Empty for templates read from a user file: the\n * template DSL has no title field, only the built-in registry carries one.\n */\n title: string;\n /** Doctypes the template serves, matched against a page `type`. */\n types: string[];\n /** `builtin`, or the template file this entry came from. */\n source: string;\n /** Link to the author's guide for the doctype, or null when it names none. */\n guide: string | null;\n}\n\nexport interface TemplatesInfo {\n templates: TemplateInfo[];\n}\n\nexport interface TemplatesOptions {\n /** Template files whose entries join the built-ins. */\n templates?: string | string[];\n}\n\nexport async function runTemplates(\n opts: TemplatesOptions = {},\n): Promise<TemplatesInfo> {\n // A built-in's guide lives in its YAML, not the manifest, so each is loaded.\n // They are cached, and a run that lints pages loads them anyway.\n const templates: TemplateInfo[] = await Promise.all(\n listBuiltins().map(async (builtin) => ({\n id: builtin.id,\n title: builtin.title,\n types: builtin.types,\n source: BUILTIN_SOURCE,\n guide: (await loadTemplate(builtin.id)).guide ?? null,\n })),\n );\n\n // Listed after the built-ins, in the order supplied - the same order\n // `buildTypeIndex` applies them in, so a later entry claiming the same\n // doctype is the one that would win.\n const paths =\n opts.templates == null\n ? []\n : Array.isArray(opts.templates)\n ? opts.templates\n : [opts.templates];\n\n for (const path of paths) {\n const file = await loadTemplateFile(path);\n for (const [id, template] of Object.entries(file.templates ?? {})) {\n templates.push({\n id,\n title: \"\",\n types: template.types ?? [],\n source: path,\n guide: template.guide ?? null,\n });\n }\n }\n\n return { templates };\n}\n\n/* -------------------------------------------------------------------------- *\n * infer\n * -------------------------------------------------------------------------- */\n\n/** The token that means stdin, in every command of the family. */\nconst STDIN = \"-\";\n\n/** What a page read from stdin is called when nothing else names it. */\nconst STDIN_NAME = \"stdin\";\n\nexport interface TemplatesInferOptions {\n /** The one page to infer from: a path, or `-` for stdin. */\n page: string;\n /** `--as`: force an input format, by parser name. */\n as?: string;\n /** `--name`: what to call the template. Defaults to the page's own doctype. */\n name?: string;\n /** `-f/--format`: how the file is written. Defaults to `yaml`. */\n format?: InferFormat;\n /** `-o/--out`: write here instead of returning text for stdout. */\n out?: string;\n /** `--force`: replace an existing `--out`. */\n force?: boolean;\n cwd?: string;\n /** Content for the `-` page, injected by the CLI and by tests. */\n stdinContent?: string;\n /** `-c/--config`. */\n configPath?: string;\n /** `--no-config`: skip discovery. */\n noConfig?: boolean;\n /** Told which config governed the run, and where it came from. */\n onConfigLoaded?: (info: { path: string; dir: string }) => void;\n}\n\nexport interface TemplatesInferResult {\n /** The name the template was written under. */\n name: string;\n /** The inferred file, for a caller that wants the data rather than the text. */\n file: TemplateFile;\n /** The serialized template file, exactly as written. */\n text: string;\n /** Where it was written. Absent without `--out`. */\n written?: string;\n}\n\n/**\n * The parser that reads this page.\n *\n * Resolved before anything is read, as `runLint` does it: a typo in `--as`\n * should fail immediately rather than after a file was opened it was going to\n * mis-parse anyway. A name no parser answers to is unknown whatever it was\n * meant to name, so the message points at the one command that lists them.\n */\nfunction parserFor(page: string, as: string | undefined): DocumentParser {\n if (as !== undefined) {\n const forced = parserByName(as);\n if (forced) return forced;\n throw new LintError(\n `Unknown format \"${as}\". Run \"manni lint tools\" to see the formats manni lint reads.`,\n );\n }\n if (page === STDIN) {\n throw new LintError(\n \"Reading from stdin (-) requires --as <format> to choose a parser.\",\n );\n }\n const ext = extname(page);\n const parser = parserForExtension(ext);\n if (parser) return parser;\n throw new LintError(unsupportedFormatMessage(ext || page));\n}\n\n/**\n * What the template is called: `--name`, else the page's own doctype, else the\n * file's stem.\n *\n * The doctype first because that is the handle the page already carries, and\n * the one `types:` will route on once the author adds it. A file read from\n * stdin has no stem, so it falls back to a word rather than to `-`.\n */\nfunction defaultName(tree: DocumentTree, page: string): string {\n const declared = tree.frontmatter?.[\"type\"];\n if (typeof declared === \"string\" && declared.trim().length > 0) {\n return declared.trim();\n }\n if (page === STDIN) return STDIN_NAME;\n return basename(page, extname(page)) || STDIN_NAME;\n}\n\n/**\n * Infer a template from one page.\n *\n * One page, never a set. A template is a generalisation, and this makes exactly\n * the generalisation one exemplar supports; inferring from several would mean\n * deciding which differences are variation and which are mistakes, which is the\n * author's judgment and not the tool's.\n */\nexport async function runTemplatesInfer(\n opts: TemplatesInferOptions,\n): Promise<TemplatesInferResult> {\n const format = opts.format ?? \"yaml\";\n if (!isInferFormat(format)) {\n throw new LintError(\n `Unknown --format \"${String(format)}\". Use yaml or json.`,\n );\n }\n\n // Which config governs the run, said once, the way every other lint verb\n // says it. With a page typed on the command line the base stays the working\n // directory, so the path means what it looked like it meant.\n const run = await resolveLintRun({\n cwd: opts.cwd ?? process.cwd(),\n ...(opts.configPath === undefined ? {} : { configPath: opts.configPath }),\n ...(opts.noConfig === undefined ? {} : { noConfig: opts.noConfig }),\n inputs: [opts.page],\n ...(opts.onConfigLoaded === undefined\n ? {}\n : { onConfigLoaded: opts.onConfigLoaded }),\n });\n const cwd = run.base;\n\n const parser = parserFor(opts.page, opts.as);\n // A name the schema cannot hold is refused before the page is read, beside\n // the other refusals: a run that is going to fail should leave the working\n // tree, and the reader's terminal, exactly as it found them.\n if (opts.name !== undefined) assertTemplateName(opts.name);\n\n // Every refusal happens before the write, and the `--out` guard happens\n // before the read - the ordering `meta schemas infer` established. The path\n // is echoed as it was typed, because that is the string the reader will edit.\n let absOut: string | undefined;\n if (opts.out !== undefined) {\n absOut = resolve(cwd, opts.out);\n if (opts.force !== true && existsSync(absOut)) {\n throw new LintError(`${opts.out} exists. Pass --force to overwrite it.`);\n }\n }\n\n let content: string;\n if (opts.page === STDIN) {\n content = opts.stdinContent ?? \"\";\n } else {\n try {\n content = await readFile(resolve(cwd, opts.page), \"utf8\");\n } catch (err) {\n // The OS message travels verbatim: \"permission denied\" and \"no such\n // file\" send the reader to different places, and this cannot tell which.\n throw new LintError(\n `\"${opts.page}\" could not be read: ${errorMessage(err)}`,\n );\n }\n }\n\n let tree: DocumentTree;\n try {\n const label = opts.page === STDIN ? \"<stdin>\" : opts.page;\n tree = await parser.parse(content, label, {\n absPath: resolve(cwd, label),\n flare: flareRun(run.tools),\n });\n } catch (err) {\n // A page that will not parse has no shape to infer, and the parser's own\n // message already names the file and the syntax it choked on.\n if (err instanceof ToolError) throw new LintError(err.message);\n throw err;\n }\n\n const name = opts.name ?? defaultName(tree, opts.page);\n const file = inferTemplateFile(tree, name);\n const text = renderTemplateFile(file, format);\n\n if (absOut === undefined) return { name, file, text };\n\n await mkdir(dirname(absOut), { recursive: true });\n await writeTextAtomic(absOut, text);\n return { name, file, text, written: opts.out };\n}\n\n/* -------------------------------------------------------------------------- *\n * show\n * -------------------------------------------------------------------------- */\n\nexport interface TemplateShowOptions {\n /** A built-in id, a path, a `path#name`, or a URL: what `--template` takes. */\n ref: string;\n}\n\n/** One resolved template, after `extends` and `$ref`, with where it came from. */\nexport interface TemplateShow extends Omit<Template, \"extends\" | \"id\"> {\n /** The built-in id, or the template's name inside its file. */\n id: string;\n /** `builtin`, or the file or URL the template came from. */\n source: string;\n}\n\n/**\n * Resolve one template ref and return the template it names.\n *\n * The loader is `--template`'s own, so a ref that fails there fails here with\n * the same message, and a template that inherits shows what it inherited.\n */\nexport async function runTemplateShow(\n opts: TemplateShowOptions,\n): Promise<TemplateShow> {\n const template = await loadResolvedTemplate(opts.ref);\n const { extends: _extends, id: _id, ...body } = template;\n\n if (classifyRef(opts.ref).kind === \"builtin\") {\n const title = listBuiltins().find((b) => b.id === opts.ref)?.title;\n return { id: opts.ref, source: BUILTIN_SOURCE, ...(title ? { title } : {}), ...body };\n }\n\n // A file names its template by fragment, or holds only one - the loader\n // above has already refused anything else.\n const hash = opts.ref.lastIndexOf(\"#\");\n const source = hash === -1 ? opts.ref : opts.ref.slice(0, hash);\n const fragment = hash === -1 ? \"\" : opts.ref.slice(hash + 1);\n const id =\n fragment ||\n // The `?? \"\"` is unreachable: loadResolvedTemplate already refused a file\n // with no templates, and one with several but no fragment.\n (Object.keys((await loadTemplateFile(source)).templates ?? {})[0] ?? \"\");\n return { id, source, ...body };\n}\n","/**\n * `tools` command core. One row per lint job: which tool performs it, whether\n * this checkout can run it, what it read its settings from, and the input\n * formats it understands.\n *\n * It replaces `formats`, which reported the parser registry alone. Proposal\n * 0050 records the rename. The registry is here as one column of the job that\n * reads it, because the formats belong to the tool performing that job.\n *\n * The column lists exactly the formats the tool reads, so a row carries no\n * state: a listed format is one that is read, and `--as` accepts every name in\n * it.\n *\n * Returns data; `src/lint/reporters/index.ts` renders it.\n */\nimport type { ContentKind } from \"../types.js\";\nimport { BLOCK_KIND_NODE } from \"../core/template.js\";\nimport { resolveStructureTool } from \"../tools/index.js\";\nimport {\n LINT_JOBS,\n resolveLintRun,\n type LintConfig,\n type LintJob,\n type LintTool,\n} from \"../core/config.js\";\n\n/**\n * The content kinds a template rule can actually name - `BLOCK_KIND_NODE`'s\n * values, the nine block-rule keys map onto. `manni lint tools` lists this\n * column to answer \"can my rule run against this format\", and a rule can\n * never ask about `listItem`, `tableRow`, `tableCell`, or `definitionItem`:\n * those are structural kinds a parser reports so the content model can\n * describe a list's items or a table's cells, not kinds a `sections:` rule\n * counts on its own. What a parser *declares* (`DocumentParser.kinds`, read by\n * the pruner in `validator.ts`) is untouched - this is a display decision, so\n * it belongs here rather than trimming the declaration itself.\n */\nconst REPORTABLE_KINDS = new Set<ContentKind>(Object.values(BLOCK_KIND_NODE));\n\nexport interface FormatInfo {\n /** Parser name, also what `--as` accepts. */\n name: string;\n label: string;\n extensions: string[];\n /** The content kinds this format's parser actually emits today. */\n kinds: ContentKind[];\n}\n\n/** One job, and the tool that would perform it on this run. */\nexport interface ToolInfo {\n job: LintJob;\n tool: LintTool;\n /** Whether the config declares this job, or anything the job's tool reads. */\n configured: boolean;\n /** Whether the tool can run here, as its own probe reported it. */\n available: boolean;\n /**\n * The version the probe reported, or null when it reported none.\n *\n * Null rather than a placeholder string, because this is the shape\n * `-f json` emits: a consumer can test for an absent version, where a dash\n * would be a value it has to know to recognize. The pretty reporter renders\n * the dash.\n */\n version: string | null;\n /** Where the tool read its settings: the config file, or the defaults. */\n config: string;\n /** The input formats the tool reads. */\n formats: FormatInfo[];\n}\n\nexport interface ToolsOptions {\n cwd?: string;\n /** `-c/--config`. */\n configPath?: string;\n /** `--no-config`: ignore any discovered config file. */\n noConfig?: boolean;\n}\n\n/** What a run with no config file to read reports in the `config` column. */\nexport const BUILT_IN_DEFAULTS = \"built-in defaults\";\n\n/**\n * Whether the config says anything about this job.\n *\n * The job's own mapping counts, and so does every key its tool reads: a repo\n * that has written `templates:` and `overrides:` has configured the structure\n * job whether or not it also spelled `structure:` out. Saying otherwise would\n * report \"not configured\" beside a run those keys visibly govern.\n */\nfunction isConfigured(job: LintJob, config: LintConfig): boolean {\n if (config[job] !== undefined) return true;\n return (\n config.templates !== undefined ||\n config.template !== undefined ||\n config.types !== undefined ||\n config.overrides !== undefined\n );\n}\n\nexport async function runTools(opts: ToolsOptions = {}): Promise<ToolInfo[]> {\n // The same resolution every other command does, so a config this command\n // cannot read is the same exit 2 with the same message, rather than a row\n // saying \"built-in defaults\" over a file that is really there and broken.\n const cwd = opts.cwd ?? process.cwd();\n const run = await resolveLintRun({\n cwd,\n configPath: opts.configPath,\n noConfig: opts.noConfig,\n inputs: [],\n });\n\n return await Promise.all(\n LINT_JOBS.map(async (job) => {\n const tool: LintTool = run.config[job]?.tool ?? \"manni\";\n // The row is the tool's own answer about itself. It used to be two\n // literals that happened to be right while manni was the only tool:\n // \"available\" was hard-coded true, and the version was this package's\n // whatever performed the job.\n const descriptor = resolveStructureTool(tool);\n // The family's `tools:` travels with the probe: a tool outside the\n // package is found where its own `tools.<tool>` says it is, so probing\n // without it would report \"not available\" over the very installation the\n // run would go on to use.\n const probed = await descriptor.probe({\n cwd,\n tools: run.tools,\n ...(run.configDir === undefined ? {} : { configDir: run.configDir }),\n });\n return {\n job,\n tool,\n configured: isConfigured(job, run.config),\n available: probed.available,\n version: probed.version,\n config: run.configSource ?? BUILT_IN_DEFAULTS,\n formats: descriptor.formats().map((format) => ({\n ...format,\n kinds: format.kinds.filter((kind) => REPORTABLE_KINDS.has(kind)),\n })),\n };\n }),\n );\n}\n","/**\n * `manni lint templates show`: what a template asks for, as a reader scans it\n * (`pretty`), as data (`json`), or as a page to start writing from\n * (`markdown`).\n *\n * The content lines use the nouns the count findings use, so \"Contains at\n * least 1 table.\" here and \"Expected at least 1 table\" in a finding read as\n * the same rule.\n */\nimport { palette, type Colors } from \"../../shared/color.js\";\nimport { quoteList } from \"../rules/index.js\";\nimport {\n BLOCK_KINDS,\n occurrenceRange,\n type BlockKind,\n type BlockRule,\n type HeadingRule,\n type Occurrences,\n type Rule,\n} from \"../core/template.js\";\nimport type { TemplateShow } from \"../commands/templates.js\";\nimport type { ReportOptions } from \"./index.js\";\n\n/** `templates show -f`. */\nexport const SHOW_FORMATS = [\"pretty\", \"json\", \"markdown\"] as const;\nexport type ShowFormat = (typeof SHOW_FORMATS)[number];\n\nexport function isShowFormat(value: string): value is ShowFormat {\n return (SHOW_FORMATS as readonly string[]).includes(value);\n}\n\n/** How often a rule may occur, in words. */\nexport function occurrenceWords(rule: Occurrences): string {\n const { min, max } = occurrenceRange(rule);\n if (max === 0) return \"forbidden\";\n if (max === null) {\n if (min === 0) return \"optional, repeats\";\n if (min === 1) return \"required, repeats\";\n return `at least ${min}`;\n }\n if (min === 1 && max === 1) return \"required\";\n if (min === 0 && max === 1) return \"optional\";\n return `${min} to ${max}`;\n}\n\nfunction headingForm(heading: HeadingRule | undefined): string {\n if (heading === undefined) return \"(any heading)\";\n if (heading === false) return \"(no heading)\";\n if (typeof heading === \"string\") return heading;\n if (Array.isArray(heading)) return heading.join(\" | \");\n return `/${heading.pattern}/`;\n}\n\nconst NOUNS: Record<BlockKind, string> = {\n paragraphs: \"paragraph\",\n codeBlocks: \"code block\",\n lists: \"list\",\n tables: \"table\",\n admonitions: \"admonition\",\n images: \"image\",\n blockquotes: \"blockquote\",\n definitionLists: \"definition list\",\n elements: \"element\",\n};\n\n/** The noun one kind's rule counts, narrowed the way its count finding is. */\nfunction noun(kind: BlockKind, block: BlockRule): string {\n if (kind === \"lists\" && block.lists?.ordered !== undefined) {\n return block.lists.ordered ? \"numbered list\" : \"bulleted list\";\n }\n if (kind === \"admonitions\" && block.admonitions?.variant !== undefined) {\n return `${block.admonitions.variant} admonition`;\n }\n const tag = block.elements?.tag;\n if (kind === \"elements\" && tag !== undefined) {\n const tags = Array.isArray(tag) ? tag : [tag];\n return `${tags.map((t) => `\"${t}\"`).join(\" or \")} element`;\n }\n return NOUNS[kind];\n}\n\nfunction plural(word: string, n: number): string {\n return n === 1 ? word : `${word}s`;\n}\n\n/** `at least 1 table`, `at most 3 lists`, `no images`. */\nfunction counted(range: Occurrences, word: string): string {\n const { min, max } = occurrenceRange(range);\n if (max === 0) return `no ${plural(word, 0)}`;\n if (max === null) {\n return min === 0 ? `any number of ${plural(word, 0)}` : `at least ${min} ${plural(word, min)}`;\n }\n if (min === 0) return `at most ${max} ${plural(word, max)}`;\n if (min === max) return `exactly ${min} ${plural(word, min)}`;\n return `${min} to ${max} ${plural(word, max)}`;\n}\n\n/** What else a kind's rule asks of each thing it counts. */\nfunction qualifiers(block: BlockRule): string {\n const parts: string[] = [];\n if (block.paragraphs?.pattern !== undefined) {\n parts.push(`each matching /${block.paragraphs.pattern}/`);\n }\n const language = block.codeBlocks?.language;\n if (language !== undefined) {\n parts.push(`in ${(Array.isArray(language) ? language : [language]).join(\" or \")}`);\n }\n if (block.codeBlocks?.fenceInfo !== undefined) {\n parts.push(`with fence info \"${block.codeBlocks.fenceInfo}\"`);\n }\n if (block.lists?.items !== undefined) {\n parts.push(`each with ${counted(block.lists.items, \"item\")}`);\n }\n if (block.tables?.columns !== undefined) {\n parts.push(`with columns ${quoteList(block.tables.columns)}`);\n }\n return parts.map((p) => `, ${p}`).join(\"\");\n}\n\n/** The content minimums a rule sets, one line per kind, then its order. */\nfunction contentLines(rule: Rule): string[] {\n const lines: string[] = [];\n const contains = rule.contains;\n if (contains !== undefined) {\n for (const kind of BLOCK_KINDS) {\n const range = contains[kind];\n if (range === undefined) continue;\n lines.push(\n `Contains ${counted(range, noun(kind, contains))}${qualifiers({ [kind]: range })}.`,\n );\n }\n }\n if (rule.sequence !== undefined) {\n const kinds = rule.sequence.flatMap((entry) => {\n const kind = BLOCK_KINDS.find((k) => entry[k] !== undefined);\n return kind === undefined ? [] : [noun(kind, entry)];\n });\n lines.push(`In order: ${kinds.join(\", \")}.`);\n }\n return lines;\n}\n\nfunction detailLines(rule: Rule): string[] {\n return [...contentLines(rule), ...(rule.description === undefined ? [] : [rule.description])];\n}\n\n/* -------------------------------------------------------------------------- *\n * pretty\n * -------------------------------------------------------------------------- */\n\nfunction prettyRule(c: Colors, rule: Rule, level: number, indent: number, out: string[]): void {\n const pad = \" \".repeat(indent);\n const hashes = \"#\".repeat(level);\n const occurs = c.dim(occurrenceWords(rule));\n if (rule.repeat !== undefined) {\n const group = rule.id === undefined ? \"(group)\" : `(group ${rule.id})`;\n out.push(`${pad}${hashes} ${group} ${occurs}`);\n } else {\n const id = rule.id === undefined ? \"\" : `${c.cyan(rule.id)} · `;\n out.push(`${pad}${hashes} ${headingForm(rule.heading)} ${id}${occurs}`);\n }\n for (const line of detailLines(rule)) out.push(`${pad} ${line}`);\n for (const member of rule.repeat ?? []) prettyRule(c, member, level, indent + 2, out);\n for (const section of rule.sections ?? []) {\n prettyRule(c, section, level + 1, indent + 2, out);\n }\n}\n\nfunction renderPrettyShow(show: TemplateShow, c: Colors): string {\n const title = show.title ? ` ${c.dim(\"—\")} ${show.title}` : \"\";\n const lines = [`${c.bold(show.id)}${title}`];\n if (show.types !== undefined && show.types.length > 0) {\n lines.push(` types: ${show.types.join(\", \")}`);\n }\n if (show.description !== undefined) lines.push(` ${show.description}`);\n for (const line of contentLines(show)) lines.push(` ${line}`);\n if (show.guide !== undefined) lines.push(` Guide: ${show.guide}`);\n const sections = show.sections ?? [];\n if (sections.length > 0) lines.push(\"\");\n for (const section of sections) prettyRule(c, section, 2, 2, lines);\n return lines.join(\"\\n\");\n}\n\n/* -------------------------------------------------------------------------- *\n * markdown\n * -------------------------------------------------------------------------- */\n\n/** The rules a skeleton writes: no catch-all at the end, nothing forbidden. */\nfunction skeletonRules(rules: Rule[] | undefined): Rule[] {\n const kept = (rules ?? []).filter((rule) => occurrenceRange(rule).max !== 0);\n const last = kept[kept.length - 1];\n if (\n last !== undefined &&\n last.id === undefined &&\n last.heading === undefined &&\n last.repeat === undefined\n ) {\n kept.pop();\n }\n return kept;\n}\n\nfunction sentence(text: string): string {\n const trimmed = text.trim();\n return /[.!?]$/.test(trimmed) ? trimmed : `${trimmed}.`;\n}\n\n/** One HTML comment. `--` may not appear inside one, so dashes are spaced. */\nfunction comment(parts: string[]): string {\n return `<!-- ${parts.join(\" \").replace(/-(?=-)/g, \"- \")} -->`;\n}\n\nfunction capitalise(text: string): string {\n return text.charAt(0).toUpperCase() + text.slice(1);\n}\n\n/** The heading a skeleton writes: the exact text, or the first of a list. */\nfunction headingText(heading: HeadingRule | undefined): string | undefined {\n if (typeof heading === \"string\") return heading;\n return Array.isArray(heading) ? heading[0] : undefined;\n}\n\nfunction markdownRule(rule: Rule, level: number, out: string[]): void {\n if (rule.repeat !== undefined) {\n for (const member of skeletonRules(rule.repeat)) markdownRule(member, level, out);\n } else {\n if (rule.heading !== false) {\n const text = headingText(rule.heading) ?? `{${rule.id ?? \"section\"}}`;\n out.push(`${\"#\".repeat(level)} ${text}`, \"\");\n }\n out.push(\n comment([sentence(capitalise(occurrenceWords(rule))), ...detailLines(rule).map(sentence)]),\n \"\",\n );\n }\n for (const section of skeletonRules(rule.sections)) markdownRule(section, level + 1, out);\n}\n\nfunction renderMarkdownShow(show: TemplateShow): string {\n const lines: string[] = [];\n const type = show.types?.[0];\n if (type !== undefined) lines.push(\"---\", `type: ${type}`, \"---\", \"\");\n lines.push(`# ${headingText(show.heading) ?? \"{Title}\"}`, \"\");\n const parts = [\n sentence(show.id),\n ...contentLines(show),\n ...(show.description === undefined ? [] : [sentence(show.description)]),\n ...(show.guide === undefined ? [] : [`Guide: ${show.guide}`]),\n ];\n lines.push(comment(parts), \"\");\n for (const section of skeletonRules(show.sections)) markdownRule(section, 2, lines);\n return lines.join(\"\\n\").trimEnd();\n}\n\n/** Render one shown template. */\nexport function renderTemplateShow(\n show: TemplateShow,\n format: ShowFormat,\n opts: ReportOptions = {},\n): string {\n if (format === \"json\") return JSON.stringify(show, null, 2);\n if (format === \"markdown\") return renderMarkdownShow(show);\n return renderPrettyShow(show, palette(opts.color ?? false));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAS,aAAa,qBAAqB;AAsBpC,IAAM,gBAAgB,CAAC,QAAQ,MAAM;AAGrC,SAAS,cAAc,OAAqC;AACjE,SAAQ,cAAoC,SAAS,KAAK;AAC5D;AAUA,IAAM,gBAAgB;AAGtB,IAAM,WAAW,IAAI;AAAA,EACnB,YAAY,IAAI,CAAC,QAAQ,CAAC,gBAAgB,GAAG,GAAG,GAAG,CAAC;AACtD;AAOA,SAAS,SAAmB;AAC1B,SAAO;AAAA,IACL,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,EAAE;AAAA,IACvC,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,EAAE;AAAA,EACvC;AACF;AAGA,SAAS,KAAK,UAAmC;AAC/C,QAAM,QAAQ,SAAS,CAAC;AACxB,QAAM,OAAO,SAAS,SAAS,SAAS,CAAC;AACzC,MAAI,CAAC,SAAS,CAAC,KAAM,QAAO,OAAO;AACnC,SAAO,EAAE,OAAO,EAAE,GAAG,MAAM,SAAS,MAAM,GAAG,KAAK,EAAE,GAAG,KAAK,SAAS,IAAI,EAAE;AAC7E;AAaA,SAAS,YAAY,MAAiC;AACpD,QAAM,CAAC,IAAI,IAAI,KAAK;AACpB,MAAI,KAAK,SAAS,W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AC;AAAA,IACrE,GAAI,KAAK,UAAU,SAAY,CAAC,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE;AAAA,EAC7D;AACA,QAAM,KAAK,QAAQ,KAAK,GAAG,EAAE;AAC7B,aAAW,WAAW,cAAc,KAAK,QAAQ,EAAG,cAAa,SAAS,GAAG,KAAK;AAClF,SAAO,MAAM,KAAK,IAAI,EAAE,QAAQ;AAClC;AAGO,SAAS,mBACd,MACA,QACA,OAAsB,CAAC,GACf;AACR,MAAI,WAAW,OAAQ,QAAO,KAAK,UAAU,MAAM,MAAM,CAAC;AAC1D,MAAI,WAAW,WAAY,QAAO,mBAAmB,IAAI;AACzD,SAAO,iBAAiB,MAAM,QAAQ,KAAK,SAAS,KAAK,CAAC;AAC5D;","names":[]}
@@ -6,10 +6,10 @@ import {
6
6
  loadGraderPlugins,
7
7
  parseNewerThan,
8
8
  urlManifestRefusal
9
- } from "./chunk-Y23L2GNH.js";
9
+ } from "./chunk-AONT5QCO.js";
10
10
  import {
11
11
  discoverArtifacts
12
- } from "./chunk-7EFXQOTZ.js";
12
+ } from "./chunk-AXMVISW7.js";
13
13
  import {
14
14
  discoverTraces
15
15
  } from "./chunk-4TSWU2SU.js";
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-TT5UDTDM.js";
19
19
  import {
20
20
  discoverConfig
21
- } from "./chunk-3ZVRGBK6.js";
21
+ } from "./chunk-BTFXOKCP.js";
22
22
  import {
23
23
  assertProviderSelection,
24
24
  constructProvider,
@@ -35,7 +35,7 @@ import {
35
35
  externalWriteWarnings,
36
36
  mergeMetaProvenance,
37
37
  offerExternalHomes
38
- } from "./chunk-VK34UKBY.js";
38
+ } from "./chunk-X3FSKK53.js";
39
39
  import {
40
40
  keyHome,
41
41
  marksValidator,
@@ -43,12 +43,12 @@ import {
43
43
  readManifestOrEmpty,
44
44
  readManifestValue,
45
45
  spliceManifestValue
46
- } from "./chunk-MJBGGFSN.js";
46
+ } from "./chunk-OBFIWPEB.js";
47
47
  import {
48
48
  DocmetaError,
49
49
  extractFrontmatter,
50
50
  writeFileAtomic
51
- } from "./chunk-3D7VBQXN.js";
51
+ } from "./chunk-HQRXE6QY.js";
52
52
  import {
53
53
  SEVERITIES
54
54
  } from "./chunk-77AINBYM.js";
@@ -1193,4 +1193,4 @@ export {
1193
1193
  runFill,
1194
1194
  renderFill
1195
1195
  };
1196
- //# sourceMappingURL=chunk-O4MKNFMM.js.map
1196
+ //# sourceMappingURL=chunk-MMS3I5ZH.js.map
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  findingMessage
4
- } from "./chunk-KDV7GPCU.js";
4
+ } from "./chunk-LESYV3TT.js";
5
5
  import {
6
6
  errorSite
7
- } from "./chunk-6I7DQ4RL.js";
7
+ } from "./chunk-5QPLKYLM.js";
8
8
  import {
9
9
  RULE_ID_PREFIX,
10
10
  guidanceFor,
11
11
  isCiteRule
12
- } from "./chunk-MMYFT7FI.js";
12
+ } from "./chunk-4NCNVKZS.js";
13
13
  import {
14
14
  renderSarif
15
- } from "./chunk-WPIBGNKM.js";
15
+ } from "./chunk-JWS4OKOZ.js";
16
16
  import {
17
17
  guidanceLines
18
18
  } from "./chunk-QK6VYJHV.js";
@@ -79,4 +79,4 @@ export {
79
79
  withFindingMessages,
80
80
  renderCheckSarif
81
81
  };
82
- //# sourceMappingURL=chunk-KKCOXRSU.js.map
82
+ //# sourceMappingURL=chunk-NXJMRIKW.js.map
@@ -69,7 +69,7 @@ import {
69
69
  supportedExtensions,
70
70
  toJsonText,
71
71
  writeFileAtomic
72
- } from "./chunk-3D7VBQXN.js";
72
+ } from "./chunk-HQRXE6QY.js";
73
73
  import {
74
74
  STDIN_LINES_MARKER
75
75
  } from "./chunk-YEUYKR62.js";
@@ -94,7 +94,7 @@ import {
94
94
  pageManifestPath,
95
95
  parseCollections,
96
96
  sameFile
97
- } from "./chunk-JF4BC7ZD.js";
97
+ } from "./chunk-CDX4QK6O.js";
98
98
  import {
99
99
  ToolError,
100
100
  errorMessage
@@ -9086,4 +9086,4 @@ export {
9086
9086
  reportConfig,
9087
9087
  runValidate
9088
9088
  };
9089
- //# sourceMappingURL=chunk-MJBGGFSN.js.map
9089
+ //# sourceMappingURL=chunk-OBFIWPEB.js.map
@@ -14,4 +14,4 @@ var LintError = class extends ToolError {
14
14
  export {
15
15
  LintError
16
16
  };
17
- //# sourceMappingURL=chunk-TI4DA6DF.js.map
17
+ //# sourceMappingURL=chunk-OPF3NOKF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lint/types.ts"],"sourcesContent":["/**\n * The contract every other module is written against.\n *\n * Two shapes matter. `DocumentTree` is what a parser owes the rest of the tool:\n * a nested section tree with real source positions, in a vocabulary that has\n * nothing to do with Markdown. `Finding` is what the tool owes its caller.\n * Everything between the two - matching, rules, reporting - touches neither\n * mdast nor Asciidoctor nor parse5, which is what lets a new input format be\n * one file plus a line in the parser registry.\n */\n\nimport { ToolError } from \"../shared/errors.js\";\nimport type { Severity } from \"../shared/severity.js\";\nimport type { Guidance } from \"../shared/guidance.js\";\nimport type { FlareRun } from \"../shared/flare/index.js\";\n\n/**\n * Operational/usage failure. Exits 2; never used for lint findings.\n *\n * Extends the umbrella's `ToolError`, which is what the shared bin runner\n * matches on; the subclass stays so this tool's tests and library callers can\n * match on it by name. Named for its domain, as `A11yError`, `CiteError` and\n * `KeyError` are.\n */\nexport class LintError extends ToolError {\n constructor(message: string) {\n super(message);\n this.name = \"LintError\";\n }\n}\n\n/** A point in a source file. Line and column are 1-based, offset 0-based. */\nexport interface Point {\n line: number;\n column: number;\n offset: number;\n}\n\n/** A half-open source span, `start` inclusive and `end` exclusive. */\nexport interface Position {\n start: Point;\n end: Point;\n}\n\n/**\n * Content kinds a section can hold, named generically so a rule written once\n * works on every format. Each parser maps its own AST onto these: mdast\n * `paragraph`/`code`/`list`, Asciidoctor `paragraph`/`listing`/`ulist`|`olist`,\n * HTML `<p>`/`<pre>`/`<ul>` - all three onto `paragraph`/`codeBlock`/`list`.\n *\n * The vocabulary is wider than any one parser emits today. `table`,\n * `admonition`, `image`, `blockquote`, `definitionList`, and `element` are\n * declared here, and in each `DocumentParser.kinds`, only once a parser\n * actually produces them - see `src/lint/parsers/index.ts`.\n */\nexport type ContentKind =\n | \"paragraph\"\n | \"codeBlock\"\n | \"list\"\n | \"listItem\"\n | \"table\"\n | \"tableRow\"\n | \"tableCell\"\n | \"admonition\"\n | \"image\"\n | \"blockquote\"\n | \"definitionList\"\n | \"definitionItem\"\n | \"element\";\n\nexport interface ContentNodeBase {\n kind: ContentKind;\n position: Position;\n /** Plain-text rendering, used by pattern rules. */\n text: string;\n}\n\nexport interface ParagraphNode extends ContentNodeBase {\n kind: \"paragraph\";\n}\n\nexport interface CodeNode extends ContentNodeBase {\n kind: \"codeBlock\";\n /** Language, when the format carries one. */\n language?: string;\n /** The info-string tail after the language, when the format carries one. */\n fenceInfo?: string;\n}\n\nexport interface ListItemNode {\n kind: \"listItem\";\n position: Position;\n text: string;\n /** Nested content, so item-level paragraph/code/list rules can run. */\n children: ContentNode[];\n}\n\nexport interface ListNode extends ContentNodeBase {\n kind: \"list\";\n ordered: boolean;\n items: ListItemNode[];\n}\n\nexport interface TableCellNode extends ContentNodeBase {\n kind: \"tableCell\";\n children: ContentNode[];\n}\n\nexport interface TableRowNode extends ContentNodeBase {\n kind: \"tableRow\";\n header: boolean;\n children: TableCellNode[];\n}\n\nexport interface TableNode extends ContentNodeBase {\n kind: \"table\";\n children: TableRowNode[];\n}\n\n/**\n * A callout, and the flavor the source gave it.\n *\n * `variant` is optional because not every format names one this vocabulary\n * has. reStructuredText has `hint`, `attention`, `error` and a generic\n * `admonition` directive, and a bare HTML `<aside>` says nothing at all. Those\n * produce an admonition with no variant rather than an invented equivalence:\n * mapping `hint` onto `tip` would make `variant: tip` pass on a page that\n * never said tip. A `variant:` rule reports such a node as a mismatch, and a\n * plain count rule still counts it.\n */\nexport interface AdmonitionNode extends ContentNodeBase {\n kind: \"admonition\";\n variant?: \"note\" | \"tip\" | \"important\" | \"caution\" | \"warning\" | \"danger\";\n children: ContentNode[];\n}\n\nexport interface ImageNode extends ContentNodeBase {\n kind: \"image\";\n url: string;\n alt: string;\n title?: string;\n}\n\nexport interface BlockquoteNode extends ContentNodeBase {\n kind: \"blockquote\";\n children: ContentNode[];\n}\n\nexport interface DefinitionItemNode {\n kind: \"definitionItem\";\n position: Position;\n text: string;\n term: string;\n definition: ContentNode[];\n}\n\nexport interface DefinitionListNode extends ContentNodeBase {\n kind: \"definitionList\";\n children: DefinitionItemNode[];\n}\n\n/**\n * A named wrapper - an MDX/JSX component today, and where HTML and DITA may\n * eventually anchor a custom element. Its children are its own content, never\n * the enclosing section's: a rule reading a section's `children` must not see\n * inside an `<Element>` it did not ask about.\n */\nexport interface ElementNode extends ContentNodeBase {\n kind: \"element\";\n name: string;\n attributes?: Record<string, string | true>;\n children: ContentNode[];\n}\n\nexport type ContentNode =\n | ParagraphNode\n | CodeNode\n | ListNode\n | TableNode\n | AdmonitionNode\n | ImageNode\n | BlockquoteNode\n | DefinitionListNode\n | ElementNode;\n\n/**\n * One section of a document, demarcated by a heading.\n *\n * `slug`/`title`/`level`/`order`/`parentSlug` intentionally match manni graph's\n * `Section` (dockg/src/types.ts), so its graph can be built from this tree.\n *\n * `children` is in document order and is the single source of truth: the\n * paragraph/codeBlock/list counts every rule needs are queries over it, not\n * separately maintained arrays.\n */\nexport interface SectionNode {\n /** Slug of the heading, disambiguated across the document (`install-1`). */\n slug: string;\n /** Heading text, with inline markup flattened. */\n title: string;\n /** Heading level, 1-6. 0 for the implicit lead section before any heading. */\n level: number;\n /** 1-based position among siblings under the same parent. */\n order: number;\n /** Slug of the enclosing section, or null at the top level. */\n parentSlug: string | null;\n /** Span of the title itself. Null for the implicit lead section. */\n titlePosition: Position | null;\n /**\n * The anchor the source itself gives this section, verbatim - an HTML `id`,\n * a DITA `@id`, an AsciiDoc `[[id]]`, a reST `.. _label:` - when it gives\n * one. `slug` stays the slugged title either way: a link written against\n * the source's own id resolves through this, and nothing lint matches on\n * reads it.\n */\n id?: string;\n /**\n * Set on the level-1 section `withMetadataTitle` made from a metadata\n * `title`, so a consumer can tell it from a heading the author wrote. Its\n * `titlePosition` is not enough: a reST title read back as docinfo shares\n * its span with the frontmatter, written or not.\n */\n synthetic?: true;\n /** Span of the whole section: its heading through the last node before the next sibling heading. */\n position: Position;\n /** Direct content, in document order, excluding anything owned by a subsection. */\n children: ContentNode[];\n /** Nested sections, in document order. */\n sections: SectionNode[];\n}\n\n/** What a parser returns for one file. */\nexport interface DocumentTree {\n /** Name of the parser that produced this (`markdown`, `asciidoc`, ...). */\n format: string;\n /** Path the content came from, for error messages. */\n filePath: string;\n /** Raw frontmatter/metadata values, or null when the file carries none. */\n frontmatter: Record<string, unknown> | null;\n /** Span of the frontmatter block, for anchoring findings about it. */\n frontmatterPosition: Position | null;\n /** Top-level sections, in document order. */\n sections: SectionNode[];\n /**\n * Link targets exactly as the source wrote them, in document order, for\n * `manni graph`. No lint rule reads them. Each parser decides what counts:\n * an anchor to elsewhere does, and a stylesheet, a heading's own permalink,\n * or a key reference resolved only at build time does not.\n */\n links: { target: string; position: Position }[];\n /**\n * The MadCap Flare project a topic resolved against, and its target\n * (proposal 0125). Absent for every other page, and for a topic no project\n * holds. `excluded` marks a topic whose root the target excludes: its\n * resolved view, and so `sections`, is empty, while `links` stay.\n */\n flare?: {\n /** The `.flprj` file's name. */\n project: string;\n target?: { name: string; from: \"tools.flare.target\" | \"the only target\" };\n excluded?: true;\n };\n}\n\n/**\n * What a parser may read beyond the page's own bytes. `parse`'s `filePath`\n * is a display label, so the absolute path rides here. A MadCap Flare topic\n * resolves against its project through `flare` (proposal 0125). A parser\n * with no use for either ignores them.\n */\nexport interface ParseContext {\n absPath: string;\n flare?: FlareRun;\n}\n\n/**\n * A parser for one input format.\n *\n * Shaped after docmeta's `MetadataExtractor` so the two registries read the\n * same way. A format is registered only when its parser reads it, so every\n * registered format is one the tool reads, and an extension no parser claims is\n * skipped by name rather than parsed as Markdown.\n */\nexport interface DocumentParser {\n /** Stable name, also used as `DocumentTree.format`. */\n name: string;\n /** Human-readable label for `manni lint tools`. */\n label: string;\n /**\n * The content kinds this parser actually emits today. A capability\n * declaration, not the full `ContentKind` vocabulary: a kind absent here is\n * one no rule will ever see from this parser's trees, whatever the format\n * could in principle represent.\n */\n kinds: ContentKind[];\n /** Lowercase file extensions this parser handles, incl. dot (e.g. \".md\"). */\n extensions: string[];\n /**\n * Extensions safe to collect from a directory walk. Defaults to\n * `extensions`.\n *\n * The two differ when an extension is a generic container rather than a\n * documentation format. `.xml` is the case: this parser can read a DocBook\n * or DITA document named explicitly, but a docs tree also contains\n * `pom.xml`, `sitemap.xml`, and `.csproj`, and sweeping those in turns a\n * clean run into a failure about files the user never asked to lint.\n */\n walkExtensions?: string[];\n /**\n * Parse raw file content into the generic tree. AsciiDoc's parser returns a\n * promise, because Asciidoctor loads a document asynchronously; the others\n * return the tree itself. A caller awaits either.\n */\n parse(\n content: string,\n filePath: string,\n context?: ParseContext,\n ): DocumentTree | Promise<DocumentTree>;\n}\n\n/**\n * How much a finding weighs, on the one scale every manni tool speaks\n * (`src/shared/severity.ts`): `notice | warning | error`.\n *\n * Almost every structural finding is an `error`, since a template either\n * describes a document or it does not. `unsupported_content_kind` is the\n * exception and is a `warning`: the rule never ran, so the page may still be\n * fine, and a warning never moves the exit code.\n *\n * The scale is the family's and not this tool's private pair, because a flag\n * or config key two domains both have carries the same name *and* the same\n * values. Re-exported so `lint.Severity` names the same type a caller already\n * has.\n */\nexport type { Severity };\n\n/**\n * One structural violation.\n *\n * The field set is pinned by manni docevals' tool adapter, which reads\n * `{ type, heading, message, position }` off the JSON reporter. Additions are\n * safe; renames are not.\n */\nexport interface Finding {\n /** Machine-readable rule id, e.g. `missing_section`. */\n type: string;\n /** Heading of the section the finding is anchored to, if any. */\n heading: string | null;\n message: string;\n position: Position;\n severity: Severity;\n /**\n * The template that judged the page and the rule this finding is about, so\n * an author reads what the section is for beside what is wrong with it.\n * `null` when no template stands behind the finding: a parse failure, an\n * unknown doctype, a broken template, or a tool other than manni.\n */\n template?: FindingTemplate | null;\n}\n\n/**\n * What a template asks for, as a finding carries it: the family's guidance\n * shape (`src/shared/guidance.ts`) under lint's released name.\n *\n * - `id` is the template's ref, as `manni lint templates` lists it and\n * `--template` takes it.\n * - `rule` is the rule's `id`. `null` for a rule without one, the template\n * itself, or no rule at all.\n * - `description` is the rule's `description`, or `null` when it has none.\n * - `guide` is the template's `guide`, after `extends`, or `null`.\n */\nexport type FindingTemplate = Guidance;\n\n/**\n * Why a file was not linted.\n *\n * `unreadable` is the one that is not about the document: the file was found,\n * claimed by a parser, and then could not be opened - a denied permission, a\n * symlink loop, a page a doc build moved between the walk and the read. It is a\n * skip rather than a finding because nothing was checked, and calling it a\n * finding would report the docs as wrong when the filesystem was.\n *\n * `excluded` is a MadCap Flare topic whose root carries conditions the run's\n * target excludes (proposal 0125): the target does not build it.\n */\nexport type SkipReason = \"no-template\" | \"unsupported-format\" | \"unreadable\" | \"excluded\";\n\n/** Result of linting one file. */\nexport interface FileResult {\n file: string;\n /** True when the file was linted and produced no findings. */\n success: boolean;\n findings: Finding[];\n /** Template id/ref applied, or null when skipped. */\n template: string | null;\n /** Set when the file was skipped rather than linted. */\n skipped?: SkipReason;\n}\n"],"mappings":";;;;;;AAwBO,IAAM,YAAN,cAAwB,UAAU;AAAA,EACvC,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;","names":[]}
@@ -18,4 +18,4 @@ export {
18
18
  FIX_GUIDE,
19
19
  DocevalsError
20
20
  };
21
- //# sourceMappingURL=chunk-CLH4ZYNG.js.map
21
+ //# sourceMappingURL=chunk-OZH46DBT.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/docevals/types.ts"],"sourcesContent":["/**\n * Shared result model for manni docevals.\n *\n * Vocabulary follows the \"Docs as Evals\" methodology (Docs as Tests with AI):\n * every check is an *eval*; what differs is its *grader* (code-based, LLM-as-\n * judge, or human). Verdicts are binary pass/fail — aggregate rates emerge from\n * binary judgments, they are never assigned per item.\n */\nimport { ToolError } from \"../shared/errors.js\";\nimport type { Severity } from \"../shared/severity.js\";\nimport type { Guidance } from \"../shared/guidance.js\";\n\n// The judge vocabulary is shared with the inference layer and is re-exported\n// here so manni docevals code and its consumers keep one import site. A second local\n// definition would be a second thing to keep in sync.\n//\n// Match — a single run's verdict; `partial` counts as fail\n// Zone — confidence-zone routing for AI-judged evals\n// JudgeVerdict — the structured verdict of one run (the book's shape)\n// JudgeRun — one run within an ensemble\n// ConsensusResult — the aggregated outcome for one (page, eval) pair\nimport type { ConsensusResult } from \"@hawkeyexl/inference\";\n\nexport type {\n ConsensusResult,\n JudgeRun,\n JudgeVerdict,\n Match,\n Zone,\n} from \"@hawkeyexl/inference\";\n\n/**\n * Regression evals guard behavior that must keep working (~100% target pass\n * rate). Capability evals probe what the docs/system can do (~70% target).\n */\nexport type EvalType = \"capability\" | \"regression\";\n\n/**\n * Finding severity for deterministically graded evals: the family scale,\n * `notice | warning | error`, from `src/shared/severity.ts`. Only `error`\n * affects exit codes.\n */\nexport type { Severity };\n\n/** The page every docevals finding links to. */\nexport const FIX_GUIDE = \"https://hawkeyexl.github.io/manni/docevals/fix/\";\n\n/** How an eval is graded. `tool:regex` is the built-in `tool:*` kind; `registerGrader` adds others. */\nexport type GraderKind = \"ai\" | \"command\" | \"human\" | `tool:${string}`;\n\n/** A normalized finding from a deterministically graded eval (command or tool). */\nexport interface Finding {\n /** Name of the eval that produced this finding. */\n evalName: string;\n /** Repo-relative path of the page the finding applies to. */\n file: string;\n /** Grader-specific rule id (e.g. \"regex/found\"), when available. */\n ruleId?: string;\n message: string;\n severity: Severity;\n /**\n * This finding is about the *grader*, not the page: the tool could not be\n * run, or its output could not be read. It fails the eval whatever severity\n * the eval is configured at, because an eval configured `severity: warning`\n * would otherwise pass while its check never executed (ADR 01022).\n *\n * A finding about the page carries the eval's severity as usual.\n */\n diagnostic?: boolean;\n line?: number;\n col?: number;\n}\n\n/** Result of one eval applied to one page. */\nexport interface EvalResult {\n evalName: string;\n /**\n * Suite this result reports under. Stamped centrally by the engine, which\n * already computes the mapping for the suite summaries — the alternative is\n * threading it through every one of the ~30 places a result is constructed.\n */\n suite?: string;\n type: EvalType;\n grader: GraderKind;\n file: string;\n /**\n * Where the page declares the eval: the item of its `evals` key that names\n * it, in the page or in the manifest that supplied the key (proposal 0037).\n * A suite eval the page never names points at its `eval-suite` key, or at\n * the page alone when the suite is the config's default. `file` is spelled\n * like `file`, and `line` is 1-based and absent when nothing records one.\n *\n * Stamped centrally by the engine, like `suite`, on every result it\n * reports.\n */\n location?: { file: string; line?: number };\n /**\n * The page content this result judged, as `sha256-<hex>`: the SHA-256 of\n * the whole file as the run read it, frontmatter included (proposal 0090).\n * Every result for one page carries the same value. Stamped centrally by\n * the engine, like `suite`.\n */\n integrity?: string;\n /**\n * What the eval asks for (proposal 0089): `id` is the file that declares\n * it, `rule` its name, `description` its assertion, and `guide` the fix\n * page. Stamped centrally by the engine on every result, passing ones too.\n */\n guidance?: Guidance | null;\n outcome: \"pass\" | \"fail\" | \"needs-review\" | \"skipped\" | \"error\";\n /**\n * The persona record ids the judge read the page as, in the page's order\n * (proposal 0111). Present only on a judged result of an eval with\n * `readers: personas` whose page names a persona record.\n */\n personas?: string[];\n /** Present for ai-graded evals. */\n consensus?: ConsensusResult;\n /** Present for command/tool-graded evals that produced findings. */\n findings?: Finding[];\n /** True when this run generated the eval's check script. */\n generated?: boolean;\n /** Set when a persisted human review resolved a needs-review outcome. */\n via?: \"human-review\";\n /**\n * Findings the baseline already recorded and this run therefore suppressed\n * (ADR 01017). Present only on a run with a baseline in effect, so its\n * absence means \"no baseline\", not \"nothing was forgiven\".\n */\n baselined?: number;\n skipReason?: string;\n /**\n * The eval's weight in its suite's pass rate. Stamped centrally by the\n * engine alongside `suite`, and for the same reason: threading it through\n * the ~30 sites that construct a result would be thirty chances to forget.\n */\n weight?: number;\n /**\n * Set when the model that judged this eval also produced what it graded.\n *\n * `content` — the machines attributed for what the eval's `target` reads\n * name this model (`provenance` for the body, the `fields` of\n * `meta-provenance` for the frontmatter, both for `raw`): the judge wrote\n * what it grades. `criterion` — a `meta-provenance` entry for this model\n * lists this eval under `evals`: the judge wrote the question. Both bias a\n * verdict without invalidating it, so this rides along with a real outcome\n * rather than replacing it, and reaches every reporter instead of stderr.\n */\n selfPreference?: { axis: \"content\" | \"criterion\"; model: string };\n durationMs: number;\n}\n\n/** Per-suite aggregate. Pass rates emerge from binary outcomes. */\nexport interface SuiteSummary {\n suite: string;\n total: number;\n passed: number;\n failed: number;\n needsReview: number;\n skipped: number;\n errored: number;\n /**\n * Weighted share of the graded set that passed, 1 when nothing ran.\n *\n * The graded set is pass + fail + error, as it has always been —\n * `needs-review` and `skipped` are in neither half, so a page awaiting review\n * neither helps nor hurts. Each eval contributes its `weight` (1 unless it\n * says otherwise), and an eval that belongs to a criterion contributes\n * nothing on its own: the criterion contributes once, for the group.\n */\n passRate: number;\n /** From config: ~1.0 for regression suites, ~0.7 for capability suites. */\n targetPassRate: number;\n meetsTarget: boolean;\n /**\n * Set when a selection filter (`--eval` / `--suite`) was active, meaning the\n * run measured part of this suite. `meetsTarget` is then always false and the\n * suite cannot fail the run either: it has numbers, but no verdict.\n */\n partial?: boolean;\n /**\n * Criteria scored in this suite. Present only when the suite declares any,\n * so its absence means \"none\", never \"none passed\".\n *\n * `suspended` counts criteria whose members were not all graded in this run.\n * They are out of the rate entirely rather than counted as failures — the\n * same reasoning as `partial` one level down (ADR 01018): a group measured\n * in part has numbers but no verdict.\n */\n criteria?: {\n total: number;\n passed: number;\n failed: number;\n suspended: number;\n };\n}\n\n/** Full run output consumed by reporters. */\nexport interface RunReport {\n pages: number;\n evalResults: EvalResult[];\n suites: SuiteSummary[];\n /**\n * Judge telemetry. Counts, not money: the dollar figure this block used to\n * carry was only as good as a price table this repo does not own, and was\n * absent entirely for `claude-cli` and self-hosted endpoints (ADR 01019).\n */\n usage: {\n totalTokens: number;\n cachedEvals: number;\n judgedEvals: number;\n };\n /** Script generations performed during this run (paths written). */\n generated: string[];\n exitCode: 0 | 1;\n}\n\n/** Operational/usage error → exit code 2. */\nexport class DocevalsError extends ToolError {\n constructor(\n message: string,\n /**\n * Set where a caller acts on the kind of error rather than reporting it.\n * `nothing-resolved`: no page this run would check resolves an eval.\n */\n readonly code?: \"nothing-resolved\",\n ) {\n super(message);\n this.name = \"DocevalsError\";\n }\n}\n"],"mappings":";;;;;;AA6CO,IAAM,YAAY;AA6KlB,IAAM,gBAAN,cAA4B,UAAU;AAAA,EAC3C,YACE,SAKS,MACT;AACA,UAAM,OAAO;AAFJ;AAGT,SAAK,OAAO;AAAA,EACd;AAAA,EAJW;AAKb;","names":[]}
1
+ {"version":3,"sources":["../src/docevals/types.ts"],"sourcesContent":["/**\n * Shared result model for manni docevals.\n *\n * Vocabulary follows the \"Docs as Evals\" methodology (Docs as Tests with AI):\n * every check is an *eval*; what differs is its *grader* (code-based, LLM-as-\n * judge, or human). Verdicts are binary pass/fail — aggregate rates emerge from\n * binary judgments, they are never assigned per item.\n */\nimport { ToolError } from \"../shared/errors.js\";\nimport type { Severity } from \"../shared/severity.js\";\nimport type { Guidance } from \"../shared/guidance.js\";\n\n// The judge vocabulary is shared with the inference layer and is re-exported\n// here so manni docevals code and its consumers keep one import site. A second local\n// definition would be a second thing to keep in sync.\n//\n// Match — a single run's verdict; `partial` counts as fail\n// Zone — confidence-zone routing for AI-judged evals\n// JudgeVerdict — the structured verdict of one run (the book's shape)\n// JudgeRun — one run within an ensemble\n// ConsensusResult — the aggregated outcome for one (page, eval) pair\nimport type { ConsensusResult } from \"@hawkeyexl/inference\";\n\nexport type {\n ConsensusResult,\n JudgeRun,\n JudgeVerdict,\n Match,\n Zone,\n} from \"@hawkeyexl/inference\";\n\n/**\n * Regression evals guard behavior that must keep working (~100% target pass\n * rate). Capability evals probe what the docs/system can do (~70% target).\n */\nexport type EvalType = \"capability\" | \"regression\";\n\n/**\n * Finding severity for deterministically graded evals: the family scale,\n * `notice | warning | error`, from `src/shared/severity.ts`. Only `error`\n * affects exit codes.\n */\nexport type { Severity };\n\n/** The page every docevals finding links to. */\nexport const FIX_GUIDE = \"https://hawkeyexl.github.io/manni/docevals/fix/\";\n\n/** How an eval is graded. `tool:regex` is the built-in `tool:*` kind; `registerGrader` adds others. */\nexport type GraderKind = \"ai\" | \"command\" | \"human\" | `tool:${string}`;\n\n/** A normalized finding from a deterministically graded eval (command or tool). */\nexport interface Finding {\n /** Name of the eval that produced this finding. */\n evalName: string;\n /** Repo-relative path of the page the finding applies to. */\n file: string;\n /** Grader-specific rule id (e.g. \"regex/found\"), when available. */\n ruleId?: string;\n message: string;\n severity: Severity;\n /**\n * This finding is about the *grader*, not the page: the tool could not be\n * run, or its output could not be read. It fails the eval whatever severity\n * the eval is configured at, because an eval configured `severity: warning`\n * would otherwise pass while its check never executed (ADR 01022).\n *\n * A finding about the page carries the eval's severity as usual.\n */\n diagnostic?: boolean;\n line?: number;\n col?: number;\n}\n\n/** Result of one eval applied to one page. */\nexport interface EvalResult {\n evalName: string;\n /**\n * Suite this result reports under. Stamped centrally by the engine, which\n * already computes the mapping for the suite summaries — the alternative is\n * threading it through every one of the ~30 places a result is constructed.\n */\n suite?: string;\n type: EvalType;\n grader: GraderKind;\n file: string;\n /**\n * Where the page declares the eval: the item of its `evals` key that names\n * it, in the page or in the manifest that supplied the key (proposal 0037).\n * A suite eval the page never names points at its `eval-suite` key, or at\n * the page alone when the suite is the config's default. `file` is spelled\n * like `file`, and `line` is 1-based and absent when nothing records one.\n *\n * Stamped centrally by the engine, like `suite`, on every result it\n * reports.\n */\n location?: { file: string; line?: number };\n /**\n * The page content this result judged, as `sha256-<hex>`: the SHA-256 of\n * the whole file as the run read it, frontmatter included (proposal 0090).\n * Every result for one page carries the same value. Stamped centrally by\n * the engine, like `suite`.\n */\n integrity?: string;\n /**\n * What the eval asks for (proposal 0089): `id` is the file that declares\n * it, `rule` its name, `description` its assertion, and `guide` the fix\n * page. Stamped centrally by the engine on every result, passing ones too.\n */\n guidance?: Guidance | null;\n outcome: \"pass\" | \"fail\" | \"needs-review\" | \"skipped\" | \"error\";\n /**\n * The persona record ids the judge read the page as, in the page's order\n * (proposal 0111). Present only on a judged result of an eval with\n * `readers: personas` whose page names a persona record.\n */\n personas?: string[];\n /** Present for ai-graded evals. */\n consensus?: ConsensusResult;\n /** Present for command/tool-graded evals that produced findings. */\n findings?: Finding[];\n /** True when this run generated the eval's check script. */\n generated?: boolean;\n /** Set when a persisted human review resolved a needs-review outcome. */\n via?: \"human-review\";\n /**\n * Findings the baseline already recorded and this run therefore suppressed\n * (ADR 01017). Present only on a run with a baseline in effect, so its\n * absence means \"no baseline\", not \"nothing was forgiven\".\n */\n baselined?: number;\n skipReason?: string;\n /**\n * The eval's weight in its suite's pass rate. Stamped centrally by the\n * engine alongside `suite`, and for the same reason: threading it through\n * the ~30 sites that construct a result would be thirty chances to forget.\n */\n weight?: number;\n /**\n * Set when the model that judged this eval also produced what it graded.\n *\n * `content` — the machines attributed for what the eval's `target` reads\n * name this model (`provenance` for the body, the `fields` of\n * `meta-provenance` for the frontmatter, both for `raw`): the judge wrote\n * what it grades. `criterion` — a `meta-provenance` entry for this model\n * lists this eval under `evals`: the judge wrote the question. Both bias a\n * verdict without invalidating it, so this rides along with a real outcome\n * rather than replacing it, and reaches every reporter instead of stderr.\n */\n selfPreference?: { axis: \"content\" | \"criterion\"; model: string };\n durationMs: number;\n}\n\n/** Per-suite aggregate. Pass rates emerge from binary outcomes. */\nexport interface SuiteSummary {\n suite: string;\n total: number;\n passed: number;\n failed: number;\n needsReview: number;\n skipped: number;\n errored: number;\n /**\n * Weighted share of the graded set that passed, 1 when nothing ran.\n *\n * The graded set is pass + fail + error, as it has always been —\n * `needs-review` and `skipped` are in neither half, so a page awaiting review\n * neither helps nor hurts. Each eval contributes its `weight` (1 unless it\n * says otherwise), and an eval that belongs to a criterion contributes\n * nothing on its own: the criterion contributes once, for the group.\n */\n passRate: number;\n /** From config: ~1.0 for regression suites, ~0.7 for capability suites. */\n targetPassRate: number;\n meetsTarget: boolean;\n /**\n * Set when a selection filter (`--eval` / `--suite`) was active, meaning the\n * run measured part of this suite. `meetsTarget` is then always false and the\n * suite cannot fail the run either: it has numbers, but no verdict.\n */\n partial?: boolean;\n /**\n * Criteria scored in this suite. Present only when the suite declares any,\n * so its absence means \"none\", never \"none passed\".\n *\n * `suspended` counts criteria whose members were not all graded in this run.\n * They are out of the rate entirely rather than counted as failures — the\n * same reasoning as `partial` one level down (ADR 01018): a group measured\n * in part has numbers but no verdict.\n */\n criteria?: {\n total: number;\n passed: number;\n failed: number;\n suspended: number;\n };\n}\n\n/** Full run output consumed by reporters. */\nexport interface RunReport {\n pages: number;\n evalResults: EvalResult[];\n suites: SuiteSummary[];\n /**\n * Judge telemetry. Counts, not money: the dollar figure this block used to\n * carry was only as good as a price table this repo does not own, and was\n * absent entirely for `claude-cli` and self-hosted endpoints (ADR 01019).\n */\n usage: {\n totalTokens: number;\n cachedEvals: number;\n judgedEvals: number;\n };\n /** Script generations performed during this run (paths written). */\n generated: string[];\n exitCode: 0 | 1;\n}\n\n/** Operational/usage error → exit code 2. */\nexport class DocevalsError extends ToolError {\n constructor(\n message: string,\n /**\n * Set where a caller acts on the kind of error rather than reporting it.\n * `nothing-resolved`: no page this run would check resolves an eval,\n * including when it finds no page it reads.\n */\n readonly code?: \"nothing-resolved\",\n ) {\n super(message);\n this.name = \"DocevalsError\";\n }\n}\n"],"mappings":";;;;;;AA6CO,IAAM,YAAY;AA6KlB,IAAM,gBAAN,cAA4B,UAAU;AAAA,EAC3C,YACE,SAMS,MACT;AACA,UAAM,OAAO;AAFJ;AAGT,SAAK,OAAO;AAAA,EACd;AAAA,EAJW;AAKb;","names":[]}
@@ -17,7 +17,7 @@ import {
17
17
  valueAt,
18
18
  valueText,
19
19
  withRemedy
20
- } from "./chunk-6I7DQ4RL.js";
20
+ } from "./chunk-5QPLKYLM.js";
21
21
  import {
22
22
  CITE_RULES,
23
23
  CiteError,
@@ -34,12 +34,12 @@ import {
34
34
  sliceLines,
35
35
  sourceRange,
36
36
  spellSource
37
- } from "./chunk-MMYFT7FI.js";
37
+ } from "./chunk-4NCNVKZS.js";
38
38
  import {
39
39
  impactOf,
40
40
  loadServing,
41
41
  servesSentence
42
- } from "./chunk-K352TYME.js";
42
+ } from "./chunk-BN3SQUXK.js";
43
43
  import {
44
44
  ANY_FENCE,
45
45
  MAX_RANGE_LINES,
@@ -66,7 +66,7 @@ import {
66
66
  spellLines,
67
67
  splitLines,
68
68
  toBodyLines
69
- } from "./chunk-MJBGGFSN.js";
69
+ } from "./chunk-OBFIWPEB.js";
70
70
  import {
71
71
  STDIN_LABEL,
72
72
  STDIN_TOKEN,
@@ -80,7 +80,7 @@ import {
80
80
  resolveTargetSet,
81
81
  settleBaseline,
82
82
  supportedExtensions
83
- } from "./chunk-3D7VBQXN.js";
83
+ } from "./chunk-HQRXE6QY.js";
84
84
  import {
85
85
  SEVERITIES
86
86
  } from "./chunk-77AINBYM.js";
@@ -94,7 +94,7 @@ import {
94
94
  pageManifestPath,
95
95
  readConfigFile,
96
96
  selectCollections
97
- } from "./chunk-JF4BC7ZD.js";
97
+ } from "./chunk-CDX4QK6O.js";
98
98
  import {
99
99
  warn
100
100
  } from "./chunk-HX44GB4Z.js";
@@ -2027,4 +2027,4 @@ export {
2027
2027
  sayNotices,
2028
2028
  runCheck
2029
2029
  };
2030
- //# sourceMappingURL=chunk-IUSVWJOF.js.map
2030
+ //# sourceMappingURL=chunk-PBR4TVEL.js.map