@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.
- package/README.md +1 -1
- package/dist/{batch-C534YIAU.js → batch-C3NN2YXB.js} +20 -21
- package/dist/build-CEVEAHN7.js +36 -0
- package/dist/calibrate-CSKPY5AK.js +42 -0
- package/dist/capture-3HDBIHH6.js +37 -0
- package/dist/check-555TCJGF.js +45 -0
- package/dist/check-KGJBV42O.js +30 -0
- package/dist/{check-JZINDP3F.js → check-KXWHSCCR.js} +13 -16
- package/dist/check-MZSXCS2M.js +33 -0
- package/dist/{check-LKPQPQWJ.js → check-QNHLTYPN.js} +23 -23
- package/dist/{chunk-AE6KBAAU.js → chunk-2VLZDU4E.js} +5 -5
- package/dist/{chunk-ARNI3SJT.js → chunk-37Q7WEJJ.js} +9 -9
- package/dist/{chunk-PTGXEZQD.js → chunk-3ZVRGBK6.js} +4 -4
- package/dist/{chunk-DMVBIIP3.js → chunk-46MMIJWR.js} +3 -3
- package/dist/{chunk-CREFJCWZ.js → chunk-4LYVTR2T.js} +4 -4
- package/dist/{chunk-BXE4L52Q.js → chunk-562QZKAB.js} +6599 -3508
- package/dist/chunk-562QZKAB.js.map +1 -0
- package/dist/{chunk-BLXRIAV2.js → chunk-57LZPG4V.js} +29 -4
- package/dist/chunk-57LZPG4V.js.map +1 -0
- package/dist/{chunk-SHXPE4D4.js → chunk-5LQX57BW.js} +2 -2
- package/dist/{chunk-SHXPE4D4.js.map → chunk-5LQX57BW.js.map} +1 -1
- package/dist/{chunk-BKY6GAFA.js → chunk-63EQKVNT.js} +45 -910
- package/dist/chunk-63EQKVNT.js.map +1 -0
- package/dist/{chunk-TFVNEPMF.js → chunk-64DULZIG.js} +4 -4
- package/dist/{chunk-2HOWRAWK.js → chunk-6SVHI2U6.js} +2 -2
- package/dist/{chunk-D4QHRVDJ.js → chunk-6UHEMPEY.js} +3 -157
- package/dist/chunk-6UHEMPEY.js.map +1 -0
- package/dist/{chunk-DENZLZ3Z.js → chunk-A5YUK3SG.js} +26 -17
- package/dist/chunk-A5YUK3SG.js.map +1 -0
- package/dist/{chunk-XI3BNZG4.js → chunk-A67EJ3J6.js} +6 -6
- package/dist/{chunk-HHJ2HFPP.js → chunk-BLDL23RY.js} +8 -8
- package/dist/{chunk-RQPEKHZH.js → chunk-BY3635RR.js} +80 -16
- package/dist/chunk-BY3635RR.js.map +1 -0
- package/dist/{chunk-CFMI74TP.js → chunk-BZ74YUYE.js} +2 -2
- package/dist/{chunk-5UJKXOAD.js → chunk-CHTSA3YR.js} +6 -6
- package/dist/{chunk-FHJIH6XP.js → chunk-CPYQ4BJK.js} +16 -7
- package/dist/chunk-CPYQ4BJK.js.map +1 -0
- package/dist/{chunk-IN5T22FP.js → chunk-CQTESLC5.js} +2 -2
- package/dist/{chunk-245W2Q7C.js → chunk-D4BGNAN5.js} +2 -2
- package/dist/{chunk-762MM6NA.js → chunk-E3HYSNS6.js} +4 -4
- package/dist/{chunk-DPDG3FHL.js → chunk-EL2KNRC3.js} +3 -3
- package/dist/{chunk-LWBNHK72.js → chunk-FTSNG6DZ.js} +42 -24
- package/dist/chunk-FTSNG6DZ.js.map +1 -0
- package/dist/{chunk-KCWNJMSS.js → chunk-FXE5K56B.js} +3 -3
- package/dist/{chunk-CLPC3LKX.js → chunk-HYEKQ22B.js} +4 -4
- package/dist/{chunk-VLRIP4BQ.js → chunk-IC3FJWIF.js} +2 -2
- package/dist/{chunk-CZIO37J5.js → chunk-IDDRHB7E.js} +3 -3
- package/dist/chunk-INOVEO32.js +28 -0
- package/dist/chunk-INOVEO32.js.map +1 -0
- package/dist/chunk-IXFFVI5S.js +409 -0
- package/dist/chunk-IXFFVI5S.js.map +1 -0
- package/dist/{chunk-BHGFLRXM.js → chunk-JA7DWOVV.js} +5 -5
- package/dist/{chunk-B2242FYO.js → chunk-JF4BC7ZD.js} +38 -3
- package/dist/chunk-JF4BC7ZD.js.map +1 -0
- package/dist/{chunk-RKACUTY5.js → chunk-JL5FHNQK.js} +9 -11
- package/dist/{chunk-RKACUTY5.js.map → chunk-JL5FHNQK.js.map} +1 -1
- package/dist/{chunk-MTCOBRCX.js → chunk-JVE5YQN4.js} +4 -4
- package/dist/{chunk-6XK3NTL5.js → chunk-K5LBIAOM.js} +32 -38
- package/dist/chunk-K5LBIAOM.js.map +1 -0
- package/dist/{chunk-E7OG5F6S.js → chunk-KIUFBUUZ.js} +13 -11
- package/dist/{chunk-E7OG5F6S.js.map → chunk-KIUFBUUZ.js.map} +1 -1
- package/dist/{chunk-Q76T6Y6X.js → chunk-LCMBG4LY.js} +3635 -3409
- package/dist/chunk-LCMBG4LY.js.map +1 -0
- package/dist/{chunk-BXCVOHEX.js → chunk-LMS2RWDS.js} +15 -13
- package/dist/{chunk-BXCVOHEX.js.map → chunk-LMS2RWDS.js.map} +1 -1
- package/dist/{chunk-IOJD2RFG.js → chunk-MR5JWMC2.js} +2 -2
- package/dist/{chunk-JCTHXG33.js → chunk-NHOGTAPK.js} +2 -2
- package/dist/{chunk-VM7VAFJW.js → chunk-NVYDWVXN.js} +2 -1
- package/dist/{chunk-NLJ3XIKT.js → chunk-O6IDYZVW.js} +3 -3
- package/dist/{chunk-E23KWEPL.js → chunk-OHMLEITS.js} +2 -2
- package/dist/{chunk-NUQF5F5J.js → chunk-PNDEKFF3.js} +2 -2
- package/dist/{chunk-3SFAB75L.js → chunk-PX7OTUNU.js} +6 -6
- package/dist/{chunk-PACZEDOH.js → chunk-Q7FFJMFO.js} +19 -15
- package/dist/chunk-Q7FFJMFO.js.map +1 -0
- package/dist/{chunk-P7HAXMFN.js → chunk-QJJPTS6L.js} +5 -3
- package/dist/{chunk-P7HAXMFN.js.map → chunk-QJJPTS6L.js.map} +1 -1
- package/dist/chunk-RAN3CF33.js +1875 -0
- package/dist/chunk-RAN3CF33.js.map +1 -0
- package/dist/{chunk-H5YWCCBO.js → chunk-S7V4F7HC.js} +3 -3
- package/dist/{chunk-R2CR62JV.js → chunk-SCKVDD4E.js} +4 -4
- package/dist/{chunk-JUUCCML3.js → chunk-TJYJ4BNK.js} +4 -4
- package/dist/{chunk-JQA6RF4R.js → chunk-TR5TNPWT.js} +2 -2
- package/dist/{chunk-JQA6RF4R.js.map → chunk-TR5TNPWT.js.map} +1 -1
- package/dist/chunk-TT5UDTDM.js +888 -0
- package/dist/chunk-TT5UDTDM.js.map +1 -0
- package/dist/{chunk-22WGKOQ7.js → chunk-TWYJ2TVS.js} +7 -7
- package/dist/{chunk-U4OJ7U45.js → chunk-UQI463L3.js} +9 -9
- package/dist/{chunk-A4QNKEX4.js → chunk-V27DOGAO.js} +2 -2
- package/dist/{chunk-GMLOAKOA.js → chunk-VSDXZAQU.js} +4 -22
- package/dist/chunk-VSDXZAQU.js.map +1 -0
- package/dist/{chunk-YSZNJ2ID.js → chunk-VSHMXMBZ.js} +2 -2
- package/dist/{chunk-2NGFDLIM.js → chunk-VZSATUI7.js} +4 -4
- package/dist/{chunk-KQDRO6N6.js → chunk-W5OZMYMX.js} +2 -2
- package/dist/{chunk-XBJKYXOR.js → chunk-WW4JATBJ.js} +6 -6
- package/dist/{chunk-SSQZB5SQ.js → chunk-XG6PVB5S.js} +11 -1
- package/dist/chunk-XG6PVB5S.js.map +1 -0
- package/dist/{chunk-KBSTXL6L.js → chunk-XQKRD5A3.js} +4 -4
- package/dist/{chunk-2YKUSTHS.js → chunk-XSP3TUFN.js} +5 -5
- package/dist/{chunk-APAF4VWW.js → chunk-XTMONCQE.js} +6 -405
- package/dist/chunk-XTMONCQE.js.map +1 -0
- package/dist/{chunk-BJUEOC4G.js → chunk-YB3KD5RI.js} +3 -3
- package/dist/chunk-ZAOJYN2D.js +159 -0
- package/dist/chunk-ZAOJYN2D.js.map +1 -0
- package/dist/{chunk-OWJLB2AF.js → chunk-ZKIXGFID.js} +2 -2
- package/dist/{chunk-WHVFHBL3.js → chunk-ZT3ERG4B.js} +3 -3
- package/dist/chunk-ZTRC37NH.js +38 -0
- package/dist/chunk-ZTRC37NH.js.map +1 -0
- package/dist/{chunk-V2XJJEEF.js → chunk-ZW4YASUB.js} +4 -4
- package/dist/{chunk-5LE4NH3Z.js → chunk-ZX4TOTZS.js} +6 -4
- package/dist/{chunk-5LE4NH3Z.js.map → chunk-ZX4TOTZS.js.map} +1 -1
- package/dist/{cli-MOKRUHZT.js → cli-4QAH3DBX.js} +9 -11
- package/dist/{cli-3PBRPPMQ.js → cli-6476FRBK.js} +16 -19
- package/dist/{cli-3PBRPPMQ.js.map → cli-6476FRBK.js.map} +1 -1
- package/dist/{cli-FDXU7CGZ.js → cli-7XT7O5YM.js} +16 -19
- package/dist/{cli-FDXU7CGZ.js.map → cli-7XT7O5YM.js.map} +1 -1
- package/dist/{cli-AVHLY2AI.js → cli-FGCHGJYZ.js} +51 -50
- package/dist/cli-FGCHGJYZ.js.map +1 -0
- package/dist/{cli-FSDJY5OC.js → cli-JE4LG35H.js} +4 -4
- package/dist/{cli-JNYL6LB7.js → cli-U3622DIB.js} +14 -17
- package/dist/{cli-JNYL6LB7.js.map → cli-U3622DIB.js.map} +1 -1
- package/dist/{cli-MQXOK64K.js → cli-ULHJTJHH.js} +74 -42
- package/dist/cli-ULHJTJHH.js.map +1 -0
- package/dist/{cli-6NKE6RMT.js → cli-W7B2PNZO.js} +18 -21
- package/dist/{cli-6NKE6RMT.js.map → cli-W7B2PNZO.js.map} +1 -1
- package/dist/{cli-77A46SB2.js → cli-YGMXZ46V.js} +17 -20
- package/dist/{cli-77A46SB2.js.map → cli-YGMXZ46V.js.map} +1 -1
- package/dist/{cli-K47XWDLJ.js → cli-YINQL2NI.js} +28 -29
- package/dist/{cli-K47XWDLJ.js.map → cli-YINQL2NI.js.map} +1 -1
- package/dist/cli-Z3ART5DN.js +152 -0
- package/dist/cli-Z3ART5DN.js.map +1 -0
- package/dist/cli.js +15 -15
- package/dist/cli.js.map +1 -1
- package/dist/{config-BMWDC66C.js → config-2YJPJ36T.js} +5 -5
- package/dist/docmeta.js +8 -10
- package/dist/docmeta.js.map +1 -1
- package/dist/github-64ZVAUIT.js +28 -0
- package/dist/github-ARGPMQD2.js +32 -0
- package/dist/github-YHJABBUI.js +33 -0
- package/dist/graph/runtime.js.map +1 -1
- package/dist/{host-YSTYO5DX.js → host-JT27OWTC.js} +3 -3
- package/dist/index.d.ts +332 -23
- package/dist/index.js +218 -205
- package/dist/index.js.map +1 -1
- package/dist/{json-YIK72XAL.js → json-CVOVXB7O.js} +12 -15
- package/dist/json-QNGJFUY2.js +40 -0
- package/dist/{labels-X633ZPK7.js → labels-5WOKC3VR.js} +11 -14
- package/dist/{labels-X633ZPK7.js.map → labels-5WOKC3VR.js.map} +1 -1
- package/dist/lint-OQGB4DWJ.js +32 -0
- package/dist/list-EDAB7X5Y.js +30 -0
- package/dist/list-OQ3IYV2W.js +37 -0
- package/dist/list-PN6JKYNX.js +33 -0
- package/dist/{page-OMPEACUN.js → page-TPNMHL27.js} +11 -14
- package/dist/{prepare-B4JVDVOV.js → prepare-3V2QYBKL.js} +20 -22
- package/dist/{prepare-B4JVDVOV.js.map → prepare-3V2QYBKL.js.map} +1 -1
- package/dist/{pretty-PPNHHOEN.js → pretty-EZ2NFU3C.js} +13 -16
- package/dist/pretty-HO2LYG5N.js +41 -0
- package/dist/{pretty-U7ATCFBN.js → pretty-K3M4AW2D.js} +12 -15
- package/dist/{provider-JY2I3VLF.js → provider-YWNTTQPA.js} +3 -3
- package/dist/{release-VHHASAG7.js → release-EFLQT3FW.js} +3 -3
- package/dist/{reporters-KE7AZR6C.js → reporters-4R2E7PRJ.js} +6 -6
- package/dist/{reporters-FAIEOTC4.js → reporters-YVLLFBO5.js} +11 -14
- package/dist/run-H4BOR2FR.js +36 -0
- package/dist/{sarif-DOGRSGTB.js → sarif-GWHWJJFP.js} +10 -13
- package/dist/sarif-SJFVSOBV.js +33 -0
- package/dist/sarif-YBFD5OUL.js +28 -0
- package/dist/{strategy-EK5VY5DG.js → strategy-T56PH2VK.js} +29 -47
- package/dist/strategy-T56PH2VK.js.map +1 -0
- package/dist/{term-MDN3NJDW.js → term-33YSMISR.js} +18 -22
- package/dist/{term-MDN3NJDW.js.map → term-33YSMISR.js.map} +1 -1
- package/dist/{validate-QDYQ642J.js → validate-6R5UBDGU.js} +6 -7
- package/package.json +1 -1
- package/plugin/manni/.claude-plugin/plugin.json +1 -1
- package/plugin/manni/hooks/graph-server.mjs +3 -3
- package/plugin/manni/hooks/page-metadata.mjs +81 -7
- package/plugin/manni/skills/fix/SKILL.md +3 -3
- package/shapes/graph/shapes-1.3.0.ttl +1250 -0
- package/dist/build-SVKT7QFU.js +0 -39
- package/dist/calibrate-AL3MH7TY.js +0 -43
- package/dist/capture-2F7B4DAD.js +0 -39
- package/dist/check-BI7OGIVE.js +0 -48
- package/dist/check-OPUMZEVK.js +0 -35
- package/dist/check-OW7UD73D.js +0 -33
- package/dist/chunk-6XK3NTL5.js.map +0 -1
- package/dist/chunk-APAF4VWW.js.map +0 -1
- package/dist/chunk-B2242FYO.js.map +0 -1
- package/dist/chunk-BKY6GAFA.js.map +0 -1
- package/dist/chunk-BLXRIAV2.js.map +0 -1
- package/dist/chunk-BXE4L52Q.js.map +0 -1
- package/dist/chunk-D4QHRVDJ.js.map +0 -1
- package/dist/chunk-D5GBYKDU.js +0 -164
- package/dist/chunk-D5GBYKDU.js.map +0 -1
- package/dist/chunk-DENZLZ3Z.js.map +0 -1
- package/dist/chunk-FHJIH6XP.js.map +0 -1
- package/dist/chunk-GMLOAKOA.js.map +0 -1
- package/dist/chunk-LWBNHK72.js.map +0 -1
- package/dist/chunk-PACZEDOH.js.map +0 -1
- package/dist/chunk-Q76T6Y6X.js.map +0 -1
- package/dist/chunk-RQPEKHZH.js.map +0 -1
- package/dist/chunk-RWXR3GJI.js +0 -441
- package/dist/chunk-RWXR3GJI.js.map +0 -1
- package/dist/chunk-S5G6T4VC.js +0 -3200
- package/dist/chunk-S5G6T4VC.js.map +0 -1
- package/dist/chunk-SSQZB5SQ.js.map +0 -1
- package/dist/chunk-UP6NBQ62.js +0 -2
- package/dist/chunk-ZPLVANY2.js +0 -15
- package/dist/chunk-ZPLVANY2.js.map +0 -1
- package/dist/cli-AVHLY2AI.js.map +0 -1
- package/dist/cli-LP5OE3BL.js +0 -84
- package/dist/cli-LP5OE3BL.js.map +0 -1
- package/dist/cli-MQXOK64K.js.map +0 -1
- package/dist/github-6GYTPSGV.js +0 -35
- package/dist/github-DJOLVNDD.js +0 -31
- package/dist/github-ZF2TQ3RP.js +0 -35
- package/dist/json-Y7625EFE.js +0 -42
- package/dist/lint-RF3B55W7.js +0 -35
- package/dist/list-5DW4QZ7P.js +0 -36
- package/dist/list-7CHWJ633.js +0 -39
- package/dist/list-UNWG6NPD.js +0 -33
- package/dist/pretty-XGYQ25PH.js +0 -43
- package/dist/run-MHJ3AYKG.js +0 -39
- package/dist/sarif-MIEMQOIK.js +0 -30
- package/dist/sarif-RGRG7VFX.js +0 -36
- package/dist/strategy-EK5VY5DG.js.map +0 -1
- package/dist/validate-QDYQ642J.js.map +0 -1
- /package/dist/{batch-C534YIAU.js.map → batch-C3NN2YXB.js.map} +0 -0
- /package/dist/{build-SVKT7QFU.js.map → build-CEVEAHN7.js.map} +0 -0
- /package/dist/{calibrate-AL3MH7TY.js.map → calibrate-CSKPY5AK.js.map} +0 -0
- /package/dist/{capture-2F7B4DAD.js.map → capture-3HDBIHH6.js.map} +0 -0
- /package/dist/{check-BI7OGIVE.js.map → check-555TCJGF.js.map} +0 -0
- /package/dist/{check-JZINDP3F.js.map → check-KGJBV42O.js.map} +0 -0
- /package/dist/{check-OPUMZEVK.js.map → check-KXWHSCCR.js.map} +0 -0
- /package/dist/{check-OW7UD73D.js.map → check-MZSXCS2M.js.map} +0 -0
- /package/dist/{check-LKPQPQWJ.js.map → check-QNHLTYPN.js.map} +0 -0
- /package/dist/{chunk-AE6KBAAU.js.map → chunk-2VLZDU4E.js.map} +0 -0
- /package/dist/{chunk-ARNI3SJT.js.map → chunk-37Q7WEJJ.js.map} +0 -0
- /package/dist/{chunk-PTGXEZQD.js.map → chunk-3ZVRGBK6.js.map} +0 -0
- /package/dist/{chunk-DMVBIIP3.js.map → chunk-46MMIJWR.js.map} +0 -0
- /package/dist/{chunk-CREFJCWZ.js.map → chunk-4LYVTR2T.js.map} +0 -0
- /package/dist/{chunk-TFVNEPMF.js.map → chunk-64DULZIG.js.map} +0 -0
- /package/dist/{chunk-2HOWRAWK.js.map → chunk-6SVHI2U6.js.map} +0 -0
- /package/dist/{chunk-XI3BNZG4.js.map → chunk-A67EJ3J6.js.map} +0 -0
- /package/dist/{chunk-HHJ2HFPP.js.map → chunk-BLDL23RY.js.map} +0 -0
- /package/dist/{chunk-CFMI74TP.js.map → chunk-BZ74YUYE.js.map} +0 -0
- /package/dist/{chunk-5UJKXOAD.js.map → chunk-CHTSA3YR.js.map} +0 -0
- /package/dist/{chunk-IN5T22FP.js.map → chunk-CQTESLC5.js.map} +0 -0
- /package/dist/{chunk-245W2Q7C.js.map → chunk-D4BGNAN5.js.map} +0 -0
- /package/dist/{chunk-762MM6NA.js.map → chunk-E3HYSNS6.js.map} +0 -0
- /package/dist/{chunk-DPDG3FHL.js.map → chunk-EL2KNRC3.js.map} +0 -0
- /package/dist/{chunk-KCWNJMSS.js.map → chunk-FXE5K56B.js.map} +0 -0
- /package/dist/{chunk-CLPC3LKX.js.map → chunk-HYEKQ22B.js.map} +0 -0
- /package/dist/{chunk-VLRIP4BQ.js.map → chunk-IC3FJWIF.js.map} +0 -0
- /package/dist/{chunk-CZIO37J5.js.map → chunk-IDDRHB7E.js.map} +0 -0
- /package/dist/{chunk-BHGFLRXM.js.map → chunk-JA7DWOVV.js.map} +0 -0
- /package/dist/{chunk-MTCOBRCX.js.map → chunk-JVE5YQN4.js.map} +0 -0
- /package/dist/{chunk-IOJD2RFG.js.map → chunk-MR5JWMC2.js.map} +0 -0
- /package/dist/{chunk-JCTHXG33.js.map → chunk-NHOGTAPK.js.map} +0 -0
- /package/dist/{chunk-VM7VAFJW.js.map → chunk-NVYDWVXN.js.map} +0 -0
- /package/dist/{chunk-NLJ3XIKT.js.map → chunk-O6IDYZVW.js.map} +0 -0
- /package/dist/{chunk-E23KWEPL.js.map → chunk-OHMLEITS.js.map} +0 -0
- /package/dist/{chunk-NUQF5F5J.js.map → chunk-PNDEKFF3.js.map} +0 -0
- /package/dist/{chunk-3SFAB75L.js.map → chunk-PX7OTUNU.js.map} +0 -0
- /package/dist/{chunk-H5YWCCBO.js.map → chunk-S7V4F7HC.js.map} +0 -0
- /package/dist/{chunk-R2CR62JV.js.map → chunk-SCKVDD4E.js.map} +0 -0
- /package/dist/{chunk-JUUCCML3.js.map → chunk-TJYJ4BNK.js.map} +0 -0
- /package/dist/{chunk-22WGKOQ7.js.map → chunk-TWYJ2TVS.js.map} +0 -0
- /package/dist/{chunk-U4OJ7U45.js.map → chunk-UQI463L3.js.map} +0 -0
- /package/dist/{chunk-A4QNKEX4.js.map → chunk-V27DOGAO.js.map} +0 -0
- /package/dist/{chunk-YSZNJ2ID.js.map → chunk-VSHMXMBZ.js.map} +0 -0
- /package/dist/{chunk-2NGFDLIM.js.map → chunk-VZSATUI7.js.map} +0 -0
- /package/dist/{chunk-KQDRO6N6.js.map → chunk-W5OZMYMX.js.map} +0 -0
- /package/dist/{chunk-XBJKYXOR.js.map → chunk-WW4JATBJ.js.map} +0 -0
- /package/dist/{chunk-KBSTXL6L.js.map → chunk-XQKRD5A3.js.map} +0 -0
- /package/dist/{chunk-2YKUSTHS.js.map → chunk-XSP3TUFN.js.map} +0 -0
- /package/dist/{chunk-BJUEOC4G.js.map → chunk-YB3KD5RI.js.map} +0 -0
- /package/dist/{chunk-OWJLB2AF.js.map → chunk-ZKIXGFID.js.map} +0 -0
- /package/dist/{chunk-WHVFHBL3.js.map → chunk-ZT3ERG4B.js.map} +0 -0
- /package/dist/{chunk-V2XJJEEF.js.map → chunk-ZW4YASUB.js.map} +0 -0
- /package/dist/{chunk-UP6NBQ62.js.map → cli-4QAH3DBX.js.map} +0 -0
- /package/dist/{cli-FSDJY5OC.js.map → cli-JE4LG35H.js.map} +0 -0
- /package/dist/{cli-MOKRUHZT.js.map → config-2YJPJ36T.js.map} +0 -0
- /package/dist/{config-BMWDC66C.js.map → github-64ZVAUIT.js.map} +0 -0
- /package/dist/{github-6GYTPSGV.js.map → github-ARGPMQD2.js.map} +0 -0
- /package/dist/{github-DJOLVNDD.js.map → github-YHJABBUI.js.map} +0 -0
- /package/dist/{github-ZF2TQ3RP.js.map → host-JT27OWTC.js.map} +0 -0
- /package/dist/{host-YSTYO5DX.js.map → json-CVOVXB7O.js.map} +0 -0
- /package/dist/{json-Y7625EFE.js.map → json-QNGJFUY2.js.map} +0 -0
- /package/dist/{json-YIK72XAL.js.map → lint-OQGB4DWJ.js.map} +0 -0
- /package/dist/{lint-RF3B55W7.js.map → list-EDAB7X5Y.js.map} +0 -0
- /package/dist/{list-5DW4QZ7P.js.map → list-OQ3IYV2W.js.map} +0 -0
- /package/dist/{list-7CHWJ633.js.map → list-PN6JKYNX.js.map} +0 -0
- /package/dist/{list-UNWG6NPD.js.map → page-TPNMHL27.js.map} +0 -0
- /package/dist/{page-OMPEACUN.js.map → pretty-EZ2NFU3C.js.map} +0 -0
- /package/dist/{pretty-PPNHHOEN.js.map → pretty-HO2LYG5N.js.map} +0 -0
- /package/dist/{pretty-U7ATCFBN.js.map → pretty-K3M4AW2D.js.map} +0 -0
- /package/dist/{pretty-XGYQ25PH.js.map → provider-YWNTTQPA.js.map} +0 -0
- /package/dist/{release-VHHASAG7.js.map → release-EFLQT3FW.js.map} +0 -0
- /package/dist/{provider-JY2I3VLF.js.map → reporters-4R2E7PRJ.js.map} +0 -0
- /package/dist/{reporters-FAIEOTC4.js.map → reporters-YVLLFBO5.js.map} +0 -0
- /package/dist/{reporters-KE7AZR6C.js.map → run-H4BOR2FR.js.map} +0 -0
- /package/dist/{run-MHJ3AYKG.js.map → sarif-GWHWJJFP.js.map} +0 -0
- /package/dist/{sarif-DOGRSGTB.js.map → sarif-SJFVSOBV.js.map} +0 -0
- /package/dist/{sarif-MIEMQOIK.js.map → sarif-YBFD5OUL.js.map} +0 -0
- /package/dist/{sarif-RGRG7VFX.js.map → validate-6R5UBDGU.js.map} +0 -0
|
@@ -1,49 +1,43 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
parseTraceFile,
|
|
4
3
|
renderTrace
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZAOJYN2D.js";
|
|
6
5
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} from "./chunk-
|
|
6
|
+
findManifest,
|
|
7
|
+
resolveArtifacts
|
|
8
|
+
} from "./chunk-XTMONCQE.js";
|
|
9
|
+
import {
|
|
10
|
+
discoverTraces
|
|
11
|
+
} from "./chunk-4TSWU2SU.js";
|
|
12
|
+
import {
|
|
13
|
+
BUILTIN_GRADER_KINDS,
|
|
14
|
+
MAX_ARTIFACT_CHARS,
|
|
15
|
+
artifactWasTruncated,
|
|
16
|
+
graderFor,
|
|
17
|
+
listGraderKinds,
|
|
18
|
+
makeTraceJudge,
|
|
19
|
+
registerGrader
|
|
20
|
+
} from "./chunk-TT5UDTDM.js";
|
|
21
|
+
import {
|
|
22
|
+
parseTraceFile
|
|
23
|
+
} from "./chunk-6UHEMPEY.js";
|
|
13
24
|
import {
|
|
14
25
|
REDO_OR_FIX,
|
|
15
|
-
fail,
|
|
16
|
-
firstError,
|
|
17
|
-
optionalBoolean,
|
|
18
|
-
optionalEnum,
|
|
19
|
-
optionalNumber,
|
|
20
|
-
optionalString,
|
|
21
|
-
optionsError,
|
|
22
|
-
orderedBounds,
|
|
23
|
-
pass,
|
|
24
|
-
requireOneOf,
|
|
25
|
-
requiredString,
|
|
26
|
-
skippedWindow,
|
|
27
26
|
windowFor
|
|
28
27
|
} from "./chunk-VHJ72YCD.js";
|
|
29
28
|
import {
|
|
30
|
-
extractEvals
|
|
31
|
-
|
|
32
|
-
resolveArtifacts
|
|
33
|
-
} from "./chunk-APAF4VWW.js";
|
|
29
|
+
extractEvals
|
|
30
|
+
} from "./chunk-IXFFVI5S.js";
|
|
34
31
|
import {
|
|
35
32
|
discoverConfig
|
|
36
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-3ZVRGBK6.js";
|
|
37
34
|
import {
|
|
38
35
|
announceSelection,
|
|
39
36
|
assertProviderSelection,
|
|
40
37
|
constructProvider,
|
|
41
38
|
resolveProviderIdentity,
|
|
42
39
|
selectProvider
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import {
|
|
45
|
-
discoverTraces
|
|
46
|
-
} from "./chunk-4TSWU2SU.js";
|
|
40
|
+
} from "./chunk-NHOGTAPK.js";
|
|
47
41
|
import {
|
|
48
42
|
TRIAGE_GUIDE,
|
|
49
43
|
TracevalsError
|
|
@@ -57,27 +51,23 @@ import {
|
|
|
57
51
|
underRoot
|
|
58
52
|
} from "./chunk-GLP5PSXB.js";
|
|
59
53
|
import {
|
|
60
|
-
isTurnBudgetSkip
|
|
61
|
-
|
|
62
|
-
} from "./chunk-SSQZB5SQ.js";
|
|
54
|
+
isTurnBudgetSkip
|
|
55
|
+
} from "./chunk-XG6PVB5S.js";
|
|
63
56
|
import {
|
|
64
57
|
NOT_GRANTED_REASON,
|
|
65
58
|
grantsFor,
|
|
66
59
|
isExecutionGrant,
|
|
67
60
|
unknownGrantsMessage
|
|
68
61
|
} from "./chunk-YNHZHSSM.js";
|
|
69
|
-
import {
|
|
70
|
-
realExec
|
|
71
|
-
} from "./chunk-ZPLVANY2.js";
|
|
72
62
|
import {
|
|
73
63
|
verdictLines
|
|
74
64
|
} from "./chunk-QS2Z3SWL.js";
|
|
75
65
|
import {
|
|
76
66
|
declaredAt
|
|
77
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-FXE5K56B.js";
|
|
78
68
|
import {
|
|
79
69
|
xmlEscape
|
|
80
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-E3HYSNS6.js";
|
|
81
71
|
import {
|
|
82
72
|
PATH_JOIN,
|
|
83
73
|
externalMetadataJoin,
|
|
@@ -85,12 +75,12 @@ import {
|
|
|
85
75
|
loadExternalMetadata,
|
|
86
76
|
memberOf,
|
|
87
77
|
mergeWithMarks
|
|
88
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-562QZKAB.js";
|
|
89
79
|
import {
|
|
90
80
|
DocmetaError,
|
|
91
81
|
classifyRef,
|
|
92
82
|
extractFrontmatter
|
|
93
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-YB3KD5RI.js";
|
|
94
84
|
import {
|
|
95
85
|
escapeWorkflowCommandMessage,
|
|
96
86
|
escapeWorkflowCommandProperty,
|
|
@@ -102,13 +92,13 @@ import {
|
|
|
102
92
|
import {
|
|
103
93
|
hasPagePlaceholder,
|
|
104
94
|
ownsKey
|
|
105
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-JF4BC7ZD.js";
|
|
106
96
|
import {
|
|
107
97
|
warn
|
|
108
98
|
} from "./chunk-HX44GB4Z.js";
|
|
109
99
|
import {
|
|
110
100
|
parseDuration
|
|
111
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-NVYDWVXN.js";
|
|
112
102
|
import {
|
|
113
103
|
errorMessage
|
|
114
104
|
} from "./chunk-G3T47CFV.js";
|
|
@@ -1393,7 +1383,7 @@ function renderCalibration(report, format, opts = {}) {
|
|
|
1393
1383
|
|
|
1394
1384
|
// src/tracevals/commands/run.ts
|
|
1395
1385
|
import { writeFile } from "node:fs/promises";
|
|
1396
|
-
import { resolve as
|
|
1386
|
+
import { resolve as resolve3 } from "node:path";
|
|
1397
1387
|
|
|
1398
1388
|
// src/tracevals/core/plan.ts
|
|
1399
1389
|
var IMPLICIT_EVAL_NAME = "adheres-to-artifact";
|
|
@@ -1490,632 +1480,6 @@ function planEvals(artifacts, metadataFor) {
|
|
|
1490
1480
|
return plans;
|
|
1491
1481
|
}
|
|
1492
1482
|
|
|
1493
|
-
// src/tracevals/judge/prompt.ts
|
|
1494
|
-
var PROMPT_VERSION = 4;
|
|
1495
|
-
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.
|
|
1496
|
-
|
|
1497
|
-
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.
|
|
1498
|
-
|
|
1499
|
-
Decide whether the session adhered to the assertion:
|
|
1500
|
-
- "pass" only when the session fully satisfied it.
|
|
1501
|
-
- "partial" when it partly satisfied it.
|
|
1502
|
-
- "fail" when it violated it or plainly did not do it.
|
|
1503
|
-
|
|
1504
|
-
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.
|
|
1505
|
-
|
|
1506
|
-
Respond with a single JSON object matching the provided schema. No prose outside the JSON.`;
|
|
1507
|
-
var MAX_ARTIFACT_CHARS = 8e3;
|
|
1508
|
-
function artifactWasTruncated(content) {
|
|
1509
|
-
return content.length > MAX_ARTIFACT_CHARS;
|
|
1510
|
-
}
|
|
1511
|
-
function buildUserContent(plan, graded, targetLabel = "transcript") {
|
|
1512
|
-
const parts = [];
|
|
1513
|
-
parts.push(`# Assertion
|
|
1514
|
-
${plan.assertion ?? ""}`);
|
|
1515
|
-
if (plan.evidence) {
|
|
1516
|
-
parts.push(`# Where to look
|
|
1517
|
-
${plan.evidence}`);
|
|
1518
|
-
}
|
|
1519
|
-
if (plan.examples?.pass?.length) {
|
|
1520
|
-
parts.push(`# Examples of passing behavior
|
|
1521
|
-
- ${plan.examples.pass.join("\n- ")}`);
|
|
1522
|
-
}
|
|
1523
|
-
if (plan.examples?.fail?.length) {
|
|
1524
|
-
parts.push(`# Examples of failing behavior
|
|
1525
|
-
- ${plan.examples.fail.join("\n- ")}`);
|
|
1526
|
-
}
|
|
1527
|
-
let artifactBody = plan.artifact.content;
|
|
1528
|
-
if (artifactBody.length > MAX_ARTIFACT_CHARS) {
|
|
1529
|
-
artifactBody = `${artifactBody.slice(0, MAX_ARTIFACT_CHARS)}
|
|
1530
|
-
[... artifact truncated ...]`;
|
|
1531
|
-
}
|
|
1532
|
-
const gradingTheArtifact = targetLabel === "artifact";
|
|
1533
|
-
const artifactHeading = `${plan.artifact.type} ("${plan.artifact.name}")`;
|
|
1534
|
-
if (!gradingTheArtifact) {
|
|
1535
|
-
parts.push(`# Source ${artifactHeading}
|
|
1536
|
-
${artifactBody}`);
|
|
1537
|
-
}
|
|
1538
|
-
parts.push(
|
|
1539
|
-
targetLabel === "transcript" ? `# Session transcript
|
|
1540
|
-
${graded}` : gradingTheArtifact ? `# Graded content: the ${artifactHeading} itself
|
|
1541
|
-
${artifactBody}` : `# Graded content (${targetLabel})
|
|
1542
|
-
${graded}`
|
|
1543
|
-
);
|
|
1544
|
-
return parts.join("\n\n");
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
// src/tracevals/graders/tool-usage.ts
|
|
1548
|
-
function checkContradiction(options) {
|
|
1549
|
-
const expect = options.expect ?? "used";
|
|
1550
|
-
const { min, max } = options;
|
|
1551
|
-
if (expect === "not-used" && typeof min === "number" && min > 0) {
|
|
1552
|
-
return "options.min is unsatisfiable with expect: not-used";
|
|
1553
|
-
}
|
|
1554
|
-
if (expect === "used" && typeof max === "number" && max === 0) {
|
|
1555
|
-
return "options.max of 0 is unsatisfiable with expect: used";
|
|
1556
|
-
}
|
|
1557
|
-
return void 0;
|
|
1558
|
-
}
|
|
1559
|
-
function validateOptions(options) {
|
|
1560
|
-
return firstError(
|
|
1561
|
-
requiredString(options, "tool"),
|
|
1562
|
-
optionalEnum(options, "expect", ["used", "not-used"]),
|
|
1563
|
-
optionalNumber(options, "min", { min: 0, integer: true }),
|
|
1564
|
-
optionalNumber(options, "max", { min: 0, integer: true }),
|
|
1565
|
-
orderedBounds(options, "min", "max"),
|
|
1566
|
-
checkContradiction(options),
|
|
1567
|
-
optionalBoolean(options, "includeSidechains"),
|
|
1568
|
-
validateWhen(options)
|
|
1569
|
-
);
|
|
1570
|
-
}
|
|
1571
|
-
var toolUsageGrader = {
|
|
1572
|
-
kind: "tool-usage",
|
|
1573
|
-
validateOptions,
|
|
1574
|
-
grade({ trace, plan }) {
|
|
1575
|
-
const options = plan.options ?? {};
|
|
1576
|
-
const invalid = validateOptions(options);
|
|
1577
|
-
if (invalid !== void 0) return optionsError("tool-usage", invalid);
|
|
1578
|
-
const tool = options.tool;
|
|
1579
|
-
const expect = options.expect ?? "used";
|
|
1580
|
-
const includeSidechains = options.includeSidechains === true;
|
|
1581
|
-
const window = windowFor(trace, plan);
|
|
1582
|
-
if (window.empty) return skippedWindow(window);
|
|
1583
|
-
const trigger = evaluateWhen(options, window);
|
|
1584
|
-
if (!trigger.armed) return skippedTrigger(trigger);
|
|
1585
|
-
const branchScoped = window.scope === "agent";
|
|
1586
|
-
const count = window.toolCalls.filter(
|
|
1587
|
-
(c) => c.name === tool && (branchScoped || includeSidechains || !c.sidechain)
|
|
1588
|
-
).length;
|
|
1589
|
-
if (expect === "not-used" && count > 0) {
|
|
1590
|
-
return fail(plan, `tool ${tool} was used ${count} time(s) but must not be`);
|
|
1591
|
-
}
|
|
1592
|
-
if (expect === "used" && count === 0 && options.min === void 0) {
|
|
1593
|
-
return fail(plan, `tool ${tool} was never used`);
|
|
1594
|
-
}
|
|
1595
|
-
if (typeof options.min === "number" && count < options.min) {
|
|
1596
|
-
return fail(
|
|
1597
|
-
plan,
|
|
1598
|
-
`tool ${tool} was used ${count} time(s); at least ${options.min} required`
|
|
1599
|
-
);
|
|
1600
|
-
}
|
|
1601
|
-
if (typeof options.max === "number" && count > options.max) {
|
|
1602
|
-
return fail(
|
|
1603
|
-
plan,
|
|
1604
|
-
`tool ${tool} was used ${count} time(s); at most ${options.max} allowed`
|
|
1605
|
-
);
|
|
1606
|
-
}
|
|
1607
|
-
return pass;
|
|
1608
|
-
}
|
|
1609
|
-
};
|
|
1610
|
-
|
|
1611
|
-
// src/tracevals/graders/tool-order.ts
|
|
1612
|
-
function validateOptions2(options) {
|
|
1613
|
-
return firstError(
|
|
1614
|
-
requiredString(options, "before"),
|
|
1615
|
-
requiredString(options, "after"),
|
|
1616
|
-
optionalString(options, "beforeInputMatch"),
|
|
1617
|
-
optionalString(options, "afterInputMatch"),
|
|
1618
|
-
optionalBoolean(options, "includeSidechains"),
|
|
1619
|
-
validateWhen(options),
|
|
1620
|
-
...["beforeInputMatch", "afterInputMatch"].map((key) => {
|
|
1621
|
-
const value = options[key];
|
|
1622
|
-
if (typeof value !== "string") return void 0;
|
|
1623
|
-
try {
|
|
1624
|
-
new RegExp(value);
|
|
1625
|
-
return void 0;
|
|
1626
|
-
} catch (err) {
|
|
1627
|
-
return `options.${key} is not a valid regular expression (${err instanceof Error ? err.message : String(err)})`;
|
|
1628
|
-
}
|
|
1629
|
-
})
|
|
1630
|
-
);
|
|
1631
|
-
}
|
|
1632
|
-
function ordinalsOf(calls, tool, inputMatch) {
|
|
1633
|
-
const re = inputMatch === void 0 ? void 0 : new RegExp(inputMatch);
|
|
1634
|
-
return calls.filter(
|
|
1635
|
-
(c) => c.name === tool && (re === void 0 || re.test(JSON.stringify(c.input)))
|
|
1636
|
-
).map((c) => c.index);
|
|
1637
|
-
}
|
|
1638
|
-
function describe(tool, inputMatch) {
|
|
1639
|
-
return inputMatch === void 0 ? tool : `${tool} matching /${inputMatch}/`;
|
|
1640
|
-
}
|
|
1641
|
-
var toolOrderGrader = {
|
|
1642
|
-
kind: "tool-order",
|
|
1643
|
-
validateOptions: validateOptions2,
|
|
1644
|
-
grade({ trace, plan }) {
|
|
1645
|
-
const options = plan.options ?? {};
|
|
1646
|
-
const invalid = validateOptions2(options);
|
|
1647
|
-
if (invalid !== void 0) return optionsError("tool-order", invalid);
|
|
1648
|
-
const before = options.before;
|
|
1649
|
-
const after = options.after;
|
|
1650
|
-
const beforeMatch = options.beforeInputMatch;
|
|
1651
|
-
const afterMatch = options.afterInputMatch;
|
|
1652
|
-
const includeSidechains = options.includeSidechains === true;
|
|
1653
|
-
const window = windowFor(trace, plan);
|
|
1654
|
-
if (window.empty) return skippedWindow(window);
|
|
1655
|
-
const trigger = evaluateWhen(options, window);
|
|
1656
|
-
if (!trigger.armed) return skippedTrigger(trigger);
|
|
1657
|
-
const branchScoped = window.scope === "agent";
|
|
1658
|
-
const calls = window.toolCalls.filter(
|
|
1659
|
-
(c) => branchScoped || includeSidechains || !c.sidechain
|
|
1660
|
-
);
|
|
1661
|
-
const beforeOrdinals = ordinalsOf(calls, before, beforeMatch);
|
|
1662
|
-
const afterOrdinals = ordinalsOf(calls, after, afterMatch);
|
|
1663
|
-
const firstBefore = beforeOrdinals.length > 0 ? Math.min(...beforeOrdinals) : void 0;
|
|
1664
|
-
const lastAfter = afterOrdinals.length > 0 ? Math.max(...afterOrdinals) : void 0;
|
|
1665
|
-
if (firstBefore === void 0 && lastAfter === void 0) return pass;
|
|
1666
|
-
if (lastAfter === void 0) {
|
|
1667
|
-
return fail(
|
|
1668
|
-
plan,
|
|
1669
|
-
`${describe(after, afterMatch)} was never used, so it could not follow ${describe(before, beforeMatch)}`
|
|
1670
|
-
);
|
|
1671
|
-
}
|
|
1672
|
-
if (firstBefore === void 0) {
|
|
1673
|
-
return fail(
|
|
1674
|
-
plan,
|
|
1675
|
-
`${describe(after, afterMatch)} was used without ${describe(before, beforeMatch)} ever being used first`
|
|
1676
|
-
);
|
|
1677
|
-
}
|
|
1678
|
-
if (firstBefore > lastAfter) {
|
|
1679
|
-
return fail(
|
|
1680
|
-
plan,
|
|
1681
|
-
`${describe(before, beforeMatch)} was only used after ${describe(after, afterMatch)}`
|
|
1682
|
-
);
|
|
1683
|
-
}
|
|
1684
|
-
return pass;
|
|
1685
|
-
}
|
|
1686
|
-
};
|
|
1687
|
-
|
|
1688
|
-
// src/tracevals/graders/skill-invoked.ts
|
|
1689
|
-
function validateOptions3(options) {
|
|
1690
|
-
return firstError(
|
|
1691
|
-
requiredString(options, "skill"),
|
|
1692
|
-
optionalEnum(options, "expect", ["used", "not-used"]),
|
|
1693
|
-
validateWhen(options)
|
|
1694
|
-
);
|
|
1695
|
-
}
|
|
1696
|
-
var skillInvokedGrader = {
|
|
1697
|
-
kind: "skill-invoked",
|
|
1698
|
-
validateOptions: validateOptions3,
|
|
1699
|
-
grade({ trace, plan }) {
|
|
1700
|
-
const options = plan.options ?? {};
|
|
1701
|
-
const invalid = validateOptions3(options);
|
|
1702
|
-
if (invalid !== void 0) return optionsError("skill-invoked", invalid);
|
|
1703
|
-
const skill = options.skill;
|
|
1704
|
-
const expect = options.expect ?? "used";
|
|
1705
|
-
const window = windowFor(trace, plan);
|
|
1706
|
-
if (window.empty) return skippedWindow(window);
|
|
1707
|
-
const trigger = evaluateWhen(options, window);
|
|
1708
|
-
if (!trigger.armed) return skippedTrigger(trigger);
|
|
1709
|
-
const used = window.skillInvocations.some((s) => s.name === skill);
|
|
1710
|
-
if (expect === "used" && !used) {
|
|
1711
|
-
return fail(plan, `skill ${skill} was never invoked`);
|
|
1712
|
-
}
|
|
1713
|
-
if (expect === "not-used" && used) {
|
|
1714
|
-
return fail(plan, `skill ${skill} was invoked but must not be`);
|
|
1715
|
-
}
|
|
1716
|
-
return pass;
|
|
1717
|
-
}
|
|
1718
|
-
};
|
|
1719
|
-
|
|
1720
|
-
// src/tracevals/graders/file-access.ts
|
|
1721
|
-
var OPS = ["read", "write", "edit"];
|
|
1722
|
-
function validateOptions4(options) {
|
|
1723
|
-
return firstError(
|
|
1724
|
-
requiredString(options, "path"),
|
|
1725
|
-
optionalEnum(options, "op", OPS),
|
|
1726
|
-
optionalEnum(options, "expect", ["accessed", "not-accessed"]),
|
|
1727
|
-
validateWhen(options)
|
|
1728
|
-
);
|
|
1729
|
-
}
|
|
1730
|
-
function matches(accessPath, spec) {
|
|
1731
|
-
return matchesGlob(accessPath, spec);
|
|
1732
|
-
}
|
|
1733
|
-
var fileAccessGrader = {
|
|
1734
|
-
kind: "file-access",
|
|
1735
|
-
validateOptions: validateOptions4,
|
|
1736
|
-
grade({ trace, plan }) {
|
|
1737
|
-
const options = plan.options ?? {};
|
|
1738
|
-
const invalid = validateOptions4(options);
|
|
1739
|
-
if (invalid !== void 0) return optionsError("file-access", invalid);
|
|
1740
|
-
const path = options.path;
|
|
1741
|
-
const op = options.op;
|
|
1742
|
-
const expect = options.expect ?? "accessed";
|
|
1743
|
-
const window = windowFor(trace, plan);
|
|
1744
|
-
if (window.empty) return skippedWindow(window);
|
|
1745
|
-
const trigger = evaluateWhen(options, window);
|
|
1746
|
-
if (!trigger.armed) return skippedTrigger(trigger);
|
|
1747
|
-
const accessed = window.fileAccesses.some(
|
|
1748
|
-
(a) => matches(a.path, path) && (op === void 0 || a.op === op)
|
|
1749
|
-
);
|
|
1750
|
-
const opLabel = op ?? "any";
|
|
1751
|
-
if (expect === "accessed" && !accessed) {
|
|
1752
|
-
return fail(plan, `file ${path} was never accessed (op: ${opLabel})`);
|
|
1753
|
-
}
|
|
1754
|
-
if (expect === "not-accessed" && accessed) {
|
|
1755
|
-
return fail(plan, `file ${path} was accessed (op: ${opLabel}) but must not be`);
|
|
1756
|
-
}
|
|
1757
|
-
return pass;
|
|
1758
|
-
}
|
|
1759
|
-
};
|
|
1760
|
-
|
|
1761
|
-
// src/tracevals/graders/turn-count.ts
|
|
1762
|
-
function validateOptions5(options) {
|
|
1763
|
-
return firstError(
|
|
1764
|
-
requireOneOf(options, ["min", "max"]),
|
|
1765
|
-
optionalNumber(options, "min", { min: 0, integer: true }),
|
|
1766
|
-
optionalNumber(options, "max", { min: 0, integer: true }),
|
|
1767
|
-
orderedBounds(options, "min", "max"),
|
|
1768
|
-
validateWhen(options)
|
|
1769
|
-
);
|
|
1770
|
-
}
|
|
1771
|
-
var turnCountGrader = {
|
|
1772
|
-
kind: "turn-count",
|
|
1773
|
-
validateOptions: validateOptions5,
|
|
1774
|
-
grade({ trace, plan }) {
|
|
1775
|
-
const options = plan.options ?? {};
|
|
1776
|
-
const invalid = validateOptions5(options);
|
|
1777
|
-
if (invalid !== void 0) return optionsError("turn-count", invalid);
|
|
1778
|
-
const window = windowFor(trace, plan);
|
|
1779
|
-
if (window.empty) return skippedWindow(window);
|
|
1780
|
-
const trigger = evaluateWhen(options, window);
|
|
1781
|
-
if (!trigger.armed) return skippedTrigger(trigger);
|
|
1782
|
-
const { turnCount } = window;
|
|
1783
|
-
if (typeof options.max === "number" && turnCount > options.max) {
|
|
1784
|
-
return fail(plan, `${turnCount} turn(s); at most ${options.max} allowed`);
|
|
1785
|
-
}
|
|
1786
|
-
if (typeof options.min === "number" && turnCount < options.min) {
|
|
1787
|
-
return fail(plan, `${turnCount} turn(s); at least ${options.min} required`);
|
|
1788
|
-
}
|
|
1789
|
-
return pass;
|
|
1790
|
-
}
|
|
1791
|
-
};
|
|
1792
|
-
|
|
1793
|
-
// src/tracevals/graders/cost.ts
|
|
1794
|
-
function validateOptions6(options) {
|
|
1795
|
-
return firstError(
|
|
1796
|
-
requireOneOf(options, ["maxUsd", "maxTokens"]),
|
|
1797
|
-
optionalNumber(options, "maxUsd", { min: 0 }),
|
|
1798
|
-
optionalNumber(options, "maxTokens", { min: 0 }),
|
|
1799
|
-
rejectWhen("cost", options)
|
|
1800
|
-
);
|
|
1801
|
-
}
|
|
1802
|
-
var costGrader = {
|
|
1803
|
-
kind: "cost",
|
|
1804
|
-
validateOptions: validateOptions6,
|
|
1805
|
-
grade({ trace, plan }) {
|
|
1806
|
-
const options = plan.options ?? {};
|
|
1807
|
-
const invalid = validateOptions6(options);
|
|
1808
|
-
if (invalid !== void 0) return optionsError("cost", invalid);
|
|
1809
|
-
const usage = trace.usage;
|
|
1810
|
-
const skips = [];
|
|
1811
|
-
let checked = false;
|
|
1812
|
-
if (typeof options.maxUsd === "number") {
|
|
1813
|
-
if (usage?.totalCostUsd === void 0) {
|
|
1814
|
-
skips.push("no cost data (maxUsd not checkable)");
|
|
1815
|
-
} else {
|
|
1816
|
-
checked = true;
|
|
1817
|
-
if (usage.totalCostUsd > options.maxUsd) {
|
|
1818
|
-
return fail(
|
|
1819
|
-
plan,
|
|
1820
|
-
`session cost $${usage.totalCostUsd.toFixed(4)}; at most $${options.maxUsd} allowed`
|
|
1821
|
-
);
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
}
|
|
1825
|
-
if (typeof options.maxTokens === "number") {
|
|
1826
|
-
if (usage === void 0) {
|
|
1827
|
-
skips.push("no usage data (maxTokens not checkable)");
|
|
1828
|
-
} else {
|
|
1829
|
-
checked = true;
|
|
1830
|
-
const total = usage.inputTokens + usage.outputTokens;
|
|
1831
|
-
if (total > options.maxTokens) {
|
|
1832
|
-
return fail(
|
|
1833
|
-
plan,
|
|
1834
|
-
`session used ${total} tokens; at most ${options.maxTokens} allowed`
|
|
1835
|
-
);
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
}
|
|
1839
|
-
if (!checked && skips.length > 0) {
|
|
1840
|
-
return {
|
|
1841
|
-
findings: [],
|
|
1842
|
-
skipped: `trace carries insufficient cost data: ${skips.join("; ")}`
|
|
1843
|
-
};
|
|
1844
|
-
}
|
|
1845
|
-
return pass;
|
|
1846
|
-
}
|
|
1847
|
-
};
|
|
1848
|
-
|
|
1849
|
-
// src/tracevals/core/target.ts
|
|
1850
|
-
import { readFileSync } from "node:fs";
|
|
1851
|
-
import { isAbsolute as isAbsolute2, relative as relative2, resolve, sep } from "node:path";
|
|
1852
|
-
var DEFAULT_TARGET = "transcript";
|
|
1853
|
-
function describeTarget(target) {
|
|
1854
|
-
const t = target ?? DEFAULT_TARGET;
|
|
1855
|
-
return typeof t === "string" ? t : `file ${t.path}`;
|
|
1856
|
-
}
|
|
1857
|
-
function readTarget(target, ctx) {
|
|
1858
|
-
const t = target ?? DEFAULT_TARGET;
|
|
1859
|
-
if (t === "transcript") {
|
|
1860
|
-
return { ok: true, text: ctx.renderedTrace, label: "transcript" };
|
|
1861
|
-
}
|
|
1862
|
-
if (t === "last-message") {
|
|
1863
|
-
const last = ctx.trace.assistantTexts.at(-1);
|
|
1864
|
-
return { ok: true, text: last ?? "", label: "last-message" };
|
|
1865
|
-
}
|
|
1866
|
-
if (t === "files") {
|
|
1867
|
-
const paths = [...new Set(ctx.trace.fileAccesses.map((f) => f.path))];
|
|
1868
|
-
return { ok: true, text: paths.join("\n"), label: "files" };
|
|
1869
|
-
}
|
|
1870
|
-
if (t === "artifact") {
|
|
1871
|
-
return { ok: true, text: ctx.artifactContent, label: "artifact" };
|
|
1872
|
-
}
|
|
1873
|
-
if (isAbsolute2(t.path)) {
|
|
1874
|
-
return {
|
|
1875
|
-
ok: false,
|
|
1876
|
-
reason: `target file "${t.path}" is an absolute path; name it relative to the project root`
|
|
1877
|
-
};
|
|
1878
|
-
}
|
|
1879
|
-
const abs = resolve(ctx.root, t.path);
|
|
1880
|
-
const rel = relative2(ctx.root, abs);
|
|
1881
|
-
if (rel === ".." || rel.startsWith(`..${sep}`) || isAbsolute2(rel)) {
|
|
1882
|
-
return {
|
|
1883
|
-
ok: false,
|
|
1884
|
-
reason: `target file "${t.path}" resolves outside the project root`
|
|
1885
|
-
};
|
|
1886
|
-
}
|
|
1887
|
-
try {
|
|
1888
|
-
return { ok: true, text: readFileSync(abs, "utf8"), label: `file ${t.path}` };
|
|
1889
|
-
} catch (err) {
|
|
1890
|
-
const code = err.code ?? "unknown error";
|
|
1891
|
-
return { ok: false, reason: `target file "${t.path}" could not be read (${code})` };
|
|
1892
|
-
}
|
|
1893
|
-
}
|
|
1894
|
-
|
|
1895
|
-
// src/tracevals/graders/regex.ts
|
|
1896
|
-
function checkFlags(options) {
|
|
1897
|
-
const flags = options.flags;
|
|
1898
|
-
if (flags === void 0) return void 0;
|
|
1899
|
-
if (typeof flags !== "string") return "options.flags must be a string";
|
|
1900
|
-
try {
|
|
1901
|
-
new RegExp("", flags);
|
|
1902
|
-
} catch (err) {
|
|
1903
|
-
return `options.flags is invalid: ${err.message}`;
|
|
1904
|
-
}
|
|
1905
|
-
return void 0;
|
|
1906
|
-
}
|
|
1907
|
-
function checkPattern(options) {
|
|
1908
|
-
const required = requiredString(options, "pattern");
|
|
1909
|
-
if (required !== void 0) return required;
|
|
1910
|
-
try {
|
|
1911
|
-
new RegExp(
|
|
1912
|
-
options.pattern,
|
|
1913
|
-
options.flags ?? ""
|
|
1914
|
-
);
|
|
1915
|
-
} catch (err) {
|
|
1916
|
-
return `options.pattern is not a valid regular expression: ${err.message}`;
|
|
1917
|
-
}
|
|
1918
|
-
return void 0;
|
|
1919
|
-
}
|
|
1920
|
-
function validateOptions7(options) {
|
|
1921
|
-
return firstError(
|
|
1922
|
-
checkFlags(options),
|
|
1923
|
-
checkPattern(options),
|
|
1924
|
-
optionalEnum(options, "on", ["assistant", "user", "all"]),
|
|
1925
|
-
optionalEnum(options, "expect", ["match", "no-match"]),
|
|
1926
|
-
validateWhen(options)
|
|
1927
|
-
);
|
|
1928
|
-
}
|
|
1929
|
-
var regexGrader = {
|
|
1930
|
-
kind: "regex",
|
|
1931
|
-
validateOptions: validateOptions7,
|
|
1932
|
-
grade({ trace, plan, projectRoot }) {
|
|
1933
|
-
const options = plan.options ?? {};
|
|
1934
|
-
const invalid = validateOptions7(options);
|
|
1935
|
-
if (invalid !== void 0) return optionsError("regex", invalid);
|
|
1936
|
-
const pattern = options.pattern;
|
|
1937
|
-
const re = new RegExp(pattern, options.flags ?? "");
|
|
1938
|
-
const on = options.on ?? "assistant";
|
|
1939
|
-
const expect = options.expect ?? "match";
|
|
1940
|
-
const window = windowFor(trace, plan);
|
|
1941
|
-
if (window.empty) return skippedWindow(window);
|
|
1942
|
-
const trigger = evaluateWhen(options, window);
|
|
1943
|
-
if (!trigger.armed) return skippedTrigger(trigger);
|
|
1944
|
-
const target = plan.target ?? "transcript";
|
|
1945
|
-
let corpus;
|
|
1946
|
-
let where;
|
|
1947
|
-
if (target === "transcript") {
|
|
1948
|
-
corpus = on === "user" ? window.userMessages : on === "all" ? [...window.userMessages, ...window.assistantTexts] : window.assistantTexts;
|
|
1949
|
-
where = `${on} text`;
|
|
1950
|
-
} else {
|
|
1951
|
-
const selected = readTarget(target, {
|
|
1952
|
-
trace,
|
|
1953
|
-
// Never consulted: `transcript` took the branch above.
|
|
1954
|
-
renderedTrace: "",
|
|
1955
|
-
artifactContent: plan.artifact.content,
|
|
1956
|
-
root: projectRoot ?? trace.cwd
|
|
1957
|
-
});
|
|
1958
|
-
if (!selected.ok) return optionsError("regex", selected.reason);
|
|
1959
|
-
corpus = [selected.text];
|
|
1960
|
-
where = selected.label;
|
|
1961
|
-
}
|
|
1962
|
-
const matched = corpus.some((text) => re.test(text));
|
|
1963
|
-
if (expect === "match" && !matched) {
|
|
1964
|
-
return fail(plan, `pattern /${pattern}/ never matched ${where}`);
|
|
1965
|
-
}
|
|
1966
|
-
if (expect === "no-match" && matched) {
|
|
1967
|
-
return fail(plan, `pattern /${pattern}/ matched ${where} but must not`);
|
|
1968
|
-
}
|
|
1969
|
-
return pass;
|
|
1970
|
-
}
|
|
1971
|
-
};
|
|
1972
|
-
|
|
1973
|
-
// src/tracevals/graders/json-output.ts
|
|
1974
|
-
import { Ajv2020 } from "ajv/dist/2020.js";
|
|
1975
|
-
var compiled = /* @__PURE__ */ new Map();
|
|
1976
|
-
function compileSchema(schema) {
|
|
1977
|
-
const key = JSON.stringify(schema);
|
|
1978
|
-
const hit = compiled.get(key);
|
|
1979
|
-
if (hit !== void 0) return hit;
|
|
1980
|
-
const built = new Ajv2020({ allErrors: true, strict: false }).compile(schema);
|
|
1981
|
-
compiled.set(key, built);
|
|
1982
|
-
return built;
|
|
1983
|
-
}
|
|
1984
|
-
function validateOptions8(options) {
|
|
1985
|
-
const schema = options.schema;
|
|
1986
|
-
if (schema === void 0 || schema === null || typeof schema !== "object" || Array.isArray(schema)) {
|
|
1987
|
-
return "options.schema is required and must be a JSON Schema object";
|
|
1988
|
-
}
|
|
1989
|
-
return rejectWhen("json-output", options);
|
|
1990
|
-
}
|
|
1991
|
-
var jsonOutputGrader = {
|
|
1992
|
-
kind: "json-output",
|
|
1993
|
-
validateOptions: validateOptions8,
|
|
1994
|
-
grade({ trace, plan }) {
|
|
1995
|
-
const options = plan.options ?? {};
|
|
1996
|
-
const invalid = validateOptions8(options);
|
|
1997
|
-
if (invalid !== void 0) return optionsError("json-output", invalid);
|
|
1998
|
-
const schema = options.schema;
|
|
1999
|
-
const last = trace.assistantTexts.at(-1);
|
|
2000
|
-
if (last === void 0) {
|
|
2001
|
-
return fail(plan, "session produced no assistant text to validate");
|
|
2002
|
-
}
|
|
2003
|
-
let data;
|
|
2004
|
-
try {
|
|
2005
|
-
data = JSON.parse(last);
|
|
2006
|
-
} catch {
|
|
2007
|
-
return fail(plan, "final assistant output is not valid JSON");
|
|
2008
|
-
}
|
|
2009
|
-
let validate;
|
|
2010
|
-
try {
|
|
2011
|
-
validate = compileSchema(schema);
|
|
2012
|
-
} catch (err) {
|
|
2013
|
-
return optionsError(
|
|
2014
|
-
"json-output",
|
|
2015
|
-
`schema failed to compile: ${err.message}`
|
|
2016
|
-
);
|
|
2017
|
-
}
|
|
2018
|
-
if (validate(data)) return pass;
|
|
2019
|
-
const errors = (validate.errors ?? []).map((e) => `${e.instancePath || "/"} ${e.message ?? "invalid"}`).join("; ");
|
|
2020
|
-
return fail(plan, `final assistant output does not match the schema: ${errors}`);
|
|
2021
|
-
}
|
|
2022
|
-
};
|
|
2023
|
-
|
|
2024
|
-
// src/tracevals/graders/command.ts
|
|
2025
|
-
import { createHash } from "node:crypto";
|
|
2026
|
-
var DEFAULT_TIMEOUT_MS = 3e4;
|
|
2027
|
-
var STDERR_LIMIT = 2e3;
|
|
2028
|
-
var commandGrader = {
|
|
2029
|
-
kind: "command",
|
|
2030
|
-
async grade(ctx) {
|
|
2031
|
-
const { plan, trace } = ctx;
|
|
2032
|
-
if (!plan.command || plan.command.length === 0) {
|
|
2033
|
-
return {
|
|
2034
|
-
findings: [],
|
|
2035
|
-
error: "command-graded eval has no `command`; add one (or remove the eval) \u2014 manni tracevals does not generate check scripts"
|
|
2036
|
-
};
|
|
2037
|
-
}
|
|
2038
|
-
if (plan.generatedAssertionHash !== void 0) {
|
|
2039
|
-
if (plan.assertion === void 0) {
|
|
2040
|
-
return {
|
|
2041
|
-
findings: [],
|
|
2042
|
-
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"
|
|
2043
|
-
};
|
|
2044
|
-
}
|
|
2045
|
-
const actual = createHash("sha256").update(plan.assertion).digest("hex");
|
|
2046
|
-
if (actual !== plan.generatedAssertionHash) {
|
|
2047
|
-
return {
|
|
2048
|
-
findings: [],
|
|
2049
|
-
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`
|
|
2050
|
-
};
|
|
2051
|
-
}
|
|
2052
|
-
}
|
|
2053
|
-
const argv = plan.command.map((part) => part.replaceAll("{trace}", trace.file));
|
|
2054
|
-
const timeoutMs = plan.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
2055
|
-
const successCodes = plan.successExitCodes ?? [0];
|
|
2056
|
-
const run = await execute(argv, ctx.projectRoot ?? trace.cwd, timeoutMs);
|
|
2057
|
-
if (run.timedOut) {
|
|
2058
|
-
return {
|
|
2059
|
-
findings: [],
|
|
2060
|
-
error: `command timed out after ${timeoutMs}ms: ${argv.join(" ")}`
|
|
2061
|
-
};
|
|
2062
|
-
}
|
|
2063
|
-
if (run.spawnError !== void 0) {
|
|
2064
|
-
return { findings: [], error: `could not run command: ${run.spawnError}` };
|
|
2065
|
-
}
|
|
2066
|
-
if (run.code !== null && successCodes.includes(run.code)) {
|
|
2067
|
-
return { findings: [] };
|
|
2068
|
-
}
|
|
2069
|
-
const detail2 = run.stderr.trim();
|
|
2070
|
-
return {
|
|
2071
|
-
findings: [
|
|
2072
|
-
{
|
|
2073
|
-
evalName: plan.evalName,
|
|
2074
|
-
artifact: plan.artifact.path,
|
|
2075
|
-
severity: plan.severity,
|
|
2076
|
-
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.` + (detail2 ? ` Output: ${detail2.slice(0, STDERR_LIMIT)}` : "")
|
|
2077
|
-
}
|
|
2078
|
-
]
|
|
2079
|
-
};
|
|
2080
|
-
}
|
|
2081
|
-
};
|
|
2082
|
-
async function execute(argv, cwd, timeoutMs) {
|
|
2083
|
-
const result = await realExec(argv, { cwd, timeoutMs });
|
|
2084
|
-
return {
|
|
2085
|
-
code: result.code,
|
|
2086
|
-
// Capped here, not merely when printed: a check script can write far more
|
|
2087
|
-
// to stderr than a report should carry.
|
|
2088
|
-
stderr: result.stderr.slice(0, STDERR_LIMIT),
|
|
2089
|
-
timedOut: result.timedOut,
|
|
2090
|
-
...result.spawnError === void 0 ? {} : { spawnError: result.spawnError }
|
|
2091
|
-
};
|
|
2092
|
-
}
|
|
2093
|
-
|
|
2094
|
-
// src/tracevals/graders/registry.ts
|
|
2095
|
-
var graders = new Map(
|
|
2096
|
-
[
|
|
2097
|
-
toolUsageGrader,
|
|
2098
|
-
toolOrderGrader,
|
|
2099
|
-
skillInvokedGrader,
|
|
2100
|
-
fileAccessGrader,
|
|
2101
|
-
turnCountGrader,
|
|
2102
|
-
costGrader,
|
|
2103
|
-
regexGrader,
|
|
2104
|
-
jsonOutputGrader,
|
|
2105
|
-
commandGrader
|
|
2106
|
-
].map((g) => [g.kind, g])
|
|
2107
|
-
);
|
|
2108
|
-
var BUILTIN_GRADER_KINDS = new Set(graders.keys());
|
|
2109
|
-
function registerGrader(grader) {
|
|
2110
|
-
graders.set(grader.kind, grader);
|
|
2111
|
-
}
|
|
2112
|
-
function graderFor(kind) {
|
|
2113
|
-
return graders.get(kind);
|
|
2114
|
-
}
|
|
2115
|
-
function listGraderKinds() {
|
|
2116
|
-
return [...graders.keys()];
|
|
2117
|
-
}
|
|
2118
|
-
|
|
2119
1483
|
// src/tracevals/core/engine.ts
|
|
2120
1484
|
var IMPLICIT_DESCRIPTION = "The session follows every instruction in this artifact.";
|
|
2121
1485
|
async function runEvals(options) {
|
|
@@ -2432,10 +1796,10 @@ function summariseManifest(found, coverage) {
|
|
|
2432
1796
|
}
|
|
2433
1797
|
|
|
2434
1798
|
// src/tracevals/evals/external.ts
|
|
2435
|
-
import { relative as
|
|
1799
|
+
import { relative as relative2, resolve, sep } from "node:path";
|
|
2436
1800
|
var METADATA_KEY = "metadata";
|
|
2437
1801
|
var MARKED = /* @__PURE__ */ new Set([METADATA_KEY]);
|
|
2438
|
-
var toPosix2 = (path) => path.split(
|
|
1802
|
+
var toPosix2 = (path) => path.split(sep).join("/");
|
|
2439
1803
|
function twoManifestsRefusal(label, a, b) {
|
|
2440
1804
|
return `${label} is in collections ${a} and ${b}, and both keep ${METADATA_KEY} in a manifest.`;
|
|
2441
1805
|
}
|
|
@@ -2498,7 +1862,7 @@ function reader(scoped, opts) {
|
|
|
2498
1862
|
const merged = await mergeWithMarks(
|
|
2499
1863
|
label,
|
|
2500
1864
|
extracted,
|
|
2501
|
-
await indexFor(
|
|
1865
|
+
await indexFor(resolve(base, label)),
|
|
2502
1866
|
[first.name],
|
|
2503
1867
|
base,
|
|
2504
1868
|
{ encryptionKey: () => opts.key, marks: await marks() }
|
|
@@ -2506,7 +1870,7 @@ function reader(scoped, opts) {
|
|
|
2506
1870
|
const locate2 = (pointer) => {
|
|
2507
1871
|
const found = merged.locate(pointer);
|
|
2508
1872
|
if (found === void 0 || classifyRef(found.file).kind === "url") return found;
|
|
2509
|
-
return { ...found, file:
|
|
1873
|
+
return { ...found, file: resolve(base, found.file) };
|
|
2510
1874
|
};
|
|
2511
1875
|
const at = merged.locate(`/${METADATA_KEY}`);
|
|
2512
1876
|
const [declaration] = first.externalMetadata;
|
|
@@ -2516,14 +1880,14 @@ function reader(scoped, opts) {
|
|
|
2516
1880
|
const url = classifyRef(at.file).kind === "url";
|
|
2517
1881
|
const owner = {
|
|
2518
1882
|
collection: first.name,
|
|
2519
|
-
path: url ? at.file :
|
|
1883
|
+
path: url ? at.file : resolve(base, at.file),
|
|
2520
1884
|
file: at.file,
|
|
2521
1885
|
join: externalMetadataJoin(declaration),
|
|
2522
1886
|
url
|
|
2523
1887
|
};
|
|
2524
1888
|
const out = { extracted: merged.extracted, locate: locate2, owner };
|
|
2525
1889
|
if (owner.join === PATH_JOIN) {
|
|
2526
|
-
out.entry = toPosix2(
|
|
1890
|
+
out.entry = toPosix2(relative2(configDir, resolve(base, label)));
|
|
2527
1891
|
} else {
|
|
2528
1892
|
const value = merged.joins.find((j) => j.field === owner.join)?.value ?? extracted.data[owner.join];
|
|
2529
1893
|
if (typeof value === "string" && value !== "") out.entry = value;
|
|
@@ -2538,18 +1902,18 @@ function reader(scoped, opts) {
|
|
|
2538
1902
|
|
|
2539
1903
|
// src/tracevals/graders/plugins.ts
|
|
2540
1904
|
import { createRequire } from "node:module";
|
|
2541
|
-
import { isAbsolute as
|
|
1905
|
+
import { isAbsolute as isAbsolute2, join, resolve as resolve2 } from "node:path";
|
|
2542
1906
|
import { pathToFileURL } from "node:url";
|
|
2543
1907
|
var alreadyLoaded = /* @__PURE__ */ new Set();
|
|
2544
1908
|
var RELATIVE = /^\.\.?[/\\]/;
|
|
2545
1909
|
function locate(specifier, configDir) {
|
|
2546
1910
|
if (specifier.startsWith("file:")) return { href: specifier };
|
|
2547
|
-
if (RELATIVE.test(specifier) ||
|
|
2548
|
-
const path =
|
|
1911
|
+
if (RELATIVE.test(specifier) || isAbsolute2(specifier)) {
|
|
1912
|
+
const path = resolve2(configDir, specifier);
|
|
2549
1913
|
return { href: pathToFileURL(path).href, shown: path };
|
|
2550
1914
|
}
|
|
2551
1915
|
try {
|
|
2552
|
-
const path = createRequire(join(
|
|
1916
|
+
const path = createRequire(join(resolve2(configDir), "package.json")).resolve(
|
|
2553
1917
|
specifier
|
|
2554
1918
|
);
|
|
2555
1919
|
return { href: pathToFileURL(path).href, shown: path };
|
|
@@ -2708,224 +2072,6 @@ function compareToLast(history, report) {
|
|
|
2708
2072
|
};
|
|
2709
2073
|
}
|
|
2710
2074
|
|
|
2711
|
-
// src/tracevals/judge/trace-judge.ts
|
|
2712
|
-
import {
|
|
2713
|
-
computeConsensus,
|
|
2714
|
-
runEnsemble,
|
|
2715
|
-
zoneFor
|
|
2716
|
-
} from "@hawkeyexl/inference";
|
|
2717
|
-
|
|
2718
|
-
// src/tracevals/judge/verdict-schema.json
|
|
2719
|
-
var verdict_schema_default = {
|
|
2720
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
2721
|
-
$id: "manni:tracevals:verdict",
|
|
2722
|
-
title: "manni tracevals judge verdict",
|
|
2723
|
-
type: "object",
|
|
2724
|
-
required: ["claim", "observed", "match", "confidence", "reasoning"],
|
|
2725
|
-
properties: {
|
|
2726
|
-
claim: {
|
|
2727
|
-
type: "string",
|
|
2728
|
-
description: "The specific instruction or assertion under evaluation."
|
|
2729
|
-
},
|
|
2730
|
-
observed: {
|
|
2731
|
-
type: "string",
|
|
2732
|
-
description: "What actually happened in the session, citing specific messages, tool calls, or instructions followed/violated."
|
|
2733
|
-
},
|
|
2734
|
-
match: {
|
|
2735
|
-
enum: ["pass", "fail", "partial"],
|
|
2736
|
-
description: "pass only if the session fully adhered; partial for partial adherence."
|
|
2737
|
-
},
|
|
2738
|
-
confidence: {
|
|
2739
|
-
type: "number",
|
|
2740
|
-
minimum: 0,
|
|
2741
|
-
maximum: 1,
|
|
2742
|
-
description: "Self-reported confidence in this verdict."
|
|
2743
|
-
},
|
|
2744
|
-
reasoning: {
|
|
2745
|
-
type: "string",
|
|
2746
|
-
description: "Why this conclusion was reached."
|
|
2747
|
-
}
|
|
2748
|
-
},
|
|
2749
|
-
additionalProperties: false
|
|
2750
|
-
};
|
|
2751
|
-
|
|
2752
|
-
// src/tracevals/judge/cache.ts
|
|
2753
|
-
import { JsonCache, buildCacheKey, sha256 } from "@hawkeyexl/inference";
|
|
2754
|
-
var VerdictCache = class _VerdictCache extends JsonCache {
|
|
2755
|
-
/** An ensemble is cacheable only if every run produced a verdict. */
|
|
2756
|
-
static usable(runs) {
|
|
2757
|
-
return runs.every((r) => r.error === void 0 && r.verdict !== void 0);
|
|
2758
|
-
}
|
|
2759
|
-
set(key, value) {
|
|
2760
|
-
if (!_VerdictCache.usable(value)) return;
|
|
2761
|
-
super.set(key, value);
|
|
2762
|
-
}
|
|
2763
|
-
get(key) {
|
|
2764
|
-
const hit = super.get(key);
|
|
2765
|
-
if (hit === void 0) return void 0;
|
|
2766
|
-
return _VerdictCache.usable(hit) ? hit : void 0;
|
|
2767
|
-
}
|
|
2768
|
-
};
|
|
2769
|
-
function cacheKey(provider, model, runs, temperature, renderedTrace, plan, promptVersion = PROMPT_VERSION) {
|
|
2770
|
-
const planFingerprint = JSON.stringify({
|
|
2771
|
-
assertion: plan.assertion,
|
|
2772
|
-
evidence: plan.evidence,
|
|
2773
|
-
examples: plan.examples,
|
|
2774
|
-
artifact: plan.artifact.content
|
|
2775
|
-
});
|
|
2776
|
-
return buildCacheKey([
|
|
2777
|
-
provider,
|
|
2778
|
-
model,
|
|
2779
|
-
`v${promptVersion}`,
|
|
2780
|
-
`r${runs}`,
|
|
2781
|
-
`t${temperature}`,
|
|
2782
|
-
// Pre-hashed: traces and artifacts are large, and key parts stay short.
|
|
2783
|
-
sha256(renderedTrace),
|
|
2784
|
-
sha256(planFingerprint)
|
|
2785
|
-
]);
|
|
2786
|
-
}
|
|
2787
|
-
|
|
2788
|
-
// src/tracevals/judge/trace-judge.ts
|
|
2789
|
-
var verdictSchema = verdict_schema_default;
|
|
2790
|
-
function makeTraceJudge(options) {
|
|
2791
|
-
const provider = options.provider;
|
|
2792
|
-
const runsFor = (plan) => options.runs ?? plan.runs ?? 3;
|
|
2793
|
-
const temperature = options.temperature ?? 0;
|
|
2794
|
-
const zones = options.zones ?? { autoPass: 0.8, autoFail: 0.8 };
|
|
2795
|
-
const cache = new VerdictCache(
|
|
2796
|
-
options.cacheDir ?? ".manni/tracevals/cache",
|
|
2797
|
-
options.noCache !== true && options.cacheDir !== void 0,
|
|
2798
|
-
"manni-tracevals"
|
|
2799
|
-
);
|
|
2800
|
-
const maxTurns = options.maxTurns ?? null;
|
|
2801
|
-
let turnsSpent = 0;
|
|
2802
|
-
return async (plans, renderFor, context) => {
|
|
2803
|
-
const trace = context?.trace;
|
|
2804
|
-
const sessionModel = trace?.model;
|
|
2805
|
-
const results = [];
|
|
2806
|
-
for (const plan of plans) {
|
|
2807
|
-
const start = Date.now();
|
|
2808
|
-
const base = {
|
|
2809
|
-
evalName: plan.evalName,
|
|
2810
|
-
artifact: plan.artifact.path,
|
|
2811
|
-
artifactName: plan.artifact.name,
|
|
2812
|
-
grader: plan.grader,
|
|
2813
|
-
implicit: plan.implicit
|
|
2814
|
-
};
|
|
2815
|
-
let evalProvider = provider;
|
|
2816
|
-
if (plan.provider !== void 0 || plan.model !== void 0) {
|
|
2817
|
-
const resolved = await resolveOverride(plan, options);
|
|
2818
|
-
if ("error" in resolved) {
|
|
2819
|
-
results.push({
|
|
2820
|
-
...base,
|
|
2821
|
-
outcome: "error",
|
|
2822
|
-
error: resolved.error,
|
|
2823
|
-
turns: 0,
|
|
2824
|
-
durationMs: Date.now() - start
|
|
2825
|
-
});
|
|
2826
|
-
continue;
|
|
2827
|
-
}
|
|
2828
|
-
evalProvider = resolved.provider;
|
|
2829
|
-
}
|
|
2830
|
-
const renderedTrace = renderFor(plan);
|
|
2831
|
-
const selected = trace === void 0 ? plan.target === void 0 || plan.target === "transcript" || plan.target === "artifact" ? {
|
|
2832
|
-
ok: true,
|
|
2833
|
-
text: plan.target === "artifact" ? plan.artifact.content : renderedTrace,
|
|
2834
|
-
label: plan.target === "artifact" ? "artifact" : "transcript"
|
|
2835
|
-
} : {
|
|
2836
|
-
ok: false,
|
|
2837
|
-
reason: `target "${describeTarget(plan.target)}" needs the parsed session, which this run did not supply`
|
|
2838
|
-
} : readTarget(plan.target, {
|
|
2839
|
-
trace,
|
|
2840
|
-
renderedTrace,
|
|
2841
|
-
artifactContent: plan.artifact.content,
|
|
2842
|
-
root: context?.projectRoot ?? trace.cwd
|
|
2843
|
-
});
|
|
2844
|
-
if (!selected.ok) {
|
|
2845
|
-
results.push({
|
|
2846
|
-
...base,
|
|
2847
|
-
outcome: "error",
|
|
2848
|
-
error: selected.reason,
|
|
2849
|
-
turns: 0,
|
|
2850
|
-
durationMs: Date.now() - start
|
|
2851
|
-
});
|
|
2852
|
-
continue;
|
|
2853
|
-
}
|
|
2854
|
-
const runsPerEval = runsFor(plan);
|
|
2855
|
-
const key = cacheKey(
|
|
2856
|
-
evalProvider.provider(),
|
|
2857
|
-
evalProvider.modelName(),
|
|
2858
|
-
runsPerEval,
|
|
2859
|
-
temperature,
|
|
2860
|
-
// The selected bytes, not always the transcript: two targets on one
|
|
2861
|
-
// session are two different questions and must not share a verdict.
|
|
2862
|
-
selected.text,
|
|
2863
|
-
plan
|
|
2864
|
-
);
|
|
2865
|
-
const cached = cache.get(key) !== void 0;
|
|
2866
|
-
if (maxTurns !== null && !cached) {
|
|
2867
|
-
if (turnsSpent + runsPerEval > maxTurns) {
|
|
2868
|
-
results.push({
|
|
2869
|
-
...base,
|
|
2870
|
-
outcome: "skipped",
|
|
2871
|
-
skipReason: turnBudgetSkipReason(maxTurns),
|
|
2872
|
-
turns: 0,
|
|
2873
|
-
durationMs: 0
|
|
2874
|
-
});
|
|
2875
|
-
continue;
|
|
2876
|
-
}
|
|
2877
|
-
turnsSpent += runsPerEval;
|
|
2878
|
-
}
|
|
2879
|
-
const runs = await runEnsemble({
|
|
2880
|
-
provider: evalProvider,
|
|
2881
|
-
system: JUDGE_SYSTEM_PROMPT,
|
|
2882
|
-
user: buildUserContent(plan, selected.text, selected.label),
|
|
2883
|
-
runs: runsPerEval,
|
|
2884
|
-
temperature,
|
|
2885
|
-
schema: verdictSchema,
|
|
2886
|
-
cache,
|
|
2887
|
-
cacheKey: key,
|
|
2888
|
-
label: "manni-tracevals"
|
|
2889
|
-
});
|
|
2890
|
-
const consensusBase = computeConsensus(runs);
|
|
2891
|
-
const zone = zoneFor(consensusBase, zones);
|
|
2892
|
-
const consensus = { ...consensusBase, zone };
|
|
2893
|
-
const judgeModel = evalProvider.modelName();
|
|
2894
|
-
const selfPreference = sessionModel !== void 0 && sessionModel === judgeModel ? { axis: "session", model: judgeModel } : plan.proposedBy?.includes(judgeModel) === true ? { axis: "criterion", model: judgeModel } : void 0;
|
|
2895
|
-
results.push({
|
|
2896
|
-
...base,
|
|
2897
|
-
outcome: zone === "auto-pass" ? "pass" : zone === "auto-fail" ? "fail" : "needs-review",
|
|
2898
|
-
consensus,
|
|
2899
|
-
turns: cached ? 0 : runsPerEval,
|
|
2900
|
-
...selfPreference ? { selfPreference } : {},
|
|
2901
|
-
durationMs: Date.now() - start
|
|
2902
|
-
});
|
|
2903
|
-
}
|
|
2904
|
-
return results;
|
|
2905
|
-
};
|
|
2906
|
-
}
|
|
2907
|
-
async function resolveOverride(plan, options) {
|
|
2908
|
-
const named = plan.provider !== void 0 ? `provider "${plan.provider}"` : `model "${plan.model ?? ""}"`;
|
|
2909
|
-
if (options.providerFor === void 0) {
|
|
2910
|
-
return {
|
|
2911
|
-
error: `eval names ${named}, but this run cannot construct providers by name`
|
|
2912
|
-
};
|
|
2913
|
-
}
|
|
2914
|
-
try {
|
|
2915
|
-
return {
|
|
2916
|
-
provider: await options.providerFor({
|
|
2917
|
-
...plan.provider !== void 0 ? { provider: plan.provider } : {},
|
|
2918
|
-
...plan.model !== void 0 ? { model: plan.model } : {},
|
|
2919
|
-
origin: `eval "${plan.evalName}" in ${plan.artifact.path}`
|
|
2920
|
-
})
|
|
2921
|
-
};
|
|
2922
|
-
} catch (err) {
|
|
2923
|
-
return {
|
|
2924
|
-
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)}`
|
|
2925
|
-
};
|
|
2926
|
-
}
|
|
2927
|
-
}
|
|
2928
|
-
|
|
2929
2075
|
// src/tracevals/commands/run.ts
|
|
2930
2076
|
function asGrants(values) {
|
|
2931
2077
|
const unknown = values.filter((v) => !isExecutionGrant(v));
|
|
@@ -3011,7 +2157,7 @@ async function prepareRun(options) {
|
|
|
3011
2157
|
runs: options.runs ?? config.judge.ensembleRuns,
|
|
3012
2158
|
temperature: config.judge.temperature,
|
|
3013
2159
|
zones: config.judge.zones,
|
|
3014
|
-
cacheDir:
|
|
2160
|
+
cacheDir: resolve3(configDir, config.judge.cacheDir),
|
|
3015
2161
|
...options.noCache !== void 0 ? { noCache: options.noCache } : {},
|
|
3016
2162
|
maxTurns: options.maxTurns ?? config.judge.maxTurns
|
|
3017
2163
|
});
|
|
@@ -3047,7 +2193,7 @@ async function runOne(options, context) {
|
|
|
3047
2193
|
});
|
|
3048
2194
|
let comparison;
|
|
3049
2195
|
if (options.history) {
|
|
3050
|
-
const historyFile =
|
|
2196
|
+
const historyFile = resolve3(context.configDir, config.history.file);
|
|
3051
2197
|
comparison = compareToLast(await loadHistory(historyFile), report) ?? void 0;
|
|
3052
2198
|
await appendHistory(historyFile, report);
|
|
3053
2199
|
}
|
|
@@ -3176,13 +2322,6 @@ export {
|
|
|
3176
2322
|
renderCalibration,
|
|
3177
2323
|
IMPLICIT_EVAL_NAME,
|
|
3178
2324
|
planEvals,
|
|
3179
|
-
PROMPT_VERSION,
|
|
3180
|
-
JUDGE_SYSTEM_PROMPT,
|
|
3181
|
-
buildUserContent,
|
|
3182
|
-
BUILTIN_GRADER_KINDS,
|
|
3183
|
-
registerGrader,
|
|
3184
|
-
graderFor,
|
|
3185
|
-
listGraderKinds,
|
|
3186
2325
|
runEvals,
|
|
3187
2326
|
METADATA_KEY,
|
|
3188
2327
|
urlManifestRefusal,
|
|
@@ -3192,10 +2331,6 @@ export {
|
|
|
3192
2331
|
appendHistory,
|
|
3193
2332
|
loadHistory,
|
|
3194
2333
|
compareToLast,
|
|
3195
|
-
sha256,
|
|
3196
|
-
VerdictCache,
|
|
3197
|
-
cacheKey,
|
|
3198
|
-
makeTraceJudge,
|
|
3199
2334
|
prepareRun,
|
|
3200
2335
|
runOne,
|
|
3201
2336
|
runRun,
|
|
@@ -3204,4 +2339,4 @@ export {
|
|
|
3204
2339
|
resolveBatchTraces,
|
|
3205
2340
|
runBatch
|
|
3206
2341
|
};
|
|
3207
|
-
//# sourceMappingURL=chunk-
|
|
2342
|
+
//# sourceMappingURL=chunk-63EQKVNT.js.map
|