@hawkeyexl/manni 4.20.1 → 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 (314) hide show
  1. package/README.md +1 -1
  2. package/dist/{batch-J626LZ22.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-RCSQARQE.js → check-KXWHSCCR.js} +13 -16
  9. package/dist/check-MZSXCS2M.js +33 -0
  10. package/dist/{check-PQ7S5I3I.js → check-QNHLTYPN.js} +23 -23
  11. package/dist/{chunk-YIHIRMXN.js → chunk-2VLZDU4E.js} +5 -5
  12. package/dist/{chunk-D54BQM5P.js → chunk-37Q7WEJJ.js} +9 -9
  13. package/dist/{chunk-QSPH4F56.js → chunk-3ZVRGBK6.js} +5 -5
  14. package/dist/chunk-3ZVRGBK6.js.map +1 -0
  15. package/dist/{chunk-P5DWBG6T.js → chunk-46MMIJWR.js} +3 -3
  16. package/dist/{chunk-P6XZ44C2.js → chunk-4LYVTR2T.js} +4 -4
  17. package/dist/{chunk-ODSIHEIW.js → chunk-562QZKAB.js} +6599 -3508
  18. package/dist/chunk-562QZKAB.js.map +1 -0
  19. package/dist/{chunk-ACJUZFRT.js → chunk-57LZPG4V.js} +29 -4
  20. package/dist/chunk-57LZPG4V.js.map +1 -0
  21. package/dist/chunk-5LQX57BW.js +100 -0
  22. package/dist/chunk-5LQX57BW.js.map +1 -0
  23. package/dist/{chunk-MPXMQGJI.js → chunk-63EQKVNT.js} +45 -910
  24. package/dist/chunk-63EQKVNT.js.map +1 -0
  25. package/dist/{chunk-6FY573GB.js → chunk-64DULZIG.js} +4 -4
  26. package/dist/{chunk-TAJYMXMM.js → chunk-6SVHI2U6.js} +2 -2
  27. package/dist/{chunk-OVUQNM7Y.js → chunk-6UHEMPEY.js} +3 -157
  28. package/dist/chunk-6UHEMPEY.js.map +1 -0
  29. package/dist/{chunk-A633WB3N.js → chunk-A5YUK3SG.js} +37 -26
  30. package/dist/chunk-A5YUK3SG.js.map +1 -0
  31. package/dist/{chunk-C5BXSQDO.js → chunk-A67EJ3J6.js} +6 -6
  32. package/dist/{chunk-2GTR24SA.js → chunk-BLDL23RY.js} +8 -8
  33. package/dist/{chunk-JPXC62SD.js → chunk-BY3635RR.js} +82 -16
  34. package/dist/chunk-BY3635RR.js.map +1 -0
  35. package/dist/{chunk-CFMI74TP.js → chunk-BZ74YUYE.js} +2 -2
  36. package/dist/{chunk-NDPQ2GQ4.js → chunk-CHTSA3YR.js} +6 -6
  37. package/dist/{chunk-5CJ3P5O3.js → chunk-CPYQ4BJK.js} +19 -100
  38. package/dist/chunk-CPYQ4BJK.js.map +1 -0
  39. package/dist/{chunk-Z2T5U7HN.js → chunk-CQTESLC5.js} +2 -2
  40. package/dist/{chunk-245W2Q7C.js → chunk-D4BGNAN5.js} +2 -2
  41. package/dist/{chunk-XPO655IX.js → chunk-E3HYSNS6.js} +4 -4
  42. package/dist/{chunk-LPJ3IB26.js → chunk-EL2KNRC3.js} +17 -3
  43. package/dist/chunk-EL2KNRC3.js.map +1 -0
  44. package/dist/{chunk-ISDFYXLA.js → chunk-FTSNG6DZ.js} +48 -28
  45. package/dist/chunk-FTSNG6DZ.js.map +1 -0
  46. package/dist/{chunk-MJZK7G4B.js → chunk-FXE5K56B.js} +3 -3
  47. package/dist/{chunk-YM2W43DI.js → chunk-HYEKQ22B.js} +13 -9
  48. package/dist/chunk-HYEKQ22B.js.map +1 -0
  49. package/dist/{chunk-QGBNWEWS.js → chunk-IC3FJWIF.js} +2 -2
  50. package/dist/{chunk-OQR3VVAX.js → chunk-IDDRHB7E.js} +3 -3
  51. package/dist/chunk-INOVEO32.js +28 -0
  52. package/dist/chunk-INOVEO32.js.map +1 -0
  53. package/dist/chunk-IXFFVI5S.js +409 -0
  54. package/dist/chunk-IXFFVI5S.js.map +1 -0
  55. package/dist/{chunk-OXCWCEVV.js → chunk-JA7DWOVV.js} +5 -5
  56. package/dist/{chunk-B2242FYO.js → chunk-JF4BC7ZD.js} +38 -3
  57. package/dist/chunk-JF4BC7ZD.js.map +1 -0
  58. package/dist/{chunk-RN7IA742.js → chunk-JL5FHNQK.js} +9 -11
  59. package/dist/{chunk-RN7IA742.js.map → chunk-JL5FHNQK.js.map} +1 -1
  60. package/dist/{chunk-HGUCJ3K3.js → chunk-JVE5YQN4.js} +4 -4
  61. package/dist/chunk-K5LBIAOM.js +700 -0
  62. package/dist/chunk-K5LBIAOM.js.map +1 -0
  63. package/dist/{chunk-5E3ABFOQ.js → chunk-KIUFBUUZ.js} +13 -11
  64. package/dist/{chunk-5E3ABFOQ.js.map → chunk-KIUFBUUZ.js.map} +1 -1
  65. package/dist/{chunk-SUTY4VCZ.js → chunk-LCMBG4LY.js} +3635 -3409
  66. package/dist/chunk-LCMBG4LY.js.map +1 -0
  67. package/dist/{chunk-H3C3UXTA.js → chunk-LMS2RWDS.js} +15 -13
  68. package/dist/{chunk-H3C3UXTA.js.map → chunk-LMS2RWDS.js.map} +1 -1
  69. package/dist/{chunk-RA2BER5P.js → chunk-MR5JWMC2.js} +2 -2
  70. package/dist/{chunk-JCTHXG33.js → chunk-NHOGTAPK.js} +2 -2
  71. package/dist/{chunk-VM7VAFJW.js → chunk-NVYDWVXN.js} +2 -1
  72. package/dist/{chunk-N2VB6UUE.js → chunk-O6IDYZVW.js} +7 -5
  73. package/dist/{chunk-N2VB6UUE.js.map → chunk-O6IDYZVW.js.map} +1 -1
  74. package/dist/{chunk-MTMR65NM.js → chunk-OHMLEITS.js} +2 -2
  75. package/dist/{chunk-NUQF5F5J.js → chunk-PNDEKFF3.js} +2 -2
  76. package/dist/{chunk-S2HW3CBF.js → chunk-PX7OTUNU.js} +6 -6
  77. package/dist/{chunk-4F5WGZRP.js → chunk-Q7FFJMFO.js} +19 -15
  78. package/dist/chunk-Q7FFJMFO.js.map +1 -0
  79. package/dist/{chunk-D4XQX4W7.js → chunk-QJJPTS6L.js} +5 -3
  80. package/dist/{chunk-D4XQX4W7.js.map → chunk-QJJPTS6L.js.map} +1 -1
  81. package/dist/chunk-RAN3CF33.js +1875 -0
  82. package/dist/chunk-RAN3CF33.js.map +1 -0
  83. package/dist/{chunk-YYWZ2MSL.js → chunk-S7V4F7HC.js} +16 -11
  84. package/dist/chunk-S7V4F7HC.js.map +1 -0
  85. package/dist/{chunk-CXL6ES7O.js → chunk-SCKVDD4E.js} +4 -4
  86. package/dist/{chunk-ZB3OFSRB.js → chunk-TJYJ4BNK.js} +4 -4
  87. package/dist/{chunk-MJZ5HYYL.js → chunk-TR5TNPWT.js} +2 -2
  88. package/dist/{chunk-MJZ5HYYL.js.map → chunk-TR5TNPWT.js.map} +1 -1
  89. package/dist/chunk-TT5UDTDM.js +888 -0
  90. package/dist/chunk-TT5UDTDM.js.map +1 -0
  91. package/dist/{chunk-N3DYE6LJ.js → chunk-TWYJ2TVS.js} +7 -7
  92. package/dist/{chunk-BM43RJIS.js → chunk-UQI463L3.js} +9 -9
  93. package/dist/{chunk-FIR2MAGS.js → chunk-V27DOGAO.js} +2 -2
  94. package/dist/{chunk-O4O6JOGD.js → chunk-VSDXZAQU.js} +14 -20
  95. package/dist/chunk-VSDXZAQU.js.map +1 -0
  96. package/dist/{chunk-4DFBBU4A.js → chunk-VSHMXMBZ.js} +2 -2
  97. package/dist/{chunk-ROZDHPKA.js → chunk-VZSATUI7.js} +4 -4
  98. package/dist/{chunk-EOJEPEYY.js → chunk-W5OZMYMX.js} +2 -2
  99. package/dist/{chunk-KERICP5Y.js → chunk-WW4JATBJ.js} +6 -6
  100. package/dist/{chunk-SSQZB5SQ.js → chunk-XG6PVB5S.js} +11 -1
  101. package/dist/chunk-XG6PVB5S.js.map +1 -0
  102. package/dist/{chunk-TDG2S5UE.js → chunk-XQKRD5A3.js} +4 -4
  103. package/dist/{chunk-GGTCSMNX.js → chunk-XSP3TUFN.js} +5 -5
  104. package/dist/{chunk-UVC3BUKU.js → chunk-XTMONCQE.js} +6 -405
  105. package/dist/chunk-XTMONCQE.js.map +1 -0
  106. package/dist/{chunk-WRWW6SGG.js → chunk-YB3KD5RI.js} +3 -3
  107. package/dist/chunk-ZAOJYN2D.js +159 -0
  108. package/dist/chunk-ZAOJYN2D.js.map +1 -0
  109. package/dist/{chunk-FKELQCGN.js → chunk-ZKIXGFID.js} +2 -2
  110. package/dist/{chunk-BY4THWAQ.js → chunk-ZT3ERG4B.js} +3 -3
  111. package/dist/chunk-ZTRC37NH.js +38 -0
  112. package/dist/chunk-ZTRC37NH.js.map +1 -0
  113. package/dist/{chunk-LXJ4FZ7Y.js → chunk-ZW4YASUB.js} +4 -4
  114. package/dist/{chunk-E6JYRVR5.js → chunk-ZX4TOTZS.js} +27 -8
  115. package/dist/chunk-ZX4TOTZS.js.map +1 -0
  116. package/dist/{cli-4RTNEVVX.js → cli-4QAH3DBX.js} +9 -11
  117. package/dist/{cli-IIFCE6GY.js → cli-6476FRBK.js} +16 -19
  118. package/dist/{cli-IIFCE6GY.js.map → cli-6476FRBK.js.map} +1 -1
  119. package/dist/{cli-DQRFSU7U.js → cli-7XT7O5YM.js} +16 -18
  120. package/dist/{cli-DQRFSU7U.js.map → cli-7XT7O5YM.js.map} +1 -1
  121. package/dist/{cli-PCZ7XNCO.js → cli-FGCHGJYZ.js} +70 -53
  122. package/dist/cli-FGCHGJYZ.js.map +1 -0
  123. package/dist/{cli-6J4P5MLU.js → cli-JE4LG35H.js} +4 -4
  124. package/dist/{cli-K5635N25.js → cli-U3622DIB.js} +14 -17
  125. package/dist/{cli-K5635N25.js.map → cli-U3622DIB.js.map} +1 -1
  126. package/dist/{cli-K5QWXB7H.js → cli-ULHJTJHH.js} +74 -41
  127. package/dist/cli-ULHJTJHH.js.map +1 -0
  128. package/dist/{cli-ISKXSN3P.js → cli-W7B2PNZO.js} +18 -21
  129. package/dist/{cli-ISKXSN3P.js.map → cli-W7B2PNZO.js.map} +1 -1
  130. package/dist/{cli-FTSJQSB4.js → cli-YGMXZ46V.js} +17 -20
  131. package/dist/{cli-FTSJQSB4.js.map → cli-YGMXZ46V.js.map} +1 -1
  132. package/dist/{cli-TCHSYJLB.js → cli-YINQL2NI.js} +28 -29
  133. package/dist/{cli-TCHSYJLB.js.map → cli-YINQL2NI.js.map} +1 -1
  134. package/dist/cli-Z3ART5DN.js +152 -0
  135. package/dist/cli-Z3ART5DN.js.map +1 -0
  136. package/dist/cli.js +15 -15
  137. package/dist/cli.js.map +1 -1
  138. package/dist/{config-7I5CHHRZ.js → config-2YJPJ36T.js} +5 -5
  139. package/dist/docmeta.js +8 -10
  140. package/dist/docmeta.js.map +1 -1
  141. package/dist/github-64ZVAUIT.js +28 -0
  142. package/dist/github-ARGPMQD2.js +32 -0
  143. package/dist/github-YHJABBUI.js +33 -0
  144. package/dist/graph/runtime.js.map +1 -1
  145. package/dist/{host-YSTYO5DX.js → host-JT27OWTC.js} +3 -3
  146. package/dist/index.d.ts +334 -24
  147. package/dist/index.js +218 -203
  148. package/dist/index.js.map +1 -1
  149. package/dist/{json-7Z2IFGB3.js → json-CVOVXB7O.js} +12 -15
  150. package/dist/json-QNGJFUY2.js +40 -0
  151. package/dist/{labels-SE2WL7WD.js → labels-5WOKC3VR.js} +11 -14
  152. package/dist/{labels-SE2WL7WD.js.map → labels-5WOKC3VR.js.map} +1 -1
  153. package/dist/lint-OQGB4DWJ.js +32 -0
  154. package/dist/list-EDAB7X5Y.js +30 -0
  155. package/dist/list-OQ3IYV2W.js +37 -0
  156. package/dist/list-PN6JKYNX.js +33 -0
  157. package/dist/{page-A2Y4ZMV4.js → page-TPNMHL27.js} +11 -14
  158. package/dist/{prepare-M2COBP5O.js → prepare-3V2QYBKL.js} +20 -22
  159. package/dist/{prepare-M2COBP5O.js.map → prepare-3V2QYBKL.js.map} +1 -1
  160. package/dist/{pretty-SFFOMSG5.js → pretty-EZ2NFU3C.js} +13 -16
  161. package/dist/pretty-HO2LYG5N.js +41 -0
  162. package/dist/{pretty-D3DZFC5U.js → pretty-K3M4AW2D.js} +12 -15
  163. package/dist/{provider-JY2I3VLF.js → provider-YWNTTQPA.js} +3 -3
  164. package/dist/{release-VHHASAG7.js → release-EFLQT3FW.js} +3 -3
  165. package/dist/{reporters-TO7Q6JYF.js → reporters-4R2E7PRJ.js} +6 -6
  166. package/dist/{reporters-UTLJVSWX.js → reporters-YVLLFBO5.js} +11 -14
  167. package/dist/run-H4BOR2FR.js +36 -0
  168. package/dist/{sarif-IAGMXA6C.js → sarif-GWHWJJFP.js} +10 -13
  169. package/dist/sarif-SJFVSOBV.js +33 -0
  170. package/dist/sarif-YBFD5OUL.js +28 -0
  171. package/dist/{strategy-UKRA6WO4.js → strategy-T56PH2VK.js} +29 -46
  172. package/dist/strategy-T56PH2VK.js.map +1 -0
  173. package/dist/{term-AMORBEO7.js → term-33YSMISR.js} +18 -22
  174. package/dist/{term-AMORBEO7.js.map → term-33YSMISR.js.map} +1 -1
  175. package/dist/{validate-CDTKFZUV.js → validate-6R5UBDGU.js} +6 -7
  176. package/package.json +1 -1
  177. package/plugin/manni/.claude-plugin/plugin.json +11 -3
  178. package/plugin/manni/hooks/graph-server.mjs +3 -3
  179. package/plugin/manni/hooks/hooks.json +4 -4
  180. package/plugin/manni/hooks/manni.mjs +18 -5
  181. package/plugin/manni/hooks/page-metadata.mjs +81 -7
  182. package/plugin/manni/hooks/tracevals.mjs +7 -0
  183. package/plugin/manni/skills/fix/SKILL.md +8 -4
  184. package/shapes/graph/shapes-1.3.0.ttl +1250 -0
  185. package/dist/build-AYLD6V6Y.js +0 -38
  186. package/dist/calibrate-2HZFACIX.js +0 -43
  187. package/dist/capture-NMDIPC6S.js +0 -39
  188. package/dist/check-KNQV7GLU.js +0 -33
  189. package/dist/check-OH4KKXP3.js +0 -33
  190. package/dist/check-PRAMKQCI.js +0 -47
  191. package/dist/chunk-4F5WGZRP.js.map +0 -1
  192. package/dist/chunk-4H3IOF52.js +0 -3200
  193. package/dist/chunk-4H3IOF52.js.map +0 -1
  194. package/dist/chunk-5CJ3P5O3.js.map +0 -1
  195. package/dist/chunk-A633WB3N.js.map +0 -1
  196. package/dist/chunk-ACJUZFRT.js.map +0 -1
  197. package/dist/chunk-B2242FYO.js.map +0 -1
  198. package/dist/chunk-CT5WSUUZ.js +0 -441
  199. package/dist/chunk-CT5WSUUZ.js.map +0 -1
  200. package/dist/chunk-DNF42MK7.js +0 -326
  201. package/dist/chunk-DNF42MK7.js.map +0 -1
  202. package/dist/chunk-E6JYRVR5.js.map +0 -1
  203. package/dist/chunk-ISDFYXLA.js.map +0 -1
  204. package/dist/chunk-JPXC62SD.js.map +0 -1
  205. package/dist/chunk-LPJ3IB26.js.map +0 -1
  206. package/dist/chunk-MPXMQGJI.js.map +0 -1
  207. package/dist/chunk-O4O6JOGD.js.map +0 -1
  208. package/dist/chunk-ODSIHEIW.js.map +0 -1
  209. package/dist/chunk-OVUQNM7Y.js.map +0 -1
  210. package/dist/chunk-QSPH4F56.js.map +0 -1
  211. package/dist/chunk-SIREOHLW.js +0 -233
  212. package/dist/chunk-SIREOHLW.js.map +0 -1
  213. package/dist/chunk-SSQZB5SQ.js.map +0 -1
  214. package/dist/chunk-SUTY4VCZ.js.map +0 -1
  215. package/dist/chunk-UP6NBQ62.js +0 -2
  216. package/dist/chunk-UVC3BUKU.js.map +0 -1
  217. package/dist/chunk-WI3PPQQX.js +0 -164
  218. package/dist/chunk-WI3PPQQX.js.map +0 -1
  219. package/dist/chunk-YM2W43DI.js.map +0 -1
  220. package/dist/chunk-YYWZ2MSL.js.map +0 -1
  221. package/dist/chunk-ZPLVANY2.js +0 -15
  222. package/dist/chunk-ZPLVANY2.js.map +0 -1
  223. package/dist/cli-K5QWXB7H.js.map +0 -1
  224. package/dist/cli-PCZ7XNCO.js.map +0 -1
  225. package/dist/cli-TM2JCTQT.js +0 -84
  226. package/dist/cli-TM2JCTQT.js.map +0 -1
  227. package/dist/github-BUK5CVQW.js +0 -27
  228. package/dist/github-CMAZWS76.js +0 -31
  229. package/dist/github-NXR4QMMM.js +0 -35
  230. package/dist/json-NZSGRYOE.js +0 -34
  231. package/dist/lint-VUYM5PPM.js +0 -35
  232. package/dist/list-4JGOXLOZ.js +0 -33
  233. package/dist/list-LTF25DQE.js +0 -33
  234. package/dist/list-WD3TZS5R.js +0 -36
  235. package/dist/pretty-R67YU6TU.js +0 -35
  236. package/dist/run-BDGYRUXJ.js +0 -39
  237. package/dist/sarif-EHAMGCVR.js +0 -36
  238. package/dist/sarif-GJYLRXLS.js +0 -30
  239. package/dist/strategy-UKRA6WO4.js.map +0 -1
  240. package/dist/validate-CDTKFZUV.js.map +0 -1
  241. /package/dist/{batch-J626LZ22.js.map → batch-C3NN2YXB.js.map} +0 -0
  242. /package/dist/{build-AYLD6V6Y.js.map → build-CEVEAHN7.js.map} +0 -0
  243. /package/dist/{calibrate-2HZFACIX.js.map → calibrate-CSKPY5AK.js.map} +0 -0
  244. /package/dist/{capture-NMDIPC6S.js.map → capture-3HDBIHH6.js.map} +0 -0
  245. /package/dist/{check-KNQV7GLU.js.map → check-555TCJGF.js.map} +0 -0
  246. /package/dist/{check-OH4KKXP3.js.map → check-KGJBV42O.js.map} +0 -0
  247. /package/dist/{check-PRAMKQCI.js.map → check-KXWHSCCR.js.map} +0 -0
  248. /package/dist/{check-RCSQARQE.js.map → check-MZSXCS2M.js.map} +0 -0
  249. /package/dist/{check-PQ7S5I3I.js.map → check-QNHLTYPN.js.map} +0 -0
  250. /package/dist/{chunk-YIHIRMXN.js.map → chunk-2VLZDU4E.js.map} +0 -0
  251. /package/dist/{chunk-D54BQM5P.js.map → chunk-37Q7WEJJ.js.map} +0 -0
  252. /package/dist/{chunk-P5DWBG6T.js.map → chunk-46MMIJWR.js.map} +0 -0
  253. /package/dist/{chunk-P6XZ44C2.js.map → chunk-4LYVTR2T.js.map} +0 -0
  254. /package/dist/{chunk-6FY573GB.js.map → chunk-64DULZIG.js.map} +0 -0
  255. /package/dist/{chunk-TAJYMXMM.js.map → chunk-6SVHI2U6.js.map} +0 -0
  256. /package/dist/{chunk-C5BXSQDO.js.map → chunk-A67EJ3J6.js.map} +0 -0
  257. /package/dist/{chunk-2GTR24SA.js.map → chunk-BLDL23RY.js.map} +0 -0
  258. /package/dist/{chunk-CFMI74TP.js.map → chunk-BZ74YUYE.js.map} +0 -0
  259. /package/dist/{chunk-NDPQ2GQ4.js.map → chunk-CHTSA3YR.js.map} +0 -0
  260. /package/dist/{chunk-Z2T5U7HN.js.map → chunk-CQTESLC5.js.map} +0 -0
  261. /package/dist/{chunk-245W2Q7C.js.map → chunk-D4BGNAN5.js.map} +0 -0
  262. /package/dist/{chunk-XPO655IX.js.map → chunk-E3HYSNS6.js.map} +0 -0
  263. /package/dist/{chunk-MJZK7G4B.js.map → chunk-FXE5K56B.js.map} +0 -0
  264. /package/dist/{chunk-QGBNWEWS.js.map → chunk-IC3FJWIF.js.map} +0 -0
  265. /package/dist/{chunk-OQR3VVAX.js.map → chunk-IDDRHB7E.js.map} +0 -0
  266. /package/dist/{chunk-OXCWCEVV.js.map → chunk-JA7DWOVV.js.map} +0 -0
  267. /package/dist/{chunk-HGUCJ3K3.js.map → chunk-JVE5YQN4.js.map} +0 -0
  268. /package/dist/{chunk-RA2BER5P.js.map → chunk-MR5JWMC2.js.map} +0 -0
  269. /package/dist/{chunk-JCTHXG33.js.map → chunk-NHOGTAPK.js.map} +0 -0
  270. /package/dist/{chunk-VM7VAFJW.js.map → chunk-NVYDWVXN.js.map} +0 -0
  271. /package/dist/{chunk-MTMR65NM.js.map → chunk-OHMLEITS.js.map} +0 -0
  272. /package/dist/{chunk-NUQF5F5J.js.map → chunk-PNDEKFF3.js.map} +0 -0
  273. /package/dist/{chunk-S2HW3CBF.js.map → chunk-PX7OTUNU.js.map} +0 -0
  274. /package/dist/{chunk-CXL6ES7O.js.map → chunk-SCKVDD4E.js.map} +0 -0
  275. /package/dist/{chunk-ZB3OFSRB.js.map → chunk-TJYJ4BNK.js.map} +0 -0
  276. /package/dist/{chunk-N3DYE6LJ.js.map → chunk-TWYJ2TVS.js.map} +0 -0
  277. /package/dist/{chunk-BM43RJIS.js.map → chunk-UQI463L3.js.map} +0 -0
  278. /package/dist/{chunk-FIR2MAGS.js.map → chunk-V27DOGAO.js.map} +0 -0
  279. /package/dist/{chunk-4DFBBU4A.js.map → chunk-VSHMXMBZ.js.map} +0 -0
  280. /package/dist/{chunk-ROZDHPKA.js.map → chunk-VZSATUI7.js.map} +0 -0
  281. /package/dist/{chunk-EOJEPEYY.js.map → chunk-W5OZMYMX.js.map} +0 -0
  282. /package/dist/{chunk-KERICP5Y.js.map → chunk-WW4JATBJ.js.map} +0 -0
  283. /package/dist/{chunk-TDG2S5UE.js.map → chunk-XQKRD5A3.js.map} +0 -0
  284. /package/dist/{chunk-GGTCSMNX.js.map → chunk-XSP3TUFN.js.map} +0 -0
  285. /package/dist/{chunk-WRWW6SGG.js.map → chunk-YB3KD5RI.js.map} +0 -0
  286. /package/dist/{chunk-FKELQCGN.js.map → chunk-ZKIXGFID.js.map} +0 -0
  287. /package/dist/{chunk-BY4THWAQ.js.map → chunk-ZT3ERG4B.js.map} +0 -0
  288. /package/dist/{chunk-LXJ4FZ7Y.js.map → chunk-ZW4YASUB.js.map} +0 -0
  289. /package/dist/{chunk-UP6NBQ62.js.map → cli-4QAH3DBX.js.map} +0 -0
  290. /package/dist/{cli-6J4P5MLU.js.map → cli-JE4LG35H.js.map} +0 -0
  291. /package/dist/{cli-4RTNEVVX.js.map → config-2YJPJ36T.js.map} +0 -0
  292. /package/dist/{config-7I5CHHRZ.js.map → github-64ZVAUIT.js.map} +0 -0
  293. /package/dist/{github-BUK5CVQW.js.map → github-ARGPMQD2.js.map} +0 -0
  294. /package/dist/{github-CMAZWS76.js.map → github-YHJABBUI.js.map} +0 -0
  295. /package/dist/{github-NXR4QMMM.js.map → host-JT27OWTC.js.map} +0 -0
  296. /package/dist/{host-YSTYO5DX.js.map → json-CVOVXB7O.js.map} +0 -0
  297. /package/dist/{json-7Z2IFGB3.js.map → json-QNGJFUY2.js.map} +0 -0
  298. /package/dist/{json-NZSGRYOE.js.map → lint-OQGB4DWJ.js.map} +0 -0
  299. /package/dist/{lint-VUYM5PPM.js.map → list-EDAB7X5Y.js.map} +0 -0
  300. /package/dist/{list-4JGOXLOZ.js.map → list-OQ3IYV2W.js.map} +0 -0
  301. /package/dist/{list-LTF25DQE.js.map → list-PN6JKYNX.js.map} +0 -0
  302. /package/dist/{list-WD3TZS5R.js.map → page-TPNMHL27.js.map} +0 -0
  303. /package/dist/{page-A2Y4ZMV4.js.map → pretty-EZ2NFU3C.js.map} +0 -0
  304. /package/dist/{pretty-D3DZFC5U.js.map → pretty-HO2LYG5N.js.map} +0 -0
  305. /package/dist/{pretty-R67YU6TU.js.map → pretty-K3M4AW2D.js.map} +0 -0
  306. /package/dist/{pretty-SFFOMSG5.js.map → provider-YWNTTQPA.js.map} +0 -0
  307. /package/dist/{release-VHHASAG7.js.map → release-EFLQT3FW.js.map} +0 -0
  308. /package/dist/{provider-JY2I3VLF.js.map → reporters-4R2E7PRJ.js.map} +0 -0
  309. /package/dist/{reporters-TO7Q6JYF.js.map → reporters-YVLLFBO5.js.map} +0 -0
  310. /package/dist/{reporters-UTLJVSWX.js.map → run-H4BOR2FR.js.map} +0 -0
  311. /package/dist/{run-BDGYRUXJ.js.map → sarif-GWHWJJFP.js.map} +0 -0
  312. /package/dist/{sarif-EHAMGCVR.js.map → sarif-SJFVSOBV.js.map} +0 -0
  313. /package/dist/{sarif-GJYLRXLS.js.map → sarif-YBFD5OUL.js.map} +0 -0
  314. /package/dist/{sarif-IAGMXA6C.js.map → validate-6R5UBDGU.js.map} +0 -0
@@ -0,0 +1,888 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ evaluateWhen,
4
+ matchesGlob,
5
+ rejectWhen,
6
+ skippedTrigger,
7
+ validateWhen
8
+ } from "./chunk-FQGLRJGX.js";
9
+ import {
10
+ fail,
11
+ firstError,
12
+ optionalBoolean,
13
+ optionalEnum,
14
+ optionalNumber,
15
+ optionalString,
16
+ optionsError,
17
+ orderedBounds,
18
+ pass,
19
+ requireOneOf,
20
+ requiredString,
21
+ skippedWindow,
22
+ windowFor
23
+ } from "./chunk-VHJ72YCD.js";
24
+ import {
25
+ realExec,
26
+ turnBudgetSkipReason
27
+ } from "./chunk-XG6PVB5S.js";
28
+
29
+ // src/tracevals/graders/tool-usage.ts
30
+ function checkContradiction(options) {
31
+ const expect = options.expect ?? "used";
32
+ const { min, max } = options;
33
+ if (expect === "not-used" && typeof min === "number" && min > 0) {
34
+ return "options.min is unsatisfiable with expect: not-used";
35
+ }
36
+ if (expect === "used" && typeof max === "number" && max === 0) {
37
+ return "options.max of 0 is unsatisfiable with expect: used";
38
+ }
39
+ return void 0;
40
+ }
41
+ function validateOptions(options) {
42
+ return firstError(
43
+ requiredString(options, "tool"),
44
+ optionalEnum(options, "expect", ["used", "not-used"]),
45
+ optionalNumber(options, "min", { min: 0, integer: true }),
46
+ optionalNumber(options, "max", { min: 0, integer: true }),
47
+ orderedBounds(options, "min", "max"),
48
+ checkContradiction(options),
49
+ optionalBoolean(options, "includeSidechains"),
50
+ validateWhen(options)
51
+ );
52
+ }
53
+ var toolUsageGrader = {
54
+ kind: "tool-usage",
55
+ validateOptions,
56
+ grade({ trace, plan }) {
57
+ const options = plan.options ?? {};
58
+ const invalid = validateOptions(options);
59
+ if (invalid !== void 0) return optionsError("tool-usage", invalid);
60
+ const tool = options.tool;
61
+ const expect = options.expect ?? "used";
62
+ const includeSidechains = options.includeSidechains === true;
63
+ const window = windowFor(trace, plan);
64
+ if (window.empty) return skippedWindow(window);
65
+ const trigger = evaluateWhen(options, window);
66
+ if (!trigger.armed) return skippedTrigger(trigger);
67
+ const branchScoped = window.scope === "agent";
68
+ const count = window.toolCalls.filter(
69
+ (c) => c.name === tool && (branchScoped || includeSidechains || !c.sidechain)
70
+ ).length;
71
+ if (expect === "not-used" && count > 0) {
72
+ return fail(plan, `tool ${tool} was used ${count} time(s) but must not be`);
73
+ }
74
+ if (expect === "used" && count === 0 && options.min === void 0) {
75
+ return fail(plan, `tool ${tool} was never used`);
76
+ }
77
+ if (typeof options.min === "number" && count < options.min) {
78
+ return fail(
79
+ plan,
80
+ `tool ${tool} was used ${count} time(s); at least ${options.min} required`
81
+ );
82
+ }
83
+ if (typeof options.max === "number" && count > options.max) {
84
+ return fail(
85
+ plan,
86
+ `tool ${tool} was used ${count} time(s); at most ${options.max} allowed`
87
+ );
88
+ }
89
+ return pass;
90
+ }
91
+ };
92
+
93
+ // src/tracevals/graders/tool-order.ts
94
+ function validateOptions2(options) {
95
+ return firstError(
96
+ requiredString(options, "before"),
97
+ requiredString(options, "after"),
98
+ optionalString(options, "beforeInputMatch"),
99
+ optionalString(options, "afterInputMatch"),
100
+ optionalBoolean(options, "includeSidechains"),
101
+ validateWhen(options),
102
+ ...["beforeInputMatch", "afterInputMatch"].map((key) => {
103
+ const value = options[key];
104
+ if (typeof value !== "string") return void 0;
105
+ try {
106
+ new RegExp(value);
107
+ return void 0;
108
+ } catch (err) {
109
+ return `options.${key} is not a valid regular expression (${err instanceof Error ? err.message : String(err)})`;
110
+ }
111
+ })
112
+ );
113
+ }
114
+ function ordinalsOf(calls, tool, inputMatch) {
115
+ const re = inputMatch === void 0 ? void 0 : new RegExp(inputMatch);
116
+ return calls.filter(
117
+ (c) => c.name === tool && (re === void 0 || re.test(JSON.stringify(c.input)))
118
+ ).map((c) => c.index);
119
+ }
120
+ function describe(tool, inputMatch) {
121
+ return inputMatch === void 0 ? tool : `${tool} matching /${inputMatch}/`;
122
+ }
123
+ var toolOrderGrader = {
124
+ kind: "tool-order",
125
+ validateOptions: validateOptions2,
126
+ grade({ trace, plan }) {
127
+ const options = plan.options ?? {};
128
+ const invalid = validateOptions2(options);
129
+ if (invalid !== void 0) return optionsError("tool-order", invalid);
130
+ const before = options.before;
131
+ const after = options.after;
132
+ const beforeMatch = options.beforeInputMatch;
133
+ const afterMatch = options.afterInputMatch;
134
+ const includeSidechains = options.includeSidechains === true;
135
+ const window = windowFor(trace, plan);
136
+ if (window.empty) return skippedWindow(window);
137
+ const trigger = evaluateWhen(options, window);
138
+ if (!trigger.armed) return skippedTrigger(trigger);
139
+ const branchScoped = window.scope === "agent";
140
+ const calls = window.toolCalls.filter(
141
+ (c) => branchScoped || includeSidechains || !c.sidechain
142
+ );
143
+ const beforeOrdinals = ordinalsOf(calls, before, beforeMatch);
144
+ const afterOrdinals = ordinalsOf(calls, after, afterMatch);
145
+ const firstBefore = beforeOrdinals.length > 0 ? Math.min(...beforeOrdinals) : void 0;
146
+ const lastAfter = afterOrdinals.length > 0 ? Math.max(...afterOrdinals) : void 0;
147
+ if (firstBefore === void 0 && lastAfter === void 0) return pass;
148
+ if (lastAfter === void 0) {
149
+ return fail(
150
+ plan,
151
+ `${describe(after, afterMatch)} was never used, so it could not follow ${describe(before, beforeMatch)}`
152
+ );
153
+ }
154
+ if (firstBefore === void 0) {
155
+ return fail(
156
+ plan,
157
+ `${describe(after, afterMatch)} was used without ${describe(before, beforeMatch)} ever being used first`
158
+ );
159
+ }
160
+ if (firstBefore > lastAfter) {
161
+ return fail(
162
+ plan,
163
+ `${describe(before, beforeMatch)} was only used after ${describe(after, afterMatch)}`
164
+ );
165
+ }
166
+ return pass;
167
+ }
168
+ };
169
+
170
+ // src/tracevals/graders/skill-invoked.ts
171
+ function validateOptions3(options) {
172
+ return firstError(
173
+ requiredString(options, "skill"),
174
+ optionalEnum(options, "expect", ["used", "not-used"]),
175
+ validateWhen(options)
176
+ );
177
+ }
178
+ var skillInvokedGrader = {
179
+ kind: "skill-invoked",
180
+ validateOptions: validateOptions3,
181
+ grade({ trace, plan }) {
182
+ const options = plan.options ?? {};
183
+ const invalid = validateOptions3(options);
184
+ if (invalid !== void 0) return optionsError("skill-invoked", invalid);
185
+ const skill = options.skill;
186
+ const expect = options.expect ?? "used";
187
+ const window = windowFor(trace, plan);
188
+ if (window.empty) return skippedWindow(window);
189
+ const trigger = evaluateWhen(options, window);
190
+ if (!trigger.armed) return skippedTrigger(trigger);
191
+ const used = window.skillInvocations.some((s) => s.name === skill);
192
+ if (expect === "used" && !used) {
193
+ return fail(plan, `skill ${skill} was never invoked`);
194
+ }
195
+ if (expect === "not-used" && used) {
196
+ return fail(plan, `skill ${skill} was invoked but must not be`);
197
+ }
198
+ return pass;
199
+ }
200
+ };
201
+
202
+ // src/tracevals/graders/file-access.ts
203
+ var OPS = ["read", "write", "edit"];
204
+ function validateOptions4(options) {
205
+ return firstError(
206
+ requiredString(options, "path"),
207
+ optionalEnum(options, "op", OPS),
208
+ optionalEnum(options, "expect", ["accessed", "not-accessed"]),
209
+ validateWhen(options)
210
+ );
211
+ }
212
+ function matches(accessPath, spec) {
213
+ return matchesGlob(accessPath, spec);
214
+ }
215
+ var fileAccessGrader = {
216
+ kind: "file-access",
217
+ validateOptions: validateOptions4,
218
+ grade({ trace, plan }) {
219
+ const options = plan.options ?? {};
220
+ const invalid = validateOptions4(options);
221
+ if (invalid !== void 0) return optionsError("file-access", invalid);
222
+ const path = options.path;
223
+ const op = options.op;
224
+ const expect = options.expect ?? "accessed";
225
+ const window = windowFor(trace, plan);
226
+ if (window.empty) return skippedWindow(window);
227
+ const trigger = evaluateWhen(options, window);
228
+ if (!trigger.armed) return skippedTrigger(trigger);
229
+ const accessed = window.fileAccesses.some(
230
+ (a) => matches(a.path, path) && (op === void 0 || a.op === op)
231
+ );
232
+ const opLabel = op ?? "any";
233
+ if (expect === "accessed" && !accessed) {
234
+ return fail(plan, `file ${path} was never accessed (op: ${opLabel})`);
235
+ }
236
+ if (expect === "not-accessed" && accessed) {
237
+ return fail(plan, `file ${path} was accessed (op: ${opLabel}) but must not be`);
238
+ }
239
+ return pass;
240
+ }
241
+ };
242
+
243
+ // src/tracevals/graders/turn-count.ts
244
+ function validateOptions5(options) {
245
+ return firstError(
246
+ requireOneOf(options, ["min", "max"]),
247
+ optionalNumber(options, "min", { min: 0, integer: true }),
248
+ optionalNumber(options, "max", { min: 0, integer: true }),
249
+ orderedBounds(options, "min", "max"),
250
+ validateWhen(options)
251
+ );
252
+ }
253
+ var turnCountGrader = {
254
+ kind: "turn-count",
255
+ validateOptions: validateOptions5,
256
+ grade({ trace, plan }) {
257
+ const options = plan.options ?? {};
258
+ const invalid = validateOptions5(options);
259
+ if (invalid !== void 0) return optionsError("turn-count", invalid);
260
+ const window = windowFor(trace, plan);
261
+ if (window.empty) return skippedWindow(window);
262
+ const trigger = evaluateWhen(options, window);
263
+ if (!trigger.armed) return skippedTrigger(trigger);
264
+ const { turnCount } = window;
265
+ if (typeof options.max === "number" && turnCount > options.max) {
266
+ return fail(plan, `${turnCount} turn(s); at most ${options.max} allowed`);
267
+ }
268
+ if (typeof options.min === "number" && turnCount < options.min) {
269
+ return fail(plan, `${turnCount} turn(s); at least ${options.min} required`);
270
+ }
271
+ return pass;
272
+ }
273
+ };
274
+
275
+ // src/tracevals/graders/cost.ts
276
+ function validateOptions6(options) {
277
+ return firstError(
278
+ requireOneOf(options, ["maxUsd", "maxTokens"]),
279
+ optionalNumber(options, "maxUsd", { min: 0 }),
280
+ optionalNumber(options, "maxTokens", { min: 0 }),
281
+ rejectWhen("cost", options)
282
+ );
283
+ }
284
+ var costGrader = {
285
+ kind: "cost",
286
+ validateOptions: validateOptions6,
287
+ grade({ trace, plan }) {
288
+ const options = plan.options ?? {};
289
+ const invalid = validateOptions6(options);
290
+ if (invalid !== void 0) return optionsError("cost", invalid);
291
+ const usage = trace.usage;
292
+ const skips = [];
293
+ let checked = false;
294
+ if (typeof options.maxUsd === "number") {
295
+ if (usage?.totalCostUsd === void 0) {
296
+ skips.push("no cost data (maxUsd not checkable)");
297
+ } else {
298
+ checked = true;
299
+ if (usage.totalCostUsd > options.maxUsd) {
300
+ return fail(
301
+ plan,
302
+ `session cost $${usage.totalCostUsd.toFixed(4)}; at most $${options.maxUsd} allowed`
303
+ );
304
+ }
305
+ }
306
+ }
307
+ if (typeof options.maxTokens === "number") {
308
+ if (usage === void 0) {
309
+ skips.push("no usage data (maxTokens not checkable)");
310
+ } else {
311
+ checked = true;
312
+ const total = usage.inputTokens + usage.outputTokens;
313
+ if (total > options.maxTokens) {
314
+ return fail(
315
+ plan,
316
+ `session used ${total} tokens; at most ${options.maxTokens} allowed`
317
+ );
318
+ }
319
+ }
320
+ }
321
+ if (!checked && skips.length > 0) {
322
+ return {
323
+ findings: [],
324
+ skipped: `trace carries insufficient cost data: ${skips.join("; ")}`
325
+ };
326
+ }
327
+ return pass;
328
+ }
329
+ };
330
+
331
+ // src/tracevals/core/target.ts
332
+ import { readFileSync } from "node:fs";
333
+ import { isAbsolute, relative, resolve, sep } from "node:path";
334
+ var DEFAULT_TARGET = "transcript";
335
+ function describeTarget(target) {
336
+ const t = target ?? DEFAULT_TARGET;
337
+ return typeof t === "string" ? t : `file ${t.path}`;
338
+ }
339
+ function readTarget(target, ctx) {
340
+ const t = target ?? DEFAULT_TARGET;
341
+ if (t === "transcript") {
342
+ return { ok: true, text: ctx.renderedTrace, label: "transcript" };
343
+ }
344
+ if (t === "last-message") {
345
+ const last = ctx.trace.assistantTexts.at(-1);
346
+ return { ok: true, text: last ?? "", label: "last-message" };
347
+ }
348
+ if (t === "files") {
349
+ const paths = [...new Set(ctx.trace.fileAccesses.map((f) => f.path))];
350
+ return { ok: true, text: paths.join("\n"), label: "files" };
351
+ }
352
+ if (t === "artifact") {
353
+ return { ok: true, text: ctx.artifactContent, label: "artifact" };
354
+ }
355
+ if (isAbsolute(t.path)) {
356
+ return {
357
+ ok: false,
358
+ reason: `target file "${t.path}" is an absolute path; name it relative to the project root`
359
+ };
360
+ }
361
+ const abs = resolve(ctx.root, t.path);
362
+ const rel = relative(ctx.root, abs);
363
+ if (rel === ".." || rel.startsWith(`..${sep}`) || isAbsolute(rel)) {
364
+ return {
365
+ ok: false,
366
+ reason: `target file "${t.path}" resolves outside the project root`
367
+ };
368
+ }
369
+ try {
370
+ return { ok: true, text: readFileSync(abs, "utf8"), label: `file ${t.path}` };
371
+ } catch (err) {
372
+ const code = err.code ?? "unknown error";
373
+ return { ok: false, reason: `target file "${t.path}" could not be read (${code})` };
374
+ }
375
+ }
376
+
377
+ // src/tracevals/graders/regex.ts
378
+ function checkFlags(options) {
379
+ const flags = options.flags;
380
+ if (flags === void 0) return void 0;
381
+ if (typeof flags !== "string") return "options.flags must be a string";
382
+ try {
383
+ new RegExp("", flags);
384
+ } catch (err) {
385
+ return `options.flags is invalid: ${err.message}`;
386
+ }
387
+ return void 0;
388
+ }
389
+ function checkPattern(options) {
390
+ const required = requiredString(options, "pattern");
391
+ if (required !== void 0) return required;
392
+ try {
393
+ new RegExp(
394
+ options.pattern,
395
+ options.flags ?? ""
396
+ );
397
+ } catch (err) {
398
+ return `options.pattern is not a valid regular expression: ${err.message}`;
399
+ }
400
+ return void 0;
401
+ }
402
+ function validateOptions7(options) {
403
+ return firstError(
404
+ checkFlags(options),
405
+ checkPattern(options),
406
+ optionalEnum(options, "on", ["assistant", "user", "all"]),
407
+ optionalEnum(options, "expect", ["match", "no-match"]),
408
+ validateWhen(options)
409
+ );
410
+ }
411
+ var regexGrader = {
412
+ kind: "regex",
413
+ validateOptions: validateOptions7,
414
+ grade({ trace, plan, projectRoot }) {
415
+ const options = plan.options ?? {};
416
+ const invalid = validateOptions7(options);
417
+ if (invalid !== void 0) return optionsError("regex", invalid);
418
+ const pattern = options.pattern;
419
+ const re = new RegExp(pattern, options.flags ?? "");
420
+ const on = options.on ?? "assistant";
421
+ const expect = options.expect ?? "match";
422
+ const window = windowFor(trace, plan);
423
+ if (window.empty) return skippedWindow(window);
424
+ const trigger = evaluateWhen(options, window);
425
+ if (!trigger.armed) return skippedTrigger(trigger);
426
+ const target = plan.target ?? "transcript";
427
+ let corpus;
428
+ let where;
429
+ if (target === "transcript") {
430
+ corpus = on === "user" ? window.userMessages : on === "all" ? [...window.userMessages, ...window.assistantTexts] : window.assistantTexts;
431
+ where = `${on} text`;
432
+ } else {
433
+ const selected = readTarget(target, {
434
+ trace,
435
+ // Never consulted: `transcript` took the branch above.
436
+ renderedTrace: "",
437
+ artifactContent: plan.artifact.content,
438
+ root: projectRoot ?? trace.cwd
439
+ });
440
+ if (!selected.ok) return optionsError("regex", selected.reason);
441
+ corpus = [selected.text];
442
+ where = selected.label;
443
+ }
444
+ const matched = corpus.some((text) => re.test(text));
445
+ if (expect === "match" && !matched) {
446
+ return fail(plan, `pattern /${pattern}/ never matched ${where}`);
447
+ }
448
+ if (expect === "no-match" && matched) {
449
+ return fail(plan, `pattern /${pattern}/ matched ${where} but must not`);
450
+ }
451
+ return pass;
452
+ }
453
+ };
454
+
455
+ // src/tracevals/graders/json-output.ts
456
+ import { Ajv2020 } from "ajv/dist/2020.js";
457
+ var compiled = /* @__PURE__ */ new Map();
458
+ function compileSchema(schema) {
459
+ const key = JSON.stringify(schema);
460
+ const hit = compiled.get(key);
461
+ if (hit !== void 0) return hit;
462
+ const built = new Ajv2020({ allErrors: true, strict: false }).compile(schema);
463
+ compiled.set(key, built);
464
+ return built;
465
+ }
466
+ function validateOptions8(options) {
467
+ const schema = options.schema;
468
+ if (schema === void 0 || schema === null || typeof schema !== "object" || Array.isArray(schema)) {
469
+ return "options.schema is required and must be a JSON Schema object";
470
+ }
471
+ return rejectWhen("json-output", options);
472
+ }
473
+ var jsonOutputGrader = {
474
+ kind: "json-output",
475
+ validateOptions: validateOptions8,
476
+ grade({ trace, plan }) {
477
+ const options = plan.options ?? {};
478
+ const invalid = validateOptions8(options);
479
+ if (invalid !== void 0) return optionsError("json-output", invalid);
480
+ const schema = options.schema;
481
+ const last = trace.assistantTexts.at(-1);
482
+ if (last === void 0) {
483
+ return fail(plan, "session produced no assistant text to validate");
484
+ }
485
+ let data;
486
+ try {
487
+ data = JSON.parse(last);
488
+ } catch {
489
+ return fail(plan, "final assistant output is not valid JSON");
490
+ }
491
+ let validate;
492
+ try {
493
+ validate = compileSchema(schema);
494
+ } catch (err) {
495
+ return optionsError(
496
+ "json-output",
497
+ `schema failed to compile: ${err.message}`
498
+ );
499
+ }
500
+ if (validate(data)) return pass;
501
+ const errors = (validate.errors ?? []).map((e) => `${e.instancePath || "/"} ${e.message ?? "invalid"}`).join("; ");
502
+ return fail(plan, `final assistant output does not match the schema: ${errors}`);
503
+ }
504
+ };
505
+
506
+ // src/tracevals/graders/command.ts
507
+ import { createHash } from "node:crypto";
508
+ var DEFAULT_TIMEOUT_MS = 3e4;
509
+ var STDERR_LIMIT = 2e3;
510
+ var commandGrader = {
511
+ kind: "command",
512
+ async grade(ctx) {
513
+ const { plan, trace } = ctx;
514
+ if (!plan.command || plan.command.length === 0) {
515
+ return {
516
+ findings: [],
517
+ error: "command-graded eval has no `command`; add one (or remove the eval) \u2014 manni tracevals does not generate check scripts"
518
+ };
519
+ }
520
+ if (plan.generatedAssertionHash !== void 0) {
521
+ if (plan.assertion === void 0) {
522
+ return {
523
+ findings: [],
524
+ error: "generated-assertion-hash is present but the eval has no assertion, so the hash cannot be checked against anything; remove the hash or restore the assertion"
525
+ };
526
+ }
527
+ const actual = createHash("sha256").update(plan.assertion).digest("hex");
528
+ if (actual !== plan.generatedAssertionHash) {
529
+ return {
530
+ findings: [],
531
+ error: `assertion has changed since the command was generated (generated-assertion-hash ${plan.generatedAssertionHash.slice(0, 12)}\u2026, assertion now hashes to ${actual.slice(0, 12)}\u2026); regenerate the command or update the hash`
532
+ };
533
+ }
534
+ }
535
+ const argv = plan.command.map((part) => part.replaceAll("{trace}", trace.file));
536
+ const timeoutMs = plan.timeoutMs ?? DEFAULT_TIMEOUT_MS;
537
+ const successCodes = plan.successExitCodes ?? [0];
538
+ const run = await execute(argv, ctx.projectRoot ?? trace.cwd, timeoutMs);
539
+ if (run.timedOut) {
540
+ return {
541
+ findings: [],
542
+ error: `command timed out after ${timeoutMs}ms: ${argv.join(" ")}`
543
+ };
544
+ }
545
+ if (run.spawnError !== void 0) {
546
+ return { findings: [], error: `could not run command: ${run.spawnError}` };
547
+ }
548
+ if (run.code !== null && successCodes.includes(run.code)) {
549
+ return { findings: [] };
550
+ }
551
+ const detail = run.stderr.trim();
552
+ return {
553
+ findings: [
554
+ {
555
+ evalName: plan.evalName,
556
+ artifact: plan.artifact.path,
557
+ severity: plan.severity,
558
+ message: `command exited ${run.code ?? "on a signal"} (expected ${successCodes.join(" or ")}). Redo the session work so the check passes, or fix the command if it is broken.` + (detail ? ` Output: ${detail.slice(0, STDERR_LIMIT)}` : "")
559
+ }
560
+ ]
561
+ };
562
+ }
563
+ };
564
+ async function execute(argv, cwd, timeoutMs) {
565
+ const result = await realExec(argv, { cwd, timeoutMs });
566
+ return {
567
+ code: result.code,
568
+ // Capped here, not merely when printed: a check script can write far more
569
+ // to stderr than a report should carry.
570
+ stderr: result.stderr.slice(0, STDERR_LIMIT),
571
+ timedOut: result.timedOut,
572
+ ...result.spawnError === void 0 ? {} : { spawnError: result.spawnError }
573
+ };
574
+ }
575
+
576
+ // src/tracevals/graders/registry.ts
577
+ var graders = new Map(
578
+ [
579
+ toolUsageGrader,
580
+ toolOrderGrader,
581
+ skillInvokedGrader,
582
+ fileAccessGrader,
583
+ turnCountGrader,
584
+ costGrader,
585
+ regexGrader,
586
+ jsonOutputGrader,
587
+ commandGrader
588
+ ].map((g) => [g.kind, g])
589
+ );
590
+ var BUILTIN_GRADER_KINDS = new Set(graders.keys());
591
+ function registerGrader(grader) {
592
+ graders.set(grader.kind, grader);
593
+ }
594
+ function graderFor(kind) {
595
+ return graders.get(kind);
596
+ }
597
+ function listGraderKinds() {
598
+ return [...graders.keys()];
599
+ }
600
+
601
+ // src/tracevals/judge/prompt.ts
602
+ var PROMPT_VERSION = 4;
603
+ var 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 \u2014 a skill definition, an agent definition, or project rules.
604
+
605
+ The 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.
606
+
607
+ Decide whether the session adhered to the assertion:
608
+ - "pass" only when the session fully satisfied it.
609
+ - "partial" when it partly satisfied it.
610
+ - "fail" when it violated it or plainly did not do it.
611
+
612
+ Ground every judgment in the graded content: quote or cite the specific part of it \u2014 a message, a tool call, a line, or a telling omission \u2014 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.
613
+
614
+ Respond with a single JSON object matching the provided schema. No prose outside the JSON.`;
615
+ var MAX_ARTIFACT_CHARS = 8e3;
616
+ function artifactWasTruncated(content) {
617
+ return content.length > MAX_ARTIFACT_CHARS;
618
+ }
619
+ function buildUserContent(plan, graded, targetLabel = "transcript") {
620
+ const parts = [];
621
+ parts.push(`# Assertion
622
+ ${plan.assertion ?? ""}`);
623
+ if (plan.evidence) {
624
+ parts.push(`# Where to look
625
+ ${plan.evidence}`);
626
+ }
627
+ if (plan.examples?.pass?.length) {
628
+ parts.push(`# Examples of passing behavior
629
+ - ${plan.examples.pass.join("\n- ")}`);
630
+ }
631
+ if (plan.examples?.fail?.length) {
632
+ parts.push(`# Examples of failing behavior
633
+ - ${plan.examples.fail.join("\n- ")}`);
634
+ }
635
+ let artifactBody = plan.artifact.content;
636
+ if (artifactBody.length > MAX_ARTIFACT_CHARS) {
637
+ artifactBody = `${artifactBody.slice(0, MAX_ARTIFACT_CHARS)}
638
+ [... artifact truncated ...]`;
639
+ }
640
+ const gradingTheArtifact = targetLabel === "artifact";
641
+ const artifactHeading = `${plan.artifact.type} ("${plan.artifact.name}")`;
642
+ if (!gradingTheArtifact) {
643
+ parts.push(`# Source ${artifactHeading}
644
+ ${artifactBody}`);
645
+ }
646
+ parts.push(
647
+ targetLabel === "transcript" ? `# Session transcript
648
+ ${graded}` : gradingTheArtifact ? `# Graded content: the ${artifactHeading} itself
649
+ ${artifactBody}` : `# Graded content (${targetLabel})
650
+ ${graded}`
651
+ );
652
+ return parts.join("\n\n");
653
+ }
654
+
655
+ // src/tracevals/judge/cache.ts
656
+ import { JsonCache, buildCacheKey, sha256 } from "@hawkeyexl/inference";
657
+ var VerdictCache = class _VerdictCache extends JsonCache {
658
+ /** An ensemble is cacheable only if every run produced a verdict. */
659
+ static usable(runs) {
660
+ return runs.every((r) => r.error === void 0 && r.verdict !== void 0);
661
+ }
662
+ set(key, value) {
663
+ if (!_VerdictCache.usable(value)) return;
664
+ super.set(key, value);
665
+ }
666
+ get(key) {
667
+ const hit = super.get(key);
668
+ if (hit === void 0) return void 0;
669
+ return _VerdictCache.usable(hit) ? hit : void 0;
670
+ }
671
+ };
672
+ function cacheKey(provider, model, runs, temperature, renderedTrace, plan, promptVersion = PROMPT_VERSION) {
673
+ const planFingerprint = JSON.stringify({
674
+ assertion: plan.assertion,
675
+ evidence: plan.evidence,
676
+ examples: plan.examples,
677
+ artifact: plan.artifact.content
678
+ });
679
+ return buildCacheKey([
680
+ provider,
681
+ model,
682
+ `v${promptVersion}`,
683
+ `r${runs}`,
684
+ `t${temperature}`,
685
+ // Pre-hashed: traces and artifacts are large, and key parts stay short.
686
+ sha256(renderedTrace),
687
+ sha256(planFingerprint)
688
+ ]);
689
+ }
690
+
691
+ // src/tracevals/judge/trace-judge.ts
692
+ import {
693
+ computeConsensus,
694
+ runEnsemble,
695
+ zoneFor
696
+ } from "@hawkeyexl/inference";
697
+
698
+ // src/tracevals/judge/verdict-schema.json
699
+ var verdict_schema_default = {
700
+ $schema: "https://json-schema.org/draft/2020-12/schema",
701
+ $id: "manni:tracevals:verdict",
702
+ title: "manni tracevals judge verdict",
703
+ type: "object",
704
+ required: ["claim", "observed", "match", "confidence", "reasoning"],
705
+ properties: {
706
+ claim: {
707
+ type: "string",
708
+ description: "The specific instruction or assertion under evaluation."
709
+ },
710
+ observed: {
711
+ type: "string",
712
+ description: "What actually happened in the session, citing specific messages, tool calls, or instructions followed/violated."
713
+ },
714
+ match: {
715
+ enum: ["pass", "fail", "partial"],
716
+ description: "pass only if the session fully adhered; partial for partial adherence."
717
+ },
718
+ confidence: {
719
+ type: "number",
720
+ minimum: 0,
721
+ maximum: 1,
722
+ description: "Self-reported confidence in this verdict."
723
+ },
724
+ reasoning: {
725
+ type: "string",
726
+ description: "Why this conclusion was reached."
727
+ }
728
+ },
729
+ additionalProperties: false
730
+ };
731
+
732
+ // src/tracevals/judge/trace-judge.ts
733
+ var verdictSchema = verdict_schema_default;
734
+ function makeTraceJudge(options) {
735
+ const provider = options.provider;
736
+ const runsFor = (plan) => options.runs ?? plan.runs ?? 3;
737
+ const temperature = options.temperature ?? 0;
738
+ const zones = options.zones ?? { autoPass: 0.8, autoFail: 0.8 };
739
+ const cache = new VerdictCache(
740
+ options.cacheDir ?? ".manni/tracevals/cache",
741
+ options.noCache !== true && options.cacheDir !== void 0,
742
+ "manni-tracevals"
743
+ );
744
+ const maxTurns = options.maxTurns ?? null;
745
+ let turnsSpent = 0;
746
+ return async (plans, renderFor, context) => {
747
+ const trace = context?.trace;
748
+ const sessionModel = trace?.model;
749
+ const results = [];
750
+ for (const plan of plans) {
751
+ const start = Date.now();
752
+ const base = {
753
+ evalName: plan.evalName,
754
+ artifact: plan.artifact.path,
755
+ artifactName: plan.artifact.name,
756
+ grader: plan.grader,
757
+ implicit: plan.implicit
758
+ };
759
+ let evalProvider = provider;
760
+ if (plan.provider !== void 0 || plan.model !== void 0) {
761
+ const resolved = await resolveOverride(plan, options);
762
+ if ("error" in resolved) {
763
+ results.push({
764
+ ...base,
765
+ outcome: "error",
766
+ error: resolved.error,
767
+ turns: 0,
768
+ durationMs: Date.now() - start
769
+ });
770
+ continue;
771
+ }
772
+ evalProvider = resolved.provider;
773
+ }
774
+ const renderedTrace = renderFor(plan);
775
+ const selected = trace === void 0 ? plan.target === void 0 || plan.target === "transcript" || plan.target === "artifact" ? {
776
+ ok: true,
777
+ text: plan.target === "artifact" ? plan.artifact.content : renderedTrace,
778
+ label: plan.target === "artifact" ? "artifact" : "transcript"
779
+ } : {
780
+ ok: false,
781
+ reason: `target "${describeTarget(plan.target)}" needs the parsed session, which this run did not supply`
782
+ } : readTarget(plan.target, {
783
+ trace,
784
+ renderedTrace,
785
+ artifactContent: plan.artifact.content,
786
+ root: context?.projectRoot ?? trace.cwd
787
+ });
788
+ if (!selected.ok) {
789
+ results.push({
790
+ ...base,
791
+ outcome: "error",
792
+ error: selected.reason,
793
+ turns: 0,
794
+ durationMs: Date.now() - start
795
+ });
796
+ continue;
797
+ }
798
+ const runsPerEval = runsFor(plan);
799
+ const key = cacheKey(
800
+ evalProvider.provider(),
801
+ evalProvider.modelName(),
802
+ runsPerEval,
803
+ temperature,
804
+ // The selected bytes, not always the transcript: two targets on one
805
+ // session are two different questions and must not share a verdict.
806
+ selected.text,
807
+ plan
808
+ );
809
+ const cached = cache.get(key) !== void 0;
810
+ if (maxTurns !== null && !cached) {
811
+ if (turnsSpent + runsPerEval > maxTurns) {
812
+ results.push({
813
+ ...base,
814
+ outcome: "skipped",
815
+ skipReason: turnBudgetSkipReason(maxTurns),
816
+ turns: 0,
817
+ durationMs: 0
818
+ });
819
+ continue;
820
+ }
821
+ turnsSpent += runsPerEval;
822
+ }
823
+ const runs = await runEnsemble({
824
+ provider: evalProvider,
825
+ system: JUDGE_SYSTEM_PROMPT,
826
+ user: buildUserContent(plan, selected.text, selected.label),
827
+ runs: runsPerEval,
828
+ temperature,
829
+ schema: verdictSchema,
830
+ cache,
831
+ cacheKey: key,
832
+ label: "manni-tracevals"
833
+ });
834
+ const consensusBase = computeConsensus(runs);
835
+ const zone = zoneFor(consensusBase, zones);
836
+ const consensus = { ...consensusBase, zone };
837
+ const judgeModel = evalProvider.modelName();
838
+ const selfPreference = sessionModel !== void 0 && sessionModel === judgeModel ? { axis: "session", model: judgeModel } : plan.proposedBy?.includes(judgeModel) === true ? { axis: "criterion", model: judgeModel } : void 0;
839
+ results.push({
840
+ ...base,
841
+ outcome: zone === "auto-pass" ? "pass" : zone === "auto-fail" ? "fail" : "needs-review",
842
+ consensus,
843
+ turns: cached ? 0 : runsPerEval,
844
+ ...selfPreference ? { selfPreference } : {},
845
+ durationMs: Date.now() - start
846
+ });
847
+ }
848
+ return results;
849
+ };
850
+ }
851
+ async function resolveOverride(plan, options) {
852
+ const named = plan.provider !== void 0 ? `provider "${plan.provider}"` : `model "${plan.model ?? ""}"`;
853
+ if (options.providerFor === void 0) {
854
+ return {
855
+ error: `eval names ${named}, but this run cannot construct providers by name`
856
+ };
857
+ }
858
+ try {
859
+ return {
860
+ provider: await options.providerFor({
861
+ ...plan.provider !== void 0 ? { provider: plan.provider } : {},
862
+ ...plan.model !== void 0 ? { model: plan.model } : {},
863
+ origin: `eval "${plan.evalName}" in ${plan.artifact.path}`
864
+ })
865
+ };
866
+ } catch (err) {
867
+ return {
868
+ error: `could not construct ${named}${plan.provider === void 0 || plan.model === void 0 ? "" : ` at model "${plan.model}"`} for this eval: ${err instanceof Error ? err.message : String(err)}`
869
+ };
870
+ }
871
+ }
872
+
873
+ export {
874
+ BUILTIN_GRADER_KINDS,
875
+ registerGrader,
876
+ graderFor,
877
+ listGraderKinds,
878
+ PROMPT_VERSION,
879
+ JUDGE_SYSTEM_PROMPT,
880
+ MAX_ARTIFACT_CHARS,
881
+ artifactWasTruncated,
882
+ buildUserContent,
883
+ sha256,
884
+ VerdictCache,
885
+ cacheKey,
886
+ makeTraceJudge
887
+ };
888
+ //# sourceMappingURL=chunk-TT5UDTDM.js.map