@hawkeyexl/manni 4.12.4 → 4.14.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 (299) hide show
  1. package/README.md +1 -1
  2. package/dist/batch-TKNIUBLK.js +48 -0
  3. package/dist/build-6G7PEAG4.js +37 -0
  4. package/dist/calibrate-BDCXDZV5.js +43 -0
  5. package/dist/capture-NQJLZD66.js +39 -0
  6. package/dist/check-552X5I2J.js +36 -0
  7. package/dist/{check-3O2PZ7TZ.js → check-5HMDJOFP.js} +15 -14
  8. package/dist/check-BSB4FF4L.js +33 -0
  9. package/dist/{check-V7JUDAPS.js → check-QIZCTAIR.js} +33 -32
  10. package/dist/{check-V7JUDAPS.js.map → check-QIZCTAIR.js.map} +1 -1
  11. package/dist/{chunk-Z42MO7SO.js → chunk-2A6XYSXO.js} +58 -10
  12. package/dist/chunk-2A6XYSXO.js.map +1 -0
  13. package/dist/{chunk-HP43LH7E.js → chunk-2HQSMZ4N.js} +11 -5
  14. package/dist/chunk-2HQSMZ4N.js.map +1 -0
  15. package/dist/{chunk-EBZ4QKKX.js → chunk-36FJWJSK.js} +132 -27
  16. package/dist/chunk-36FJWJSK.js.map +1 -0
  17. package/dist/{chunk-WWKXPPN5.js → chunk-3BMTCS4H.js} +33 -18
  18. package/dist/chunk-3BMTCS4H.js.map +1 -0
  19. package/dist/{chunk-7QH2ZI4F.js → chunk-3CCY7M3R.js} +56 -29
  20. package/dist/chunk-3CCY7M3R.js.map +1 -0
  21. package/dist/{chunk-PNUM6RHR.js → chunk-3MTZZJKH.js} +3 -3
  22. package/dist/chunk-4U3X7LYV.js +236 -0
  23. package/dist/chunk-4U3X7LYV.js.map +1 -0
  24. package/dist/{chunk-ZCJUSQM7.js → chunk-56URKBXQ.js} +17 -17
  25. package/dist/chunk-56URKBXQ.js.map +1 -0
  26. package/dist/{chunk-PP22XDW2.js → chunk-66MKBRTA.js} +88 -12
  27. package/dist/chunk-66MKBRTA.js.map +1 -0
  28. package/dist/{chunk-7JUIJ7Q5.js → chunk-6VT3Z352.js} +24 -7
  29. package/dist/chunk-6VT3Z352.js.map +1 -0
  30. package/dist/{chunk-CU57HT2E.js → chunk-6WJUZQQX.js} +2 -2
  31. package/dist/{chunk-KRKNZ3IV.js → chunk-6XFSZCLT.js} +31 -13
  32. package/dist/chunk-6XFSZCLT.js.map +1 -0
  33. package/dist/{chunk-VFL3ERMI.js → chunk-742G2QCV.js} +4 -3
  34. package/dist/{chunk-VFL3ERMI.js.map → chunk-742G2QCV.js.map} +1 -1
  35. package/dist/chunk-7AXJY4FX.js +83 -0
  36. package/dist/chunk-7AXJY4FX.js.map +1 -0
  37. package/dist/{chunk-PSPNIAOP.js → chunk-7KOWE4F4.js} +14 -16
  38. package/dist/chunk-7KOWE4F4.js.map +1 -0
  39. package/dist/{chunk-J4ZOTZII.js → chunk-7PENJOI6.js} +14 -8
  40. package/dist/{chunk-J4ZOTZII.js.map → chunk-7PENJOI6.js.map} +1 -1
  41. package/dist/chunk-7WVWGULD.js +81 -0
  42. package/dist/chunk-7WVWGULD.js.map +1 -0
  43. package/dist/{chunk-4IW6FAUN.js → chunk-A7MNH4YI.js} +88 -7
  44. package/dist/chunk-A7MNH4YI.js.map +1 -0
  45. package/dist/{chunk-4TGIGVFO.js → chunk-AJYUJ37M.js} +65 -8
  46. package/dist/chunk-AJYUJ37M.js.map +1 -0
  47. package/dist/{chunk-OTJOBZJ5.js → chunk-B2242FYO.js} +2 -1
  48. package/dist/chunk-B2242FYO.js.map +1 -0
  49. package/dist/{chunk-U4SY2TJS.js → chunk-B6GUSA53.js} +15 -10
  50. package/dist/chunk-B6GUSA53.js.map +1 -0
  51. package/dist/{chunk-5NNPEPVM.js → chunk-BA4TCCOO.js} +5 -5
  52. package/dist/{chunk-X4GQ4HPY.js → chunk-BAWKNF6U.js} +3 -3
  53. package/dist/{chunk-Y4TDIUG6.js → chunk-BIRGZEWO.js} +86 -10
  54. package/dist/chunk-BIRGZEWO.js.map +1 -0
  55. package/dist/chunk-BREAC43H.js +85 -0
  56. package/dist/chunk-BREAC43H.js.map +1 -0
  57. package/dist/{chunk-YQV75FIL.js → chunk-CFMI74TP.js} +3 -3
  58. package/dist/{chunk-DTXLFSAB.js → chunk-CZJNYHK7.js} +2 -2
  59. package/dist/{chunk-AATCO43N.js → chunk-D2TIZOMN.js} +6 -5
  60. package/dist/chunk-D2TIZOMN.js.map +1 -0
  61. package/dist/{chunk-3FXPIZXL.js → chunk-EXAZ7K25.js} +5 -5
  62. package/dist/{chunk-BGRP44SX.js → chunk-GHZAOPGK.js} +148 -92
  63. package/dist/chunk-GHZAOPGK.js.map +1 -0
  64. package/dist/{chunk-XP4RNQZL.js → chunk-HGU4FDRY.js} +242 -15
  65. package/dist/chunk-HGU4FDRY.js.map +1 -0
  66. package/dist/{chunk-ZXRAE55H.js → chunk-IGRXQC3H.js} +2 -2
  67. package/dist/{chunk-6KONPVHQ.js → chunk-IOYEPB27.js} +5 -5
  68. package/dist/{chunk-U6IHLEWT.js → chunk-JCTHXG33.js} +2 -2
  69. package/dist/{chunk-TBAMBLF3.js → chunk-JNMY7KZG.js} +132 -15
  70. package/dist/chunk-JNMY7KZG.js.map +1 -0
  71. package/dist/{chunk-QWE3WLV4.js → chunk-JTEWU4C6.js} +26 -16
  72. package/dist/chunk-JTEWU4C6.js.map +1 -0
  73. package/dist/{chunk-KQRYW4DN.js → chunk-JWBS7YDI.js} +8 -8
  74. package/dist/chunk-JWBS7YDI.js.map +1 -0
  75. package/dist/{chunk-EX6E2P6Z.js → chunk-LCRBR7KW.js} +10 -4
  76. package/dist/chunk-LCRBR7KW.js.map +1 -0
  77. package/dist/{chunk-JAPSZ44X.js → chunk-M43NTWVH.js} +10 -7
  78. package/dist/chunk-M43NTWVH.js.map +1 -0
  79. package/dist/chunk-M534DYAJ.js +76 -0
  80. package/dist/chunk-M534DYAJ.js.map +1 -0
  81. package/dist/chunk-MC7U5IH4.js +126 -0
  82. package/dist/chunk-MC7U5IH4.js.map +1 -0
  83. package/dist/{chunk-7TVIFCGT.js → chunk-MIGFQP5N.js} +2 -2
  84. package/dist/{chunk-TZOYZK2E.js → chunk-OZUPJB4J.js} +2 -2
  85. package/dist/{chunk-J67EOBN3.js → chunk-QEZQ7MGH.js} +53 -13
  86. package/dist/chunk-QEZQ7MGH.js.map +1 -0
  87. package/dist/{chunk-5OKSFNUV.js → chunk-QF7EIRMU.js} +29 -23
  88. package/dist/chunk-QF7EIRMU.js.map +1 -0
  89. package/dist/chunk-QK6VYJHV.js +26 -0
  90. package/dist/chunk-QK6VYJHV.js.map +1 -0
  91. package/dist/chunk-QS2Z3SWL.js +21 -0
  92. package/dist/chunk-QS2Z3SWL.js.map +1 -0
  93. package/dist/{chunk-OKMTUAWO.js → chunk-QSPH4F56.js} +5 -5
  94. package/dist/{chunk-XEYS3KAZ.js → chunk-STM3G7WJ.js} +207 -79
  95. package/dist/chunk-STM3G7WJ.js.map +1 -0
  96. package/dist/{chunk-GNUZ37L2.js → chunk-T3BBNLAT.js} +2 -2
  97. package/dist/{chunk-GNUZ37L2.js.map → chunk-T3BBNLAT.js.map} +1 -1
  98. package/dist/{chunk-YGFIQ6Y5.js → chunk-TKINOTVS.js} +1 -1
  99. package/dist/chunk-TKINOTVS.js.map +1 -0
  100. package/dist/{chunk-QUG53QGZ.js → chunk-USKTLEPZ.js} +4 -4
  101. package/dist/{chunk-EU4HDGG4.js → chunk-V6OCE4ND.js} +129 -59
  102. package/dist/chunk-V6OCE4ND.js.map +1 -0
  103. package/dist/{chunk-SSDSV52B.js → chunk-VBBJGFME.js} +6 -7
  104. package/dist/chunk-VBBJGFME.js.map +1 -0
  105. package/dist/{chunk-CWXZ2MRT.js → chunk-VHJ72YCD.js} +4 -3
  106. package/dist/chunk-VHJ72YCD.js.map +1 -0
  107. package/dist/{chunk-PAU352SV.js → chunk-W4GTMOJW.js} +2 -2
  108. package/dist/{chunk-JEUFYSFQ.js → chunk-W5DO426O.js} +114 -70
  109. package/dist/chunk-W5DO426O.js.map +1 -0
  110. package/dist/{chunk-LWMB7JRE.js → chunk-W6B24IMO.js} +3 -3
  111. package/dist/{chunk-SE4JN5XN.js → chunk-WDENIUC7.js} +3 -1
  112. package/dist/chunk-WDENIUC7.js.map +1 -0
  113. package/dist/{chunk-NLELGEKL.js → chunk-WIPTWZVH.js} +6 -6
  114. package/dist/{chunk-RLPWXF5R.js → chunk-Y36PNW6J.js} +9 -9
  115. package/dist/{chunk-TR2XFZPR.js → chunk-Y37VJFX2.js} +9 -9
  116. package/dist/{chunk-3QUCVYNX.js → chunk-YJ3EG2D5.js} +12 -124
  117. package/dist/chunk-YJ3EG2D5.js.map +1 -0
  118. package/dist/{chunk-UKZNLVJW.js → chunk-ZINZTHWO.js} +4 -2
  119. package/dist/chunk-ZINZTHWO.js.map +1 -0
  120. package/dist/{chunk-N5JSOJY6.js → chunk-ZPLIXZZ6.js} +7 -5
  121. package/dist/chunk-ZPLIXZZ6.js.map +1 -0
  122. package/dist/{chunk-VXU75N5R.js → chunk-ZRQUQS7P.js} +5 -79
  123. package/dist/chunk-ZRQUQS7P.js.map +1 -0
  124. package/dist/{cli-RQRMZKKM.js → cli-5XKHMRZ5.js} +317 -28
  125. package/dist/cli-5XKHMRZ5.js.map +1 -0
  126. package/dist/{cli-5QGP6R63.js → cli-7QHJW5GH.js} +69 -26
  127. package/dist/cli-7QHJW5GH.js.map +1 -0
  128. package/dist/{cli-UL2IFH3R.js → cli-BUV3DRUH.js} +29 -83
  129. package/dist/cli-BUV3DRUH.js.map +1 -0
  130. package/dist/{cli-RQSCBJJY.js → cli-IKDX2I5X.js} +20 -18
  131. package/dist/{cli-RQSCBJJY.js.map → cli-IKDX2I5X.js.map} +1 -1
  132. package/dist/{cli-2Q5FODAX.js → cli-LOND37OA.js} +383 -247
  133. package/dist/cli-LOND37OA.js.map +1 -0
  134. package/dist/{cli-4ANSKDPD.js → cli-O6Y2KVWD.js} +11 -11
  135. package/dist/{cli-2OQKCKRD.js → cli-QTLOAVOY.js} +11 -10
  136. package/dist/{cli-2OQKCKRD.js.map → cli-QTLOAVOY.js.map} +1 -1
  137. package/dist/{cli-IE3CYYHA.js → cli-SOA2E26G.js} +62 -22
  138. package/dist/cli-SOA2E26G.js.map +1 -0
  139. package/dist/{cli-SDTXHLCA.js → cli-VQYB3663.js} +19 -18
  140. package/dist/{cli-SDTXHLCA.js.map → cli-VQYB3663.js.map} +1 -1
  141. package/dist/{cli-SGSS6FXE.js → cli-X6IWTDFK.js} +31 -29
  142. package/dist/{cli-SGSS6FXE.js.map → cli-X6IWTDFK.js.map} +1 -1
  143. package/dist/{cli-USPQURPP.js → cli-XAT673VB.js} +3 -3
  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-IPBOTQBN.js +36 -0
  148. package/dist/github-XM36D7ZH.js +32 -0
  149. package/dist/graph/runtime.js.map +1 -1
  150. package/dist/index.d.ts +157 -13
  151. package/dist/index.js +147 -131
  152. package/dist/index.js.map +1 -1
  153. package/dist/{json-PQURAHQ5.js → json-225TND7K.js} +15 -13
  154. package/dist/{labels-FMLO2URZ.js → labels-CTLHIRC4.js} +14 -12
  155. package/dist/{labels-FMLO2URZ.js.map → labels-CTLHIRC4.js.map} +1 -1
  156. package/dist/lint-NP3PC3SO.js +35 -0
  157. package/dist/list-JJGNKO6S.js +36 -0
  158. package/dist/list-Q457TIMA.js +34 -0
  159. package/dist/{page-X3HYSH6D.js → page-FJW7J2EU.js} +13 -12
  160. package/dist/{picker-3XF36MJF.js → picker-FPUC5UGM.js} +3 -3
  161. package/dist/{prepare-IQMB262G.js → prepare-RKJEKHAG.js} +21 -20
  162. package/dist/{prepare-IQMB262G.js.map → prepare-RKJEKHAG.js.map} +1 -1
  163. package/dist/{pretty-22PXIEOV.js → pretty-ECBO3EVT.js} +15 -14
  164. package/dist/{pretty-K5BOCKBB.js → pretty-QFEN2SIA.js} +15 -13
  165. package/dist/{provider-LBX4IXGX.js → provider-JY2I3VLF.js} +3 -3
  166. package/dist/{release-VV3UTKE5.js → release-Z3ASYZ3S.js} +3 -3
  167. package/dist/{reporters-5LIYYE6M.js → reporters-IKKL5RHS.js} +15 -14
  168. package/dist/{reporters-26H3N2KW.js → reporters-TDQDQHKE.js} +6 -5
  169. package/dist/{reporters-324OWH36.js → reporters-WGLQKW2Y.js} +6 -6
  170. package/dist/run-BTETGGLW.js +39 -0
  171. package/dist/sarif-K4SMB563.js +31 -0
  172. package/dist/sarif-ZHFK6PZY.js +37 -0
  173. package/dist/{term-2ADSKGZW.js → term-2M7APX2A.js} +58 -109
  174. package/dist/term-2M7APX2A.js.map +1 -0
  175. package/dist/types-VMOT7RAL.js +12 -0
  176. package/dist/types-VMOT7RAL.js.map +1 -0
  177. package/dist/{validate-LRYUEZLJ.js → validate-GBM5STKS.js} +6 -6
  178. package/dist/validate-GBM5STKS.js.map +1 -0
  179. package/package.json +1 -1
  180. package/plugin/manni/.claude-plugin/plugin.json +1 -1
  181. package/plugin/manni/skills/check/SKILL.md +2 -2
  182. package/plugin/manni/skills/evals/SKILL.md +1 -1
  183. package/plugin/manni/skills/fix/SKILL.md +99 -18
  184. package/plugin/manni/skills/setup/SKILL.md +1 -1
  185. package/schemas/lint/template.json +6 -1
  186. package/shapes/graph/shapes-1.1.1.ttl +953 -0
  187. package/templates/lint/tgdp/concept.yaml +27 -13
  188. package/templates/lint/tgdp/how-to.yaml +35 -21
  189. package/templates/lint/tgdp/readme.yaml +69 -25
  190. package/templates/lint/tgdp/reference.yaml +44 -31
  191. package/templates/lint/tgdp/release-notes.yaml +48 -19
  192. package/templates/lint/tgdp/troubleshooting.yaml +45 -31
  193. package/templates/lint/tgdp/tutorial.yaml +35 -19
  194. package/dist/batch-UHLVBMYM.js +0 -46
  195. package/dist/build-4RPXBSAO.js +0 -36
  196. package/dist/calibrate-POL5DCJ6.js +0 -41
  197. package/dist/capture-I7ZYG7NZ.js +0 -38
  198. package/dist/check-6TEG5TM6.js +0 -34
  199. package/dist/check-DGOUTC3V.js +0 -30
  200. package/dist/chunk-3QUCVYNX.js.map +0 -1
  201. package/dist/chunk-4IW6FAUN.js.map +0 -1
  202. package/dist/chunk-4TGIGVFO.js.map +0 -1
  203. package/dist/chunk-5OKSFNUV.js.map +0 -1
  204. package/dist/chunk-7JUIJ7Q5.js.map +0 -1
  205. package/dist/chunk-7QH2ZI4F.js.map +0 -1
  206. package/dist/chunk-AATCO43N.js.map +0 -1
  207. package/dist/chunk-BGRP44SX.js.map +0 -1
  208. package/dist/chunk-CWXZ2MRT.js.map +0 -1
  209. package/dist/chunk-EBZ4QKKX.js.map +0 -1
  210. package/dist/chunk-EU4HDGG4.js.map +0 -1
  211. package/dist/chunk-EX6E2P6Z.js.map +0 -1
  212. package/dist/chunk-HP43LH7E.js.map +0 -1
  213. package/dist/chunk-J67EOBN3.js.map +0 -1
  214. package/dist/chunk-JAPSZ44X.js.map +0 -1
  215. package/dist/chunk-JEUFYSFQ.js.map +0 -1
  216. package/dist/chunk-KQRYW4DN.js.map +0 -1
  217. package/dist/chunk-KRKNZ3IV.js.map +0 -1
  218. package/dist/chunk-MNH7QO4Z.js +0 -15
  219. package/dist/chunk-MNH7QO4Z.js.map +0 -1
  220. package/dist/chunk-N5JSOJY6.js.map +0 -1
  221. package/dist/chunk-OTJOBZJ5.js.map +0 -1
  222. package/dist/chunk-PP22XDW2.js.map +0 -1
  223. package/dist/chunk-PSPNIAOP.js.map +0 -1
  224. package/dist/chunk-QWE3WLV4.js.map +0 -1
  225. package/dist/chunk-SE4JN5XN.js.map +0 -1
  226. package/dist/chunk-SSDSV52B.js.map +0 -1
  227. package/dist/chunk-TBAMBLF3.js.map +0 -1
  228. package/dist/chunk-U4SY2TJS.js.map +0 -1
  229. package/dist/chunk-UKZNLVJW.js.map +0 -1
  230. package/dist/chunk-VXU75N5R.js.map +0 -1
  231. package/dist/chunk-W7EZJPRX.js +0 -117
  232. package/dist/chunk-W7EZJPRX.js.map +0 -1
  233. package/dist/chunk-WWKXPPN5.js.map +0 -1
  234. package/dist/chunk-XEYS3KAZ.js.map +0 -1
  235. package/dist/chunk-XP4RNQZL.js.map +0 -1
  236. package/dist/chunk-Y4TDIUG6.js.map +0 -1
  237. package/dist/chunk-YGFIQ6Y5.js.map +0 -1
  238. package/dist/chunk-Z42MO7SO.js.map +0 -1
  239. package/dist/chunk-ZCJUSQM7.js.map +0 -1
  240. package/dist/cli-2Q5FODAX.js.map +0 -1
  241. package/dist/cli-5QGP6R63.js.map +0 -1
  242. package/dist/cli-IE3CYYHA.js.map +0 -1
  243. package/dist/cli-RQRMZKKM.js.map +0 -1
  244. package/dist/cli-UL2IFH3R.js.map +0 -1
  245. package/dist/github-PBIYRH5S.js +0 -35
  246. package/dist/github-RJG2MAWB.js +0 -30
  247. package/dist/lint-N2CY66JX.js +0 -34
  248. package/dist/list-OMHTVFDY.js +0 -32
  249. package/dist/list-VBFNFEXV.js +0 -35
  250. package/dist/run-4EKG6EMI.js +0 -37
  251. package/dist/term-2ADSKGZW.js.map +0 -1
  252. package/dist/types-Y6TXHM7M.js +0 -10
  253. /package/dist/{batch-UHLVBMYM.js.map → batch-TKNIUBLK.js.map} +0 -0
  254. /package/dist/{build-4RPXBSAO.js.map → build-6G7PEAG4.js.map} +0 -0
  255. /package/dist/{calibrate-POL5DCJ6.js.map → calibrate-BDCXDZV5.js.map} +0 -0
  256. /package/dist/{capture-I7ZYG7NZ.js.map → capture-NQJLZD66.js.map} +0 -0
  257. /package/dist/{check-3O2PZ7TZ.js.map → check-552X5I2J.js.map} +0 -0
  258. /package/dist/{check-6TEG5TM6.js.map → check-5HMDJOFP.js.map} +0 -0
  259. /package/dist/{check-DGOUTC3V.js.map → check-BSB4FF4L.js.map} +0 -0
  260. /package/dist/{chunk-PNUM6RHR.js.map → chunk-3MTZZJKH.js.map} +0 -0
  261. /package/dist/{chunk-CU57HT2E.js.map → chunk-6WJUZQQX.js.map} +0 -0
  262. /package/dist/{chunk-5NNPEPVM.js.map → chunk-BA4TCCOO.js.map} +0 -0
  263. /package/dist/{chunk-X4GQ4HPY.js.map → chunk-BAWKNF6U.js.map} +0 -0
  264. /package/dist/{chunk-YQV75FIL.js.map → chunk-CFMI74TP.js.map} +0 -0
  265. /package/dist/{chunk-DTXLFSAB.js.map → chunk-CZJNYHK7.js.map} +0 -0
  266. /package/dist/{chunk-3FXPIZXL.js.map → chunk-EXAZ7K25.js.map} +0 -0
  267. /package/dist/{chunk-ZXRAE55H.js.map → chunk-IGRXQC3H.js.map} +0 -0
  268. /package/dist/{chunk-6KONPVHQ.js.map → chunk-IOYEPB27.js.map} +0 -0
  269. /package/dist/{chunk-U6IHLEWT.js.map → chunk-JCTHXG33.js.map} +0 -0
  270. /package/dist/{chunk-7TVIFCGT.js.map → chunk-MIGFQP5N.js.map} +0 -0
  271. /package/dist/{chunk-TZOYZK2E.js.map → chunk-OZUPJB4J.js.map} +0 -0
  272. /package/dist/{chunk-OKMTUAWO.js.map → chunk-QSPH4F56.js.map} +0 -0
  273. /package/dist/{chunk-QUG53QGZ.js.map → chunk-USKTLEPZ.js.map} +0 -0
  274. /package/dist/{chunk-PAU352SV.js.map → chunk-W4GTMOJW.js.map} +0 -0
  275. /package/dist/{chunk-LWMB7JRE.js.map → chunk-W6B24IMO.js.map} +0 -0
  276. /package/dist/{chunk-NLELGEKL.js.map → chunk-WIPTWZVH.js.map} +0 -0
  277. /package/dist/{chunk-RLPWXF5R.js.map → chunk-Y36PNW6J.js.map} +0 -0
  278. /package/dist/{chunk-TR2XFZPR.js.map → chunk-Y37VJFX2.js.map} +0 -0
  279. /package/dist/{cli-4ANSKDPD.js.map → cli-O6Y2KVWD.js.map} +0 -0
  280. /package/dist/{cli-USPQURPP.js.map → cli-XAT673VB.js.map} +0 -0
  281. /package/dist/{config-JJW75SBX.js.map → config-7I5CHHRZ.js.map} +0 -0
  282. /package/dist/{github-PBIYRH5S.js.map → github-IPBOTQBN.js.map} +0 -0
  283. /package/dist/{github-RJG2MAWB.js.map → github-XM36D7ZH.js.map} +0 -0
  284. /package/dist/{json-PQURAHQ5.js.map → json-225TND7K.js.map} +0 -0
  285. /package/dist/{lint-N2CY66JX.js.map → lint-NP3PC3SO.js.map} +0 -0
  286. /package/dist/{list-OMHTVFDY.js.map → list-JJGNKO6S.js.map} +0 -0
  287. /package/dist/{list-VBFNFEXV.js.map → list-Q457TIMA.js.map} +0 -0
  288. /package/dist/{page-X3HYSH6D.js.map → page-FJW7J2EU.js.map} +0 -0
  289. /package/dist/{picker-3XF36MJF.js.map → picker-FPUC5UGM.js.map} +0 -0
  290. /package/dist/{pretty-22PXIEOV.js.map → pretty-ECBO3EVT.js.map} +0 -0
  291. /package/dist/{pretty-K5BOCKBB.js.map → pretty-QFEN2SIA.js.map} +0 -0
  292. /package/dist/{provider-LBX4IXGX.js.map → provider-JY2I3VLF.js.map} +0 -0
  293. /package/dist/{release-VV3UTKE5.js.map → release-Z3ASYZ3S.js.map} +0 -0
  294. /package/dist/{reporters-26H3N2KW.js.map → reporters-IKKL5RHS.js.map} +0 -0
  295. /package/dist/{reporters-324OWH36.js.map → reporters-TDQDQHKE.js.map} +0 -0
  296. /package/dist/{reporters-5LIYYE6M.js.map → reporters-WGLQKW2Y.js.map} +0 -0
  297. /package/dist/{run-4EKG6EMI.js.map → run-BTETGGLW.js.map} +0 -0
  298. /package/dist/{types-Y6TXHM7M.js.map → sarif-K4SMB563.js.map} +0 -0
  299. /package/dist/{validate-LRYUEZLJ.js.map → sarif-ZHFK6PZY.js.map} +0 -0
@@ -6,20 +6,21 @@ import {
6
6
  canonicalSchemaRef,
7
7
  fingerprint,
8
8
  isErrorSeverity
9
- } from "./chunk-Y4TDIUG6.js";
9
+ } from "./chunk-BIRGZEWO.js";
10
10
  import {
11
11
  escapeWorkflowCommandMessage,
12
- escapeWorkflowCommandProperty
13
- } from "./chunk-MNH7QO4Z.js";
12
+ escapeWorkflowCommandProperty,
13
+ guidanceLines
14
+ } from "./chunk-QK6VYJHV.js";
14
15
  import {
15
16
  palette
16
17
  } from "./chunk-RNVYGWIC.js";
17
18
  import {
18
19
  findGitRoot
19
- } from "./chunk-OTJOBZJ5.js";
20
+ } from "./chunk-B2242FYO.js";
20
21
  import {
21
22
  package_default
22
- } from "./chunk-GNUZ37L2.js";
23
+ } from "./chunk-T3BBNLAT.js";
23
24
 
24
25
  // src/meta/reporters/rule-id.ts
25
26
  var SYNTHETIC_SCHEMA = "(parse)";
@@ -84,7 +85,7 @@ function artifactUri(file, frame) {
84
85
  return uri;
85
86
  }
86
87
  function renderSarif(results, opts = {}) {
87
- const { frame, onNotice } = opts;
88
+ const { frame, onNotice, resultProperties } = opts;
88
89
  const rebased = frame ? uriFrame(frame) : void 0;
89
90
  if (frame && rebased === null) onNotice?.(SARIF_NO_GIT_ROOT);
90
91
  const pathFrame = rebased ?? (frame ? { ...frame, base: frame.runBase ?? frame.cwd } : void 0);
@@ -102,13 +103,19 @@ function renderSarif(results, opts = {}) {
102
103
  continue;
103
104
  }
104
105
  const ruleId = ruleIdFor(e, frame);
106
+ const hooked = resultProperties?.(e, r);
107
+ const guidance = e.guidance ?? void 0;
108
+ const properties = guidance === void 0 && hooked === void 0 ? void 0 : { ...guidance === void 0 ? {} : { guidance }, ...hooked };
105
109
  if (!rules.has(ruleId)) {
106
110
  rules.set(ruleId, {
107
111
  id: ruleId,
108
112
  shortDescription: {
109
113
  text: describeRule(ruleId, e, canonicalSchemaRef(e.schema, frame))
110
114
  },
111
- helpUri: HELP_URI
115
+ // The schema's own page when it has one (proposal 0089). A meta
116
+ // rule spans every property of a schema, so it gets no
117
+ // `fullDescription`.
118
+ helpUri: guidance?.guide ?? HELP_URI
112
119
  });
113
120
  }
114
121
  sarifResults.push({
@@ -118,7 +125,9 @@ function renderSarif(results, opts = {}) {
118
125
  // `warning` and `note` levels are for a sibling tool's advisory
119
126
  // findings (#78).
120
127
  level: sarifLevel(e),
121
- message: { text: `${fieldLabel(e.instancePath)} ${e.message}` },
128
+ message: {
129
+ text: [`${fieldLabel(e.instancePath)} ${e.message}`, ...guidanceLines(e.guidance)].join("\n")
130
+ },
122
131
  locations: [
123
132
  {
124
133
  physicalLocation: {
@@ -134,7 +143,8 @@ function renderSarif(results, opts = {}) {
134
143
  }
135
144
  }
136
145
  ],
137
- partialFingerprints: { [FINGERPRINT_KEY]: fingerprint(e, frame) }
146
+ partialFingerprints: { [FINGERPRINT_KEY]: fingerprint(e, frame) },
147
+ ...properties === void 0 ? {} : { properties }
138
148
  });
139
149
  }
140
150
  }
@@ -214,12 +224,12 @@ function renderJunit(results, opts = {}) {
214
224
  lines.push(`${open}>`);
215
225
  for (const e of failing) {
216
226
  const where = e.file != null ? ` (${e.file}${e.line != null ? `:${e.line}` : ""})` : e.line != null ? ` (line ${e.line})` : "";
217
- lines.push(
218
- ` <failure${attr("type", ruleIdFor(e, opts.frame))}${attr(
219
- "message",
220
- `${fieldLabel(e.instancePath)} ${e.message}${where}`
221
- )}/>`
222
- );
227
+ const open2 = ` <failure${attr("type", ruleIdFor(e, opts.frame))}${attr(
228
+ "message",
229
+ `${fieldLabel(e.instancePath)} ${e.message}${where}`
230
+ )}`;
231
+ const body = guidanceLines(e.guidance).join("\n");
232
+ lines.push(body === "" ? `${open2}/>` : `${open2}>${xmlEscape(body)}</failure>`);
223
233
  }
224
234
  lines.push(" </testcase>");
225
235
  }
@@ -310,6 +320,7 @@ function renderPretty(results, summary, opts = {}) {
310
320
  `[${e.schema}]`
311
321
  )}`
312
322
  );
323
+ for (const line of guidanceLines(e.guidance)) lines.push(` ${c.dim(line)}`);
313
324
  }
314
325
  }
315
326
  const skipped = summary.gitignoreSkipped != null && summary.gitignoreSkipped > 0 ? `, ${summary.gitignoreSkipped} skipped by .gitignore` : "";
@@ -324,7 +335,11 @@ function renderPretty(results, summary, opts = {}) {
324
335
  return lines.join("\n");
325
336
  }
326
337
  function renderJson(results, summary) {
327
- return JSON.stringify({ summary, results }, null, 2);
338
+ const shaped = results.map((r) => ({
339
+ ...r,
340
+ errors: r.errors.map(({ guidance, ...rest }) => ({ ...rest, guidance: guidance ?? null }))
341
+ }));
342
+ return JSON.stringify({ summary, results: shaped }, null, 2);
328
343
  }
329
344
  function renderGithub(results) {
330
345
  const lines = [];
@@ -334,7 +349,7 @@ function renderGithub(results) {
334
349
  if (e.line != null) params.push(`line=${e.line}`);
335
350
  if (e.col != null) params.push(`col=${e.col}`);
336
351
  const msg = escapeWorkflowCommandMessage(
337
- `[${e.schema}] ${fieldLabel(e.instancePath)} ${e.message}`
352
+ [`[${e.schema}] ${fieldLabel(e.instancePath)} ${e.message}`, ...guidanceLines(e.guidance)].join("\n")
338
353
  );
339
354
  const level = e.severity ?? "error";
340
355
  lines.push(`::${level} ${params.join(",")}::${msg}`);
@@ -391,4 +406,4 @@ export {
391
406
  renderGithub,
392
407
  render
393
408
  };
394
- //# sourceMappingURL=chunk-WWKXPPN5.js.map
409
+ //# sourceMappingURL=chunk-3BMTCS4H.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/meta/reporters/rule-id.ts","../src/meta/reporters/sarif.ts","../src/shared/xml.ts","../src/meta/reporters/junit.ts","../src/meta/reporters/index.ts"],"sourcesContent":["/**\n * A violation's **rule identity**, shared by the SARIF `ruleId` and the JUnit\n * `<failure type>`.\n *\n * Built from `schema` + `keyword` and nothing else. `message` is Ajv-generated\n * prose, so a rule id derived from it would rename itself on any Ajv upgrade\n * and every historical alert in the consumer would close and reopen as new.\n * That is the same reasoning `src/core/baseline.ts` applies to fingerprints,\n * and for the same reason: these are the durable half of a violation.\n */\nimport type { FieldError } from \"../types.js\";\nimport { canonicalSchemaRef, type FingerprintContext } from \"../core/baseline.js\";\n\n/** The `schema` label the command layer stamps on its own failures. */\nconst SYNTHETIC_SCHEMA = \"(parse)\";\n\n/** A document whose metadata block could not be parsed. */\nexport const PARSE_ERROR_RULE = \"manni/parse-error\";\n\n/** A document no schema set could be resolved for. */\nexport const SCHEMA_ERROR_RULE = \"manni/schema-error\";\n\n/**\n * A document carrying a key a manifest owns (proposal 0037). Not a\n * synthetic-schema special case: `external:owned` is a builtin-shaped ref\n * like `check:<name>`, so the ordinary join produces this id.\n */\nexport const EXTERNAL_OWNED_RULE = \"external:owned/external\";\n\n/**\n * Two documents carry the same value of a manifest's join field (proposal\n * 0039), so one manifest entry matched both.\n */\nexport const EXTERNAL_DUPLICATE_RULE = \"external:duplicate/external\";\n\n/**\n * A property its schema marks `x-manni-encrypt` holds a plain value\n * (proposal 0045). Builtin-shaped like `external:owned`.\n */\nexport const ENCRYPTED_PLAIN_RULE = \"encrypted:plain/encrypted\";\n\n/**\n * A marked property holds a ciphertext that does not decrypt under the\n * current key (proposal 0045).\n */\nexport const ENCRYPTED_UNREADABLE_RULE = \"encrypted:unreadable/encrypted\";\n\n/**\n * A managed field whose asserted value differs from the derived one, or is\n * missing while a source has one. `derived:stale` is builtin-shaped like the\n * external refs, so the ordinary join produces this id too.\n */\nexport const DERIVED_STALE_RULE = \"derived:stale/derived\";\n\n/**\n * A key the page holds that its schemas mark `x-manni-location: external`\n * (proposal 0047). A warning, builtin-shaped like `external:owned`.\n */\nexport const LOCATION_EXTERNAL_RULE = \"location:external/location\";\n\n/**\n * A key a manifest supplies that its schemas mark `x-manni-location: page`\n * (proposal 0047). A warning, filed at the manifest line.\n */\nexport const LOCATION_PAGE_RULE = \"location:page/location\";\n\n/**\n * A value of a field its schema marks `x-manni-term` that names no term\n * (proposal 0086). Builtin-shaped like `location:external`.\n */\nexport const TERM_UNDEFINED_RULE = \"term:undefined/term\";\n\n/** A marked value that names a term outside the mark's `under` branch. */\nexport const TERM_OUTSIDE_BRANCH_RULE = \"term:outside-branch/term\";\n\n/** A marked value that names a term by an alt-label. A warning. */\nexport const TERM_ALT_LABEL_RULE = \"term:alt-label/term\";\n\n/** What each reserved rule means, for the consumer's rule listing. */\nexport const RESERVED_RULES: Record<string, string> = {\n [LOCATION_EXTERNAL_RULE]:\n \"The page stores a key its schema prefers external metadata for; run `manni meta relocate` to move it to the collection's manifest.\",\n [LOCATION_PAGE_RULE]:\n \"A manifest stores a key its schema prefers the page for; run `manni meta relocate` to move it into the page.\",\n [ENCRYPTED_PLAIN_RULE]:\n \"A property the schema marks x-manni-encrypt holds a plain value; the page must hold it encrypted.\",\n [ENCRYPTED_UNREADABLE_RULE]:\n \"A property the schema marks x-manni-encrypt holds a value that does not decrypt under the current key.\",\n [TERM_UNDEFINED_RULE]:\n \"A value of a field the schema marks x-manni-term names no term in the termbase.\",\n [TERM_OUTSIDE_BRANCH_RULE]:\n \"A value of a field the schema marks x-manni-term names a term outside the branch its under names.\",\n [TERM_ALT_LABEL_RULE]:\n \"A value of a field the schema marks x-manni-term names a term by an alt-label; use the label.\",\n [PARSE_ERROR_RULE]: \"The document's metadata block could not be parsed.\",\n [SCHEMA_ERROR_RULE]: \"No schema set could be resolved for the document.\",\n [EXTERNAL_OWNED_RULE]:\n \"The document carries a key a manifest owns; the manifest is the only place that key may be set.\",\n [EXTERNAL_DUPLICATE_RULE]:\n \"Two documents carry the same value of a manifest's join field, so one manifest entry matched both.\",\n [DERIVED_STALE_RULE]:\n \"A managed field whose value differs from what git, CODEOWNERS or the GitHub or GitLab review record says; run `manni meta derive` to refresh it.\",\n};\n\n/**\n * The rule id for one violation.\n *\n * docmeta's own failures carry `schema: \"(parse)\"` and no real keyword, so the\n * naive join yields `(parse)/parse` — a rule id that names an implementation\n * detail and reads as garbage in a security tab. They get reserved ids instead.\n *\n * With a `frame`, the schema reference is canonicalized exactly as a\n * fingerprint's is, so a local-file schema does not produce one rule id from\n * the repository root and a different, machine-specific one from `docs/`.\n */\nexport function ruleIdFor(e: FieldError, frame?: FingerprintContext): string {\n if (e.schema === SYNTHETIC_SCHEMA) {\n if (e.keyword === \"parse\") return PARSE_ERROR_RULE;\n if (e.keyword === \"schema\") return SCHEMA_ERROR_RULE;\n }\n return `${canonicalSchemaRef(e.schema, frame)}/${e.keyword}`;\n}\n\n/** `\"\"` is the whole document; every reporter spells that the same way. */\nexport function fieldLabel(instancePath: string): string {\n return instancePath === \"\" ? \"(root)\" : instancePath;\n}\n","/**\n * SARIF 2.1.0 — the interchange format GitHub code scanning, GitLab, and Azure\n * DevOps ingest directly.\n *\n * What `--format github` cannot do is persist: `::error` workflow commands\n * render on the pull request and then vanish with the job log. SARIF findings\n * become tracked alerts with state across commits, which is what makes \"when\n * did this regress\" and \"is metadata debt trending down\" answerable at all.\n *\n * Three properties carry that tracking, and each has a trap:\n *\n * - **`artifactLocation.uri` must be repository-root-relative.** GitHub\n * resolves it against the repository root and *silently drops* results that\n * do not resolve — the upload succeeds, with zero alerts. `ValidationResult`\n * labels are relative to whatever the run resolved against, which is only\n * coincidentally the repository root, so they are rebased here.\n * - **`ruleId` must not be built from prose.** See `./rule-id.ts`.\n * - **`partialFingerprints` must match the baseline's fingerprint.** One\n * identity function, two consumers.\n */\nimport { isAbsolute } from \"node:path\";\nimport pkg from \"../../../package.json\" with { type: \"json\" };\nimport {\n isErrorSeverity,\n type FieldError,\n type ValidationResult,\n} from \"../types.js\";\nimport {\n canonicalFilePath,\n canonicalSchemaRef,\n fingerprint,\n type FingerprintContext,\n} from \"../core/baseline.js\";\nimport { findGitRoot } from \"../core/config.js\";\n// One definition, in core: commands set this label and reporters test for it,\n// so two copies would drift and a `<stdin>` result would acquire an\n// `artifactLocation.uri` naming a file that does not exist.\nimport { STDIN_LABEL } from \"../core/load-files.js\";\nimport { RESERVED_RULES, fieldLabel, ruleIdFor } from \"./rule-id.js\";\nimport { guidanceLines } from \"../../shared/guidance.js\";\n\n/** Where a consumer is sent to read about docmeta itself. */\nconst INFORMATION_URI = \"https://hawkeyexl.github.io/manni/meta/\";\n\n/** Where a consumer is sent to read about one finding. */\nconst HELP_URI = \"https://hawkeyexl.github.io/manni/meta/fix/\";\n\n/**\n * The property-bag key GitHub keys alert identity on. Versioned deliberately,\n * and **not renamed with the tool**: the value is what lets an alert opened by\n * a docmeta run stay the same alert under manni. A new key would re-open every\n * finding once; that is what `/v2` is for, should the fingerprint ever change.\n */\nconst FINGERPRINT_KEY = \"docmetaViolation/v1\";\n\n/** Not a path anyone can resolve, so it can never be an artifact location. */\n// Imported rather than redeclared: two independent copies of this literal\n// would drift silently, and the failure mode is a `<stdin>` result acquiring an\n// `artifactLocation.uri` that names no file.\n\n/**\n * Said once, on stderr, when SARIF paths could not be made\n * repository-root-relative — the `GITIGNORE_UNAVAILABLE` precedent. Degrading\n * in silence is the wrong failure here: a uri that does not resolve produces a\n * *successful* upload with no alerts, so nothing downstream ever complains.\n */\nexport const SARIF_NO_GIT_ROOT =\n \"SARIF paths could not be made repository-root-relative: no git repository was found here. GitHub code scanning resolves artifactLocation.uri against the repository root and drops results that do not resolve, so an upload may report no findings at all.\";\n\nexport interface SarifOptions {\n /** The run's path frame. Without one, `file` labels are emitted as they are. */\n frame?: FingerprintContext;\n /** Diagnostics for the user; the CLI writes these to stderr. */\n onNotice?: (message: string) => void;\n /**\n * Extra `result.properties` for one finding, or `undefined` for none.\n *\n * A tool that wraps this writer, as cite and term do, attaches what meta\n * cannot know, such as a finding's guidance. The hook is handed the very\n * `FieldError` object the caller passed in, so the caller pairs by\n * identity. Pairing by position would shift whenever a result is skipped\n * or dropped, and both happen here. It is not called for a dropped result,\n * one whose path lies outside the repository, or for a `<stdin>` result,\n * which is not an artifact.\n */\n resultProperties?: (\n error: FieldError,\n result: ValidationResult,\n ) => Record<string, unknown> | undefined;\n}\n\ntype SarifLevel = \"error\" | \"warning\" | \"note\";\n\n/**\n * SARIF's word for a finding's weight. The family's `error` and `warning`\n * are SARIF's own; its `notice` is SARIF's `note`. An absent severity is\n * `error`, as everywhere (`isErrorSeverity`).\n */\nfunction sarifLevel(e: Parameters<typeof isErrorSeverity>[0]): SarifLevel {\n if (isErrorSeverity(e)) return \"error\";\n return e.severity === \"notice\" ? \"note\" : \"warning\";\n}\n\ninterface SarifRule {\n id: string;\n shortDescription: { text: string };\n helpUri: string;\n}\n\ninterface SarifResult {\n ruleId: string;\n level: SarifLevel;\n message: { text: string };\n locations: {\n physicalLocation: {\n artifactLocation: { uri: string };\n region?: { startLine: number };\n };\n }[];\n partialFingerprints: Record<string, string>;\n properties?: Record<string, unknown>;\n}\n\n/**\n * What a rule *is*, in one line.\n *\n * Only the reserved rules get bespoke prose; everything else is named by the\n * schema and keyword that produced it, which is all docmeta actually knows. A\n * per-keyword phrasebook would be prose docmeta would then have to keep in step\n * with Ajv's own vocabulary for no consumer benefit.\n */\nfunction describeRule(id: string, e: FieldError, schemaRef: string): string {\n return (\n RESERVED_RULES[id] ??\n `Schema \"${schemaRef}\" rejected the document on its \"${e.keyword}\" keyword.`\n );\n}\n\n/**\n * Said when a result had to be dropped because its path lies outside the\n * repository.\n *\n * Dropping is the only truthful option — GitHub would drop it anyway, having\n * failed to resolve it — but doing so in silence reproduces the exact failure\n * this reporter exists to prevent: an upload that succeeds while reporting\n * fewer findings than the run actually made.\n */\nexport const sarifDroppedNotice = (n: number): string =>\n `${n} SARIF ${n === 1 ? \"finding lies\" : \"findings lie\"} outside the repository and ${n === 1 ? \"was\" : \"were\"} omitted: an artifactLocation.uri that leaves the repository root cannot be resolved by a code-scanning consumer.`;\n\n/**\n * The frame `artifactLocation.uri` is measured against.\n *\n * Same rebase `canonicalFilePath` already performs for baseline keys, with\n * `base` swapped for the repository root. Returns null when there is nothing to\n * rebase against, which the caller reports rather than papers over.\n */\nfunction uriFrame(frame: FingerprintContext): FingerprintContext | null {\n const root = findGitRoot(frame.cwd);\n return root === null ? null : { ...frame, base: root };\n}\n\n/**\n * A uri SARIF accepts: relative, posix, and never climbing out of the\n * repository.\n *\n * A file above the repository root rebases to `../…`, which SARIF permits but\n * GitHub cannot resolve. There is nothing truthful to emit for it, so the\n * result is dropped rather than pointed at a path that does not exist — the\n * same reasoning that skips `<stdin>`.\n */\nfunction artifactUri(\n file: string,\n frame: FingerprintContext | undefined,\n): string | null {\n const uri = canonicalFilePath(file, frame);\n // An absolute path is not a repository-relative uri either. `relative()`\n // returns one when the two paths share no root, which on Windows is any\n // checkout and temp directory on different drives.\n if (uri === \"\" || uri.startsWith(\"../\") || isAbsolute(uri)) return null;\n return uri;\n}\n\nexport function renderSarif(\n results: ValidationResult[],\n opts: SarifOptions = {},\n): string {\n const { frame, onNotice, resultProperties } = opts;\n\n // Two frames, deliberately: fingerprints stay measured against the config's\n // directory (so a baseline recorded from anywhere matches), while uris are\n // measured against the repository root (so GitHub can resolve them).\n const rebased = frame ? uriFrame(frame) : undefined;\n if (frame && rebased === null) onNotice?.(SARIF_NO_GIT_ROOT);\n // With no repository there is no root to measure from, and falling back to\n // `frame` would measure against the *config's* directory — which for a config\n // outside the tree being validated yields `../…` for every file, and\n // `artifactUri` drops those. That turns \"no git repo\" into \"no findings at\n // all\". Measure from where the run actually resolved its inputs instead: the\n // paths are no longer repository-relative, which the notice above already\n // says, but they are at least the paths the user typed.\n const pathFrame =\n rebased ?? (frame ? { ...frame, base: frame.runBase ?? frame.cwd } : undefined);\n\n const rules = new Map<string, SarifRule>();\n const sarifResults: SarifResult[] = [];\n let dropped = 0;\n\n for (const r of results) {\n if (r.errors.length === 0) continue;\n // `<stdin>` is not a path; nothing is lost by leaving it out, so it is not\n // counted as a drop.\n if (r.file === STDIN_LABEL) continue;\n const docUri = artifactUri(r.file, pathFrame);\n\n for (const e of r.errors) {\n // A value a manifest supplied is located in the manifest (proposal\n // 0037), which may be the one file of the run that *is* inside the\n // repository when the documents are not, or the reverse — so each\n // finding resolves its own uri, and is dropped on its own.\n const uri = e.file != null ? artifactUri(e.file, pathFrame) : docUri;\n if (uri === null) {\n dropped += 1;\n continue;\n }\n const ruleId = ruleIdFor(e, frame);\n const hooked = resultProperties?.(e, r);\n const guidance = e.guidance ?? undefined;\n const properties =\n guidance === undefined && hooked === undefined\n ? undefined\n : { ...(guidance === undefined ? {} : { guidance }), ...hooked };\n if (!rules.has(ruleId)) {\n rules.set(ruleId, {\n id: ruleId,\n shortDescription: {\n text: describeRule(ruleId, e, canonicalSchemaRef(e.schema, frame)),\n },\n // The schema's own page when it has one (proposal 0089). A meta\n // rule spans every property of a schema, so it gets no\n // `fullDescription`.\n helpUri: guidance?.guide ?? HELP_URI,\n });\n }\n sarifResults.push({\n ruleId,\n // `FieldError.severity` maps onto SARIF's triage axis directly. Meta's\n // own validation never sets it, so its findings are all `error`; the\n // `warning` and `note` levels are for a sibling tool's advisory\n // findings (#78).\n level: sarifLevel(e),\n message: {\n text: [`${fieldLabel(e.instancePath)} ${e.message}`, ...guidanceLines(e.guidance)].join(\"\\n\"),\n },\n locations: [\n {\n physicalLocation: {\n artifactLocation: { uri },\n // SARIF requires `startLine >= 1`. `0` is schema-invalid and `1`\n // silently mislocates the finding at the top of the file, so an\n // unknown line omits the region and renders file-level, which is\n // true. `startColumn` is deliberately still absent: html and xml\n // now populate `col`, but the rest of the region work (endLine,\n // endColumn, snippet) belongs to 0003, and a lone startColumn\n // would be the half of it that misleads.\n ...(e.line != null ? { region: { startLine: e.line } } : {}),\n },\n },\n ],\n partialFingerprints: { [FINGERPRINT_KEY]: fingerprint(e, frame) },\n ...(properties === undefined ? {} : { properties }),\n });\n }\n }\n\n if (dropped > 0) onNotice?.(sarifDroppedNotice(dropped));\n\n return `${JSON.stringify(\n {\n $schema: \"https://json.schemastore.org/sarif-2.1.0.json\",\n version: \"2.1.0\",\n runs: [\n {\n tool: {\n driver: {\n name: \"manni\",\n version: pkg.version,\n informationUri: INFORMATION_URI,\n // Only rules this run actually hit. Enumerating every keyword of\n // every schema would mean compiling and walking each one, for no\n // consumer benefit.\n rules: [...rules.values()],\n },\n },\n results: sarifResults,\n },\n ],\n },\n null,\n 2,\n )}`;\n}\n","/**\n * XML text escaping, shared by every reporter that writes XML.\n *\n * Moved here from meta's JUnit writer when tracevals needed it too, so the\n * family keeps one escaping rule rather than one per tool.\n */\n\nconst XML_ENTITIES: Record<string, string> = {\n \"&\": \"&amp;\",\n \"<\": \"&lt;\",\n \">\": \"&gt;\",\n '\"': \"&quot;\",\n \"'\": \"&apos;\",\n};\n\n/**\n * Escape every XML metacharacter, and drop the control characters XML 1.0\n * forbids outright.\n *\n * `>` and `'` do not strictly need escaping in every position, but escaping all\n * five unconditionally means no caller has to know which position it is in —\n * which is precisely the reasoning a partial escaper gets wrong. The control\n * character strip is separate: those cannot be represented in XML 1.0 at all,\n * escaped or not, so a stray one makes the whole document unparseable rather\n * than merely mis-rendered. Tab, newline, and carriage return are legal, and\n * kept.\n */\n/**\n * XML 1.0's `Char` production, in full:\n *\n * #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]\n *\n * C0 controls are the familiar exclusion, but they are not the only one: a lone\n * surrogate half and the noncharacters U+FFFE/U+FFFF are equally illegal, and\n * both sit in a JavaScript string quite happily — a schema-authored `pattern`\n * or a filename can carry either. Iterating with `for…of` yields whole code\n * points, so a *well-formed* surrogate pair arrives as one astral character\n * (>= U+10000) and is kept; only an unpaired half falls in the D800-DFFF gap\n * and is dropped.\n */\nfunction isXmlChar(code: number): boolean {\n return (\n code === 0x9 ||\n code === 0xa ||\n code === 0xd ||\n (code >= 0x20 && code <= 0xd7ff) ||\n (code >= 0xe000 && code <= 0xfffd) ||\n (code >= 0x10000 && code <= 0x10ffff)\n );\n}\n\nexport function xmlEscape(value: string): string {\n let out = \"\";\n for (const ch of value) {\n const code = ch.codePointAt(0) ?? 0;\n if (!isXmlChar(code)) continue;\n out += XML_ENTITIES[ch] ?? ch;\n }\n return out;\n}\n","/**\n * JUnit XML — what CI systems parse for the \"Tests\" tab.\n *\n * There is no authoritative JUnit schema; Jenkins, GitLab, CircleCI, and Azure\n * each accept a different superset. This writer sticks to the attributes all of\n * them honor (`name`, `tests`, `failures`, `errors`, `classname`, `type`,\n * `message`) and avoids the contested ones — `time`, which would be meaningless\n * here, `system-out`, and nested suites. That is a compatibility judgement, not\n * a specification.\n *\n * **One `<testcase>` per file, one `<failure>` per violation.** So the tab reads\n * \"2 tests, 1 failed\" and matches `2 files checked, 1 failed`.\n * Violation-as-testcase would make the test count rise and fall with document\n * quality, which reads as a suite someone broke.\n *\n * **A warning is not a `<failure>`.** JUnit has no level below failure, and a\n * `<failure>` that did not fail the run would make the tab disagree with the\n * exit code. A warning-only file is a passing testcase; the warning is still\n * in the JSON and SARIF output, which have somewhere to put it.\n *\n * Escaping is the one thing a hand-rolled writer gets wrong. Messages carry\n * schema-authored text — a `pattern` regex may hold `<`, `&`, and quotes — and\n * paths can hold `&`. Every attribute value and failure body goes through\n * `xmlEscape`; nothing is interpolated raw.\n */\nimport type { FingerprintContext } from \"../core/baseline.js\";\nimport { isErrorSeverity, type ValidationResult } from \"../types.js\";\nimport { fieldLabel, ruleIdFor } from \"./rule-id.js\";\nimport { xmlEscape } from \"../../shared/xml.js\";\nimport { guidanceLines } from \"../../shared/guidance.js\";\n\nexport { xmlEscape };\n\n/** Suite and classname. One suite per run; nested suites are not portable. */\nconst SUITE_NAME = \"manni\";\nconst CLASS_NAME = \"manni.validate\";\n\nconst attr = (name: string, value: string): string =>\n ` ${name}=\"${xmlEscape(value)}\"`;\n\nexport interface JunitOptions {\n /**\n * The `classname` each `<testcase>` carries: which docmeta command produced\n * these findings. Defaults to `docmeta.validate`, the only producer before\n * proposal 0026 made `query --check` a second one — whose findings must not\n * ship under validate's name.\n */\n classname?: string;\n /**\n * The run's path frame, used only to canonicalize a local-file schema ref in\n * `<failure type>`.\n *\n * Without it the attribute carries the ref exactly as the run received it —\n * `./my.schema.json` from the repo root, `../my.schema.json` from a\n * subdirectory, or a machine-absolute path once config discovery has rebased\n * it. SARIF's `ruleId` is already canonical, so a consumer correlating the two\n * for one run would find them disagreeing on the same violation.\n */\n frame?: FingerprintContext;\n}\n\nexport function renderJunit(\n results: ValidationResult[],\n opts: JunitOptions = {},\n): string {\n const tests = results.length;\n const failures = results.filter((r) => r.errors.some(isErrorSeverity)).length;\n\n const counts =\n attr(\"name\", SUITE_NAME) +\n attr(\"tests\", String(tests)) +\n attr(\"failures\", String(failures)) +\n // Every violation is a `<failure>`; `errors` is reserved for a test that\n // could not run, which has no analogue here. Emitted as 0 rather than\n // omitted, because consumers read the attribute and show a blank column\n // without it.\n attr(\"errors\", \"0\");\n\n const lines: string[] = [\n '<?xml version=\"1.0\" encoding=\"UTF-8\"?>',\n `<testsuites${counts}>`,\n ` <testsuite${counts}>`,\n ];\n\n const classname = opts.classname ?? CLASS_NAME;\n for (const r of results) {\n const open = ` <testcase${attr(\"name\", r.file)}${attr(\"classname\", classname)}`;\n const failing = r.errors.filter(isErrorSeverity);\n if (failing.length === 0) {\n // Self-closing: a passing test has nothing to carry.\n lines.push(`${open}/>`);\n continue;\n }\n lines.push(`${open}>`);\n for (const e of failing) {\n const where =\n e.file != null\n ? ` (${e.file}${e.line != null ? `:${e.line}` : \"\"})`\n : e.line != null\n ? ` (line ${e.line})`\n : \"\";\n const open = ` <failure${attr(\"type\", ruleIdFor(e, opts.frame))}${attr(\n \"message\",\n `${fieldLabel(e.instancePath)} ${e.message}${where}`,\n )}`;\n // What the rule asks for goes in the body, which every consumer shows\n // as the failure's detail. Without guidance the element stays\n // self-closing, byte for byte as before.\n const body = guidanceLines(e.guidance).join(\"\\n\");\n lines.push(body === \"\" ? `${open}/>` : `${open}>${xmlEscape(body)}</failure>`);\n }\n lines.push(\" </testcase>\");\n }\n\n lines.push(\" </testsuite>\", \"</testsuites>\");\n return lines.join(\"\\n\");\n}\n","/**\n * Reporters render validation results to a string. The command layer writes\n * the result to stdout; diagnostics go to stderr separately.\n */\nimport {\n DocmetaError,\n isErrorSeverity,\n type BaselineSummary,\n type RunSummary,\n type ValidationResult,\n} from \"../types.js\";\nimport type { FingerprintContext } from \"../core/baseline.js\";\nimport { palette } from \"../../shared/color.js\";\nimport { fieldLabel } from \"./rule-id.js\";\nimport { guidanceLines } from \"../../shared/guidance.js\";\nimport { renderSarif, type SarifOptions } from \"./sarif.js\";\nimport { renderJunit, type JunitOptions } from \"./junit.js\";\nimport {\n escapeWorkflowCommandMessage,\n escapeWorkflowCommandProperty,\n} from \"./github.js\";\n\nexport { renderSarif, SARIF_NO_GIT_ROOT } from \"./sarif.js\";\nexport type { SarifOptions } from \"./sarif.js\";\nexport { renderJunit, xmlEscape } from \"./junit.js\";\nexport type { JunitOptions } from \"./junit.js\";\nexport {\n escapeWorkflowCommandMessage,\n escapeWorkflowCommandProperty,\n} from \"./github.js\";\nexport {\n PARSE_ERROR_RULE,\n SCHEMA_ERROR_RULE,\n ruleIdFor,\n} from \"./rule-id.js\";\n\n/**\n * Every value `--format` accepts, in the order help and error messages list\n * them.\n *\n * The list is stated **once**. It used to live in five unlinked places — this\n * union, a separate `Set<string>` in the CLI, the error message, the option\n * description, and the docs — and the `Set` was not tied to the union at all,\n * so widening the union alone type-checked and still rejected the new value at\n * runtime. Deriving the union from the array makes that drift impossible.\n */\nexport const REPORT_FORMATS = [\n \"pretty\",\n \"json\",\n \"github\",\n \"sarif\",\n \"junit\",\n] as const;\n\nexport type ReportFormat = (typeof REPORT_FORMATS)[number];\n\n/**\n * A format list as a sentence fragment: `\"pretty or json\"`,\n * `\"pretty, json, or github\"`.\n *\n * The two-value case is why this is a function rather than one `join`. A pair\n * takes no comma before \"or\", and `get` and `schemas` have said \"Use pretty or\n * json.\" since long before the list was shared — a mechanical\n * `map(...).join(\", \")` would have quietly reworded every one of those messages\n * to \"pretty, or json\".\n */\nexport function formatList(formats: readonly string[]): string {\n // Destructured and guarded rather than indexed. `noUncheckedIndexedAccess`\n // types `formats[0]` as `string | undefined` however the length was checked,\n // so the interpolation below would happily print \"undefined\" — these two\n // guards say what `length < 2` said, in a form the compiler can carry.\n const [first, second] = formats;\n if (first === undefined) return \"\";\n if (second === undefined) return first;\n // Still needed, and not redundant however it reads: a defined `second` proves\n // there are *at least* two, not exactly two. Three or more falls through to\n // the comma-joined form below.\n if (formats.length === 2) return `${first} or ${second}`;\n return formats\n .map((format, i) => (i === formats.length - 1 ? `or ${format}` : format))\n .join(\", \");\n}\n\n/** `\"pretty, json, github, sarif, or junit\"`, for messages and help text. */\nexport const REPORT_FORMAT_LIST = formatList(REPORT_FORMATS);\n\nexport function isReportFormat(value: string): value is ReportFormat {\n return (REPORT_FORMATS as readonly string[]).includes(value);\n}\n\n/**\n * The formats **every** command produces.\n *\n * `get` and `schemas` accept exactly these two, and each used to spell the pair\n * out inline in `src/cli.ts` as `format !== \"pretty\" && format !== \"json\"` with\n * a hand-written \"Use pretty or json.\" beside it — the same stringly-typed\n * drift this module's `REPORT_FORMATS` comment describes, reproduced three more\n * times. Stated once, the guard and the message cannot disagree.\n */\nexport const COMMON_FORMATS = [\"pretty\", \"json\"] as const;\n\nexport type CommonFormat = (typeof COMMON_FORMATS)[number];\n\n/** `\"pretty or json\"`, for messages and help text. */\nexport const COMMON_FORMAT_LIST = formatList(COMMON_FORMATS);\n\nexport function isCommonFormat(value: string): value is CommonFormat {\n return (COMMON_FORMATS as readonly string[]).includes(value);\n}\n\n/**\n * The formats `query` accepts, one six-value list with per-value gates:\n * `pretty | json | csv` render result rows unconditionally (csv is proposal\n * 0029), and the findings three — `github | sarif | junit` — are legal only\n * under `--check` (proposal 0026).\n *\n * A list of its own rather than `REPORT_FORMATS`: `validate`'s list and\n * `query`'s grow independently — `csv` lives here and not there — and one\n * shared const would make every addition to either a change to both.\n */\nexport const QUERY_FORMATS = [\n \"pretty\",\n \"json\",\n \"csv\",\n \"github\",\n \"sarif\",\n \"junit\",\n] as const;\n\nexport type QueryFormat = (typeof QUERY_FORMATS)[number];\n\n/** `\"pretty, json, csv, github, sarif, or junit\"`, for messages and help. */\nexport const QUERY_FORMAT_LIST = formatList(QUERY_FORMATS);\n\nexport function isQueryFormat(value: string): value is QueryFormat {\n return (QUERY_FORMATS as readonly string[]).includes(value);\n}\n\n/**\n * The `query` formats that render **findings** rather than rows — legal only\n * with `--check`, and only when the result carries the `path` column the\n * finding convention is built from. Typed as its own union (not just a set\n * membership test) so the CLI's dispatch can hand a narrowed format straight\n * to `render`, which takes `ReportFormat` and has no `csv` case.\n */\nexport const QUERY_FINDINGS_FORMATS = [\n \"github\",\n \"sarif\",\n \"junit\",\n] as const satisfies readonly QueryFormat[];\n\nexport type QueryFindingsFormat = (typeof QUERY_FINDINGS_FORMATS)[number];\n\n/**\n * A *narrowing* guard on purpose: the CLI's query switch handles the findings\n * formats in an early return, and this is what lets its remaining cases stay\n * compile-time exhaustive over `pretty | json | csv` — a bare `Set.has` would\n * leave the union unnarrowed and force the `never` guard out.\n */\nexport function isQueryFindingsFormat(\n value: QueryFormat,\n): value is QueryFindingsFormat {\n return (QUERY_FINDINGS_FORMATS as readonly string[]).includes(value);\n}\n\n/**\n * Formats something other than a person reads.\n *\n * These own stdout completely: a diagnostic printed alongside them (which\n * config governed the run, say) would corrupt the parse. Colored escape codes\n * would too, which is why the same predicate answers both questions.\n */\nexport const MACHINE_FORMATS: ReadonlySet<ReportFormat> = new Set<ReportFormat>(\n [\"json\", \"github\", \"sarif\", \"junit\"],\n);\n\nexport const isMachineFormat = (format: ReportFormat): boolean =>\n MACHINE_FORMATS.has(format);\n\n/**\n * Formats whose output may legitimately be empty.\n *\n * `github` prints one annotation per finding, so a clean run has nothing to\n * say. Every other format has an **envelope** that must arrive even when it\n * holds nothing: a zero-byte SARIF file makes `upload-sarif` fail outright, and\n * a zero-byte JUnit file reads as a lost report rather than a passing one. So\n * emptiness is a property of the format, not of the text — which is what the\n * CLI's old bare `if (text.length > 0)` guard got wrong.\n */\nexport const OMITTED_WHEN_CLEAN: ReadonlySet<ReportFormat> =\n new Set<ReportFormat>([\"github\"]);\n\nexport interface ReportOptions extends SarifOptions, JunitOptions {\n color?: boolean;\n /** In pretty output, omit passing files. */\n quiet?: boolean;\n}\n\nexport type { FingerprintContext };\n\nconst plural = (n: number, one: string, many: string): string =>\n `${n} ${n === 1 ? one : many}`;\n\n/**\n * The baseline's line in the summary.\n *\n * A baseline is amnesty, and amnesty that goes quiet becomes permanent — so the\n * count is printed on **every** run, including the one where nothing was\n * forgiven, rather than only when something changes. The stale clause is what\n * makes a rename diagnosable: without it the user sees a wall of \"new\" findings\n * with no hint that the fix is a re-record.\n */\nfunction baselineLines(b: BaselineSummary): string[] {\n if (b.written) {\n const added = b.added ?? 0;\n const removed = b.removed ?? 0;\n return [\n `Baseline written to ${b.path}`,\n ` ${plural(b.recorded, \"finding\", \"findings\")} recorded (+${added} new, -${removed} ${\n removed === 1 ? \"no longer occurs\" : \"no longer occur\"\n })`,\n ];\n }\n const head = plural(b.recorded, \"baselined finding\", \"baselined findings\");\n if (b.stale === 0) return [head];\n const stale = b.stale === 1 ? \"1 no longer occurs\" : `${b.stale} no longer occur`;\n return [`${head}, ${stale} — run --write-baseline to prune`];\n}\n\nexport function renderPretty(\n results: ValidationResult[],\n summary: RunSummary,\n opts: ReportOptions = {},\n): string {\n const c = palette(opts.color ?? false);\n const lines: string[] = [];\n\n for (const r of results) {\n // What the baseline forgave here, so a passing file still shows its debt.\n const forgiven =\n r.baselined != null && r.baselined > 0\n ? c.dim(` (${r.baselined} baselined)`)\n : \"\";\n if (r.ok && r.errors.length === 0) {\n if (!opts.quiet) lines.push(`${c.green(\"✓\")} ${r.file}${forgiven}`);\n continue;\n }\n // A file that is `ok` with findings holds only warnings: something to\n // say, so `--quiet` keeps it, but not a failure, so it is not a `✗`.\n const mark = r.ok ? c.yellow(\"⚠\") : c.red(\"✗\");\n lines.push(`${mark} ${r.file}${forgiven}`);\n for (const e of r.errors) {\n // A value a manifest supplied is located in the manifest, not the\n // document, and the location says so (proposal 0037).\n const loc =\n e.file != null\n ? c.dim(` (${e.file}${e.line != null ? `:${e.line}` : \"\"})`)\n : e.line != null\n ? c.dim(` (line ${e.line})`)\n : \"\";\n const level = isErrorSeverity(e)\n ? \"\"\n : `${e.severity === \"notice\" ? c.dim(\"notice\") : c.yellow(\"warning\")} `;\n lines.push(\n ` ${c.cyan(fieldLabel(e.instancePath))} ${level}${e.message}${loc} ${c.dim(\n `[${e.schema}]`,\n )}`,\n );\n // What the schema asks of the property, under the finding (0089).\n for (const line of guidanceLines(e.guidance)) lines.push(` ${c.dim(line)}`);\n }\n }\n\n // Files `.gitignore` took away are named on the summary line, not left to be\n // inferred from a count that quietly shrank. A gate getting quieter without\n // being asked is the dangerous direction of change; this is what makes it\n // auditable. Omitted at zero, which is every run in a clean repo.\n const skipped =\n summary.gitignoreSkipped != null && summary.gitignoreSkipped > 0\n ? `, ${summary.gitignoreSkipped} skipped by .gitignore`\n : \"\";\n // Warnings are named only when there are any, for the same reason as the\n // skip count: every run of meta's own validation has none.\n const warnings =\n summary.warnings != null && summary.warnings > 0\n ? `, ${plural(summary.warnings, \"warning\", \"warnings\")}`\n : \"\";\n const notices =\n summary.notices != null && summary.notices > 0\n ? `, ${plural(summary.notices, \"notice\", \"notices\")}`\n : \"\";\n const summaryText = `${summary.files} file${summary.files === 1 ? \"\" : \"s\"} checked, ${summary.passed} passed, ${summary.failed} failed, ${summary.errors} error${summary.errors === 1 ? \"\" : \"s\"}${warnings}${notices}${skipped}`;\n if (lines.length > 0) lines.push(\"\");\n lines.push(summary.failed > 0 ? c.red(summaryText) : c.green(summaryText));\n if (summary.baseline) {\n for (const l of baselineLines(summary.baseline)) lines.push(c.dim(l));\n }\n return lines.join(\"\\n\");\n}\n\nexport function renderJson(\n results: ValidationResult[],\n summary: RunSummary,\n): string {\n // Every error carries `guidance`, last, and `null` where nothing judged it\n // (proposal 0089), so a consumer reads one shape.\n const shaped = results.map((r) => ({\n ...r,\n errors: r.errors.map(({ guidance, ...rest }) => ({ ...rest, guidance: guidance ?? null })),\n }));\n return JSON.stringify({ summary, results: shaped }, null, 2);\n}\n\nexport function renderGithub(results: ValidationResult[]): string {\n const lines: string[] = [];\n for (const r of results) {\n for (const e of r.errors) {\n const params = [`file=${escapeWorkflowCommandProperty(e.file ?? r.file)}`];\n if (e.line != null) params.push(`line=${e.line}`);\n if (e.col != null) params.push(`col=${e.col}`);\n // Escaped as one string, after assembly: the schema id and the field\n // label are as capable of carrying a `%` as the message is.\n const msg = escapeWorkflowCommandMessage(\n [`[${e.schema}] ${fieldLabel(e.instancePath)} ${e.message}`, ...guidanceLines(e.guidance)].join(\"\\n\"),\n );\n // The family scale was chosen to be GitHub's, so the level is the\n // severity, and an absent one is `error` (`isErrorSeverity`).\n // `::warning` and `::notice` render inline like `::error` but do not\n // fail the check, which is the severity invariant in GitHub's terms.\n const level = e.severity ?? \"error\";\n lines.push(`::${level} ${params.join(\",\")}::${msg}`);\n }\n }\n return lines.join(\"\\n\");\n}\n\nexport function render(\n format: ReportFormat,\n results: ValidationResult[],\n summary: RunSummary,\n opts: ReportOptions = {},\n): string {\n switch (format) {\n case \"json\":\n return renderJson(results, summary);\n case \"github\":\n return renderGithub(results);\n case \"sarif\":\n return renderSarif(results, opts);\n case \"junit\":\n return renderJunit(results, opts);\n case \"pretty\":\n return renderPretty(results, summary, opts);\n default: {\n // Exhaustive: adding a format to `REPORT_FORMATS` without a case here is\n // a compile error. The throw is for the runtime half — `render` is public\n // API, and before this existed a caller passing \"sarif\" fell through to\n // `pretty` and got a human report where it asked for a machine one.\n const unreachable: never = format;\n throw new DocmetaError(\n `Unknown report format ${JSON.stringify(unreachable)}. Use ${REPORT_FORMAT_LIST}.`,\n );\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAM,mBAAmB;AAGlB,IAAM,mBAAmB;AAGzB,IAAM,oBAAoB;AAO1B,IAAM,sBAAsB;AAM5B,IAAM,0BAA0B;AAMhC,IAAM,uBAAuB;AAM7B,IAAM,4BAA4B;AAOlC,IAAM,qBAAqB;AAM3B,IAAM,yBAAyB;AAM/B,IAAM,qBAAqB;AAM3B,IAAM,sBAAsB;AAG5B,IAAM,2BAA2B;AAGjC,IAAM,sBAAsB;AAG5B,IAAM,iBAAyC;AAAA,EACpD,CAAC,sBAAsB,GACrB;AAAA,EACF,CAAC,kBAAkB,GACjB;AAAA,EACF,CAAC,oBAAoB,GACnB;AAAA,EACF,CAAC,yBAAyB,GACxB;AAAA,EACF,CAAC,mBAAmB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AA,MACtG;AAKA,YAAM,QAAQ,EAAE,YAAY;AAC5B,YAAM,KAAK,KAAK,KAAK,IAAI,OAAO,KAAK,GAAG,CAAC,KAAK,GAAG,EAAE;AAAA,IACrD;AAAA,EACF;AACA,SAAO,MAAM,KAAK,IAAI;AACxB;AAEO,SAAS,OACd,QACA,SACA,SACA,OAAsB,CAAC,GACf;AACR,UAAQ,QAAQ;AAAA,IACd,KAAK;AACH,aAAO,WAAW,SAAS,OAAO;AAAA,IACpC,KAAK;AACH,aAAO,aAAa,OAAO;AAAA,IAC7B,KAAK;AACH,aAAO,YAAY,SAAS,IAAI;AAAA,IAClC,KAAK;AACH,aAAO,YAAY,SAAS,IAAI;AAAA,IAClC,KAAK;AACH,aAAO,aAAa,SAAS,SAAS,IAAI;AAAA,IAC5C,SAAS;AAKP,YAAM,cAAqB;AAC3B,YAAM,IAAI;AAAA,QACR,yBAAyB,KAAK,UAAU,WAAW,CAAC,SAAS,kBAAkB;AAAA,MACjF;AAAA,IACF;AAAA,EACF;AACF;","names":["open"]}
@@ -11,10 +11,11 @@ import {
11
11
  parserForExtension,
12
12
  supportedExtensions,
13
13
  unsupportedFormatMessage
14
- } from "./chunk-PNUM6RHR.js";
14
+ } from "./chunk-3MTZZJKH.js";
15
15
  import {
16
16
  BLOCK_KINDS,
17
17
  BLOCK_KIND_NODE,
18
+ aboutRule,
18
19
  checkContains,
19
20
  checkContainsIn,
20
21
  checkHeading,
@@ -23,29 +24,29 @@ import {
23
24
  isWildcard,
24
25
  matchSections,
25
26
  occurrenceRange
26
- } from "./chunk-TBAMBLF3.js";
27
+ } from "./chunk-JNMY7KZG.js";
27
28
  import {
28
29
  LintError
29
- } from "./chunk-YGFIQ6Y5.js";
30
+ } from "./chunk-TKINOTVS.js";
30
31
  import {
31
32
  STDIN_TOKEN,
32
33
  assertNonEmpty,
33
34
  gitignoreOptions,
34
35
  isErrorSeverity,
35
36
  resolveTargetSet
36
- } from "./chunk-Y4TDIUG6.js";
37
+ } from "./chunk-BIRGZEWO.js";
37
38
  import {
38
39
  ditaOtHome,
39
40
  findConfigFile,
40
41
  readConfigFile,
41
42
  selectCollections
42
- } from "./chunk-OTJOBZJ5.js";
43
+ } from "./chunk-B2242FYO.js";
43
44
  import {
44
45
  warn
45
46
  } from "./chunk-HX44GB4Z.js";
46
47
  import {
47
48
  package_default
48
- } from "./chunk-GNUZ37L2.js";
49
+ } from "./chunk-T3BBNLAT.js";
49
50
  import {
50
51
  ToolError,
51
52
  errorMessage
@@ -110,7 +111,7 @@ var template_default = {
110
111
  pattern: "^[A-Za-z][A-Za-z0-9-_]*$"
111
112
  },
112
113
  description: {
113
- description: "Prose description of what the rule is for. Never checked.",
114
+ description: "What the rule's section is for, written for the page's author. Shown with every finding about the rule, and by `manni lint templates show`. Never checked.",
114
115
  type: "string"
115
116
  },
116
117
  heading: {
@@ -174,6 +175,11 @@ var template_default = {
174
175
  type: "array",
175
176
  items: { type: "string", minLength: 1 }
176
177
  },
178
+ guide: {
179
+ description: "Link to the author's guide for this doctype. Shown with every finding from the template and by `manni lint templates show`. A template that `extends` another inherits its `guide` unless it sets its own.",
180
+ type: "string",
181
+ pattern: "^https?://"
182
+ },
177
183
  extends: {
178
184
  description: "Template reference (built-in id, path, or URL, optionally with a `#name` fragment) whose rules this template inherits.",
179
185
  type: "string",
@@ -789,7 +795,9 @@ async function readText(ref) {
789
795
  } catch (err) {
790
796
  const code = err?.code;
791
797
  if (code === "ENOENT") {
792
- throw new LintError(`Template file not found: "${ref}".`);
798
+ throw new LintError(
799
+ `Template file not found: "${ref}". Fix the path, or run manni lint templates to list the templates you can name.`
800
+ );
793
801
  }
794
802
  throw new LintError(
795
803
  `Template file "${ref}" could not be read: ${errorMessage(err)}`
@@ -1150,6 +1158,8 @@ var Pruner = class {
1150
1158
  emitted;
1151
1159
  /** Keyed by message, so one rule asked twice is reported once. */
1152
1160
  missing = /* @__PURE__ */ new Map();
1161
+ /** The rule being pruned, which a dropped key belongs to. */
1162
+ owner = {};
1153
1163
  constructor(kinds) {
1154
1164
  this.emitted = new Set(kinds);
1155
1165
  }
@@ -1160,7 +1170,8 @@ var Pruner = class {
1160
1170
  return this.emitted.has(kind);
1161
1171
  }
1162
1172
  drop(rule, noun) {
1163
- this.missing.set(`${rule}: ${noun}`, { rule, noun });
1173
+ const key = `${rule}: ${noun}`;
1174
+ if (!this.missing.has(key)) this.missing.set(key, { rule, noun, owner: this.owner });
1164
1175
  }
1165
1176
  /** A table rule without its `columns`, when the parser reports no cells. */
1166
1177
  tables(rule) {
@@ -1293,6 +1304,7 @@ var Pruner = class {
1293
1304
  return changed ? kept : rules;
1294
1305
  }
1295
1306
  rule(rule) {
1307
+ this.owner = rule;
1296
1308
  const kept = this.holder(rule);
1297
1309
  let changed = kept !== rule;
1298
1310
  const out = changed ? kept : { ...rule };
@@ -1328,7 +1340,7 @@ function prune(template, kinds) {
1328
1340
  byKinds.set(key, pruned);
1329
1341
  return pruned;
1330
1342
  }
1331
- function uncheckedFinding(format, name, gap) {
1343
+ function uncheckedFinding(format, name, gap, options) {
1332
1344
  return {
1333
1345
  type: "unsupported_content_kind",
1334
1346
  heading: null,
@@ -1339,21 +1351,23 @@ function uncheckedFinding(format, name, gap) {
1339
1351
  // code - `runLint` counts a file as failed only on an error-severity
1340
1352
  // finding - so a docset of mixed formats stays green while still saying
1341
1353
  // which rules went unchecked, and where.
1342
- severity: "warning"
1354
+ severity: "warning",
1355
+ ...aboutRule(gap.owner, options)
1343
1356
  };
1344
1357
  }
1345
- function checkSection(section, rule) {
1358
+ function checkSection(section, rule, options) {
1359
+ const about = aboutRule(rule, options);
1346
1360
  return [
1347
1361
  ...checkHeading(section, rule.heading),
1348
1362
  ...checkSequence(section, rule.sequence),
1349
1363
  ...checkContains(section, rule.contains)
1350
- ];
1364
+ ].map((finding) => ({ ...finding, ...about }));
1351
1365
  }
1352
1366
  function validateSections(sections, rules, options = {}) {
1353
1367
  const { matches, findings } = matchSections(sections, rules, options);
1354
1368
  const all = [...findings];
1355
1369
  for (const match of matches) {
1356
- all.push(...checkSection(match.section, match.rule));
1370
+ all.push(...checkSection(match.section, match.rule, options));
1357
1371
  all.push(
1358
1372
  ...validateSections(match.section.sections, match.rule.sections, {
1359
1373
  ...options,
@@ -1368,24 +1382,30 @@ function validateDocument(tree, template, options = {}) {
1368
1382
  const pruned = prune(template, kinds);
1369
1383
  const rules = pruned.template;
1370
1384
  const name = options.template ?? template.title ?? "unnamed";
1385
+ const page = pageSection(tree);
1386
+ const matching = {
1387
+ parent: page,
1388
+ source: options.source,
1389
+ template: options.template,
1390
+ ref: options.ref ?? name,
1391
+ guide: template.guide
1392
+ };
1371
1393
  const findings = pruned.gaps.map(
1372
- (gap) => uncheckedFinding(tree.format, name, gap)
1394
+ (gap) => uncheckedFinding(tree.format, name, gap, matching)
1373
1395
  );
1374
- const page = pageSection(tree);
1375
1396
  const ctx = {
1376
1397
  heading: page.title || null,
1377
1398
  position: page.position
1378
1399
  };
1379
- findings.push(...checkHeading(page, rules.heading));
1380
- findings.push(...checkSequenceIn(page.children, rules.sequence, ctx));
1381
- findings.push(...checkContainsIn(page.children, rules.contains, ctx));
1400
+ const about = aboutRule(rules, matching);
1382
1401
  findings.push(
1383
- ...validateSections(page.sections, rules.sections, {
1384
- parent: page,
1385
- source: options.source,
1386
- template: options.template
1387
- })
1402
+ ...[
1403
+ ...checkHeading(page, rules.heading),
1404
+ ...checkSequenceIn(page.children, rules.sequence, ctx),
1405
+ ...checkContainsIn(page.children, rules.contains, ctx)
1406
+ ].map((finding) => ({ ...finding, ...about }))
1388
1407
  );
1408
+ findings.push(...validateSections(page.sections, rules.sections, matching));
1389
1409
  return findings.sort(
1390
1410
  (a, b) => a.position.start.offset - b.position.start.offset
1391
1411
  );
@@ -2019,7 +2039,8 @@ function parseFinding(message) {
2019
2039
  heading: null,
2020
2040
  message,
2021
2041
  position: origin2(),
2022
- severity: "error"
2042
+ severity: "error",
2043
+ template: null
2023
2044
  };
2024
2045
  }
2025
2046
  function templateLoader() {
@@ -2059,7 +2080,8 @@ function unknownTypeFinding(resolution, typeIndex, position) {
2059
2080
  heading: null,
2060
2081
  message: `No template serves type "${declared}".${hint} Declare it on a template with "types:", then pass that file with --templates.`,
2061
2082
  position,
2062
- severity: "error"
2083
+ severity: "error",
2084
+ template: null
2063
2085
  };
2064
2086
  }
2065
2087
  async function lintOne(label, content, parser, ctx) {
@@ -2111,7 +2133,8 @@ async function lintOne(label, content, parser, ctx) {
2111
2133
  heading: null,
2112
2134
  message: errorMessage(err),
2113
2135
  position: metaPosition,
2114
- severity: "error"
2136
+ severity: "error",
2137
+ template: null
2115
2138
  }
2116
2139
  ],
2117
2140
  template: resolution.ref
@@ -2145,6 +2168,8 @@ async function lintOne(label, content, parser, ctx) {
2145
2168
  try {
2146
2169
  findings = validateDocument(tree, template, {
2147
2170
  ...templateIdentity(ref),
2171
+ // The ref the page routed to, as the result's own `template` names it.
2172
+ ref: resolution.ref,
2148
2173
  kinds: parser.kinds
2149
2174
  });
2150
2175
  } catch (err) {
@@ -2233,7 +2258,8 @@ function ditaOtFinding(message) {
2233
2258
  heading: null,
2234
2259
  message: message.message,
2235
2260
  position: point === null ? origin2() : { start: point, end: point },
2236
- severity: message.severity
2261
+ severity: message.severity,
2262
+ template: null
2237
2263
  };
2238
2264
  }
2239
2265
  async function lintWithDitaOt(run) {
@@ -2435,6 +2461,7 @@ export {
2435
2461
  loadTemplateFile,
2436
2462
  loadTemplate,
2437
2463
  resolveExtends,
2464
+ loadResolvedTemplate,
2438
2465
  clearMatcherCache,
2439
2466
  validateSections,
2440
2467
  validateDocument,
@@ -2450,4 +2477,4 @@ export {
2450
2477
  STDIN_LABEL,
2451
2478
  runLint
2452
2479
  };
2453
- //# sourceMappingURL=chunk-7QH2ZI4F.js.map
2480
+ //# sourceMappingURL=chunk-3CCY7M3R.js.map