agentic-qe 3.14.0 → 3.14.2
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/.claude/helpers/brain-checkpoint.cjs +2 -1
- package/.claude/helpers/validate-v3-config.sh +6 -5
- package/.claude/hooks/aqe-hook.cjs +14 -14
- package/.claude/skills/qe-browser/evals/qe-browser.yaml +30 -41
- package/.claude/skills/qe-browser/fixtures/serve-skills.js +37 -0
- package/.claude/skills/qe-browser/scripts/lib/vibium.js +1 -1
- package/.claude/skills/qe-browser/scripts/smoke-test.sh +56 -25
- package/.claude/skills/qe-browser/scripts/visual-diff.js +24 -15
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +114 -0
- package/assets/skills/qe-browser/evals/qe-browser.yaml +30 -41
- package/assets/skills/qe-browser/fixtures/serve-skills.js +37 -0
- package/assets/skills/qe-browser/scripts/lib/vibium.js +1 -1
- package/assets/skills/qe-browser/scripts/smoke-test.sh +56 -25
- package/assets/skills/qe-browser/scripts/visual-diff.js +24 -15
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +7 -7
- package/dist/cli/chunks/adapter-OJF6LAJV.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-JZO6VUW4.js → agent-booster-wasm-SD5N32MX.js} +2 -2
- package/dist/cli/chunks/{agent-handler-534KFGEJ.js → agent-handler-OZRSJM7F.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-B7KWLWY4.js → agent-memory-branch-NYTRANRN.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-FGT474XB.js +2 -0
- package/dist/cli/chunks/{arena-OW5MELJX.js → arena-EX3SC2DP.js} +4 -4
- package/dist/cli/chunks/{arena-7CCD3S3I.js → arena-FOTVSRK4.js} +2 -2
- package/dist/cli/chunks/{audit-BHVKN4E2.js → audit-Q5GHSUQY.js} +3 -3
- package/dist/cli/chunks/base-HH765JFV.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-P5FA6WFK.js → better-sqlite3-S7M5R2HS.js} +2 -2
- package/dist/cli/chunks/{brain-handler-WNW5LOV7.js → brain-handler-5FSA46R5.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-TVZ2ODKH.js → branch-enumerator-RWAXTGEU.js} +2 -2
- package/dist/cli/chunks/{browser-TCEB2W2F.js → browser-IGDESJGF.js} +2 -2
- package/dist/cli/chunks/browser-workflow-NPM4FUPI.js +2 -0
- package/dist/cli/chunks/{chunk-Q73RRTLE.js → chunk-2EHFEMRU.js} +2 -2
- package/dist/cli/chunks/{chunk-ZBOWR4XT.js → chunk-2H5YJ5ZK.js} +2 -2
- package/dist/cli/chunks/chunk-2LKAMMMI.js +2 -0
- package/dist/cli/chunks/{chunk-A2WZEMWT.js → chunk-2TG24LYQ.js} +1 -1
- package/dist/cli/chunks/{chunk-3QT6S3A3.js → chunk-3C2K4YMS.js} +3 -3
- package/dist/cli/chunks/{chunk-VESOYP6A.js → chunk-3DFFFXXO.js} +2 -2
- package/dist/cli/chunks/{chunk-K6CGQR5R.js → chunk-3WV4H33V.js} +1 -1
- package/dist/cli/chunks/{chunk-IL4AEB3J.js → chunk-42WUDDUU.js} +2 -2
- package/dist/cli/chunks/chunk-4AKGBUYD.js +4 -0
- package/dist/cli/chunks/{chunk-4FEJEVG7.js → chunk-4K27ESCA.js} +1 -1
- package/dist/cli/chunks/{chunk-TGOGCA74.js → chunk-4M6A3PVJ.js} +2 -2
- package/dist/cli/chunks/{chunk-RGVD6ZUX.js → chunk-4MH22236.js} +1 -1
- package/dist/cli/chunks/{chunk-6DPAMYLU.js → chunk-4N44UJGI.js} +2 -2
- package/dist/cli/chunks/{chunk-DJITEQYS.js → chunk-4PH7O5ZH.js} +2 -2
- package/dist/cli/chunks/{chunk-M3HUZD2I.js → chunk-4RT7I7PI.js} +1 -1
- package/dist/cli/chunks/chunk-4UCMTYFQ.js +65 -0
- package/dist/cli/chunks/{chunk-ZI3UO7QR.js → chunk-4ZUZDFAA.js} +2 -2
- package/dist/cli/chunks/{chunk-QSPRQPEL.js → chunk-57TNBR2P.js} +2 -2
- package/dist/cli/chunks/{chunk-ZCVJCCQQ.js → chunk-5EHLGOWW.js} +2 -2
- package/dist/cli/chunks/{chunk-ZAAYOENS.js → chunk-5WJUNRTY.js} +2 -2
- package/dist/cli/chunks/{chunk-QZPFUFZG.js → chunk-67A6PEZM.js} +2 -2
- package/dist/cli/chunks/{chunk-7BOPFN3Y.js → chunk-6EHN7Q2Q.js} +2 -2
- package/dist/cli/chunks/{chunk-2HYVOX6N.js → chunk-6F4WHN7D.js} +1 -1
- package/dist/cli/chunks/{chunk-GVEJP5T7.js → chunk-6LMLN5R2.js} +2 -2
- package/dist/cli/chunks/{chunk-QKQZ4IJF.js → chunk-6SZKLWZT.js} +5 -5
- package/dist/cli/chunks/{chunk-PEW6FZ47.js → chunk-6VKJAMZY.js} +1 -1
- package/dist/cli/chunks/{chunk-VYENTZ45.js → chunk-7AFBNU6K.js} +2 -2
- package/dist/cli/chunks/{chunk-6IJMD2ZL.js → chunk-7FWP7CZY.js} +3 -3
- package/dist/cli/chunks/{chunk-IE5LC7MB.js → chunk-7SK6IMGZ.js} +2 -2
- package/dist/cli/chunks/{chunk-3EM2MK3Z.js → chunk-A7N3YUDJ.js} +2 -2
- package/dist/cli/chunks/{chunk-J3XSHJGK.js → chunk-ADK7DF3G.js} +2 -2
- package/dist/cli/chunks/{chunk-EJ6IP7DE.js → chunk-ARMZYHYL.js} +2 -2
- package/dist/cli/chunks/{chunk-BZ4QVFP2.js → chunk-BWRHOIYC.js} +2 -2
- package/dist/cli/chunks/{chunk-A7SKM6JL.js → chunk-C7AXRI7E.js} +1 -1
- package/dist/cli/chunks/{chunk-4XTHRAUV.js → chunk-CG2MUD7U.js} +1 -1
- package/dist/cli/chunks/{chunk-HLNQDRHA.js → chunk-CH2TQCV5.js} +1 -1
- package/dist/cli/chunks/{chunk-JGROLJ33.js → chunk-CIESXO73.js} +1 -1
- package/dist/cli/chunks/{chunk-AR6SATU3.js → chunk-CJCT452S.js} +2 -2
- package/dist/cli/chunks/{chunk-UUJ5VQJM.js → chunk-CJHVOBJY.js} +1 -1
- package/dist/cli/chunks/{chunk-VOSISOFD.js → chunk-CTCQOYBS.js} +1 -1
- package/dist/cli/chunks/{chunk-XITTURP2.js → chunk-D4RCV4LY.js} +2 -2
- package/dist/cli/chunks/{chunk-5XGVSQS2.js → chunk-DRO5NJZA.js} +2 -2
- package/dist/cli/chunks/{chunk-QMMDN4WX.js → chunk-DVHWLAEO.js} +3 -3
- package/dist/cli/chunks/{chunk-5LEAGKX5.js → chunk-DW6ZMNMR.js} +2 -2
- package/dist/cli/chunks/{chunk-ZBKGX72B.js → chunk-E3Q7WNJD.js} +3 -3
- package/dist/cli/chunks/{chunk-5MZF4N4Q.js → chunk-EAJK25IS.js} +1 -1
- package/dist/cli/chunks/{chunk-3RYTAYR6.js → chunk-EH5OCHAJ.js} +1 -1
- package/dist/cli/chunks/{chunk-UI6WSPEK.js → chunk-F2KRT2II.js} +3 -3
- package/dist/cli/chunks/{chunk-NDPQ2WPU.js → chunk-FPHPP5TQ.js} +1 -1
- package/dist/cli/chunks/{chunk-WWWX76QB.js → chunk-FREF6Y4L.js} +2 -2
- package/dist/cli/chunks/{chunk-SROZXIMT.js → chunk-FVGTINVR.js} +54 -54
- package/dist/cli/chunks/{chunk-H3YDDKBW.js → chunk-G2CLZVYI.js} +3 -3
- package/dist/cli/chunks/{chunk-2O4DDPEA.js → chunk-G6AV2HGY.js} +3 -3
- package/dist/cli/chunks/{chunk-ENGKLFLY.js → chunk-GHQ5PUOV.js} +2 -2
- package/dist/cli/chunks/{chunk-NKWO2X3T.js → chunk-GHUPID5E.js} +1 -1
- package/dist/cli/chunks/{chunk-S5YVLPXU.js → chunk-GJAWEUIN.js} +2 -2
- package/dist/cli/chunks/{chunk-6IZQSLYZ.js → chunk-HBTC4L53.js} +2 -2
- package/dist/cli/chunks/{chunk-DDPJUAXQ.js → chunk-HSJ5FQCF.js} +2 -2
- package/dist/cli/chunks/{chunk-OONCRNFA.js → chunk-HZ6NEJMO.js} +2 -2
- package/dist/cli/chunks/{chunk-LCSVROU7.js → chunk-HZMLNM2T.js} +10 -10
- package/dist/cli/chunks/{chunk-JY4VZ6BN.js → chunk-ICKLBATY.js} +2 -2
- package/dist/cli/chunks/{chunk-JMKMDSXG.js → chunk-IUNMW454.js} +2 -2
- package/dist/cli/chunks/{chunk-XXFKN7LB.js → chunk-IVGVOGIZ.js} +1 -1
- package/dist/cli/chunks/{chunk-3GUO4ERR.js → chunk-IWFL6EFI.js} +2 -2
- package/dist/cli/chunks/{chunk-FRL3X2QA.js → chunk-JDXLCNKV.js} +2 -2
- package/dist/cli/chunks/{chunk-YW4RNZWT.js → chunk-JIUF6NV6.js} +2 -2
- package/dist/cli/chunks/{chunk-JAK5UUWH.js → chunk-JQ2ZD3WO.js} +2 -2
- package/dist/cli/chunks/{chunk-YEAC3DC6.js → chunk-K574FLVB.js} +2 -2
- package/dist/cli/chunks/{chunk-LZHTCUCO.js → chunk-KEEBUVGV.js} +2 -2
- package/dist/cli/chunks/{chunk-LKR7T3OZ.js → chunk-KFXZDQ5J.js} +1 -1
- package/dist/cli/chunks/{chunk-7OUMJCJT.js → chunk-KPFG4OIM.js} +1 -1
- package/dist/cli/chunks/{chunk-HQ7243G3.js → chunk-KZOBLLXW.js} +2 -2
- package/dist/cli/chunks/{chunk-R6WJF4D5.js → chunk-L2F7FVIU.js} +2 -2
- package/dist/cli/chunks/{chunk-VRRG66XB.js → chunk-LML5VTFK.js} +1 -1
- package/dist/cli/chunks/{chunk-JTWJR2KY.js → chunk-LWUJQGCS.js} +2 -2
- package/dist/cli/chunks/{chunk-BQCTO7UB.js → chunk-MH73D5TN.js} +2 -2
- package/dist/cli/chunks/{chunk-U4GZWPKM.js → chunk-MWQTACNA.js} +2 -2
- package/dist/cli/chunks/{chunk-CIZ6LSNV.js → chunk-N3RN4QTC.js} +2 -2
- package/dist/cli/chunks/{chunk-ZQSXG7FA.js → chunk-N5ZRUOMR.js} +2 -2
- package/dist/cli/chunks/{chunk-AFGT26NR.js → chunk-NAZVPZJS.js} +2 -2
- package/dist/cli/chunks/{chunk-FOHYBR3O.js → chunk-NG2UVPTW.js} +1 -1
- package/dist/cli/chunks/{chunk-2D7UBX5S.js → chunk-NHHWLJQF.js} +1 -1
- package/dist/cli/chunks/{chunk-JRKEBESE.js → chunk-NNOMDM4N.js} +2 -2
- package/dist/cli/chunks/{chunk-YKWMKRYB.js → chunk-NRR23SJV.js} +1 -1
- package/dist/cli/chunks/{chunk-WKNWRDA5.js → chunk-NWFIJNEB.js} +1 -1
- package/dist/cli/chunks/{chunk-4MK2G6TK.js → chunk-OBCKP3G4.js} +2 -2
- package/dist/cli/chunks/{chunk-YKZV7O65.js → chunk-OC2CKU7I.js} +2 -2
- package/dist/cli/chunks/{chunk-7RVAHJQZ.js → chunk-OX6T26CD.js} +3 -3
- package/dist/cli/chunks/chunk-P64DMQ2C.js +2 -0
- package/dist/cli/chunks/{chunk-RKUYVVGJ.js → chunk-PFXX5Q32.js} +2 -2
- package/dist/cli/chunks/chunk-PHHXHG2W.js +2 -0
- package/dist/cli/chunks/{chunk-N2YAUDAV.js → chunk-PMUBG2RU.js} +2 -2
- package/dist/cli/chunks/{chunk-WTHAVFIC.js → chunk-PVHO6KLB.js} +1 -1
- package/dist/cli/chunks/{chunk-MO7EITJK.js → chunk-PWEIDHT7.js} +2 -2
- package/dist/cli/chunks/{chunk-52DFCV57.js → chunk-PZKZY6PB.js} +2 -2
- package/dist/cli/chunks/{chunk-I3VHXA2W.js → chunk-Q335R4MR.js} +2 -2
- package/dist/cli/chunks/{chunk-ECTPFCON.js → chunk-Q3JHS3UD.js} +2 -2
- package/dist/cli/chunks/{chunk-HJIAVR6P.js → chunk-QFUX7ELG.js} +2 -2
- package/dist/cli/chunks/{chunk-L4C42WYI.js → chunk-QW4LN5NK.js} +2 -2
- package/dist/cli/chunks/{chunk-HQHLHSJO.js → chunk-QXTW7XCS.js} +2 -2
- package/dist/cli/chunks/{chunk-SSV6KSFT.js → chunk-R5RNOLHI.js} +1 -1
- package/dist/cli/chunks/{chunk-AVLA5PBJ.js → chunk-RCI64RIJ.js} +2 -2
- package/dist/cli/chunks/{chunk-T3BZAFLP.js → chunk-RFNEHNJV.js} +1 -1
- package/dist/cli/chunks/{chunk-IL6QRXRP.js → chunk-RGH3WGWD.js} +10 -10
- package/dist/cli/chunks/{chunk-E4NU4BJA.js → chunk-RHJVDCLV.js} +2 -2
- package/dist/cli/chunks/{chunk-KTSCZ7AW.js → chunk-RVCWSAXI.js} +2 -2
- package/dist/cli/chunks/{chunk-TQJE7DNL.js → chunk-RYJHREYS.js} +2 -2
- package/dist/cli/chunks/{chunk-HNKPLVYS.js → chunk-S4MR6RTE.js} +1 -1
- package/dist/cli/chunks/{chunk-6AYO3IR2.js → chunk-S7N4BKI3.js} +2 -2
- package/dist/cli/chunks/{chunk-2NO4H35K.js → chunk-SEHCX4NH.js} +1 -1
- package/dist/cli/chunks/{chunk-GKNDP5VK.js → chunk-T46LOLW3.js} +2 -2
- package/dist/cli/chunks/{chunk-VXU53F7Z.js → chunk-T4C56HBW.js} +2 -2
- package/dist/cli/chunks/{chunk-43GPSYAL.js → chunk-TENYL5TI.js} +2 -2
- package/dist/cli/chunks/{chunk-6AOZU3UN.js → chunk-TLPL3EQY.js} +2 -2
- package/dist/cli/chunks/{chunk-4ZVGSVHV.js → chunk-TYVQNYXX.js} +4 -4
- package/dist/cli/chunks/{chunk-NOPVFBQM.js → chunk-U2AY57XZ.js} +2 -2
- package/dist/cli/chunks/{chunk-IQLRA4FV.js → chunk-U54OOA24.js} +1 -1
- package/dist/cli/chunks/{chunk-IQ3JFHZN.js → chunk-UHTAI4ZB.js} +1 -1
- package/dist/cli/chunks/{chunk-KDIZQHG5.js → chunk-UIGEUEBT.js} +2 -2
- package/dist/cli/chunks/{chunk-5VDVYTO5.js → chunk-UYTWDS2R.js} +2 -2
- package/dist/cli/chunks/{chunk-ZNSMVQCG.js → chunk-VNAKBHJI.js} +2 -2
- package/dist/cli/chunks/{chunk-SUSMHSXT.js → chunk-VOYJJ3KA.js} +2 -2
- package/dist/cli/chunks/{chunk-QQCENKCX.js → chunk-VSYBMNIR.js} +1 -1
- package/dist/cli/chunks/{chunk-7RAB2BZY.js → chunk-W2FLULF4.js} +2 -2
- package/dist/cli/chunks/{chunk-NYARYONH.js → chunk-W4OQYLYO.js} +1 -1
- package/dist/cli/chunks/{chunk-DOWCOZDO.js → chunk-WBH4C4BG.js} +2 -2
- package/dist/cli/chunks/{chunk-OIYUSWHX.js → chunk-WBMRADQP.js} +1 -1
- package/dist/cli/chunks/{chunk-B3H4K7CY.js → chunk-WMW47QMR.js} +2 -2
- package/dist/cli/chunks/{chunk-VPVZHJSU.js → chunk-WVY22NHZ.js} +2 -2
- package/dist/cli/chunks/{chunk-6W42XWLL.js → chunk-WXMSRBQF.js} +2 -2
- package/dist/cli/chunks/{chunk-CIUOC5F3.js → chunk-XPLSLHRB.js} +1 -1
- package/dist/cli/chunks/{chunk-E722WNWC.js → chunk-YF5OP6CR.js} +2 -2
- package/dist/cli/chunks/{chunk-H76TV4UU.js → chunk-YN6W2XIT.js} +3 -3
- package/dist/cli/chunks/{chunk-FF43SRP6.js → chunk-ZCDXJ27H.js} +1 -1
- package/dist/cli/chunks/{chunk-TKYEP7OR.js → chunk-ZFGND4QK.js} +1 -1
- package/dist/cli/chunks/{chunk-O2MZZL54.js → chunk-ZWRQ5VAU.js} +2 -2
- package/dist/cli/chunks/{chunk-H6NFDOMK.js → chunk-ZYLSOBOR.js} +1 -1
- package/dist/cli/chunks/{ci-B432UH6N.js → ci-NTRH7PAW.js} +2 -2
- package/dist/cli/chunks/{ci-output-GTHH7WYG.js → ci-output-F57RSD35.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-VW75DLME.js → circuit-breaker-4WST3QSA.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-RE3IVT7U.js → claude-flow-setup-KB4TKMYI.js} +2 -2
- package/dist/cli/chunks/client-GPZEC54E.js +2 -0
- package/dist/cli/chunks/{cline-installer-NUBZZ55N.js → cline-installer-W2ZHQ6WM.js} +2 -2
- package/dist/cli/chunks/{code-K6JCWKNW.js → code-TF2AVR5D.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-I4ILB5JN.js → code-index-extractor-RMDRUVQJ.js} +2 -2
- package/dist/cli/chunks/codex-installer-VSTRHJHV.js +14 -0
- package/dist/cli/chunks/{completions-V3KJVJF4.js → completions-3Q37QVFR.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-HRG7OOY3.js → complexity-analyzer-3FNFLACD.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-CNTDONWG.js → continuedev-installer-VTEXM455.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-XPWWIWYA.js → copilot-installer-AGY7DQUS.js} +2 -2
- package/dist/cli/chunks/core-handlers-YMGHYIBR.js +2 -0
- package/dist/cli/chunks/{cost-tracker-MFNLQ56K.js → cost-tracker-LTZAQBX7.js} +2 -2
- package/dist/cli/chunks/{coverage-KOIK654V.js → coverage-TT64IOS4.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-ECBNTGYJ.js +2 -0
- package/dist/cli/chunks/{cursor-installer-S5MKLRQQ.js → cursor-installer-OVOJIOHN.js} +2 -2
- package/dist/cli/chunks/{daemon-DUS6JYW6.js → daemon-DMFZMXKA.js} +8 -8
- package/dist/cli/chunks/{daemon-Z7VPGWHY.js → daemon-XCULEHWY.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-7CQ3ARNI.js → dag-attention-scheduler-WW2RX4B5.js} +2 -2
- package/dist/cli/chunks/{detect-WORBCAYF.js → detect-QNWIM232.js} +2 -2
- package/dist/cli/chunks/{dist-node-KRNI6OYW.js → dist-node-6GQIY3CG.js} +2 -2
- package/dist/cli/chunks/{domain-handler-KRUR2VQG.js → domain-handler-6RJPDELX.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-VEOVLV54.js → domain-transfer-WK524LBS.js} +2 -2
- package/dist/cli/chunks/dream-EHGKCFWH.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-QU3NQVA5.js → embed-and-insert-pattern-SO6GWJW7.js} +2 -2
- package/dist/cli/chunks/{eval-AYQ7BSUP.js → eval-GL544IPO.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-AWQBL6LT.js → experience-capture-middleware-BCCJ35OX.js} +3 -3
- package/dist/cli/chunks/{fast-paths-V5EL4BYJ.js → fast-paths-CATDDBEU.js} +2 -2
- package/dist/cli/chunks/{feature-flags-P34BPRWU.js → feature-flags-BUXNAORY.js} +2 -2
- package/dist/cli/chunks/{feature-flags-BXX7BP22.js → feature-flags-KNNWWP5G.js} +2 -2
- package/dist/cli/chunks/{file-discovery-MS6BKQ2U.js → file-discovery-S4HF3O7D.js} +2 -2
- package/dist/cli/chunks/{fleet-7WVVPA4W.js → fleet-DQVQQONW.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-7WQ3LEPG.js → gnn-wrapper-G7ABZUG7.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-P7QD3BZH.js → heartbeat-handler-UFMELIWT.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-UFEL2CBW.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-BLSD45CX.js +2 -0
- package/dist/cli/chunks/hnsw-index-A3RZODEN.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-Y3GAR3UP.js → hnsw-legacy-bridge-YIILSRXI.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-5QUXZQWQ.js → hnswlib-node-TSVRMXDH.js} +2 -2
- package/dist/cli/chunks/{hooks-2D64KPRY.js → hooks-OHQPNK74.js} +10 -10
- package/dist/cli/chunks/{hypergraph-engine-5INXEZDP.js → hypergraph-engine-LY7PJDSL.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-YJJJ3ESZ.js → hypergraph-handler-YGDYZO6H.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-OXHD3FOH.js +2 -0
- package/dist/cli/chunks/{init-handler-QSFYJN5Q.js → init-handler-MTK65LI3.js} +9 -8
- package/dist/cli/chunks/init-wizard-PKZL7QBU.js +2 -0
- package/dist/cli/chunks/kernel-XWPM72UJ.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-3N3QGTJU.js → kilocode-installer-3IICU4RS.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-GIWVTFZQ.js → kiro-installer-MXOVQYQA.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-FRKR5XWI.js +2 -0
- package/dist/cli/chunks/{learning-SGO2DQ5Q.js → learning-EV5LSOOM.js} +3 -3
- package/dist/cli/chunks/{llm-router-HBBULO65.js → llm-router-7LYDJUOT.js} +4 -4
- package/dist/cli/chunks/llm-router-service-R7A5HHDM.js +2 -0
- package/dist/cli/chunks/{load-B5OFYB4H.js → load-F4PVAMXQ.js} +2 -2
- package/dist/cli/chunks/load-test-5IKDWSYL.js +2 -0
- package/dist/cli/chunks/{mcp-FG3LNQR4.js → mcp-DUYJUEME.js} +2 -2
- package/dist/cli/chunks/{memory-SPS7ZWLC.js → memory-XTTYORAS.js} +5 -5
- package/dist/cli/chunks/memory-backend-7VW5QCMO.js +2 -0
- package/dist/cli/chunks/{memory-handlers-P7FTPWP3.js → memory-handlers-VZH3R2TQ.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-PUB7E6KH.js → multi-model-executor-R6XCTMCF.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-TGCSGVG2.js → opencode-installer-33ULBU2F.js} +2 -2
- package/dist/cli/chunks/{orchestrator-S5FTJFGB.js → orchestrator-34ZJEKTJ.js} +22 -21
- package/dist/cli/chunks/pattern-null-store-BU6LCB2W.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-LCXXGRAB.js → pattern-usage-recorder-GZ2M3F2E.js} +2 -2
- package/dist/cli/chunks/{pipeline-ENOSRHKW.js → pipeline-SR5OTY45.js} +2 -2
- package/dist/cli/chunks/platform-VKJFJIAW.js +2 -0
- package/dist/cli/chunks/{plugin-JZ5ODJSU.js → plugin-5C5UBQUQ.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-DPJUPNCG.js → prime-radiant-advanced-wasm-KO2PQI3D.js} +2 -2
- package/dist/cli/chunks/protocol-executor-BSP5LWJN.js +2 -0
- package/dist/cli/chunks/{protocol-handler-IP4NLVY3.js → protocol-handler-ZF74NIKA.js} +2 -2
- package/dist/cli/chunks/{prove-P6FM4RU7.js → prove-MO5TQQU4.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-J2RC7P25.js +2 -0
- package/dist/cli/chunks/{quality-UHP4XO26.js → quality-EYIN6AER.js} +2 -2
- package/dist/cli/chunks/quality-gate-V6OQM57O.js +7 -0
- package/dist/cli/chunks/queen-coordinator-XI5AJV2V.js +2 -0
- package/dist/cli/chunks/{real-embeddings-6SO5MFRQ.js → real-embeddings-AR7TZX7U.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-WTWUOFCH.js → roocode-installer-46E626VZ.js} +2 -2
- package/dist/cli/chunks/router-VXQYYA3D.js +2 -0
- package/dist/cli/chunks/routing-feedback-HZQTASFF.js +2 -0
- package/dist/cli/chunks/{routing-handler-IK7HYERQ.js → routing-handler-ZNRVW6QW.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-THLB4NIM.js → ruvector-commands-4L2CQMWS.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-BDTLLJER.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-IB343MDN.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-BUKCSHBD.js → rvf-migration-coordinator-H4RVGBIA.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-Y7SN7LHU.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-ECTADZIN.js → rvf-store-integrity-OJGWWPLL.js} +2 -2
- package/dist/cli/chunks/safe-db-2VTKKBJU.js +2 -0
- package/dist/cli/chunks/schedule-QJ4CFGJY.js +2 -0
- package/dist/cli/chunks/scheduler-2NHDQPC3.js +2 -0
- package/dist/cli/chunks/{security-HN4UXFXX.js → security-JF3BVNRO.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-XJCPX5SN.js → shared-rvf-adapter-M6NNIZ5W.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-23X5PNY5.js → shared-rvf-dual-writer-LHMFCYVE.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-NVVAPZN3.js +2 -0
- package/dist/cli/chunks/{status-handler-ZXANTHKT.js → status-handler-GMIOXQIE.js} +2 -2
- package/dist/cli/chunks/{structural-health-LR6WI3AH.js → structural-health-YZXHVHM6.js} +2 -2
- package/dist/cli/chunks/{sync-I5IUJF33.js → sync-GMPCPV5L.js} +2 -2
- package/dist/cli/chunks/{sync-4OEI3BC2.js → sync-N56UQGCS.js} +2 -2
- package/dist/cli/chunks/{task-handler-R3ATJKU5.js → task-handler-VTNRGAXP.js} +2 -2
- package/dist/cli/chunks/{task-handlers-4X357AEW.js → task-handlers-FYSDH55N.js} +3 -3
- package/dist/cli/chunks/{test-PR2B5H2F.js → test-GQNCKRSP.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-ZNOSQVLD.js → test-scheduling-GPRXSIRP.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-LYXOI72S.js → token-bootstrap-76SRNXGG.js} +2 -2
- package/dist/cli/chunks/{token-usage-R6EQZBX2.js → token-usage-O7CZDP5Q.js} +2 -2
- package/dist/cli/chunks/{transformers-COQWK27J.js → transformers-LTU4LSSC.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-LLIW2X3M.js → tree-sitter-wasm-parser-NQSQCMBM.js} +2 -2
- package/dist/cli/chunks/{types-MEYTZITK.js → types-OP6IWE6N.js} +2 -2
- package/dist/cli/chunks/unified-memory-DSTIEDSH.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-KBV3P4OS.js +2 -0
- package/dist/cli/chunks/unified-persistence-XKCOUBKY.js +2 -0
- package/dist/cli/chunks/{upgrade-DVIJ456A.js → upgrade-OQWRBZ3R.js} +2 -2
- package/dist/cli/chunks/{validate-UYTSMJ5X.js → validate-TH5SRP3E.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-P32WCJR6.js → validate-swarm-UITL2JUS.js} +2 -2
- package/dist/cli/chunks/{vibium-JGVOLM6X.js → vibium-O6PRAG4J.js} +2 -2
- package/dist/cli/chunks/visual-security-TTWSPZTZ.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-5ZGNCTPN.js → web-tree-sitter-XBFBY4OF.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-IILSSQAE.js → windsurf-installer-DVT5NRNY.js} +2 -2
- package/dist/cli/chunks/witness-chain-2KY73HPN.js +2 -0
- package/dist/cli/chunks/{witness-chain-JZMXCG3B.js → witness-chain-VRSH2F36.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-UUTLNUIH.js → witness-key-manager-GFHRDKQ4.js} +2 -2
- package/dist/cli/chunks/{workflow-NS7HXVHZ.js → workflow-HAZ6YKOG.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-UK56AVOT.js +2 -0
- package/dist/cli/chunks/{wrappers-XKEDSV5W.js → wrappers-5LLLT7GM.js} +2 -2
- package/dist/cli/commands/daemon.js +3 -0
- package/dist/cli/commands/platform.d.ts +1 -0
- package/dist/cli/commands/platform.js +28 -6
- package/dist/cli/commands/quality-gate.js +25 -3
- package/dist/cli/foreground-command.d.ts +3 -0
- package/dist/cli/foreground-command.js +22 -0
- package/dist/cli/handlers/init-handler.d.ts +5 -0
- package/dist/cli/handlers/init-handler.js +6 -0
- package/dist/cli/index.js +8 -1
- package/dist/contracts/verdicts.d.ts +625 -0
- package/dist/contracts/verdicts.js +202 -14
- package/dist/coordination/handlers/coverage-handlers.js +8 -1
- package/dist/domains/chaos-resilience/diagnosis/corpus.d.ts +5 -0
- package/dist/domains/chaos-resilience/diagnosis/corpus.js +141 -0
- package/dist/domains/chaos-resilience/diagnosis/detectors.d.ts +11 -0
- package/dist/domains/chaos-resilience/diagnosis/detectors.js +109 -0
- package/dist/domains/chaos-resilience/diagnosis/index.d.ts +5 -0
- package/dist/domains/chaos-resilience/diagnosis/index.js +5 -0
- package/dist/domains/chaos-resilience/diagnosis/scorer.d.ts +8 -0
- package/dist/domains/chaos-resilience/diagnosis/scorer.js +128 -0
- package/dist/domains/chaos-resilience/diagnosis/types.d.ts +171 -0
- package/dist/domains/chaos-resilience/diagnosis/types.js +3 -0
- package/dist/domains/chaos-resilience/index.d.ts +1 -0
- package/dist/domains/chaos-resilience/index.js +1 -0
- package/dist/domains/index.d.ts +1 -0
- package/dist/domains/index.js +1 -0
- package/dist/early-exit/early-exit-controller.d.ts +4 -2
- package/dist/early-exit/early-exit-controller.js +95 -7
- package/dist/early-exit/index.d.ts +1 -1
- package/dist/early-exit/speculative-executor.js +3 -0
- package/dist/early-exit/types.d.ts +51 -0
- package/dist/early-exit/types.js +3 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/init/browser-engine-installer.d.ts +11 -0
- package/dist/init/browser-engine-installer.js +35 -5
- package/dist/init/codex-installer.d.ts +11 -1
- package/dist/init/codex-installer.js +90 -24
- package/dist/init/init-wizard-hooks.js +11 -11
- package/dist/init/orchestrator.js +2 -0
- package/dist/init/phases/07-hooks.d.ts +3 -3
- package/dist/init/phases/07-hooks.js +19 -18
- package/dist/init/phases/09-assets.d.ts +4 -0
- package/dist/init/phases/09-assets.js +13 -10
- package/dist/init/phases/phase-interface.d.ts +2 -0
- package/dist/init/types.d.ts +4 -0
- package/dist/learning/index.d.ts +3 -0
- package/dist/learning/index.js +2 -0
- package/dist/learning/pattern-mutation-error.d.ts +9 -0
- package/dist/learning/pattern-mutation-error.js +14 -0
- package/dist/learning/pattern-store.js +24 -2
- package/dist/learning/qe-reasoning-bank.js +24 -5
- package/dist/learning/rvf-pattern-store.js +23 -5
- package/dist/learning/structural-retrieval/corpus.d.ts +5 -0
- package/dist/learning/structural-retrieval/corpus.js +97 -0
- package/dist/learning/structural-retrieval/evaluate.d.ts +7 -0
- package/dist/learning/structural-retrieval/evaluate.js +124 -0
- package/dist/learning/structural-retrieval/index.d.ts +6 -0
- package/dist/learning/structural-retrieval/index.js +4 -0
- package/dist/learning/structural-retrieval/receipt.d.ts +14 -0
- package/dist/learning/structural-retrieval/receipt.js +36 -0
- package/dist/learning/structural-retrieval/types.d.ts +83 -0
- package/dist/learning/structural-retrieval/types.js +2 -0
- package/dist/mcp/bundle.js +423 -423
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/protocol-server.js +11 -2
- package/dist/mcp/qe-tool-bridge.js +1 -0
- package/dist/mcp/services/session-resume.d.ts +15 -19
- package/dist/mcp/services/session-resume.js +204 -194
- package/dist/mcp/tool-annotations.d.ts +25 -0
- package/dist/mcp/tool-annotations.js +75 -0
- package/dist/mcp/tool-registry.js +17 -12
- package/dist/mcp/tools/base.d.ts +7 -1
- package/dist/mcp/tools/base.js +8 -0
- package/dist/mcp/tools/quality-assessment/gate.d.ts +8 -5
- package/dist/mcp/tools/quality-assessment/gate.js +9 -4
- package/dist/mcp/tools/registry.d.ts +3 -0
- package/dist/mcp/tools/registry.js +1 -0
- package/dist/mcp/types.d.ts +15 -0
- package/dist/skills/qe-court/cli.js +0 -0
- package/dist/validation/quality-gate-runner.d.ts +27 -4
- package/dist/validation/quality-gate-runner.js +33 -4
- package/dist/validation/verification-reach.d.ts +90 -0
- package/dist/validation/verification-reach.js +187 -0
- package/dist/verification/adversarial-verify/index.d.ts +1 -1
- package/dist/verification/adversarial-verify/measurement-receipt.d.ts +13 -0
- package/dist/verification/adversarial-verify/measurement-receipt.js +136 -0
- package/dist/verification/adversarial-verify/synthesize.js +7 -10
- package/dist/verification/adversarial-verify/types.d.ts +35 -0
- package/dist/verification/adversarial-verify/verify.js +6 -1
- package/package.json +9 -5
- package/schemas/coverage-gap.schema.json +41 -0
- package/schemas/finding-verdict.schema.json +470 -0
- package/schemas/risk-decision.schema.json +41 -0
- package/dist/cli/chunks/adapter-3VBXL7DO.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-NXRNKJNA.js +0 -2
- package/dist/cli/chunks/base-F6GMOKU2.js +0 -2
- package/dist/cli/chunks/browser-workflow-QRDC46LR.js +0 -2
- package/dist/cli/chunks/chunk-3JIJBR4V.js +0 -2
- package/dist/cli/chunks/chunk-R2B6EE45.js +0 -2
- package/dist/cli/chunks/chunk-TRDEULS7.js +0 -4
- package/dist/cli/chunks/chunk-WJXHE52V.js +0 -65
- package/dist/cli/chunks/client-HNBZUEVV.js +0 -2
- package/dist/cli/chunks/codex-installer-AKQ5BCHU.js +0 -15
- package/dist/cli/chunks/core-handlers-TB7NLYXL.js +0 -2
- package/dist/cli/chunks/cross-domain-router-MDSI553U.js +0 -2
- package/dist/cli/chunks/dream-X7ISHFEE.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-2C5XGFQT.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-KCVMXLUL.js +0 -2
- package/dist/cli/chunks/hnsw-index-OGWZS6MP.js +0 -2
- package/dist/cli/chunks/impact-analyzer-IBJ43GQL.js +0 -2
- package/dist/cli/chunks/init-wizard-6XMFD5LP.js +0 -2
- package/dist/cli/chunks/kernel-UDUMUPB3.js +0 -2
- package/dist/cli/chunks/knowledge-graph-JRYTUG3W.js +0 -2
- package/dist/cli/chunks/llm-router-service-KF5ZALUQ.js +0 -2
- package/dist/cli/chunks/load-test-LHMBCNCH.js +0 -2
- package/dist/cli/chunks/memory-backend-WZHKHBZK.js +0 -2
- package/dist/cli/chunks/pattern-null-store-UZSHCRL2.js +0 -2
- package/dist/cli/chunks/platform-WCRBO3Z7.js +0 -2
- package/dist/cli/chunks/protocol-executor-42NLVDTC.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-W74RSMMU.js +0 -2
- package/dist/cli/chunks/quality-gate-63DDBSGM.js +0 -7
- package/dist/cli/chunks/queen-coordinator-XELKSRMS.js +0 -2
- package/dist/cli/chunks/router-GTW2EQZV.js +0 -2
- package/dist/cli/chunks/routing-feedback-NVOBWEMK.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-5OPVMXNL.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-5S4YFTX4.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-LYSJHEVX.js +0 -2
- package/dist/cli/chunks/safe-db-AEB3JMLD.js +0 -2
- package/dist/cli/chunks/schedule-4QNPCQNT.js +0 -2
- package/dist/cli/chunks/scheduler-S3DFHX6A.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-L2KISU2H.js +0 -2
- package/dist/cli/chunks/unified-memory-5KQMA7FV.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-PQRPTYOD.js +0 -2
- package/dist/cli/chunks/unified-persistence-YDONVPJB.js +0 -2
- package/dist/cli/chunks/visual-security-RJ7RTNGJ.js +0 -2
- package/dist/cli/chunks/witness-chain-YXXXNGAM.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-5KUAVSTH.js +0 -2
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Agentic QE v3 - Structured Verdict Contracts (ADR-103)
|
|
3
|
-
*
|
|
4
|
-
* Typed, versioned verdict envelopes for agent-to-agent and MCP-boundary
|
|
5
|
-
* handoffs: RiskDecision (quality gates), FindingVerdict (review findings
|
|
6
|
-
* with adversarial refutations), CoverageGap (risk-weighted gap reports).
|
|
7
|
-
*
|
|
8
|
-
* Validators are dependency-free and are the source of truth; the exported
|
|
9
|
-
* JSON Schemas (published to schemas/*.schema.json by
|
|
10
|
-
* scripts/generate-verdict-schemas.mjs) mirror them for external tooling
|
|
11
|
-
* (ajv, workflow agent() schema option). Envelopes are versioned and
|
|
12
|
-
* additive-only within a major version: consumers must tolerate unknown
|
|
13
|
-
* fields, so schemas keep `additionalProperties: true`.
|
|
14
|
-
*/
|
|
1
|
+
import { isSanitizedReceiptIdentifier, isSanitizedReceiptTimestamp, RECEIPT_IDENTIFIER_PATTERN, RECEIPT_JWT_PATTERN, RECEIPT_KNOWN_TIMESTAMP_PATTERN, RECEIPT_OPAQUE_CORRELATION_PATTERN, RECEIPT_OPAQUE_DESCRIPTOR_PATTERN, RECEIPT_SENSITIVE_IDENTIFIER_PATTERN, } from '../verification/adversarial-verify/measurement-receipt.js';
|
|
15
2
|
export const VERDICT_CONTRACT_VERSION = '1.0';
|
|
16
3
|
// ============================================================================
|
|
17
4
|
// Validators (dependency-free, boundary-grade)
|
|
@@ -25,6 +12,88 @@ function isStringArray(v) {
|
|
|
25
12
|
function inUnitRange(v) {
|
|
26
13
|
return typeof v === 'number' && Number.isFinite(v) && v >= 0 && v <= 1;
|
|
27
14
|
}
|
|
15
|
+
const RECEIPT_KEYS = new Set([
|
|
16
|
+
'contract', 'provider', 'requestedModel', 'resolvedModel', 'endpointClass', 'snapshotIdentity',
|
|
17
|
+
'semantics', 'fingerprint', 'requestHash', 'promptHash', 'configHash', 'parserSchemaHash',
|
|
18
|
+
'outputHash', 'parsedVoteHash', 'temperature', 'topP', 'seed', 'deterministic', 'cacheStatus',
|
|
19
|
+
'retryCount', 'timestamp', 'windowId', 'latencyMs', 'requestId',
|
|
20
|
+
]);
|
|
21
|
+
const RECEIPT_HASH = /^(?:UNKNOWN|sha256:[a-f\d]{64})$/;
|
|
22
|
+
function validateMeasurementReceipt(value, path) {
|
|
23
|
+
if (!isRecord(value))
|
|
24
|
+
return [`${path} must be an object`];
|
|
25
|
+
const errors = [];
|
|
26
|
+
for (const key of Object.keys(value)) {
|
|
27
|
+
if (!RECEIPT_KEYS.has(key))
|
|
28
|
+
errors.push(`${path}.${key} is not allowed`);
|
|
29
|
+
}
|
|
30
|
+
if (value.contract !== 'judge-measurement@1')
|
|
31
|
+
errors.push(`${path}.contract must be "judge-measurement@1"`);
|
|
32
|
+
for (const key of ['provider', 'requestedModel', 'resolvedModel', 'fingerprint', 'windowId', 'requestId']) {
|
|
33
|
+
if (!isSanitizedReceiptIdentifier(value[key], key)) {
|
|
34
|
+
errors.push(`${path}.${key} must be a sanitized identifier`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
for (const key of ['requestHash', 'promptHash', 'configHash', 'parserSchemaHash', 'outputHash', 'parsedVoteHash']) {
|
|
38
|
+
if (typeof value[key] !== 'string' || !RECEIPT_HASH.test(value[key])) {
|
|
39
|
+
errors.push(`${path}.${key} must be UNKNOWN or a SHA-256 digest`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (!['shared', 'dedicated', 'local', 'UNKNOWN'].includes(value.endpointClass)) {
|
|
43
|
+
errors.push(`${path}.endpointClass is invalid`);
|
|
44
|
+
}
|
|
45
|
+
if (!['L0_UNKNOWN', 'L1_NAMED', 'L2_CONTENT_BOUND'].includes(value.snapshotIdentity)) {
|
|
46
|
+
errors.push(`${path}.snapshotIdentity is invalid`);
|
|
47
|
+
}
|
|
48
|
+
if (!['verified', 'provider-asserted', 'UNKNOWN'].includes(value.semantics)) {
|
|
49
|
+
errors.push(`${path}.semantics is invalid`);
|
|
50
|
+
}
|
|
51
|
+
if (!['hit', 'miss', 'bypass', 'UNKNOWN'].includes(value.cacheStatus)) {
|
|
52
|
+
errors.push(`${path}.cacheStatus is invalid`);
|
|
53
|
+
}
|
|
54
|
+
if (value.temperature !== null && (typeof value.temperature !== 'number'
|
|
55
|
+
|| !Number.isFinite(value.temperature) || value.temperature < 0)) {
|
|
56
|
+
errors.push(`${path}.temperature must be a non-negative finite number or null`);
|
|
57
|
+
}
|
|
58
|
+
if (value.topP !== null && (typeof value.topP !== 'number'
|
|
59
|
+
|| !Number.isFinite(value.topP) || value.topP < 0 || value.topP > 1)) {
|
|
60
|
+
errors.push(`${path}.topP must be a finite number in [0,1] or null`);
|
|
61
|
+
}
|
|
62
|
+
if (value.seed !== null && (typeof value.seed !== 'number' || !Number.isSafeInteger(value.seed))) {
|
|
63
|
+
errors.push(`${path}.seed must be a safe integer or null`);
|
|
64
|
+
}
|
|
65
|
+
if (value.deterministic !== null && typeof value.deterministic !== 'boolean') {
|
|
66
|
+
errors.push(`${path}.deterministic must be a boolean or null`);
|
|
67
|
+
}
|
|
68
|
+
if (!Number.isSafeInteger(value.retryCount) || value.retryCount < 0) {
|
|
69
|
+
errors.push(`${path}.retryCount must be a non-negative safe integer`);
|
|
70
|
+
}
|
|
71
|
+
if (!isSanitizedReceiptTimestamp(value.timestamp)) {
|
|
72
|
+
errors.push(`${path}.timestamp must be UNKNOWN or an ISO-8601 UTC timestamp`);
|
|
73
|
+
}
|
|
74
|
+
if (value.latencyMs !== null && (typeof value.latencyMs !== 'number'
|
|
75
|
+
|| !Number.isFinite(value.latencyMs) || value.latencyMs < 0)) {
|
|
76
|
+
errors.push(`${path}.latencyMs must be a non-negative finite number or null`);
|
|
77
|
+
}
|
|
78
|
+
const contentBound = value.fingerprint !== 'UNKNOWN'
|
|
79
|
+
&& ['requestHash', 'promptHash', 'configHash', 'parserSchemaHash', 'outputHash', 'parsedVoteHash']
|
|
80
|
+
.every((field) => value[field] !== 'UNKNOWN');
|
|
81
|
+
if (value.snapshotIdentity === 'L2_CONTENT_BOUND' && !contentBound) {
|
|
82
|
+
errors.push(`${path}.snapshotIdentity L2_CONTENT_BOUND requires non-UNKNOWN fingerprint and hashes`);
|
|
83
|
+
}
|
|
84
|
+
if (value.snapshotIdentity === 'L1_NAMED' && value.resolvedModel === 'UNKNOWN') {
|
|
85
|
+
errors.push(`${path}.snapshotIdentity L1_NAMED requires a resolved model`);
|
|
86
|
+
}
|
|
87
|
+
if (value.semantics === 'verified'
|
|
88
|
+
&& (value.snapshotIdentity !== 'L2_CONTENT_BOUND' || !contentBound)) {
|
|
89
|
+
errors.push(`${path}.semantics verified requires L2 content-bound identity`);
|
|
90
|
+
}
|
|
91
|
+
if (value.semantics !== 'UNKNOWN'
|
|
92
|
+
&& (value.snapshotIdentity === 'L0_UNKNOWN' || value.fingerprint === 'UNKNOWN')) {
|
|
93
|
+
errors.push(`${path}.semantics requires identified snapshot and fingerprint`);
|
|
94
|
+
}
|
|
95
|
+
return errors;
|
|
96
|
+
}
|
|
28
97
|
export function validateRiskDecision(value) {
|
|
29
98
|
const errors = [];
|
|
30
99
|
if (!isRecord(value))
|
|
@@ -67,6 +136,16 @@ export function validateFindingVerdict(value) {
|
|
|
67
136
|
}
|
|
68
137
|
if (!isStringArray(value.refutations))
|
|
69
138
|
errors.push('refutations must be string[]');
|
|
139
|
+
if (value.measurementReceipts !== undefined) {
|
|
140
|
+
if (!Array.isArray(value.measurementReceipts)) {
|
|
141
|
+
errors.push('measurementReceipts must be an array when present');
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
value.measurementReceipts.forEach((receipt, index) => {
|
|
145
|
+
errors.push(...validateMeasurementReceipt(receipt, `measurementReceipts[${index}]`));
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
70
149
|
return { valid: errors.length === 0, errors };
|
|
71
150
|
}
|
|
72
151
|
export function validateCoverageGap(value) {
|
|
@@ -120,6 +199,22 @@ export function buildRiskDecisionFromQualityGate(input) {
|
|
|
120
199
|
// ============================================================================
|
|
121
200
|
const unit = { type: 'number', minimum: 0, maximum: 1 };
|
|
122
201
|
const stringArray = { type: 'array', items: { type: 'string' } };
|
|
202
|
+
function receiptIdentifier(field) {
|
|
203
|
+
const opaquePattern = field === 'provider' || field === 'requestedModel' || field === 'resolvedModel'
|
|
204
|
+
? RECEIPT_OPAQUE_DESCRIPTOR_PATTERN
|
|
205
|
+
: RECEIPT_OPAQUE_CORRELATION_PATTERN;
|
|
206
|
+
return {
|
|
207
|
+
type: 'string',
|
|
208
|
+
pattern: RECEIPT_IDENTIFIER_PATTERN,
|
|
209
|
+
allOf: [
|
|
210
|
+
{ not: { pattern: RECEIPT_SENSITIVE_IDENTIFIER_PATTERN } },
|
|
211
|
+
{ not: { pattern: RECEIPT_JWT_PATTERN } },
|
|
212
|
+
{ not: { pattern: opaquePattern } },
|
|
213
|
+
],
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
const receiptHash = { type: 'string', pattern: '^(?:UNKNOWN|sha256:[a-f0-9]{64})$' };
|
|
217
|
+
const knownReceiptHash = { type: 'string', pattern: '^sha256:[a-f0-9]{64}$' };
|
|
123
218
|
export const RISK_DECISION_SCHEMA = {
|
|
124
219
|
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
125
220
|
$id: 'https://agentic-qe.dev/schemas/risk-decision.schema.json',
|
|
@@ -152,6 +247,99 @@ export const FINDING_VERDICT_SCHEMA = {
|
|
|
152
247
|
evidence: stringArray,
|
|
153
248
|
verdict: { enum: ['upheld', 'refuted', 'uncertain'] },
|
|
154
249
|
refutations: stringArray,
|
|
250
|
+
measurementReceipts: {
|
|
251
|
+
type: 'array',
|
|
252
|
+
items: {
|
|
253
|
+
type: 'object',
|
|
254
|
+
required: [
|
|
255
|
+
'contract', 'provider', 'requestedModel', 'resolvedModel', 'endpointClass',
|
|
256
|
+
'snapshotIdentity', 'semantics', 'fingerprint', 'requestHash', 'promptHash',
|
|
257
|
+
'configHash', 'parserSchemaHash', 'outputHash', 'parsedVoteHash', 'temperature',
|
|
258
|
+
'topP', 'seed', 'deterministic', 'cacheStatus', 'retryCount', 'timestamp',
|
|
259
|
+
'windowId', 'latencyMs', 'requestId',
|
|
260
|
+
],
|
|
261
|
+
additionalProperties: false,
|
|
262
|
+
properties: {
|
|
263
|
+
contract: { const: 'judge-measurement@1' },
|
|
264
|
+
provider: receiptIdentifier('provider'),
|
|
265
|
+
requestedModel: receiptIdentifier('requestedModel'),
|
|
266
|
+
resolvedModel: receiptIdentifier('resolvedModel'),
|
|
267
|
+
endpointClass: { enum: ['shared', 'dedicated', 'local', 'UNKNOWN'] },
|
|
268
|
+
snapshotIdentity: { enum: ['L0_UNKNOWN', 'L1_NAMED', 'L2_CONTENT_BOUND'] },
|
|
269
|
+
semantics: { enum: ['verified', 'provider-asserted', 'UNKNOWN'] },
|
|
270
|
+
fingerprint: receiptIdentifier('fingerprint'),
|
|
271
|
+
requestHash: receiptHash,
|
|
272
|
+
promptHash: receiptHash,
|
|
273
|
+
configHash: receiptHash,
|
|
274
|
+
parserSchemaHash: receiptHash,
|
|
275
|
+
outputHash: receiptHash,
|
|
276
|
+
parsedVoteHash: receiptHash,
|
|
277
|
+
temperature: { type: ['number', 'null'], minimum: 0 },
|
|
278
|
+
topP: { type: ['number', 'null'], minimum: 0, maximum: 1 },
|
|
279
|
+
seed: {
|
|
280
|
+
type: ['integer', 'null'],
|
|
281
|
+
minimum: Number.MIN_SAFE_INTEGER,
|
|
282
|
+
maximum: Number.MAX_SAFE_INTEGER,
|
|
283
|
+
},
|
|
284
|
+
deterministic: { type: ['boolean', 'null'] },
|
|
285
|
+
cacheStatus: { enum: ['hit', 'miss', 'bypass', 'UNKNOWN'] },
|
|
286
|
+
retryCount: { type: 'integer', minimum: 0, maximum: Number.MAX_SAFE_INTEGER },
|
|
287
|
+
timestamp: {
|
|
288
|
+
anyOf: [
|
|
289
|
+
{ const: 'UNKNOWN' },
|
|
290
|
+
{ type: 'string', pattern: RECEIPT_KNOWN_TIMESTAMP_PATTERN, format: 'date-time' },
|
|
291
|
+
],
|
|
292
|
+
},
|
|
293
|
+
windowId: receiptIdentifier('windowId'),
|
|
294
|
+
latencyMs: { type: ['number', 'null'], minimum: 0 },
|
|
295
|
+
requestId: receiptIdentifier('requestId'),
|
|
296
|
+
},
|
|
297
|
+
allOf: [
|
|
298
|
+
{
|
|
299
|
+
if: { properties: { snapshotIdentity: { const: 'L2_CONTENT_BOUND' } } },
|
|
300
|
+
then: {
|
|
301
|
+
properties: {
|
|
302
|
+
fingerprint: { not: { const: 'UNKNOWN' } },
|
|
303
|
+
requestHash: knownReceiptHash,
|
|
304
|
+
promptHash: knownReceiptHash,
|
|
305
|
+
configHash: knownReceiptHash,
|
|
306
|
+
parserSchemaHash: knownReceiptHash,
|
|
307
|
+
outputHash: knownReceiptHash,
|
|
308
|
+
parsedVoteHash: knownReceiptHash,
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
if: { properties: { snapshotIdentity: { const: 'L1_NAMED' } } },
|
|
314
|
+
then: { properties: { resolvedModel: { not: { const: 'UNKNOWN' } } } },
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
if: { properties: { semantics: { const: 'verified' } } },
|
|
318
|
+
then: {
|
|
319
|
+
properties: {
|
|
320
|
+
snapshotIdentity: { const: 'L2_CONTENT_BOUND' },
|
|
321
|
+
fingerprint: { not: { const: 'UNKNOWN' } },
|
|
322
|
+
requestHash: knownReceiptHash,
|
|
323
|
+
promptHash: knownReceiptHash,
|
|
324
|
+
configHash: knownReceiptHash,
|
|
325
|
+
parserSchemaHash: knownReceiptHash,
|
|
326
|
+
outputHash: knownReceiptHash,
|
|
327
|
+
parsedVoteHash: knownReceiptHash,
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
if: { properties: { semantics: { enum: ['verified', 'provider-asserted'] } } },
|
|
333
|
+
then: {
|
|
334
|
+
properties: {
|
|
335
|
+
snapshotIdentity: { not: { const: 'L0_UNKNOWN' } },
|
|
336
|
+
fingerprint: { not: { const: 'UNKNOWN' } },
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
],
|
|
341
|
+
},
|
|
342
|
+
},
|
|
155
343
|
},
|
|
156
344
|
};
|
|
157
345
|
export const COVERAGE_GAP_SCHEMA = {
|
|
@@ -120,10 +120,17 @@ async function collectCoverage(targetPath) {
|
|
|
120
120
|
return { collected: fromReport, ranTests: false };
|
|
121
121
|
}
|
|
122
122
|
// #569 work item 1: delegate to real instrumentation where available.
|
|
123
|
-
|
|
123
|
+
const rustProject = isRustProject(targetPath);
|
|
124
|
+
if (rustProject) {
|
|
124
125
|
const rust = await collectRustCoverage(targetPath);
|
|
125
126
|
if (rust)
|
|
126
127
|
return { collected: rust, ranTests: true };
|
|
128
|
+
// This target is a Rust crate. Do not continue into the JS/TS runner:
|
|
129
|
+
// `npx vitest --coverage` can still be available through the parent
|
|
130
|
+
// process PATH and will write an empty report even though the crate has no
|
|
131
|
+
// JavaScript tests. Treating that artifact as coverage hides the intended
|
|
132
|
+
// Rust static-estimation fallback and mislabels the result.
|
|
133
|
+
return { collected: buildEstimatedCoverage(targetPath), ranTests: false };
|
|
127
134
|
}
|
|
128
135
|
const ranTests = await tryRunJsCoverage(targetPath);
|
|
129
136
|
const afterRun = await loadCoverageData(targetPath);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type AgentFaultCorpus, type AgentFaultCorpusCase } from './types.js';
|
|
2
|
+
/** Frozen, synthetic corpus. Ground truth is never embedded in detectorInput. */
|
|
3
|
+
export declare function createAgentFaultDiagnosisCorpus(): AgentFaultCorpus;
|
|
4
|
+
export declare function serializeDetectorInput(input: AgentFaultCorpusCase['detectorInput']): string;
|
|
5
|
+
//# sourceMappingURL=corpus.d.ts.map
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { AGENT_FAULT_CORPUS_SCHEMA_VERSION, AGENT_FAULT_TRACE_SCHEMA_VERSION, } from './types.js';
|
|
3
|
+
const SOURCE_REVISION = 'fixture-source-v1';
|
|
4
|
+
const HARNESS_REVISION = 'agent-runtime-diagnosis-v1';
|
|
5
|
+
const ENVIRONMENT_DIGEST = sha256('synthetic-node-runtime-v1');
|
|
6
|
+
function sha256(value) {
|
|
7
|
+
return createHash('sha256').update(value).digest('hex');
|
|
8
|
+
}
|
|
9
|
+
function stable(value) {
|
|
10
|
+
if (Array.isArray(value))
|
|
11
|
+
return `[${value.map(stable).join(',')}]`;
|
|
12
|
+
if (value && typeof value === 'object') {
|
|
13
|
+
return `{${Object.entries(value)
|
|
14
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
15
|
+
.map(([key, item]) => `${JSON.stringify(key)}:${stable(item)}`).join(',')}}`;
|
|
16
|
+
}
|
|
17
|
+
return JSON.stringify(value);
|
|
18
|
+
}
|
|
19
|
+
function span(spanId, componentId, kind, parentSpanId) {
|
|
20
|
+
const input = `input:${componentId}`;
|
|
21
|
+
const output = `output:${componentId}`;
|
|
22
|
+
return {
|
|
23
|
+
spanId,
|
|
24
|
+
...(parentSpanId ? { parentSpanId } : {}),
|
|
25
|
+
componentId,
|
|
26
|
+
kind,
|
|
27
|
+
startOffsetMs: kind === 'run' ? 0 : 10,
|
|
28
|
+
durationMs: kind === 'run' ? 100 : 20,
|
|
29
|
+
status: 'ok',
|
|
30
|
+
inputBytes: Buffer.byteLength(input),
|
|
31
|
+
outputBytes: Buffer.byteLength(output),
|
|
32
|
+
inputHash: sha256(input),
|
|
33
|
+
outputHash: sha256(output),
|
|
34
|
+
recovered: false,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function baseSpans() {
|
|
38
|
+
return [
|
|
39
|
+
span('run', 'workflow', 'run'),
|
|
40
|
+
span('agent-primary', 'planner', 'agent', 'run'),
|
|
41
|
+
{ ...span('tool-weather', 'weather-tool', 'tool', 'agent-primary'), intendedDestination: 'weather-tool', actualDestination: 'weather-tool' },
|
|
42
|
+
span('model-answer', 'reasoning-model', 'model', 'agent-primary'),
|
|
43
|
+
{ ...span('policy-check', 'safety-policy', 'guardrail', 'agent-primary'), policyRef: 'policy://safety/v1', expectedDecision: 'deny', actualDecision: 'deny' },
|
|
44
|
+
{ ...span('delegate-review', 'reviewer-agent', 'delegation', 'agent-primary'), intendedDestination: 'reviewer-agent', actualDestination: 'reviewer-agent' },
|
|
45
|
+
];
|
|
46
|
+
}
|
|
47
|
+
const FIXTURES = [
|
|
48
|
+
{ faultType: 'tool-unavailable', boundary: 'tool', componentId: 'weather-tool', spanId: 'tool-weather', signal: 'tool unavailable', mutate: (s) => ({ ...s, status: 'error', signalCode: 'TOOL_UNAVAILABLE', outputBytes: 0, outputHash: sha256('') }) },
|
|
49
|
+
{ faultType: 'tool-timeout', boundary: 'tool', componentId: 'weather-tool', spanId: 'tool-weather', signal: 'tool deadline exceeded', mutate: (s) => ({ ...s, status: 'timeout', signalCode: 'DEADLINE_EXCEEDED', durationMs: 5_000 }) },
|
|
50
|
+
{ faultType: 'corrupted-tool-output', boundary: 'tool', componentId: 'weather-tool', spanId: 'tool-weather', signal: 'output differs from aligned clean reference', mutate: (s) => ({ ...s, outputHash: sha256('plausible-but-wrong'), outputBytes: 19 }) },
|
|
51
|
+
{ faultType: 'context-truncation', boundary: 'model-context', componentId: 'reasoning-model', spanId: 'model-answer', signal: 'context truncated', mutate: (s) => ({ ...s, status: 'error', signalCode: 'CONTEXT_TRUNCATED', inputBytes: 131_072 }) },
|
|
52
|
+
{ faultType: 'delegation-timeout', boundary: 'inter-agent', componentId: 'reviewer-agent', spanId: 'delegate-review', signal: 'delegation deadline exceeded', mutate: (s) => ({ ...s, status: 'timeout', signalCode: 'DELEGATION_TIMEOUT', durationMs: 5_000 }) },
|
|
53
|
+
{ faultType: 'agent-misroute', boundary: 'inter-agent', componentId: 'reviewer-agent', spanId: 'delegate-review', signal: 'actual agent differs from intended agent', mutate: (s) => ({ ...s, actualDestination: 'billing-agent' }) },
|
|
54
|
+
{ faultType: 'delegation-loop', boundary: 'inter-agent', componentId: 'reviewer-agent', spanId: 'delegate-review', signal: 'delegation edge repeats', mutate: (s) => ({ ...s, retry: 4, signalCode: 'DELEGATION_REPEATED' }) },
|
|
55
|
+
{ faultType: 'guardrail-bypass', boundary: 'guardrail', componentId: 'safety-policy', spanId: 'policy-check', signal: 'policy oracle denies but runtime allows', mutate: (s) => ({ ...s, actualDecision: 'allow' }) },
|
|
56
|
+
];
|
|
57
|
+
function trace(runId, taskId, spans) {
|
|
58
|
+
return {
|
|
59
|
+
schemaVersion: AGENT_FAULT_TRACE_SCHEMA_VERSION,
|
|
60
|
+
runId,
|
|
61
|
+
taskId,
|
|
62
|
+
harnessRevision: HARNESS_REVISION,
|
|
63
|
+
terminalOutcome: 'completed',
|
|
64
|
+
spans,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function structured(raw) {
|
|
68
|
+
return {
|
|
69
|
+
schemaVersion: raw.schemaVersion,
|
|
70
|
+
runId: raw.runId,
|
|
71
|
+
taskId: raw.taskId,
|
|
72
|
+
terminalOutcome: raw.terminalOutcome,
|
|
73
|
+
spans: [...raw.spans].sort((a, b) => a.startOffsetMs - b.startOffsetMs || a.spanId.localeCompare(b.spanId)),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function makeCase(caseId, runId, taskId, truth, spans, cleanReference, cleanReferenceId, expectedObservableSignal = 'no fault signal') {
|
|
77
|
+
const raw = trace(runId, taskId, spans);
|
|
78
|
+
return {
|
|
79
|
+
caseId,
|
|
80
|
+
...(cleanReferenceId ? { cleanReferenceId } : {}),
|
|
81
|
+
detectorInput: { trace: raw, structured: structured(raw), ...(cleanReference ? { cleanReference } : {}) },
|
|
82
|
+
heldOut: {
|
|
83
|
+
truth,
|
|
84
|
+
manifest: {
|
|
85
|
+
schemaVersion: AGENT_FAULT_CORPUS_SCHEMA_VERSION,
|
|
86
|
+
caseId,
|
|
87
|
+
runId,
|
|
88
|
+
taskId,
|
|
89
|
+
sourceRevision: SOURCE_REVISION,
|
|
90
|
+
environmentDigest: ENVIRONMENT_DIGEST,
|
|
91
|
+
seed: 649,
|
|
92
|
+
target: { boundary: truth.boundary, componentId: truth.componentId, spanId: truth.spanId },
|
|
93
|
+
parameters: { synthetic: true },
|
|
94
|
+
expectedObservableSignal,
|
|
95
|
+
cleanup: { required: false, state: 'not-required', witness: 'synthetic fixture; no side effects' },
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/** Frozen, synthetic corpus. Ground truth is never embedded in detectorInput. */
|
|
101
|
+
export function createAgentFaultDiagnosisCorpus() {
|
|
102
|
+
const cases = [];
|
|
103
|
+
FIXTURES.forEach((fixture, index) => {
|
|
104
|
+
const ordinal = String(index + 1).padStart(3, '0');
|
|
105
|
+
const taskId = `task-${ordinal}`;
|
|
106
|
+
const cleanCaseId = `case-${ordinal}-a`;
|
|
107
|
+
const cleanSpans = baseSpans();
|
|
108
|
+
const cleanRaw = trace(`run-${ordinal}-a`, taskId, cleanSpans);
|
|
109
|
+
const cleanView = structured(cleanRaw);
|
|
110
|
+
const cleanTruth = { faultType: 'none', boundary: 'control', componentId: 'workflow', spanId: 'run' };
|
|
111
|
+
cases.push(makeCase(cleanCaseId, `run-${ordinal}-a`, taskId, cleanTruth, cleanSpans));
|
|
112
|
+
const faultySpans = cleanSpans.map((item) => item.spanId === fixture.spanId ? fixture.mutate(item) : item);
|
|
113
|
+
const truth = {
|
|
114
|
+
faultType: fixture.faultType,
|
|
115
|
+
boundary: fixture.boundary,
|
|
116
|
+
componentId: fixture.componentId,
|
|
117
|
+
spanId: fixture.spanId,
|
|
118
|
+
};
|
|
119
|
+
cases.push(makeCase(`case-${ordinal}-b`, `run-${ordinal}-b`, taskId, truth, faultySpans, cleanView, cleanCaseId, fixture.signal));
|
|
120
|
+
});
|
|
121
|
+
const casesDigest = sha256(stable(cases.map(({ caseId, cleanReferenceId, detectorInput, heldOut }) => ({
|
|
122
|
+
caseId, cleanReferenceId, detectorInput, heldOut,
|
|
123
|
+
}))));
|
|
124
|
+
return {
|
|
125
|
+
manifest: {
|
|
126
|
+
schemaVersion: AGENT_FAULT_CORPUS_SCHEMA_VERSION,
|
|
127
|
+
corpusId: `aqe-agent-faults-${casesDigest.slice(0, 16)}`,
|
|
128
|
+
sourceRevision: SOURCE_REVISION,
|
|
129
|
+
harnessRevision: HARNESS_REVISION,
|
|
130
|
+
caseCount: cases.length,
|
|
131
|
+
casesDigest,
|
|
132
|
+
mixedFaults: 'out-of-scope',
|
|
133
|
+
detectorInputExcludes: ['injection manifest', 'ground-truth fault type', 'ground-truth location', 'fixture path'],
|
|
134
|
+
},
|
|
135
|
+
cases,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
export function serializeDetectorInput(input) {
|
|
139
|
+
return stable(input);
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=corpus.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AgentFaultDetector } from './types.js';
|
|
2
|
+
/** A transparent baseline limited to explicit runtime signals. */
|
|
3
|
+
export declare const directSignalBaseline: AgentFaultDetector;
|
|
4
|
+
/**
|
|
5
|
+
* AQE reference-aware diagnosis. It adds paired-output comparison and a policy
|
|
6
|
+
* oracle to the direct-signal baseline; neither source is a hidden fault label.
|
|
7
|
+
*/
|
|
8
|
+
export declare const referenceAwareAqeDetector: AgentFaultDetector;
|
|
9
|
+
/** Negative-control detector used to prove majority-class guessing cannot pass. */
|
|
10
|
+
export declare const majorityFaultDetector: AgentFaultDetector;
|
|
11
|
+
//# sourceMappingURL=detectors.d.ts.map
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
function directSignal(span) {
|
|
2
|
+
if (span.signalCode === 'TOOL_UNAVAILABLE')
|
|
3
|
+
return { faultType: 'tool-unavailable', boundary: 'tool', confidence: 1 };
|
|
4
|
+
if (span.kind === 'tool' && span.status === 'timeout')
|
|
5
|
+
return { faultType: 'tool-timeout', boundary: 'tool', confidence: 1 };
|
|
6
|
+
if (span.signalCode === 'CONTEXT_TRUNCATED')
|
|
7
|
+
return { faultType: 'context-truncation', boundary: 'model-context', confidence: 1 };
|
|
8
|
+
if (span.kind === 'delegation' && span.status === 'timeout')
|
|
9
|
+
return { faultType: 'delegation-timeout', boundary: 'inter-agent', confidence: 1 };
|
|
10
|
+
if (span.kind === 'delegation' && span.intendedDestination !== span.actualDestination) {
|
|
11
|
+
return { faultType: 'agent-misroute', boundary: 'inter-agent', confidence: 1 };
|
|
12
|
+
}
|
|
13
|
+
if (span.kind === 'delegation' && (span.retry ?? 0) >= 3) {
|
|
14
|
+
return { faultType: 'delegation-loop', boundary: 'inter-agent', confidence: 0.95 };
|
|
15
|
+
}
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
function candidate(span, match) {
|
|
19
|
+
return {
|
|
20
|
+
...match,
|
|
21
|
+
componentId: span.componentId,
|
|
22
|
+
spanId: span.spanId,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/** A transparent baseline limited to explicit runtime signals. */
|
|
26
|
+
export const directSignalBaseline = {
|
|
27
|
+
id: 'direct-signal-v1',
|
|
28
|
+
diagnose(caseId, input) {
|
|
29
|
+
const candidates = input.structured.spans.flatMap((span) => {
|
|
30
|
+
const match = directSignal(span);
|
|
31
|
+
return match ? [candidate(span, match)] : [];
|
|
32
|
+
});
|
|
33
|
+
if (candidates.length > 0)
|
|
34
|
+
return diagnosed(caseId, candidates);
|
|
35
|
+
if (input.cleanReference && input.structured.spans.some((span) => {
|
|
36
|
+
const clean = input.cleanReference?.spans.find((item) => item.spanId === span.spanId);
|
|
37
|
+
return clean?.outputHash !== span.outputHash;
|
|
38
|
+
}))
|
|
39
|
+
return abstained(caseId, 'Output differs from reference but has no direct failure signal');
|
|
40
|
+
if (input.structured.spans.every(isHealthy))
|
|
41
|
+
return healthy(caseId);
|
|
42
|
+
return abstained(caseId, 'No qualified direct signal');
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* AQE reference-aware diagnosis. It adds paired-output comparison and a policy
|
|
47
|
+
* oracle to the direct-signal baseline; neither source is a hidden fault label.
|
|
48
|
+
*/
|
|
49
|
+
export const referenceAwareAqeDetector = {
|
|
50
|
+
id: 'aqe-reference-aware-v1',
|
|
51
|
+
diagnose(caseId, input) {
|
|
52
|
+
const direct = directSignalBaseline.diagnose(caseId, input);
|
|
53
|
+
if (direct.status === 'diagnosed')
|
|
54
|
+
return direct;
|
|
55
|
+
for (const span of input.structured.spans) {
|
|
56
|
+
if (span.kind === 'guardrail' && span.policyRef && span.expectedDecision && span.actualDecision
|
|
57
|
+
&& span.expectedDecision !== span.actualDecision) {
|
|
58
|
+
return diagnosed(caseId, [candidate(span, {
|
|
59
|
+
faultType: 'guardrail-bypass', boundary: 'guardrail', confidence: 1,
|
|
60
|
+
})]);
|
|
61
|
+
}
|
|
62
|
+
if (span.kind === 'tool' && input.cleanReference) {
|
|
63
|
+
const clean = input.cleanReference.spans.find((item) => item.spanId === span.spanId);
|
|
64
|
+
if (clean && clean.outputHash !== span.outputHash) {
|
|
65
|
+
return diagnosed(caseId, [candidate(span, {
|
|
66
|
+
faultType: 'corrupted-tool-output', boundary: 'tool', confidence: 0.9,
|
|
67
|
+
})]);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return direct;
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
/** Negative-control detector used to prove majority-class guessing cannot pass. */
|
|
75
|
+
export const majorityFaultDetector = {
|
|
76
|
+
id: 'always-tool-unavailable',
|
|
77
|
+
diagnose(caseId, input) {
|
|
78
|
+
const span = input.structured.spans.find((item) => item.kind === 'tool') ?? input.structured.spans[0];
|
|
79
|
+
if (!span)
|
|
80
|
+
return { ...abstained(caseId, 'Empty trace'), status: 'parse-error' };
|
|
81
|
+
return diagnosed(caseId, [candidate(span, {
|
|
82
|
+
faultType: 'tool-unavailable', boundary: 'tool', confidence: 1,
|
|
83
|
+
})]);
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
function isHealthy(span) {
|
|
87
|
+
return span.status === 'ok'
|
|
88
|
+
&& span.intendedDestination === span.actualDestination
|
|
89
|
+
&& (!(span.expectedDecision && span.actualDecision) || span.expectedDecision === span.actualDecision)
|
|
90
|
+
&& (span.retry ?? 0) < 3;
|
|
91
|
+
}
|
|
92
|
+
function diagnosed(caseId, candidates) {
|
|
93
|
+
return { caseId, status: 'diagnosed', candidates, signalObserved: true, latencyMs: 0 };
|
|
94
|
+
}
|
|
95
|
+
function healthy(caseId) {
|
|
96
|
+
return {
|
|
97
|
+
caseId,
|
|
98
|
+
status: 'diagnosed',
|
|
99
|
+
candidates: [{
|
|
100
|
+
faultType: 'none', boundary: 'control', componentId: 'workflow', spanId: 'run', confidence: 1,
|
|
101
|
+
}],
|
|
102
|
+
signalObserved: false,
|
|
103
|
+
latencyMs: 0,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function abstained(caseId, reason) {
|
|
107
|
+
return { caseId, status: 'abstained', candidates: [], signalObserved: false, latencyMs: 0, reason };
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=detectors.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AgentFaultCorpus, AgentFaultDetector, AgentFaultScoreReport } from './types.js';
|
|
2
|
+
export declare function scoreAgentFaultDetector(corpus: AgentFaultCorpus, detector: AgentFaultDetector, topK?: number): AgentFaultScoreReport;
|
|
3
|
+
export interface AgentFaultQualification {
|
|
4
|
+
readonly passed: boolean;
|
|
5
|
+
readonly failures: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function qualifyAgentFaultDetector(report: AgentFaultScoreReport): AgentFaultQualification;
|
|
8
|
+
//# sourceMappingURL=scorer.d.ts.map
|