@hawkeyexl/manni 4.13.0 → 4.15.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 (293) hide show
  1. package/README.md +1 -1
  2. package/dist/batch-OMDKRGUE.js +48 -0
  3. package/dist/build-YCY5MUHA.js +37 -0
  4. package/dist/calibrate-RN2NJ4FS.js +43 -0
  5. package/dist/capture-2WYROZKA.js +39 -0
  6. package/dist/check-KRVWHF7E.js +33 -0
  7. package/dist/{check-NBN2YK2J.js → check-LVUTWAGR.js} +33 -32
  8. package/dist/{check-NBN2YK2J.js.map → check-LVUTWAGR.js.map} +1 -1
  9. package/dist/check-MR7IG7IP.js +36 -0
  10. package/dist/{check-LU5YC3L4.js → check-OIRJ6OBW.js} +15 -14
  11. package/dist/{chunk-J5NOWIJ3.js → chunk-3CSEHHKB.js} +14 -8
  12. package/dist/{chunk-J5NOWIJ3.js.map → chunk-3CSEHHKB.js.map} +1 -1
  13. package/dist/{chunk-7RNONVHI.js → chunk-3EJVJDMX.js} +9 -9
  14. package/dist/{chunk-LSFXNAHU.js → chunk-3WQMMLIO.js} +129 -59
  15. package/dist/chunk-3WQMMLIO.js.map +1 -0
  16. package/dist/{chunk-OREHJQNN.js → chunk-46OWIAAX.js} +5 -4
  17. package/dist/{chunk-OREHJQNN.js.map → chunk-46OWIAAX.js.map} +1 -1
  18. package/dist/{chunk-LNGSE7V2.js → chunk-476DMDJ5.js} +132 -27
  19. package/dist/chunk-476DMDJ5.js.map +1 -0
  20. package/dist/{chunk-EQ7E6HMG.js → chunk-4MYW2D2U.js} +14 -16
  21. package/dist/chunk-4MYW2D2U.js.map +1 -0
  22. package/dist/{chunk-NTEYYYKL.js → chunk-525KMBZS.js} +16 -22
  23. package/dist/chunk-525KMBZS.js.map +1 -0
  24. package/dist/{chunk-HIEGOW7X.js → chunk-57DHX65T.js} +5 -79
  25. package/dist/chunk-57DHX65T.js.map +1 -0
  26. package/dist/{chunk-PCE7QHXJ.js → chunk-5D24C6WM.js} +6 -1
  27. package/dist/chunk-5D24C6WM.js.map +1 -0
  28. package/dist/{chunk-DQOM3DEU.js → chunk-6DYFWAZA.js} +563 -359
  29. package/dist/chunk-6DYFWAZA.js.map +1 -0
  30. package/dist/{chunk-CU57HT2E.js → chunk-6WJUZQQX.js} +2 -2
  31. package/dist/chunk-7EKXSSEO.js +81 -0
  32. package/dist/chunk-7EKXSSEO.js.map +1 -0
  33. package/dist/{chunk-ULDV2LUI.js → chunk-7SVFBJBE.js} +10 -4
  34. package/dist/chunk-7SVFBJBE.js.map +1 -0
  35. package/dist/{chunk-QKT67PFE.js → chunk-7XHW5DZA.js} +9 -9
  36. package/dist/{chunk-TDCOKKMI.js → chunk-AL4HRKSZ.js} +3 -3
  37. package/dist/{chunk-OTJOBZJ5.js → chunk-B2242FYO.js} +2 -1
  38. package/dist/chunk-B2242FYO.js.map +1 -0
  39. package/dist/chunk-BREAC43H.js +85 -0
  40. package/dist/chunk-BREAC43H.js.map +1 -0
  41. package/dist/{chunk-HKTGHLBA.js → chunk-C37OVJ35.js} +2 -2
  42. package/dist/{chunk-HKTGHLBA.js.map → chunk-C37OVJ35.js.map} +1 -1
  43. package/dist/{chunk-YQV75FIL.js → chunk-CFMI74TP.js} +3 -3
  44. package/dist/{chunk-BMBAAPGN.js → chunk-CWGBRWP7.js} +33 -18
  45. package/dist/chunk-CWGBRWP7.js.map +1 -0
  46. package/dist/chunk-DN4LCWSA.js +83 -0
  47. package/dist/chunk-DN4LCWSA.js.map +1 -0
  48. package/dist/{chunk-JEUFYSFQ.js → chunk-DW22KCLN.js} +118 -75
  49. package/dist/chunk-DW22KCLN.js.map +1 -0
  50. package/dist/{chunk-PCGBXHSE.js → chunk-FEEO7ET6.js} +5 -5
  51. package/dist/{chunk-CODWRUAD.js → chunk-FYWQS35G.js} +7 -5
  52. package/dist/chunk-FYWQS35G.js.map +1 -0
  53. package/dist/{chunk-3O6U4ICM.js → chunk-GLQCSDFS.js} +3 -3
  54. package/dist/{chunk-BQXY76JB.js → chunk-GUTAKJIF.js} +148 -92
  55. package/dist/chunk-GUTAKJIF.js.map +1 -0
  56. package/dist/{chunk-WVXCN5DS.js → chunk-GZHBMMDC.js} +78 -14
  57. package/dist/chunk-GZHBMMDC.js.map +1 -0
  58. package/dist/{chunk-52WO7ESI.js → chunk-IE5PXI6M.js} +6 -5
  59. package/dist/chunk-IE5PXI6M.js.map +1 -0
  60. package/dist/{chunk-ZXRAE55H.js → chunk-IGRXQC3H.js} +2 -2
  61. package/dist/{chunk-U6IHLEWT.js → chunk-JCTHXG33.js} +2 -2
  62. package/dist/{chunk-NSAW7U42.js → chunk-JHE3CYWS.js} +58 -10
  63. package/dist/chunk-JHE3CYWS.js.map +1 -0
  64. package/dist/{chunk-6ZFJWUUH.js → chunk-JNMY7KZG.js} +2 -2
  65. package/dist/chunk-JQPZKWIP.js +76 -0
  66. package/dist/chunk-JQPZKWIP.js.map +1 -0
  67. package/dist/{chunk-OBXCJZ6R.js → chunk-JTATFPWB.js} +28 -17
  68. package/dist/chunk-JTATFPWB.js.map +1 -0
  69. package/dist/{chunk-3HUCB4Z3.js → chunk-JULE3EU3.js} +10 -7
  70. package/dist/chunk-JULE3EU3.js.map +1 -0
  71. package/dist/{chunk-TQ3W6RKG.js → chunk-KCXQXKOL.js} +3 -3
  72. package/dist/{chunk-VYBYUQIP.js → chunk-KN37BXVY.js} +88 -7
  73. package/dist/chunk-KN37BXVY.js.map +1 -0
  74. package/dist/{chunk-OUAH7XF2.js → chunk-MAOX3524.js} +2 -2
  75. package/dist/chunk-MC7U5IH4.js +126 -0
  76. package/dist/chunk-MC7U5IH4.js.map +1 -0
  77. package/dist/{chunk-OYIWF3B2.js → chunk-NIQ2JSZO.js} +29 -20
  78. package/dist/chunk-NIQ2JSZO.js.map +1 -0
  79. package/dist/{chunk-HY6ROJTH.js → chunk-OFOIBV5J.js} +86 -10
  80. package/dist/chunk-OFOIBV5J.js.map +1 -0
  81. package/dist/{chunk-TZOYZK2E.js → chunk-OZUPJB4J.js} +2 -2
  82. package/dist/{chunk-N6A6DJUO.js → chunk-Q2VOXKAQ.js} +6 -7
  83. package/dist/chunk-Q2VOXKAQ.js.map +1 -0
  84. package/dist/{chunk-GWI6JPTT.js → chunk-Q62Q7CDI.js} +88 -8
  85. package/dist/chunk-Q62Q7CDI.js.map +1 -0
  86. package/dist/{chunk-PA7CMQGD.js → chunk-QDO5JFFV.js} +11 -5
  87. package/dist/chunk-QDO5JFFV.js.map +1 -0
  88. package/dist/{chunk-VNYXK7TM.js → chunk-QEJ4GH25.js} +8 -8
  89. package/dist/chunk-QEJ4GH25.js.map +1 -0
  90. package/dist/chunk-QK6VYJHV.js +26 -0
  91. package/dist/chunk-QK6VYJHV.js.map +1 -0
  92. package/dist/chunk-QS2Z3SWL.js +21 -0
  93. package/dist/chunk-QS2Z3SWL.js.map +1 -0
  94. package/dist/{chunk-NWUXRV6N.js → chunk-QS3K57OJ.js} +10 -8
  95. package/dist/chunk-QS3K57OJ.js.map +1 -0
  96. package/dist/{chunk-OKMTUAWO.js → chunk-QSPH4F56.js} +5 -5
  97. package/dist/{chunk-3XGTNN3M.js → chunk-RGRNAQG5.js} +12 -124
  98. package/dist/chunk-RGRNAQG5.js.map +1 -0
  99. package/dist/{chunk-E6BVUDGY.js → chunk-SLGCRXHM.js} +4 -4
  100. package/dist/{chunk-KE2F7QES.js → chunk-SVF3WCC7.js} +6 -6
  101. package/dist/{chunk-IGQMBHFY.js → chunk-T62SFCQY.js} +88 -12
  102. package/dist/chunk-T62SFCQY.js.map +1 -0
  103. package/dist/{chunk-SCLXVTFZ.js → chunk-TKINOTVS.js} +1 -1
  104. package/dist/chunk-TKINOTVS.js.map +1 -0
  105. package/dist/{chunk-VOXOBUTX.js → chunk-TXZJESES.js} +5 -5
  106. package/dist/chunk-UPUJJOKB.js +236 -0
  107. package/dist/chunk-UPUJJOKB.js.map +1 -0
  108. package/dist/{chunk-7JPL3CUC.js → chunk-URGALOZY.js} +2 -2
  109. package/dist/{chunk-X4MPUD4B.js → chunk-UVLQRP6O.js} +53 -13
  110. package/dist/chunk-UVLQRP6O.js.map +1 -0
  111. package/dist/{chunk-CWXZ2MRT.js → chunk-VHJ72YCD.js} +4 -3
  112. package/dist/chunk-VHJ72YCD.js.map +1 -0
  113. package/dist/{chunk-PAU352SV.js → chunk-W4GTMOJW.js} +2 -2
  114. package/dist/{chunk-SE4JN5XN.js → chunk-WDENIUC7.js} +3 -1
  115. package/dist/chunk-WDENIUC7.js.map +1 -0
  116. package/dist/{chunk-3BVDFQ6Y.js → chunk-Y3GWQBJP.js} +5 -5
  117. package/dist/{chunk-YZ4TJLZQ.js → chunk-YT5HKJWV.js} +497 -18
  118. package/dist/chunk-YT5HKJWV.js.map +1 -0
  119. package/dist/{chunk-UQMLCIRX.js → chunk-Z6PZKXSP.js} +6 -6
  120. package/dist/{chunk-JUL2PRQN.js → chunk-ZC2MZZR5.js} +207 -79
  121. package/dist/chunk-ZC2MZZR5.js.map +1 -0
  122. package/dist/{chunk-UKZNLVJW.js → chunk-ZINZTHWO.js} +4 -2
  123. package/dist/chunk-ZINZTHWO.js.map +1 -0
  124. package/dist/{cli-4JHQCPHU.js → cli-33E3B2FK.js} +3 -3
  125. package/dist/{cli-G66X7YMP.js → cli-7JV4RM66.js} +23 -22
  126. package/dist/{cli-G66X7YMP.js.map → cli-7JV4RM66.js.map} +1 -1
  127. package/dist/{cli-L5B2RVV2.js → cli-B4DTJ2KC.js} +31 -29
  128. package/dist/{cli-L5B2RVV2.js.map → cli-B4DTJ2KC.js.map} +1 -1
  129. package/dist/{cli-ECVT4YXR.js → cli-D4WXCDTS.js} +20 -19
  130. package/dist/{cli-ECVT4YXR.js.map → cli-D4WXCDTS.js.map} +1 -1
  131. package/dist/{cli-7DETHSNW.js → cli-DDLLZHZW.js} +90 -84
  132. package/dist/cli-DDLLZHZW.js.map +1 -0
  133. package/dist/{cli-KYTCJYXK.js → cli-EVACAD7K.js} +317 -28
  134. package/dist/cli-EVACAD7K.js.map +1 -0
  135. package/dist/{cli-H5LVGOVT.js → cli-LIKI7WPR.js} +384 -248
  136. package/dist/cli-LIKI7WPR.js.map +1 -0
  137. package/dist/{cli-AZKWTCFV.js → cli-MWUFAS2X.js} +11 -11
  138. package/dist/{cli-DGFLJ2DD.js → cli-OKPRTVG6.js} +69 -26
  139. package/dist/cli-OKPRTVG6.js.map +1 -0
  140. package/dist/{cli-RP5E7XHC.js → cli-QEPVGLQ3.js} +20 -18
  141. package/dist/{cli-RP5E7XHC.js.map → cli-QEPVGLQ3.js.map} +1 -1
  142. package/dist/{cli-BW5VOFOZ.js → cli-VP6JTPFS.js} +11 -10
  143. package/dist/{cli-BW5VOFOZ.js.map → cli-VP6JTPFS.js.map} +1 -1
  144. package/dist/cli.js +14 -14
  145. package/dist/{config-JJW75SBX.js → config-7I5CHHRZ.js} +6 -6
  146. package/dist/docmeta.js +10 -10
  147. package/dist/github-DV57TW5L.js +32 -0
  148. package/dist/github-SGX2EARO.js +36 -0
  149. package/dist/graph/runtime.js.map +1 -1
  150. package/dist/index.d.ts +222 -45
  151. package/dist/index.js +138 -132
  152. package/dist/index.js.map +1 -1
  153. package/dist/{json-7WV7KL6H.js → json-5EQCGVCV.js} +4 -2
  154. package/dist/{json-LCVPMEAM.js → json-SHPUCD64.js} +15 -13
  155. package/dist/{labels-OQXBVM4A.js → labels-3GCGYYV3.js} +14 -12
  156. package/dist/{labels-OQXBVM4A.js.map → labels-3GCGYYV3.js.map} +1 -1
  157. package/dist/lint-RE4DMI6E.js +35 -0
  158. package/dist/list-F56MEJXR.js +36 -0
  159. package/dist/list-ZR3KY556.js +34 -0
  160. package/dist/{page-XPX5XJZE.js → page-G7XSO4FD.js} +13 -12
  161. package/dist/{picker-3XF36MJF.js → picker-FPUC5UGM.js} +3 -3
  162. package/dist/{prepare-VMBIQYAM.js → prepare-WHMWP7BG.js} +21 -20
  163. package/dist/{prepare-VMBIQYAM.js.map → prepare-WHMWP7BG.js.map} +1 -1
  164. package/dist/{pretty-KSTZMBUF.js → pretty-VTJVXWRK.js} +15 -13
  165. package/dist/{pretty-KG6TMOEI.js → pretty-YVRRWBWN.js} +23 -16
  166. package/dist/{provider-LBX4IXGX.js → provider-JY2I3VLF.js} +3 -3
  167. package/dist/{release-VV3UTKE5.js → release-Z3ASYZ3S.js} +3 -3
  168. package/dist/{reporters-26H3N2KW.js → reporters-FSXJ42EB.js} +6 -5
  169. package/dist/{reporters-AQU4W3KY.js → reporters-G5R4SURQ.js} +6 -6
  170. package/dist/{reporters-FBYLPKD4.js → reporters-MHPY4HRA.js} +15 -14
  171. package/dist/run-FSYOYEPR.js +39 -0
  172. package/dist/sarif-HBQIDY7T.js +31 -0
  173. package/dist/sarif-RRUFJZUL.js +37 -0
  174. package/dist/{term-SI3VM6EM.js → term-ABHGACYE.js} +58 -109
  175. package/dist/term-ABHGACYE.js.map +1 -0
  176. package/dist/types-VMOT7RAL.js +12 -0
  177. package/dist/types-VMOT7RAL.js.map +1 -0
  178. package/dist/{validate-NQO7TFSN.js → validate-DXYUUGUD.js} +6 -6
  179. package/dist/validate-DXYUUGUD.js.map +1 -0
  180. package/package.json +1 -1
  181. package/plugin/manni/.claude-plugin/plugin.json +1 -1
  182. package/plugin/manni/skills/check/SKILL.md +2 -2
  183. package/plugin/manni/skills/evals/SKILL.md +1 -1
  184. package/plugin/manni/skills/fix/SKILL.md +95 -16
  185. package/plugin/manni/skills/setup/SKILL.md +1 -1
  186. package/shapes/graph/shapes-1.1.1.ttl +953 -0
  187. package/dist/batch-OB2FXT47.js +0 -46
  188. package/dist/build-4BL24BG3.js +0 -36
  189. package/dist/calibrate-AEDJ7N7G.js +0 -41
  190. package/dist/capture-TP3P4YNL.js +0 -38
  191. package/dist/check-5IYH42KS.js +0 -34
  192. package/dist/check-S55MH66H.js +0 -30
  193. package/dist/chunk-3HUCB4Z3.js.map +0 -1
  194. package/dist/chunk-3XGTNN3M.js.map +0 -1
  195. package/dist/chunk-52WO7ESI.js.map +0 -1
  196. package/dist/chunk-BMBAAPGN.js.map +0 -1
  197. package/dist/chunk-BQXY76JB.js.map +0 -1
  198. package/dist/chunk-CODWRUAD.js.map +0 -1
  199. package/dist/chunk-CWXZ2MRT.js.map +0 -1
  200. package/dist/chunk-DQOM3DEU.js.map +0 -1
  201. package/dist/chunk-EQ7E6HMG.js.map +0 -1
  202. package/dist/chunk-GWI6JPTT.js.map +0 -1
  203. package/dist/chunk-HIEGOW7X.js.map +0 -1
  204. package/dist/chunk-HY6ROJTH.js.map +0 -1
  205. package/dist/chunk-IGQMBHFY.js.map +0 -1
  206. package/dist/chunk-JEUFYSFQ.js.map +0 -1
  207. package/dist/chunk-JUL2PRQN.js.map +0 -1
  208. package/dist/chunk-LNGSE7V2.js.map +0 -1
  209. package/dist/chunk-LSFXNAHU.js.map +0 -1
  210. package/dist/chunk-MNH7QO4Z.js +0 -15
  211. package/dist/chunk-MNH7QO4Z.js.map +0 -1
  212. package/dist/chunk-N6A6DJUO.js.map +0 -1
  213. package/dist/chunk-NSAW7U42.js.map +0 -1
  214. package/dist/chunk-NTEYYYKL.js.map +0 -1
  215. package/dist/chunk-NWUXRV6N.js.map +0 -1
  216. package/dist/chunk-OBXCJZ6R.js.map +0 -1
  217. package/dist/chunk-OTJOBZJ5.js.map +0 -1
  218. package/dist/chunk-OYIWF3B2.js.map +0 -1
  219. package/dist/chunk-PA7CMQGD.js.map +0 -1
  220. package/dist/chunk-PCE7QHXJ.js.map +0 -1
  221. package/dist/chunk-SCLXVTFZ.js.map +0 -1
  222. package/dist/chunk-SE4JN5XN.js.map +0 -1
  223. package/dist/chunk-UKZNLVJW.js.map +0 -1
  224. package/dist/chunk-ULDV2LUI.js.map +0 -1
  225. package/dist/chunk-VNYXK7TM.js.map +0 -1
  226. package/dist/chunk-VYBYUQIP.js.map +0 -1
  227. package/dist/chunk-WVXCN5DS.js.map +0 -1
  228. package/dist/chunk-X4MPUD4B.js.map +0 -1
  229. package/dist/chunk-Y6M4JFKG.js +0 -117
  230. package/dist/chunk-Y6M4JFKG.js.map +0 -1
  231. package/dist/chunk-YZ4TJLZQ.js.map +0 -1
  232. package/dist/cli-7DETHSNW.js.map +0 -1
  233. package/dist/cli-DGFLJ2DD.js.map +0 -1
  234. package/dist/cli-H5LVGOVT.js.map +0 -1
  235. package/dist/cli-KYTCJYXK.js.map +0 -1
  236. package/dist/github-DJQ4MWNZ.js +0 -35
  237. package/dist/github-UWTDM2J2.js +0 -30
  238. package/dist/lint-O7XRHKFP.js +0 -34
  239. package/dist/list-OOOCLOAL.js +0 -35
  240. package/dist/list-OYQ5XPN2.js +0 -32
  241. package/dist/run-KUGTU3TT.js +0 -37
  242. package/dist/term-SI3VM6EM.js.map +0 -1
  243. package/dist/types-Y6TXHM7M.js +0 -10
  244. /package/dist/{batch-OB2FXT47.js.map → batch-OMDKRGUE.js.map} +0 -0
  245. /package/dist/{build-4BL24BG3.js.map → build-YCY5MUHA.js.map} +0 -0
  246. /package/dist/{calibrate-AEDJ7N7G.js.map → calibrate-RN2NJ4FS.js.map} +0 -0
  247. /package/dist/{capture-TP3P4YNL.js.map → capture-2WYROZKA.js.map} +0 -0
  248. /package/dist/{check-5IYH42KS.js.map → check-KRVWHF7E.js.map} +0 -0
  249. /package/dist/{check-LU5YC3L4.js.map → check-MR7IG7IP.js.map} +0 -0
  250. /package/dist/{check-S55MH66H.js.map → check-OIRJ6OBW.js.map} +0 -0
  251. /package/dist/{chunk-7RNONVHI.js.map → chunk-3EJVJDMX.js.map} +0 -0
  252. /package/dist/{chunk-CU57HT2E.js.map → chunk-6WJUZQQX.js.map} +0 -0
  253. /package/dist/{chunk-QKT67PFE.js.map → chunk-7XHW5DZA.js.map} +0 -0
  254. /package/dist/{chunk-TDCOKKMI.js.map → chunk-AL4HRKSZ.js.map} +0 -0
  255. /package/dist/{chunk-YQV75FIL.js.map → chunk-CFMI74TP.js.map} +0 -0
  256. /package/dist/{chunk-PCGBXHSE.js.map → chunk-FEEO7ET6.js.map} +0 -0
  257. /package/dist/{chunk-3O6U4ICM.js.map → chunk-GLQCSDFS.js.map} +0 -0
  258. /package/dist/{chunk-ZXRAE55H.js.map → chunk-IGRXQC3H.js.map} +0 -0
  259. /package/dist/{chunk-U6IHLEWT.js.map → chunk-JCTHXG33.js.map} +0 -0
  260. /package/dist/{chunk-6ZFJWUUH.js.map → chunk-JNMY7KZG.js.map} +0 -0
  261. /package/dist/{chunk-TQ3W6RKG.js.map → chunk-KCXQXKOL.js.map} +0 -0
  262. /package/dist/{chunk-OUAH7XF2.js.map → chunk-MAOX3524.js.map} +0 -0
  263. /package/dist/{chunk-TZOYZK2E.js.map → chunk-OZUPJB4J.js.map} +0 -0
  264. /package/dist/{chunk-OKMTUAWO.js.map → chunk-QSPH4F56.js.map} +0 -0
  265. /package/dist/{chunk-E6BVUDGY.js.map → chunk-SLGCRXHM.js.map} +0 -0
  266. /package/dist/{chunk-KE2F7QES.js.map → chunk-SVF3WCC7.js.map} +0 -0
  267. /package/dist/{chunk-VOXOBUTX.js.map → chunk-TXZJESES.js.map} +0 -0
  268. /package/dist/{chunk-7JPL3CUC.js.map → chunk-URGALOZY.js.map} +0 -0
  269. /package/dist/{chunk-PAU352SV.js.map → chunk-W4GTMOJW.js.map} +0 -0
  270. /package/dist/{chunk-3BVDFQ6Y.js.map → chunk-Y3GWQBJP.js.map} +0 -0
  271. /package/dist/{chunk-UQMLCIRX.js.map → chunk-Z6PZKXSP.js.map} +0 -0
  272. /package/dist/{cli-4JHQCPHU.js.map → cli-33E3B2FK.js.map} +0 -0
  273. /package/dist/{cli-AZKWTCFV.js.map → cli-MWUFAS2X.js.map} +0 -0
  274. /package/dist/{config-JJW75SBX.js.map → config-7I5CHHRZ.js.map} +0 -0
  275. /package/dist/{github-DJQ4MWNZ.js.map → github-DV57TW5L.js.map} +0 -0
  276. /package/dist/{github-UWTDM2J2.js.map → github-SGX2EARO.js.map} +0 -0
  277. /package/dist/{json-7WV7KL6H.js.map → json-5EQCGVCV.js.map} +0 -0
  278. /package/dist/{json-LCVPMEAM.js.map → json-SHPUCD64.js.map} +0 -0
  279. /package/dist/{lint-O7XRHKFP.js.map → lint-RE4DMI6E.js.map} +0 -0
  280. /package/dist/{list-OOOCLOAL.js.map → list-F56MEJXR.js.map} +0 -0
  281. /package/dist/{list-OYQ5XPN2.js.map → list-ZR3KY556.js.map} +0 -0
  282. /package/dist/{page-XPX5XJZE.js.map → page-G7XSO4FD.js.map} +0 -0
  283. /package/dist/{picker-3XF36MJF.js.map → picker-FPUC5UGM.js.map} +0 -0
  284. /package/dist/{pretty-KG6TMOEI.js.map → pretty-VTJVXWRK.js.map} +0 -0
  285. /package/dist/{pretty-KSTZMBUF.js.map → pretty-YVRRWBWN.js.map} +0 -0
  286. /package/dist/{provider-LBX4IXGX.js.map → provider-JY2I3VLF.js.map} +0 -0
  287. /package/dist/{release-VV3UTKE5.js.map → release-Z3ASYZ3S.js.map} +0 -0
  288. /package/dist/{reporters-26H3N2KW.js.map → reporters-FSXJ42EB.js.map} +0 -0
  289. /package/dist/{reporters-AQU4W3KY.js.map → reporters-G5R4SURQ.js.map} +0 -0
  290. /package/dist/{reporters-FBYLPKD4.js.map → reporters-MHPY4HRA.js.map} +0 -0
  291. /package/dist/{run-KUGTU3TT.js.map → run-FSYOYEPR.js.map} +0 -0
  292. /package/dist/{types-Y6TXHM7M.js.map → sarif-HBQIDY7T.js.map} +0 -0
  293. /package/dist/{validate-NQO7TFSN.js.map → sarif-RRUFJZUL.js.map} +0 -0
@@ -14,4 +14,4 @@ var LintError = class extends ToolError {
14
14
  export {
15
15
  LintError
16
16
  };
17
- //# sourceMappingURL=chunk-SCLXVTFZ.js.map
17
+ //# sourceMappingURL=chunk-TKINOTVS.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\";\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\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 /** Parse raw file content into the generic tree. */\n parse(content: string, filePath: string): 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 */\nexport type SkipReason = \"no-template\" | \"unsupported-format\" | \"unreadable\";\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":";;;;;;AAuBO,IAAM,YAAN,cAAwB,UAAU;AAAA,EACvC,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;","names":[]}
@@ -1,20 +1,20 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  windowFor
4
- } from "./chunk-CWXZ2MRT.js";
4
+ } from "./chunk-VHJ72YCD.js";
5
5
  import {
6
6
  applyAvailabilityRecord,
7
7
  foldBranchAvailability,
8
8
  newAvailability,
9
9
  newReplay,
10
10
  remapAvailability
11
- } from "./chunk-E6BVUDGY.js";
11
+ } from "./chunk-SLGCRXHM.js";
12
12
  import {
13
13
  makeRedactor
14
- } from "./chunk-CU57HT2E.js";
14
+ } from "./chunk-6WJUZQQX.js";
15
15
  import {
16
16
  TracevalsError
17
- } from "./chunk-UKZNLVJW.js";
17
+ } from "./chunk-ZINZTHWO.js";
18
18
 
19
19
  // src/tracevals/trace/claude.ts
20
20
  import { readdir, readFile } from "node:fs/promises";
@@ -864,4 +864,4 @@ export {
864
864
  parseTraceContent,
865
865
  renderTrace
866
866
  };
867
- //# sourceMappingURL=chunk-VOXOBUTX.js.map
867
+ //# sourceMappingURL=chunk-TXZJESES.js.map
@@ -0,0 +1,236 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ askSampleQuestions,
4
+ bundledShapesPath,
5
+ compactIri,
6
+ compareFindings,
7
+ loadGraph,
8
+ parseGraph,
9
+ renderQuestionSummary,
10
+ validateGraph
11
+ } from "./chunk-ZC2MZZR5.js";
12
+ import {
13
+ documentBase,
14
+ loadRunConfig
15
+ } from "./chunk-3CSEHHKB.js";
16
+ import {
17
+ URI_BASE_ID,
18
+ artifactLocation,
19
+ fileUri,
20
+ normalizeRoot
21
+ } from "./chunk-GLP5PSXB.js";
22
+ import {
23
+ escapeWorkflowCommandMessage,
24
+ escapeWorkflowCommandProperty,
25
+ guidanceLines
26
+ } from "./chunk-QK6VYJHV.js";
27
+ import {
28
+ palette
29
+ } from "./chunk-RNVYGWIC.js";
30
+ import {
31
+ package_default
32
+ } from "./chunk-C37OVJ35.js";
33
+
34
+ // src/graph/commands/check.ts
35
+ import { dirname, resolve } from "node:path";
36
+
37
+ // src/graph/reporters/github.ts
38
+ function renderCheckGithub(report) {
39
+ const lines = [];
40
+ for (const f of report.findings) {
41
+ const file = f.docs[0];
42
+ const where = file === void 0 ? "" : ` file=${escapeWorkflowCommandProperty(file)}`;
43
+ const message = escapeWorkflowCommandMessage(
44
+ [`${f.message} (${compactIri(f.focusNode)})`, ...guidanceLines(f.guidance)].join("\n")
45
+ );
46
+ lines.push(`::${f.severity}${where}::${message}`);
47
+ }
48
+ return lines.join("\n");
49
+ }
50
+
51
+ // src/graph/reporters/sarif.ts
52
+ var SARIF_VERSION = "2.1.0";
53
+ var SARIF_SCHEMA = "https://json.schemastore.org/sarif-2.1.0.json";
54
+ var INFORMATION_URI = "https://github.com/hawkeyexl/manni";
55
+ var LEVELS = {
56
+ error: "error",
57
+ warning: "warning",
58
+ notice: "note"
59
+ };
60
+ function ruleIdOf(f) {
61
+ return `manni:graph/${f.guidance?.rule ?? "shacl"}`;
62
+ }
63
+ function pascalCase(rule) {
64
+ return rule.split(/[^A-Za-z0-9]+/).filter(Boolean).map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join("");
65
+ }
66
+ function descriptor(f) {
67
+ const rule = f.guidance?.rule ?? null;
68
+ const description = f.guidance?.description ?? null;
69
+ const guide = f.guidance?.guide ?? null;
70
+ return {
71
+ id: ruleIdOf(f),
72
+ name: pascalCase(rule ?? "shacl"),
73
+ shortDescription: {
74
+ text: rule === null ? "A SHACL constraint in the shapes in effect." : `The ${rule} shape.`
75
+ },
76
+ ...description === null ? {} : { fullDescription: { text: description } },
77
+ ...guide === null ? {} : { helpUri: guide }
78
+ };
79
+ }
80
+ function renderCheckSarif(report) {
81
+ const root = normalizeRoot(report.root);
82
+ const rules = [];
83
+ const indexOf = /* @__PURE__ */ new Map();
84
+ const results = [];
85
+ let pageless = 0;
86
+ for (const f of report.findings) {
87
+ if (f.docs.length === 0) {
88
+ pageless += 1;
89
+ continue;
90
+ }
91
+ const id = ruleIdOf(f);
92
+ let index = indexOf.get(id);
93
+ if (index === void 0) {
94
+ index = rules.length;
95
+ indexOf.set(id, index);
96
+ rules.push(descriptor(f));
97
+ }
98
+ results.push({
99
+ ruleId: id,
100
+ ruleIndex: index,
101
+ level: LEVELS[f.severity],
102
+ message: { text: [f.message, ...guidanceLines(f.guidance)].join("\n") },
103
+ locations: f.docs.map((doc) => ({
104
+ physicalLocation: {
105
+ artifactLocation: artifactLocation(doc, root),
106
+ region: { startLine: 1 }
107
+ }
108
+ })),
109
+ ...f.guidance === null ? {} : { properties: { guidance: f.guidance } }
110
+ });
111
+ }
112
+ const notifications = pageless === 0 ? [] : [
113
+ {
114
+ level: "note",
115
+ message: {
116
+ text: `${String(pageless)} ${pageless === 1 ? "finding names" : "findings name"} no page. Run manni graph check to see them.`
117
+ }
118
+ }
119
+ ];
120
+ return JSON.stringify(
121
+ {
122
+ $schema: SARIF_SCHEMA,
123
+ version: SARIF_VERSION,
124
+ runs: [
125
+ {
126
+ tool: {
127
+ driver: {
128
+ name: "manni-graph",
129
+ informationUri: INFORMATION_URI,
130
+ version: package_default.version,
131
+ rules
132
+ }
133
+ },
134
+ originalUriBaseIds: { [URI_BASE_ID]: { uri: fileUri(root) } },
135
+ invocations: [
136
+ {
137
+ // Findings are the tool doing its job. A run that cannot check
138
+ // exits 2 before any report is rendered.
139
+ executionSuccessful: true,
140
+ ...notifications.length === 0 ? {} : { toolExecutionNotifications: notifications }
141
+ }
142
+ ],
143
+ results
144
+ }
145
+ ]
146
+ },
147
+ null,
148
+ 2
149
+ );
150
+ }
151
+
152
+ // src/graph/commands/check.ts
153
+ async function runCheck(opts = {}) {
154
+ const cwd = opts.cwd ?? process.cwd();
155
+ const config = loadRunConfig(
156
+ {
157
+ ...opts.config === void 0 ? {} : { configPath: opts.config },
158
+ ...opts.noConfig === void 0 ? {} : { noConfig: opts.noConfig }
159
+ },
160
+ cwd
161
+ );
162
+ const graphPath = resolve(cwd, opts.graph ?? config.out);
163
+ const store = opts.turtle === void 0 ? loadGraph(graphPath) : parseGraph(opts.turtle, "the built graph");
164
+ const shapesInput = opts.shapes && opts.shapes.length > 0 ? opts.shapes : config.check.shapes;
165
+ const sources = shapesInput.length > 0 ? shapesInput.map((p) => ({ path: resolve(cwd, p), label: p })) : [bundledShapesPath(import.meta.url)];
166
+ const shapes = sources.map((s) => typeof s === "string" ? s : s.path);
167
+ const root = documentBase(config, {}, cwd);
168
+ const asked = await askSampleQuestions(
169
+ store,
170
+ config.check.questions,
171
+ root,
172
+ dirname(graphPath),
173
+ {
174
+ source: {
175
+ ...opts.config === void 0 ? {} : { configPath: opts.config },
176
+ ...opts.noConfig === void 0 ? {} : { noConfig: opts.noConfig }
177
+ },
178
+ cwd
179
+ },
180
+ config.questionFiles,
181
+ config.configDir
182
+ );
183
+ const findings = [...await validateGraph(store, sources), ...asked.findings].sort(
184
+ compareFindings
185
+ );
186
+ const count = (severity) => findings.filter((f) => f.severity === severity).length;
187
+ const errors = count("error");
188
+ return {
189
+ findings,
190
+ errors,
191
+ warnings: count("warning"),
192
+ notices: count("notice"),
193
+ shapes,
194
+ ...asked.summary ? { questions: asked.summary } : {},
195
+ root,
196
+ // Only an `error` fails the run; a warning and a notice are reported and
197
+ // pass, as they were when they were called violations and warnings.
198
+ exitCode: errors > 0 ? 1 : 0
199
+ };
200
+ }
201
+ function plural(n, word) {
202
+ return `${String(n)} ${word}${n === 1 ? "" : "s"}`;
203
+ }
204
+ function renderCheck(report, format, opts = {}) {
205
+ if (format === "json") {
206
+ const { exitCode: _exitCode, root: _root, ...rest } = report;
207
+ return JSON.stringify(rest, null, 2);
208
+ }
209
+ if (format === "sarif") return renderCheckSarif(report);
210
+ const summary = report.questions ? renderQuestionSummary(report.questions) : [];
211
+ if (format === "github") {
212
+ const annotations = renderCheckGithub(report);
213
+ if (summary.length === 0) return annotations;
214
+ return [...annotations === "" ? [] : [annotations, ""], ...summary].join("\n");
215
+ }
216
+ const c = palette(opts.color === true);
217
+ const lines = [];
218
+ for (const f of report.findings) {
219
+ const pages = f.docs.length > 0 ? f.docs.join(", ") : "(no page)";
220
+ lines.push(`${f.severity}: ${pages}: ${f.message}`);
221
+ const at = `at ${compactIri(f.focusNode)}${f.path ? ` ${compactIri(f.path)}` : ""}`;
222
+ for (const line of [at, ...guidanceLines(f.guidance)]) lines.push(` ${c.dim(line)}`);
223
+ }
224
+ if (report.findings.length > 0) lines.push("");
225
+ if (summary.length > 0) lines.push(...summary, "");
226
+ lines.push(
227
+ `${plural(report.errors, "error")}, ${plural(report.warnings, "warning")}, ${plural(report.notices, "notice")}`
228
+ );
229
+ return lines.join("\n");
230
+ }
231
+
232
+ export {
233
+ runCheck,
234
+ renderCheck
235
+ };
236
+ //# sourceMappingURL=chunk-UPUJJOKB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/graph/commands/check.ts","../src/graph/reporters/github.ts","../src/graph/reporters/sarif.ts"],"sourcesContent":["/**\n * `manni graph check` — graph-level validation: run the published SHACL shapes\n * (plus the TS-side SKOS integrity checks) over the built graph and report\n * findings with the doc paths responsible. Each page's sample questions are\n * asked too (proposal 0086 §7), with each golden-set file's, and the question\n * set's health is summed up after the findings (proposal 0087). Errors exit 1; warnings and notices are\n * reported but pass.\n */\nimport { dirname, resolve } from \"node:path\";\nimport type { Severity } from \"../../shared/severity.js\";\nimport { loadRunConfig } from \"../core/config.js\";\nimport { loadGraph, compactIri, parseGraph } from \"../core/load.js\";\nimport { documentBase } from \"../core/discover.js\";\nimport { bundledShapesPath } from \"../core/pkg.js\";\nimport {\n compareFindings,\n validateGraph,\n type CheckFinding,\n} from \"../core/shacl.js\";\nimport {\n askSampleQuestions,\n renderQuestionSummary,\n type QuestionSummary,\n} from \"./questions.js\";\nimport { palette } from \"../../shared/color.js\";\nimport { guidanceLines } from \"../../shared/guidance.js\";\nimport { renderCheckGithub } from \"../reporters/github.js\";\nimport type { CheckFormat } from \"../reporters/index.js\";\nimport { renderCheckSarif } from \"../reporters/sarif.js\";\n\nexport interface CheckOptions {\n config?: string;\n /** `--no-config`: skip discovery and run on the built-in defaults. */\n noConfig?: boolean;\n /** Graph .ttl path (default: config `out`). */\n graph?: string;\n /** Shapes .ttl paths (default: config `check.shapes`, then bundled). */\n shapes?: string[];\n cwd?: string;\n /**\n * The graph as Turtle, in place of reading `graph`: what `buildGraph`\n * returns, so `manni check` checks a build it never wrote.\n */\n turtle?: string;\n}\n\nexport interface CheckReport {\n findings: CheckFinding[];\n /** Counts on the family's scale, not SHACL's (proposal 0051 §2). */\n errors: number;\n warnings: number;\n notices: number;\n /** Shapes files used, as given (for reporting). */\n shapes: string[];\n /** The question set's health (proposal 0087); absent when no question exists. */\n questions?: QuestionSummary;\n /**\n * The directory each finding's `docs` are labelled from, which SARIF\n * resolves them against. Not printed in JSON, which labels pages as before.\n */\n root: string;\n exitCode: 0 | 1;\n}\n\nexport async function runCheck(opts: CheckOptions = {}): Promise<CheckReport> {\n const cwd = opts.cwd ?? process.cwd();\n const config = loadRunConfig(\n {\n ...(opts.config === undefined ? {} : { configPath: opts.config }),\n ...(opts.noConfig === undefined ? {} : { noConfig: opts.noConfig }),\n },\n cwd,\n );\n const graphPath = resolve(cwd, opts.graph ?? config.out);\n const store =\n opts.turtle === undefined\n ? loadGraph(graphPath)\n : parseGraph(opts.turtle, \"the built graph\");\n\n // CLI flag over config over the bundled contract — same precedence as\n // every other knob.\n const shapesInput =\n opts.shapes && opts.shapes.length > 0 ? opts.shapes : config.check.shapes;\n // Each file keeps the spelling it was given, which a finding's guidance\n // names when the file carries no header of its own.\n const sources =\n shapesInput.length > 0\n ? shapesInput.map((p) => ({ path: resolve(cwd, p), label: p }))\n : [bundledShapesPath(import.meta.url)];\n const shapes = sources.map((s) => (typeof s === \"string\" ? s : s.path));\n\n // Pages read from where `build` labels them, and a vector sidecar from\n // beside the graph, as `export search` and `search` read them. Golden-set\n // files resolve from the config file's directory.\n const root = documentBase(config, {}, cwd);\n const asked = await askSampleQuestions(\n store,\n config.check.questions,\n root,\n dirname(graphPath),\n {\n source: {\n ...(opts.config === undefined ? {} : { configPath: opts.config }),\n ...(opts.noConfig === undefined ? {} : { noConfig: opts.noConfig }),\n },\n cwd,\n },\n config.questionFiles,\n config.configDir,\n );\n const findings = [...(await validateGraph(store, sources)), ...asked.findings].sort(\n compareFindings,\n );\n const count = (severity: Severity): number =>\n findings.filter((f) => f.severity === severity).length;\n const errors = count(\"error\");\n\n return {\n findings,\n errors,\n warnings: count(\"warning\"),\n notices: count(\"notice\"),\n shapes,\n ...(asked.summary ? { questions: asked.summary } : {}),\n root,\n // Only an `error` fails the run; a warning and a notice are reported and\n // pass, as they were when they were called violations and warnings.\n exitCode: errors > 0 ? 1 : 0,\n };\n}\n\n/** `2 errors`, `1 warning`, `0 notices` — each count pluralized on its own. */\nfunction plural(n: number, word: string): string {\n return `${String(n)} ${word}${n === 1 ? \"\" : \"s\"}`;\n}\n\nexport function renderCheck(\n report: CheckReport,\n format: CheckFormat,\n opts: { color?: boolean } = {},\n): string {\n if (format === \"json\") {\n const { exitCode: _exitCode, root: _root, ...rest } = report;\n return JSON.stringify(rest, null, 2);\n }\n if (format === \"sarif\") return renderCheckSarif(report);\n const summary = report.questions ? renderQuestionSummary(report.questions) : [];\n if (format === \"github\") {\n // The summary is plain text after the annotations, which GitHub logs as is.\n const annotations = renderCheckGithub(report);\n if (summary.length === 0) return annotations;\n return [...(annotations === \"\" ? [] : [annotations, \"\"]), ...summary].join(\"\\n\");\n }\n const c = palette(opts.color === true);\n const lines: string[] = [];\n for (const f of report.findings) {\n // The pages first: they are what the author edits. The node and the\n // predicate follow, dim, for whoever reads the graph.\n const pages = f.docs.length > 0 ? f.docs.join(\", \") : \"(no page)\";\n lines.push(`${f.severity}: ${pages}: ${f.message}`);\n const at = `at ${compactIri(f.focusNode)}${f.path ? ` ${compactIri(f.path)}` : \"\"}`;\n for (const line of [at, ...guidanceLines(f.guidance)]) lines.push(` ${c.dim(line)}`);\n }\n if (report.findings.length > 0) lines.push(\"\");\n if (summary.length > 0) lines.push(...summary, \"\");\n lines.push(\n `${plural(report.errors, \"error\")}, ${plural(report.warnings, \"warning\")}, ${plural(report.notices, \"notice\")}`,\n );\n return lines.join(\"\\n\");\n}\n","/**\n * `--format github`: one workflow-command annotation per `check` finding.\n *\n * `::error file=<first blamed doc>::<message> (<focus node>)`, with\n * `::warning` and `::notice` for the lower levels — the family scale is\n * GitHub's, so the level is the severity, exactly as a11y's and cite's\n * reporters have it. The guidance lines follow the message after `%0A`, so\n * the annotation names the shape that judged the page (proposal 0089).\n *\n * A SHACL finding carries no line number, and a finding about a shared node —\n * a concept, an agent, the scheme — may trace back to no document at all. Then\n * there is nothing to anchor to and the annotation goes out without `file=`,\n * which GitHub shows against the workflow run rather than dropping.\n *\n * Empty when the run is clean, so a clean CI step logs nothing.\n */\nimport {\n escapeWorkflowCommandMessage,\n escapeWorkflowCommandProperty,\n} from \"../../shared/github.js\";\nimport { guidanceLines } from \"../../shared/guidance.js\";\nimport type { CheckReport } from \"../commands/check.js\";\nimport { compactIri } from \"../core/load.js\";\n\nexport function renderCheckGithub(report: CheckReport): string {\n const lines: string[] = [];\n for (const f of report.findings) {\n // The first, not all of them: one annotation lands on one file, and the\n // docs are sorted, so which one is stable across runs.\n const file = f.docs[0];\n const where =\n file === undefined ? \"\" : ` file=${escapeWorkflowCommandProperty(file)}`;\n const message = escapeWorkflowCommandMessage(\n [`${f.message} (${compactIri(f.focusNode)})`, ...guidanceLines(f.guidance)].join(\"\\n\"),\n );\n lines.push(`::${f.severity}${where}::${message}`);\n }\n return lines.join(\"\\n\");\n}\n","/**\n * `--format sarif`: `graph check` as SARIF 2.1.0, the log code scanning reads\n * (proposal 0089). `manni check -f sarif` carries this run as it is.\n *\n * A SHACL finding names a node of the built graph, not a line of a page. Its\n * location is each page it blames, at line 1, where the frontmatter begins.\n * A finding that blames no page has nothing code scanning can anchor, so it\n * stays out of `results`. The run counts those in one notification instead,\n * and the exit code still counts every finding.\n */\nimport pkg from \"../../../package.json\" with { type: \"json\" };\nimport type { Guidance } from \"../../shared/guidance.js\";\nimport { guidanceLines } from \"../../shared/guidance.js\";\nimport {\n artifactLocation,\n fileUri,\n normalizeRoot,\n URI_BASE_ID,\n type ArtifactLocation,\n} from \"../../shared/sarif-location.js\";\nimport type { Severity } from \"../../shared/severity.js\";\nimport type { CheckReport } from \"../commands/check.js\";\nimport type { CheckFinding } from \"../core/shacl.js\";\n\nconst SARIF_VERSION = \"2.1.0\";\nconst SARIF_SCHEMA = \"https://json.schemastore.org/sarif-2.1.0.json\";\nconst INFORMATION_URI = \"https://github.com/hawkeyexl/manni\";\n\ntype SarifLevel = \"error\" | \"warning\" | \"note\";\n\n/** The family scale onto SARIF's, which spells the lowest level `note`. */\nconst LEVELS: Record<Severity, SarifLevel> = {\n error: \"error\",\n warning: \"warning\",\n notice: \"note\",\n};\n\ninterface ReportingDescriptor {\n id: string;\n name: string;\n shortDescription: { text: string };\n fullDescription?: { text: string };\n helpUri?: string;\n}\n\ninterface SarifResult {\n ruleId: string;\n ruleIndex: number;\n level: SarifLevel;\n message: { text: string };\n locations: Array<{\n physicalLocation: { artifactLocation: ArtifactLocation; region: { startLine: number } };\n }>;\n properties?: { guidance: Guidance };\n}\n\n/** `manni:graph/Document-language`, or `manni:graph/shacl` when no rule is named. */\nfunction ruleIdOf(f: CheckFinding): string {\n return `manni:graph/${f.guidance?.rule ?? \"shacl\"}`;\n}\n\n/** `Document-language` → `DocumentLanguage`: SARIF asks for one Pascal-case word. */\nfunction pascalCase(rule: string): string {\n return rule\n .split(/[^A-Za-z0-9]+/)\n .filter(Boolean)\n .map((w) => w.charAt(0).toUpperCase() + w.slice(1))\n .join(\"\");\n}\n\nfunction descriptor(f: CheckFinding): ReportingDescriptor {\n const rule = f.guidance?.rule ?? null;\n const description = f.guidance?.description ?? null;\n const guide = f.guidance?.guide ?? null;\n return {\n id: ruleIdOf(f),\n name: pascalCase(rule ?? \"shacl\"),\n shortDescription: {\n text: rule === null ? \"A SHACL constraint in the shapes in effect.\" : `The ${rule} shape.`,\n },\n ...(description === null ? {} : { fullDescription: { text: description } }),\n ...(guide === null ? {} : { helpUri: guide }),\n };\n}\n\nexport function renderCheckSarif(report: CheckReport): string {\n const root = normalizeRoot(report.root);\n const rules: ReportingDescriptor[] = [];\n const indexOf = new Map<string, number>();\n const results: SarifResult[] = [];\n let pageless = 0;\n\n for (const f of report.findings) {\n if (f.docs.length === 0) {\n pageless += 1;\n continue;\n }\n const id = ruleIdOf(f);\n let index = indexOf.get(id);\n if (index === undefined) {\n index = rules.length;\n indexOf.set(id, index);\n rules.push(descriptor(f));\n }\n results.push({\n ruleId: id,\n ruleIndex: index,\n level: LEVELS[f.severity],\n message: { text: [f.message, ...guidanceLines(f.guidance)].join(\"\\n\") },\n locations: f.docs.map((doc) => ({\n physicalLocation: {\n artifactLocation: artifactLocation(doc, root),\n region: { startLine: 1 },\n },\n })),\n ...(f.guidance === null ? {} : { properties: { guidance: f.guidance } }),\n });\n }\n\n const notifications =\n pageless === 0\n ? []\n : [\n {\n level: \"note\" as const,\n message: {\n text: `${String(pageless)} ${pageless === 1 ? \"finding names\" : \"findings name\"} no page. Run manni graph check to see them.`,\n },\n },\n ];\n\n return JSON.stringify(\n {\n $schema: SARIF_SCHEMA,\n version: SARIF_VERSION,\n runs: [\n {\n tool: {\n driver: {\n name: \"manni-graph\",\n informationUri: INFORMATION_URI,\n version: pkg.version,\n rules,\n },\n },\n originalUriBaseIds: { [URI_BASE_ID]: { uri: fileUri(root) } },\n invocations: [\n {\n // Findings are the tool doing its job. A run that cannot check\n // exits 2 before any report is rendered.\n executionSuccessful: true,\n ...(notifications.length === 0 ? {} : { toolExecutionNotifications: notifications }),\n },\n ],\n results,\n },\n ],\n },\n null,\n 2,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,SAAS,SAAS,eAAe;;;ACgB1B,SAAS,kBAAkB,QAA6B;AAC7D,QAAM,QAAkB,CAAC;AACzB,aAAW,KAAK,OAAO,UAAU;AAG/B,UAAM,OAAO,EAAE,KAAK,CAAC;AACrB,UAAM,QACJ,SAAS,SAAY,KAAK,SAAS,8BAA8B,IAAI,CAAC;AACxE,UAAM,UAAU;AAAA,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IAAI,CAAC,aAAa,EAAE,GAAI,GAAG,OAAO,EAAE,KAAK,IAAI;AAAA,EACjF;AACA,QAAM,IAAI,QAAQ,KAAK,UAAU,IAAI;AACrC,QAAM,QAAkB,CAAC;AACzB,aAAW,KAAK,OAAO,UAAU;AAG/B,UAAM,QAAQ,EAAE,KAAK,SAAS,IAAI,EAAE,KAAK,KAAK,IAAI,IAAI;AACtD,UAAM,KAAK,GAAG,EAAE,QAAQ,KAAK,KAAK,KAAK,EAAE,OAAO,EAAE;AAClD,UAAM,KAAK,MAAM,WAAW,EAAE,SAAS,CAAC,GAAG,EAAE,OAAO,IAAI,WAAW,EAAE,IAAI,CAAC,KAAK,EAAE;AACjF,eAAW,QAAQ,CAAC,IAAI,GAAG,cAAc,EAAE,QAAQ,CAAC,EAAG,OAAM,KAAK,KAAK,EAAE,IAAI,IAAI,CAAC,EAAE;AAAA,EACtF;AACA,MAAI,OAAO,SAAS,SAAS,EAAG,OAAM,KAAK,EAAE;AAC7C,MAAI,QAAQ,SAAS,EAAG,OAAM,KAAK,GAAG,SAAS,EAAE;AACjD,QAAM;AAAA,IACJ,GAAG,OAAO,OAAO,QAAQ,OAAO,CAAC,KAAK,OAAO,OAAO,UAAU,SAAS,CAAC,KAAK,OAAO,OAAO,SAAS,QAAQ,CAAC;AAAA,EAC/G;AACA,SAAO,MAAM,KAAK,IAAI;AACxB;","names":[]}
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  loadTerms
4
- } from "./chunk-3XGTNN3M.js";
4
+ } from "./chunk-RGRNAQG5.js";
5
5
 
6
6
  // src/term/commands/list.ts
7
7
  var LIST_FORMATS = ["pretty", "json", "csv"];
@@ -14,4 +14,4 @@ export {
14
14
  LIST_FORMATS,
15
15
  runList
16
16
  };
17
- //# sourceMappingURL=chunk-7JPL3CUC.js.map
17
+ //# sourceMappingURL=chunk-URGALOZY.js.map
@@ -12,7 +12,7 @@ import {
12
12
  lineSpec,
13
13
  parseLines,
14
14
  sliceLines
15
- } from "./chunk-LNGSE7V2.js";
15
+ } from "./chunk-476DMDJ5.js";
16
16
  import {
17
17
  __default3 as __default,
18
18
  extractorByName,
@@ -20,10 +20,10 @@ import {
20
20
  hasFrontmatterFence,
21
21
  locateFrontmatter,
22
22
  supportedExtensions
23
- } from "./chunk-HY6ROJTH.js";
23
+ } from "./chunk-OFOIBV5J.js";
24
24
  import {
25
25
  isEncryptedValue
26
- } from "./chunk-OTJOBZJ5.js";
26
+ } from "./chunk-B2242FYO.js";
27
27
  import {
28
28
  ToolError
29
29
  } from "./chunk-G3T47CFV.js";
@@ -147,6 +147,33 @@ var DEFAULT_SEVERITY = {
147
147
  "quote-drift": "error"
148
148
  };
149
149
  var RULE_ID_PREFIX = "manni:cite";
150
+ var FIX_URI = "https://hawkeyexl.github.io/manni/cite/fix/";
151
+ var RULE_DESCRIPTIONS = {
152
+ "source-moved": "The cited lines are intact, at a different line number.",
153
+ "source-moved-ambiguous": "The cited lines now occur in more than one place.",
154
+ "source-changed": "The cited lines are not what they were.",
155
+ "source-never-true": "The pin held at no commit in the source's history.",
156
+ "source-missing": "The path names no tracked file, or an encrypted source cannot be decrypted.",
157
+ "claim-moved": "The pinned page text sits at a different line.",
158
+ "claim-moved-ambiguous": "The pinned page text now occurs in more than one place.",
159
+ "claim-reanchored": "The pinned words are unchanged, and only the layout around them moved.",
160
+ "claim-changed": "The sentence was edited since it was pinned.",
161
+ "marker-orphan": "A marker names an id no entry has.",
162
+ "marker-invalid": "A marker the tool cannot read, including one carrying JSON.",
163
+ "marker-repeated": "Two markers name one id.",
164
+ "marker-misplaced": "A marker line sits inside a paragraph and splits it.",
165
+ "anchor-invalid": "The entry's anchor cannot work.",
166
+ "entry-invalid": "An entry is malformed, or an id is repeated.",
167
+ "quote-drift": "The fenced block does not reproduce the cited lines."
168
+ };
169
+ function guidanceFor(rule) {
170
+ return {
171
+ id: RULE_ID_PREFIX,
172
+ rule,
173
+ description: RULE_DESCRIPTIONS[rule],
174
+ guide: `${FIX_URI}#${rule}`
175
+ };
176
+ }
150
177
  function ruleId(rule) {
151
178
  return `${RULE_ID_PREFIX}/${rule}`;
152
179
  }
@@ -214,13 +241,14 @@ function nextLineStart(content, offset) {
214
241
  return lineEnd(content, offset) + 1;
215
242
  }
216
243
  var MAX_IDS_PER_MARKER = 25;
244
+ var EMPTY_PAYLOAD = "empty payload. Name an entry id, or remove the marker.";
217
245
  function payloadOf(payload) {
218
- if (payload === "") return { kind: "bad", reason: "empty payload" };
246
+ if (payload === "") return { kind: "bad", reason: EMPTY_PAYLOAD };
219
247
  if (/[\r\n]/.test(payload)) {
220
248
  return { kind: "bad", reason: "a marker is one line; write two markers" };
221
249
  }
222
250
  const [head, ...rest] = payload.split(" ").filter((word) => word !== "");
223
- if (head === void 0) return { kind: "bad", reason: "empty payload" };
251
+ if (head === void 0) return { kind: "bad", reason: EMPTY_PAYLOAD };
224
252
  const words = [head, ...rest];
225
253
  if (words.some((word) => word.startsWith("{"))) {
226
254
  return { kind: "bad", reason: "a JSON payload", json: true };
@@ -232,11 +260,16 @@ function payloadOf(payload) {
232
260
  };
233
261
  }
234
262
  const bad = words.find((word) => !ID.test(word));
235
- if (bad !== void 0) return { kind: "bad", reason: `"${bad}" is not an id` };
263
+ if (bad !== void 0) {
264
+ return {
265
+ kind: "bad",
266
+ reason: `"${bad}" is not an id. An id is lowercase letters, digits and hyphens. Separate ids with spaces.`
267
+ };
268
+ }
236
269
  const seen = /* @__PURE__ */ new Set();
237
270
  for (const word of words) {
238
271
  if (seen.has(word)) {
239
- return { kind: "bad", reason: `"${word}" is named twice in one marker` };
272
+ return { kind: "bad", reason: `"${word}" is named twice in one marker. Remove one.` };
240
273
  }
241
274
  seen.add(word);
242
275
  }
@@ -590,7 +623,7 @@ function offsetOfLine(content, line) {
590
623
  var MAX_MARKERS_PER_PAGE = 500;
591
624
  var ELEMENT_BACKED = /* @__PURE__ */ new Set(["html", "xml"]);
592
625
  var FENCE_ONLY = /* @__PURE__ */ new Set(["markdown", "mdx"]);
593
- var MARKER_JSON = "A marker names an entry by id. Write the entry in frontmatter or the sidecar.";
626
+ var MARKER_JSON = "invalid marker: a marker names entry ids, not an entry. Move the entry to citations:, in frontmatter or the sidecar, and name its id.";
594
627
  function ownedMessage(owner) {
595
628
  return `"citations" is owned by manifest ${owner.file} (collection ${owner.collection}); remove it from the document`;
596
629
  }
@@ -801,7 +834,9 @@ function readPage(file, content, opts) {
801
834
  citations.push(page);
802
835
  if (citation.id !== void 0) {
803
836
  if (ids.has(citation.id)) {
804
- findings.push(finding("entry-invalid", `duplicate id "${citation.id}"`, subject));
837
+ findings.push(
838
+ finding("entry-invalid", `duplicate id "${citation.id}". Give each entry its own id.`, subject)
839
+ );
805
840
  } else {
806
841
  ids.add(citation.id);
807
842
  byId.set(citation.id, page);
@@ -836,7 +871,7 @@ function readPage(file, content, opts) {
836
871
  const target = byId.get(id);
837
872
  if (target === void 0) {
838
873
  findings.push(
839
- finding("marker-orphan", `no entry has id "${id}"`, {
874
+ finding("marker-orphan", `no entry has id "${id}". Fix the marker's id, or add the entry with manni cite add.`, {
840
875
  line: statement.line,
841
876
  id
842
877
  })
@@ -848,7 +883,7 @@ function readPage(file, content, opts) {
848
883
  findings.push(
849
884
  finding(
850
885
  "marker-repeated",
851
- `${id} is named by markers at lines ${String(first)} and ${String(statement.line)}; the first anchors it.`,
886
+ `${id} is named by markers at lines ${String(first)} and ${String(statement.line)}; the first anchors it. Remove ${id} from the marker at line ${String(statement.line)}.`,
852
887
  {
853
888
  line: statement.line,
854
889
  id,
@@ -904,7 +939,11 @@ function readPage(file, content, opts) {
904
939
  }
905
940
  if (citation.quote === true && citation.claim?.lines === void 0 && marker === void 0) {
906
941
  findings.push(
907
- finding("anchor-invalid", named(citation.id, "quote needs a claim or a marker."), subject)
942
+ finding(
943
+ "anchor-invalid",
944
+ named(citation.id, "quote needs a claim or a marker. Add claim.lines over the block, or a marker above it."),
945
+ subject
946
+ )
908
947
  );
909
948
  }
910
949
  }
@@ -936,6 +975,7 @@ export {
936
975
  CITE_RULES,
937
976
  DEFAULT_SEVERITY,
938
977
  RULE_ID_PREFIX,
978
+ guidanceFor,
939
979
  ruleId,
940
980
  isCiteRule,
941
981
  resolveSeverity,
@@ -971,4 +1011,4 @@ export {
971
1011
  citationInputs,
972
1012
  readPage
973
1013
  };
974
- //# sourceMappingURL=chunk-X4MPUD4B.js.map
1014
+ //# sourceMappingURL=chunk-UVLQRP6O.js.map