agentic-qe 3.10.3 → 3.10.5
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/skills/qcsd-development-swarm/SKILL.md +27 -6
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +104 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/arena/arena.d.ts +68 -0
- package/dist/arena/arena.js +169 -0
- package/dist/arena/mutator.d.ts +23 -0
- package/dist/arena/mutator.js +112 -0
- package/dist/arena/rng.d.ts +15 -0
- package/dist/arena/rng.js +34 -0
- package/dist/arena/runner.d.ts +44 -0
- package/dist/arena/runner.js +79 -0
- package/dist/cli/bundle.js +7 -7
- package/dist/cli/chunks/adapter-XZVL3DHO.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-NGC6LSQP.js → agent-booster-wasm-3BC5LIEB.js} +2 -2
- package/dist/cli/chunks/{agent-handler-P2IJE4GK.js → agent-handler-QLXWVZZF.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-JXRJ5GKQ.js → agent-memory-branch-3U5PDYW7.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-YIL25K6W.js +2 -0
- package/dist/cli/chunks/arena-BMJQK4RD.js +18 -0
- package/dist/cli/chunks/arena-XENAGV4I.js +4 -0
- package/dist/cli/chunks/audit-WPIRUJNZ.js +3 -0
- package/dist/cli/chunks/base-YCYV23Q3.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-64EGGWIC.js → better-sqlite3-6AGIBSVE.js} +2 -2
- package/dist/cli/chunks/{brain-handler-SACNDFSW.js → brain-handler-PHSWG5PR.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-LFOTVUDA.js → branch-enumerator-LNSYT34I.js} +2 -2
- package/dist/cli/chunks/{browser-FK7PRF3W.js → browser-M5BVQMBI.js} +2 -2
- package/dist/cli/chunks/browser-workflow-ALCOCRA2.js +2 -0
- package/dist/cli/chunks/{chunk-ZXQNE4QV.js → chunk-24A7KD3D.js} +1 -1
- package/dist/cli/chunks/{chunk-6Q2PPOOF.js → chunk-253TDTPH.js} +1 -1
- package/dist/cli/chunks/{chunk-MC7K44M4.js → chunk-2RLRPKCG.js} +2 -2
- package/dist/cli/chunks/{chunk-VRXY4T22.js → chunk-2UQWVF4P.js} +2 -2
- package/dist/cli/chunks/{chunk-UDV4YB42.js → chunk-2Z7HIT5I.js} +1 -1
- package/dist/cli/chunks/{chunk-CTDO2UB2.js → chunk-3BGGNHHZ.js} +1 -1
- package/dist/cli/chunks/{chunk-HWM2XJ3P.js → chunk-3JWV4GE6.js} +2 -2
- package/dist/cli/chunks/{chunk-BT3QLWII.js → chunk-3KGUP2SD.js} +2 -2
- package/dist/cli/chunks/{chunk-T63EK6GH.js → chunk-3WOQY6UL.js} +2 -2
- package/dist/cli/chunks/{chunk-QM65UGPV.js → chunk-4FTO3TPH.js} +2 -2
- package/dist/cli/chunks/{chunk-WWD5IWTV.js → chunk-4K7T6AKM.js} +1 -1
- package/dist/cli/chunks/{chunk-XTP2GHI7.js → chunk-4Z7XH4JE.js} +2 -2
- package/dist/cli/chunks/{chunk-FND6V2RV.js → chunk-54IPDQIZ.js} +8 -8
- package/dist/cli/chunks/{chunk-KTRB3L53.js → chunk-56RA6YPN.js} +2 -2
- package/dist/cli/chunks/{chunk-7YYTTWGY.js → chunk-5D7GLMT3.js} +1 -1
- package/dist/cli/chunks/{chunk-M5CDW2ZH.js → chunk-66LOFIBP.js} +2 -2
- package/dist/cli/chunks/{chunk-3X2ZQ55B.js → chunk-6SAU7GXO.js} +3 -3
- package/dist/cli/chunks/{chunk-DF3MJ2YL.js → chunk-75MP7JMV.js} +1 -1
- package/dist/cli/chunks/{chunk-RTDHWOAG.js → chunk-7DU35D4M.js} +1 -1
- package/dist/cli/chunks/{chunk-Q7EBD24B.js → chunk-7JZCEQFR.js} +1 -1
- package/dist/cli/chunks/{chunk-JXIPRMAY.js → chunk-A3BDPU5F.js} +4 -4
- package/dist/cli/chunks/{chunk-I42R57ON.js → chunk-A7HGS7FW.js} +2 -2
- package/dist/cli/chunks/{chunk-NNZMEYLT.js → chunk-AMBIOEMO.js} +1 -1
- package/dist/cli/chunks/{chunk-BO2OV2RH.js → chunk-AVQD7KEN.js} +2 -2
- package/dist/cli/chunks/{chunk-6GCOIIHY.js → chunk-AZCKTAUI.js} +2 -2
- package/dist/cli/chunks/{chunk-GL3HZN3O.js → chunk-B4F5EPNR.js} +1 -1
- package/dist/cli/chunks/{chunk-HAO3SPOE.js → chunk-BB7MEGXD.js} +2 -2
- package/dist/cli/chunks/{chunk-VDTFRMES.js → chunk-BSRCL6RU.js} +2 -2
- package/dist/cli/chunks/{chunk-RZCAA2PZ.js → chunk-CS3UB2OL.js} +1 -1
- package/dist/cli/chunks/{chunk-4OUAHZX2.js → chunk-CTG3GJIM.js} +2 -2
- package/dist/cli/chunks/{chunk-BWP3UVPE.js → chunk-CUAM34RQ.js} +3 -3
- package/dist/cli/chunks/chunk-CUY2EUSQ.js +2 -0
- package/dist/cli/chunks/{chunk-X2B7SANM.js → chunk-D3Q4443B.js} +1 -1
- package/dist/cli/chunks/{chunk-5IBJURYB.js → chunk-D4WDJ4ZF.js} +2 -2
- package/dist/cli/chunks/chunk-D7NKRCIL.js +2 -0
- package/dist/cli/chunks/{chunk-JP63XACW.js → chunk-DBR4TQPK.js} +2 -2
- package/dist/cli/chunks/{chunk-FLTPHVZ3.js → chunk-DIJ74M7V.js} +1 -1
- package/dist/cli/chunks/{chunk-PFCAMX6H.js → chunk-DJQYZ4RZ.js} +1 -1
- package/dist/cli/chunks/{chunk-5LON3MLI.js → chunk-DN65ILSI.js} +2 -2
- package/dist/cli/chunks/{chunk-6ZK24V2Y.js → chunk-DWLGFYXV.js} +2 -2
- package/dist/cli/chunks/{chunk-5EWWA4QP.js → chunk-EIL7FQC4.js} +6 -6
- package/dist/cli/chunks/{chunk-IRR7YA3Q.js → chunk-FE3FGMNB.js} +2 -2
- package/dist/cli/chunks/{chunk-ADV4DH3W.js → chunk-FLYFNNSN.js} +3 -3
- package/dist/cli/chunks/{chunk-SWOG3PBD.js → chunk-FNJZBIR3.js} +2 -2
- package/dist/cli/chunks/chunk-FPWA73N6.js +2 -0
- package/dist/cli/chunks/{chunk-NEYYLAYS.js → chunk-FW3C4LWU.js} +2 -2
- package/dist/cli/chunks/{chunk-5G5AAEFF.js → chunk-G4GX6YKX.js} +2 -2
- package/dist/cli/chunks/{chunk-NNVXHC74.js → chunk-G5UIGH4C.js} +3 -3
- package/dist/cli/chunks/{chunk-QEODION5.js → chunk-G6FP3S3G.js} +2 -2
- package/dist/cli/chunks/{chunk-ZG4P3DTL.js → chunk-GDUGW6FZ.js} +2 -2
- package/dist/cli/chunks/{chunk-GJUGSH7T.js → chunk-GKG6IQP6.js} +3 -3
- package/dist/cli/chunks/chunk-GMU7P5O3.js +2 -0
- package/dist/cli/chunks/{chunk-NRCL3WCP.js → chunk-GTVXVYKE.js} +2 -2
- package/dist/cli/chunks/{chunk-2ULVCLOW.js → chunk-HHEHGERJ.js} +2 -2
- package/dist/cli/chunks/{chunk-6FL3GN4T.js → chunk-HKJ3LG3N.js} +2 -2
- package/dist/cli/chunks/{chunk-E2BJT6A7.js → chunk-HNYSBE5J.js} +2 -2
- package/dist/cli/chunks/{chunk-JTZ3Q2QS.js → chunk-HPKYIK7R.js} +2 -2
- package/dist/cli/chunks/{chunk-GHNNJHH3.js → chunk-HRORJ352.js} +2 -2
- package/dist/cli/chunks/{chunk-5ER3COX3.js → chunk-IIFCTJOF.js} +2 -2
- package/dist/cli/chunks/{chunk-UIJFU4KD.js → chunk-IOE6LDPF.js} +2 -2
- package/dist/cli/chunks/{chunk-JD2PG4KS.js → chunk-IRS4HKAR.js} +1 -1
- package/dist/cli/chunks/{chunk-VIWIO27R.js → chunk-IT7CEHAJ.js} +2 -2
- package/dist/cli/chunks/{chunk-JE3C7JYN.js → chunk-IUKERFLT.js} +1 -1
- package/dist/cli/chunks/{chunk-YDKYLNKZ.js → chunk-IVKSZNMI.js} +1 -1
- package/dist/cli/chunks/{chunk-3RZL4QTT.js → chunk-IWRORKD7.js} +2 -2
- package/dist/cli/chunks/{chunk-NZHOKLII.js → chunk-J533CJUN.js} +3 -3
- package/dist/cli/chunks/{chunk-5SGEOO2F.js → chunk-JPOEI7CJ.js} +2 -2
- package/dist/cli/chunks/{chunk-MBSJ5G4I.js → chunk-JY7T2AQQ.js} +4 -4
- package/dist/cli/chunks/{chunk-4QFAUSWQ.js → chunk-K5KKZWED.js} +2 -2
- package/dist/cli/chunks/{chunk-L74CHKFR.js → chunk-KIMJPTHD.js} +2 -2
- package/dist/cli/chunks/{chunk-N7IBYDW5.js → chunk-MEN3UW7W.js} +1 -1
- package/dist/cli/chunks/{chunk-UHDBM7QS.js → chunk-MFQIJ3HV.js} +2 -2
- package/dist/cli/chunks/{chunk-SL6YZAT4.js → chunk-MGCW5FWH.js} +2 -2
- package/dist/cli/chunks/{chunk-U6UK3UMX.js → chunk-MIMJVKJJ.js} +3 -3
- package/dist/cli/chunks/{chunk-7ZSPCGTI.js → chunk-MJRYHHOG.js} +2 -2
- package/dist/cli/chunks/{chunk-FU77CDEM.js → chunk-MRXKIXVV.js} +2 -2
- package/dist/cli/chunks/{chunk-DY5KEOHX.js → chunk-MWPFUBXS.js} +2 -2
- package/dist/cli/chunks/{chunk-C6BBRM2J.js → chunk-N2TJXGHG.js} +1 -1
- package/dist/cli/chunks/{chunk-MQOFFRTA.js → chunk-NGSA53GC.js} +2 -2
- package/dist/cli/chunks/{chunk-YXH2CVAF.js → chunk-NKW7VOZV.js} +1 -1
- package/dist/cli/chunks/{chunk-YIYV2JB6.js → chunk-O5OOUMBB.js} +2 -2
- package/dist/cli/chunks/{chunk-HM523MTQ.js → chunk-OATHXZYW.js} +1 -1
- package/dist/cli/chunks/{chunk-WPVCSFDA.js → chunk-OJNG6ZXG.js} +2 -2
- package/dist/cli/chunks/{chunk-7SEHQTYD.js → chunk-PGNQR2VM.js} +1 -1
- package/dist/cli/chunks/{chunk-UZL366ZI.js → chunk-PPM5D7LH.js} +1 -1
- package/dist/cli/chunks/{chunk-ERYMAYJW.js → chunk-PYBVFG6T.js} +2 -2
- package/dist/cli/chunks/{chunk-FJGSEPFL.js → chunk-Q6BKJZTG.js} +2 -2
- package/dist/cli/chunks/chunk-QAW6RVAR.js +699 -0
- package/dist/cli/chunks/chunk-QTDZS4U6.js +2 -0
- package/dist/cli/chunks/{chunk-USFZ4IJD.js → chunk-R573V37S.js} +15 -15
- package/dist/cli/chunks/{chunk-Z2K5IZM6.js → chunk-RCAIOTIF.js} +2 -2
- package/dist/cli/chunks/{chunk-7RMZAVGO.js → chunk-RFNEEDPQ.js} +2 -2
- package/dist/cli/chunks/{chunk-IL2KOW5W.js → chunk-RFVZMNYX.js} +2 -2
- package/dist/cli/chunks/{chunk-B5MMDMH6.js → chunk-RLU7764Y.js} +2 -2
- package/dist/cli/chunks/chunk-RLZDXQNM.js +2 -0
- package/dist/cli/chunks/{chunk-QWG76RHA.js → chunk-RONMVGCT.js} +2 -2
- package/dist/cli/chunks/{chunk-X3RJ6SFC.js → chunk-RR55MLD4.js} +1 -1
- package/dist/cli/chunks/{chunk-PL5SLO2W.js → chunk-RUQV3BTV.js} +1 -1
- package/dist/cli/chunks/{chunk-NXPFGPHV.js → chunk-RZ7D5SHS.js} +1 -1
- package/dist/cli/chunks/{chunk-3LRK7PYN.js → chunk-S73KENCH.js} +2 -2
- package/dist/cli/chunks/{chunk-3HBWDG62.js → chunk-S7FGTHFE.js} +2 -2
- package/dist/cli/chunks/{chunk-CAMEFWRK.js → chunk-S7HQOGVD.js} +1 -1
- package/dist/cli/chunks/{chunk-PZHZPX3O.js → chunk-SK6YRNXI.js} +2 -2
- package/dist/cli/chunks/{chunk-JTF6D2RJ.js → chunk-SXQIH2QA.js} +2 -2
- package/dist/cli/chunks/{chunk-6B4S7PKP.js → chunk-TISBFSDJ.js} +1 -1
- package/dist/cli/chunks/{chunk-72LE6PHL.js → chunk-TMD6IC6D.js} +2 -2
- package/dist/cli/chunks/{chunk-YDDZJCKY.js → chunk-TMTLWSSA.js} +1 -1
- package/dist/cli/chunks/{chunk-HQJMCTWN.js → chunk-UOIT5JZ6.js} +2 -2
- package/dist/cli/chunks/{chunk-OPDTDKN3.js → chunk-UTORITJT.js} +2 -2
- package/dist/cli/chunks/{chunk-3JAOFKEU.js → chunk-VB7DZVCI.js} +1 -1
- package/dist/cli/chunks/{chunk-2L73WXA4.js → chunk-VC256KH2.js} +2 -2
- package/dist/cli/chunks/{chunk-SNTMAVPH.js → chunk-VESYE5YO.js} +3 -3
- package/dist/cli/chunks/{chunk-YYAPO3CU.js → chunk-VKWDMOR4.js} +2 -2
- package/dist/cli/chunks/{chunk-HRLXU4LH.js → chunk-VWN66V7U.js} +2 -2
- package/dist/cli/chunks/{chunk-CNEWYJKT.js → chunk-W5C7R2LS.js} +3 -3
- package/dist/cli/chunks/{chunk-JLL27IGU.js → chunk-W7KGHW4T.js} +2 -2
- package/dist/cli/chunks/{chunk-H56AROF2.js → chunk-WFZ4DRIC.js} +2 -2
- package/dist/cli/chunks/{chunk-4CYLSXA6.js → chunk-WFZUKXV5.js} +2 -2
- package/dist/cli/chunks/{chunk-AEJVOJPT.js → chunk-X4B3R3ZZ.js} +2 -2
- package/dist/cli/chunks/{chunk-KG5SM36Y.js → chunk-XI6ZZMX7.js} +1 -1
- package/dist/cli/chunks/{chunk-R5ONQAQL.js → chunk-YEO2Z3UX.js} +2 -2
- package/dist/cli/chunks/{chunk-D2FBUOAR.js → chunk-YZD4VIE5.js} +1 -1
- package/dist/cli/chunks/{chunk-U7NMPZE2.js → chunk-YZFNPTGN.js} +2 -2
- package/dist/cli/chunks/{chunk-OX4R55T3.js → chunk-ZCYKWEAM.js} +2 -2
- package/dist/cli/chunks/{chunk-OG7CWWFR.js → chunk-ZG3DSWUA.js} +1 -1
- package/dist/cli/chunks/{chunk-EETVN2OJ.js → chunk-ZS4BGJJV.js} +1 -1
- package/dist/cli/chunks/{chunk-LZ6TNTGO.js → chunk-ZT7JSFGT.js} +2 -2
- package/dist/cli/chunks/{chunk-HMFEPKAR.js → chunk-ZTC64OJE.js} +2 -2
- package/dist/cli/chunks/{chunk-RNF47IJ5.js → chunk-ZUBJBAUD.js} +15 -15
- package/dist/cli/chunks/{ci-AWZ3S5OT.js → ci-M2BSQBLL.js} +2 -2
- package/dist/cli/chunks/{ci-output-JLCYTIMT.js → ci-output-Z4TMK6GZ.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-BJDKBDIL.js → circuit-breaker-E3G4GGWB.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-KKOP5ZMO.js → claude-flow-setup-MASRQU54.js} +2 -2
- package/dist/cli/chunks/client-RPB6RYVY.js +2 -0
- package/dist/cli/chunks/{cline-installer-7M525SEA.js → cline-installer-P3BWAKQA.js} +2 -2
- package/dist/cli/chunks/{code-27SUVJDO.js → code-7HY5HQAV.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-TTQQZLAK.js → code-index-extractor-MBVKLOEU.js} +2 -2
- package/dist/cli/chunks/{codex-installer-GHNGNPKP.js → codex-installer-WZ6QO2PH.js} +2 -2
- package/dist/cli/chunks/{completions-JPJD24DG.js → completions-TOJC2UFP.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-Q74EJV33.js → complexity-analyzer-QYVDIAAW.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-ULTRDIML.js → continuedev-installer-J72CV7P4.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-EK52X4CG.js → copilot-installer-ACDA3GEA.js} +2 -2
- package/dist/cli/chunks/core-handlers-QFJT5NX6.js +2 -0
- package/dist/cli/chunks/{cost-tracker-2GKBRYXL.js → cost-tracker-BAYQJELE.js} +2 -2
- package/dist/cli/chunks/{coverage-YCLC3W2A.js → coverage-QD3XJV6W.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-5GJ7WZKX.js +2 -0
- package/dist/cli/chunks/{cursor-installer-B3ALFW5E.js → cursor-installer-SPGZ4TQM.js} +2 -2
- package/dist/cli/chunks/{daemon-ZKEBVLJA.js → daemon-3EVOL2UH.js} +3 -3
- package/dist/cli/chunks/daemon-N4JKD5SO.js +10 -0
- package/dist/cli/chunks/{dag-attention-scheduler-OQPJ6ULA.js → dag-attention-scheduler-3BVLL3L5.js} +2 -2
- package/dist/cli/chunks/{detect-YMYIQH3Q.js → detect-SWACKB45.js} +2 -2
- package/dist/cli/chunks/{dist-node-R4FAYQRY.js → dist-node-LU4E7PI6.js} +2 -2
- package/dist/cli/chunks/{domain-handler-IGWXLF2S.js → domain-handler-5AKKAC43.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-A7YNO76C.js → domain-transfer-LB6H7RPX.js} +2 -2
- package/dist/cli/chunks/dream-C6VNLTON.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-KODZAS7Y.js → embed-and-insert-pattern-7RBA5NDK.js} +2 -2
- package/dist/cli/chunks/{eval-ALQW7Q2S.js → eval-ZZFPRENX.js} +5 -5
- package/dist/cli/chunks/{experience-capture-middleware-3WK4RXWK.js → experience-capture-middleware-HRO3EGIW.js} +3 -3
- package/dist/cli/chunks/{fast-paths-PQWDFIJZ.js → fast-paths-IRRNQBTY.js} +2 -2
- package/dist/cli/chunks/{feature-flags-JRUAZCND.js → feature-flags-R5N5IWI2.js} +2 -2
- package/dist/cli/chunks/{feature-flags-6X33B3WX.js → feature-flags-W54ABAUA.js} +2 -2
- package/dist/cli/chunks/{file-discovery-SA3YU3IH.js → file-discovery-6CIDLVID.js} +2 -2
- package/dist/cli/chunks/{fleet-7TXCAOKQ.js → fleet-YTFN64WE.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-ZKNYACEC.js → gnn-wrapper-RXMPLMV2.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-KRZRZ23F.js → heartbeat-handler-HQQWEEQQ.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-4SBO27BG.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-W7G6VNXW.js +2 -0
- package/dist/cli/chunks/hnsw-index-LENA5QML.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-LVHQ5SG7.js → hnsw-legacy-bridge-GPZIKYFD.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-HP4JZS6K.js → hnswlib-node-P6HSEFLW.js} +2 -2
- package/dist/cli/chunks/hooks-AYLAGFOK.js +285 -0
- package/dist/cli/chunks/hybrid-router-IXHIC45P.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-2EZBZMFK.js → hypergraph-engine-56FMXI3T.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-GLPWYII2.js → hypergraph-handler-APEVT5IE.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-DKGVMYU6.js +2 -0
- package/dist/cli/chunks/{init-handler-ZSDO5VMA.js → init-handler-5DWF4REQ.js} +6 -6
- package/dist/cli/chunks/init-wizard-BBY3LY3F.js +2 -0
- package/dist/cli/chunks/kernel-7CUW7G62.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-ATYSDWIV.js → kilocode-installer-XKAUA5VA.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-K66YT6PC.js → kiro-installer-NI2KIYJE.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-Q5CP47IP.js +2 -0
- package/dist/cli/chunks/{learning-BVYCC4RI.js → learning-ZIUMUNXZ.js} +3 -3
- package/dist/cli/chunks/{llm-router-VBCXE6DN.js → llm-router-IL52EF2V.js} +4 -4
- package/dist/cli/chunks/llm-router-service-MTXCX7TO.js +2 -0
- package/dist/cli/chunks/{load-AREDQE2U.js → load-B5LFYD6O.js} +2 -2
- package/dist/cli/chunks/load-test-YBWXASBO.js +2 -0
- package/dist/cli/chunks/{mcp-NG6H6UC5.js → mcp-K6GZLWBC.js} +2 -2
- package/dist/cli/chunks/{memory-Y65EHG6N.js → memory-NCQRVSN6.js} +5 -5
- package/dist/cli/chunks/memory-backend-52LANEA3.js +2 -0
- package/dist/cli/chunks/memory-handlers-KFW3HYAP.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-VRPRFUZT.js → multi-model-executor-R4LBSJWK.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-CKQXPM5R.js → opencode-installer-I6CBR3PV.js} +2 -2
- package/dist/cli/chunks/{orchestrator-I7JBKD6G.js → orchestrator-5FXUCES6.js} +10 -10
- package/dist/cli/chunks/{pipeline-MV2RWCBI.js → pipeline-GDKCTXJH.js} +2 -2
- package/dist/cli/chunks/{platform-VU5P3SOG.js → platform-ZFY3F4T3.js} +2 -2
- package/dist/cli/chunks/{plugin-6TERLKCB.js → plugin-HQMEN3OS.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-WIUIN2DL.js → prime-radiant-advanced-wasm-LSJGF4CV.js} +2 -2
- package/dist/cli/chunks/protocol-executor-TRYUS77M.js +2 -0
- package/dist/cli/chunks/{protocol-handler-HKWBGARO.js → protocol-handler-BMDNIGPP.js} +2 -2
- package/dist/cli/chunks/{prove-7CQPHBRJ.js → prove-ABVGAG4Z.js} +2 -2
- package/dist/cli/chunks/provider-manager-6XQQN7FX.js +2 -0
- package/dist/cli/chunks/qe-reasoning-bank-3IUPE4DJ.js +2 -0
- package/dist/cli/chunks/{quality-VLUVXKVG.js → quality-ENJXPNP5.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-VWPH4XPX.js +2 -0
- package/dist/cli/chunks/{real-embeddings-JPZ64KK2.js → real-embeddings-W3GNAEJO.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-NONVB3UE.js → roocode-installer-4FJNQ7PU.js} +2 -2
- package/dist/cli/chunks/router-OIB6ODHA.js +2 -0
- package/dist/cli/chunks/routing-feedback-EKYPCZYG.js +2 -0
- package/dist/cli/chunks/{routing-handler-YYXDT4J2.js → routing-handler-GFS5FA4F.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-5PFMNDLR.js → ruvector-commands-GBMYNJKN.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-TF6H7AXH.js → rvf-dual-writer-STUAQT6U.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-VNGIUZCO.js → rvf-migration-adapter-LO6DBNJH.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-VA52YAIY.js → rvf-migration-coordinator-I5AD4VJ2.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-7RXP2Q4Q.js +2 -0
- package/dist/cli/chunks/safe-db-MNKFEPBX.js +2 -0
- package/dist/cli/chunks/schedule-AJXABVXX.js +2 -0
- package/dist/cli/chunks/scheduler-LDWYHIAW.js +2 -0
- package/dist/cli/chunks/{security-62HEETBF.js → security-X3WCA5K5.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-Z4FSPWNP.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-JTZK7LRD.js → shared-rvf-dual-writer-QOPOIRIC.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-A6GKDMOJ.js +2 -0
- package/dist/cli/chunks/{status-handler-LSUPUKRF.js → status-handler-B2B5QBVK.js} +2 -2
- package/dist/cli/chunks/{structural-health-Z75A666N.js → structural-health-KT47LBVH.js} +2 -2
- package/dist/cli/chunks/sync-CKID22IW.js +2 -0
- package/dist/cli/chunks/{sync-M3O4T3A3.js → sync-VWD6OOUR.js} +2 -2
- package/dist/cli/chunks/{task-handler-AQBSZAQC.js → task-handler-X5JT5YBF.js} +2 -2
- package/dist/cli/chunks/{task-handlers-BOZP247V.js → task-handlers-IW4GQDW4.js} +3 -3
- package/dist/cli/chunks/{test-FTEGPNN2.js → test-MBZSUASD.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-IGR4U2VQ.js → test-scheduling-E5KHKRZS.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-TIDPJ5IG.js +2 -0
- package/dist/cli/chunks/{token-usage-VCHV47EO.js → token-usage-ECJSPOQB.js} +2 -2
- package/dist/cli/chunks/{transformers-M27QSNFH.js → transformers-UZJAQ7OZ.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-IIGEJYFU.js → tree-sitter-wasm-parser-H6BU2E5R.js} +2 -2
- package/dist/cli/chunks/{types-RQFPUUKA.js → types-PM7NT3MH.js} +2 -2
- package/dist/cli/chunks/unified-memory-27QJHABO.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-76VUXR4H.js +2 -0
- package/dist/cli/chunks/unified-persistence-QRCGDEXH.js +2 -0
- package/dist/cli/chunks/{upgrade-VJMYX3AL.js → upgrade-FS2XYC2P.js} +2 -2
- package/dist/cli/chunks/{validate-ML7HUAU5.js → validate-4Y2BNN3A.js} +3 -3
- package/dist/cli/chunks/{validate-swarm-RCR6EYRC.js → validate-swarm-Z7QXZSUE.js} +4 -4
- package/dist/cli/chunks/{vibium-ZOOS3W5L.js → vibium-VZ6L3O2G.js} +2 -2
- package/dist/cli/chunks/visual-security-KB27O7BE.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-2YPGYLWK.js → web-tree-sitter-H7P37W5U.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-GOJWUWC5.js → windsurf-installer-IB2VHSZS.js} +2 -2
- package/dist/cli/chunks/{witness-chain-3MGSS3Q4.js → witness-chain-C4DISYJN.js} +2 -2
- package/dist/cli/chunks/witness-chain-EYPXHRDV.js +2 -0
- package/dist/cli/chunks/{workflow-B5Q77BI4.js → workflow-IGM7KVIO.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-6AQZ3USU.js +2 -0
- package/dist/cli/chunks/wrappers-PQXC263L.js +2 -0
- package/dist/cli/commands/arena.d.ts +10 -0
- package/dist/cli/commands/arena.js +129 -0
- package/dist/cli/commands/hooks-handlers/command-hooks.js +38 -2
- package/dist/cli/commands/hooks-handlers/hooks-dream-learning.d.ts +4 -0
- package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +66 -3
- package/dist/cli/commands/hooks-handlers/nesting-provenance.d.ts +27 -0
- package/dist/cli/commands/hooks-handlers/nesting-provenance.js +46 -0
- package/dist/cli/commands/hooks-handlers/task-hooks.js +72 -1
- package/dist/cli/commands/hooks-handlers/tool-loop-guardrail.d.ts +71 -0
- package/dist/cli/commands/hooks-handlers/tool-loop-guardrail.js +142 -0
- package/dist/cli/index.js +17 -0
- package/dist/contracts/verdicts.d.ts +297 -0
- package/dist/contracts/verdicts.js +178 -0
- package/dist/coordination/queen-types.d.ts +4 -0
- package/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js +15 -6
- package/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.js +12 -0
- package/dist/integrations/ruvector/shared-rvf-adapter.js +12 -1
- package/dist/integrations/ruvector/shared-rvf-dual-writer.js +6 -2
- package/dist/kernel/project-root.d.ts +33 -0
- package/dist/kernel/project-root.js +86 -0
- package/dist/kernel/unified-memory.d.ts +2 -19
- package/dist/kernel/unified-memory.js +8 -64
- package/dist/learning/local-judge-client.d.ts +55 -0
- package/dist/learning/local-judge-client.js +127 -0
- package/dist/learning/nagual-client.d.ts +73 -0
- package/dist/learning/nagual-client.js +150 -0
- package/dist/learning/pattern-store.js +10 -3
- package/dist/mcp/bundle.js +393 -391
- package/dist/mcp/entry.js +44 -33
- package/dist/mcp/handlers/core-handlers.d.ts +20 -0
- package/dist/mcp/handlers/core-handlers.js +28 -0
- package/dist/mcp/handlers/domain-handler-configs.d.ts +3 -0
- package/dist/mcp/handlers/domain-handler-configs.js +22 -10
- package/dist/mcp/transport/stdio.d.ts +7 -0
- package/dist/mcp/transport/stdio.js +39 -2
- package/dist/shared/llm/cost-tracker.js +6 -2
- package/dist/shared/llm/interfaces.d.ts +4 -0
- package/dist/shared/llm/providers/claude.js +16 -2
- package/dist/shared/reasoning-scrub.d.ts +29 -0
- package/dist/shared/reasoning-scrub.js +75 -0
- package/dist/workers/daemon.js +2 -0
- package/dist/workers/quality-daemon/git-watcher.js +2 -0
- package/dist/workers/quality-daemon/index.js +2 -0
- package/dist/workers/worker-manager.js +4 -0
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-BHPUKMJ5.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-JQ5WD2HM.js +0 -2
- package/dist/cli/chunks/audit-BMQ3VESB.js +0 -3
- package/dist/cli/chunks/base-E32WLGY2.js +0 -2
- package/dist/cli/chunks/browser-workflow-LNNXXAJG.js +0 -2
- package/dist/cli/chunks/chunk-2EQVYYBF.js +0 -2
- package/dist/cli/chunks/chunk-3VF3HCG4.js +0 -2
- package/dist/cli/chunks/chunk-GELF4ILR.js +0 -699
- package/dist/cli/chunks/chunk-JOLDCS6X.js +0 -2
- package/dist/cli/chunks/chunk-JSFYPLMQ.js +0 -2
- package/dist/cli/chunks/chunk-YX2HY4MX.js +0 -2
- package/dist/cli/chunks/client-2UKBYFX4.js +0 -2
- package/dist/cli/chunks/cross-domain-router-FPM3L27L.js +0 -2
- package/dist/cli/chunks/daemon-YWINEHG4.js +0 -10
- package/dist/cli/chunks/dream-XM33US3V.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-GM3M2MTG.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-K62GEHIL.js +0 -2
- package/dist/cli/chunks/hnsw-index-VCAK3TWN.js +0 -2
- package/dist/cli/chunks/hooks-6Y3UHYI2.js +0 -248
- package/dist/cli/chunks/hybrid-router-432QNCNG.js +0 -2
- package/dist/cli/chunks/impact-analyzer-VTSISNN4.js +0 -2
- package/dist/cli/chunks/init-wizard-COB5AH7Q.js +0 -2
- package/dist/cli/chunks/kernel-ROK7X5FM.js +0 -2
- package/dist/cli/chunks/knowledge-graph-YUWIDIWW.js +0 -2
- package/dist/cli/chunks/llm-router-service-7VLXJ7VE.js +0 -2
- package/dist/cli/chunks/load-test-32524DL3.js +0 -2
- package/dist/cli/chunks/memory-backend-BI2V5AAB.js +0 -2
- package/dist/cli/chunks/memory-handlers-NSOFWVFN.js +0 -2
- package/dist/cli/chunks/protocol-executor-2UPB7SPI.js +0 -2
- package/dist/cli/chunks/provider-manager-PDT37MIJ.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-AQQ2BI4V.js +0 -2
- package/dist/cli/chunks/queen-coordinator-6DVDVEU4.js +0 -2
- package/dist/cli/chunks/router-O2G4KQ6L.js +0 -2
- package/dist/cli/chunks/routing-feedback-TAGTD3KQ.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-46GRWQJR.js +0 -2
- package/dist/cli/chunks/safe-db-LNIPXXHH.js +0 -2
- package/dist/cli/chunks/schedule-AUH3ZALY.js +0 -2
- package/dist/cli/chunks/scheduler-KK3OYPWW.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-XWTQPGCT.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-CYESP7NG.js +0 -2
- package/dist/cli/chunks/sync-VI37UHHH.js +0 -2
- package/dist/cli/chunks/token-bootstrap-2DFRVMBM.js +0 -2
- package/dist/cli/chunks/unified-memory-RISHEANP.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-2IKXGMNZ.js +0 -2
- package/dist/cli/chunks/unified-persistence-ZTTUJNTU.js +0 -2
- package/dist/cli/chunks/visual-security-D66DTAO5.js +0 -2
- package/dist/cli/chunks/witness-chain-RHWHHDLV.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-OQMFW2TC.js +0 -2
- package/dist/cli/chunks/wrappers-MM5VLEPG.js +0 -2
|
@@ -0,0 +1,297 @@
|
|
|
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
|
+
*/
|
|
15
|
+
export declare const VERDICT_CONTRACT_VERSION: "1.0";
|
|
16
|
+
export type RiskDecisionOutcome = 'approve' | 'block' | 'escalate';
|
|
17
|
+
export interface RiskDecision {
|
|
18
|
+
/** Envelope discriminator + version */
|
|
19
|
+
contract: 'risk-decision@1';
|
|
20
|
+
decision: RiskDecisionOutcome;
|
|
21
|
+
riskFactors: string[];
|
|
22
|
+
/** 0..1 */
|
|
23
|
+
confidence: number;
|
|
24
|
+
rationale: string;
|
|
25
|
+
}
|
|
26
|
+
export type FindingSeverity = 'critical' | 'high' | 'medium' | 'low' | 'info';
|
|
27
|
+
export type FindingOutcome = 'upheld' | 'refuted' | 'uncertain';
|
|
28
|
+
export interface FindingVerdict {
|
|
29
|
+
contract: 'finding-verdict@1';
|
|
30
|
+
id: string;
|
|
31
|
+
title: string;
|
|
32
|
+
file?: string;
|
|
33
|
+
severity: FindingSeverity;
|
|
34
|
+
/** 0..1 */
|
|
35
|
+
confidence: number;
|
|
36
|
+
evidence: string[];
|
|
37
|
+
verdict: FindingOutcome;
|
|
38
|
+
/** One entry per refuter that voted to refute (empty when none) */
|
|
39
|
+
refutations: string[];
|
|
40
|
+
}
|
|
41
|
+
export interface CoverageGap {
|
|
42
|
+
contract: 'coverage-gap@1';
|
|
43
|
+
file: string;
|
|
44
|
+
/** 1-based inclusive line range; omit for whole-file gaps */
|
|
45
|
+
rangeStart?: number;
|
|
46
|
+
rangeEnd?: number;
|
|
47
|
+
/** 0..1 risk weighting */
|
|
48
|
+
riskScore: number;
|
|
49
|
+
suggestedTests: string[];
|
|
50
|
+
}
|
|
51
|
+
export interface ValidationResult {
|
|
52
|
+
valid: boolean;
|
|
53
|
+
errors: string[];
|
|
54
|
+
}
|
|
55
|
+
export declare function validateRiskDecision(value: unknown): ValidationResult;
|
|
56
|
+
export declare function validateFindingVerdict(value: unknown): ValidationResult;
|
|
57
|
+
export declare function validateCoverageGap(value: unknown): ValidationResult;
|
|
58
|
+
/**
|
|
59
|
+
* Derive a RiskDecision from a quality-gate outcome (quality_assess boundary).
|
|
60
|
+
* Indeterminate gates (passed undefined) escalate rather than guess.
|
|
61
|
+
*/
|
|
62
|
+
export declare function buildRiskDecisionFromQualityGate(input: {
|
|
63
|
+
passed?: boolean;
|
|
64
|
+
qualityScore?: number;
|
|
65
|
+
recommendations?: string[];
|
|
66
|
+
}): RiskDecision;
|
|
67
|
+
export declare const RISK_DECISION_SCHEMA: {
|
|
68
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
69
|
+
readonly $id: "https://agentic-qe.dev/schemas/risk-decision.schema.json";
|
|
70
|
+
readonly title: "RiskDecision";
|
|
71
|
+
readonly type: "object";
|
|
72
|
+
readonly required: readonly ["contract", "decision", "riskFactors", "confidence", "rationale"];
|
|
73
|
+
readonly additionalProperties: true;
|
|
74
|
+
readonly properties: {
|
|
75
|
+
readonly contract: {
|
|
76
|
+
readonly const: "risk-decision@1";
|
|
77
|
+
};
|
|
78
|
+
readonly decision: {
|
|
79
|
+
readonly enum: readonly ["approve", "block", "escalate"];
|
|
80
|
+
};
|
|
81
|
+
readonly riskFactors: {
|
|
82
|
+
readonly type: "array";
|
|
83
|
+
readonly items: {
|
|
84
|
+
readonly type: "string";
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
readonly confidence: {
|
|
88
|
+
readonly type: "number";
|
|
89
|
+
readonly minimum: 0;
|
|
90
|
+
readonly maximum: 1;
|
|
91
|
+
};
|
|
92
|
+
readonly rationale: {
|
|
93
|
+
readonly type: "string";
|
|
94
|
+
readonly minLength: 1;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
export declare const FINDING_VERDICT_SCHEMA: {
|
|
99
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
100
|
+
readonly $id: "https://agentic-qe.dev/schemas/finding-verdict.schema.json";
|
|
101
|
+
readonly title: "FindingVerdict";
|
|
102
|
+
readonly type: "object";
|
|
103
|
+
readonly required: readonly ["contract", "id", "title", "severity", "confidence", "evidence", "verdict", "refutations"];
|
|
104
|
+
readonly additionalProperties: true;
|
|
105
|
+
readonly properties: {
|
|
106
|
+
readonly contract: {
|
|
107
|
+
readonly const: "finding-verdict@1";
|
|
108
|
+
};
|
|
109
|
+
readonly id: {
|
|
110
|
+
readonly type: "string";
|
|
111
|
+
readonly minLength: 1;
|
|
112
|
+
};
|
|
113
|
+
readonly title: {
|
|
114
|
+
readonly type: "string";
|
|
115
|
+
readonly minLength: 1;
|
|
116
|
+
};
|
|
117
|
+
readonly file: {
|
|
118
|
+
readonly type: "string";
|
|
119
|
+
};
|
|
120
|
+
readonly severity: {
|
|
121
|
+
readonly enum: readonly ["critical", "high", "medium", "low", "info"];
|
|
122
|
+
};
|
|
123
|
+
readonly confidence: {
|
|
124
|
+
readonly type: "number";
|
|
125
|
+
readonly minimum: 0;
|
|
126
|
+
readonly maximum: 1;
|
|
127
|
+
};
|
|
128
|
+
readonly evidence: {
|
|
129
|
+
readonly type: "array";
|
|
130
|
+
readonly items: {
|
|
131
|
+
readonly type: "string";
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
readonly verdict: {
|
|
135
|
+
readonly enum: readonly ["upheld", "refuted", "uncertain"];
|
|
136
|
+
};
|
|
137
|
+
readonly refutations: {
|
|
138
|
+
readonly type: "array";
|
|
139
|
+
readonly items: {
|
|
140
|
+
readonly type: "string";
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
export declare const COVERAGE_GAP_SCHEMA: {
|
|
146
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
147
|
+
readonly $id: "https://agentic-qe.dev/schemas/coverage-gap.schema.json";
|
|
148
|
+
readonly title: "CoverageGap";
|
|
149
|
+
readonly type: "object";
|
|
150
|
+
readonly required: readonly ["contract", "file", "riskScore", "suggestedTests"];
|
|
151
|
+
readonly additionalProperties: true;
|
|
152
|
+
readonly properties: {
|
|
153
|
+
readonly contract: {
|
|
154
|
+
readonly const: "coverage-gap@1";
|
|
155
|
+
};
|
|
156
|
+
readonly file: {
|
|
157
|
+
readonly type: "string";
|
|
158
|
+
readonly minLength: 1;
|
|
159
|
+
};
|
|
160
|
+
readonly rangeStart: {
|
|
161
|
+
readonly type: "integer";
|
|
162
|
+
readonly minimum: 1;
|
|
163
|
+
};
|
|
164
|
+
readonly rangeEnd: {
|
|
165
|
+
readonly type: "integer";
|
|
166
|
+
readonly minimum: 1;
|
|
167
|
+
};
|
|
168
|
+
readonly riskScore: {
|
|
169
|
+
readonly type: "number";
|
|
170
|
+
readonly minimum: 0;
|
|
171
|
+
readonly maximum: 1;
|
|
172
|
+
};
|
|
173
|
+
readonly suggestedTests: {
|
|
174
|
+
readonly type: "array";
|
|
175
|
+
readonly items: {
|
|
176
|
+
readonly type: "string";
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
export declare const VERDICT_SCHEMAS: {
|
|
182
|
+
readonly 'risk-decision': {
|
|
183
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
184
|
+
readonly $id: "https://agentic-qe.dev/schemas/risk-decision.schema.json";
|
|
185
|
+
readonly title: "RiskDecision";
|
|
186
|
+
readonly type: "object";
|
|
187
|
+
readonly required: readonly ["contract", "decision", "riskFactors", "confidence", "rationale"];
|
|
188
|
+
readonly additionalProperties: true;
|
|
189
|
+
readonly properties: {
|
|
190
|
+
readonly contract: {
|
|
191
|
+
readonly const: "risk-decision@1";
|
|
192
|
+
};
|
|
193
|
+
readonly decision: {
|
|
194
|
+
readonly enum: readonly ["approve", "block", "escalate"];
|
|
195
|
+
};
|
|
196
|
+
readonly riskFactors: {
|
|
197
|
+
readonly type: "array";
|
|
198
|
+
readonly items: {
|
|
199
|
+
readonly type: "string";
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
readonly confidence: {
|
|
203
|
+
readonly type: "number";
|
|
204
|
+
readonly minimum: 0;
|
|
205
|
+
readonly maximum: 1;
|
|
206
|
+
};
|
|
207
|
+
readonly rationale: {
|
|
208
|
+
readonly type: "string";
|
|
209
|
+
readonly minLength: 1;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
readonly 'finding-verdict': {
|
|
214
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
215
|
+
readonly $id: "https://agentic-qe.dev/schemas/finding-verdict.schema.json";
|
|
216
|
+
readonly title: "FindingVerdict";
|
|
217
|
+
readonly type: "object";
|
|
218
|
+
readonly required: readonly ["contract", "id", "title", "severity", "confidence", "evidence", "verdict", "refutations"];
|
|
219
|
+
readonly additionalProperties: true;
|
|
220
|
+
readonly properties: {
|
|
221
|
+
readonly contract: {
|
|
222
|
+
readonly const: "finding-verdict@1";
|
|
223
|
+
};
|
|
224
|
+
readonly id: {
|
|
225
|
+
readonly type: "string";
|
|
226
|
+
readonly minLength: 1;
|
|
227
|
+
};
|
|
228
|
+
readonly title: {
|
|
229
|
+
readonly type: "string";
|
|
230
|
+
readonly minLength: 1;
|
|
231
|
+
};
|
|
232
|
+
readonly file: {
|
|
233
|
+
readonly type: "string";
|
|
234
|
+
};
|
|
235
|
+
readonly severity: {
|
|
236
|
+
readonly enum: readonly ["critical", "high", "medium", "low", "info"];
|
|
237
|
+
};
|
|
238
|
+
readonly confidence: {
|
|
239
|
+
readonly type: "number";
|
|
240
|
+
readonly minimum: 0;
|
|
241
|
+
readonly maximum: 1;
|
|
242
|
+
};
|
|
243
|
+
readonly evidence: {
|
|
244
|
+
readonly type: "array";
|
|
245
|
+
readonly items: {
|
|
246
|
+
readonly type: "string";
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
readonly verdict: {
|
|
250
|
+
readonly enum: readonly ["upheld", "refuted", "uncertain"];
|
|
251
|
+
};
|
|
252
|
+
readonly refutations: {
|
|
253
|
+
readonly type: "array";
|
|
254
|
+
readonly items: {
|
|
255
|
+
readonly type: "string";
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
readonly 'coverage-gap': {
|
|
261
|
+
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
262
|
+
readonly $id: "https://agentic-qe.dev/schemas/coverage-gap.schema.json";
|
|
263
|
+
readonly title: "CoverageGap";
|
|
264
|
+
readonly type: "object";
|
|
265
|
+
readonly required: readonly ["contract", "file", "riskScore", "suggestedTests"];
|
|
266
|
+
readonly additionalProperties: true;
|
|
267
|
+
readonly properties: {
|
|
268
|
+
readonly contract: {
|
|
269
|
+
readonly const: "coverage-gap@1";
|
|
270
|
+
};
|
|
271
|
+
readonly file: {
|
|
272
|
+
readonly type: "string";
|
|
273
|
+
readonly minLength: 1;
|
|
274
|
+
};
|
|
275
|
+
readonly rangeStart: {
|
|
276
|
+
readonly type: "integer";
|
|
277
|
+
readonly minimum: 1;
|
|
278
|
+
};
|
|
279
|
+
readonly rangeEnd: {
|
|
280
|
+
readonly type: "integer";
|
|
281
|
+
readonly minimum: 1;
|
|
282
|
+
};
|
|
283
|
+
readonly riskScore: {
|
|
284
|
+
readonly type: "number";
|
|
285
|
+
readonly minimum: 0;
|
|
286
|
+
readonly maximum: 1;
|
|
287
|
+
};
|
|
288
|
+
readonly suggestedTests: {
|
|
289
|
+
readonly type: "array";
|
|
290
|
+
readonly items: {
|
|
291
|
+
readonly type: "string";
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
//# sourceMappingURL=verdicts.d.ts.map
|
|
@@ -0,0 +1,178 @@
|
|
|
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
|
+
*/
|
|
15
|
+
export const VERDICT_CONTRACT_VERSION = '1.0';
|
|
16
|
+
// ============================================================================
|
|
17
|
+
// Validators (dependency-free, boundary-grade)
|
|
18
|
+
// ============================================================================
|
|
19
|
+
function isRecord(v) {
|
|
20
|
+
return typeof v === 'object' && v !== null && !Array.isArray(v);
|
|
21
|
+
}
|
|
22
|
+
function isStringArray(v) {
|
|
23
|
+
return Array.isArray(v) && v.every((x) => typeof x === 'string');
|
|
24
|
+
}
|
|
25
|
+
function inUnitRange(v) {
|
|
26
|
+
return typeof v === 'number' && Number.isFinite(v) && v >= 0 && v <= 1;
|
|
27
|
+
}
|
|
28
|
+
export function validateRiskDecision(value) {
|
|
29
|
+
const errors = [];
|
|
30
|
+
if (!isRecord(value))
|
|
31
|
+
return { valid: false, errors: ['not an object'] };
|
|
32
|
+
if (value.contract !== 'risk-decision@1')
|
|
33
|
+
errors.push(`contract must be "risk-decision@1"`);
|
|
34
|
+
if (!['approve', 'block', 'escalate'].includes(value.decision)) {
|
|
35
|
+
errors.push('decision must be approve|block|escalate');
|
|
36
|
+
}
|
|
37
|
+
if (!isStringArray(value.riskFactors))
|
|
38
|
+
errors.push('riskFactors must be string[]');
|
|
39
|
+
if (!inUnitRange(value.confidence))
|
|
40
|
+
errors.push('confidence must be a number in [0,1]');
|
|
41
|
+
if (typeof value.rationale !== 'string' || value.rationale.length === 0) {
|
|
42
|
+
errors.push('rationale must be a non-empty string');
|
|
43
|
+
}
|
|
44
|
+
return { valid: errors.length === 0, errors };
|
|
45
|
+
}
|
|
46
|
+
export function validateFindingVerdict(value) {
|
|
47
|
+
const errors = [];
|
|
48
|
+
if (!isRecord(value))
|
|
49
|
+
return { valid: false, errors: ['not an object'] };
|
|
50
|
+
if (value.contract !== 'finding-verdict@1')
|
|
51
|
+
errors.push(`contract must be "finding-verdict@1"`);
|
|
52
|
+
if (typeof value.id !== 'string' || value.id.length === 0)
|
|
53
|
+
errors.push('id must be a non-empty string');
|
|
54
|
+
if (typeof value.title !== 'string' || value.title.length === 0)
|
|
55
|
+
errors.push('title must be a non-empty string');
|
|
56
|
+
if (value.file !== undefined && typeof value.file !== 'string')
|
|
57
|
+
errors.push('file must be a string when present');
|
|
58
|
+
if (!['critical', 'high', 'medium', 'low', 'info'].includes(value.severity)) {
|
|
59
|
+
errors.push('severity must be critical|high|medium|low|info');
|
|
60
|
+
}
|
|
61
|
+
if (!inUnitRange(value.confidence))
|
|
62
|
+
errors.push('confidence must be a number in [0,1]');
|
|
63
|
+
if (!isStringArray(value.evidence))
|
|
64
|
+
errors.push('evidence must be string[]');
|
|
65
|
+
if (!['upheld', 'refuted', 'uncertain'].includes(value.verdict)) {
|
|
66
|
+
errors.push('verdict must be upheld|refuted|uncertain');
|
|
67
|
+
}
|
|
68
|
+
if (!isStringArray(value.refutations))
|
|
69
|
+
errors.push('refutations must be string[]');
|
|
70
|
+
return { valid: errors.length === 0, errors };
|
|
71
|
+
}
|
|
72
|
+
export function validateCoverageGap(value) {
|
|
73
|
+
const errors = [];
|
|
74
|
+
if (!isRecord(value))
|
|
75
|
+
return { valid: false, errors: ['not an object'] };
|
|
76
|
+
if (value.contract !== 'coverage-gap@1')
|
|
77
|
+
errors.push(`contract must be "coverage-gap@1"`);
|
|
78
|
+
if (typeof value.file !== 'string' || value.file.length === 0)
|
|
79
|
+
errors.push('file must be a non-empty string');
|
|
80
|
+
for (const k of ['rangeStart', 'rangeEnd']) {
|
|
81
|
+
const v = value[k];
|
|
82
|
+
if (v !== undefined && (!Number.isInteger(v) || v < 1)) {
|
|
83
|
+
errors.push(`${k} must be a positive integer when present`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (Number.isInteger(value.rangeStart) &&
|
|
87
|
+
Number.isInteger(value.rangeEnd) &&
|
|
88
|
+
value.rangeEnd < value.rangeStart) {
|
|
89
|
+
errors.push('rangeEnd must be >= rangeStart');
|
|
90
|
+
}
|
|
91
|
+
if (!inUnitRange(value.riskScore))
|
|
92
|
+
errors.push('riskScore must be a number in [0,1]');
|
|
93
|
+
if (!isStringArray(value.suggestedTests))
|
|
94
|
+
errors.push('suggestedTests must be string[]');
|
|
95
|
+
return { valid: errors.length === 0, errors };
|
|
96
|
+
}
|
|
97
|
+
// ============================================================================
|
|
98
|
+
// Builders — derive contract envelopes at MCP boundaries
|
|
99
|
+
// ============================================================================
|
|
100
|
+
/**
|
|
101
|
+
* Derive a RiskDecision from a quality-gate outcome (quality_assess boundary).
|
|
102
|
+
* Indeterminate gates (passed undefined) escalate rather than guess.
|
|
103
|
+
*/
|
|
104
|
+
export function buildRiskDecisionFromQualityGate(input) {
|
|
105
|
+
const { passed, qualityScore, recommendations = [] } = input;
|
|
106
|
+
const decision = passed === true ? 'approve' : passed === false ? 'block' : 'escalate';
|
|
107
|
+
return {
|
|
108
|
+
contract: 'risk-decision@1',
|
|
109
|
+
decision,
|
|
110
|
+
riskFactors: recommendations.slice(0, 10),
|
|
111
|
+
confidence: decision === 'escalate' ? 0.5 : 0.9,
|
|
112
|
+
rationale: decision === 'escalate'
|
|
113
|
+
? 'Quality gate outcome indeterminate — manual review required'
|
|
114
|
+
: `Quality gate ${passed ? 'passed' : 'failed'}${typeof qualityScore === 'number' ? ` with score ${qualityScore}` : ''}`,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
// ============================================================================
|
|
118
|
+
// JSON Schemas (draft-07) — mirrors of the validators above, published to
|
|
119
|
+
// schemas/*.schema.json for ajv / workflow agent({schema}) consumers
|
|
120
|
+
// ============================================================================
|
|
121
|
+
const unit = { type: 'number', minimum: 0, maximum: 1 };
|
|
122
|
+
const stringArray = { type: 'array', items: { type: 'string' } };
|
|
123
|
+
export const RISK_DECISION_SCHEMA = {
|
|
124
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
125
|
+
$id: 'https://agentic-qe.dev/schemas/risk-decision.schema.json',
|
|
126
|
+
title: 'RiskDecision',
|
|
127
|
+
type: 'object',
|
|
128
|
+
required: ['contract', 'decision', 'riskFactors', 'confidence', 'rationale'],
|
|
129
|
+
additionalProperties: true,
|
|
130
|
+
properties: {
|
|
131
|
+
contract: { const: 'risk-decision@1' },
|
|
132
|
+
decision: { enum: ['approve', 'block', 'escalate'] },
|
|
133
|
+
riskFactors: stringArray,
|
|
134
|
+
confidence: unit,
|
|
135
|
+
rationale: { type: 'string', minLength: 1 },
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
export const FINDING_VERDICT_SCHEMA = {
|
|
139
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
140
|
+
$id: 'https://agentic-qe.dev/schemas/finding-verdict.schema.json',
|
|
141
|
+
title: 'FindingVerdict',
|
|
142
|
+
type: 'object',
|
|
143
|
+
required: ['contract', 'id', 'title', 'severity', 'confidence', 'evidence', 'verdict', 'refutations'],
|
|
144
|
+
additionalProperties: true,
|
|
145
|
+
properties: {
|
|
146
|
+
contract: { const: 'finding-verdict@1' },
|
|
147
|
+
id: { type: 'string', minLength: 1 },
|
|
148
|
+
title: { type: 'string', minLength: 1 },
|
|
149
|
+
file: { type: 'string' },
|
|
150
|
+
severity: { enum: ['critical', 'high', 'medium', 'low', 'info'] },
|
|
151
|
+
confidence: unit,
|
|
152
|
+
evidence: stringArray,
|
|
153
|
+
verdict: { enum: ['upheld', 'refuted', 'uncertain'] },
|
|
154
|
+
refutations: stringArray,
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
export const COVERAGE_GAP_SCHEMA = {
|
|
158
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
159
|
+
$id: 'https://agentic-qe.dev/schemas/coverage-gap.schema.json',
|
|
160
|
+
title: 'CoverageGap',
|
|
161
|
+
type: 'object',
|
|
162
|
+
required: ['contract', 'file', 'riskScore', 'suggestedTests'],
|
|
163
|
+
additionalProperties: true,
|
|
164
|
+
properties: {
|
|
165
|
+
contract: { const: 'coverage-gap@1' },
|
|
166
|
+
file: { type: 'string', minLength: 1 },
|
|
167
|
+
rangeStart: { type: 'integer', minimum: 1 },
|
|
168
|
+
rangeEnd: { type: 'integer', minimum: 1 },
|
|
169
|
+
riskScore: unit,
|
|
170
|
+
suggestedTests: stringArray,
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
export const VERDICT_SCHEMAS = {
|
|
174
|
+
'risk-decision': RISK_DECISION_SCHEMA,
|
|
175
|
+
'finding-verdict': FINDING_VERDICT_SCHEMA,
|
|
176
|
+
'coverage-gap': COVERAGE_GAP_SCHEMA,
|
|
177
|
+
};
|
|
178
|
+
//# sourceMappingURL=verdicts.js.map
|
|
@@ -45,6 +45,10 @@ export interface TaskExecution {
|
|
|
45
45
|
readonly result?: unknown;
|
|
46
46
|
readonly error?: string;
|
|
47
47
|
readonly retryCount: number;
|
|
48
|
+
/** ADR-101: agent that spawned this task (nested-subagent provenance) */
|
|
49
|
+
readonly parentAgentId?: string;
|
|
50
|
+
/** ADR-101: nesting depth, 0 = top-level (Anthropic cap is 5; bound is 32) */
|
|
51
|
+
readonly depth?: number;
|
|
48
52
|
}
|
|
49
53
|
/**
|
|
50
54
|
* Domain group for coordination
|
|
@@ -18,6 +18,7 @@ import { computeRealEmbedding, } from '../../../learning/real-embeddings.js';
|
|
|
18
18
|
import { CircularBuffer } from '../../../shared/utils/circular-buffer.js';
|
|
19
19
|
import { HNSWEmbeddingIndex } from '../../embeddings/index/HNSWIndex.js';
|
|
20
20
|
import { safeJsonParse } from '../../../shared/safe-json.js';
|
|
21
|
+
import { scrubReasoningBlocks } from '../../../shared/reasoning-scrub.js';
|
|
21
22
|
import { ExperienceConsolidator } from '../../../learning/experience-consolidation.js';
|
|
22
23
|
import { getRuVectorFeatureFlags } from '../../ruvector/feature-flags.js';
|
|
23
24
|
import { ReservoirReplayBuffer } from '../../ruvector/reservoir-replay.js';
|
|
@@ -126,7 +127,8 @@ export class ExperienceReplay {
|
|
|
126
127
|
`);
|
|
127
128
|
let written = 0;
|
|
128
129
|
for (const row of ghosts) {
|
|
129
|
-
|
|
130
|
+
// ADR-099: legacy rows may predate ingestion-time scrubbing
|
|
131
|
+
const text = scrubReasoningBlocks(`${row.domain ?? ''}: ${row.task}`).slice(0, 512);
|
|
130
132
|
const embedding = await computeRealEmbedding(text);
|
|
131
133
|
const buf = Buffer.from(new Float32Array(embedding).buffer);
|
|
132
134
|
updateStmt.run(buf, embedding.length, row.id);
|
|
@@ -174,7 +176,8 @@ export class ExperienceReplay {
|
|
|
174
176
|
const updateStmt = this.db.prepare(`UPDATE qe_trajectories SET embedding = ? WHERE id = ?`);
|
|
175
177
|
let written = 0;
|
|
176
178
|
for (const row of rows) {
|
|
177
|
-
|
|
179
|
+
// ADR-099: legacy rows may predate ingestion-time scrubbing
|
|
180
|
+
const text = scrubReasoningBlocks(`${row.domain ?? ''}: ${row.task}`).slice(0, 512);
|
|
178
181
|
const embedding = await computeRealEmbedding(text);
|
|
179
182
|
updateStmt.run(Buffer.from(new Float32Array(embedding).buffer), row.id);
|
|
180
183
|
written++;
|
|
@@ -373,18 +376,22 @@ export class ExperienceReplay {
|
|
|
373
376
|
return null;
|
|
374
377
|
}
|
|
375
378
|
// Extract key actions
|
|
379
|
+
// ADR-099: scrub reasoning scratchpad blocks so neither the stored
|
|
380
|
+
// experience nor its embedding carries extended-thinking text
|
|
381
|
+
const task = scrubReasoningBlocks(trajectory.task);
|
|
382
|
+
strategy = scrubReasoningBlocks(strategy);
|
|
376
383
|
const keyActions = trajectory.steps
|
|
377
384
|
.filter(s => s.result.outcome === 'success')
|
|
378
|
-
.map(s => s.action);
|
|
385
|
+
.map(s => scrubReasoningBlocks(s.action));
|
|
379
386
|
// Generate embedding for similarity search
|
|
380
|
-
const embeddingText = `${
|
|
387
|
+
const embeddingText = `${task} ${strategy} ${keyActions.join(' ')}`;
|
|
381
388
|
const embedding = await computeRealEmbedding(embeddingText, this.config.embedding);
|
|
382
389
|
const id = uuidv4();
|
|
383
390
|
const domain = trajectory.domain || 'test-generation';
|
|
384
391
|
const experience = {
|
|
385
392
|
id,
|
|
386
393
|
trajectoryId: trajectory.id,
|
|
387
|
-
task
|
|
394
|
+
task,
|
|
388
395
|
domain,
|
|
389
396
|
strategy,
|
|
390
397
|
keyActions,
|
|
@@ -401,7 +408,7 @@ export class ExperienceReplay {
|
|
|
401
408
|
const insertStmt = this.prepared.get('insertExperience');
|
|
402
409
|
if (insertStmt) {
|
|
403
410
|
const embeddingBuffer = embedding ? this.floatArrayToBuffer(embedding) : null;
|
|
404
|
-
insertStmt.run(id,
|
|
411
|
+
insertStmt.run(id, task, strategy, // agent column stores strategy
|
|
405
412
|
domain, trajectory.metrics.efficiencyScore, JSON.stringify(keyActions), // steps_json stores key actions
|
|
406
413
|
JSON.stringify(trajectory.metrics), // routing_json stores original metrics
|
|
407
414
|
embeddingBuffer, embedding?.length ?? null, JSON.stringify(tags));
|
|
@@ -523,6 +530,8 @@ export class ExperienceReplay {
|
|
|
523
530
|
return [];
|
|
524
531
|
}
|
|
525
532
|
// Generate embedding for the task
|
|
533
|
+
// ADR-099: scrub so query embeddings match the scrubbed stored embeddings
|
|
534
|
+
task = scrubReasoningBlocks(task);
|
|
526
535
|
const taskEmbedding = await computeRealEmbedding(task, this.config.embedding);
|
|
527
536
|
// Create query embedding for HNSW search
|
|
528
537
|
const queryEmbedding = {
|
|
@@ -11,6 +11,7 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
11
11
|
import { getUnifiedMemory } from '../../../kernel/unified-memory.js';
|
|
12
12
|
import { CircularBuffer } from '../../../shared/utils/circular-buffer.js';
|
|
13
13
|
import { safeJsonParse } from '../../../shared/safe-json.js';
|
|
14
|
+
import { scrubReasoningBlocks, scrubReasoningDeep } from '../../../shared/reasoning-scrub.js';
|
|
14
15
|
const DEFAULT_CONFIG = {
|
|
15
16
|
maxStepsPerTrajectory: 100,
|
|
16
17
|
autoEndTimeoutMs: 30 * 60 * 1000, // 30 minutes
|
|
@@ -222,6 +223,9 @@ export class TrajectoryTracker {
|
|
|
222
223
|
*/
|
|
223
224
|
async startTrajectory(task, options = {}) {
|
|
224
225
|
this.ensureInitialized();
|
|
226
|
+
// ADR-099: strip reasoning scratchpad blocks before the task text enters
|
|
227
|
+
// persistence and (later) embedding generation
|
|
228
|
+
task = scrubReasoningBlocks(task);
|
|
225
229
|
const id = uuidv4();
|
|
226
230
|
const startedAt = new Date();
|
|
227
231
|
// Store in memory for active tracking
|
|
@@ -270,6 +274,14 @@ export class TrajectoryTracker {
|
|
|
270
274
|
}
|
|
271
275
|
const stepId = uuidv4();
|
|
272
276
|
const quality = options.quality ?? this.calculateStepQuality(result);
|
|
277
|
+
// ADR-099: scrub reasoning blocks from step content before it is held
|
|
278
|
+
// in memory (distilled into experiences at endTrajectory) and persisted
|
|
279
|
+
action = scrubReasoningBlocks(action);
|
|
280
|
+
result = {
|
|
281
|
+
...result,
|
|
282
|
+
data: result.data ? scrubReasoningDeep(result.data) : result.data,
|
|
283
|
+
error: result.error ? scrubReasoningBlocks(result.error) : result.error,
|
|
284
|
+
};
|
|
273
285
|
const step = {
|
|
274
286
|
id: stepId,
|
|
275
287
|
action,
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module integrations/ruvector/shared-rvf-adapter
|
|
12
12
|
*/
|
|
13
|
+
// Issue #516: lightweight, sqlite-free project-root resolver (static import so it
|
|
14
|
+
// resolves under the test runner; avoids pulling unified-memory's sqlite graph).
|
|
15
|
+
import { findProjectRoot } from '../../kernel/project-root.js';
|
|
13
16
|
let sharedAdapter = null;
|
|
14
17
|
let initAttempted = false;
|
|
15
18
|
// ---------------------------------------------------------------------------
|
|
@@ -62,7 +65,15 @@ export function getSharedRvfAdapter(dataDir = '.agentic-qe', dimensions = 384) {
|
|
|
62
65
|
}
|
|
63
66
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
64
67
|
const path = require('path');
|
|
65
|
-
|
|
68
|
+
// Issue #516: resolve a relative dataDir against the project root so the
|
|
69
|
+
// store lands in the project's own .agentic-qe/, not a cwd-relative one.
|
|
70
|
+
// A subfolder cwd (vendored builds, background workers, `aqe code index
|
|
71
|
+
// docs/`) otherwise scatters stray patterns.rvf-only stores. Explicit
|
|
72
|
+
// absolute dataDir args are honored as-is.
|
|
73
|
+
const baseDir = path.isAbsolute(dataDir)
|
|
74
|
+
? dataDir
|
|
75
|
+
: path.join(process.env.AQE_PROJECT_ROOT ?? findProjectRoot(), dataDir);
|
|
76
|
+
const rvfPath = path.join(baseDir, 'patterns.rvf');
|
|
66
77
|
// Open-or-create with a try-ladder rather than `existsSync` gate.
|
|
67
78
|
// Reasons:
|
|
68
79
|
// 1. RVF native's `RvfDatabase.create()` throws `0x0303 FsyncFailed`
|
|
@@ -56,16 +56,20 @@ export async function getSharedRvfDualWriter() {
|
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
58
|
// Get DB handle from unified memory
|
|
59
|
-
const { getUnifiedMemory } = await import('../../kernel/unified-memory.js');
|
|
59
|
+
const { getUnifiedMemory, findProjectRoot } = await import('../../kernel/unified-memory.js');
|
|
60
60
|
const unifiedMemory = getUnifiedMemory();
|
|
61
61
|
const db = unifiedMemory.getDatabase();
|
|
62
62
|
if (!db) {
|
|
63
63
|
return null;
|
|
64
64
|
}
|
|
65
|
+
// Issue #516: anchor brain.rvf to the project root rather than a
|
|
66
|
+
// cwd-relative path, so a subfolder cwd doesn't scatter a stray store.
|
|
67
|
+
const { join: joinPath } = await import('node:path');
|
|
68
|
+
const rvfPath = joinPath(process.env.AQE_PROJECT_ROOT ?? findProjectRoot(), '.agentic-qe', 'brain.rvf');
|
|
65
69
|
// Create dual-writer (dynamic import to avoid bundling .node files)
|
|
66
70
|
const { RvfDualWriter: DualWriterClass } = await import('./rvf-dual-writer.js');
|
|
67
71
|
const writer = new DualWriterClass(db, {
|
|
68
|
-
rvfPath
|
|
72
|
+
rvfPath,
|
|
69
73
|
mode: 'dual-write',
|
|
70
74
|
dimensions: 384,
|
|
71
75
|
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project Root Detection
|
|
3
|
+
*
|
|
4
|
+
* Lightweight, dependency-free resolution of the AQE project root. Kept in its
|
|
5
|
+
* own module (no SQLite / kernel imports) so hot paths — e.g. the RVF pattern
|
|
6
|
+
* store factory — can import it statically without dragging in the sqlite-heavy
|
|
7
|
+
* unified-memory graph, and so it resolves cleanly under the test runner.
|
|
8
|
+
*
|
|
9
|
+
* `unified-memory` re-exports `findProjectRoot` / `clearProjectRootCache` for
|
|
10
|
+
* backward compatibility, so existing import sites keep working.
|
|
11
|
+
*
|
|
12
|
+
* @module kernel/project-root
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Clear the cached project root. Useful for testing or when the
|
|
16
|
+
* environment changes at runtime.
|
|
17
|
+
*/
|
|
18
|
+
export declare function clearProjectRootCache(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Find the project root by walking up the directory tree.
|
|
21
|
+
*
|
|
22
|
+
* Priority order:
|
|
23
|
+
* 1. AQE_PROJECT_ROOT environment variable (set by MCP config or init)
|
|
24
|
+
* 2. Walk up looking for the NEAREST .agentic-qe directory (existing AQE project)
|
|
25
|
+
* 3. Walk up looking for .git directory (git repo root)
|
|
26
|
+
* 4. Walk up looking for package.json WITHOUT node_modules sibling (monorepo root)
|
|
27
|
+
* 5. Fallback to current working directory
|
|
28
|
+
*
|
|
29
|
+
* Optimized: single upward walk checks all markers in one pass,
|
|
30
|
+
* and the result is cached at module level for subsequent calls.
|
|
31
|
+
*/
|
|
32
|
+
export declare function findProjectRoot(startDir?: string): string;
|
|
33
|
+
//# sourceMappingURL=project-root.d.ts.map
|