@hawkeyexl/manni 4.20.0 → 4.21.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 (259) hide show
  1. package/README.md +1 -1
  2. package/dist/{batch-TBQBH6XQ.js → batch-C534YIAU.js} +14 -14
  3. package/dist/{build-S3JQMDFX.js → build-SVKT7QFU.js} +16 -15
  4. package/dist/{calibrate-KLN22IGS.js → calibrate-AL3MH7TY.js} +15 -15
  5. package/dist/{capture-JS3ICXE7.js → capture-2F7B4DAD.js} +14 -14
  6. package/dist/check-BI7OGIVE.js +48 -0
  7. package/dist/{check-WS2USSUD.js → check-JZINDP3F.js} +13 -13
  8. package/dist/{check-2EAR4ZW3.js → check-LKPQPQWJ.js} +15 -15
  9. package/dist/check-OPUMZEVK.js +35 -0
  10. package/dist/{check-PDXYA6XH.js → check-OW7UD73D.js} +12 -12
  11. package/dist/{chunk-JKH2LV5D.js → chunk-22WGKOQ7.js} +5 -5
  12. package/dist/{chunk-IGAZWY2W.js → chunk-2HOWRAWK.js} +2 -2
  13. package/dist/{chunk-KZ7534CD.js → chunk-2NGFDLIM.js} +3 -3
  14. package/dist/{chunk-SOW6SVAM.js → chunk-2YKUSTHS.js} +4 -4
  15. package/dist/{chunk-DQO44Y5G.js → chunk-3SFAB75L.js} +5 -5
  16. package/dist/{chunk-BEQZI3V5.js → chunk-5LE4NH3Z.js} +24 -7
  17. package/dist/chunk-5LE4NH3Z.js.map +1 -0
  18. package/dist/{chunk-U2CE55YV.js → chunk-5UJKXOAD.js} +5 -5
  19. package/dist/chunk-6XK3NTL5.js +706 -0
  20. package/dist/chunk-6XK3NTL5.js.map +1 -0
  21. package/dist/{chunk-6D7FCU4E.js → chunk-762MM6NA.js} +3 -3
  22. package/dist/{chunk-ZEKQRBXO.js → chunk-A4QNKEX4.js} +2 -2
  23. package/dist/{chunk-2G4XYGTN.js → chunk-AE6KBAAU.js} +7 -7
  24. package/dist/chunk-AE6KBAAU.js.map +1 -0
  25. package/dist/{chunk-SX626JUF.js → chunk-APAF4VWW.js} +3 -3
  26. package/dist/{chunk-BV7FJ4V2.js → chunk-ARNI3SJT.js} +8 -8
  27. package/dist/chunk-ARNI3SJT.js.map +1 -0
  28. package/dist/{chunk-DTSWP5FC.js → chunk-BHGFLRXM.js} +5 -5
  29. package/dist/{chunk-PGDUVYTF.js → chunk-BJUEOC4G.js} +2 -2
  30. package/dist/{chunk-5MJE5KMY.js → chunk-BKY6GAFA.js} +8 -8
  31. package/dist/{chunk-ITA7V5Y2.js → chunk-BLXRIAV2.js} +4 -4
  32. package/dist/{chunk-SFSALDIR.js → chunk-BXCVOHEX.js} +7 -7
  33. package/dist/{chunk-PHOWMWFJ.js → chunk-BXE4L52Q.js} +2 -11
  34. package/dist/chunk-BXE4L52Q.js.map +1 -0
  35. package/dist/{chunk-VCU7OMXV.js → chunk-CLPC3LKX.js} +13 -9
  36. package/dist/chunk-CLPC3LKX.js.map +1 -0
  37. package/dist/{chunk-PTXHJLAS.js → chunk-CREFJCWZ.js} +7 -7
  38. package/dist/chunk-CREFJCWZ.js.map +1 -0
  39. package/dist/{chunk-FRM62BEN.js → chunk-CZIO37J5.js} +3 -3
  40. package/dist/{chunk-SFTWEGUD.js → chunk-D4QHRVDJ.js} +2 -2
  41. package/dist/{chunk-6VGWLCYT.js → chunk-D5GBYKDU.js} +2 -2
  42. package/dist/{chunk-RXCDT55X.js → chunk-DENZLZ3Z.js} +34 -32
  43. package/dist/chunk-DENZLZ3Z.js.map +1 -0
  44. package/dist/{chunk-GVOI7SCF.js → chunk-DMVBIIP3.js} +3 -3
  45. package/dist/{chunk-5HB4YKZW.js → chunk-DPDG3FHL.js} +17 -3
  46. package/dist/chunk-DPDG3FHL.js.map +1 -0
  47. package/dist/{chunk-O26NQ7KT.js → chunk-E23KWEPL.js} +2 -2
  48. package/dist/{chunk-NDQA4VYK.js → chunk-E7OG5F6S.js} +3 -3
  49. package/dist/{chunk-HIZNNOVW.js → chunk-FHJIH6XP.js} +16 -106
  50. package/dist/chunk-FHJIH6XP.js.map +1 -0
  51. package/dist/{chunk-JNMY7KZG.js → chunk-G5I2JTDK.js} +2 -2
  52. package/dist/{chunk-O4O6JOGD.js → chunk-GMLOAKOA.js} +16 -4
  53. package/dist/chunk-GMLOAKOA.js.map +1 -0
  54. package/dist/{chunk-4KM23E53.js → chunk-H5YWCCBO.js} +16 -11
  55. package/dist/chunk-H5YWCCBO.js.map +1 -0
  56. package/dist/{chunk-HSC5G3FW.js → chunk-HHJ2HFPP.js} +8 -8
  57. package/dist/{chunk-HZWLHSZG.js → chunk-IN5T22FP.js} +2 -2
  58. package/dist/{chunk-FERFWKZM.js → chunk-IOJD2RFG.js} +2 -2
  59. package/dist/{chunk-ZODSGFAP.js → chunk-JQA6RF4R.js} +22 -22
  60. package/dist/{chunk-ZODSGFAP.js.map → chunk-JQA6RF4R.js.map} +1 -1
  61. package/dist/{chunk-GCF7STEA.js → chunk-JUUCCML3.js} +4 -4
  62. package/dist/{chunk-3OXBZSDN.js → chunk-KBSTXL6L.js} +3 -3
  63. package/dist/{chunk-SRTBHEUM.js → chunk-KCWNJMSS.js} +3 -3
  64. package/dist/{chunk-2XRSQXGZ.js → chunk-KQDRO6N6.js} +2 -2
  65. package/dist/{chunk-ZVEDBFTM.js → chunk-LWBNHK72.js} +45 -41
  66. package/dist/chunk-LWBNHK72.js.map +1 -0
  67. package/dist/{chunk-QSY5YPM4.js → chunk-MTCOBRCX.js} +4 -4
  68. package/dist/{chunk-Q5EKERQS.js → chunk-NLJ3XIKT.js} +7 -5
  69. package/dist/{chunk-Q5EKERQS.js.map → chunk-NLJ3XIKT.js.map} +1 -1
  70. package/dist/{chunk-RGZBROMW.js → chunk-OWJLB2AF.js} +2 -2
  71. package/dist/{chunk-QA7AXRGH.js → chunk-P7HAXMFN.js} +2 -2
  72. package/dist/{chunk-GXDVERLV.js → chunk-PACZEDOH.js} +5 -5
  73. package/dist/{chunk-QSPH4F56.js → chunk-PTGXEZQD.js} +2 -2
  74. package/dist/chunk-PTGXEZQD.js.map +1 -0
  75. package/dist/{chunk-UKSXQHSE.js → chunk-Q76T6Y6X.js} +6 -6
  76. package/dist/{chunk-SGI3WPYK.js → chunk-R2CR62JV.js} +4 -4
  77. package/dist/{chunk-MLY65CQE.js → chunk-RKACUTY5.js} +7 -7
  78. package/dist/{chunk-MNK732BZ.js → chunk-RQPEKHZH.js} +14 -11
  79. package/dist/chunk-RQPEKHZH.js.map +1 -0
  80. package/dist/{chunk-EBYLQE7P.js → chunk-RWXR3GJI.js} +2 -2
  81. package/dist/{chunk-JOZVVIVD.js → chunk-S5G6T4VC.js} +3 -3
  82. package/dist/chunk-SHXPE4D4.js +100 -0
  83. package/dist/chunk-SHXPE4D4.js.map +1 -0
  84. package/dist/{chunk-GL2HXZVX.js → chunk-TFVNEPMF.js} +3 -3
  85. package/dist/{chunk-TKINOTVS.js → chunk-TI4DA6DF.js} +1 -1
  86. package/dist/{chunk-TKINOTVS.js.map → chunk-TI4DA6DF.js.map} +1 -1
  87. package/dist/{chunk-I62V2ZAJ.js → chunk-U4OJ7U45.js} +8 -8
  88. package/dist/{chunk-QWCP7UMG.js → chunk-V2XJJEEF.js} +6 -6
  89. package/dist/{chunk-5UJQLZXY.js → chunk-VLRIP4BQ.js} +60 -63
  90. package/dist/chunk-VLRIP4BQ.js.map +1 -0
  91. package/dist/{chunk-ZRMA5U53.js → chunk-WHVFHBL3.js} +3 -3
  92. package/dist/{chunk-IYRGV2BC.js → chunk-XBJKYXOR.js} +6 -6
  93. package/dist/{chunk-ZBE735BH.js → chunk-XI3BNZG4.js} +5 -5
  94. package/dist/{chunk-Z6FATXBE.js → chunk-YSZNJ2ID.js} +2 -2
  95. package/dist/{cli-4HH6IY2L.js → cli-3PBRPPMQ.js} +14 -14
  96. package/dist/{cli-GVHXRQAD.js → cli-6NKE6RMT.js} +18 -18
  97. package/dist/{cli-T4NY2EGM.js → cli-77A46SB2.js} +17 -17
  98. package/dist/{cli-EQG4KETY.js → cli-AVHLY2AI.js} +61 -45
  99. package/dist/cli-AVHLY2AI.js.map +1 -0
  100. package/dist/{cli-UIY57JPM.js → cli-FDXU7CGZ.js} +16 -15
  101. package/dist/{cli-UIY57JPM.js.map → cli-FDXU7CGZ.js.map} +1 -1
  102. package/dist/{cli-5BFVL3DH.js → cli-FSDJY5OC.js} +2 -2
  103. package/dist/{cli-L7H4C442.js → cli-JNYL6LB7.js} +16 -16
  104. package/dist/{cli-HTAR3PWY.js → cli-K47XWDLJ.js} +21 -21
  105. package/dist/{cli-ZPW5VIRA.js → cli-LP5OE3BL.js} +9 -9
  106. package/dist/{cli-AR43H5BW.js → cli-MOKRUHZT.js} +9 -9
  107. package/dist/{cli-4IE6CRAT.js → cli-MQXOK64K.js} +27 -26
  108. package/dist/{cli-4IE6CRAT.js.map → cli-MQXOK64K.js.map} +1 -1
  109. package/dist/cli.js +15 -15
  110. package/dist/{config-7I5CHHRZ.js → config-BMWDC66C.js} +2 -2
  111. package/dist/docmeta.d.ts +1 -1
  112. package/dist/docmeta.js +8 -8
  113. package/dist/github-6GYTPSGV.js +35 -0
  114. package/dist/{github-RIU47U73.js → github-DJOLVNDD.js} +12 -12
  115. package/dist/{github-CMWG4QMI.js → github-ZF2TQ3RP.js} +14 -14
  116. package/dist/graph/embed.d.ts +2 -1
  117. package/dist/graph/runtime.d.ts +2 -1
  118. package/dist/index.d.ts +29 -15
  119. package/dist/index.js +51 -49
  120. package/dist/index.js.map +1 -1
  121. package/dist/json-Y7625EFE.js +42 -0
  122. package/dist/{json-KSBVGZUX.js → json-YIK72XAL.js} +12 -12
  123. package/dist/{labels-VNKACCAG.js → labels-X633ZPK7.js} +11 -11
  124. package/dist/{lint-75BD6L5T.js → lint-RF3B55W7.js} +14 -14
  125. package/dist/{list-MH54XU7E.js → list-5DW4QZ7P.js} +12 -12
  126. package/dist/list-7CHWJ633.js +39 -0
  127. package/dist/{list-PHNZAYIM.js → list-UNWG6NPD.js} +12 -12
  128. package/dist/{page-5AJS7AEM.js → page-OMPEACUN.js} +11 -11
  129. package/dist/{prepare-R63RJI6O.js → prepare-B4JVDVOV.js} +13 -13
  130. package/dist/{pretty-DE4WXJFA.js → pretty-PPNHHOEN.js} +13 -13
  131. package/dist/{pretty-E3DS32NZ.js → pretty-U7ATCFBN.js} +12 -12
  132. package/dist/pretty-XGYQ25PH.js +43 -0
  133. package/dist/{reporters-V2PSDBVW.js → reporters-FAIEOTC4.js} +13 -13
  134. package/dist/{reporters-DLMLFLKS.js → reporters-KE7AZR6C.js} +4 -4
  135. package/dist/{run-QT2LVHRU.js → run-MHJ3AYKG.js} +12 -12
  136. package/dist/{sarif-GKMUHCZB.js → sarif-DOGRSGTB.js} +10 -10
  137. package/dist/{sarif-HUIRTPSL.js → sarif-MIEMQOIK.js} +11 -11
  138. package/dist/{sarif-2ZKPRT42.js → sarif-RGRG7VFX.js} +15 -15
  139. package/dist/{strategy-TBFM7NZU.js → strategy-EK5VY5DG.js} +24 -23
  140. package/dist/{strategy-TBFM7NZU.js.map → strategy-EK5VY5DG.js.map} +1 -1
  141. package/dist/{term-ZZWAVUW5.js → term-MDN3NJDW.js} +17 -17
  142. package/dist/{validate-ZEUFF3BG.js → validate-QDYQ642J.js} +5 -5
  143. package/package.json +21 -21
  144. package/plugin/manni/.claude-plugin/plugin.json +11 -3
  145. package/plugin/manni/hooks/hooks.json +4 -4
  146. package/plugin/manni/hooks/manni.mjs +47 -7
  147. package/plugin/manni/hooks/tracevals.mjs +7 -0
  148. package/plugin/manni/skills/fix/SKILL.md +5 -1
  149. package/dist/check-6D2JCIMD.js +0 -47
  150. package/dist/check-RNAB7X74.js +0 -33
  151. package/dist/chunk-2G4XYGTN.js.map +0 -1
  152. package/dist/chunk-4KM23E53.js.map +0 -1
  153. package/dist/chunk-5HB4YKZW.js.map +0 -1
  154. package/dist/chunk-5UJQLZXY.js.map +0 -1
  155. package/dist/chunk-BEQZI3V5.js.map +0 -1
  156. package/dist/chunk-BV7FJ4V2.js.map +0 -1
  157. package/dist/chunk-HIZNNOVW.js.map +0 -1
  158. package/dist/chunk-MNK732BZ.js.map +0 -1
  159. package/dist/chunk-NEO2HN2N.js +0 -326
  160. package/dist/chunk-NEO2HN2N.js.map +0 -1
  161. package/dist/chunk-O4O6JOGD.js.map +0 -1
  162. package/dist/chunk-PHOWMWFJ.js.map +0 -1
  163. package/dist/chunk-PTXHJLAS.js.map +0 -1
  164. package/dist/chunk-QSPH4F56.js.map +0 -1
  165. package/dist/chunk-RXCDT55X.js.map +0 -1
  166. package/dist/chunk-SIREOHLW.js +0 -233
  167. package/dist/chunk-SIREOHLW.js.map +0 -1
  168. package/dist/chunk-VCU7OMXV.js.map +0 -1
  169. package/dist/chunk-ZVEDBFTM.js.map +0 -1
  170. package/dist/cli-EQG4KETY.js.map +0 -1
  171. package/dist/github-NIRLMJ65.js +0 -27
  172. package/dist/json-EJTB7XYG.js +0 -34
  173. package/dist/list-6XVIW3RW.js +0 -33
  174. package/dist/pretty-SUKMF6AB.js +0 -35
  175. /package/dist/{batch-TBQBH6XQ.js.map → batch-C534YIAU.js.map} +0 -0
  176. /package/dist/{build-S3JQMDFX.js.map → build-SVKT7QFU.js.map} +0 -0
  177. /package/dist/{calibrate-KLN22IGS.js.map → calibrate-AL3MH7TY.js.map} +0 -0
  178. /package/dist/{capture-JS3ICXE7.js.map → capture-2F7B4DAD.js.map} +0 -0
  179. /package/dist/{check-6D2JCIMD.js.map → check-BI7OGIVE.js.map} +0 -0
  180. /package/dist/{check-PDXYA6XH.js.map → check-JZINDP3F.js.map} +0 -0
  181. /package/dist/{check-2EAR4ZW3.js.map → check-LKPQPQWJ.js.map} +0 -0
  182. /package/dist/{check-RNAB7X74.js.map → check-OPUMZEVK.js.map} +0 -0
  183. /package/dist/{check-WS2USSUD.js.map → check-OW7UD73D.js.map} +0 -0
  184. /package/dist/{chunk-JKH2LV5D.js.map → chunk-22WGKOQ7.js.map} +0 -0
  185. /package/dist/{chunk-IGAZWY2W.js.map → chunk-2HOWRAWK.js.map} +0 -0
  186. /package/dist/{chunk-KZ7534CD.js.map → chunk-2NGFDLIM.js.map} +0 -0
  187. /package/dist/{chunk-SOW6SVAM.js.map → chunk-2YKUSTHS.js.map} +0 -0
  188. /package/dist/{chunk-DQO44Y5G.js.map → chunk-3SFAB75L.js.map} +0 -0
  189. /package/dist/{chunk-U2CE55YV.js.map → chunk-5UJKXOAD.js.map} +0 -0
  190. /package/dist/{chunk-6D7FCU4E.js.map → chunk-762MM6NA.js.map} +0 -0
  191. /package/dist/{chunk-ZEKQRBXO.js.map → chunk-A4QNKEX4.js.map} +0 -0
  192. /package/dist/{chunk-SX626JUF.js.map → chunk-APAF4VWW.js.map} +0 -0
  193. /package/dist/{chunk-DTSWP5FC.js.map → chunk-BHGFLRXM.js.map} +0 -0
  194. /package/dist/{chunk-PGDUVYTF.js.map → chunk-BJUEOC4G.js.map} +0 -0
  195. /package/dist/{chunk-5MJE5KMY.js.map → chunk-BKY6GAFA.js.map} +0 -0
  196. /package/dist/{chunk-ITA7V5Y2.js.map → chunk-BLXRIAV2.js.map} +0 -0
  197. /package/dist/{chunk-SFSALDIR.js.map → chunk-BXCVOHEX.js.map} +0 -0
  198. /package/dist/{chunk-FRM62BEN.js.map → chunk-CZIO37J5.js.map} +0 -0
  199. /package/dist/{chunk-SFTWEGUD.js.map → chunk-D4QHRVDJ.js.map} +0 -0
  200. /package/dist/{chunk-6VGWLCYT.js.map → chunk-D5GBYKDU.js.map} +0 -0
  201. /package/dist/{chunk-GVOI7SCF.js.map → chunk-DMVBIIP3.js.map} +0 -0
  202. /package/dist/{chunk-O26NQ7KT.js.map → chunk-E23KWEPL.js.map} +0 -0
  203. /package/dist/{chunk-NDQA4VYK.js.map → chunk-E7OG5F6S.js.map} +0 -0
  204. /package/dist/{chunk-JNMY7KZG.js.map → chunk-G5I2JTDK.js.map} +0 -0
  205. /package/dist/{chunk-HSC5G3FW.js.map → chunk-HHJ2HFPP.js.map} +0 -0
  206. /package/dist/{chunk-HZWLHSZG.js.map → chunk-IN5T22FP.js.map} +0 -0
  207. /package/dist/{chunk-FERFWKZM.js.map → chunk-IOJD2RFG.js.map} +0 -0
  208. /package/dist/{chunk-GCF7STEA.js.map → chunk-JUUCCML3.js.map} +0 -0
  209. /package/dist/{chunk-3OXBZSDN.js.map → chunk-KBSTXL6L.js.map} +0 -0
  210. /package/dist/{chunk-SRTBHEUM.js.map → chunk-KCWNJMSS.js.map} +0 -0
  211. /package/dist/{chunk-2XRSQXGZ.js.map → chunk-KQDRO6N6.js.map} +0 -0
  212. /package/dist/{chunk-QSY5YPM4.js.map → chunk-MTCOBRCX.js.map} +0 -0
  213. /package/dist/{chunk-RGZBROMW.js.map → chunk-OWJLB2AF.js.map} +0 -0
  214. /package/dist/{chunk-QA7AXRGH.js.map → chunk-P7HAXMFN.js.map} +0 -0
  215. /package/dist/{chunk-GXDVERLV.js.map → chunk-PACZEDOH.js.map} +0 -0
  216. /package/dist/{chunk-UKSXQHSE.js.map → chunk-Q76T6Y6X.js.map} +0 -0
  217. /package/dist/{chunk-SGI3WPYK.js.map → chunk-R2CR62JV.js.map} +0 -0
  218. /package/dist/{chunk-MLY65CQE.js.map → chunk-RKACUTY5.js.map} +0 -0
  219. /package/dist/{chunk-EBYLQE7P.js.map → chunk-RWXR3GJI.js.map} +0 -0
  220. /package/dist/{chunk-JOZVVIVD.js.map → chunk-S5G6T4VC.js.map} +0 -0
  221. /package/dist/{chunk-GL2HXZVX.js.map → chunk-TFVNEPMF.js.map} +0 -0
  222. /package/dist/{chunk-I62V2ZAJ.js.map → chunk-U4OJ7U45.js.map} +0 -0
  223. /package/dist/{chunk-QWCP7UMG.js.map → chunk-V2XJJEEF.js.map} +0 -0
  224. /package/dist/{chunk-ZRMA5U53.js.map → chunk-WHVFHBL3.js.map} +0 -0
  225. /package/dist/{chunk-IYRGV2BC.js.map → chunk-XBJKYXOR.js.map} +0 -0
  226. /package/dist/{chunk-ZBE735BH.js.map → chunk-XI3BNZG4.js.map} +0 -0
  227. /package/dist/{chunk-Z6FATXBE.js.map → chunk-YSZNJ2ID.js.map} +0 -0
  228. /package/dist/{cli-4HH6IY2L.js.map → cli-3PBRPPMQ.js.map} +0 -0
  229. /package/dist/{cli-GVHXRQAD.js.map → cli-6NKE6RMT.js.map} +0 -0
  230. /package/dist/{cli-T4NY2EGM.js.map → cli-77A46SB2.js.map} +0 -0
  231. /package/dist/{cli-5BFVL3DH.js.map → cli-FSDJY5OC.js.map} +0 -0
  232. /package/dist/{cli-L7H4C442.js.map → cli-JNYL6LB7.js.map} +0 -0
  233. /package/dist/{cli-HTAR3PWY.js.map → cli-K47XWDLJ.js.map} +0 -0
  234. /package/dist/{cli-ZPW5VIRA.js.map → cli-LP5OE3BL.js.map} +0 -0
  235. /package/dist/{cli-AR43H5BW.js.map → cli-MOKRUHZT.js.map} +0 -0
  236. /package/dist/{config-7I5CHHRZ.js.map → config-BMWDC66C.js.map} +0 -0
  237. /package/dist/{github-CMWG4QMI.js.map → github-6GYTPSGV.js.map} +0 -0
  238. /package/dist/{github-NIRLMJ65.js.map → github-DJOLVNDD.js.map} +0 -0
  239. /package/dist/{github-RIU47U73.js.map → github-ZF2TQ3RP.js.map} +0 -0
  240. /package/dist/{json-EJTB7XYG.js.map → json-Y7625EFE.js.map} +0 -0
  241. /package/dist/{json-KSBVGZUX.js.map → json-YIK72XAL.js.map} +0 -0
  242. /package/dist/{labels-VNKACCAG.js.map → labels-X633ZPK7.js.map} +0 -0
  243. /package/dist/{lint-75BD6L5T.js.map → lint-RF3B55W7.js.map} +0 -0
  244. /package/dist/{list-6XVIW3RW.js.map → list-5DW4QZ7P.js.map} +0 -0
  245. /package/dist/{list-MH54XU7E.js.map → list-7CHWJ633.js.map} +0 -0
  246. /package/dist/{list-PHNZAYIM.js.map → list-UNWG6NPD.js.map} +0 -0
  247. /package/dist/{page-5AJS7AEM.js.map → page-OMPEACUN.js.map} +0 -0
  248. /package/dist/{prepare-R63RJI6O.js.map → prepare-B4JVDVOV.js.map} +0 -0
  249. /package/dist/{pretty-DE4WXJFA.js.map → pretty-PPNHHOEN.js.map} +0 -0
  250. /package/dist/{pretty-E3DS32NZ.js.map → pretty-U7ATCFBN.js.map} +0 -0
  251. /package/dist/{pretty-SUKMF6AB.js.map → pretty-XGYQ25PH.js.map} +0 -0
  252. /package/dist/{reporters-DLMLFLKS.js.map → reporters-FAIEOTC4.js.map} +0 -0
  253. /package/dist/{reporters-V2PSDBVW.js.map → reporters-KE7AZR6C.js.map} +0 -0
  254. /package/dist/{run-QT2LVHRU.js.map → run-MHJ3AYKG.js.map} +0 -0
  255. /package/dist/{sarif-2ZKPRT42.js.map → sarif-DOGRSGTB.js.map} +0 -0
  256. /package/dist/{sarif-GKMUHCZB.js.map → sarif-MIEMQOIK.js.map} +0 -0
  257. /package/dist/{sarif-HUIRTPSL.js.map → sarif-RGRG7VFX.js.map} +0 -0
  258. /package/dist/{term-ZZWAVUW5.js.map → term-MDN3NJDW.js.map} +0 -0
  259. /package/dist/{validate-ZEUFF3BG.js.map → validate-QDYQ642J.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/lint/core/infer.ts","../src/lint/commands/templates.ts","../src/lint/commands/tools.ts","../src/lint/reporters/template-show.ts"],"sourcesContent":["/**\n * Write a first template from a page that already has the shape its author\n * wants.\n *\n * The format is strict by default: every rule is one occurrence, and a section\n * no rule describes is a finding. A new author's first run against a\n * hand-written template is therefore a screen of unexpected sections, and this\n * is the escape. Proposal 0061's stress test 5 records it, and says the two\n * ship together.\n *\n * Two rules govern everything here.\n *\n * **The output must lint its input clean.** That is the whole contract, and it\n * is why each inference below is the weakest claim that still describes the\n * page. `contains:` lists only the kinds that are there, at `min: 1`, so a\n * section holding more of something still passes. A table's `columns:` is\n * claimed only where every table in that section agrees about them, and a code\n * block's `language:` only where every block in that section declares one -\n * both rules report per offending node, so a claim drawn from one node would\n * fail on its neighbour. A template that fails the page it was inferred from is\n * worse than no template: it hands a new author findings about the very\n * document they pointed at.\n *\n * **Nothing is optional and nothing repeats.** One page cannot show what\n * varies, so no `min: 0`, no `max`, no `repeat` and no `pattern` is invented.\n * Two sections with one heading are two rules. Loosening a heading into a list\n * or a pattern, marking a rule optional, and adding a trailing wildcard are the\n * author's edits, and the reference page says so.\n */\nimport { stringify as stringifyYaml } from \"yaml\";\nimport { LintError } from \"../types.js\";\nimport type {\n CodeNode,\n ContentKind,\n ContentNode,\n DocumentTree,\n Position,\n SectionNode,\n TableNode,\n} from \"../types.js\";\nimport { BLOCK_KINDS, BLOCK_KIND_NODE } from \"./template.js\";\nimport type {\n BlockKind,\n BlockRule,\n HeadingRule,\n Rule,\n Template,\n TemplateFile,\n} from \"./template.js\";\n\n/** How an inferred template is written out. */\nexport const INFER_FORMATS = [\"yaml\", \"json\"] as const;\nexport type InferFormat = (typeof INFER_FORMATS)[number];\n\nexport function isInferFormat(value: string): value is InferFormat {\n return (INFER_FORMATS as readonly string[]).includes(value);\n}\n\n/**\n * Template names the schema's `templates` map accepts.\n *\n * Checked here rather than left to Ajv. `templates` is `additionalProperties:\n * false` beside a `patternProperties` key, so a name outside the pattern is\n * reported as an unexpected property - which names the offending key and says\n * nothing whatsoever about what is wrong with it.\n */\nconst TEMPLATE_NAME = /^[A-Za-z][A-Za-z0-9\\-_]*$/;\n\n/** The node each block-rule key counts, inverted: `codeBlock` -> `codeBlocks`. */\nconst KIND_KEY = new Map<ContentKind, BlockKind>(\n BLOCK_KINDS.map((key) => [BLOCK_KIND_NODE[key], key]),\n);\n\n/* -------------------------------------------------------------------------- *\n * The page as the template's subject\n * -------------------------------------------------------------------------- */\n\n/** A zero-width span at the top of a file, for a document with no sections. */\nfunction origin(): Position {\n return {\n start: { line: 1, column: 1, offset: 0 },\n end: { line: 1, column: 1, offset: 0 },\n };\n}\n\n/** First section's start through the last one's end. */\nfunction span(sections: SectionNode[]): Position {\n const first = sections[0];\n const last = sections[sections.length - 1];\n if (!first || !last) return origin();\n return { start: { ...first.position.start }, end: { ...last.position.end } };\n}\n\n/**\n * The section the template describes: the page itself.\n *\n * Deliberately the same reading `validator.ts` applies, because the template\n * this produces is checked by that one. A page whose body is a single `# Title`\n * *is* that section; anything else - several top-level headings, or a body that\n * starts at `##` with no lead content - has no section standing for the page,\n * so one is synthesised with no heading of its own. The duplication is small\n * and the alternative is worse: an inference that read the page differently\n * from the checker would produce templates that fail their own source.\n */\nfunction pageSection(tree: DocumentTree): SectionNode {\n const [only] = tree.sections;\n if (tree.sections.length === 1 && only && only.level <= 1) return only;\n return {\n slug: \"\",\n title: \"\",\n level: 0,\n order: 0,\n parentSlug: null,\n titlePosition: null,\n position: span(tree.sections),\n children: [],\n sections: tree.sections,\n };\n}\n\n/* -------------------------------------------------------------------------- *\n * Content\n * -------------------------------------------------------------------------- */\n\n/** The header row's cells, in order, or none where the table has no header. */\nfunction headerCells(table: TableNode): string[] {\n const header = table.children.find((row) => row.header);\n return header ? header.children.map((cell) => cell.text) : [];\n}\n\n/**\n * `columns:` for a run of tables, where they all agree about it.\n *\n * `tables.columns` reports once per table whose header differs, so a claim\n * taken from the first of two unlike tables fails on the second - in the very\n * page it was drawn from. Where the tables disagree, or any of them has no\n * header row, the count alone is what the page can honestly be said to show.\n */\nfunction columnsOf(tables: TableNode[]): { columns?: string[] } {\n const headers = tables.map(headerCells);\n const [first] = headers;\n if (first === undefined || first.length === 0) return {};\n const same = (cells: string[]): boolean =>\n cells.length === first.length && cells.every((c, i) => c === first[i]);\n return headers.every(same) ? { columns: [...first] } : {};\n}\n\n/**\n * `language:` for a run of code blocks, where every one of them declares one.\n *\n * `codeBlocks.language` holds every block in the run to the accepted set, so a\n * section mixing a tagged fence with a bare one can claim nothing: the bare one\n * would fail. Where the tags differ the list form says what the page shows,\n * which is what \"one of these\" is for.\n */\nfunction languageOf(blocks: CodeNode[]): { language?: string | string[] } {\n const declared: string[] = [];\n for (const block of blocks) {\n if (block.language === undefined || block.language.length === 0) return {};\n declared.push(block.language);\n }\n const distinct = [...new Set(declared)];\n const [only] = distinct;\n if (only === undefined) return {};\n return { language: distinct.length === 1 ? only : distinct };\n}\n\n/**\n * What a section holds, as a `contains:` rule, or nothing where it holds none\n * of the kinds a template can count.\n *\n * `contains` rather than `sequence`: the page shows one order, and asserting it\n * would make moving a paragraph below a list a finding. Order is a claim its\n * author makes deliberately.\n */\nfunction inferContains(children: ContentNode[]): BlockRule | undefined {\n const byKey = new Map<BlockKind, ContentNode[]>();\n for (const node of children) {\n const key = KIND_KEY.get(node.kind);\n if (key === undefined) continue;\n const bucket = byKey.get(key);\n if (bucket) bucket.push(node);\n else byKey.set(key, [node]);\n }\n\n const rule: BlockRule = {};\n let any = false;\n // In `BLOCK_KINDS` order, not the order the page happens to put them in, so\n // two pages holding the same kinds produce byte-identical rules.\n for (const key of BLOCK_KINDS) {\n const nodes = byKey.get(key);\n if (nodes === undefined) continue;\n any = true;\n if (key === \"tables\") {\n rule.tables = { min: 1, ...columnsOf(nodes as TableNode[]) };\n } else if (key === \"codeBlocks\") {\n rule.codeBlocks = { min: 1, ...languageOf(nodes as CodeNode[]) };\n } else {\n // A computed key, as `validator.ts` does it: every other block rule is a\n // bare count, and nine near-identical branches would say less.\n Object.assign(rule, { [key]: { min: 1 } });\n }\n }\n return any ? rule : undefined;\n}\n\n/* -------------------------------------------------------------------------- *\n * Rules\n * -------------------------------------------------------------------------- */\n\n/**\n * A section's heading, as a rule about it.\n *\n * Exact text, because that is what the page shows; a one-of list or a pattern\n * is a generalisation only its author can make. `false` for a section with no\n * heading of its own - the implicit lead section, and the synthesised page -\n * because that is as specific a claim as naming one.\n *\n * An empty title is the one case with no spelling: the schema's `heading`\n * requires a non-empty string, and `false` would be a lie about a section that\n * does have a heading. The key is omitted, which matches any heading.\n */\nfunction inferHeading(section: SectionNode): HeadingRule | undefined {\n if (section.titlePosition === null) return false;\n return section.title.length > 0 ? section.title : undefined;\n}\n\n/** One section, and every section under it. */\nfunction inferRule(section: SectionNode): Rule {\n const rule: Rule = {};\n const heading = inferHeading(section);\n if (heading !== undefined) rule.heading = heading;\n const contains = inferContains(section.children);\n if (contains) rule.contains = contains;\n // Omitted, never `[]`. An absent `sections:` says nothing about the\n // subsections; an empty list says none are permitted.\n if (section.sections.length > 0) {\n rule.sections = section.sections.map(inferRule);\n }\n return rule;\n}\n\n/** The template one page describes: the page rule, with its sections under it. */\nexport function inferTemplate(tree: DocumentTree): Template {\n return inferRule(pageSection(tree));\n}\n\n/* -------------------------------------------------------------------------- *\n * The file\n * -------------------------------------------------------------------------- */\n\n/** Refuse a name the `templates` map cannot hold, in words that name the rule. */\nexport function assertTemplateName(name: string): string {\n if (TEMPLATE_NAME.test(name)) return name;\n throw new LintError(\n `\"${name}\" is not a usable template name. A name starts with a letter and ` +\n `holds only letters, digits, \"-\" and \"_\". Pass --name <name>.`,\n );\n}\n\n/** A one-template file, ready to serialize. */\nexport function inferTemplateFile(\n tree: DocumentTree,\n name: string,\n): TemplateFile {\n return { templates: { [assertTemplateName(name)]: inferTemplate(tree) } };\n}\n\n/**\n * Serialize a template file.\n *\n * `lineWidth: 0` turns off YAML's folding. A folded heading still parses back\n * to the same string, but a template is read and edited by hand, and a heading\n * broken across two lines is the one thing in this output a reader would\n * mistrust.\n */\nexport function renderTemplateFile(\n file: TemplateFile,\n format: InferFormat,\n): string {\n const text =\n format === \"json\"\n ? JSON.stringify(file, null, 2)\n : stringifyYaml(file, { lineWidth: 0 });\n return text.endsWith(\"\\n\") ? text : `${text}\\n`;\n}\n","/**\n * `templates` command cores.\n *\n * `runTemplates` reports the templates a run could resolve: the built-ins, plus\n * the named templates in any files given by `--templates` or by\n * `lint.templates` in the config, with the doctypes each serves.\n *\n * The `types` column is the part worth printing. It is what frontmatter\n * routing will match a page against, so seeing it is how someone works out\n * which `type:` value to write in a page - or that no template claims the one\n * they already wrote.\n *\n * `runTemplatesInfer` writes a first template from a page that already has the\n * shape its author wants. The inference itself is `../core/infer.ts`; what\n * lives here is the plumbing around it - which parser reads the page, what the\n * template is called, and where the file goes.\n *\n * `runTemplateShow` resolves one ref the way `--template` does and returns the\n * template it names, for `src/lint/reporters/template-show.ts` to print.\n *\n * All three return data; `src/lint/reporters/index.ts` renders the listing, and\n * an inferred template is already the text it will be written as.\n */\nimport { existsSync } from \"node:fs\";\nimport { mkdir, readFile } from \"node:fs/promises\";\nimport { basename, dirname, extname, resolve } from \"node:path\";\nimport { errorMessage, ToolError } from \"../../shared/errors.js\";\nimport { writeTextAtomic } from \"../../shared/write-file.js\";\nimport { LintError } from \"../types.js\";\nimport type { DocumentParser, DocumentTree } from \"../types.js\";\nimport {\n parserByName,\n parserForExtension,\n unsupportedFormatMessage,\n} from \"../parsers/index.js\";\nimport {\n assertTemplateName,\n inferTemplateFile,\n isInferFormat,\n renderTemplateFile,\n type InferFormat,\n} from \"../core/infer.js\";\nimport type { Template, TemplateFile } from \"../core/template.js\";\nimport { resolveLintRun } from \"../core/config.js\";\nimport {\n classifyRef,\n listBuiltins,\n loadResolvedTemplate,\n loadTemplate,\n loadTemplateFile,\n} from \"../core/template-registry.js\";\n\n/** `TemplateInfo.source` for a template that ships with the tool. */\nexport const BUILTIN_SOURCE = \"builtin\";\n\nexport interface TemplateInfo {\n /** The ref to pass to `--template`. */\n id: string;\n /**\n * Human-readable title. Empty for templates read from a user file: the\n * template DSL has no title field, only the built-in registry carries one.\n */\n title: string;\n /** Doctypes the template serves, matched against a page `type`. */\n types: string[];\n /** `builtin`, or the template file this entry came from. */\n source: string;\n /** Link to the author's guide for the doctype, or null when it names none. */\n guide: string | null;\n}\n\nexport interface TemplatesInfo {\n templates: TemplateInfo[];\n}\n\nexport interface TemplatesOptions {\n /** Template files whose entries join the built-ins. */\n templates?: string | string[];\n}\n\nexport async function runTemplates(\n opts: TemplatesOptions = {},\n): Promise<TemplatesInfo> {\n // A built-in's guide lives in its YAML, not the manifest, so each is loaded.\n // They are cached, and a run that lints pages loads them anyway.\n const templates: TemplateInfo[] = await Promise.all(\n listBuiltins().map(async (builtin) => ({\n id: builtin.id,\n title: builtin.title,\n types: builtin.types,\n source: BUILTIN_SOURCE,\n guide: (await loadTemplate(builtin.id)).guide ?? null,\n })),\n );\n\n // Listed after the built-ins, in the order supplied - the same order\n // `buildTypeIndex` applies them in, so a later entry claiming the same\n // doctype is the one that would win.\n const paths =\n opts.templates == null\n ? []\n : Array.isArray(opts.templates)\n ? opts.templates\n : [opts.templates];\n\n for (const path of paths) {\n const file = await loadTemplateFile(path);\n for (const [id, template] of Object.entries(file.templates ?? {})) {\n templates.push({\n id,\n title: \"\",\n types: template.types ?? [],\n source: path,\n guide: template.guide ?? null,\n });\n }\n }\n\n return { templates };\n}\n\n/* -------------------------------------------------------------------------- *\n * infer\n * -------------------------------------------------------------------------- */\n\n/** The token that means stdin, in every command of the family. */\nconst STDIN = \"-\";\n\n/** What a page read from stdin is called when nothing else names it. */\nconst STDIN_NAME = \"stdin\";\n\nexport interface TemplatesInferOptions {\n /** The one page to infer from: a path, or `-` for stdin. */\n page: string;\n /** `--as`: force an input format, by parser name. */\n as?: string;\n /** `--name`: what to call the template. Defaults to the page's own doctype. */\n name?: string;\n /** `-f/--format`: how the file is written. Defaults to `yaml`. */\n format?: InferFormat;\n /** `-o/--out`: write here instead of returning text for stdout. */\n out?: string;\n /** `--force`: replace an existing `--out`. */\n force?: boolean;\n cwd?: string;\n /** Content for the `-` page, injected by the CLI and by tests. */\n stdinContent?: string;\n /** `-c/--config`. */\n configPath?: string;\n /** `--no-config`: skip discovery. */\n noConfig?: boolean;\n /** Told which config governed the run, and where it came from. */\n onConfigLoaded?: (info: { path: string; dir: string }) => void;\n}\n\nexport interface TemplatesInferResult {\n /** The name the template was written under. */\n name: string;\n /** The inferred file, for a caller that wants the data rather than the text. */\n file: TemplateFile;\n /** The serialized template file, exactly as written. */\n text: string;\n /** Where it was written. Absent without `--out`. */\n written?: string;\n}\n\n/**\n * The parser that reads this page.\n *\n * Resolved before anything is read, as `runLint` does it: a typo in `--as`\n * should fail immediately rather than after a file was opened it was going to\n * mis-parse anyway. A name no parser answers to is unknown whatever it was\n * meant to name, so the message points at the one command that lists them.\n */\nfunction parserFor(page: string, as: string | undefined): DocumentParser {\n if (as !== undefined) {\n const forced = parserByName(as);\n if (forced) return forced;\n throw new LintError(\n `Unknown format \"${as}\". Run \"manni lint tools\" to see the formats manni lint reads.`,\n );\n }\n if (page === STDIN) {\n throw new LintError(\n \"Reading from stdin (-) requires --as <format> to choose a parser.\",\n );\n }\n const ext = extname(page);\n const parser = parserForExtension(ext);\n if (parser) return parser;\n throw new LintError(unsupportedFormatMessage(ext || page));\n}\n\n/**\n * What the template is called: `--name`, else the page's own doctype, else the\n * file's stem.\n *\n * The doctype first because that is the handle the page already carries, and\n * the one `types:` will route on once the author adds it. A file read from\n * stdin has no stem, so it falls back to a word rather than to `-`.\n */\nfunction defaultName(tree: DocumentTree, page: string): string {\n const declared = tree.frontmatter?.[\"type\"];\n if (typeof declared === \"string\" && declared.trim().length > 0) {\n return declared.trim();\n }\n if (page === STDIN) return STDIN_NAME;\n return basename(page, extname(page)) || STDIN_NAME;\n}\n\n/**\n * Infer a template from one page.\n *\n * One page, never a set. A template is a generalisation, and this makes exactly\n * the generalisation one exemplar supports; inferring from several would mean\n * deciding which differences are variation and which are mistakes, which is the\n * author's judgment and not the tool's.\n */\nexport async function runTemplatesInfer(\n opts: TemplatesInferOptions,\n): Promise<TemplatesInferResult> {\n const format = opts.format ?? \"yaml\";\n if (!isInferFormat(format)) {\n throw new LintError(\n `Unknown --format \"${String(format)}\". Use yaml or json.`,\n );\n }\n\n // Which config governs the run, said once, the way every other lint verb\n // says it. With a page typed on the command line the base stays the working\n // directory, so the path means what it looked like it meant.\n const run = await resolveLintRun({\n cwd: opts.cwd ?? process.cwd(),\n ...(opts.configPath === undefined ? {} : { configPath: opts.configPath }),\n ...(opts.noConfig === undefined ? {} : { noConfig: opts.noConfig }),\n inputs: [opts.page],\n ...(opts.onConfigLoaded === undefined\n ? {}\n : { onConfigLoaded: opts.onConfigLoaded }),\n });\n const cwd = run.base;\n\n const parser = parserFor(opts.page, opts.as);\n // A name the schema cannot hold is refused before the page is read, beside\n // the other refusals: a run that is going to fail should leave the working\n // tree, and the reader's terminal, exactly as it found them.\n if (opts.name !== undefined) assertTemplateName(opts.name);\n\n // Every refusal happens before the write, and the `--out` guard happens\n // before the read - the ordering `meta schemas infer` established. The path\n // is echoed as it was typed, because that is the string the reader will edit.\n let absOut: string | undefined;\n if (opts.out !== undefined) {\n absOut = resolve(cwd, opts.out);\n if (opts.force !== true && existsSync(absOut)) {\n throw new LintError(`${opts.out} exists. Pass --force to overwrite it.`);\n }\n }\n\n let content: string;\n if (opts.page === STDIN) {\n content = opts.stdinContent ?? \"\";\n } else {\n try {\n content = await readFile(resolve(cwd, opts.page), \"utf8\");\n } catch (err) {\n // The OS message travels verbatim: \"permission denied\" and \"no such\n // file\" send the reader to different places, and this cannot tell which.\n throw new LintError(\n `\"${opts.page}\" could not be read: ${errorMessage(err)}`,\n );\n }\n }\n\n let tree: DocumentTree;\n try {\n tree = parser.parse(content, opts.page === STDIN ? \"<stdin>\" : opts.page);\n } catch (err) {\n // A page that will not parse has no shape to infer, and the parser's own\n // message already names the file and the syntax it choked on.\n if (err instanceof ToolError) throw new LintError(err.message);\n throw err;\n }\n\n const name = opts.name ?? defaultName(tree, opts.page);\n const file = inferTemplateFile(tree, name);\n const text = renderTemplateFile(file, format);\n\n if (absOut === undefined) return { name, file, text };\n\n await mkdir(dirname(absOut), { recursive: true });\n await writeTextAtomic(absOut, text);\n return { name, file, text, written: opts.out };\n}\n\n/* -------------------------------------------------------------------------- *\n * show\n * -------------------------------------------------------------------------- */\n\nexport interface TemplateShowOptions {\n /** A built-in id, a path, a `path#name`, or a URL: what `--template` takes. */\n ref: string;\n}\n\n/** One resolved template, after `extends` and `$ref`, with where it came from. */\nexport interface TemplateShow extends Omit<Template, \"extends\" | \"id\"> {\n /** The built-in id, or the template's name inside its file. */\n id: string;\n /** `builtin`, or the file or URL the template came from. */\n source: string;\n}\n\n/**\n * Resolve one template ref and return the template it names.\n *\n * The loader is `--template`'s own, so a ref that fails there fails here with\n * the same message, and a template that inherits shows what it inherited.\n */\nexport async function runTemplateShow(\n opts: TemplateShowOptions,\n): Promise<TemplateShow> {\n const template = await loadResolvedTemplate(opts.ref);\n const { extends: _extends, id: _id, ...body } = template;\n\n if (classifyRef(opts.ref).kind === \"builtin\") {\n const title = listBuiltins().find((b) => b.id === opts.ref)?.title;\n return { id: opts.ref, source: BUILTIN_SOURCE, ...(title ? { title } : {}), ...body };\n }\n\n // A file names its template by fragment, or holds only one - the loader\n // above has already refused anything else.\n const hash = opts.ref.lastIndexOf(\"#\");\n const source = hash === -1 ? opts.ref : opts.ref.slice(0, hash);\n const fragment = hash === -1 ? \"\" : opts.ref.slice(hash + 1);\n const id =\n fragment ||\n // The `?? \"\"` is unreachable: loadResolvedTemplate already refused a file\n // with no templates, and one with several but no fragment.\n (Object.keys((await loadTemplateFile(source)).templates ?? {})[0] ?? \"\");\n return { id, source, ...body };\n}\n","/**\n * `tools` command core. One row per lint job: which tool performs it, whether\n * this checkout can run it, what it read its settings from, and the input\n * formats it understands.\n *\n * It replaces `formats`, which reported the parser registry alone. Proposal\n * 0050 records the rename. The registry is here as one column of the job that\n * reads it, because the formats belong to the tool performing that job.\n *\n * The column lists exactly the formats the tool reads, so a row carries no\n * state: a listed format is one that is read, and `--as` accepts every name in\n * it.\n *\n * Returns data; `src/lint/reporters/index.ts` renders it.\n */\nimport type { ContentKind } from \"../types.js\";\nimport { BLOCK_KIND_NODE } from \"../core/template.js\";\nimport { resolveStructureTool } from \"../tools/index.js\";\nimport {\n LINT_JOBS,\n resolveLintRun,\n type LintConfig,\n type LintJob,\n type LintTool,\n} from \"../core/config.js\";\n\n/**\n * The content kinds a template rule can actually name - `BLOCK_KIND_NODE`'s\n * values, the nine block-rule keys map onto. `manni lint tools` lists this\n * column to answer \"can my rule run against this format\", and a rule can\n * never ask about `listItem`, `tableRow`, `tableCell`, or `definitionItem`:\n * those are structural kinds a parser reports so the content model can\n * describe a list's items or a table's cells, not kinds a `sections:` rule\n * counts on its own. What a parser *declares* (`DocumentParser.kinds`, read by\n * the pruner in `validator.ts`) is untouched - this is a display decision, so\n * it belongs here rather than trimming the declaration itself.\n */\nconst REPORTABLE_KINDS = new Set<ContentKind>(Object.values(BLOCK_KIND_NODE));\n\nexport interface FormatInfo {\n /** Parser name, also what `--as` accepts. */\n name: string;\n label: string;\n extensions: string[];\n /** The content kinds this format's parser actually emits today. */\n kinds: ContentKind[];\n}\n\n/** One job, and the tool that would perform it on this run. */\nexport interface ToolInfo {\n job: LintJob;\n tool: LintTool;\n /** Whether the config declares this job, or anything the job's tool reads. */\n configured: boolean;\n /** Whether the tool can run here, as its own probe reported it. */\n available: boolean;\n /**\n * The version the probe reported, or null when it reported none.\n *\n * Null rather than a placeholder string, because this is the shape\n * `-f json` emits: a consumer can test for an absent version, where a dash\n * would be a value it has to know to recognize. The pretty reporter renders\n * the dash.\n */\n version: string | null;\n /** Where the tool read its settings: the config file, or the defaults. */\n config: string;\n /** The input formats the tool reads. */\n formats: FormatInfo[];\n}\n\nexport interface ToolsOptions {\n cwd?: string;\n /** `-c/--config`. */\n configPath?: string;\n /** `--no-config`: ignore any discovered config file. */\n noConfig?: boolean;\n}\n\n/** What a run with no config file to read reports in the `config` column. */\nexport const BUILT_IN_DEFAULTS = \"built-in defaults\";\n\n/**\n * Whether the config says anything about this job.\n *\n * The job's own mapping counts, and so does every key its tool reads: a repo\n * that has written `templates:` and `overrides:` has configured the structure\n * job whether or not it also spelled `structure:` out. Saying otherwise would\n * report \"not configured\" beside a run those keys visibly govern.\n */\nfunction isConfigured(job: LintJob, config: LintConfig): boolean {\n if (config[job] !== undefined) return true;\n return (\n config.templates !== undefined ||\n config.template !== undefined ||\n config.types !== undefined ||\n config.overrides !== undefined\n );\n}\n\nexport async function runTools(opts: ToolsOptions = {}): Promise<ToolInfo[]> {\n // The same resolution every other command does, so a config this command\n // cannot read is the same exit 2 with the same message, rather than a row\n // saying \"built-in defaults\" over a file that is really there and broken.\n const cwd = opts.cwd ?? process.cwd();\n const run = await resolveLintRun({\n cwd,\n configPath: opts.configPath,\n noConfig: opts.noConfig,\n inputs: [],\n });\n\n return await Promise.all(\n LINT_JOBS.map(async (job) => {\n const tool: LintTool = run.config[job]?.tool ?? \"manni\";\n // The row is the tool's own answer about itself. It used to be two\n // literals that happened to be right while manni was the only tool:\n // \"available\" was hard-coded true, and the version was this package's\n // whatever performed the job.\n const descriptor = resolveStructureTool(tool);\n // The family's `tools:` travels with the probe: a tool outside the\n // package is found where its own `tools.<tool>` says it is, so probing\n // without it would report \"not available\" over the very installation the\n // run would go on to use.\n const probed = await descriptor.probe({\n cwd,\n tools: run.tools,\n ...(run.configDir === undefined ? {} : { configDir: run.configDir }),\n });\n return {\n job,\n tool,\n configured: isConfigured(job, run.config),\n available: probed.available,\n version: probed.version,\n config: run.configSource ?? BUILT_IN_DEFAULTS,\n formats: descriptor.formats().map((format) => ({\n ...format,\n kinds: format.kinds.filter((kind) => REPORTABLE_KINDS.has(kind)),\n })),\n };\n }),\n );\n}\n","/**\n * `manni lint templates show`: what a template asks for, as a reader scans it\n * (`pretty`), as data (`json`), or as a page to start writing from\n * (`markdown`).\n *\n * The content lines use the nouns the count findings use, so \"Contains at\n * least 1 table.\" here and \"Expected at least 1 table\" in a finding read as\n * the same rule.\n */\nimport { palette, type Colors } from \"../../shared/color.js\";\nimport { quoteList } from \"../rules/index.js\";\nimport {\n BLOCK_KINDS,\n occurrenceRange,\n type BlockKind,\n type BlockRule,\n type HeadingRule,\n type Occurrences,\n type Rule,\n} from \"../core/template.js\";\nimport type { TemplateShow } from \"../commands/templates.js\";\nimport type { ReportOptions } from \"./index.js\";\n\n/** `templates show -f`. */\nexport const SHOW_FORMATS = [\"pretty\", \"json\", \"markdown\"] as const;\nexport type ShowFormat = (typeof SHOW_FORMATS)[number];\n\nexport function isShowFormat(value: string): value is ShowFormat {\n return (SHOW_FORMATS as readonly string[]).includes(value);\n}\n\n/** How often a rule may occur, in words. */\nexport function occurrenceWords(rule: Occurrences): string {\n const { min, max } = occurrenceRange(rule);\n if (max === 0) return \"forbidden\";\n if (max === null) {\n if (min === 0) return \"optional, repeats\";\n if (min === 1) return \"required, repeats\";\n return `at least ${min}`;\n }\n if (min === 1 && max === 1) return \"required\";\n if (min === 0 && max === 1) return \"optional\";\n return `${min} to ${max}`;\n}\n\nfunction headingForm(heading: HeadingRule | undefined): string {\n if (heading === undefined) return \"(any heading)\";\n if (heading === false) return \"(no heading)\";\n if (typeof heading === \"string\") return heading;\n if (Array.isArray(heading)) return heading.join(\" | \");\n return `/${heading.pattern}/`;\n}\n\nconst NOUNS: Record<BlockKind, string> = {\n paragraphs: \"paragraph\",\n codeBlocks: \"code block\",\n lists: \"list\",\n tables: \"table\",\n admonitions: \"admonition\",\n images: \"image\",\n blockquotes: \"blockquote\",\n definitionLists: \"definition list\",\n elements: \"element\",\n};\n\n/** The noun one kind's rule counts, narrowed the way its count finding is. */\nfunction noun(kind: BlockKind, block: BlockRule): string {\n if (kind === \"lists\" && block.lists?.ordered !== undefined) {\n return block.lists.ordered ? \"numbered list\" : \"bulleted list\";\n }\n if (kind === \"admonitions\" && block.admonitions?.variant !== undefined) {\n return `${block.admonitions.variant} admonition`;\n }\n const tag = block.elements?.tag;\n if (kind === \"elements\" && tag !== undefined) {\n const tags = Array.isArray(tag) ? tag : [tag];\n return `${tags.map((t) => `\"${t}\"`).join(\" or \")} element`;\n }\n return NOUNS[kind];\n}\n\nfunction plural(word: string, n: number): string {\n return n === 1 ? word : `${word}s`;\n}\n\n/** `at least 1 table`, `at most 3 lists`, `no images`. */\nfunction counted(range: Occurrences, word: string): string {\n const { min, max } = occurrenceRange(range);\n if (max === 0) return `no ${plural(word, 0)}`;\n if (max === null) {\n return min === 0 ? `any number of ${plural(word, 0)}` : `at least ${min} ${plural(word, min)}`;\n }\n if (min === 0) return `at most ${max} ${plural(word, max)}`;\n if (min === max) return `exactly ${min} ${plural(word, min)}`;\n return `${min} to ${max} ${plural(word, max)}`;\n}\n\n/** What else a kind's rule asks of each thing it counts. */\nfunction qualifiers(block: BlockRule): string {\n const parts: string[] = [];\n if (block.paragraphs?.pattern !== undefined) {\n parts.push(`each matching /${block.paragraphs.pattern}/`);\n }\n const language = block.codeBlocks?.language;\n if (language !== undefined) {\n parts.push(`in ${(Array.isArray(language) ? language : [language]).join(\" or \")}`);\n }\n if (block.codeBlocks?.fenceInfo !== undefined) {\n parts.push(`with fence info \"${block.codeBlocks.fenceInfo}\"`);\n }\n if (block.lists?.items !== undefined) {\n parts.push(`each with ${counted(block.lists.items, \"item\")}`);\n }\n if (block.tables?.columns !== undefined) {\n parts.push(`with columns ${quoteList(block.tables.columns)}`);\n }\n return parts.map((p) => `, ${p}`).join(\"\");\n}\n\n/** The content minimums a rule sets, one line per kind, then its order. */\nfunction contentLines(rule: Rule): string[] {\n const lines: string[] = [];\n const contains = rule.contains;\n if (contains !== undefined) {\n for (const kind of BLOCK_KINDS) {\n const range = contains[kind];\n if (range === undefined) continue;\n lines.push(\n `Contains ${counted(range, noun(kind, contains))}${qualifiers({ [kind]: range })}.`,\n );\n }\n }\n if (rule.sequence !== undefined) {\n const kinds = rule.sequence.flatMap((entry) => {\n const kind = BLOCK_KINDS.find((k) => entry[k] !== undefined);\n return kind === undefined ? [] : [noun(kind, entry)];\n });\n lines.push(`In order: ${kinds.join(\", \")}.`);\n }\n return lines;\n}\n\nfunction detailLines(rule: Rule): string[] {\n return [...contentLines(rule), ...(rule.description === undefined ? [] : [rule.description])];\n}\n\n/* -------------------------------------------------------------------------- *\n * pretty\n * -------------------------------------------------------------------------- */\n\nfunction prettyRule(c: Colors, rule: Rule, level: number, indent: number, out: string[]): void {\n const pad = \" \".repeat(indent);\n const hashes = \"#\".repeat(level);\n const occurs = c.dim(occurrenceWords(rule));\n if (rule.repeat !== undefined) {\n const group = rule.id === undefined ? \"(group)\" : `(group ${rule.id})`;\n out.push(`${pad}${hashes} ${group} ${occurs}`);\n } else {\n const id = rule.id === undefined ? \"\" : `${c.cyan(rule.id)} · `;\n out.push(`${pad}${hashes} ${headingForm(rule.heading)} ${id}${occurs}`);\n }\n for (const line of detailLines(rule)) out.push(`${pad} ${line}`);\n for (const member of rule.repeat ?? []) prettyRule(c, member, level, indent + 2, out);\n for (const section of rule.sections ?? []) {\n prettyRule(c, section, level + 1, indent + 2, out);\n }\n}\n\nfunction renderPrettyShow(show: TemplateShow, c: Colors): string {\n const title = show.title ? ` ${c.dim(\"—\")} ${show.title}` : \"\";\n const lines = [`${c.bold(show.id)}${title}`];\n if (show.types !== undefined && show.types.length > 0) {\n lines.push(` types: ${show.types.join(\", \")}`);\n }\n if (show.description !== undefined) lines.push(` ${show.description}`);\n for (const line of contentLines(show)) lines.push(` ${line}`);\n if (show.guide !== undefined) lines.push(` Guide: ${show.guide}`);\n const sections = show.sections ?? [];\n if (sections.length > 0) lines.push(\"\");\n for (const section of sections) prettyRule(c, section, 2, 2, lines);\n return lines.join(\"\\n\");\n}\n\n/* -------------------------------------------------------------------------- *\n * markdown\n * -------------------------------------------------------------------------- */\n\n/** The rules a skeleton writes: no catch-all at the end, nothing forbidden. */\nfunction skeletonRules(rules: Rule[] | undefined): Rule[] {\n const kept = (rules ?? []).filter((rule) => occurrenceRange(rule).max !== 0);\n const last = kept[kept.length - 1];\n if (\n last !== undefined &&\n last.id === undefined &&\n last.heading === undefined &&\n last.repeat === undefined\n ) {\n kept.pop();\n }\n return kept;\n}\n\nfunction sentence(text: string): string {\n const trimmed = text.trim();\n return /[.!?]$/.test(trimmed) ? trimmed : `${trimmed}.`;\n}\n\n/** One HTML comment. `--` may not appear inside one, so dashes are spaced. */\nfunction comment(parts: string[]): string {\n return `<!-- ${parts.join(\" \").replace(/-(?=-)/g, \"- \")} -->`;\n}\n\nfunction capitalise(text: string): string {\n return text.charAt(0).toUpperCase() + text.slice(1);\n}\n\n/** The heading a skeleton writes: the exact text, or the first of a list. */\nfunction headingText(heading: HeadingRule | undefined): string | undefined {\n if (typeof heading === \"string\") return heading;\n return Array.isArray(heading) ? heading[0] : undefined;\n}\n\nfunction markdownRule(rule: Rule, level: number, out: string[]): void {\n if (rule.repeat !== undefined) {\n for (const member of skeletonRules(rule.repeat)) markdownRule(member, level, out);\n } else {\n if (rule.heading !== false) {\n const text = headingText(rule.heading) ?? `{${rule.id ?? \"section\"}}`;\n out.push(`${\"#\".repeat(level)} ${text}`, \"\");\n }\n out.push(\n comment([sentence(capitalise(occurrenceWords(rule))), ...detailLines(rule).map(sentence)]),\n \"\",\n );\n }\n for (const section of skeletonRules(rule.sections)) markdownRule(section, level + 1, out);\n}\n\nfunction renderMarkdownShow(show: TemplateShow): string {\n const lines: string[] = [];\n const type = show.types?.[0];\n if (type !== undefined) lines.push(\"---\", `type: ${type}`, \"---\", \"\");\n lines.push(`# ${headingText(show.heading) ?? \"{Title}\"}`, \"\");\n const parts = [\n sentence(show.id),\n ...contentLines(show),\n ...(show.description === undefined ? [] : [sentence(show.description)]),\n ...(show.guide === undefined ? [] : [`Guide: ${show.guide}`]),\n ];\n lines.push(comment(parts), \"\");\n for (const section of skeletonRules(show.sections)) markdownRule(section, 2, lines);\n return lines.join(\"\\n\").trimEnd();\n}\n\n/** Render one shown template. */\nexport function renderTemplateShow(\n show: TemplateShow,\n format: ShowFormat,\n opts: ReportOptions = {},\n): string {\n if (format === \"json\") return JSON.stringify(show, null, 2);\n if (format === \"markdown\") return renderMarkdownShow(show);\n return renderPrettyShow(show, palette(opts.color ?? false));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAS,aAAa,qBAAqB;AAsBpC,IAAM,gBAAgB,CAAC,QAAQ,MAAM;AAGrC,SAAS,cAAc,OAAqC;AACjE,SAAQ,cAAoC,SAAS,KAAK;AAC5D;AAUA,IAAM,gBAAgB;AAGtB,IAAM,WAAW,IAAI;AAAA,EACnB,YAAY,IAAI,CAAC,QAAQ,CAAC,gBAAgB,GAAG,GAAG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SAAS,QAAQ,GAAG,GAAG;AAC1F;AAEA,SAAS,mBAAmB,MAA4B;AACtD,QAAM,QAAkB,CAAC;AACzB,QAAM,OAAO,KAAK,QAAQ,CAAC;AAC3B,MAAI,SAAS,OAAW,OAAM,KAAK,OAAO,SAAS,IAAI,IAAI,OAAO,EAAE;AACpE,QAAM,KAAK,KAAK,YAAY,KAAK,OAAO,KAAK,SAAS,IAAI,EAAE;AAC5D,QAAM,QAAQ;AAAA,IACZ,SAAS,KAAK,EAAE;AAAA,IAChB,GAAG,aAAa,IAAI;AAAA,IACpB,GAAI,KAAK,gBAAgB,SAAY,CAAC,IAAI,CAAC,SAAS,KAAK,WAAW,CAAC;AAAA,IACrE,GAAI,KAAK,UAAU,SAAY,CAAC,IAAI,CAAC,UAAU,KAAK,KAAK,EAAE;AAAA,EAC7D;AACA,QAAM,KAAK,QAAQ,KAAK,GAAG,EAAE;AAC7B,aAAW,WAAW,cAAc,KAAK,QAAQ,EAAG,cAAa,SAAS,GAAG,KAAK;AAClF,SAAO,MAAM,KAAK,IAAI,EAAE,QAAQ;AAClC;AAGO,SAAS,mBACd,MACA,QACA,OAAsB,CAAC,GACf;AACR,MAAI,WAAW,OAAQ,QAAO,KAAK,UAAU,MAAM,MAAM,CAAC;AAC1D,MAAI,WAAW,WAAY,QAAO,mBAAmB,IAAI;AACzD,SAAO,iBAAiB,MAAM,QAAQ,KAAK,SAAS,KAAK,CAAC;AAC5D;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/tracevals/core/config.ts","../src/tracevals/core/config-schema.json","../src/tracevals/calibrate/labels.ts","../src/tracevals/calibrate/labels-schema.json"],"sourcesContent":["/**\n * Config loading. Every knob flows config → Ajv validate → defaults → CLI\n * override (`??` at the read site) → runtime; parseConfig() fills every\n * default so downstream code never re-applies one.\n *\n * Settings live under a `tracevals:` key in `manni.config.yaml`, one file\n * shared by the whole manni family. Sibling keys belong to other tools and are\n * ignored here, so parseConfig() validates the section — never the file root.\n * Finding the file is the shared loader's job (`src/shared/config-file.ts`).\n */\nimport { Ajv2020 } from \"ajv/dist/2020.js\";\nimport configSchemaJson from \"./config-schema.json\" with { type: \"json\" };\nimport {\n FAMILY_CONFIG_NAMES,\n findConfigFileSync,\n readConfigFileSync,\n type ConfigFileOptions,\n} from \"../../shared/config-file.js\";\nimport type { CollectionConfig } from \"../../shared/collections.js\";\nimport {\n assertKnownProvider,\n type ProvidersConfig,\n} from \"../../shared/providers.js\";\nimport { compileRedactPatterns } from \"../judge/redact.js\";\nimport { JEV, JEV_OUT_OF_LOOP } from \"../judge/provider.js\";\nimport { DEFAULT_CAPTURE_DIR } from \"../capture/types.js\";\nimport { DEFAULT_LABELS_FILE } from \"../calibrate/labels.js\";\nimport { TracevalsError } from \"../types.js\";\nimport {\n configuredGrants,\n EXECUTION_GRANTS,\n isExecutionGrant,\n unknownGrantsMessage,\n type ExecutionGrant,\n} from \"../../shared/execution.js\";\n\nconst configSchema = configSchemaJson as Record<string, unknown>;\n\nexport const DEFAULT_CONFIG_FILENAME =\n FAMILY_CONFIG_NAMES[0] ?? \"manni.config.yaml\";\n\n/**\n * Top-level key holding this tool's settings inside the shared family config.\n * Sibling tools (meta, docevals) own their own keys in the same file.\n */\nexport const CONFIG_SECTION_KEY = \"tracevals\";\n\n/**\n * The section key as an error's instance path spells it. The schema describes\n * the section rather than the file, so Ajv's own paths start below it; a\n * message that said `/provider` would name a key nobody writes at the root.\n */\nconst CONFIG_SECTION_KEY_PATH = `/${CONFIG_SECTION_KEY}`;\n\n/**\n * No legacy filename. The family file is the only one read, so a file named\n * for the tool is not config however it is spelled, and nothing warns about\n * one because nothing looks for it.\n */\nconst CONFIG_FILE: ConfigFileOptions = {\n section: CONFIG_SECTION_KEY,\n legacyNames: [],\n toError: (message) => new TracevalsError(message),\n};\n\nexport interface TracevalsConfig {\n /**\n * Which provider judges, as `tracevals.provider` names it. `null` when the\n * key is absent, which defers to the family's `providers.provider`. The\n * connection settings are never here: they are `providers` below.\n */\n provider: string | null;\n /** The model within `provider`; `null` when unset. manni pins none. */\n model: string | null;\n /** The family's top-level `providers:` map, parsed by the shared loader. */\n providers: ProvidersConfig;\n /** The file as the user would name it, for messages. */\n configSource: string;\n judge: {\n ensembleRuns: number;\n temperature: number;\n zones: { autoPass: number; autoFail: number };\n cacheDir: string;\n /**\n * Ensemble runs this invocation may spend, or `null` for unbounded. A\n * cached ensemble spends none, and an eval the budget cannot cover is\n * `skipped` with the `turn budget` reason rather than dropped.\n */\n maxTurns: number | null;\n /**\n * Extra patterns scrubbed from the session digest before it reaches a\n * provider, applied *on top of* the built-in secret shapes (ADR 01020).\n * Always a list; validated for compilability at load time.\n */\n redact: string[];\n };\n render: {\n maxBlockChars: number;\n maxTotalChars: number;\n };\n /**\n * What content-authored code a run may execute: the grants it holds, every\n * one unless the operator narrows it (proposal 0075). A `command` eval runs\n * only under `frontmatter-commands`; `[]` runs none and reports them\n * `skipped`.\n */\n execution: { allow: ExecutionGrant[] };\n history: {\n file: string;\n };\n /**\n * Session manifests (ADR 01024). `capture` writes one here; `run` looks here\n * for the trace's own, and reports a `skipped` hash check when there is none.\n */\n capture: {\n /** Resolved against the project root, not the working directory. */\n dir: string;\n };\n fill: {\n /** Minimum self-reported confidence a proposal needs to be written. */\n confidenceThreshold: number;\n maxEvalsPerArtifact: number;\n temperature: number;\n cacheDir: string;\n /** Inference calls this invocation may spend, or `null` for unbounded. */\n maxTurns: number | null;\n };\n /**\n * `calibrate` — measuring the judge against a human's answers (ADR 01022).\n * The sweep grid lives here rather than behind flags because the useful\n * range is a property of a corpus, and a corpus outlives an invocation.\n */\n calibrate: {\n /** Labels sidecar, resolved against the config file's directory. */\n labels: string;\n /** Thresholds. Unset means the run measures without gating. */\n maxFalsePass?: number;\n maxFalseFail?: number;\n maxReview?: number;\n sweep: {\n ensembleRuns: number[];\n autoPass: number[];\n autoFail: number[];\n };\n };\n failOnReview: boolean;\n /**\n * Module specifiers imported before evals are planned, so a `registerGrader`\n * call from outside this package lands in time (ADR 01017). Resolved against\n * the config file's directory, in order — a later entry wins a colliding\n * kind. `--require` appends to this list rather than replacing it.\n */\n plugins: string[];\n /** List offered-but-unused artifacts in coverage, not just count them. */\n reportUnusedArtifacts: boolean;\n /**\n * Runtime evals, each turn checked against its rule sources (proposals 0079\n * and 0083). `null` when the section is absent, which keeps tracevals out of\n * every hook; `{}` puts it in play with these defaults.\n */\n runtime: RuntimeConfig | null;\n}\n\nexport interface RuntimeConfig {\n /** The in-loop judge. `null` falls back to `tracevals.provider` / `model`. */\n hook: { provider: string | null; model: string | null; runs: number };\n /** Globs of designated rule sources, in scope once read. */\n include: string[];\n /** Globs never treated as rule sources. */\n exclude: string[];\n /** Globs of files that say what to build, in scope once touched (proposal 0080). */\n plans: string[];\n}\n\n// `verbose` puts the parent schema on each error, so an unknown key can be\n// checked against the keys its section does have.\nconst ajv = new Ajv2020({ allErrors: true, verbose: true });\nconst validate = ajv.compile(configSchema);\n\n/**\n * `; did you mean \"ensembleRuns\"?` when `key` is the kebab spelling of a key\n * its section has. Only the exact counterpart: a guess at a near miss is\n * advice that can be wrong, and the kebab spelling is the one mistake a\n * reader of the frontmatter vocabulary is likely to make here.\n */\nfunction camelCaseHint(key: string, parentSchema: unknown): string {\n const camel = key.replace(/-([a-z0-9])/g, (_, c: string) => c.toUpperCase());\n if (camel === key || parentSchema === null || typeof parentSchema !== \"object\") {\n return \"\";\n }\n const properties = (parentSchema as { properties?: unknown }).properties;\n return properties !== null &&\n typeof properties === \"object\" &&\n Object.hasOwn(properties, camel)\n ? `; did you mean \"${camel}\"?`\n : \"\";\n}\n\n/**\n * The hint on the old `conformance:` section, renamed `runtime:` (proposal\n * 0083). Nothing reads the old key, so it stays an unknown key; the hint says\n * where its settings went. Only at the section root: a `conformance` key\n * nested anywhere else, as under `runtime:`, was never the old section.\n */\nfunction renamedRuntimeHint(instancePath: string, key: string): string {\n return instancePath === \"\" && key === \"conformance\" ? `; it is now \"runtime\"` : \"\";\n}\n\n/**\n * The hint on an old `provider:` object. The key used to hold a `default` and\n * a section per provider; it is now the provider's name, as `docevals.provider`\n * and `fill.provider` are, and the connection settings moved to the family's\n * top-level `providers:` map, which every tool reads. Ajv's own message says\n * it must be a string, which is true and leaves the reader to find out where\n * the settings went.\n */\nfunction movedProviderHint(instancePath: string, keyword: string): string {\n return instancePath === \"/provider\" && keyword === \"type\"\n ? `; \"provider\" is now a provider name; per-provider settings moved to the top-level providers: map`\n : \"\";\n}\n\n/**\n * The section as the schema admits it: every key optional, because\n * `parseConfig` supplies the defaults. Ajv has checked the document against\n * `config-schema.json` before it is read as this, so the one cast below is\n * where the validated document becomes a typed one.\n */\ninterface RawConfig {\n provider?: string;\n model?: string;\n judge?: {\n ensembleRuns?: number;\n temperature?: number;\n zones?: { autoPass?: number; autoFail?: number };\n cacheDir?: string;\n maxTurns?: number;\n redact?: string[];\n };\n render?: { maxBlockChars?: number; maxTotalChars?: number };\n execution?: { allow?: ExecutionGrant[] };\n history?: { file?: string };\n capture?: { dir?: string };\n fill?: {\n confidenceThreshold?: number;\n maxEvalsPerArtifact?: number;\n temperature?: number;\n cacheDir?: string;\n maxTurns?: number;\n };\n calibrate?: {\n labels?: string;\n maxFalsePass?: number;\n maxFalseFail?: number;\n maxReview?: number;\n sweep?: { ensembleRuns?: number[]; autoPass?: number[]; autoFail?: number[] };\n };\n failOnReview?: boolean;\n plugins?: string[];\n reportUnusedArtifacts?: boolean;\n runtime?: {\n hook?: { provider?: string; model?: string; runs?: number };\n include?: string[];\n exclude?: string[];\n plans?: string[];\n };\n}\n\n/** What the file the section came from carries beside it. */\nexport interface ConfigFileContext {\n /** The file as the user would name it, for messages. */\n source?: string;\n /** The file's top-level `providers:`; `{}` when it declares none. */\n providers?: ProvidersConfig;\n}\n\nexport function parseConfig(\n raw: unknown,\n file: ConfigFileContext = {},\n): TracevalsConfig {\n const source = file.source ?? DEFAULT_CONFIG_FILENAME;\n // Before the schema: Ajv's enum error names neither the value nor the\n // grants that exist, and a grant is the key where a misreading costs most.\n const unknownGrants = configuredGrants(raw).filter((g) => !isExecutionGrant(g));\n if (unknownGrants.length > 0) {\n throw new TracevalsError(`${source}: ${unknownGrantsMessage(unknownGrants)}`);\n }\n if (!validate(raw)) {\n const detail = (validate.errors ?? [])\n .map((e) => {\n // Ajv reports an unknown key against the *parent* object, so the bare\n // message (\"must NOT have additional properties\") leaves the reader to\n // diff their file against the schema to find which key it meant. Name\n // it: the common case is a removed key in an unmigrated config —\n // `judge.maxCostUsd` after the turn budget landed, say — and a\n // migration error that makes you guess is one people work around.\n const extra =\n e.keyword === \"additionalProperties\"\n ? (e.params as { additionalProperty?: string }).additionalProperty\n : undefined;\n return extra !== undefined\n ? `unknown key \"${extra}\"${camelCaseHint(extra, e.parentSchema)}${renamedRuntimeHint(e.instancePath, extra)}`\n : `${CONFIG_SECTION_KEY_PATH}${e.instancePath} ${e.message ?? \"is invalid\"}` +\n movedProviderHint(e.instancePath, e.keyword);\n })\n .join(\"; \");\n throw new TracevalsError(`${source}: ${detail}`);\n }\n const r = raw as RawConfig;\n // Checked here, with the message every other tool in the family gives, so a\n // typo is caught by every verb and not only the ones that reach a model.\n // Whether a model has a provider to own it waits for the flags: a\n // `--provider`, or the family's `providers.provider`, can supply the\n // provider a configured model needs.\n const provider = r.provider ?? null;\n if (provider !== null) {\n // jev only decides. Out of the loop a provider extracts rules and writes\n // verdicts, which are generations.\n if (provider === JEV) throw new TracevalsError(JEV_OUT_OF_LOOP);\n assertKnownProvider(provider, (message) => new TracevalsError(message));\n }\n const hookProvider = r.runtime?.hook?.provider ?? null;\n if (hookProvider !== null) {\n assertKnownProvider(hookProvider, (message) => new TracevalsError(message), { decisions: true });\n }\n const config: TracevalsConfig = {\n provider,\n model: r.model ?? null,\n providers: file.providers ?? {},\n configSource: source,\n judge: {\n ensembleRuns: r.judge?.ensembleRuns ?? 3,\n temperature: r.judge?.temperature ?? 0,\n zones: {\n autoPass: r.judge?.zones?.autoPass ?? 0.8,\n autoFail: r.judge?.zones?.autoFail ?? 0.8,\n },\n cacheDir: r.judge?.cacheDir ?? \".manni/tracevals/cache\",\n // `null`, not a number: unbounded is a state, and any number here would\n // be a ceiling nobody asked for.\n maxTurns: r.judge?.maxTurns ?? null,\n // Always a list: the render site concatenates nothing onto it, but a\n // hole here would be a special case in every consumer.\n redact: [...(r.judge?.redact ?? [])],\n },\n render: {\n maxBlockChars: r.render?.maxBlockChars ?? 2000,\n maxTotalChars: r.render?.maxTotalChars ?? 150000,\n },\n execution: { allow: [...(r.execution?.allow ?? EXECUTION_GRANTS)] },\n history: {\n file: r.history?.file ?? \".manni/tracevals/history.jsonl\",\n },\n capture: {\n // Beside the judge cache, under the state directory that already travels\n // with the project — which is what puts a manifest next to its trace in\n // the CI patterns the docs describe.\n dir: r.capture?.dir ?? DEFAULT_CAPTURE_DIR,\n },\n fill: {\n // 0.7 matches the manuscript's calibration bar for judged agreement.\n confidenceThreshold: r.fill?.confidenceThreshold ?? 0.7,\n maxEvalsPerArtifact: r.fill?.maxEvalsPerArtifact ?? 8,\n temperature: r.fill?.temperature ?? 0,\n // Separate from the judge cache: different key scheme and value shape.\n cacheDir: r.fill?.cacheDir ?? \".manni/tracevals/cache/fill\",\n maxTurns: r.fill?.maxTurns ?? null,\n },\n calibrate: {\n labels: r.calibrate?.labels ?? DEFAULT_LABELS_FILE,\n sweep: {\n // Spans the range rather than filling it: the first sweep judges the\n // corpus at the largest value here, so a wide grid is the one part of\n // calibration that does cost money.\n ensembleRuns: [...(r.calibrate?.sweep?.ensembleRuns ?? [1, 3, 5])],\n autoPass: [\n ...(r.calibrate?.sweep?.autoPass ?? [0.5, 0.6, 0.7, 0.8, 0.9, 0.95]),\n ],\n autoFail: [\n ...(r.calibrate?.sweep?.autoFail ?? [0.5, 0.6, 0.7, 0.8, 0.9, 0.95]),\n ],\n },\n },\n failOnReview: r.failOnReview ?? true,\n // Always a list, never undefined: the read site concatenates `--require`\n // onto it, and a hole there would be a special case in every caller.\n plugins: [...(r.plugins ?? [])],\n // An observation, not a gate: listing it is opt-in because a real roster\n // runs to hundreds of skills (ADR 01016).\n reportUnusedArtifacts: r.reportUnusedArtifacts ?? false,\n runtime:\n r.runtime === undefined\n ? null\n : {\n hook: {\n provider: hookProvider,\n model: r.runtime.hook?.model ?? null,\n runs: r.runtime.hook?.runs ?? 1,\n },\n include: [...(r.runtime.include ?? [])],\n exclude: [...(r.runtime.exclude ?? [])],\n plans: [...(r.runtime.plans ?? [])],\n },\n };\n // Compilability is not expressible in JSON Schema, and a pattern that cannot\n // compile must fail here rather than at the moment a digest is about to be\n // sent — a dropped redaction pattern is a silent leak.\n compileRedactPatterns(config.judge.redact);\n // Left absent rather than defaulted to a number: `0` is a meaningful limit\n // (\"no false pass at all\"), so it cannot double as \"unset\".\n for (const key of [\"maxFalsePass\", \"maxFalseFail\", \"maxReview\"] as const) {\n if (typeof r.calibrate?.[key] === \"number\") {\n config.calibrate[key] = r.calibrate[key];\n }\n }\n return config;\n}\n\n/** This tool's config, and the directory its relative paths resolve from. */\nexport interface LoadedConfig {\n config: TracevalsConfig;\n /**\n * The directory holding the config file, or `dir` when none was found.\n * Plugin specifiers and the labels default resolve against it, so a\n * committed config means the same thing from any working directory.\n */\n dir: string;\n /**\n * The file's top-level `collections:` (proposal 0041); `[]` with no config.\n *\n * Collections never choose tracevals' inputs — `run` and `calibrate` take\n * traces, `fill` detects artifacts under `--project` — and there is no\n * `--collection`. What they say is *where a relocated `metadata` block\n * lives*, so a declared manifest is read for the evals an artifact no longer\n * carries inline (proposals 0047 and 0049 §1).\n */\n collections: CollectionConfig[];\n /**\n * The config file's absolute path; absent when there is none. A keyless\n * manifest owns what an artifact's schemas mark external (proposal 0068),\n * and those schemas are read from meta's section of this same file.\n */\n path?: string;\n}\n\n/** How a command was told to find its config: `-c` and `--no-config`. */\nexport interface ConfigLookup {\n /** `-c/--config`: read this file instead of discovering one. */\n configPath?: string;\n /** `--no-config`: skip discovery and run on the built-in defaults. */\n noConfig?: boolean;\n}\n\n/**\n * Discover the family config from `dir` (cwd by default) upward to the\n * repository root and return this tool's section (`src/shared/config-file.ts`:\n * `manni.config.yaml` read at its `tracevals:` key, with the family's\n * top-level `providers:` beside it). An absent file — or one that carries only\n * other tools' sections — yields defaults.\n *\n * `-c` names a file and skips the walk; `--no-config` skips the file\n * altogether and runs on the built-in defaults, with `dir` still anchoring\n * whatever the config would otherwise have anchored.\n */\nexport async function discoverConfig(\n dir = process.cwd(),\n lookup: ConfigLookup = {},\n): Promise<LoadedConfig> {\n if (lookup.noConfig === true) {\n // No config means no collections, so no manifest owns anything and every\n // artifact's evals are its own front matter's — the same rule cite states.\n return { config: parseConfig({}), dir, collections: [] };\n }\n const file = await Promise.resolve().then(() =>\n lookup.configPath === undefined\n ? findConfigFileSync(dir, CONFIG_FILE)\n : readConfigFileSync(lookup.configPath, dir, CONFIG_FILE),\n );\n if (file === null) return { config: parseConfig({}), dir, collections: [] };\n return {\n config: parseConfig(file.value ?? {}, {\n source: file.source,\n ...(file.providers !== undefined ? { providers: file.providers } : {}),\n }),\n dir: file.dir,\n collections: file.collections,\n path: file.path,\n };\n}\n\n/** `discoverConfig`, for callers that only want the settings. */\nexport async function loadConfig(\n dir = process.cwd(),\n lookup: ConfigLookup = {},\n): Promise<TracevalsConfig> {\n return (await discoverConfig(dir, lookup)).config;\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"manni:tracevals:config\",\n \"title\": \"tracevals section of manni.config.yaml\",\n \"description\": \"Settings for manni tracevals, held under the `tracevals` key of the config file shared by the manni family of tools. Sibling keys belong to other tools and are not validated here.\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"provider\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"Which provider judges out of the loop, and extracts rules: auto, anthropic, openai, claude-cli, or llama-cpp. jev only decides, so it is refused here; name it as runtime.hook.provider. Overrides the family's top-level `providers.provider` for tracevals only. Connection settings — an endpoint, an API key's environment variable, the Claude CLI command — live in that top-level `providers:` map, never here.\"\n },\n \"model\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"The model within `provider`, which must be named at this level. Unset, the inference library's default for the winning provider is used; manni pins no model id of its own.\"\n },\n \"judge\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"ensembleRuns\": { \"type\": \"integer\", \"minimum\": 1 },\n \"temperature\": { \"type\": \"number\", \"minimum\": 0, \"maximum\": 2 },\n \"zones\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"autoPass\": { \"type\": \"number\", \"minimum\": 0, \"maximum\": 1 },\n \"autoFail\": { \"type\": \"number\", \"minimum\": 0, \"maximum\": 1 }\n }\n },\n \"cacheDir\": { \"type\": \"string\" },\n \"maxTurns\": { \"type\": \"integer\", \"minimum\": 1, \"description\": \"Stop after this many ensemble runs. A cached ensemble spends none. Unset means unbounded; the remaining evals report `skipped` with the reason `turn budget` rather than aborting the run.\" },\n \"redact\": {\n \"type\": \"array\",\n \"description\": \"Extra regular expressions scrubbed from the session digest before it is sent to a judge provider. Applied on top of the built-in secret shapes, never instead of them; each source is compiled with the `g` flag, and a match is replaced with `[redacted]`. Pattern matching is best-effort — --deterministic-only is the only setting that guarantees nothing leaves the machine.\",\n \"items\": { \"type\": \"string\", \"minLength\": 1 }\n }\n }\n },\n \"execution\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"description\": \"Operator grant for executing content-authored code.\",\n \"properties\": {\n \"allow\": {\n \"type\": \"array\",\n \"items\": { \"enum\": [\"frontmatter-commands\"] },\n \"default\": [\"frontmatter-commands\"],\n \"description\": \"Which content-authored code a run may execute. Absent, every grant holds; list fewer to narrow it, or write [] to run none. frontmatter-commands lets `command` evals declared in an artifact's front matter run; without it they report `skipped` with a reason, never `pass`.\"\n }\n }\n },\n \"render\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"maxBlockChars\": { \"type\": \"integer\", \"minimum\": 100 },\n \"maxTotalChars\": {\n \"type\": \"integer\",\n \"minimum\": 1000,\n \"description\": \"Upper bound on the rendered digest, in characters. The timeline always keeps at least 200 characters, so a very long header can push the digest past this bound by up to 200.\"\n }\n }\n },\n \"history\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"file\": { \"type\": \"string\" }\n }\n },\n \"capture\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"description\": \"Session manifests — sha256 of every instruction artifact plus the git SHA, recorded at session start by `manni tracevals capture` and read back by `run` to make staleness exact instead of an mtime guess. See ADR 01024.\",\n \"properties\": {\n \"dir\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"Directory manifests are written to and looked for, resolved against the project root. `run` also accepts one placed beside the trace as `<trace>.manifest.json`, and --manifest names one outright.\"\n }\n }\n },\n \"fill\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"confidenceThreshold\": { \"type\": \"number\", \"minimum\": 0, \"maximum\": 1 },\n \"maxEvalsPerArtifact\": { \"type\": \"integer\", \"minimum\": 1 },\n \"temperature\": { \"type\": \"number\", \"minimum\": 0, \"maximum\": 2 },\n \"cacheDir\": { \"type\": \"string\" },\n \"maxTurns\": { \"type\": \"integer\", \"minimum\": 1, \"description\": \"Stop after this many inference calls, one per artifact filled. A cached artifact spends none. Unset means unbounded.\" }\n }\n },\n \"calibrate\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"description\": \"Settings for `manni tracevals calibrate` — measuring the tool's verdicts against a human's answers. See ADR 01022.\",\n \"properties\": {\n \"labels\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"Default labels sidecar, resolved against this config file's directory. Overridden by --labels.\"\n },\n \"maxFalsePass\": {\n \"type\": \"integer\",\n \"minimum\": 0,\n \"description\": \"Fail the calibration run (exit 1) above this many false passes — labelled fail, judged pass. Unset by default: a calibration run is a measurement, not a gate.\"\n },\n \"maxFalseFail\": {\n \"type\": \"integer\",\n \"minimum\": 0,\n \"description\": \"Fail the calibration run above this many false fails — labelled pass, judged fail.\"\n },\n \"maxReview\": {\n \"type\": \"integer\",\n \"minimum\": 0,\n \"description\": \"Fail the calibration run above this many needs-review outcomes across the whole corpus.\"\n },\n \"sweep\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"description\": \"Values --sweep tries on each axis, one axis at a time with the others held at their configured value. The corpus is judged once at the largest ensembleRuns here and every cell is re-scored from those cached runs, so the grid costs nothing beyond that one run.\",\n \"properties\": {\n \"ensembleRuns\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": { \"type\": \"integer\", \"minimum\": 1 }\n },\n \"autoPass\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": { \"type\": \"number\", \"minimum\": 0, \"maximum\": 1 }\n },\n \"autoFail\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": { \"type\": \"number\", \"minimum\": 0, \"maximum\": 1 }\n }\n }\n }\n }\n },\n \"runtime\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"description\": \"Runtime evals: each turn checked against the rules the files that govern the agent declare. Present, even as {}, it puts tracevals in play under Claude Code hooks; absent, tracevals stays out of them.\",\n \"properties\": {\n \"hook\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"description\": \"The judge inside a Stop or SubagentStop hook. Each key falls back to the top-level one of the same name.\",\n \"properties\": {\n \"provider\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"The provider that judges inside a hook. Default: tracevals.provider. jev is accepted here, and only here.\"\n },\n \"model\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"The model that judges inside a hook. Default: tracevals.model.\"\n },\n \"runs\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"description\": \"Judge calls per rule inside a hook. A rule blocks only when every run scores it not followed at the bar. jev makes one call and ignores it. Default 1.\"\n }\n }\n },\n \"include\": {\n \"type\": \"array\",\n \"description\": \"Globs, relative to the project root, naming files that govern agents beyond the known formats. Each applies to every turn.\",\n \"items\": { \"type\": \"string\", \"minLength\": 1 }\n },\n \"exclude\": {\n \"type\": \"array\",\n \"description\": \"Globs, relative to the project root, naming files never treated as rule sources, in any format. It removes plan, spec and output style files too. It also matches the sources `prompt`, `plan` and `system-prompt` by name.\",\n \"items\": { \"type\": \"string\", \"minLength\": 1 }\n },\n \"plans\": {\n \"type\": \"array\",\n \"default\": [],\n \"description\": \"Globs, relative to the project root, naming files that say what to build, beyond the known spec formats. Each is a rule source once the session touches it.\",\n \"items\": { \"type\": \"string\", \"minLength\": 1 }\n }\n }\n },\n \"failOnReview\": { \"type\": \"boolean\" },\n \"plugins\": {\n \"type\": \"array\",\n \"description\": \"Modules imported before evals are planned, so one calling registerGrader() can add a grader kind the built-ins do not cover. A relative or absolute path resolves against this file's directory, not the working directory; a bare package name resolves the way an import from this file's directory would. Load order is significant: a later entry wins a colliding kind.\",\n \"items\": { \"type\": \"string\", \"minLength\": 1 }\n },\n \"reportUnusedArtifacts\": {\n \"type\": \"boolean\",\n \"description\": \"List every skill and agent the session was offered and never used, rather than only counting them. Off by default: a real roster runs to hundreds of skills.\"\n }\n }\n}\n","/**\n * The calibration labels sidecar (ADR 01022).\n *\n * A label is a human's answer for one `(trace, artifact, eval)`. It lives in\n * its own file rather than in the eval entry for two reasons: the vendored\n * `artifact-evals` vocabulary is docmeta's and `inlineEval` is closed to\n * additions (ADR 01010), and — more importantly — a label is a property of a\n * *corpus and a reviewer*, not of the artifact. Two teams calibrating the same\n * skill against different sessions hold different ground truth, and neither\n * belongs in the SKILL.md.\n */\nimport { readFile } from \"node:fs/promises\";\nimport { dirname, resolve } from \"node:path\";\nimport { Ajv2020 } from \"ajv/dist/2020.js\";\nimport { parse as parseYaml } from \"yaml\";\nimport labelsSchemaJson from \"./labels-schema.json\" with { type: \"json\" };\nimport { errorMessage } from \"../../shared/errors.js\";\nimport { TracevalsError } from \"../types.js\";\nimport type { ArtifactType } from \"../artifacts/types.js\";\n\nconst labelsSchema = labelsSchemaJson as Record<string, unknown>;\n\n/** Conventional location inside a project; overridable with `--labels`. */\nexport const DEFAULT_LABELS_FILE = \"tracevals/labels.yaml\";\n\n/**\n * What a human decided. `needs-review` is a legitimate label, not a cop-out:\n * an eval you found genuinely ambiguous is the one that tells you whether the\n * review band is set sensibly, and the docs have always asked for a couple.\n */\nexport type LabelOutcome = \"pass\" | \"fail\" | \"needs-review\";\n\nexport interface EvalLabel {\n /** Path exactly as written in the file, for error messages. */\n trace: string;\n /** Resolved absolute path — the join key against the batch corpus. */\n traceFile: string;\n artifact: string;\n /** Only when the file disambiguates a name shared by two artifact kinds. */\n type?: ArtifactType;\n eval: string;\n expected: LabelOutcome;\n note?: string;\n}\n\nconst ajv = new Ajv2020({ allErrors: true });\nconst validate = ajv.compile(labelsSchema);\n\n/**\n * Stable identity for one label, and the duplicate-detection key.\n *\n * The separator is written as a backslash-u escape, never as a literal NUL:\n * the runtime value is identical, but a literal one makes git call the file\n * binary — its diff renders as `Bin 0 -> N bytes` and cannot be reviewed or\n * three-way merged, and `grep` answers `Binary file … matches` and stops.\n * `test/unit/source-text-safety.test.ts` holds the whole tree to this.\n */\nexport const labelKey = (\n traceFile: string,\n artifact: string,\n evalName: string,\n type?: ArtifactType,\n): string => `${traceFile}\\u0000${type ?? \"\"}\\u0000${artifact}\\u0000${evalName}`;\n\n/**\n * Validate a labels document and resolve its trace paths.\n *\n * `file` is the path the text came from; trace paths resolve against **its**\n * directory rather than the working directory, matching how `plugins` resolves\n * against the config file that names them. A labels file travels with its\n * corpus, so it must mean the same thing from any cwd.\n */\nexport function parseLabels(text: string, file: string): EvalLabel[] {\n let raw: unknown;\n try {\n raw = parseYaml(text);\n } catch (err) {\n throw new TracevalsError(\n `could not parse ${file}: ${errorMessage(err)}`,\n );\n }\n if (raw === null || raw === undefined) {\n throw new TracevalsError(`invalid labels file ${file}: it is empty`);\n }\n if (!validate(raw)) {\n const detail = (validate.errors ?? [])\n .map((e) => `${e.instancePath || \"/\"} ${e.message ?? \"invalid\"}`)\n .join(\"; \");\n // The empty-list case gets its own wording: \"must NOT have fewer than 1\n // items\" describes the schema, not the mistake.\n const empty = (validate.errors ?? []).some(\n (e) => e.instancePath === \"/labels\" && e.keyword === \"minItems\",\n );\n throw new TracevalsError(\n empty\n ? `invalid labels file ${file}: it must carry at least one label — an empty one measures nothing`\n : `invalid labels file ${file}: ${detail}`,\n );\n }\n\n const base = dirname(resolve(file));\n const labels: EvalLabel[] = [];\n const seen = new Set<string>();\n for (const entry of (raw as { labels: Record<string, string>[] }).labels) {\n const traceFile = resolve(base, entry.trace as string);\n const type = entry.type as ArtifactType | undefined;\n const key = labelKey(\n traceFile,\n entry.artifact as string,\n entry.eval as string,\n type,\n );\n if (seen.has(key)) {\n // Two answers for one question is not a merge problem to resolve at run\n // time — whichever won would silently decide the measurement.\n throw new TracevalsError(\n `invalid labels file ${file}: duplicate label for ${entry.artifact ?? \"?\"} › ${entry.eval ?? \"?\"} on ${entry.trace ?? \"?\"}`,\n );\n }\n seen.add(key);\n labels.push({\n trace: entry.trace as string,\n traceFile,\n artifact: entry.artifact as string,\n ...(type !== undefined ? { type } : {}),\n eval: entry.eval as string,\n expected: entry.expected as LabelOutcome,\n ...(entry.note !== undefined ? { note: entry.note } : {}),\n });\n }\n return labels;\n}\n\nexport async function loadLabels(file: string): Promise<EvalLabel[]> {\n let text: string;\n try {\n text = await readFile(file, \"utf-8\");\n } catch (err) {\n throw new TracevalsError(\n `could not read labels file ${file}: ${errorMessage(err)}`,\n );\n }\n return parseLabels(text, file);\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"manni:tracevals:calibration-labels\",\n \"title\": \"manni tracevals calibration labels\",\n \"description\": \"Ground truth for `manni tracevals calibrate`: what a human decided a given eval should have produced on a given trace. A sidecar rather than an eval field, because a label belongs to a corpus and a reviewer, not to the artifact — and because the eval vocabulary is docmeta's, vendored byte-identical, with `inlineEval` closed to additions (ADR 01010).\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"version\", \"labels\"],\n \"properties\": {\n \"version\": {\n \"const\": 1,\n \"description\": \"Format version. Pinned so a future shape change is an explicit migration rather than a silently-reinterpreted file.\"\n },\n \"labels\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"description\": \"One entry per (trace, artifact, eval) you have judged by hand.\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"trace\", \"artifact\", \"eval\", \"expected\"],\n \"properties\": {\n \"trace\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"Path to the trace file, resolved against this file's own directory — not the working directory.\"\n },\n \"artifact\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"Artifact name as the report shows it: a skill name, a subagent_type, or a project-rules filename such as CLAUDE.md.\"\n },\n \"type\": {\n \"enum\": [\"skill\", \"agent\", \"project-rules\", \"slash-command\"],\n \"description\": \"Optional disambiguator, needed when one name resolves to two kinds of artifact — a skill and an agent, or a skill and the slash command that types it. Every `ArtifactType` the resolver can produce belongs here: a label whose type this rejects has no way to name the artifact it means.\"\n },\n \"eval\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"description\": \"The eval's id. Shorthand entries with no declared id get a positional one (eval-1, eval-2, ...), so labelling those is only as stable as the order they are written in.\"\n },\n \"expected\": {\n \"enum\": [\"pass\", \"fail\", \"needs-review\"],\n \"description\": \"What you decided. `needs-review` means you found it genuinely ambiguous and want the tool to defer too.\"\n },\n \"note\": {\n \"type\": \"string\",\n \"description\": \"Why you decided that. Carried into the disagreement report, where it is the whole reason a disagreement is actionable.\"\n }\n }\n }\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,SAAS,WAAAA,gBAAe;;;ACVxB;AAAA,EACE,SAAW;AAAA,EACX,KAAO;AAAA,EACP,OAAS;AAAA,EACT,aAAe;AAAA,EACf,MAAQ;AAAA,EACR,sBAAwB;AAAA,EACxB,YAAc;AAAA,IACZ,UAAY;AA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