@hawkeyexl/manni 4.21.0 → 4.22.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 (303) hide show
  1. package/README.md +1 -1
  2. package/dist/{batch-C534YIAU.js → batch-C3NN2YXB.js} +20 -21
  3. package/dist/build-CEVEAHN7.js +36 -0
  4. package/dist/calibrate-CSKPY5AK.js +42 -0
  5. package/dist/capture-3HDBIHH6.js +37 -0
  6. package/dist/check-555TCJGF.js +45 -0
  7. package/dist/check-KGJBV42O.js +30 -0
  8. package/dist/{check-JZINDP3F.js → check-KXWHSCCR.js} +13 -16
  9. package/dist/check-MZSXCS2M.js +33 -0
  10. package/dist/{check-LKPQPQWJ.js → check-QNHLTYPN.js} +23 -23
  11. package/dist/{chunk-AE6KBAAU.js → chunk-2VLZDU4E.js} +5 -5
  12. package/dist/{chunk-ARNI3SJT.js → chunk-37Q7WEJJ.js} +9 -9
  13. package/dist/{chunk-PTGXEZQD.js → chunk-3ZVRGBK6.js} +4 -4
  14. package/dist/{chunk-DMVBIIP3.js → chunk-46MMIJWR.js} +3 -3
  15. package/dist/{chunk-CREFJCWZ.js → chunk-4LYVTR2T.js} +4 -4
  16. package/dist/{chunk-BXE4L52Q.js → chunk-562QZKAB.js} +6599 -3508
  17. package/dist/chunk-562QZKAB.js.map +1 -0
  18. package/dist/{chunk-BLXRIAV2.js → chunk-57LZPG4V.js} +29 -4
  19. package/dist/chunk-57LZPG4V.js.map +1 -0
  20. package/dist/{chunk-SHXPE4D4.js → chunk-5LQX57BW.js} +2 -2
  21. package/dist/{chunk-SHXPE4D4.js.map → chunk-5LQX57BW.js.map} +1 -1
  22. package/dist/{chunk-BKY6GAFA.js → chunk-63EQKVNT.js} +45 -910
  23. package/dist/chunk-63EQKVNT.js.map +1 -0
  24. package/dist/{chunk-TFVNEPMF.js → chunk-64DULZIG.js} +4 -4
  25. package/dist/{chunk-2HOWRAWK.js → chunk-6SVHI2U6.js} +2 -2
  26. package/dist/{chunk-D4QHRVDJ.js → chunk-6UHEMPEY.js} +3 -157
  27. package/dist/chunk-6UHEMPEY.js.map +1 -0
  28. package/dist/{chunk-DENZLZ3Z.js → chunk-A5YUK3SG.js} +26 -17
  29. package/dist/chunk-A5YUK3SG.js.map +1 -0
  30. package/dist/{chunk-XI3BNZG4.js → chunk-A67EJ3J6.js} +6 -6
  31. package/dist/{chunk-HHJ2HFPP.js → chunk-BLDL23RY.js} +8 -8
  32. package/dist/{chunk-RQPEKHZH.js → chunk-BY3635RR.js} +80 -16
  33. package/dist/chunk-BY3635RR.js.map +1 -0
  34. package/dist/{chunk-CFMI74TP.js → chunk-BZ74YUYE.js} +2 -2
  35. package/dist/{chunk-5UJKXOAD.js → chunk-CHTSA3YR.js} +6 -6
  36. package/dist/{chunk-FHJIH6XP.js → chunk-CPYQ4BJK.js} +16 -7
  37. package/dist/chunk-CPYQ4BJK.js.map +1 -0
  38. package/dist/{chunk-IN5T22FP.js → chunk-CQTESLC5.js} +2 -2
  39. package/dist/{chunk-245W2Q7C.js → chunk-D4BGNAN5.js} +2 -2
  40. package/dist/{chunk-762MM6NA.js → chunk-E3HYSNS6.js} +4 -4
  41. package/dist/{chunk-DPDG3FHL.js → chunk-EL2KNRC3.js} +3 -3
  42. package/dist/{chunk-LWBNHK72.js → chunk-FTSNG6DZ.js} +42 -24
  43. package/dist/chunk-FTSNG6DZ.js.map +1 -0
  44. package/dist/{chunk-KCWNJMSS.js → chunk-FXE5K56B.js} +3 -3
  45. package/dist/{chunk-CLPC3LKX.js → chunk-HYEKQ22B.js} +4 -4
  46. package/dist/{chunk-VLRIP4BQ.js → chunk-IC3FJWIF.js} +2 -2
  47. package/dist/{chunk-CZIO37J5.js → chunk-IDDRHB7E.js} +3 -3
  48. package/dist/chunk-INOVEO32.js +28 -0
  49. package/dist/chunk-INOVEO32.js.map +1 -0
  50. package/dist/chunk-IXFFVI5S.js +409 -0
  51. package/dist/chunk-IXFFVI5S.js.map +1 -0
  52. package/dist/{chunk-BHGFLRXM.js → chunk-JA7DWOVV.js} +5 -5
  53. package/dist/{chunk-B2242FYO.js → chunk-JF4BC7ZD.js} +38 -3
  54. package/dist/chunk-JF4BC7ZD.js.map +1 -0
  55. package/dist/{chunk-RKACUTY5.js → chunk-JL5FHNQK.js} +9 -11
  56. package/dist/{chunk-RKACUTY5.js.map → chunk-JL5FHNQK.js.map} +1 -1
  57. package/dist/{chunk-MTCOBRCX.js → chunk-JVE5YQN4.js} +4 -4
  58. package/dist/{chunk-6XK3NTL5.js → chunk-K5LBIAOM.js} +32 -38
  59. package/dist/chunk-K5LBIAOM.js.map +1 -0
  60. package/dist/{chunk-E7OG5F6S.js → chunk-KIUFBUUZ.js} +13 -11
  61. package/dist/{chunk-E7OG5F6S.js.map → chunk-KIUFBUUZ.js.map} +1 -1
  62. package/dist/{chunk-Q76T6Y6X.js → chunk-LCMBG4LY.js} +3635 -3409
  63. package/dist/chunk-LCMBG4LY.js.map +1 -0
  64. package/dist/{chunk-BXCVOHEX.js → chunk-LMS2RWDS.js} +15 -13
  65. package/dist/{chunk-BXCVOHEX.js.map → chunk-LMS2RWDS.js.map} +1 -1
  66. package/dist/{chunk-IOJD2RFG.js → chunk-MR5JWMC2.js} +2 -2
  67. package/dist/{chunk-JCTHXG33.js → chunk-NHOGTAPK.js} +2 -2
  68. package/dist/{chunk-VM7VAFJW.js → chunk-NVYDWVXN.js} +2 -1
  69. package/dist/{chunk-NLJ3XIKT.js → chunk-O6IDYZVW.js} +3 -3
  70. package/dist/{chunk-E23KWEPL.js → chunk-OHMLEITS.js} +2 -2
  71. package/dist/{chunk-NUQF5F5J.js → chunk-PNDEKFF3.js} +2 -2
  72. package/dist/{chunk-3SFAB75L.js → chunk-PX7OTUNU.js} +6 -6
  73. package/dist/{chunk-PACZEDOH.js → chunk-Q7FFJMFO.js} +19 -15
  74. package/dist/chunk-Q7FFJMFO.js.map +1 -0
  75. package/dist/{chunk-P7HAXMFN.js → chunk-QJJPTS6L.js} +5 -3
  76. package/dist/{chunk-P7HAXMFN.js.map → chunk-QJJPTS6L.js.map} +1 -1
  77. package/dist/chunk-RAN3CF33.js +1875 -0
  78. package/dist/chunk-RAN3CF33.js.map +1 -0
  79. package/dist/{chunk-H5YWCCBO.js → chunk-S7V4F7HC.js} +3 -3
  80. package/dist/{chunk-R2CR62JV.js → chunk-SCKVDD4E.js} +4 -4
  81. package/dist/{chunk-JUUCCML3.js → chunk-TJYJ4BNK.js} +4 -4
  82. package/dist/{chunk-JQA6RF4R.js → chunk-TR5TNPWT.js} +2 -2
  83. package/dist/{chunk-JQA6RF4R.js.map → chunk-TR5TNPWT.js.map} +1 -1
  84. package/dist/chunk-TT5UDTDM.js +888 -0
  85. package/dist/chunk-TT5UDTDM.js.map +1 -0
  86. package/dist/{chunk-22WGKOQ7.js → chunk-TWYJ2TVS.js} +7 -7
  87. package/dist/{chunk-U4OJ7U45.js → chunk-UQI463L3.js} +9 -9
  88. package/dist/{chunk-A4QNKEX4.js → chunk-V27DOGAO.js} +2 -2
  89. package/dist/{chunk-GMLOAKOA.js → chunk-VSDXZAQU.js} +4 -22
  90. package/dist/chunk-VSDXZAQU.js.map +1 -0
  91. package/dist/{chunk-YSZNJ2ID.js → chunk-VSHMXMBZ.js} +2 -2
  92. package/dist/{chunk-2NGFDLIM.js → chunk-VZSATUI7.js} +4 -4
  93. package/dist/{chunk-KQDRO6N6.js → chunk-W5OZMYMX.js} +2 -2
  94. package/dist/{chunk-XBJKYXOR.js → chunk-WW4JATBJ.js} +6 -6
  95. package/dist/{chunk-SSQZB5SQ.js → chunk-XG6PVB5S.js} +11 -1
  96. package/dist/chunk-XG6PVB5S.js.map +1 -0
  97. package/dist/{chunk-KBSTXL6L.js → chunk-XQKRD5A3.js} +4 -4
  98. package/dist/{chunk-2YKUSTHS.js → chunk-XSP3TUFN.js} +5 -5
  99. package/dist/{chunk-APAF4VWW.js → chunk-XTMONCQE.js} +6 -405
  100. package/dist/chunk-XTMONCQE.js.map +1 -0
  101. package/dist/{chunk-BJUEOC4G.js → chunk-YB3KD5RI.js} +3 -3
  102. package/dist/chunk-ZAOJYN2D.js +159 -0
  103. package/dist/chunk-ZAOJYN2D.js.map +1 -0
  104. package/dist/{chunk-OWJLB2AF.js → chunk-ZKIXGFID.js} +2 -2
  105. package/dist/{chunk-WHVFHBL3.js → chunk-ZT3ERG4B.js} +3 -3
  106. package/dist/chunk-ZTRC37NH.js +38 -0
  107. package/dist/chunk-ZTRC37NH.js.map +1 -0
  108. package/dist/{chunk-V2XJJEEF.js → chunk-ZW4YASUB.js} +4 -4
  109. package/dist/{chunk-5LE4NH3Z.js → chunk-ZX4TOTZS.js} +6 -4
  110. package/dist/{chunk-5LE4NH3Z.js.map → chunk-ZX4TOTZS.js.map} +1 -1
  111. package/dist/{cli-MOKRUHZT.js → cli-4QAH3DBX.js} +9 -11
  112. package/dist/{cli-3PBRPPMQ.js → cli-6476FRBK.js} +16 -19
  113. package/dist/{cli-3PBRPPMQ.js.map → cli-6476FRBK.js.map} +1 -1
  114. package/dist/{cli-FDXU7CGZ.js → cli-7XT7O5YM.js} +16 -19
  115. package/dist/{cli-FDXU7CGZ.js.map → cli-7XT7O5YM.js.map} +1 -1
  116. package/dist/{cli-AVHLY2AI.js → cli-FGCHGJYZ.js} +51 -50
  117. package/dist/cli-FGCHGJYZ.js.map +1 -0
  118. package/dist/{cli-FSDJY5OC.js → cli-JE4LG35H.js} +4 -4
  119. package/dist/{cli-JNYL6LB7.js → cli-U3622DIB.js} +14 -17
  120. package/dist/{cli-JNYL6LB7.js.map → cli-U3622DIB.js.map} +1 -1
  121. package/dist/{cli-MQXOK64K.js → cli-ULHJTJHH.js} +74 -42
  122. package/dist/cli-ULHJTJHH.js.map +1 -0
  123. package/dist/{cli-6NKE6RMT.js → cli-W7B2PNZO.js} +18 -21
  124. package/dist/{cli-6NKE6RMT.js.map → cli-W7B2PNZO.js.map} +1 -1
  125. package/dist/{cli-77A46SB2.js → cli-YGMXZ46V.js} +17 -20
  126. package/dist/{cli-77A46SB2.js.map → cli-YGMXZ46V.js.map} +1 -1
  127. package/dist/{cli-K47XWDLJ.js → cli-YINQL2NI.js} +28 -29
  128. package/dist/{cli-K47XWDLJ.js.map → cli-YINQL2NI.js.map} +1 -1
  129. package/dist/cli-Z3ART5DN.js +152 -0
  130. package/dist/cli-Z3ART5DN.js.map +1 -0
  131. package/dist/cli.js +15 -15
  132. package/dist/cli.js.map +1 -1
  133. package/dist/{config-BMWDC66C.js → config-2YJPJ36T.js} +5 -5
  134. package/dist/docmeta.js +8 -10
  135. package/dist/docmeta.js.map +1 -1
  136. package/dist/github-64ZVAUIT.js +28 -0
  137. package/dist/github-ARGPMQD2.js +32 -0
  138. package/dist/github-YHJABBUI.js +33 -0
  139. package/dist/graph/runtime.js.map +1 -1
  140. package/dist/{host-YSTYO5DX.js → host-JT27OWTC.js} +3 -3
  141. package/dist/index.d.ts +332 -23
  142. package/dist/index.js +218 -205
  143. package/dist/index.js.map +1 -1
  144. package/dist/{json-YIK72XAL.js → json-CVOVXB7O.js} +12 -15
  145. package/dist/json-QNGJFUY2.js +40 -0
  146. package/dist/{labels-X633ZPK7.js → labels-5WOKC3VR.js} +11 -14
  147. package/dist/{labels-X633ZPK7.js.map → labels-5WOKC3VR.js.map} +1 -1
  148. package/dist/lint-OQGB4DWJ.js +32 -0
  149. package/dist/list-EDAB7X5Y.js +30 -0
  150. package/dist/list-OQ3IYV2W.js +37 -0
  151. package/dist/list-PN6JKYNX.js +33 -0
  152. package/dist/{page-OMPEACUN.js → page-TPNMHL27.js} +11 -14
  153. package/dist/{prepare-B4JVDVOV.js → prepare-3V2QYBKL.js} +20 -22
  154. package/dist/{prepare-B4JVDVOV.js.map → prepare-3V2QYBKL.js.map} +1 -1
  155. package/dist/{pretty-PPNHHOEN.js → pretty-EZ2NFU3C.js} +13 -16
  156. package/dist/pretty-HO2LYG5N.js +41 -0
  157. package/dist/{pretty-U7ATCFBN.js → pretty-K3M4AW2D.js} +12 -15
  158. package/dist/{provider-JY2I3VLF.js → provider-YWNTTQPA.js} +3 -3
  159. package/dist/{release-VHHASAG7.js → release-EFLQT3FW.js} +3 -3
  160. package/dist/{reporters-KE7AZR6C.js → reporters-4R2E7PRJ.js} +6 -6
  161. package/dist/{reporters-FAIEOTC4.js → reporters-YVLLFBO5.js} +11 -14
  162. package/dist/run-H4BOR2FR.js +36 -0
  163. package/dist/{sarif-DOGRSGTB.js → sarif-GWHWJJFP.js} +10 -13
  164. package/dist/sarif-SJFVSOBV.js +33 -0
  165. package/dist/sarif-YBFD5OUL.js +28 -0
  166. package/dist/{strategy-EK5VY5DG.js → strategy-T56PH2VK.js} +29 -47
  167. package/dist/strategy-T56PH2VK.js.map +1 -0
  168. package/dist/{term-MDN3NJDW.js → term-33YSMISR.js} +18 -22
  169. package/dist/{term-MDN3NJDW.js.map → term-33YSMISR.js.map} +1 -1
  170. package/dist/{validate-QDYQ642J.js → validate-6R5UBDGU.js} +6 -7
  171. package/package.json +1 -1
  172. package/plugin/manni/.claude-plugin/plugin.json +1 -1
  173. package/plugin/manni/hooks/graph-server.mjs +3 -3
  174. package/plugin/manni/hooks/page-metadata.mjs +81 -7
  175. package/plugin/manni/skills/fix/SKILL.md +3 -3
  176. package/shapes/graph/shapes-1.3.0.ttl +1250 -0
  177. package/dist/build-SVKT7QFU.js +0 -39
  178. package/dist/calibrate-AL3MH7TY.js +0 -43
  179. package/dist/capture-2F7B4DAD.js +0 -39
  180. package/dist/check-BI7OGIVE.js +0 -48
  181. package/dist/check-OPUMZEVK.js +0 -35
  182. package/dist/check-OW7UD73D.js +0 -33
  183. package/dist/chunk-6XK3NTL5.js.map +0 -1
  184. package/dist/chunk-APAF4VWW.js.map +0 -1
  185. package/dist/chunk-B2242FYO.js.map +0 -1
  186. package/dist/chunk-BKY6GAFA.js.map +0 -1
  187. package/dist/chunk-BLXRIAV2.js.map +0 -1
  188. package/dist/chunk-BXE4L52Q.js.map +0 -1
  189. package/dist/chunk-D4QHRVDJ.js.map +0 -1
  190. package/dist/chunk-D5GBYKDU.js +0 -164
  191. package/dist/chunk-D5GBYKDU.js.map +0 -1
  192. package/dist/chunk-DENZLZ3Z.js.map +0 -1
  193. package/dist/chunk-FHJIH6XP.js.map +0 -1
  194. package/dist/chunk-GMLOAKOA.js.map +0 -1
  195. package/dist/chunk-LWBNHK72.js.map +0 -1
  196. package/dist/chunk-PACZEDOH.js.map +0 -1
  197. package/dist/chunk-Q76T6Y6X.js.map +0 -1
  198. package/dist/chunk-RQPEKHZH.js.map +0 -1
  199. package/dist/chunk-RWXR3GJI.js +0 -441
  200. package/dist/chunk-RWXR3GJI.js.map +0 -1
  201. package/dist/chunk-S5G6T4VC.js +0 -3200
  202. package/dist/chunk-S5G6T4VC.js.map +0 -1
  203. package/dist/chunk-SSQZB5SQ.js.map +0 -1
  204. package/dist/chunk-UP6NBQ62.js +0 -2
  205. package/dist/chunk-ZPLVANY2.js +0 -15
  206. package/dist/chunk-ZPLVANY2.js.map +0 -1
  207. package/dist/cli-AVHLY2AI.js.map +0 -1
  208. package/dist/cli-LP5OE3BL.js +0 -84
  209. package/dist/cli-LP5OE3BL.js.map +0 -1
  210. package/dist/cli-MQXOK64K.js.map +0 -1
  211. package/dist/github-6GYTPSGV.js +0 -35
  212. package/dist/github-DJOLVNDD.js +0 -31
  213. package/dist/github-ZF2TQ3RP.js +0 -35
  214. package/dist/json-Y7625EFE.js +0 -42
  215. package/dist/lint-RF3B55W7.js +0 -35
  216. package/dist/list-5DW4QZ7P.js +0 -36
  217. package/dist/list-7CHWJ633.js +0 -39
  218. package/dist/list-UNWG6NPD.js +0 -33
  219. package/dist/pretty-XGYQ25PH.js +0 -43
  220. package/dist/run-MHJ3AYKG.js +0 -39
  221. package/dist/sarif-MIEMQOIK.js +0 -30
  222. package/dist/sarif-RGRG7VFX.js +0 -36
  223. package/dist/strategy-EK5VY5DG.js.map +0 -1
  224. package/dist/validate-QDYQ642J.js.map +0 -1
  225. /package/dist/{batch-C534YIAU.js.map → batch-C3NN2YXB.js.map} +0 -0
  226. /package/dist/{build-SVKT7QFU.js.map → build-CEVEAHN7.js.map} +0 -0
  227. /package/dist/{calibrate-AL3MH7TY.js.map → calibrate-CSKPY5AK.js.map} +0 -0
  228. /package/dist/{capture-2F7B4DAD.js.map → capture-3HDBIHH6.js.map} +0 -0
  229. /package/dist/{check-BI7OGIVE.js.map → check-555TCJGF.js.map} +0 -0
  230. /package/dist/{check-JZINDP3F.js.map → check-KGJBV42O.js.map} +0 -0
  231. /package/dist/{check-OPUMZEVK.js.map → check-KXWHSCCR.js.map} +0 -0
  232. /package/dist/{check-OW7UD73D.js.map → check-MZSXCS2M.js.map} +0 -0
  233. /package/dist/{check-LKPQPQWJ.js.map → check-QNHLTYPN.js.map} +0 -0
  234. /package/dist/{chunk-AE6KBAAU.js.map → chunk-2VLZDU4E.js.map} +0 -0
  235. /package/dist/{chunk-ARNI3SJT.js.map → chunk-37Q7WEJJ.js.map} +0 -0
  236. /package/dist/{chunk-PTGXEZQD.js.map → chunk-3ZVRGBK6.js.map} +0 -0
  237. /package/dist/{chunk-DMVBIIP3.js.map → chunk-46MMIJWR.js.map} +0 -0
  238. /package/dist/{chunk-CREFJCWZ.js.map → chunk-4LYVTR2T.js.map} +0 -0
  239. /package/dist/{chunk-TFVNEPMF.js.map → chunk-64DULZIG.js.map} +0 -0
  240. /package/dist/{chunk-2HOWRAWK.js.map → chunk-6SVHI2U6.js.map} +0 -0
  241. /package/dist/{chunk-XI3BNZG4.js.map → chunk-A67EJ3J6.js.map} +0 -0
  242. /package/dist/{chunk-HHJ2HFPP.js.map → chunk-BLDL23RY.js.map} +0 -0
  243. /package/dist/{chunk-CFMI74TP.js.map → chunk-BZ74YUYE.js.map} +0 -0
  244. /package/dist/{chunk-5UJKXOAD.js.map → chunk-CHTSA3YR.js.map} +0 -0
  245. /package/dist/{chunk-IN5T22FP.js.map → chunk-CQTESLC5.js.map} +0 -0
  246. /package/dist/{chunk-245W2Q7C.js.map → chunk-D4BGNAN5.js.map} +0 -0
  247. /package/dist/{chunk-762MM6NA.js.map → chunk-E3HYSNS6.js.map} +0 -0
  248. /package/dist/{chunk-DPDG3FHL.js.map → chunk-EL2KNRC3.js.map} +0 -0
  249. /package/dist/{chunk-KCWNJMSS.js.map → chunk-FXE5K56B.js.map} +0 -0
  250. /package/dist/{chunk-CLPC3LKX.js.map → chunk-HYEKQ22B.js.map} +0 -0
  251. /package/dist/{chunk-VLRIP4BQ.js.map → chunk-IC3FJWIF.js.map} +0 -0
  252. /package/dist/{chunk-CZIO37J5.js.map → chunk-IDDRHB7E.js.map} +0 -0
  253. /package/dist/{chunk-BHGFLRXM.js.map → chunk-JA7DWOVV.js.map} +0 -0
  254. /package/dist/{chunk-MTCOBRCX.js.map → chunk-JVE5YQN4.js.map} +0 -0
  255. /package/dist/{chunk-IOJD2RFG.js.map → chunk-MR5JWMC2.js.map} +0 -0
  256. /package/dist/{chunk-JCTHXG33.js.map → chunk-NHOGTAPK.js.map} +0 -0
  257. /package/dist/{chunk-VM7VAFJW.js.map → chunk-NVYDWVXN.js.map} +0 -0
  258. /package/dist/{chunk-NLJ3XIKT.js.map → chunk-O6IDYZVW.js.map} +0 -0
  259. /package/dist/{chunk-E23KWEPL.js.map → chunk-OHMLEITS.js.map} +0 -0
  260. /package/dist/{chunk-NUQF5F5J.js.map → chunk-PNDEKFF3.js.map} +0 -0
  261. /package/dist/{chunk-3SFAB75L.js.map → chunk-PX7OTUNU.js.map} +0 -0
  262. /package/dist/{chunk-H5YWCCBO.js.map → chunk-S7V4F7HC.js.map} +0 -0
  263. /package/dist/{chunk-R2CR62JV.js.map → chunk-SCKVDD4E.js.map} +0 -0
  264. /package/dist/{chunk-JUUCCML3.js.map → chunk-TJYJ4BNK.js.map} +0 -0
  265. /package/dist/{chunk-22WGKOQ7.js.map → chunk-TWYJ2TVS.js.map} +0 -0
  266. /package/dist/{chunk-U4OJ7U45.js.map → chunk-UQI463L3.js.map} +0 -0
  267. /package/dist/{chunk-A4QNKEX4.js.map → chunk-V27DOGAO.js.map} +0 -0
  268. /package/dist/{chunk-YSZNJ2ID.js.map → chunk-VSHMXMBZ.js.map} +0 -0
  269. /package/dist/{chunk-2NGFDLIM.js.map → chunk-VZSATUI7.js.map} +0 -0
  270. /package/dist/{chunk-KQDRO6N6.js.map → chunk-W5OZMYMX.js.map} +0 -0
  271. /package/dist/{chunk-XBJKYXOR.js.map → chunk-WW4JATBJ.js.map} +0 -0
  272. /package/dist/{chunk-KBSTXL6L.js.map → chunk-XQKRD5A3.js.map} +0 -0
  273. /package/dist/{chunk-2YKUSTHS.js.map → chunk-XSP3TUFN.js.map} +0 -0
  274. /package/dist/{chunk-BJUEOC4G.js.map → chunk-YB3KD5RI.js.map} +0 -0
  275. /package/dist/{chunk-OWJLB2AF.js.map → chunk-ZKIXGFID.js.map} +0 -0
  276. /package/dist/{chunk-WHVFHBL3.js.map → chunk-ZT3ERG4B.js.map} +0 -0
  277. /package/dist/{chunk-V2XJJEEF.js.map → chunk-ZW4YASUB.js.map} +0 -0
  278. /package/dist/{chunk-UP6NBQ62.js.map → cli-4QAH3DBX.js.map} +0 -0
  279. /package/dist/{cli-FSDJY5OC.js.map → cli-JE4LG35H.js.map} +0 -0
  280. /package/dist/{cli-MOKRUHZT.js.map → config-2YJPJ36T.js.map} +0 -0
  281. /package/dist/{config-BMWDC66C.js.map → github-64ZVAUIT.js.map} +0 -0
  282. /package/dist/{github-6GYTPSGV.js.map → github-ARGPMQD2.js.map} +0 -0
  283. /package/dist/{github-DJOLVNDD.js.map → github-YHJABBUI.js.map} +0 -0
  284. /package/dist/{github-ZF2TQ3RP.js.map → host-JT27OWTC.js.map} +0 -0
  285. /package/dist/{host-YSTYO5DX.js.map → json-CVOVXB7O.js.map} +0 -0
  286. /package/dist/{json-Y7625EFE.js.map → json-QNGJFUY2.js.map} +0 -0
  287. /package/dist/{json-YIK72XAL.js.map → lint-OQGB4DWJ.js.map} +0 -0
  288. /package/dist/{lint-RF3B55W7.js.map → list-EDAB7X5Y.js.map} +0 -0
  289. /package/dist/{list-5DW4QZ7P.js.map → list-OQ3IYV2W.js.map} +0 -0
  290. /package/dist/{list-7CHWJ633.js.map → list-PN6JKYNX.js.map} +0 -0
  291. /package/dist/{list-UNWG6NPD.js.map → page-TPNMHL27.js.map} +0 -0
  292. /package/dist/{page-OMPEACUN.js.map → pretty-EZ2NFU3C.js.map} +0 -0
  293. /package/dist/{pretty-PPNHHOEN.js.map → pretty-HO2LYG5N.js.map} +0 -0
  294. /package/dist/{pretty-U7ATCFBN.js.map → pretty-K3M4AW2D.js.map} +0 -0
  295. /package/dist/{pretty-XGYQ25PH.js.map → provider-YWNTTQPA.js.map} +0 -0
  296. /package/dist/{release-VHHASAG7.js.map → release-EFLQT3FW.js.map} +0 -0
  297. /package/dist/{provider-JY2I3VLF.js.map → reporters-4R2E7PRJ.js.map} +0 -0
  298. /package/dist/{reporters-FAIEOTC4.js.map → reporters-YVLLFBO5.js.map} +0 -0
  299. /package/dist/{reporters-KE7AZR6C.js.map → run-H4BOR2FR.js.map} +0 -0
  300. /package/dist/{run-MHJ3AYKG.js.map → sarif-GWHWJJFP.js.map} +0 -0
  301. /package/dist/{sarif-DOGRSGTB.js.map → sarif-SJFVSOBV.js.map} +0 -0
  302. /package/dist/{sarif-MIEMQOIK.js.map → sarif-YBFD5OUL.js.map} +0 -0
  303. /package/dist/{sarif-RGRG7VFX.js.map → validate-6R5UBDGU.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/tracevals/graders/tool-usage.ts","../src/tracevals/graders/tool-order.ts","../src/tracevals/graders/skill-invoked.ts","../src/tracevals/graders/file-access.ts","../src/tracevals/graders/turn-count.ts","../src/tracevals/graders/cost.ts","../src/tracevals/core/target.ts","../src/tracevals/graders/regex.ts","../src/tracevals/graders/json-output.ts","../src/tracevals/graders/command.ts","../src/tracevals/graders/registry.ts","../src/tracevals/judge/prompt.ts","../src/tracevals/judge/cache.ts","../src/tracevals/judge/trace-judge.ts","../src/tracevals/judge/verdict-schema.json"],"sourcesContent":["/** tool-usage: assert a tool was used / not used / used within count bounds. */\nimport type { TraceGrader } from \"./types.js\";\nimport { evaluateWhen, skippedTrigger, validateWhen } from \"./when.js\";\nimport {\n fail,\n firstError,\n optionalBoolean,\n optionalEnum,\n optionalNumber,\n optionsError,\n orderedBounds,\n pass,\n requiredString,\n skippedWindow,\n windowFor,\n type Options,\n} from \"./util.js\";\n\n/**\n * A criterion that can never pass is as useless as one that can never fail:\n * `expect: not-used` with `min >= 1` demands the tool be both absent and\n * called, and `expect: used` with `max: 0` is the mirror image.\n */\nfunction checkContradiction(options: Options): string | undefined {\n const expect = (options.expect as string | undefined) ?? \"used\";\n const { min, max } = options;\n if (expect === \"not-used\" && typeof min === \"number\" && min > 0) {\n return \"options.min is unsatisfiable with expect: not-used\";\n }\n if (expect === \"used\" && typeof max === \"number\" && max === 0) {\n return \"options.max of 0 is unsatisfiable with expect: used\";\n }\n return undefined;\n}\n\nfunction validateOptions(options: Options): string | undefined {\n return firstError(\n requiredString(options, \"tool\"),\n optionalEnum(options, \"expect\", [\"used\", \"not-used\"]),\n optionalNumber(options, \"min\", { min: 0, integer: true }),\n optionalNumber(options, \"max\", { min: 0, integer: true }),\n orderedBounds(options, \"min\", \"max\"),\n checkContradiction(options),\n optionalBoolean(options, \"includeSidechains\"),\n validateWhen(options),\n );\n}\n\nexport const toolUsageGrader: TraceGrader = {\n kind: \"tool-usage\",\n validateOptions,\n grade({ trace, plan }) {\n const options = plan.options ?? {};\n const invalid = validateOptions(options);\n if (invalid !== undefined) return optionsError(\"tool-usage\", invalid);\n const tool = options.tool as string;\n const expect = (options.expect as string | undefined) ?? \"used\";\n const includeSidechains = options.includeSidechains === true;\n\n // Count only the calls the artifact was governing (ADR 01015).\n const window = windowFor(trace, plan);\n if (window.empty) return skippedWindow(window);\n const trigger = evaluateWhen(options, window);\n if (!trigger.armed) return skippedTrigger(trigger);\n\n // `includeSidechains` asks whether calls from *somebody else's* branch\n // count toward this artifact. Inside an agent's own window there is no\n // such thing: every call in a branch is `sidechain: true`, so honouring\n // the default there emptied the window and made an agent-artifact eval\n // structurally unable to fail — `{tool: Edit, expect: not-used}` on\n // `.claude/agents/reviewer.md` passed however much the reviewer edited.\n // The window *is* the branch, so the branch's calls are the subject.\n // Agent only, deliberately. An agent window *is* a branch, so its calls\n // are the subject. A skill or slash-command window sits on the chain that\n // invoked it, so sidechain calls inside it belong to subagents it spawned\n // — someone else's work, excluded unless asked for. A slash command reached\n // from inside a branch would count nothing by default; that needs a user to\n // type one there, which is not a path the harness offers.\n const branchScoped = window.scope === \"agent\";\n const count = window.toolCalls.filter(\n (c) => c.name === tool && (branchScoped || includeSidechains || !c.sidechain),\n ).length;\n\n if (expect === \"not-used\" && count > 0) {\n return fail(plan, `tool ${tool} was used ${count} time(s) but must not be`);\n }\n if (expect === \"used\" && count === 0 && options.min === undefined) {\n return fail(plan, `tool ${tool} was never used`);\n }\n if (typeof options.min === \"number\" && count < options.min) {\n return fail(\n plan,\n `tool ${tool} was used ${count} time(s); at least ${options.min} required`,\n );\n }\n if (typeof options.max === \"number\" && count > options.max) {\n return fail(\n plan,\n `tool ${tool} was used ${count} time(s); at most ${options.max} allowed`,\n );\n }\n return pass;\n },\n};\n","/**\n * tool-order: assert one tool was used before another.\n *\n * `tool-usage` answers \"did it happen, and how often\". A large share of what\n * an instruction artifact actually asks for is about *sequence*: read before\n * you write, run the tests after you edit, look at the config before changing\n * it. None of that was expressible — an adherence suite could say Read and\n * Write both happened and still miss a session that wrote first and read\n * afterwards to see what it had done.\n *\n * Adopted from `claude plugin eval`'s `tool_order`, including its\n * `{tool, input_match}` shape: \"Read something, then Write to src/\" is a\n * different claim from \"Read anything, then Write anything\", and only the\n * first catches the case where the session read an unrelated file.\n *\n * Semantics are deliberately the weakest useful ones: **some** occurrence of\n * `before` precedes **some** occurrence of `after`. Requiring every `after` to\n * be preceded by a `before` would fail an otherwise adherent session that\n * did the right thing once and then repeated the second half.\n */\nimport type { ToolCall } from \"../trace/types.js\";\nimport type { TraceGrader } from \"./types.js\";\nimport { evaluateWhen, skippedTrigger, validateWhen } from \"./when.js\";\nimport {\n fail,\n firstError,\n optionalBoolean,\n optionalString,\n optionsError,\n pass,\n requiredString,\n skippedWindow,\n windowFor,\n type Options,\n} from \"./util.js\";\n\nfunction validateOptions(options: Options): string | undefined {\n return firstError(\n requiredString(options, \"before\"),\n requiredString(options, \"after\"),\n optionalString(options, \"beforeInputMatch\"),\n optionalString(options, \"afterInputMatch\"),\n optionalBoolean(options, \"includeSidechains\"),\n validateWhen(options),\n // A pattern that will not compile is the eval's bug, not the session's.\n ...([\"beforeInputMatch\", \"afterInputMatch\"] as const).map((key) => {\n const value = options[key];\n if (typeof value !== \"string\") return undefined;\n try {\n new RegExp(value);\n return undefined;\n } catch (err) {\n return `options.${key} is not a valid regular expression (${\n err instanceof Error ? err.message : String(err)\n })`;\n }\n }),\n );\n}\n\n/**\n * Ordinals of the calls matching `tool`, in `trace.events` order.\n *\n * Position in `trace.toolCalls` is deliberately not what this reads. `index`\n * is each call's ordinal in `trace.events` (ADR 01013), and it is the only\n * thing that stays true after the list is filtered — and after sidecar\n * subagent branches are spliced in (ADR 01014), where a branch's calls sit\n * together in the array but interleave in time with the main chain.\n */\nfunction ordinalsOf(\n calls: ToolCall[],\n tool: string,\n inputMatch: string | undefined,\n): number[] {\n const re = inputMatch === undefined ? undefined : new RegExp(inputMatch);\n return calls\n .filter(\n (c) =>\n c.name === tool &&\n (re === undefined || re.test(JSON.stringify(c.input))),\n )\n .map((c) => c.index);\n}\n\nfunction describe(tool: string, inputMatch: string | undefined): string {\n return inputMatch === undefined ? tool : `${tool} matching /${inputMatch}/`;\n}\n\nexport const toolOrderGrader: TraceGrader = {\n kind: \"tool-order\",\n validateOptions,\n grade({ trace, plan }) {\n const options = plan.options ?? {};\n const invalid = validateOptions(options);\n if (invalid !== undefined) return optionsError(\"tool-order\", invalid);\n\n const before = options.before as string;\n const after = options.after as string;\n const beforeMatch = options.beforeInputMatch as string | undefined;\n const afterMatch = options.afterInputMatch as string | undefined;\n const includeSidechains = options.includeSidechains === true;\n\n // Order only the calls the artifact was governing (ADR 01015), as\n // tool-usage counts them. Over the whole session, a call made before the\n // skill was invoked would satisfy a claim the skill never governed.\n const window = windowFor(trace, plan);\n if (window.empty) return skippedWindow(window);\n const trigger = evaluateWhen(options, window);\n if (!trigger.armed) return skippedTrigger(trigger);\n\n // An agent's window is its own branch, so every call in it is the subject\n // even though each one is a sidechain call; tool-usage says why.\n const branchScoped = window.scope === \"agent\";\n const calls = window.toolCalls.filter(\n (c) => branchScoped || includeSidechains || !c.sidechain,\n );\n const beforeOrdinals = ordinalsOf(calls, before, beforeMatch);\n const afterOrdinals = ordinalsOf(calls, after, afterMatch);\n // `undefined` rather than -1: an ordinal of 0 is the session's very first\n // event, and a sentinel that collides with a real position is how an\n // off-by-one becomes a wrong verdict.\n const firstBefore =\n beforeOrdinals.length > 0 ? Math.min(...beforeOrdinals) : undefined;\n const lastAfter =\n afterOrdinals.length > 0 ? Math.max(...afterOrdinals) : undefined;\n\n // Neither happened: the ordering claim has nothing to bite on. That is a\n // pass, not a silent one — a suite that wants the calls to happen at all\n // says so with tool-usage, which is the grader for that question.\n if (firstBefore === undefined && lastAfter === undefined) return pass;\n\n if (lastAfter === undefined) {\n return fail(\n plan,\n `${describe(after, afterMatch)} was never used, so it could not follow ${describe(before, beforeMatch)}`,\n );\n }\n if (firstBefore === undefined) {\n return fail(\n plan,\n `${describe(after, afterMatch)} was used without ${describe(before, beforeMatch)} ever being used first`,\n );\n }\n if (firstBefore > lastAfter) {\n return fail(\n plan,\n `${describe(before, beforeMatch)} was only used after ${describe(after, afterMatch)}`,\n );\n }\n return pass;\n },\n};\n","/** skill-invoked: assert a skill was invoked (or not) during the session. */\nimport type { TraceGrader } from \"./types.js\";\nimport { evaluateWhen, skippedTrigger, validateWhen } from \"./when.js\";\nimport {\n fail,\n firstError,\n optionalEnum,\n optionsError,\n pass,\n requiredString,\n skippedWindow,\n windowFor,\n type Options,\n} from \"./util.js\";\n\nfunction validateOptions(options: Options): string | undefined {\n return firstError(\n requiredString(options, \"skill\"),\n optionalEnum(options, \"expect\", [\"used\", \"not-used\"]),\n validateWhen(options),\n );\n}\n\nexport const skillInvokedGrader: TraceGrader = {\n kind: \"skill-invoked\",\n validateOptions,\n grade({ trace, plan }) {\n const options = plan.options ?? {};\n const invalid = validateOptions(options);\n if (invalid !== undefined) return optionsError(\"skill-invoked\", invalid);\n const skill = options.skill as string;\n const expect = (options.expect as string | undefined) ?? \"used\";\n const window = windowFor(trace, plan);\n // No evidence at all outranks \"the trigger did not fire\", so the empty\n // window is reported first and with its own reason (ADR 01015).\n if (window.empty) return skippedWindow(window);\n // A trigger that never armed has not been satisfied: skipped, never a\n // pass (ADR 01016).\n const trigger = evaluateWhen(options, window);\n if (!trigger.armed) return skippedTrigger(trigger);\n const used = window.skillInvocations.some((s) => s.name === skill);\n\n if (expect === \"used\" && !used) {\n return fail(plan, `skill ${skill} was never invoked`);\n }\n if (expect === \"not-used\" && used) {\n return fail(plan, `skill ${skill} was invoked but must not be`);\n }\n return pass;\n },\n};\n","/** file-access: assert a file was read/written/edited (or not) in the session. */\nimport type { TraceGrader } from \"./types.js\";\nimport { matchesGlob } from \"./glob.js\";\nimport { evaluateWhen, skippedTrigger, validateWhen } from \"./when.js\";\nimport {\n fail,\n firstError,\n optionalEnum,\n optionsError,\n pass,\n requiredString,\n skippedWindow,\n windowFor,\n type Options,\n} from \"./util.js\";\n\n/** Mirrors FileAccess[\"op\"] in the normalized trace model. */\nconst OPS = [\"read\", \"write\", \"edit\"] as const;\n\nfunction validateOptions(options: Options): string | undefined {\n return firstError(\n requiredString(options, \"path\"),\n optionalEnum(options, \"op\", OPS),\n optionalEnum(options, \"expect\", [\"accessed\", \"not-accessed\"]),\n validateWhen(options),\n );\n}\n\n/**\n * Match a spec against an access, through the one matcher `glob.ts` already\n * documents: separators normalized, case folded, **anchored at a path segment\n * boundary**.\n *\n * A plain `endsWith` was neither of the last two: `db/migrations` also matched\n * `.../legacydb/migrations`, which is a different directory, and the eval read\n * as covering a path it had never been pointed at. A literal path carries no\n * glob metacharacters, so compiling it here resolves to exactly the anchored\n * suffix the docs promise — and a spec that *does* carry `*` or `**` now means\n * here what it means in `options.when`, rather than being taken literally.\n */\nfunction matches(accessPath: string, spec: string): boolean {\n return matchesGlob(accessPath, spec);\n}\n\nexport const fileAccessGrader: TraceGrader = {\n kind: \"file-access\",\n validateOptions,\n grade({ trace, plan }) {\n const options = plan.options ?? {};\n const invalid = validateOptions(options);\n if (invalid !== undefined) return optionsError(\"file-access\", invalid);\n const path = options.path as string;\n const op = options.op as string | undefined;\n const expect = (options.expect as string | undefined) ?? \"accessed\";\n\n const window = windowFor(trace, plan);\n if (window.empty) return skippedWindow(window);\n const trigger = evaluateWhen(options, window);\n if (!trigger.armed) return skippedTrigger(trigger);\n const accessed = window.fileAccesses.some(\n (a) => matches(a.path, path) && (op === undefined || a.op === op),\n );\n\n const opLabel = op ?? \"any\";\n if (expect === \"accessed\" && !accessed) {\n return fail(plan, `file ${path} was never accessed (op: ${opLabel})`);\n }\n if (expect === \"not-accessed\" && accessed) {\n return fail(plan, `file ${path} was accessed (op: ${opLabel}) but must not be`);\n }\n return pass;\n },\n};\n","/** turn-count: assert the session stayed within turn bounds. */\nimport type { TraceGrader } from \"./types.js\";\nimport { evaluateWhen, skippedTrigger, validateWhen } from \"./when.js\";\nimport {\n fail,\n firstError,\n optionalNumber,\n optionsError,\n orderedBounds,\n pass,\n requireOneOf,\n skippedWindow,\n windowFor,\n type Options,\n} from \"./util.js\";\n\nfunction validateOptions(options: Options): string | undefined {\n return firstError(\n requireOneOf(options, [\"min\", \"max\"]),\n optionalNumber(options, \"min\", { min: 0, integer: true }),\n optionalNumber(options, \"max\", { min: 0, integer: true }),\n orderedBounds(options, \"min\", \"max\"),\n validateWhen(options),\n );\n}\n\nexport const turnCountGrader: TraceGrader = {\n kind: \"turn-count\",\n validateOptions,\n grade({ trace, plan }) {\n const options = plan.options ?? {};\n const invalid = validateOptions(options);\n if (invalid !== undefined) return optionsError(\"turn-count\", invalid);\n const window = windowFor(trace, plan);\n if (window.empty) return skippedWindow(window);\n const trigger = evaluateWhen(options, window);\n if (!trigger.armed) return skippedTrigger(trigger);\n const { turnCount } = window;\n if (typeof options.max === \"number\" && turnCount > options.max) {\n return fail(plan, `${turnCount} turn(s); at most ${options.max} allowed`);\n }\n if (typeof options.min === \"number\" && turnCount < options.min) {\n return fail(plan, `${turnCount} turn(s); at least ${options.min} required`);\n }\n return pass;\n },\n};\n","/**\n * cost: assert the session stayed within cost/token budgets.\n *\n * Deliberately **not** windowed (ADR 01015). Every other deterministic grader\n * counts events, which are attributable to the artifact that was governing when\n * they happened; tokens are not. Usage is reported per assistant message for\n * the whole context, so charging a slice of it to one skill would be an\n * invented number. `cost` therefore grades the session no matter which artifact\n * declared it — including one whose window is empty, where a session that blew\n * its budget must still fail rather than quietly skip.\n */\nimport type { TraceGrader } from \"./types.js\";\nimport { rejectWhen } from \"./when.js\";\nimport {\n fail,\n firstError,\n optionalNumber,\n optionsError,\n pass,\n requireOneOf,\n type Options,\n} from \"./util.js\";\n\nfunction validateOptions(options: Options): string | undefined {\n return firstError(\n requireOneOf(options, [\"maxUsd\", \"maxTokens\"]),\n optionalNumber(options, \"maxUsd\", { min: 0 }),\n optionalNumber(options, \"maxTokens\", { min: 0 }),\n rejectWhen(\"cost\", options),\n );\n}\n\nexport const costGrader: TraceGrader = {\n kind: \"cost\",\n validateOptions,\n grade({ trace, plan }) {\n const options = plan.options ?? {};\n const invalid = validateOptions(options);\n if (invalid !== undefined) return optionsError(\"cost\", invalid);\n const usage = trace.usage;\n // Each configured budget is evaluated independently: a missing-data skip on\n // one must not suppress the other. Only skip the whole eval when no\n // configured budget could be checked at all.\n const skips: string[] = [];\n let checked = false;\n\n if (typeof options.maxUsd === \"number\") {\n if (usage?.totalCostUsd === undefined) {\n skips.push(\"no cost data (maxUsd not checkable)\");\n } else {\n checked = true;\n if (usage.totalCostUsd > options.maxUsd) {\n return fail(\n plan,\n `session cost $${usage.totalCostUsd.toFixed(4)}; at most $${options.maxUsd} allowed`,\n );\n }\n }\n }\n\n if (typeof options.maxTokens === \"number\") {\n if (usage === undefined) {\n skips.push(\"no usage data (maxTokens not checkable)\");\n } else {\n checked = true;\n const total = usage.inputTokens + usage.outputTokens;\n if (total > options.maxTokens) {\n return fail(\n plan,\n `session used ${total} tokens; at most ${options.maxTokens} allowed`,\n );\n }\n }\n }\n\n if (!checked && skips.length > 0) {\n return {\n findings: [],\n skipped: `trace carries insufficient cost data: ${skips.join(\"; \")}`,\n };\n }\n return pass;\n },\n};\n","/**\n * `target` — which bytes a grader receives.\n *\n * Distinct from `evidence`, which only hints where to look *within* what is\n * graded, and distinct again from the narrowing options individual graders\n * carry. `regex`'s `on: assistant | user | all` picks a **speaker** inside the\n * transcript; `tool-usage`'s `includeSidechains` picks a **scope**. `target`\n * picks the **subject**: the session, its final answer, the files it wrote, or\n * the instruction artifact itself. The three axes compose rather than replace\n * one another.\n *\n * A target that cannot be served is an explicit failure, never a silent\n * substitution: grading the transcript when the author asked for a written\n * file would report a verdict about the wrong bytes, which is worse than no\n * verdict at all.\n */\nimport { readFileSync } from \"node:fs\";\nimport { isAbsolute, relative, resolve, sep } from \"node:path\";\nimport type { Trace } from \"../trace/types.js\";\n\n/** The subject a grader is pointed at. */\nexport type TraceTarget =\n | \"transcript\"\n | \"last-message\"\n | \"files\"\n | \"artifact\"\n | { source: \"file\"; path: string };\n\nexport const DEFAULT_TARGET: TraceTarget = \"transcript\";\n\nexport type TargetResult =\n | { ok: true; text: string; label: string }\n | { ok: false; reason: string };\n\n/** Human-readable name for a target, for messages and report lines. */\nexport function describeTarget(target: TraceTarget | undefined): string {\n const t = target ?? DEFAULT_TARGET;\n return typeof t === \"string\" ? t : `file ${t.path}`;\n}\n\nexport interface TargetContext {\n trace: Trace;\n /** The transcript as the judge would otherwise have seen it. */\n renderedTrace: string;\n /** The instruction artifact this eval came from. */\n artifactContent: string;\n /**\n * Root a relative `{source: file}` target resolves against — the run's\n * project root when one was pinned, else the session's own cwd.\n */\n root: string;\n}\n\n/** Read what `target` selects for this session. */\nexport function readTarget(\n target: TraceTarget | undefined,\n ctx: TargetContext,\n): TargetResult {\n const t = target ?? DEFAULT_TARGET;\n if (t === \"transcript\") {\n return { ok: true, text: ctx.renderedTrace, label: \"transcript\" };\n }\n if (t === \"last-message\") {\n const last = ctx.trace.assistantTexts.at(-1);\n // An empty final message is a fact about the session, not a failure to\n // read it — a run that ended on a tool call genuinely has no final text.\n return { ok: true, text: last ?? \"\", label: \"last-message\" };\n }\n if (t === \"files\") {\n // Paths only, never contents: \"which files did it touch\" is a different\n // question from \"what is in them\", and the second is what a\n // `{source: file}` target is for.\n const paths = [...new Set(ctx.trace.fileAccesses.map((f) => f.path))];\n return { ok: true, text: paths.join(\"\\n\"), label: \"files\" };\n }\n if (t === \"artifact\") {\n return { ok: true, text: ctx.artifactContent, label: \"artifact\" };\n }\n\n if (isAbsolute(t.path)) {\n return {\n ok: false,\n reason: `target file \"${t.path}\" is an absolute path; name it relative to the project root`,\n };\n }\n const abs = resolve(ctx.root, t.path);\n // `startsWith(\"..\")` alone rejects a legitimate file whose name merely\n // begins with two dots — `..rc`, `..config/x` — so the segment has to end\n // there. `isAbsolute` catches the Windows case where the target is on\n // another drive and `relative` cannot express the step at all.\n const rel = relative(ctx.root, abs);\n if (rel === \"..\" || rel.startsWith(`..${sep}`) || isAbsolute(rel)) {\n return {\n ok: false,\n reason: `target file \"${t.path}\" resolves outside the project root`,\n };\n }\n try {\n return { ok: true, text: readFileSync(abs, \"utf8\"), label: `file ${t.path}` };\n } catch (err) {\n const code = (err as NodeJS.ErrnoException).code ?? \"unknown error\";\n return { ok: false, reason: `target file \"${t.path}\" could not be read (${code})` };\n }\n}\n","/** regex: assert a pattern does/doesn't appear in session text. */\nimport type { TraceGrader } from \"./types.js\";\nimport { evaluateWhen, skippedTrigger, validateWhen } from \"./when.js\";\nimport {\n fail,\n firstError,\n optionalEnum,\n optionsError,\n pass,\n requiredString,\n skippedWindow,\n windowFor,\n type Options,\n} from \"./util.js\";\nimport { readTarget } from \"../core/target.js\";\n\n/** Flags are checked alone first, so the message names the actual culprit. */\nfunction checkFlags(options: Options): string | undefined {\n const flags = options.flags;\n if (flags === undefined) return undefined;\n if (typeof flags !== \"string\") return \"options.flags must be a string\";\n try {\n new RegExp(\"\", flags);\n } catch (err) {\n return `options.flags is invalid: ${(err as Error).message}`;\n }\n return undefined;\n}\n\n/**\n * Pattern and flags must be validated *together*, exactly as `grade()` builds\n * them: `a{` is legal on its own but not under the `u` flag, so checking them\n * separately would pass options that then throw at grade time.\n */\nfunction checkPattern(options: Options): string | undefined {\n const required = requiredString(options, \"pattern\");\n if (required !== undefined) return required;\n try {\n new RegExp(\n options.pattern as string,\n (options.flags as string | undefined) ?? \"\",\n );\n } catch (err) {\n return `options.pattern is not a valid regular expression: ${(err as Error).message}`;\n }\n return undefined;\n}\n\nfunction validateOptions(options: Options): string | undefined {\n return firstError(\n checkFlags(options),\n checkPattern(options),\n optionalEnum(options, \"on\", [\"assistant\", \"user\", \"all\"]),\n optionalEnum(options, \"expect\", [\"match\", \"no-match\"]),\n validateWhen(options),\n );\n}\n\nexport const regexGrader: TraceGrader = {\n kind: \"regex\",\n validateOptions,\n grade({ trace, plan, projectRoot }) {\n const options = plan.options ?? {};\n const invalid = validateOptions(options);\n if (invalid !== undefined) return optionsError(\"regex\", invalid);\n const pattern = options.pattern as string;\n const re = new RegExp(pattern, (options.flags as string | undefined) ?? \"\");\n const on = (options.on as string | undefined) ?? \"assistant\";\n const expect = (options.expect as string | undefined) ?? \"match\";\n\n const window = windowFor(trace, plan);\n if (window.empty) return skippedWindow(window);\n const trigger = evaluateWhen(options, window);\n if (!trigger.armed) return skippedTrigger(trigger);\n\n // Two axes that compose rather than compete. `target` picks the *subject*\n // — the session, its final answer, the files it wrote, the artifact — and\n // `on` picks the *speaker* within a transcript. Only the transcript has\n // speakers, so `on` applies there and nowhere else. Both read the window\n // this artifact governed (ADR 01015), never the whole session.\n const target = plan.target ?? \"transcript\";\n let corpus: string[];\n let where: string;\n if (target === \"transcript\") {\n corpus =\n on === \"user\"\n ? window.userMessages\n : on === \"all\"\n ? [...window.userMessages, ...window.assistantTexts]\n : window.assistantTexts;\n where = `${on} text`;\n } else {\n const selected = readTarget(target, {\n trace,\n // Never consulted: `transcript` took the branch above.\n renderedTrace: \"\",\n artifactContent: plan.artifact.content,\n root: projectRoot ?? trace.cwd,\n });\n if (!selected.ok) return optionsError(\"regex\", selected.reason);\n corpus = [selected.text];\n where = selected.label;\n }\n const matched = corpus.some((text) => re.test(text));\n\n if (expect === \"match\" && !matched) {\n return fail(plan, `pattern /${pattern}/ never matched ${where}`);\n }\n if (expect === \"no-match\" && matched) {\n return fail(plan, `pattern /${pattern}/ matched ${where} but must not`);\n }\n return pass;\n },\n};\n","/** json-output: validate the session's final assistant text as JSON. */\nimport { Ajv2020 } from \"ajv/dist/2020.js\";\nimport type { ValidateFunction } from \"ajv\";\nimport type { TraceGrader } from \"./types.js\";\nimport { rejectWhen } from \"./when.js\";\nimport { fail, optionsError, pass } from \"./util.js\";\n\n/**\n * One Ajv instance per compile, keyed by the schema's own text.\n *\n * A shared instance keeps every `$id` it has seen, so a schema declaring one\n * compiles on the first trace and throws `schema with key or id \"…\" already\n * exists` on traces 2..N — erroring every trace after the first in a batch run\n * or a `calibrate` sweep, for a schema that was correct all along. Keying the\n * cache on the schema *content* means an identical schema compiles once and a\n * different one gets a clean registry, which is the property `$id` reuse\n * actually needs.\n */\nconst compiled = new Map<string, ValidateFunction>();\n\nfunction compileSchema(schema: Record<string, unknown>): ValidateFunction {\n const key = JSON.stringify(schema);\n const hit = compiled.get(key);\n if (hit !== undefined) return hit;\n const built = new Ajv2020({ allErrors: true, strict: false }).compile(schema);\n compiled.set(key, built);\n return built;\n}\n\n/**\n * Shape-only. Compiling here as well would double the work for an option set\n * that `grade()` compiles anyway, and a schema that fails to compile is a\n * grade-time `error` with the compiler's own message.\n */\nfunction validateOptions(options: Record<string, unknown>): string | undefined {\n const schema = options.schema;\n if (\n schema === undefined ||\n schema === null ||\n typeof schema !== \"object\" ||\n Array.isArray(schema)\n ) {\n return \"options.schema is required and must be a JSON Schema object\";\n }\n return rejectWhen(\"json-output\", options);\n}\n\nexport const jsonOutputGrader: TraceGrader = {\n kind: \"json-output\",\n validateOptions,\n grade({ trace, plan }) {\n const options = plan.options ?? {};\n const invalid = validateOptions(options);\n if (invalid !== undefined) return optionsError(\"json-output\", invalid);\n const schema = options.schema;\n\n const last = trace.assistantTexts.at(-1);\n if (last === undefined) {\n return fail(plan, \"session produced no assistant text to validate\");\n }\n let data: unknown;\n try {\n data = JSON.parse(last);\n } catch {\n return fail(plan, \"final assistant output is not valid JSON\");\n }\n\n let validate: ValidateFunction;\n try {\n validate = compileSchema(schema as Record<string, unknown>);\n } catch (err) {\n return optionsError(\n \"json-output\",\n `schema failed to compile: ${(err as Error).message}`,\n );\n }\n if (validate(data)) return pass;\n const errors = (validate.errors ?? [])\n .map((e) => `${e.instancePath || \"/\"} ${e.message ?? \"invalid\"}`)\n .join(\"; \");\n return fail(plan, `final assistant output does not match the schema: ${errors}`);\n },\n};\n","/**\n * Command-graded evals: run an executable over the trace and read its exit\n * code (ADR 01011).\n *\n * This grader executes a program named in an artifact's front matter, and\n * artifacts are resolved from the trace's own project tree — so running an\n * eval over someone else's trace can run code that repository declares. That\n * is the documented behavior, not an oversight. The engine runs it only under\n * the `frontmatter-commands` execution grant, which every run holds unless the\n * operator narrows it (proposal 0075). Two properties bound it:\n *\n * - argv is passed as an array with `shell: false`, so nothing in an artifact\n * is ever parsed as shell syntax — no pipes, redirects, or `$(...)`.\n * - `timeout-ms` always has a finite value, so a hung check fails the eval\n * rather than the run.\n *\n * `{trace}` is substituted in every argv element (the artifact-side analog of\n * the page side's `{file}`).\n */\nimport { createHash } from \"node:crypto\";\nimport { realExec } from \"../../shared/exec.js\";\nimport type { GradeResult, TraceGrader, TraceGraderContext } from \"./types.js\";\n\n/** Bounded by default: a check with no stated timeout still cannot hang. */\nexport const DEFAULT_TIMEOUT_MS = 30_000;\n\n/** Enough stderr to diagnose a failure without pasting a log into a report. */\nconst STDERR_LIMIT = 2000;\n\n/**\n * Deliberately no `validateOptions`. This grader takes no `options`: its whole\n * configuration is the entry's own `command` family, whose shape and guard\n * rails the schema already pins. Omitting the hook is also what keeps `fill`\n * from ever proposing a command grader — \"a kind without it cannot be\n * proposed\" is the registry's existing contract (ADR 01004).\n */\nexport const commandGrader: TraceGrader = {\n kind: \"command\",\n\n async grade(ctx: TraceGraderContext): Promise<GradeResult> {\n const { plan, trace } = ctx;\n\n if (!plan.command || plan.command.length === 0) {\n // The schema permits `grader: command` with no command: it is the\n // generation contract's first state, where tooling is expected to write\n // a check script back. This tool generates nothing, and an eval that\n // cannot run must not read as a pass.\n return {\n findings: [],\n error:\n \"command-graded eval has no `command`; add one (or remove the eval) — manni tracevals does not generate check scripts\",\n };\n }\n\n if (plan.generatedAssertionHash !== undefined) {\n // A hash without an assertion is a half write-back: the hash exists to\n // detect that the assertion it was generated from has changed, and with\n // no assertion there is nothing it could be checked against. Reporting\n // it beats hashing the empty string and passing.\n if (plan.assertion === undefined) {\n return {\n findings: [],\n error:\n \"generated-assertion-hash is present but the eval has no assertion, \" +\n \"so the hash cannot be checked against anything; remove the hash or restore the assertion\",\n };\n }\n const actual = createHash(\"sha256\").update(plan.assertion).digest(\"hex\");\n if (actual !== plan.generatedAssertionHash) {\n return {\n findings: [],\n error:\n \"assertion has changed since the command was generated \" +\n `(generated-assertion-hash ${plan.generatedAssertionHash.slice(0, 12)}…, ` +\n `assertion now hashes to ${actual.slice(0, 12)}…); regenerate the command or update the hash`,\n };\n }\n }\n\n const argv = plan.command.map((part) => part.replaceAll(\"{trace}\", trace.file));\n const timeoutMs = plan.timeoutMs ?? DEFAULT_TIMEOUT_MS;\n const successCodes = plan.successExitCodes ?? [0];\n\n const run = await execute(argv, ctx.projectRoot ?? trace.cwd, timeoutMs);\n\n if (run.timedOut) {\n return {\n findings: [],\n error: `command timed out after ${timeoutMs}ms: ${argv.join(\" \")}`,\n };\n }\n if (run.spawnError !== undefined) {\n return { findings: [], error: `could not run command: ${run.spawnError}` };\n }\n if (run.code !== null && successCodes.includes(run.code)) {\n return { findings: [] };\n }\n\n const detail = run.stderr.trim();\n return {\n findings: [\n {\n evalName: plan.evalName,\n artifact: plan.artifact.path,\n severity: plan.severity,\n message:\n `command exited ${run.code ?? \"on a signal\"} ` +\n `(expected ${successCodes.join(\" or \")}). ` +\n \"Redo the session work so the check passes, or fix the command if it is broken.\" +\n (detail ? ` Output: ${detail.slice(0, STDERR_LIMIT)}` : \"\"),\n },\n ],\n };\n },\n};\n\n/**\n * One run of the check, through the family's exec wrapper (`src/shared/exec.ts`),\n * the one `manni docevals` runs its command evals through. It spawns argv as\n * an array without a shell, resolves npm `.cmd` shims on Windows, and settles\n * on the timeout itself rather than waiting for a child that ignores it.\n */\nasync function execute(\n argv: string[],\n cwd: string,\n timeoutMs: number,\n): Promise<Execution> {\n const result = await realExec(argv, { cwd, timeoutMs });\n return {\n code: result.code,\n // Capped here, not merely when printed: a check script can write far more\n // to stderr than a report should carry.\n stderr: result.stderr.slice(0, STDERR_LIMIT),\n timedOut: result.timedOut,\n ...(result.spawnError === undefined ? {} : { spawnError: result.spawnError }),\n };\n}\n\ninterface Execution {\n code: number | null;\n stderr: string;\n timedOut: boolean;\n spawnError?: string;\n}\n","/** Grader registry: static built-ins plus consumer-registered kinds. */\nimport type { TraceGrader } from \"./types.js\";\nimport { toolUsageGrader } from \"./tool-usage.js\";\nimport { toolOrderGrader } from \"./tool-order.js\";\nimport { skillInvokedGrader } from \"./skill-invoked.js\";\nimport { fileAccessGrader } from \"./file-access.js\";\nimport { turnCountGrader } from \"./turn-count.js\";\nimport { costGrader } from \"./cost.js\";\nimport { regexGrader } from \"./regex.js\";\nimport { jsonOutputGrader } from \"./json-output.js\";\nimport { commandGrader } from \"./command.js\";\n\nconst graders = new Map<string, TraceGrader>(\n [\n toolUsageGrader,\n toolOrderGrader,\n skillInvokedGrader,\n fileAccessGrader,\n turnCountGrader,\n costGrader,\n regexGrader,\n jsonOutputGrader,\n commandGrader,\n ].map((g) => [g.kind, g]),\n);\n\n/**\n * The kinds this package ships, frozen before anything can register over them.\n * Plugin loading (ADR 01017) reads it to tell \"a plugin added a kind\" from\n * \"a plugin took over a built-in\" — the second silently changes what every\n * eval declaring that kind means, including evals the plugin's author does not\n * own, so it has to be said out loud.\n */\nexport const BUILTIN_GRADER_KINDS: ReadonlySet<string> = new Set(graders.keys());\n\nexport function registerGrader(grader: TraceGrader): void {\n graders.set(grader.kind, grader);\n}\n\nexport function graderFor(kind: string): TraceGrader | undefined {\n return graders.get(kind);\n}\n\nexport function listGraderKinds(): string[] {\n return [...graders.keys()];\n}\n","/**\n * Judge prompts. PROMPT_VERSION is part of the cache key — bump it on ANY\n * change to the prompts in this file, or stale cached verdicts survive the\n * revision.\n */\nimport type { EvalPlan } from \"../core/plan.js\";\n\n/**\n * 4 — the verdict schema's `$id` became `manni:tracevals:verdict` and the\n * vocabulary moved to artifact-evals proposal.4. The schema is prompt surface,\n * so a cache written before the family rename misses once rather than\n * replaying a verdict formed against the old wording.\n */\nexport const PROMPT_VERSION = 4;\n\nexport const JUDGE_SYSTEM_PROMPT = `You are an adherence judge for AI agent sessions. You are given some evidence from an agent session and one assertion drawn from the instructions the session was operating under — a skill definition, an agent definition, or project rules.\n\nThe evidence is whatever the eval asked to be graded, and its heading says which: usually the session transcript (messages, tool calls, skills used), but it may instead be the session's final message, the list of files it touched, the instruction artifact itself, or one named file. Judge the assertion against what you were actually given.\n\nDecide whether the session adhered to the assertion:\n- \"pass\" only when the session fully satisfied it.\n- \"partial\" when it partly satisfied it.\n- \"fail\" when it violated it or plainly did not do it.\n\nGround every judgment in the graded content: quote or cite the specific part of it — a message, a tool call, a line, or a telling omission — that supports your verdict in the \"observed\" field. If the assertion concerns something the graded content cannot show (e.g. events outside what you were given), say so and lower your confidence.\n\nRespond with a single JSON object matching the provided schema. No prose outside the JSON.`;\n\n/**\n * Cap for the artifact excerpt included alongside the assertion.\n *\n * The prompt says when it truncates, so the judge knows it is reading part of\n * an artifact. What was missing is the *reader* knowing: a verdict formed\n * without sight of an artifact's second half looked identical in every report\n * to one formed with it. `artifactWasTruncated` lets the engine say so.\n */\nexport const MAX_ARTIFACT_CHARS = 8_000;\n\n/** Whether this artifact will be cut before the judge sees it. */\nexport function artifactWasTruncated(content: string): boolean {\n return content.length > MAX_ARTIFACT_CHARS;\n}\n\nexport function buildUserContent(\n plan: EvalPlan,\n graded: string,\n targetLabel = \"transcript\",\n): string {\n const parts: string[] = [];\n parts.push(`# Assertion\\n${plan.assertion ?? \"\"}`);\n if (plan.evidence) {\n parts.push(`# Where to look\\n${plan.evidence}`);\n }\n if (plan.examples?.pass?.length) {\n parts.push(`# Examples of passing behavior\\n- ${plan.examples.pass.join(\"\\n- \")}`);\n }\n if (plan.examples?.fail?.length) {\n parts.push(`# Examples of failing behavior\\n- ${plan.examples.fail.join(\"\\n- \")}`);\n }\n let artifactBody = plan.artifact.content;\n if (artifactBody.length > MAX_ARTIFACT_CHARS) {\n artifactBody = `${artifactBody.slice(0, MAX_ARTIFACT_CHARS)}\\n[... artifact truncated ...]`;\n }\n\n // `target: artifact` makes the source and the graded content the same bytes.\n // Sending them twice under two headings costs tokens and invites the judge\n // to treat them as two documents to reconcile — and it defeats the\n // truncation cap, because the copy under \"graded content\" is not cut.\n const gradingTheArtifact = targetLabel === \"artifact\";\n const artifactHeading = `${plan.artifact.type} (\"${plan.artifact.name}\")`;\n if (!gradingTheArtifact) {\n parts.push(`# Source ${artifactHeading}\\n${artifactBody}`);\n }\n\n // Name what the judge is looking at. Told \"session transcript\" while being\n // handed a written file or a final assistant message, a judge reasons about\n // the wrong thing and says so confidently.\n parts.push(\n targetLabel === \"transcript\"\n ? `# Session transcript\\n${graded}`\n : gradingTheArtifact\n ? `# Graded content: the ${artifactHeading} itself\\n${artifactBody}`\n : `# Graded content (${targetLabel})\\n${graded}`,\n );\n return parts.join(\"\\n\\n\");\n}\n","/**\n * Judge cache key composition. The cache itself is the inference library's\n * `JsonCache`; what stays here is the part only manni tracevals can decide — what\n * invalidates an entry: provider, model, prompt version, run count,\n * temperature, the rendered trace, and the plan.\n */\nimport { JsonCache, buildCacheKey, sha256, type JudgeRun } from \"@hawkeyexl/inference\";\nimport type { EvalPlan } from \"../core/plan.js\";\nimport { PROMPT_VERSION } from \"./prompt.js\";\n\nexport { sha256 };\n\n/**\n * A judge cache that refuses to persist an ensemble containing an errored run\n * (docevals ADR 01038, which found this the hard way and whose reasoning\n * applies here unchanged).\n *\n * The library's `runEnsemble` caches unconditionally — it has no way to know\n * whether an error is a property of the request or of the moment. Here we do:\n * an error is an infrastructure failure (VRAM exhausted, rate limited,\n * connection dropped), never a verdict about the session. Writing one to the\n * cache turns a transient outage into a permanent answer, and `--no-cache`\n * becomes the only way out of a state nothing explains.\n *\n * Reading applies the same predicate, which is what makes the property total\n * rather than merely forward-looking: guarding the write alone cannot heal an\n * entry written before this class existed, and treating such an entry as a\n * miss costs one re-judge and converges. The predicate matches the library's\n * own definition rather than ours, since `computeConsensus` counts a run with\n * no `verdict` as an error vote.\n *\n * Subclassed rather than wrapped because `JsonCache` has private fields, so a\n * structurally identical object does not satisfy its type.\n */\nexport class VerdictCache extends JsonCache<JudgeRun[]> {\n /** An ensemble is cacheable only if every run produced a verdict. */\n private static usable(runs: JudgeRun[]): boolean {\n return runs.every((r) => r.error === undefined && r.verdict !== undefined);\n }\n\n override set(key: string, value: JudgeRun[]): void {\n if (!VerdictCache.usable(value)) return;\n super.set(key, value);\n }\n\n override get(key: string): JudgeRun[] | undefined {\n const hit = super.get(key);\n if (hit === undefined) return undefined;\n return VerdictCache.usable(hit) ? hit : undefined;\n }\n}\n\nexport function cacheKey(\n provider: string,\n model: string,\n runs: number,\n temperature: number,\n renderedTrace: string,\n plan: EvalPlan,\n promptVersion: number = PROMPT_VERSION,\n): string {\n const planFingerprint = JSON.stringify({\n assertion: plan.assertion,\n evidence: plan.evidence,\n examples: plan.examples,\n artifact: plan.artifact.content,\n });\n return buildCacheKey([\n provider,\n model,\n `v${promptVersion}`,\n `r${runs}`,\n `t${temperature}`,\n // Pre-hashed: traces and artifacts are large, and key parts stay short.\n sha256(renderedTrace),\n sha256(planFingerprint),\n ]);\n}\n","/**\n * The trace-adherence ensemble judge: N independent runs per eval plan, each a\n * fresh request with no shared context, aggregated by consensus and routed\n * through confidence zones.\n *\n * The ensemble mechanics (retry-once, errored runs counting against consensus,\n * cache replay) now live in the inference library; what stays here is what is\n * manni tracevals-specific — the per-instance turn budget, the trace-worded\n * verdict schema, and the `JudgedEval` shape the reporters consume.\n */\nimport {\n computeConsensus,\n runEnsemble,\n zoneFor,\n type ConsensusResult,\n type InferenceProvider,\n} from \"@hawkeyexl/inference\";\nimport verdictSchemaJson from \"./verdict-schema.json\" with { type: \"json\" };\nimport type { EvalPlan } from \"../core/plan.js\";\nimport { VerdictCache, cacheKey } from \"./cache.js\";\nimport { turnBudgetSkipReason } from \"../../docevals/judge/budget.js\";\nimport { buildUserContent, JUDGE_SYSTEM_PROMPT } from \"./prompt.js\";\nimport { readTarget, describeTarget } from \"../core/target.js\";\nimport type { Trace } from \"../trace/types.js\";\n\n/**\n * manni tracevals' own verdict wording. Structurally identical to the library's\n * canonical schema, but the field descriptions talk about sessions and tool\n * calls rather than pages — and those descriptions are prompt surface that\n * steers the model, so they are worth keeping (inference ADR 01001).\n */\nconst verdictSchema = verdictSchemaJson as Record<string, unknown>;\n\nexport interface TraceJudgeOptions {\n provider: InferenceProvider;\n /**\n * The provider for an eval that names its own `provider:` or `model:`.\n *\n * The choice is passed through rather than resolved here: precedence across\n * the flag, the eval, `tracevals.provider` and the family's `providers:` is\n * one rule, in `judge/provider.ts`, and a second copy of it inside the judge\n * is how a run and an eval come to disagree about which model answered.\n * Without this hook an eval naming a provider errors rather than being\n * judged silently by the default model — an eval that names a provider is\n * asking for that one.\n */\n providerFor?: (choice: {\n provider?: string;\n model?: string;\n origin?: string;\n }) => Promise<InferenceProvider>;\n /** Ensemble size; default 3. */\n runs?: number;\n /** Default 0; nonzero adds verdict noise. */\n temperature?: number;\n zones?: { autoPass: number; autoFail: number };\n cacheDir?: string;\n noCache?: boolean;\n /**\n * Ensemble runs this judge may spend, over every call of it. `null` or\n * absent is unbounded. A cached ensemble makes no inference call, so it\n * spends none (docevals ADR 01019).\n */\n maxTurns?: number | null;\n}\n\nexport interface JudgedEval {\n evalName: string;\n artifact: string;\n artifactName: string;\n grader: string;\n implicit: boolean;\n outcome: \"pass\" | \"fail\" | \"needs-review\" | \"skipped\" | \"error\";\n consensus?: ConsensusResult;\n skipReason?: string;\n /** Set when the eval could not be judged at all. */\n error?: string;\n /** Set when the judge model also produced what it graded. See EvalResult. */\n selfPreference?: { axis: \"session\" | \"criterion\"; model: string };\n /**\n * Uncached ensemble runs this eval spent. `0` when the ensemble came from\n * cache, when the budget stopped it, and when it never reached a provider.\n */\n turns: number;\n durationMs: number;\n}\n\n/** What the judge needs about the session beyond its rendered form. */\nexport interface TraceJudgeContext {\n /**\n * The parsed session. Supplies `target` selection and the model that\n * produced the run — absent means \"unknown\", which is reported rather than\n * treated as \"not the same model\".\n */\n trace?: Trace;\n /** Root a relative `{source: file}` target resolves against. */\n projectRoot?: string;\n}\n\n/**\n * The digest is requested per plan rather than handed over once: each eval is\n * judged against the window its artifact was governing (ADR 01015), so the\n * transcript differs from eval to eval. `target` then selects within that\n * window, which is why it reads the rendered result rather than the trace.\n *\n * The returned function is callable repeatedly — once per trace in a batch —\n * and `maxTurns` spans every call, because the budget lives on the instance\n * rather than on the call (ADR 01018).\n */\nexport type TraceJudge = (\n plans: EvalPlan[],\n renderFor: (plan: EvalPlan) => string,\n context?: TraceJudgeContext,\n) => Promise<JudgedEval[]>;\n\nexport function makeTraceJudge(options: TraceJudgeOptions): TraceJudge {\n const provider = options.provider;\n // CLI > eval > default. The flag is an explicit operator act (\"run cheap\n // right now\"), so it outranks an eval asking for more agreement; the eval\n // outranks the run default, which is the point of having it.\n const runsFor = (plan: EvalPlan): number => options.runs ?? plan.runs ?? 3;\n const temperature = options.temperature ?? 0;\n const zones = options.zones ?? { autoPass: 0.8, autoFail: 0.8 };\n const cache = new VerdictCache(\n options.cacheDir ?? \".manni/tracevals/cache\",\n options.noCache !== true && options.cacheDir !== undefined,\n \"manni-tracevals\",\n );\n const maxTurns = options.maxTurns ?? null;\n\n // Deliberately outside the returned function: the budget belongs to the\n // *judge instance*, not to one call of it. A batch calls the judge once per\n // trace (ADR 01018), so a per-call counter would make `maxTurns` a cap on\n // the largest trace rather than on the run — 50 traces would spend 50x the\n // configured ceiling and every report would look like it obeyed it. A\n // single-trace run calls the judge exactly once, so this is invisible there.\n let turnsSpent = 0;\n\n return async (plans, renderFor, context) => {\n const trace = context?.trace;\n const sessionModel = trace?.model;\n const results: JudgedEval[] = [];\n\n for (const plan of plans) {\n const start = Date.now();\n const base = {\n evalName: plan.evalName,\n artifact: plan.artifact.path,\n artifactName: plan.artifact.name,\n grader: plan.grader,\n implicit: plan.implicit,\n };\n\n // An eval may name its own provider or model. Resolve it before the\n // budget gate so a typo is reported as the eval's own error rather than\n // hidden behind an exhausted budget.\n //\n // Which provider the pair resolves to is `providerFor`'s to decide, not\n // this loop's: the flag outranks the eval, the eval outranks the config,\n // and that ladder is one rule in `judge/provider.ts`. An eval whose\n // choice resolves to the run's own gets the run's already-constructed\n // provider back.\n let evalProvider = provider;\n if (plan.provider !== undefined || plan.model !== undefined) {\n const resolved = await resolveOverride(plan, options);\n if (\"error\" in resolved) {\n results.push({\n ...base,\n outcome: \"error\",\n error: resolved.error,\n turns: 0,\n durationMs: Date.now() - start,\n });\n continue;\n }\n evalProvider = resolved.provider;\n }\n\n // The window this artifact was governing (ADR 01015). `target` selects\n // within it, so the two compose: a `transcript` target means \"this\n // eval's window\", not \"the whole session\".\n const renderedTrace = renderFor(plan);\n\n // What this eval asked to be graded. A target that cannot be served\n // errors rather than falling back to the transcript: a verdict about the\n // wrong bytes is worse than no verdict.\n // Without a parsed trace only the transcript and the artifact can be\n // served. Saying so beats quietly grading the transcript instead.\n const selected =\n trace === undefined\n ? plan.target === undefined ||\n plan.target === \"transcript\" ||\n plan.target === \"artifact\"\n ? ({\n ok: true as const,\n text:\n plan.target === \"artifact\"\n ? plan.artifact.content\n : renderedTrace,\n label: plan.target === \"artifact\" ? \"artifact\" : \"transcript\",\n })\n : ({\n ok: false as const,\n reason: `target \"${describeTarget(plan.target)}\" needs the parsed session, which this run did not supply`,\n })\n : readTarget(plan.target, {\n trace,\n renderedTrace,\n artifactContent: plan.artifact.content,\n root: context?.projectRoot ?? trace.cwd,\n });\n if (!selected.ok) {\n results.push({\n ...base,\n outcome: \"error\",\n error: selected.reason,\n turns: 0,\n durationMs: Date.now() - start,\n });\n continue;\n }\n\n const runsPerEval = runsFor(plan);\n const key = cacheKey(\n evalProvider.provider(),\n evalProvider.modelName(),\n runsPerEval,\n temperature,\n // The selected bytes, not always the transcript: two targets on one\n // session are two different questions and must not share a verdict.\n selected.text,\n plan,\n );\n const cached = cache.get(key) !== undefined;\n\n // A cached ensemble makes no inference call, so it never touches the\n // budget — a committed cache replays under any cap. For an uncached one\n // the turns are claimed *before* dispatching, which is the whole point\n // of counting turns rather than dollars: the claim is synchronous, so\n // nothing can clear an almost-exhausted budget and then overspend it\n // (docevals ADR 01019).\n if (maxTurns !== null && !cached) {\n if (turnsSpent + runsPerEval > maxTurns) {\n results.push({\n ...base,\n outcome: \"skipped\",\n skipReason: turnBudgetSkipReason(maxTurns),\n turns: 0,\n durationMs: 0,\n });\n continue;\n }\n // One turn per ensemble run. A run can make a second provider call\n // when the first response fails schema validation (the inference layer\n // retries once), so this is a floor on calls, not an exact count — the\n // cap is exact in *runs*, which is the unit the ensemble is\n // configured in.\n turnsSpent += runsPerEval;\n }\n\n const runs = await runEnsemble({\n provider: evalProvider,\n system: JUDGE_SYSTEM_PROMPT,\n user: buildUserContent(plan, selected.text, selected.label),\n runs: runsPerEval,\n temperature,\n schema: verdictSchema,\n cache,\n cacheKey: key,\n label: \"manni-tracevals\",\n });\n\n const consensusBase = computeConsensus(runs);\n const zone = zoneFor(consensusBase, zones);\n const consensus: ConsensusResult = { ...consensusBase, zone };\n\n // Compared against the model that actually judged this eval, not the\n // run's default: an eval that names its own model is exactly the case a\n // run-wide check would miss.\n const judgeModel = evalProvider.modelName();\n // Two distinct biases, and the session axis is reported first because\n // its remedy is the stronger one. Judging your own session is bias about\n // the behavior under test; judging your own assertion is bias about the\n // yardstick — the fix there is a human confirming the criterion, not a\n // second model, since another model would still grade the same wording.\n const selfPreference =\n sessionModel !== undefined && sessionModel === judgeModel\n ? ({ axis: \"session\", model: judgeModel } as const)\n : plan.proposedBy?.includes(judgeModel) === true\n ? ({ axis: \"criterion\", model: judgeModel } as const)\n : undefined;\n\n results.push({\n ...base,\n outcome:\n zone === \"auto-pass\"\n ? \"pass\"\n : zone === \"auto-fail\"\n ? \"fail\"\n : \"needs-review\",\n consensus,\n turns: cached ? 0 : runsPerEval,\n ...(selfPreference ? { selfPreference } : {}),\n durationMs: Date.now() - start,\n });\n }\n return results;\n };\n}\n\n/**\n * Build the provider an eval named, or say why it could not be built. Kept\n * out of the loop so the failure is one shape: never a throw that costs the\n * report every other verdict, never a silent fall back to the default model.\n */\nasync function resolveOverride(\n plan: EvalPlan,\n options: TraceJudgeOptions,\n): Promise<{ provider: InferenceProvider } | { error: string }> {\n // Either half is enough to need a different instance, so the message names\n // whichever the eval actually wrote.\n const named =\n plan.provider !== undefined\n ? `provider \"${plan.provider}\"`\n : `model \"${plan.model ?? \"\"}\"`;\n if (options.providerFor === undefined) {\n return {\n error: `eval names ${named}, but this run cannot construct providers by name`,\n };\n }\n try {\n // The origin a `--local` notice names. The caller knows the artifact; the\n // eval's own id is what tells one line of it from another.\n return {\n provider: await options.providerFor({\n ...(plan.provider !== undefined ? { provider: plan.provider } : {}),\n ...(plan.model !== undefined ? { model: plan.model } : {}),\n origin: `eval \"${plan.evalName}\" in ${plan.artifact.path}`,\n }),\n };\n } catch (err) {\n return {\n error: `could not construct ${named}${\n plan.provider === undefined || plan.model === undefined\n ? \"\"\n : ` at model \"${plan.model}\"`\n } for this eval: ${err instanceof Error ? err.message : String(err)}`,\n };\n }\n}\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"manni:tracevals:verdict\",\n \"title\": \"manni tracevals judge verdict\",\n \"type\": \"object\",\n \"required\": [\"claim\", \"observed\", \"match\", \"confidence\", \"reasoning\"],\n \"properties\": {\n \"claim\": {\n \"type\": \"string\",\n \"description\": \"The specific instruction or assertion under evaluation.\"\n },\n \"observed\": {\n \"type\": \"string\",\n \"description\": \"What actually happened in the session, citing specific messages, tool calls, or instructions followed/violated.\"\n },\n \"match\": {\n \"enum\": [\"pass\", \"fail\", \"partial\"],\n \"description\": \"pass only if the session fully adhered; partial for partial adherence.\"\n },\n \"confidence\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"maximum\": 1,\n \"description\": \"Self-reported confidence in this verdict.\"\n },\n \"reasoning\": {\n \"type\": \"string\",\n \"description\": \"Why this conclusion was reached.\"\n }\n },\n \"additionalProperties\": false\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,SAAS,mBAAmB,SAAsC;AAChE,QAAM,SAAU,QAAQ,UAAiC;AACzD,QAAM,EAAE,KAAK,IAAI,IAAI;AACrB,MAAI,WAAW,cAAc,OAAO,QAAQ,YAAY,MAAM,GAAG;AAC/D,WAAO;AAAA,EACT;AACA,MAAI,WAAW,UAAU,OAAO,QAAQ,YAAY,QAAQ,GAAG;AAC7D,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEA,SAAS,gBAAgB,SAAsC;AAC7D,SAAO;AAAA,IACL,e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,SACA,SAAS,cACP,SACA;AAAA,QACR;AAAA,QACA,OAAO,SAAS,IAAI;AAAA,QACpB,GAAI,iBAAiB,EAAE,eAAe,IAAI,CAAC;AAAA,QAC3C,YAAY,KAAK,IAAI,IAAI;AAAA,MAC3B,CAAC;AAAA,IACH;AACA,WAAO;AAAA,EACT;AACF;AAOA,eAAe,gBACb,MACA,SAC8D;AAG9D,QAAM,QACJ,KAAK,aAAa,SACd,aAAa,KAAK,QAAQ,MAC1B,UAAU,KAAK,SAAS,EAAE;AAChC,MAAI,QAAQ,gBAAgB,QAAW;AACrC,WAAO;AAAA,MACL,OAAO,cAAc,KAAK;AAAA,IAC5B;AAAA,EACF;AACA,MAAI;AAGF,WAAO;AAAA,MACL,UAAU,MAAM,QAAQ,YAAY;AAAA,QAClC,GAAI,KAAK,aAAa,SAAY,EAAE,UAAU,KAAK,SAAS,IAAI,CAAC;AAAA,QACjE,GAAI,KAAK,UAAU,SAAY,EAAE,OAAO,KAAK,MAAM,IAAI,CAAC;AAAA,QACxD,QAAQ,SAAS,KAAK,QAAQ,QAAQ,KAAK,SAAS,IAAI;AAAA,MAC1D,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAK;AACZ,WAAO;AAAA,MACL,OAAO,uBAAuB,KAAK,GACjC,KAAK,aAAa,UAAa,KAAK,UAAU,SAC1C,KACA,cAAc,KAAK,KAAK,GAC9B,mBAAmB,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC;AAAA,IACrE;AAAA,EACF;AACF;","names":["validateOptions","validateOptions","validateOptions","validateOptions","validateOptions","validateOptions","validateOptions"]}
@@ -19,10 +19,10 @@ import {
19
19
  sha256,
20
20
  splitBody,
21
21
  urlManifestRefusal
22
- } from "./chunk-PACZEDOH.js";
22
+ } from "./chunk-Q7FFJMFO.js";
23
23
  import {
24
24
  turnBudgetSkipReason
25
- } from "./chunk-SSQZB5SQ.js";
25
+ } from "./chunk-XG6PVB5S.js";
26
26
  import {
27
27
  isExecutionGrant,
28
28
  unknownGrantsMessage
@@ -33,7 +33,7 @@ import {
33
33
  import {
34
34
  externalWriteWarnings,
35
35
  offerExternalHomes
36
- } from "./chunk-D5GBYKDU.js";
36
+ } from "./chunk-LCMBG4LY.js";
37
37
  import {
38
38
  LOCATION_KEYWORD,
39
39
  Validator,
@@ -41,10 +41,10 @@ import {
41
41
  readManifestOrEmpty,
42
42
  readManifestValue,
43
43
  spliceManifestValue
44
- } from "./chunk-BXE4L52Q.js";
44
+ } from "./chunk-562QZKAB.js";
45
45
  import {
46
46
  writeFileAtomic
47
- } from "./chunk-BJUEOC4G.js";
47
+ } from "./chunk-YB3KD5RI.js";
48
48
  import {
49
49
  noticeOnce,
50
50
  warn
@@ -57,7 +57,7 @@ import {
57
57
  providerSpecFor,
58
58
  resolveIdentity,
59
59
  selectProvider
60
- } from "./chunk-VM7VAFJW.js";
60
+ } from "./chunk-NVYDWVXN.js";
61
61
  import {
62
62
  errorMessage
63
63
  } from "./chunk-G3T47CFV.js";
@@ -1041,4 +1041,4 @@ export {
1041
1041
  makeGenerateScripts,
1042
1042
  runRun
1043
1043
  };
1044
- //# sourceMappingURL=chunk-22WGKOQ7.js.map
1044
+ //# sourceMappingURL=chunk-TWYJ2TVS.js.map
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  reencryptCitationEntries,
4
4
  reencryptCitations
5
- } from "./chunk-HHJ2HFPP.js";
5
+ } from "./chunk-BLDL23RY.js";
6
6
  import {
7
7
  ManifestSet
8
- } from "./chunk-ARNI3SJT.js";
8
+ } from "./chunk-37Q7WEJJ.js";
9
9
  import {
10
10
  DEFAULT_CITE_BASELINE_PATH,
11
11
  GIT_UNAVAILABLE_HISTORY,
@@ -14,15 +14,15 @@ import {
14
14
  gitClient,
15
15
  loadCitationSidecars,
16
16
  parseCiteConfig
17
- } from "./chunk-XI3BNZG4.js";
17
+ } from "./chunk-A67EJ3J6.js";
18
18
  import {
19
19
  readPage,
20
20
  sourceRange
21
- } from "./chunk-TFVNEPMF.js";
21
+ } from "./chunk-64DULZIG.js";
22
22
  import {
23
23
  reencryptData,
24
24
  reencryptMetadata
25
- } from "./chunk-2NGFDLIM.js";
25
+ } from "./chunk-VZSATUI7.js";
26
26
  import {
27
27
  ENCRYPTION_KEY_ENV,
28
28
  PATH_JOIN,
@@ -34,7 +34,7 @@ import {
34
34
  resolveEncryptionKey,
35
35
  spliceManifestValue,
36
36
  writeEncryptionKey
37
- } from "./chunk-BXE4L52Q.js";
37
+ } from "./chunk-562QZKAB.js";
38
38
  import {
39
39
  LEGACY_CONFIG_NAMES,
40
40
  STDIN_TOKEN,
@@ -45,7 +45,7 @@ import {
45
45
  resolveTargetSet,
46
46
  supportedExtensions,
47
47
  writeFileAtomic
48
- } from "./chunk-BJUEOC4G.js";
48
+ } from "./chunk-YB3KD5RI.js";
49
49
  import {
50
50
  findConfigFile,
51
51
  findFamilyConfigFile,
@@ -59,7 +59,7 @@ import {
59
59
  readConfigFile,
60
60
  readFamilyConfigFile,
61
61
  selectCollections
62
- } from "./chunk-B2242FYO.js";
62
+ } from "./chunk-JF4BC7ZD.js";
63
63
  import {
64
64
  ToolError
65
65
  } from "./chunk-G3T47CFV.js";
@@ -546,4 +546,4 @@ export {
546
546
  runKeyRotate,
547
547
  runKeySet
548
548
  };
549
- //# sourceMappingURL=chunk-U4OJ7U45.js.map
549
+ //# sourceMappingURL=chunk-UQI463L3.js.map
@@ -4,7 +4,7 @@ import {
4
4
  isMultilingual,
5
5
  languageOf,
6
6
  plural
7
- } from "./chunk-2YKUSTHS.js";
7
+ } from "./chunk-XSP3TUFN.js";
8
8
  import {
9
9
  TERM_AUX_FIELDS,
10
10
  TERM_DESIGNATION_FIELDS,
@@ -342,4 +342,4 @@ export {
342
342
  renderValeWiring,
343
343
  renderFormatsPretty
344
344
  };
345
- //# sourceMappingURL=chunk-A4QNKEX4.js.map
345
+ //# sourceMappingURL=chunk-V27DOGAO.js.map
@@ -1,21 +1,7 @@
1
1
  #!/usr/bin/env node
2
-
3
- // src/strategy/types.ts
4
- var RECORD_TYPES = ["audience", "persona", "journey"];
5
- var PAGE_FIELDS = { audience: "audiences", persona: "personas", journey: "journeys" };
6
- var PARENTS = { persona: "audience", journey: "personas" };
7
- var STRATEGY_RULES = [
8
- "undefined-reference",
9
- "duplicate-id",
10
- "missing-parent",
11
- "orphan-record",
12
- "unserved-journey",
13
- "unused-record",
14
- "broken-step",
15
- "stale-step",
16
- "missing-journey",
17
- "unwritten-step"
18
- ];
2
+ import {
3
+ STRATEGY_RULES
4
+ } from "./chunk-INOVEO32.js";
19
5
 
20
6
  // src/strategy/core/severity.ts
21
7
  var RULE_ID_PREFIX = "manni:strategy";
@@ -58,14 +44,10 @@ function resolveSeverity(overrides) {
58
44
  }
59
45
 
60
46
  export {
61
- RECORD_TYPES,
62
- PAGE_FIELDS,
63
- PARENTS,
64
- STRATEGY_RULES,
65
47
  RULE_ID_PREFIX,
66
48
  guidanceFor,
67
49
  ruleId,
68
50
  isStrategyRule,
69
51
  resolveSeverity
70
52
  };
71
- //# sourceMappingURL=chunk-GMLOAKOA.js.map
53
+ //# sourceMappingURL=chunk-VSDXZAQU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/strategy/core/severity.ts"],"sourcesContent":["/** Rule ids, default levels and guidance for `strategy check` (proposal 0102). */\nimport type { Guidance } from \"../../shared/guidance.js\";\nimport { STRATEGY_RULES, type StrategyRule, type StrategySeverity } from \"../types.js\";\n\nexport const RULE_ID_PREFIX = \"manni:strategy\";\n\nexport const DEFAULT_SEVERITY: Readonly<Record<StrategyRule, StrategySeverity>> = {\n \"undefined-reference\": \"error\",\n \"duplicate-id\": \"error\",\n \"missing-parent\": \"warning\",\n \"orphan-record\": \"warning\",\n \"unserved-journey\": \"warning\",\n \"unused-record\": \"notice\",\n \"broken-step\": \"error\",\n \"stale-step\": \"warning\",\n \"missing-journey\": \"warning\",\n \"unwritten-step\": \"notice\",\n};\n\n/** The rules reference, whose sections are anchored by rule name. */\nexport const RULES_URI = \"https://hawkeyexl.github.io/manni/strategy/reference/rules/\";\n\n/**\n * When each rule fires, for the person who fixes it. The rules page's \"Fires\n * when\" column says the same, and a test holds the two equal.\n */\nexport const RULE_DESCRIPTIONS: Readonly<Record<StrategyRule, string>> = {\n \"undefined-reference\":\n \"A page's audiences:, personas: or journeys:, or a record's audience: or personas:, names no record of that type.\",\n \"duplicate-id\": \"Two records share an id, ignoring case.\",\n \"missing-parent\":\n \"A page names a journey but none of its personas in personas:, or a persona but not its audience in audiences:.\",\n \"orphan-record\":\n \"A persona names no audience, or a journey names no persona, while the set holds records of the parent type.\",\n \"unserved-journey\":\n \"No page names the journey in journeys:. Records do not count, and a draft or archived journey is exempt.\",\n \"unused-record\": \"No page and no record names an audience or a persona.\",\n \"broken-step\":\n \"A step's doc names no page, or a step says exists: true or partial and has no doc. A step with exists: false is exempt.\",\n \"stale-step\": \"A step says exists: false, and its doc names a page.\",\n \"missing-journey\": \"A step's page does not name the journey in journeys:.\",\n \"unwritten-step\": \"A step says exists: false, or has no doc.\",\n};\n\nexport function guidanceFor(rule: StrategyRule): Guidance {\n return { id: RULE_ID_PREFIX, rule, description: RULE_DESCRIPTIONS[rule], guide: `${RULES_URI}#${rule}` };\n}\n\nexport function ruleId(rule: StrategyRule): string {\n return `${RULE_ID_PREFIX}/${rule}`;\n}\n\nexport function isStrategyRule(value: string): value is StrategyRule {\n return (STRATEGY_RULES as readonly string[]).includes(value);\n}\n\n/** The defaults with config's overrides laid over them. */\nexport function resolveSeverity(\n overrides?: Partial<Record<StrategyRule, StrategySeverity>>,\n): Record<StrategyRule, StrategySeverity> {\n return { ...DEFAULT_SEVERITY, ...overrides };\n}\n"],"mappings":";;;;;;AAIO,IAAM,iBAAiB;AAEvB,IAAM,mBAAqE;AAAA,EAChF,uBAAuB;AAAA,EACvB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,kBAAkB;AACpB;AAGO,IAAM,YAAY;AAMlB,IAAM,oBAA4D;AAAA,EACvE,uBACE;AAAA,EACF,gBAAgB;AAAA,EAChB,kBACE;AAAA,EACF,iBACE;AAAA,EACF,oBACE;AAAA,EACF,iBAAiB;AAAA,EACjB,eACE;AAAA,EACF,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,kBAAkB;AACpB;AAEO,SAAS,YAAY,MAA8B;AACxD,SAAO,EAAE,IAAI,gBAAgB,MAAM,aAAa,kBAAkB,IAAI,GAAG,OAAO,GAAG,SAAS,IAAI,IAAI,GAAG;AACzG;AAEO,SAAS,OAAO,MAA4B;AACjD,SAAO,GAAG,cAAc,IAAI,IAAI;AAClC;AAEO,SAAS,eAAe,OAAsC;AACnE,SAAQ,eAAqC,SAAS,KAAK;AAC7D;AAGO,SAAS,gBACd,WACwC;AACxC,SAAO,EAAE,GAAG,kBAAkB,GAAG,UAAU;AAC7C;","names":[]}
@@ -8,7 +8,7 @@ import {
8
8
  resolvePages,
9
9
  runConfigOptions,
10
10
  withExternalMetadata
11
- } from "./chunk-PACZEDOH.js";
11
+ } from "./chunk-Q7FFJMFO.js";
12
12
  import {
13
13
  SUMMARY_FORMATS,
14
14
  parseFormat
@@ -94,4 +94,4 @@ export {
94
94
  runList,
95
95
  renderList
96
96
  };
97
- //# sourceMappingURL=chunk-YSZNJ2ID.js.map
97
+ //# sourceMappingURL=chunk-VSHMXMBZ.js.map
@@ -2,19 +2,19 @@
2
2
  import {
3
3
  META_CONTEXT,
4
4
  withValueAt
5
- } from "./chunk-BXE4L52Q.js";
5
+ } from "./chunk-562QZKAB.js";
6
6
  import {
7
7
  DocmetaError,
8
8
  escapePointerSegment,
9
9
  extractorByName,
10
10
  extractorForExtension,
11
11
  supportedExtensions
12
- } from "./chunk-BJUEOC4G.js";
12
+ } from "./chunk-YB3KD5RI.js";
13
13
  import {
14
14
  decryptValue,
15
15
  encryptValue,
16
16
  isEncryptedValue
17
- } from "./chunk-B2242FYO.js";
17
+ } from "./chunk-JF4BC7ZD.js";
18
18
  import {
19
19
  errorMessage
20
20
  } from "./chunk-G3T47CFV.js";
@@ -121,4 +121,4 @@ export {
121
121
  reencryptMetadata,
122
122
  reencryptData
123
123
  };
124
- //# sourceMappingURL=chunk-2NGFDLIM.js.map
124
+ //# sourceMappingURL=chunk-VZSATUI7.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  displayPath
4
- } from "./chunk-2YKUSTHS.js";
4
+ } from "./chunk-XSP3TUFN.js";
5
5
  import {
6
6
  escapeWorkflowCommandMessage,
7
7
  escapeWorkflowCommandProperty,
@@ -22,4 +22,4 @@ function renderFindingsGithub(report) {
22
22
  export {
23
23
  renderFindingsGithub
24
24
  };
25
- //# sourceMappingURL=chunk-KQDRO6N6.js.map
25
+ //# sourceMappingURL=chunk-W5OZMYMX.js.map
@@ -18,7 +18,7 @@ import {
18
18
  renderQuestionSummary,
19
19
  storeToQuads,
20
20
  validateGraph
21
- } from "./chunk-LWBNHK72.js";
21
+ } from "./chunk-FTSNG6DZ.js";
22
22
  import {
23
23
  GraphIndex,
24
24
  IMPACT_DEPTH,
@@ -29,13 +29,13 @@ import {
29
29
  parseChunksManifest,
30
30
  retrieve,
31
31
  walkPassages
32
- } from "./chunk-NLJ3XIKT.js";
32
+ } from "./chunk-O6IDYZVW.js";
33
33
  import {
34
34
  GraphError,
35
35
  PREFIXES,
36
36
  documentBase,
37
37
  loadRunConfig
38
- } from "./chunk-FHJIH6XP.js";
38
+ } from "./chunk-CPYQ4BJK.js";
39
39
  import {
40
40
  URI_BASE_ID,
41
41
  artifactLocation,
@@ -44,7 +44,7 @@ import {
44
44
  } from "./chunk-GLP5PSXB.js";
45
45
  import {
46
46
  integrityOf
47
- } from "./chunk-BJUEOC4G.js";
47
+ } from "./chunk-YB3KD5RI.js";
48
48
  import {
49
49
  escapeWorkflowCommandMessage,
50
50
  escapeWorkflowCommandProperty,
@@ -55,7 +55,7 @@ import {
55
55
  } from "./chunk-RNVYGWIC.js";
56
56
  import {
57
57
  package_default
58
- } from "./chunk-JQA6RF4R.js";
58
+ } from "./chunk-TR5TNPWT.js";
59
59
  import {
60
60
  errorMessage
61
61
  } from "./chunk-G3T47CFV.js";
@@ -542,4 +542,4 @@ export {
542
542
  runCheck,
543
543
  renderCheck
544
544
  };
545
- //# sourceMappingURL=chunk-XBJKYXOR.js.map
545
+ //# sourceMappingURL=chunk-WW4JATBJ.js.map
@@ -1,5 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ // src/shared/exec.ts
4
+ import { realExec } from "@hawkeyexl/inference";
5
+ function outputTail(result, maxChars = 400) {
6
+ const text = (result.stderr.trim() || result.stdout.trim()).trim();
7
+ if (text.length <= maxChars) return text;
8
+ return `\u2026${text.slice(-maxChars)}`;
9
+ }
10
+
3
11
  // src/docevals/judge/budget.ts
4
12
  var TURN_BUDGET_SKIP = "turn budget";
5
13
  function turnBudgetSkipReason(maxTurns) {
@@ -10,8 +18,10 @@ function isTurnBudgetSkip(reason) {
10
18
  }
11
19
 
12
20
  export {
21
+ outputTail,
22
+ realExec,
13
23
  TURN_BUDGET_SKIP,
14
24
  turnBudgetSkipReason,
15
25
  isTurnBudgetSkip
16
26
  };
17
- //# sourceMappingURL=chunk-SSQZB5SQ.js.map
27
+ //# sourceMappingURL=chunk-XG6PVB5S.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shared/exec.ts","../src/docevals/judge/budget.ts"],"sourcesContent":["/**\n * Process execution for every grader in the family that runs a program. The\n * implementation lives in `@hawkeyexl/inference`: the judge's subprocess\n * provider and the command graders were running copies of the same\n * cross-spawn wrapper, and the Windows-specific parts (npm `.cmd` shim\n * resolution without `shell: true`, stdin piping past the ~32K command-line\n * limit, and StringDecoder-backed output so multi-byte UTF-8 survives chunk\n * boundaries) are exactly the parts worth having in one place.\n *\n * Shared rather than per domain: `manni docevals` and `manni tracevals` both\n * run `command` evals, and both reach the OS through this one wrapper.\n */\nimport type { ExecResult } from \"@hawkeyexl/inference\";\n\nexport { realExec } from \"@hawkeyexl/inference\";\n\n/** Truncate command output for finding messages. */\nexport function outputTail(result: ExecResult, maxChars = 400): string {\n const text = (result.stderr.trim() || result.stdout.trim()).trim();\n if (text.length <= maxChars) return text;\n return `…${text.slice(-maxChars)}`;\n}\n\n/**\n * How a finished process is described in a finding: \"exited 2\", or the truth\n * when there was no exit code.\n *\n * `code` is null when the process was killed by a signal rather than exiting.\n * \"exited null\" describes nothing a reader can act on, and it is the case a\n * timeout produces — so it is the one worth naming.\n */\nexport function exited(code: number | null): string {\n return code === null ? \"was killed before exiting\" : `exited ${code}`;\n}\n","/**\n * The turn-budget skip marker (ADR 01019), in one place.\n *\n * `judge.ts` produces the skip reason; `core/engine.ts` and `commands/\n * calibrate.ts` both have to tell a budget truncation apart from every other\n * reason an eval went unjudged, because that distinction is what stops a\n * partial run from reporting as a complete one. They did it by matching the\n * bare substring `\"turn budget\"` against a message written in a third file,\n * so a reword in the producer would have left both detectors matching nothing\n * — silently, since the tests that exercise truncation supply the skip reason\n * themselves rather than getting it from the judge.\n *\n * Kept in its own module rather than exported from `judge.ts`: the detectors\n * need the marker, not the judge, and `engine.ts` deliberately takes the judge\n * by injection.\n */\n\n/** The substring every budget-truncation skip reason carries. */\nexport const TURN_BUDGET_SKIP = \"turn budget\";\n\n/** The skip reason recorded for an eval the budget stopped before dispatch. */\nexport function turnBudgetSkipReason(maxTurns: number): string {\n return `judge ${TURN_BUDGET_SKIP} exhausted (${maxTurns})`;\n}\n\n/**\n * Whether a skip reason is the budget's doing rather than the judge's.\n *\n * A type predicate, not a plain boolean: a budget skip always carries a\n * reason, and callers interpolate it into the message they report.\n */\nexport function isTurnBudgetSkip(reason: string | undefined): reason is string {\n return reason !== undefined && reason.includes(TURN_BUDGET_SKIP);\n}\n"],"mappings":";;;AAcA,SAAS,gBAAgB;AAGlB,SAAS,WAAW,QAAoB,WAAW,KAAa;AACrE,QAAM,QAAQ,OAAO,OAAO,KAAK,KAAK,OAAO,OAAO,KAAK,GAAG,KAAK;AACjE,MAAI,KAAK,UAAU,SAAU,QAAO;AACpC,SAAO,SAAI,KAAK,MAAM,CAAC,QAAQ,CAAC;AAClC;;;ACHO,IAAM,mBAAmB;AAGzB,SAAS,qBAAqB,UAA0B;AAC7D,SAAO,SAAS,gBAAgB,eAAe,QAAQ;AACzD;AAQO,SAAS,iBAAiB,QAA8C;AAC7E,SAAO,WAAW,UAAa,OAAO,SAAS,gBAAgB;AACjE;","names":[]}
@@ -3,16 +3,16 @@ import {
3
3
  renderCalibration,
4
4
  resolveBatchTraces,
5
5
  runBatch
6
- } from "./chunk-BKY6GAFA.js";
6
+ } from "./chunk-63EQKVNT.js";
7
7
  import {
8
8
  discoverConfig,
9
9
  labelKey,
10
10
  loadLabels
11
- } from "./chunk-PTGXEZQD.js";
11
+ } from "./chunk-3ZVRGBK6.js";
12
12
  import {
13
13
  assertProviderSelection,
14
14
  selectProvider
15
- } from "./chunk-JCTHXG33.js";
15
+ } from "./chunk-NHOGTAPK.js";
16
16
  import {
17
17
  TracevalsError
18
18
  } from "./chunk-ZINZTHWO.js";
@@ -378,4 +378,4 @@ export {
378
378
  score,
379
379
  runCalibrate
380
380
  };
381
- //# sourceMappingURL=chunk-KBSTXL6L.js.map
381
+ //# sourceMappingURL=chunk-XQKRD5A3.js.map
@@ -11,11 +11,11 @@ import {
11
11
  CONCEPT_FIELDS,
12
12
  fieldPointer,
13
13
  valueAt
14
- } from "./chunk-Q76T6Y6X.js";
14
+ } from "./chunk-LCMBG4LY.js";
15
15
  import {
16
16
  codeEndAt,
17
17
  codeRegions
18
- } from "./chunk-BXE4L52Q.js";
18
+ } from "./chunk-562QZKAB.js";
19
19
  import {
20
20
  STDIN_LABEL,
21
21
  STDIN_TOKEN,
@@ -26,7 +26,7 @@ import {
26
26
  locateFrontmatter,
27
27
  resolveTargetSet,
28
28
  supportedExtensions
29
- } from "./chunk-BJUEOC4G.js";
29
+ } from "./chunk-YB3KD5RI.js";
30
30
  import {
31
31
  SEVERITIES
32
32
  } from "./chunk-77AINBYM.js";
@@ -35,7 +35,7 @@ import {
35
35
  readConfigFile,
36
36
  selectCollections,
37
37
  valeConfigPath
38
- } from "./chunk-B2242FYO.js";
38
+ } from "./chunk-JF4BC7ZD.js";
39
39
  import {
40
40
  ToolError,
41
41
  errorMessage
@@ -3410,4 +3410,4 @@ export {
3410
3410
  valeConfigFor,
3411
3411
  plural
3412
3412
  };
3413
- //# sourceMappingURL=chunk-2YKUSTHS.js.map
3413
+ //# sourceMappingURL=chunk-XSP3TUFN.js.map