agentic-qe 3.9.0 → 3.9.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/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +43 -0
- package/dist/audit/witness-chain.d.ts +1 -1
- package/dist/cli/bundle.js +8 -8
- package/dist/cli/chunks/adapter-53WBPKXU.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-PQYB7VRU.js → agent-booster-wasm-AKAOHSCX.js} +2 -2
- package/dist/cli/chunks/{agent-handler-QDAB5NQS.js → agent-handler-MTGPOUVP.js} +2 -2
- package/dist/cli/chunks/agent-memory-branch-UFPKWUFK.js +2 -0
- package/dist/cli/chunks/aqe-learning-engine-MV7NGY24.js +2 -0
- package/dist/cli/chunks/{audit-S7JUYYVP.js → audit-VBEZHNHO.js} +2 -2
- package/dist/cli/chunks/base-DZVGMQN2.js +2 -0
- package/dist/cli/chunks/better-sqlite3-IRPHIXRU.js +2 -0
- package/dist/cli/chunks/brain-handler-7EO3FFRZ.js +68 -0
- package/dist/cli/chunks/{branch-enumerator-XK4V5W7L.js → branch-enumerator-MZRGP35N.js} +2 -2
- package/dist/cli/chunks/{browser-PALA5PL3.js → browser-VSIWQE7J.js} +2 -2
- package/dist/cli/chunks/browser-workflow-3J5YNMEI.js +2 -0
- package/dist/cli/chunks/chunk-25LFUL2K.js +79 -0
- package/dist/cli/chunks/{chunk-LHJQD2VU.js → chunk-2EC5Z2J4.js} +68 -68
- package/dist/cli/chunks/{chunk-4YOMLWEK.js → chunk-2VVV73PW.js} +1 -1
- package/dist/cli/chunks/{chunk-BPWXXEH2.js → chunk-2WBCYSUN.js} +128 -128
- package/dist/cli/chunks/{chunk-X3KI6JOY.js → chunk-2Z2TFEOL.js} +2 -2
- package/dist/cli/chunks/chunk-34U7JDCN.js +2 -0
- package/dist/cli/chunks/{chunk-24FKIJNC.js → chunk-3GZKAORV.js} +2 -2
- package/dist/cli/chunks/{chunk-72WOAVK6.js → chunk-4D2ZG2QO.js} +1 -1
- package/dist/cli/chunks/{chunk-B36CDR4U.js → chunk-4DAOZQ3V.js} +2 -2
- package/dist/cli/chunks/{chunk-CL6POIX4.js → chunk-4FMHBBG5.js} +1 -1
- package/dist/cli/chunks/{chunk-BXAXGEFC.js → chunk-4FT3PND7.js} +5 -5
- package/dist/cli/chunks/{chunk-IGJPMN4I.js → chunk-4LA7IW3V.js} +1 -1
- package/dist/cli/chunks/{chunk-JRYGQO2W.js → chunk-4PKXIBX2.js} +1 -1
- package/dist/cli/chunks/{chunk-YPFOCNOE.js → chunk-4UH25U4O.js} +1 -1
- package/dist/cli/chunks/{chunk-U5RN7YQW.js → chunk-4Z27TRQF.js} +2 -2
- package/dist/cli/chunks/{chunk-YW2THB5Q.js → chunk-563PJBDM.js} +2 -2
- package/dist/cli/chunks/{chunk-BDIEMZ22.js → chunk-56IWS2KY.js} +2 -2
- package/dist/cli/chunks/chunk-5AUKULWO.js +2 -0
- package/dist/cli/chunks/{chunk-VSVXUTJN.js → chunk-5L6AU3QK.js} +2 -2
- package/dist/cli/chunks/{chunk-RTGGL7D7.js → chunk-5RL66XSH.js} +2 -2
- package/dist/cli/chunks/{chunk-YANUP2RO.js → chunk-65M7C6SH.js} +1 -1
- package/dist/cli/chunks/{chunk-ESVQ6MEB.js → chunk-6SOJVEU7.js} +2 -2
- package/dist/cli/chunks/{chunk-UFUVUO3J.js → chunk-727BDQ3K.js} +2 -2
- package/dist/cli/chunks/{chunk-TLHP5EII.js → chunk-7NOIIC7G.js} +1 -1
- package/dist/cli/chunks/{chunk-N4TL73TH.js → chunk-7SLN2JGP.js} +8 -8
- package/dist/cli/chunks/{chunk-NZ2VCPN4.js → chunk-AA33R5U4.js} +2 -2
- package/dist/cli/chunks/{chunk-Y7BHKZFJ.js → chunk-AKSJQ6B3.js} +2 -2
- package/dist/cli/chunks/{chunk-3ZOONQG6.js → chunk-BIVIPF4O.js} +1 -1
- package/dist/cli/chunks/{chunk-VOS4NQSF.js → chunk-BKCTNRC5.js} +2 -2
- package/dist/cli/chunks/{chunk-B6LLWYQ6.js → chunk-BOH22AKC.js} +2 -2
- package/dist/cli/chunks/{chunk-OI5NGQO2.js → chunk-BY47GV4T.js} +2 -2
- package/dist/cli/chunks/chunk-CCYMJKWX.js +2 -0
- package/dist/cli/chunks/chunk-CL3K5EJK.js +2 -0
- package/dist/cli/chunks/{chunk-GPQ57KA4.js → chunk-CQBSGYRA.js} +2 -2
- package/dist/cli/chunks/{chunk-MZOFWJTM.js → chunk-CQP7ZFME.js} +2 -2
- package/dist/cli/chunks/chunk-DBE34QES.js +2 -0
- package/dist/cli/chunks/chunk-DHE66JRR.js +12 -0
- package/dist/cli/chunks/{chunk-2BZFNEN2.js → chunk-DNLMZTE2.js} +1 -1
- package/dist/cli/chunks/{chunk-XLRQYLWW.js → chunk-DSE57A5N.js} +1 -1
- package/dist/cli/chunks/{chunk-SUSEVMZT.js → chunk-E25S5E2D.js} +1 -1
- package/dist/cli/chunks/{chunk-FEKY7T6Q.js → chunk-FAXVVLPL.js} +2 -2
- package/dist/cli/chunks/chunk-FRJLP7IB.js +2 -0
- package/dist/cli/chunks/{chunk-CS2KS7LP.js → chunk-FUIHWBVF.js} +1 -1
- package/dist/cli/chunks/{chunk-LNQIY6BP.js → chunk-GCMVJS5X.js} +2 -2
- package/dist/cli/chunks/{chunk-XT2V2322.js → chunk-GITD7SRQ.js} +2 -2
- package/dist/cli/chunks/{chunk-JJO7Y4H3.js → chunk-GK72GUHA.js} +3 -3
- package/dist/cli/chunks/{chunk-6EOS7KX2.js → chunk-GPLERTZU.js} +2 -2
- package/dist/cli/chunks/{chunk-2E5NQNSU.js → chunk-HW4ISY5B.js} +11 -11
- package/dist/cli/chunks/{chunk-HRO6OZQD.js → chunk-ICDXWIFZ.js} +1 -1
- package/dist/cli/chunks/{chunk-3NZLZHJI.js → chunk-J4BS6IWE.js} +1 -1
- package/dist/cli/chunks/{chunk-4VUPRTVX.js → chunk-JOVINE23.js} +2 -2
- package/dist/cli/chunks/chunk-JV7LX6OT.js +95 -0
- package/dist/cli/chunks/{chunk-6SVX4DJC.js → chunk-KBA7FBK3.js} +3 -3
- package/dist/cli/chunks/chunk-KDDZYXP4.js +2 -0
- package/dist/cli/chunks/{chunk-GAOJV3OX.js → chunk-KNVAAVHH.js} +2 -2
- package/dist/cli/chunks/{chunk-CWFB6BSA.js → chunk-KQTJ2YLI.js} +4 -4
- package/dist/cli/chunks/{chunk-FGA7VIFR.js → chunk-KTYUCZEM.js} +3 -3
- package/dist/cli/chunks/{chunk-RU5WAHB7.js → chunk-KZTO5EVM.js} +2 -2
- package/dist/cli/chunks/{chunk-IFNIIK34.js → chunk-KZUJBZ7B.js} +3 -3
- package/dist/cli/chunks/{chunk-GKNNSCLC.js → chunk-L5WZUPZF.js} +2 -2
- package/dist/cli/chunks/{chunk-MDUHYUHF.js → chunk-L5YEPSDU.js} +2 -2
- package/dist/cli/chunks/chunk-LCAA6H4J.js +2 -0
- package/dist/cli/chunks/{chunk-XRE2HCWG.js → chunk-LMMEUVE5.js} +1 -1
- package/dist/cli/chunks/{chunk-7VDBAVTY.js → chunk-MN742FIH.js} +2 -2
- package/dist/cli/chunks/chunk-MY4LMIG7.js +180 -0
- package/dist/cli/chunks/{chunk-WGMPEW2T.js → chunk-N3F3CX4V.js} +2 -2
- package/dist/cli/chunks/{chunk-YVA65UZL.js → chunk-NJY7ZA77.js} +1 -1
- package/dist/cli/chunks/{chunk-3IHG3WOY.js → chunk-NM6TIEJ3.js} +3 -3
- package/dist/cli/chunks/{chunk-KP5NUODU.js → chunk-NRCKGXJJ.js} +1 -1
- package/dist/cli/chunks/{chunk-3ADGXLTM.js → chunk-PFNFC43Q.js} +1 -1
- package/dist/cli/chunks/{chunk-4VBTXZRM.js → chunk-PJFLO37I.js} +2 -2
- package/dist/cli/chunks/{chunk-XIBDETCS.js → chunk-PNL5G6TE.js} +2 -2
- package/dist/cli/chunks/{chunk-AFLLQ5PP.js → chunk-Q4A72ZTV.js} +2 -2
- package/dist/cli/chunks/{chunk-EHDQJQ6Y.js → chunk-QEQTC4WQ.js} +5 -5
- package/dist/cli/chunks/{chunk-IAV2JMIX.js → chunk-QIH3E775.js} +2 -2
- package/dist/cli/chunks/{chunk-GRUUQAR6.js → chunk-QNBQBSAI.js} +2 -2
- package/dist/cli/chunks/{chunk-WIEC7VKK.js → chunk-QODE4LM6.js} +2 -2
- package/dist/cli/chunks/{chunk-HY6PMO5W.js → chunk-QPRVX4H2.js} +2 -2
- package/dist/cli/chunks/chunk-RC5CPXON.js +2 -0
- package/dist/cli/chunks/{chunk-TWUWL5EJ.js → chunk-RITN3XR4.js} +2 -2
- package/dist/cli/chunks/{chunk-WBQSXPBI.js → chunk-RJROC5M3.js} +2 -2
- package/dist/cli/chunks/chunk-RQGYJK7H.js +2 -0
- package/dist/cli/chunks/{chunk-XO6PVK2P.js → chunk-S3RDH5CI.js} +2 -2
- package/dist/cli/chunks/{chunk-3IUNFTIF.js → chunk-SCF7NRVE.js} +1 -1
- package/dist/cli/chunks/chunk-SDTVHR63.js +2 -0
- package/dist/cli/chunks/chunk-SGAW2WLI.js +65 -0
- package/dist/cli/chunks/{chunk-N2NS2PHA.js → chunk-SNVM4YJS.js} +2 -2
- package/dist/cli/chunks/{chunk-JXM26HEE.js → chunk-SRRFWTNF.js} +2 -2
- package/dist/cli/chunks/{chunk-UQHYFOBX.js → chunk-STE42EMB.js} +2 -2
- package/dist/cli/chunks/{chunk-WJ3DLOXF.js → chunk-T5GV6UIO.js} +2 -2
- package/dist/cli/chunks/{chunk-4YS3IJ45.js → chunk-TKF447CW.js} +1 -1
- package/dist/cli/chunks/{chunk-ZAPS3UGQ.js → chunk-TTOE336G.js} +3 -3
- package/dist/cli/chunks/{chunk-YAGODYIG.js → chunk-UKDOMLBI.js} +3 -3
- package/dist/cli/chunks/{chunk-JBANAPWG.js → chunk-V6XBAZNH.js} +1 -1
- package/dist/cli/chunks/{chunk-BULKFVYX.js → chunk-VHVWAXCF.js} +1 -1
- package/dist/cli/chunks/{chunk-5SKGFSKD.js → chunk-VL7YOOC2.js} +2 -2
- package/dist/cli/chunks/{chunk-AKE543X2.js → chunk-VUAO4VFC.js} +2 -2
- package/dist/cli/chunks/{chunk-7R6YMLVS.js → chunk-WG4GHAML.js} +2 -2
- package/dist/cli/chunks/{chunk-BTREG4IW.js → chunk-WXWY2GAF.js} +2 -2
- package/dist/cli/chunks/chunk-X35GP7TR.js +1 -0
- package/dist/cli/chunks/chunk-X6LCMOGC.js +2 -0
- package/dist/cli/chunks/{chunk-BGXNSCXX.js → chunk-XFMKJ3UD.js} +1 -1
- package/dist/cli/chunks/{chunk-BLBRY5UD.js → chunk-XH53ARZD.js} +2 -2
- package/dist/cli/chunks/chunk-XIBVVZGB.js +2 -0
- package/dist/cli/chunks/chunk-XYJL6DKI.js +2 -0
- package/dist/cli/chunks/{chunk-5T2ZQWKF.js → chunk-Y6O7CDLI.js} +2 -2
- package/dist/cli/chunks/{chunk-4I2IOUS4.js → chunk-YXCU4CJX.js} +1 -1
- package/dist/cli/chunks/{chunk-YR6ZZGH7.js → chunk-Z2IKNC5M.js} +1 -1
- package/dist/cli/chunks/{chunk-OLHKGP35.js → chunk-Z54EO6E6.js} +2 -2
- package/dist/cli/chunks/{chunk-ZDATDCYN.js → chunk-Z5HXGVXZ.js} +1 -1
- package/dist/cli/chunks/{ci-J374KDLI.js → ci-2BCOBWFG.js} +2 -2
- package/dist/cli/chunks/ci-output-FB4OJHAC.js +2 -0
- package/dist/cli/chunks/{claude-flow-setup-245JLJCN.js → claude-flow-setup-NEEFZTMB.js} +2 -2
- package/dist/cli/chunks/client-EF555KYW.js +2 -0
- package/dist/cli/chunks/{cline-installer-LBA2M5N3.js → cline-installer-ODO2PS4K.js} +2 -2
- package/dist/cli/chunks/{code-U4N4WONM.js → code-NSOF62VE.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-A57Z6BO4.js → code-index-extractor-YQL5XN52.js} +2 -2
- package/dist/cli/chunks/{codex-installer-UXMK2N4T.js → codex-installer-SPEY6VYT.js} +2 -2
- package/dist/cli/chunks/{completions-W66BSCOE.js → completions-OWKBUMBE.js} +2 -2
- package/dist/cli/chunks/complexity-analyzer-PGTXKP73.js +2 -0
- package/dist/cli/chunks/{continuedev-installer-LRFZ2SJM.js → continuedev-installer-KGOXAC7L.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-CQ3JYBIB.js → copilot-installer-BF3UA3TG.js} +2 -2
- package/dist/cli/chunks/cost-tracker-2HDJ66E2.js +2 -0
- package/dist/cli/chunks/{coverage-4PUEQXAY.js → coverage-KPA2PHIN.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-GXFNK5TS.js +2 -0
- package/dist/cli/chunks/{cursor-installer-JZEDEDHA.js → cursor-installer-7CDZFHTV.js} +2 -2
- package/dist/cli/chunks/{daemon-B7TWGHXQ.js → daemon-4BPGCKDJ.js} +3 -3
- package/dist/cli/chunks/dag-attention-scheduler-2MAVGSBB.js +2 -0
- package/dist/cli/chunks/detect-WRPWTGP5.js +2 -0
- package/dist/cli/chunks/{domain-handler-FT5FLZWL.js → domain-handler-JZVSJ7AG.js} +2 -2
- package/dist/cli/chunks/domain-transfer-XGIZOR2X.js +2 -0
- package/dist/cli/chunks/dream-3IKF5XH4.js +2 -0
- package/dist/cli/chunks/esm-node-DHAE52OW.js +2 -0
- package/dist/cli/chunks/{eval-GHMPFGWV.js → eval-T7YPAS4G.js} +2 -2
- package/dist/cli/chunks/{fast-paths-B3R647KN.js → fast-paths-QECJTKCQ.js} +2 -2
- package/dist/cli/chunks/{feature-flags-DWS7ARSX.js → feature-flags-LIFURSFZ.js} +2 -2
- package/dist/cli/chunks/feature-flags-R4QZYTIW.js +2 -0
- package/dist/cli/chunks/file-discovery-4W3K3W4C.js +2 -0
- package/dist/cli/chunks/{fleet-EKOKMOMW.js → fleet-NLLQWCI5.js} +3 -3
- package/dist/cli/chunks/gnn-wrapper-XEII72LN.js +2 -0
- package/dist/cli/chunks/{heartbeat-handler-MBBS4IBU.js → heartbeat-handler-DJ65RE5D.js} +4 -4
- package/dist/cli/chunks/{heartbeat-scheduler-XDGMOT7X.js → heartbeat-scheduler-H664265Q.js} +2 -2
- package/dist/cli/chunks/hnsw-adapter-DML5KXQR.js +2 -0
- package/dist/cli/chunks/hnsw-index-BUPPGVR6.js +2 -0
- package/dist/cli/chunks/hnsw-legacy-bridge-SQIDTWAA.js +2 -0
- package/dist/cli/chunks/hnswlib-node-WICYCU5U.js +2 -0
- package/dist/cli/chunks/{hooks-L5VLZGEK.js → hooks-GZUHUD63.js} +6 -6
- package/dist/cli/chunks/hypergraph-engine-MLCDZ6BL.js +2 -0
- package/dist/cli/chunks/{hypergraph-handler-3HDGB5SZ.js → hypergraph-handler-NNDDI4R3.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-DPTMJRYS.js +2 -0
- package/dist/cli/chunks/{init-handler-JDET6WUN.js → init-handler-IJ6BHE6A.js} +6 -6
- package/dist/cli/chunks/init-wizard-35PUDJPW.js +2 -0
- package/dist/cli/chunks/kernel-2HZ44ZJ4.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-GZZG5AFW.js → kilocode-installer-EPZFFPFE.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-IWNY5TKH.js → kiro-installer-5VACG3HU.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-JL62G72U.js +2 -0
- package/dist/cli/chunks/{learning-722ZNSZ6.js → learning-6FITK6XY.js} +3 -3
- package/dist/cli/chunks/{llm-router-DNAV746L.js → llm-router-4DDC6AKJ.js} +2 -2
- package/dist/cli/chunks/{load-Y3GCUFM4.js → load-KGDNVUBX.js} +2 -2
- package/dist/cli/chunks/load-test-LN245SSD.js +2 -0
- package/dist/cli/chunks/{mcp-LKPIBZ3W.js → mcp-4LETGVIV.js} +2 -2
- package/dist/cli/chunks/{memory-L57MLFOP.js → memory-II4I4QMO.js} +5 -5
- package/dist/cli/chunks/memory-backend-SVM7YRIE.js +2 -0
- package/dist/cli/chunks/memory-handlers-TQXTOJGQ.js +2 -0
- package/dist/cli/chunks/opencode-installer-EU6JCWBW.js +3 -0
- package/dist/cli/chunks/{orchestrator-QHSBB2UC.js → orchestrator-YLMGJVSP.js} +5 -5
- package/dist/cli/chunks/{pipeline-D3QER35Z.js → pipeline-MPZJWYKK.js} +2 -2
- package/dist/cli/chunks/{platform-T4E7Q3RD.js → platform-YH35ZZFZ.js} +2 -2
- package/dist/cli/chunks/{plugin-JHW2YPRC.js → plugin-B7JYZFNQ.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-G7CFNNQV.js → prime-radiant-advanced-wasm-KTUK6UE2.js} +2 -2
- package/dist/cli/chunks/protocol-executor-IEN2XB4L.js +2 -0
- package/dist/cli/chunks/{protocol-handler-2BQQ4HDM.js → protocol-handler-3NXMVU34.js} +2 -2
- package/dist/cli/chunks/{prove-UQ6JFT73.js → prove-H5LMGSUC.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-Q3ZV3JRG.js +2 -0
- package/dist/cli/chunks/{quality-JRZYMC77.js → quality-RCWHY6GO.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-E6ON3JUR.js +2 -0
- package/dist/cli/chunks/real-embeddings-NKH4VURF.js +2 -0
- package/dist/cli/chunks/{roocode-installer-F4E2LAYR.js → roocode-installer-SB7QJYM3.js} +2 -2
- package/dist/cli/chunks/router-WMC3LZ3C.js +2 -0
- package/dist/cli/chunks/routing-feedback-VKCZRCE3.js +2 -0
- package/dist/cli/chunks/{routing-handler-VNKFUUGB.js → routing-handler-SY7GKG2W.js} +2 -2
- package/dist/cli/chunks/ruvector-commands-HATTO3UQ.js +8 -0
- package/dist/cli/chunks/rvf-dual-writer-D57EXQUD.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-OWDYN6KD.js +2 -0
- package/dist/cli/chunks/rvf-migration-coordinator-SIQVJB5S.js +2 -0
- package/dist/cli/chunks/rvf-native-adapter-C7NBH5UN.js +2 -0
- package/dist/cli/chunks/safe-db-5KLXCNXN.js +2 -0
- package/dist/cli/chunks/schedule-HAWWOXWB.js +2 -0
- package/dist/cli/chunks/scheduler-HTRDY5BC.js +2 -0
- package/dist/cli/chunks/{security-EBEG2OPU.js → security-DS3XLZWN.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-6I2Z5UGL.js +2 -0
- package/dist/cli/chunks/shared-rvf-dual-writer-YB7AH6XJ.js +2 -0
- package/dist/cli/chunks/sqlite-persistence-WNNRGTGG.js +2 -0
- package/dist/cli/chunks/{status-handler-VZ32M4G4.js → status-handler-TUYHE4FT.js} +2 -2
- package/dist/cli/chunks/{structural-health-K6LRCKV6.js → structural-health-XNGBNRRD.js} +2 -2
- package/dist/cli/chunks/{sync-MHSHNLIM.js → sync-K6CIRKBB.js} +2 -2
- package/dist/cli/chunks/{task-handler-JNOIBZ2G.js → task-handler-7PJY67DR.js} +2 -2
- package/dist/cli/chunks/task-handlers-WB5CDWUR.js +2 -0
- package/dist/cli/chunks/{test-DO22BNIL.js → test-WV5ALEBB.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-VLRQZEFL.js → test-scheduling-N55ZGGA2.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-SINWHAKR.js +2 -0
- package/dist/cli/chunks/{token-usage-LG3PXRXH.js → token-usage-R7TGEVGL.js} +2 -2
- package/dist/cli/chunks/transformers-6DBLXPV7.js +2 -0
- package/dist/cli/chunks/{tree-sitter-wasm-parser-FT2KB66N.js → tree-sitter-wasm-parser-7C7FKMQW.js} +2 -2
- package/dist/cli/chunks/types-VNPMOKQT.js +2 -0
- package/dist/cli/chunks/unified-memory-72SKVZ7Y.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-TMN2L77W.js +2 -0
- package/dist/cli/chunks/unified-persistence-MDN3SRCR.js +2 -0
- package/dist/cli/chunks/{validate-VQCRSVNQ.js → validate-53MNIRAF.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-A5DHAWTP.js → validate-swarm-ZY4RGUFO.js} +2 -2
- package/dist/cli/chunks/{vibium-RZBSL4EB.js → vibium-PBADBIV6.js} +2 -2
- package/dist/cli/chunks/visual-security-TRBCXPIB.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-7C4NXEOF.js → web-tree-sitter-O7VI6RLB.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-ES3KPQG3.js → windsurf-installer-HV3C3TAD.js} +2 -2
- package/dist/cli/chunks/witness-chain-4WIMYP4X.js +2 -0
- package/dist/cli/chunks/witness-chain-JOI2YYGK.js +2 -0
- package/dist/cli/chunks/{workflow-JETHX4ML.js → workflow-5RVAQ4TM.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-2NQ72S3C.js +2 -0
- package/dist/cli/chunks/{wrappers-WP5RH745.js → wrappers-RRHCCA3E.js} +2 -2
- package/dist/cli/commands/ruvector-commands.js +14 -2
- package/dist/cli/index.js +10 -15
- package/dist/coordination/agent-memory-branch.d.ts +117 -0
- package/dist/coordination/agent-memory-branch.js +213 -0
- package/dist/coordination/agent-teams/mailbox.d.ts +43 -0
- package/dist/coordination/agent-teams/mailbox.js +130 -4
- package/dist/coordination/handlers/handler-utils.d.ts +1 -0
- package/dist/coordination/handlers/handler-utils.js +9 -2
- package/dist/coordination/handlers/quality-handlers.js +7 -1
- package/dist/domains/contract-testing/coordinator.js +11 -0
- package/dist/domains/quality-assessment/coherence/gate-controller.d.ts +20 -1
- package/dist/domains/quality-assessment/coherence/gate-controller.js +64 -0
- package/dist/domains/quality-assessment/coherence/index.d.ts +3 -3
- package/dist/domains/quality-assessment/coherence/index.js +2 -2
- package/dist/domains/quality-assessment/coherence/types.d.ts +39 -0
- package/dist/domains/quality-assessment/coherence/types.js +11 -0
- package/dist/domains/quality-assessment/coordinator.d.ts +14 -0
- package/dist/domains/quality-assessment/coordinator.js +92 -0
- package/dist/domains/test-execution/coordinator.d.ts +19 -0
- package/dist/domains/test-execution/coordinator.js +102 -5
- package/dist/domains/test-generation/coordinator.js +11 -0
- package/dist/domains/test-generation/interfaces.d.ts +2 -0
- package/dist/domains/test-generation/services/test-generator.d.ts +9 -0
- package/dist/domains/test-generation/services/test-generator.js +37 -0
- package/dist/init/agents-installer.d.ts +5 -3
- package/dist/init/agents-installer.js +17 -43
- package/dist/init/find-package-root.d.ts +22 -0
- package/dist/init/find-package-root.js +46 -0
- package/dist/init/n8n-installer.d.ts +4 -2
- package/dist/init/n8n-installer.js +23 -23
- package/dist/init/opencode-installer.d.ts +0 -5
- package/dist/init/opencode-installer.js +12 -39
- package/dist/init/skills-installer.d.ts +5 -2
- package/dist/init/skills-installer.js +15 -37
- package/dist/integrations/embeddings/index/HNSWIndex.d.ts +9 -2
- package/dist/integrations/embeddings/index/HNSWIndex.js +110 -35
- package/dist/integrations/ruvector/cognitive-routing.d.ts +67 -0
- package/dist/integrations/ruvector/cognitive-routing.js +208 -0
- package/dist/integrations/ruvector/feature-flags.d.ts +84 -0
- package/dist/integrations/ruvector/feature-flags.js +59 -0
- package/dist/integrations/ruvector/hdc-fingerprint.d.ts +76 -0
- package/dist/integrations/ruvector/hdc-fingerprint.js +217 -0
- package/dist/integrations/ruvector/hyperbolic-hnsw.d.ts +59 -0
- package/dist/integrations/ruvector/hyperbolic-hnsw.js +194 -0
- package/dist/integrations/ruvector/index.d.ts +5 -2
- package/dist/integrations/ruvector/index.js +13 -2
- package/dist/integrations/ruvector/shared-rvf-adapter.d.ts +24 -0
- package/dist/integrations/ruvector/shared-rvf-adapter.js +55 -0
- package/dist/integrations/ruvector/shared-rvf-dual-writer.d.ts +6 -0
- package/dist/integrations/ruvector/shared-rvf-dual-writer.js +38 -0
- package/dist/integrations/ruvector/sona-persistence.d.ts +8 -0
- package/dist/integrations/ruvector/sona-persistence.js +10 -0
- package/dist/integrations/ruvector/vector-delta-tracker.d.ts +96 -0
- package/dist/integrations/ruvector/vector-delta-tracker.js +226 -0
- package/dist/kernel/agent-coordinator.d.ts +75 -1
- package/dist/kernel/agent-coordinator.js +250 -1
- package/dist/kernel/hnsw-legacy-bridge.d.ts +38 -0
- package/dist/kernel/hnsw-legacy-bridge.js +88 -0
- package/dist/kernel/hnsw-shadow-validator.d.ts +91 -0
- package/dist/kernel/hnsw-shadow-validator.js +139 -0
- package/dist/kernel/index.d.ts +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/kernel/interfaces.d.ts +39 -0
- package/dist/kernel/kernel.d.ts +23 -0
- package/dist/kernel/kernel.js +106 -1
- package/dist/kernel/unified-memory.d.ts +1 -1
- package/dist/kernel/unified-memory.js +7 -3
- package/dist/learning/aqe-learning-engine.d.ts +65 -0
- package/dist/learning/aqe-learning-engine.js +134 -0
- package/dist/learning/dream/dream-engine.d.ts +6 -1
- package/dist/learning/dream/dream-engine.js +37 -2
- package/dist/learning/dream/dream-scheduler.d.ts +25 -0
- package/dist/learning/dream/dream-scheduler.js +120 -0
- package/dist/learning/dream/rvcow-branch-manager.d.ts +6 -3
- package/dist/learning/dream/rvcow-branch-manager.js +60 -5
- package/dist/learning/experience-capture.d.ts +3 -3
- package/dist/learning/hyperbolic-pattern-index.d.ts +82 -0
- package/dist/learning/hyperbolic-pattern-index.js +142 -0
- package/dist/learning/index.d.ts +3 -3
- package/dist/learning/index.js +1 -1
- package/dist/learning/metrics-tracker.d.ts +44 -0
- package/dist/learning/metrics-tracker.js +37 -0
- package/dist/learning/pattern-promotion.d.ts +3 -3
- package/dist/learning/pattern-store.d.ts +45 -2
- package/dist/learning/pattern-store.js +239 -4
- package/dist/learning/qe-patterns.d.ts +1 -1
- package/dist/learning/qe-reasoning-bank.js +1 -1
- package/dist/learning/rvf-pattern-migration.d.ts +50 -0
- package/dist/learning/rvf-pattern-migration.js +106 -0
- package/dist/learning/rvf-pattern-store.d.ts +69 -0
- package/dist/learning/rvf-pattern-store.js +449 -0
- package/dist/mcp/bundle.js +1894 -1804
- package/dist/mcp/handlers/index.d.ts +1 -0
- package/dist/mcp/handlers/index.js +2 -0
- package/dist/mcp/handlers/migration-handlers.d.ts +52 -0
- package/dist/mcp/handlers/migration-handlers.js +85 -0
- package/dist/mcp/protocol-server.d.ts +1 -0
- package/dist/mcp/protocol-server.js +63 -2
- package/dist/mcp/types.d.ts +1 -1
- package/dist/optimization/early-exit-token-optimizer.d.ts +7 -7
- package/dist/optimization/early-exit-token-optimizer.js +3 -3
- package/dist/persistence/rvf-consistency-validator.d.ts +85 -0
- package/dist/persistence/rvf-consistency-validator.js +182 -0
- package/dist/persistence/rvf-migration-adapter.d.ts +125 -0
- package/dist/persistence/rvf-migration-adapter.js +303 -0
- package/dist/persistence/rvf-migration-coordinator.d.ts +115 -0
- package/dist/persistence/rvf-migration-coordinator.js +224 -0
- package/dist/persistence/rvf-stage-gate.d.ts +70 -0
- package/dist/persistence/rvf-stage-gate.js +163 -0
- package/package.json +10 -10
- package/dist/cli/chunks/adapter-WBR5NXS3.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-TK4JQCGT.js +0 -2
- package/dist/cli/chunks/base-2WXOSMBQ.js +0 -2
- package/dist/cli/chunks/better-sqlite3-7KY2RDXO.js +0 -2
- package/dist/cli/chunks/brain-handler-PPEGDCN4.js +0 -68
- package/dist/cli/chunks/browser-workflow-42F7GK5T.js +0 -2
- package/dist/cli/chunks/chunk-263XS447.js +0 -2
- package/dist/cli/chunks/chunk-2I7J3O6V.js +0 -2
- package/dist/cli/chunks/chunk-3JPRUND5.js +0 -2
- package/dist/cli/chunks/chunk-3THRQEZ2.js +0 -95
- package/dist/cli/chunks/chunk-4B6NCELM.js +0 -2
- package/dist/cli/chunks/chunk-62ADTHV7.js +0 -2
- package/dist/cli/chunks/chunk-BR26T7ZS.js +0 -180
- package/dist/cli/chunks/chunk-DRT3WKQW.js +0 -2
- package/dist/cli/chunks/chunk-FIA6X7UL.js +0 -2
- package/dist/cli/chunks/chunk-J3KWWR6Z.js +0 -1
- package/dist/cli/chunks/chunk-JZSDOIXA.js +0 -2
- package/dist/cli/chunks/chunk-MV6CMOJQ.js +0 -65
- package/dist/cli/chunks/chunk-N5UXCLFI.js +0 -2
- package/dist/cli/chunks/chunk-OF4D7MYI.js +0 -2
- package/dist/cli/chunks/chunk-QOVHWZEP.js +0 -1
- package/dist/cli/chunks/chunk-RFSN6IDA.js +0 -79
- package/dist/cli/chunks/chunk-X5IJGWYG.js +0 -2
- package/dist/cli/chunks/ci-output-7JN7F6CI.js +0 -2
- package/dist/cli/chunks/client-MCSNSH2C.js +0 -2
- package/dist/cli/chunks/complexity-analyzer-AB4OZARV.js +0 -2
- package/dist/cli/chunks/cost-tracker-4F723RB6.js +0 -2
- package/dist/cli/chunks/cross-domain-router-OWR5IJ5G.js +0 -2
- package/dist/cli/chunks/dag-attention-scheduler-JWO6XI6A.js +0 -2
- package/dist/cli/chunks/detect-L6ZZHUSX.js +0 -2
- package/dist/cli/chunks/domain-transfer-5Y4FGJAJ.js +0 -2
- package/dist/cli/chunks/dream-4TDBIYED.js +0 -2
- package/dist/cli/chunks/esm-node-2PKHKOTS.js +0 -2
- package/dist/cli/chunks/feature-flags-IVQ3AL4Q.js +0 -2
- package/dist/cli/chunks/file-discovery-QFPA6GMV.js +0 -2
- package/dist/cli/chunks/gnn-wrapper-OYC55N5E.js +0 -2
- package/dist/cli/chunks/hnsw-index-YO7CT23I.js +0 -2
- package/dist/cli/chunks/hnswlib-node-56YWVXFE.js +0 -2
- package/dist/cli/chunks/hypergraph-engine-A4Y2ZRAG.js +0 -2
- package/dist/cli/chunks/impact-analyzer-UEIGXSZ4.js +0 -2
- package/dist/cli/chunks/init-wizard-JWZUGIPJ.js +0 -2
- package/dist/cli/chunks/kernel-YNDTVKIW.js +0 -2
- package/dist/cli/chunks/knowledge-graph-NGJKFTSN.js +0 -2
- package/dist/cli/chunks/load-test-GZUBXFF3.js +0 -2
- package/dist/cli/chunks/memory-backend-3NQIZUXE.js +0 -2
- package/dist/cli/chunks/memory-handlers-MDZQ7HVW.js +0 -2
- package/dist/cli/chunks/opencode-installer-4HUB36H5.js +0 -3
- package/dist/cli/chunks/protocol-executor-SPUVRDWT.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-3HBK2FVD.js +0 -2
- package/dist/cli/chunks/queen-coordinator-RW3NKO5A.js +0 -2
- package/dist/cli/chunks/real-embeddings-GK63VF35.js +0 -2
- package/dist/cli/chunks/router-RJGHWDQ3.js +0 -2
- package/dist/cli/chunks/routing-feedback-ZXBXFKX6.js +0 -2
- package/dist/cli/chunks/ruvector-commands-2TLNHC3A.js +0 -8
- package/dist/cli/chunks/rvf-dual-writer-MQW2SJLT.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-LKFKTMUN.js +0 -2
- package/dist/cli/chunks/safe-db-G22E5ROA.js +0 -2
- package/dist/cli/chunks/schedule-Y7VVCPYV.js +0 -2
- package/dist/cli/chunks/scheduler-AUQIFQB7.js +0 -2
- package/dist/cli/chunks/shared-rvf-dual-writer-BVSCQAFS.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-JAVHUGGL.js +0 -2
- package/dist/cli/chunks/task-handlers-P5DSUKND.js +0 -2
- package/dist/cli/chunks/token-bootstrap-4VJKGVMK.js +0 -2
- package/dist/cli/chunks/transformers-GY7SIKEU.js +0 -2
- package/dist/cli/chunks/types-QJGNBKP2.js +0 -2
- package/dist/cli/chunks/unified-memory-XYGENQUT.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-MVEGQBF3.js +0 -2
- package/dist/cli/chunks/unified-persistence-PFRCWEUG.js +0 -2
- package/dist/cli/chunks/visual-security-V47BLGJM.js +0 -2
- package/dist/cli/chunks/witness-chain-BR63P4A7.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-7PZMX3JZ.js +0 -2
|
@@ -236,4 +236,43 @@ export interface LambdaTrend {
|
|
|
236
236
|
/** Is trend concerning */
|
|
237
237
|
isConcerning: boolean;
|
|
238
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* Configuration for monotonic gate threshold ratcheting (ADR-062 Action 4).
|
|
241
|
+
* Thresholds can only increase, never decrease.
|
|
242
|
+
*/
|
|
243
|
+
export interface RatchetConfig {
|
|
244
|
+
/** Whether ratcheting is enabled */
|
|
245
|
+
enabled: boolean;
|
|
246
|
+
/** Number of consecutive gate passes required before ratcheting (default: 5) */
|
|
247
|
+
consecutivePassesRequired: number;
|
|
248
|
+
/** Percentage to increase threshold on each ratchet (default: 2) */
|
|
249
|
+
ratchetIncrementPercent: number;
|
|
250
|
+
/** Maximum threshold ceiling (default: 95) */
|
|
251
|
+
maxThreshold: number;
|
|
252
|
+
/** Enforced by type system: threshold can only go up */
|
|
253
|
+
monotonic: true;
|
|
254
|
+
/** Cooldown period in milliseconds between ratchets (default: 7 days) */
|
|
255
|
+
cooldownMs: number;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Runtime state for gate ratcheting.
|
|
259
|
+
* Tracks consecutive passes, current threshold, and ratchet history.
|
|
260
|
+
*/
|
|
261
|
+
export interface RatchetState {
|
|
262
|
+
/** Current quality gate threshold */
|
|
263
|
+
currentThreshold: number;
|
|
264
|
+
/** Number of consecutive gate passes since last failure or ratchet */
|
|
265
|
+
consecutivePasses: number;
|
|
266
|
+
/** Timestamp (ms) of the last ratchet event */
|
|
267
|
+
lastRatchetTime: number;
|
|
268
|
+
/** History of all ratchet events */
|
|
269
|
+
history: Array<{
|
|
270
|
+
threshold: number;
|
|
271
|
+
ratchetedAt: number;
|
|
272
|
+
}>;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Default ratchet configuration
|
|
276
|
+
*/
|
|
277
|
+
export declare const DEFAULT_RATCHET_CONFIG: RatchetConfig;
|
|
239
278
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -59,4 +59,15 @@ export const DEFAULT_COHERENCE_GATE_POLICY = {
|
|
|
59
59
|
enableTrendAnalysis: true,
|
|
60
60
|
minTrendSamples: 3,
|
|
61
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Default ratchet configuration
|
|
64
|
+
*/
|
|
65
|
+
export const DEFAULT_RATCHET_CONFIG = {
|
|
66
|
+
enabled: false,
|
|
67
|
+
consecutivePassesRequired: 5,
|
|
68
|
+
ratchetIncrementPercent: 2,
|
|
69
|
+
maxThreshold: 95,
|
|
70
|
+
monotonic: true,
|
|
71
|
+
cooldownMs: 7 * 24 * 60 * 60 * 1000, // 7 days
|
|
72
|
+
};
|
|
62
73
|
//# sourceMappingURL=types.js.map
|
|
@@ -75,6 +75,7 @@ export declare class QualityAssessmentCoordinator extends BaseDomainCoordinator<
|
|
|
75
75
|
private claimVerifier?;
|
|
76
76
|
private readonly domain;
|
|
77
77
|
private recentDreamInsights;
|
|
78
|
+
private ratchetState;
|
|
78
79
|
constructor(eventBus: EventBus, memory: MemoryBackend, agentCoordinator: AgentCoordinator, config?: Partial<CoordinatorConfig>);
|
|
79
80
|
/**
|
|
80
81
|
* Initialize the coordinator
|
|
@@ -261,6 +262,19 @@ export declare class QualityAssessmentCoordinator extends BaseDomainCoordinator<
|
|
|
261
262
|
private handleSecurityAuditCompleted;
|
|
262
263
|
private loadWorkflowState;
|
|
263
264
|
private saveWorkflowState;
|
|
265
|
+
/**
|
|
266
|
+
* ADR-062: Load persisted ratchet state from MemoryBackend.
|
|
267
|
+
* If no saved state exists the in-memory default (threshold 70) is kept.
|
|
268
|
+
* Persistence failures are logged but never propagated — the coordinator
|
|
269
|
+
* must remain functional even when the memory backend is degraded.
|
|
270
|
+
*/
|
|
271
|
+
private loadRatchetState;
|
|
272
|
+
/**
|
|
273
|
+
* ADR-062: Persist current ratchet state to MemoryBackend.
|
|
274
|
+
* Called after checkRatchet() when the threshold actually ratcheted upward.
|
|
275
|
+
* Persistence failures are logged but never propagated.
|
|
276
|
+
*/
|
|
277
|
+
private saveRatchetState;
|
|
264
278
|
/**
|
|
265
279
|
* Initialize Actor-Critic RL for quality gate threshold tuning
|
|
266
280
|
*/
|
|
@@ -26,6 +26,9 @@ import * as ReportHelpers from './coordinator-reports.js';
|
|
|
26
26
|
import * as RLIntegration from './coordinator-rl-integration.js';
|
|
27
27
|
import * as ClaimVerifierHelpers from './coordinator-claim-verifier.js';
|
|
28
28
|
import * as GateEvalHelpers from './coordinator-gate-evaluation.js';
|
|
29
|
+
// ADR-062: Gate ratcheting
|
|
30
|
+
import { checkRatchet, } from './coherence/gate-controller.js';
|
|
31
|
+
import { DEFAULT_RATCHET_CONFIG, } from './coherence/types.js';
|
|
29
32
|
// ADR-070: Witness Chain audit trail
|
|
30
33
|
import { getWitnessChain } from '../../audit/witness-chain.js';
|
|
31
34
|
// Three-loop feature flag for instantAdapt protocol
|
|
@@ -85,6 +88,13 @@ export class QualityAssessmentCoordinator extends BaseDomainCoordinator {
|
|
|
85
88
|
domain = 'quality-assessment';
|
|
86
89
|
// Cache of recent dream insights for quality assessment enhancement
|
|
87
90
|
recentDreamInsights = [];
|
|
91
|
+
// ADR-062: Monotonic gate threshold ratcheting state
|
|
92
|
+
ratchetState = {
|
|
93
|
+
currentThreshold: 70,
|
|
94
|
+
consecutivePasses: 0,
|
|
95
|
+
lastRatchetTime: 0,
|
|
96
|
+
history: [],
|
|
97
|
+
};
|
|
88
98
|
constructor(eventBus, memory, agentCoordinator, config = {}) {
|
|
89
99
|
const fullConfig = { ...DEFAULT_CONFIG, ...config };
|
|
90
100
|
super(eventBus, 'quality-assessment', fullConfig, {
|
|
@@ -116,6 +126,9 @@ export class QualityAssessmentCoordinator extends BaseDomainCoordinator {
|
|
|
116
126
|
this.subscribeToEvents();
|
|
117
127
|
// Load any persisted workflow state
|
|
118
128
|
await this.loadWorkflowState();
|
|
129
|
+
// ADR-062: Restore persisted ratchet state so the monotonic invariant
|
|
130
|
+
// survives coordinator restarts.
|
|
131
|
+
await this.loadRatchetState();
|
|
119
132
|
// Initialize Actor-Critic RL for threshold tuning
|
|
120
133
|
if (this.config.enableRLThresholdTuning) {
|
|
121
134
|
await this.initializeActorCritic();
|
|
@@ -242,6 +255,17 @@ export class QualityAssessmentCoordinator extends BaseDomainCoordinator {
|
|
|
242
255
|
m.duplications / 100,
|
|
243
256
|
finalResult.overallScore / 100,
|
|
244
257
|
]);
|
|
258
|
+
// EWC++ outcome recording: reward scaled by gate score
|
|
259
|
+
try {
|
|
260
|
+
this.qesona.recordOutcome(finalResult.overallScore / 100);
|
|
261
|
+
if (this.qesona.shouldConsolidate()) {
|
|
262
|
+
try {
|
|
263
|
+
this.qesona.backgroundConsolidate();
|
|
264
|
+
}
|
|
265
|
+
catch { /* best-effort */ }
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
catch { /* must not break main flow */ }
|
|
245
269
|
}
|
|
246
270
|
// Store quality pattern in SONA if enabled
|
|
247
271
|
if (this.config.enableSONAPatternLearning && this.qesona) {
|
|
@@ -257,6 +281,26 @@ export class QualityAssessmentCoordinator extends BaseDomainCoordinator {
|
|
|
257
281
|
wc.append(finalResult.passed ? 'QUALITY_GATE_PASS' : 'QUALITY_GATE_FAIL', { gateName: request.gateName, passed: finalResult.passed, score: finalResult.overallScore, failedChecks: finalResult.failedChecks }, 'quality-gate');
|
|
258
282
|
}
|
|
259
283
|
catch (_wcErr) { /* non-critical */ }
|
|
284
|
+
// ADR-062: Monotonic gate threshold ratcheting
|
|
285
|
+
// After gate decision is final, check if threshold should ratchet upward
|
|
286
|
+
if (process.env.AQE_GATE_RATCHETING_ENABLED === 'true') {
|
|
287
|
+
try {
|
|
288
|
+
const prevThreshold = this.ratchetState.currentThreshold;
|
|
289
|
+
this.ratchetState = checkRatchet(finalResult.passed, DEFAULT_RATCHET_CONFIG, this.ratchetState);
|
|
290
|
+
if (this.ratchetState.currentThreshold > prevThreshold) {
|
|
291
|
+
logger.info(`Gate threshold ratcheted: ${prevThreshold} -> ${this.ratchetState.currentThreshold}`);
|
|
292
|
+
// ADR-062: Persist updated ratchet state so the monotonic invariant
|
|
293
|
+
// survives coordinator restarts.
|
|
294
|
+
await this.saveRatchetState();
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
catch (ratchetErr) {
|
|
298
|
+
// Ratcheting failure must never break gate evaluation
|
|
299
|
+
logger.warn('Gate ratcheting failed (non-critical)', {
|
|
300
|
+
error: ratchetErr instanceof Error ? ratchetErr.message : String(ratchetErr),
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
}
|
|
260
304
|
// Publish event
|
|
261
305
|
if (this.config.publishEvents) {
|
|
262
306
|
await this.publishQualityGateEvaluated(finalResult);
|
|
@@ -347,6 +391,17 @@ export class QualityAssessmentCoordinator extends BaseDomainCoordinator {
|
|
|
347
391
|
result.value.trends.length / 10,
|
|
348
392
|
result.value.recommendations.length / 10,
|
|
349
393
|
]);
|
|
394
|
+
// EWC++ outcome recording: reward scaled by analysis score
|
|
395
|
+
try {
|
|
396
|
+
this.qesona.recordOutcome(score.overall / 100);
|
|
397
|
+
if (this.qesona.shouldConsolidate()) {
|
|
398
|
+
try {
|
|
399
|
+
this.qesona.backgroundConsolidate();
|
|
400
|
+
}
|
|
401
|
+
catch { /* best-effort */ }
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
catch { /* must not break main flow */ }
|
|
350
405
|
}
|
|
351
406
|
// Store quality pattern in SONA
|
|
352
407
|
if (this.config.enableSONAPatternLearning && this.qesona) {
|
|
@@ -798,6 +853,43 @@ export class QualityAssessmentCoordinator extends BaseDomainCoordinator {
|
|
|
798
853
|
const workflows = Array.from(this.workflows.values());
|
|
799
854
|
await this.memory.set('quality-assessment:coordinator:workflows', workflows, { namespace: 'quality-assessment', persist: true });
|
|
800
855
|
}
|
|
856
|
+
/**
|
|
857
|
+
* ADR-062: Load persisted ratchet state from MemoryBackend.
|
|
858
|
+
* If no saved state exists the in-memory default (threshold 70) is kept.
|
|
859
|
+
* Persistence failures are logged but never propagated — the coordinator
|
|
860
|
+
* must remain functional even when the memory backend is degraded.
|
|
861
|
+
*/
|
|
862
|
+
async loadRatchetState() {
|
|
863
|
+
try {
|
|
864
|
+
const saved = await this.memory.get('quality-assessment:ratchet-state');
|
|
865
|
+
if (saved) {
|
|
866
|
+
this.ratchetState = saved;
|
|
867
|
+
logger.info(`Restored ratchet state (threshold=${saved.currentThreshold}, passes=${saved.consecutivePasses})`);
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
catch (loadErr) {
|
|
871
|
+
// Non-critical: default ratchet state is safe
|
|
872
|
+
logger.warn('Failed to load ratchet state (using default)', {
|
|
873
|
+
error: loadErr instanceof Error ? loadErr.message : String(loadErr),
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* ADR-062: Persist current ratchet state to MemoryBackend.
|
|
879
|
+
* Called after checkRatchet() when the threshold actually ratcheted upward.
|
|
880
|
+
* Persistence failures are logged but never propagated.
|
|
881
|
+
*/
|
|
882
|
+
async saveRatchetState() {
|
|
883
|
+
try {
|
|
884
|
+
await this.memory.set('quality-assessment:ratchet-state', this.ratchetState, { namespace: 'quality-assessment', persist: true });
|
|
885
|
+
}
|
|
886
|
+
catch (saveErr) {
|
|
887
|
+
// Non-critical: next restart will use the previous persisted value
|
|
888
|
+
logger.warn('Failed to persist ratchet state', {
|
|
889
|
+
error: saveErr instanceof Error ? saveErr.message : String(saveErr),
|
|
890
|
+
});
|
|
891
|
+
}
|
|
892
|
+
}
|
|
801
893
|
// ============================================================================
|
|
802
894
|
// Ruvector Integration Methods (ADR-040)
|
|
803
895
|
// ============================================================================
|
|
@@ -98,6 +98,7 @@ export interface ITestExecutionCoordinator extends TestExecutionAPI {
|
|
|
98
98
|
isConsensusAvailable(): boolean;
|
|
99
99
|
}
|
|
100
100
|
export declare class TestExecutionCoordinator extends BaseDomainCoordinator<TestExecutionCoordinatorConfig> implements ITestExecutionCoordinator {
|
|
101
|
+
private readonly memory;
|
|
101
102
|
private readonly executor;
|
|
102
103
|
private readonly flakyDetector;
|
|
103
104
|
private readonly retryHandler;
|
|
@@ -186,6 +187,24 @@ export declare class TestExecutionCoordinator extends BaseDomainCoordinator<Test
|
|
|
186
187
|
* Extract test name from file path
|
|
187
188
|
*/
|
|
188
189
|
private extractTestName;
|
|
190
|
+
/**
|
|
191
|
+
* ADR-062: Partition test files into normal and holdout sets.
|
|
192
|
+
*
|
|
193
|
+
* When AQE_HOLDOUT_TESTING_ENABLED is 'true', holdout test file paths are
|
|
194
|
+
* looked up from memory (stored by the test-generation domain when a test
|
|
195
|
+
* is created with `holdout: true`).
|
|
196
|
+
*
|
|
197
|
+
* - Normal runs execute only non-holdout tests.
|
|
198
|
+
* - Holdout runs (AQE_RUN_HOLDOUT_TESTS === 'true' or runHoldout flag)
|
|
199
|
+
* execute only holdout tests.
|
|
200
|
+
*
|
|
201
|
+
* If the feature flag is disabled, all tests are returned as normal tests.
|
|
202
|
+
* Failures in holdout lookup are logged and treated as "no holdout tests"
|
|
203
|
+
* so that normal execution is never blocked.
|
|
204
|
+
*
|
|
205
|
+
* @returns Object with testsToRun and holdoutCount.
|
|
206
|
+
*/
|
|
207
|
+
private partitionHoldoutTests;
|
|
189
208
|
/**
|
|
190
209
|
* Execute E2E test case
|
|
191
210
|
*/
|
|
@@ -37,6 +37,7 @@ const DEFAULT_COORDINATOR_CONFIG = {
|
|
|
37
37
|
// ============================================================================
|
|
38
38
|
const logger = LoggerFactory.create('test-execution');
|
|
39
39
|
export class TestExecutionCoordinator extends BaseDomainCoordinator {
|
|
40
|
+
memory;
|
|
40
41
|
executor;
|
|
41
42
|
flakyDetector;
|
|
42
43
|
retryHandler;
|
|
@@ -52,6 +53,7 @@ export class TestExecutionCoordinator extends BaseDomainCoordinator {
|
|
|
52
53
|
verifyFindingTypes: ['flaky-test-detection', 'test-failure-analysis', 'retry-strategy'],
|
|
53
54
|
...fullConfig.consensusConfig,
|
|
54
55
|
});
|
|
56
|
+
this.memory = memory;
|
|
55
57
|
// Create services with appropriate configuration
|
|
56
58
|
this.executor = new TestExecutorService({ memory }, {
|
|
57
59
|
simulateForTesting: fullConfig.simulateForTesting,
|
|
@@ -116,13 +118,21 @@ export class TestExecutionCoordinator extends BaseDomainCoordinator {
|
|
|
116
118
|
* Auto-detects framework and uses sensible defaults
|
|
117
119
|
*/
|
|
118
120
|
async runTests(request) {
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
+
// ADR-062: Filter holdout tests before execution
|
|
122
|
+
const { testsToRun } = await this.partitionHoldoutTests(request.testFiles);
|
|
123
|
+
if (testsToRun.length === 0) {
|
|
124
|
+
return ok({
|
|
125
|
+
runId: uuidv4(), status: 'passed', total: 0, passed: 0,
|
|
126
|
+
failed: 0, skipped: 0, duration: 0, failedTests: [],
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
const framework = this.detectFramework(testsToRun);
|
|
130
|
+
const workers = request.workers ?? Math.min(4, Math.max(1, testsToRun.length));
|
|
121
131
|
const timeout = request.timeout ?? 60000;
|
|
122
132
|
// Use parallel execution by default (unless explicitly disabled)
|
|
123
|
-
if (request.parallel !== false &&
|
|
133
|
+
if (request.parallel !== false && testsToRun.length > 1) {
|
|
124
134
|
const result = await this.executeParallel({
|
|
125
|
-
testFiles:
|
|
135
|
+
testFiles: testsToRun,
|
|
126
136
|
framework,
|
|
127
137
|
workers,
|
|
128
138
|
timeout,
|
|
@@ -141,7 +151,7 @@ export class TestExecutionCoordinator extends BaseDomainCoordinator {
|
|
|
141
151
|
}
|
|
142
152
|
// Sequential execution
|
|
143
153
|
const result = await this.execute({
|
|
144
|
-
testFiles:
|
|
154
|
+
testFiles: testsToRun,
|
|
145
155
|
framework,
|
|
146
156
|
timeout,
|
|
147
157
|
});
|
|
@@ -181,6 +191,17 @@ export class TestExecutionCoordinator extends BaseDomainCoordinator {
|
|
|
181
191
|
// ADR-057: Reset recovery attempt counter for each top-level execution
|
|
182
192
|
this.infraRecoveryAttempts = 0;
|
|
183
193
|
try {
|
|
194
|
+
// ADR-062: Filter holdout tests before execution
|
|
195
|
+
const { testsToRun } = await this.partitionHoldoutTests(request.testFiles);
|
|
196
|
+
if (testsToRun.length === 0) {
|
|
197
|
+
this.activeRuns.delete(runId);
|
|
198
|
+
return ok({
|
|
199
|
+
runId, status: 'passed', total: 0, passed: 0,
|
|
200
|
+
failed: 0, skipped: 0, duration: 0, failedTests: [],
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
// Replace testFiles with filtered set for the remainder of execution
|
|
204
|
+
request = { ...request, testFiles: testsToRun };
|
|
184
205
|
// Prioritize tests if enabled
|
|
185
206
|
let orderedTestFiles = request.testFiles;
|
|
186
207
|
let prioritizationResult = null;
|
|
@@ -273,6 +294,16 @@ export class TestExecutionCoordinator extends BaseDomainCoordinator {
|
|
|
273
294
|
// ADR-057: Reset recovery attempt counter for each top-level execution
|
|
274
295
|
this.infraRecoveryAttempts = 0;
|
|
275
296
|
try {
|
|
297
|
+
// ADR-062: Filter holdout tests before execution
|
|
298
|
+
const { testsToRun } = await this.partitionHoldoutTests(request.testFiles);
|
|
299
|
+
if (testsToRun.length === 0) {
|
|
300
|
+
this.activeRuns.delete(runId);
|
|
301
|
+
return ok({
|
|
302
|
+
runId, status: 'passed', total: 0, passed: 0,
|
|
303
|
+
failed: 0, skipped: 0, duration: 0, failedTests: [],
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
request = { ...request, testFiles: testsToRun };
|
|
276
307
|
// ADR-047: Check topology health before expensive parallel operations
|
|
277
308
|
if (this.config.enableMinCutAwareness && !this.isTopologyHealthy()) {
|
|
278
309
|
logger.warn(`Topology degraded, reducing parallel workers`);
|
|
@@ -677,6 +708,72 @@ export class TestExecutionCoordinator extends BaseDomainCoordinator {
|
|
|
677
708
|
return parts[parts.length - 1] || filePath;
|
|
678
709
|
}
|
|
679
710
|
// ============================================================================
|
|
711
|
+
// ADR-062: Holdout Test Filtering
|
|
712
|
+
// ============================================================================
|
|
713
|
+
/**
|
|
714
|
+
* ADR-062: Partition test files into normal and holdout sets.
|
|
715
|
+
*
|
|
716
|
+
* When AQE_HOLDOUT_TESTING_ENABLED is 'true', holdout test file paths are
|
|
717
|
+
* looked up from memory (stored by the test-generation domain when a test
|
|
718
|
+
* is created with `holdout: true`).
|
|
719
|
+
*
|
|
720
|
+
* - Normal runs execute only non-holdout tests.
|
|
721
|
+
* - Holdout runs (AQE_RUN_HOLDOUT_TESTS === 'true' or runHoldout flag)
|
|
722
|
+
* execute only holdout tests.
|
|
723
|
+
*
|
|
724
|
+
* If the feature flag is disabled, all tests are returned as normal tests.
|
|
725
|
+
* Failures in holdout lookup are logged and treated as "no holdout tests"
|
|
726
|
+
* so that normal execution is never blocked.
|
|
727
|
+
*
|
|
728
|
+
* @returns Object with testsToRun and holdoutCount.
|
|
729
|
+
*/
|
|
730
|
+
async partitionHoldoutTests(testFiles, runHoldout) {
|
|
731
|
+
const holdoutEnabled = process.env.AQE_HOLDOUT_TESTING_ENABLED === 'true';
|
|
732
|
+
if (!holdoutEnabled) {
|
|
733
|
+
return { testsToRun: testFiles, holdoutCount: 0 };
|
|
734
|
+
}
|
|
735
|
+
try {
|
|
736
|
+
// Retrieve the set of holdout test file paths stored by test-generation
|
|
737
|
+
const holdoutSet = await this.memory.get('test-generation:holdout-test-files');
|
|
738
|
+
if (!holdoutSet || holdoutSet.length === 0) {
|
|
739
|
+
return { testsToRun: testFiles, holdoutCount: 0 };
|
|
740
|
+
}
|
|
741
|
+
const holdoutPaths = new Set(holdoutSet);
|
|
742
|
+
const normalTests = [];
|
|
743
|
+
const holdoutTests = [];
|
|
744
|
+
for (const file of testFiles) {
|
|
745
|
+
if (holdoutPaths.has(file)) {
|
|
746
|
+
holdoutTests.push(file);
|
|
747
|
+
}
|
|
748
|
+
else {
|
|
749
|
+
normalTests.push(file);
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
// Determine if this is a holdout-only run
|
|
753
|
+
const isHoldoutRun = runHoldout === true ||
|
|
754
|
+
process.env.AQE_RUN_HOLDOUT_TESTS === 'true';
|
|
755
|
+
if (isHoldoutRun) {
|
|
756
|
+
logger.info(`Holdout run: executing ${holdoutTests.length} holdout tests, skipping ${normalTests.length} normal tests`);
|
|
757
|
+
// Store metadata about the holdout run
|
|
758
|
+
await this.memory.set(`test-execution:holdout-run:${Date.now()}`, { holdoutCount: holdoutTests.length, holdoutFiles: holdoutTests }, { namespace: 'test-execution', ttl: 86400 });
|
|
759
|
+
return { testsToRun: holdoutTests, holdoutCount: holdoutTests.length };
|
|
760
|
+
}
|
|
761
|
+
if (holdoutTests.length > 0) {
|
|
762
|
+
logger.info(`Normal run: filtered out ${holdoutTests.length} holdout test(s), running ${normalTests.length} normal tests`);
|
|
763
|
+
// Store metadata for visibility
|
|
764
|
+
await this.memory.set(`test-execution:holdout-filtered:${Date.now()}`, { holdoutCount: holdoutTests.length, holdoutFiles: holdoutTests }, { namespace: 'test-execution', ttl: 86400 });
|
|
765
|
+
}
|
|
766
|
+
return { testsToRun: normalTests, holdoutCount: holdoutTests.length };
|
|
767
|
+
}
|
|
768
|
+
catch (partitionErr) {
|
|
769
|
+
// Non-critical: if holdout lookup fails, run all tests
|
|
770
|
+
logger.warn('Holdout test partitioning failed (running all tests)', {
|
|
771
|
+
error: partitionErr instanceof Error ? partitionErr.message : String(partitionErr),
|
|
772
|
+
});
|
|
773
|
+
return { testsToRun: testFiles, holdoutCount: 0 };
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
// ============================================================================
|
|
680
777
|
// E2E Test Execution Methods
|
|
681
778
|
// ============================================================================
|
|
682
779
|
/**
|
|
@@ -320,6 +320,17 @@ export class TestGenerationCoordinator extends BaseDomainCoordinator {
|
|
|
320
320
|
(request.coverageTarget ?? 80) / 100,
|
|
321
321
|
tests.tests.filter(t => t.type === 'unit').length / 20,
|
|
322
322
|
]);
|
|
323
|
+
// EWC++ outcome recording: close the feedback loop
|
|
324
|
+
try {
|
|
325
|
+
this.qesona.recordOutcome(1.0);
|
|
326
|
+
if (this.qesona.shouldConsolidate()) {
|
|
327
|
+
try {
|
|
328
|
+
this.qesona.backgroundConsolidate();
|
|
329
|
+
}
|
|
330
|
+
catch { /* best-effort */ }
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
catch { /* must not break main flow */ }
|
|
323
334
|
}
|
|
324
335
|
// Learn from successful generation using QESONA
|
|
325
336
|
if (this.config.enableQESONA && this.qesona) {
|
|
@@ -48,6 +48,8 @@ export interface IGeneratedTest {
|
|
|
48
48
|
llmEnhanced?: boolean;
|
|
49
49
|
/** Test quality gate validation result (loki-mode Gates 8 & 9) */
|
|
50
50
|
qualityGateResult?: TestQualityGateResult;
|
|
51
|
+
/** ADR-062: Whether this test is a holdout test (not shown to developer, runs in CI only) */
|
|
52
|
+
holdout?: boolean;
|
|
51
53
|
}
|
|
52
54
|
export interface ITDDRequest {
|
|
53
55
|
feature: string;
|
|
@@ -15,6 +15,15 @@ import { type ITDDGeneratorService } from './tdd-generator';
|
|
|
15
15
|
import { type IPropertyTestGeneratorService } from './property-test-generator';
|
|
16
16
|
import { type ITestDataGeneratorService } from './test-data-generator';
|
|
17
17
|
import type { HybridRouter } from '../../../shared/llm';
|
|
18
|
+
/**
|
|
19
|
+
* Deterministically decide whether a test ID should be a holdout test.
|
|
20
|
+
* Uses FNV-1a hash of the testId to select ~10% of tests as holdout.
|
|
21
|
+
*
|
|
22
|
+
* @param testId - Unique identifier for the test
|
|
23
|
+
* @param seed - Optional seed for the hash (default: 0)
|
|
24
|
+
* @returns true if this test should be flagged as holdout
|
|
25
|
+
*/
|
|
26
|
+
export declare function isHoldoutTest(testId: string, seed?: number): boolean;
|
|
18
27
|
/**
|
|
19
28
|
* Interface for the test generation service
|
|
20
29
|
*/
|
|
@@ -27,6 +27,35 @@ import { resolveRequest } from '../../../shared/language-detector.js';
|
|
|
27
27
|
import { compilationValidator } from './compilation-validator.js';
|
|
28
28
|
import { resolveTestFilePath } from './test-file-resolver.js';
|
|
29
29
|
import { getPromptConfig } from '../prompts/language-prompts.js';
|
|
30
|
+
// ============================================================================
|
|
31
|
+
// ADR-062 Tier 2: Holdout Test Selection
|
|
32
|
+
// ============================================================================
|
|
33
|
+
/**
|
|
34
|
+
* FNV-1a hash of a string, returning a 32-bit unsigned integer.
|
|
35
|
+
* Deterministic: same input always produces the same output.
|
|
36
|
+
*/
|
|
37
|
+
function fnv1aHashU32(input, seed = 0) {
|
|
38
|
+
let hash = (0x811c9dc5 ^ seed) >>> 0; // FNV offset basis, XOR with seed
|
|
39
|
+
for (let i = 0; i < input.length; i++) {
|
|
40
|
+
hash ^= input.charCodeAt(i);
|
|
41
|
+
hash = Math.imul(hash, 0x01000193); // FNV prime
|
|
42
|
+
hash = hash >>> 0; // Force unsigned 32-bit
|
|
43
|
+
}
|
|
44
|
+
return hash;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Deterministically decide whether a test ID should be a holdout test.
|
|
48
|
+
* Uses FNV-1a hash of the testId to select ~10% of tests as holdout.
|
|
49
|
+
*
|
|
50
|
+
* @param testId - Unique identifier for the test
|
|
51
|
+
* @param seed - Optional seed for the hash (default: 0)
|
|
52
|
+
* @returns true if this test should be flagged as holdout
|
|
53
|
+
*/
|
|
54
|
+
export function isHoldoutTest(testId, seed = 0) {
|
|
55
|
+
const hash = fnv1aHashU32(testId, seed);
|
|
56
|
+
// Select bottom 10% of the hash space (0 to 0xFFFFFFFF)
|
|
57
|
+
return (hash % 100) < 10;
|
|
58
|
+
}
|
|
30
59
|
const DEFAULT_CONFIG = {
|
|
31
60
|
defaultFramework: 'vitest',
|
|
32
61
|
maxTestsPerFile: 50,
|
|
@@ -280,6 +309,14 @@ Return a JSON array of test suggestions, each with: { "name": "test name", "desc
|
|
|
280
309
|
patternsUsed.push(...fileTests.value.patternsUsed);
|
|
281
310
|
}
|
|
282
311
|
}
|
|
312
|
+
// ADR-062 Tier 2: Mark holdout tests when feature flag is enabled
|
|
313
|
+
if (process.env.AQE_HOLDOUT_TESTING_ENABLED === 'true') {
|
|
314
|
+
for (const test of tests) {
|
|
315
|
+
if (isHoldoutTest(test.id)) {
|
|
316
|
+
test.holdout = true;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
283
320
|
const coverageEstimate = this.estimateCoverage(tests, coverageTarget);
|
|
284
321
|
await this.storeGenerationMetadata(tests, patternsUsed);
|
|
285
322
|
return ok({
|
|
@@ -44,9 +44,11 @@ export declare class AgentsInstaller {
|
|
|
44
44
|
private sourceAgentsDir;
|
|
45
45
|
constructor(options: AgentsInstallerOptions);
|
|
46
46
|
/**
|
|
47
|
-
* Find the source agents directory
|
|
48
|
-
*
|
|
49
|
-
*
|
|
47
|
+
* Find the source agents directory.
|
|
48
|
+
*
|
|
49
|
+
* Uses findPackageRoot() to reliably locate the package root regardless
|
|
50
|
+
* of esbuild bundle depth (dist/init/, dist/cli/, dist/cli/chunks/, etc.).
|
|
51
|
+
* Prioritises assets/agents/v3/ (canonical npm source with helpers/) over .claude/agents/v3/.
|
|
50
52
|
*/
|
|
51
53
|
private findSourceAgentsDir;
|
|
52
54
|
/**
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* Agents are copied from .claude/agents/v3/ to the project's .claude/agents/v3/.
|
|
7
7
|
*/
|
|
8
8
|
import { existsSync, mkdirSync, readdirSync, statSync, readFileSync, writeFileSync, copyFileSync } from 'fs';
|
|
9
|
-
import { join
|
|
10
|
-
import { fileURLToPath } from 'url';
|
|
9
|
+
import { join } from 'path';
|
|
11
10
|
import { toErrorMessage } from '../shared/error-utils.js';
|
|
12
11
|
import { loadOverlays, applyOverlayToContent } from '../agents/overlay-loader.js';
|
|
13
12
|
import { validateFleetMcpDeps } from '../validation/steps/agent-mcp-validator.js';
|
|
13
|
+
import { findPackageRoot } from './find-package-root.js';
|
|
14
14
|
// ============================================================================
|
|
15
15
|
// Helpers
|
|
16
16
|
// ============================================================================
|
|
@@ -147,47 +147,22 @@ export class AgentsInstaller {
|
|
|
147
147
|
this.sourceAgentsDir = this.findSourceAgentsDir();
|
|
148
148
|
}
|
|
149
149
|
/**
|
|
150
|
-
* Find the source agents directory
|
|
151
|
-
*
|
|
152
|
-
*
|
|
150
|
+
* Find the source agents directory.
|
|
151
|
+
*
|
|
152
|
+
* Uses findPackageRoot() to reliably locate the package root regardless
|
|
153
|
+
* of esbuild bundle depth (dist/init/, dist/cli/, dist/cli/chunks/, etc.).
|
|
154
|
+
* Prioritises assets/agents/v3/ (canonical npm source with helpers/) over .claude/agents/v3/.
|
|
153
155
|
*/
|
|
154
156
|
findSourceAgentsDir() {
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
// This is the canonical source with helpers/ directory
|
|
162
|
-
join(moduleDir, '../../assets/agents/v3'),
|
|
163
|
-
// Development: src/init/ or dist/init/ -> project root .claude/agents/v3
|
|
164
|
-
join(moduleDir, '../../.claude/agents/v3'),
|
|
165
|
-
// Local install: in node_modules
|
|
166
|
-
join(this.projectRoot, 'node_modules/agentic-qe/assets/agents/v3'),
|
|
167
|
-
join(this.projectRoot, 'node_modules/agentic-qe/assets/agents/v3'),
|
|
168
|
-
];
|
|
169
|
-
// For global npm installs, add common global node_modules paths
|
|
170
|
-
// Note: We use platform-based heuristics instead of npm prefix lookup
|
|
171
|
-
// to avoid dynamic require issues in ESM bundles
|
|
172
|
-
const homeDir = process.env.HOME || process.env.USERPROFILE || '';
|
|
173
|
-
const isWindows = process.platform === 'win32';
|
|
174
|
-
if (isWindows) {
|
|
175
|
-
// Windows: npm global is typically in AppData
|
|
176
|
-
const appData = process.env.APPDATA || join(homeDir, 'AppData', 'Roaming');
|
|
177
|
-
possiblePaths.push(join(appData, 'npm/node_modules/agentic-qe/assets/agents/v3'), join(appData, 'npm/node_modules/agentic-qe/.claude/agents/v3'));
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
// Unix/Linux/macOS: common global prefixes
|
|
181
|
-
const globalPrefixes = [
|
|
182
|
-
'/usr/local',
|
|
183
|
-
'/usr',
|
|
184
|
-
join(homeDir, '.npm-global'),
|
|
185
|
-
join(homeDir, '.nvm/versions/node', process.version),
|
|
186
|
-
];
|
|
187
|
-
for (const prefix of globalPrefixes) {
|
|
188
|
-
possiblePaths.push(join(prefix, 'lib/node_modules/agentic-qe/assets/agents/v3'), join(prefix, 'lib/node_modules/agentic-qe/.claude/agents/v3'), join(prefix, 'node_modules/agentic-qe/assets/agents/v3'), join(prefix, 'node_modules/agentic-qe/.claude/agents/v3'));
|
|
189
|
-
}
|
|
157
|
+
const pkgRoot = findPackageRoot(import.meta.url);
|
|
158
|
+
const possiblePaths = [];
|
|
159
|
+
if (pkgRoot) {
|
|
160
|
+
// Canonical npm source — assets/ contains helpers/ directory
|
|
161
|
+
possiblePaths.push(join(pkgRoot, 'assets/agents/v3'));
|
|
162
|
+
possiblePaths.push(join(pkgRoot, '.claude/agents/v3'));
|
|
190
163
|
}
|
|
164
|
+
// Local install: in node_modules
|
|
165
|
+
possiblePaths.push(join(this.projectRoot, 'node_modules/agentic-qe/assets/agents/v3'));
|
|
191
166
|
for (const agentsPath of possiblePaths) {
|
|
192
167
|
if (existsSync(agentsPath)) {
|
|
193
168
|
return agentsPath;
|
|
@@ -209,10 +184,9 @@ export class AgentsInstaller {
|
|
|
209
184
|
const exampleDest = join(overridesDir, '_example.yaml');
|
|
210
185
|
if (!existsSync(exampleDest)) {
|
|
211
186
|
try {
|
|
212
|
-
const
|
|
187
|
+
const pkgRoot = findPackageRoot(import.meta.url);
|
|
213
188
|
const templateSources = [
|
|
214
|
-
|
|
215
|
-
join(moduleDir, '..', 'assets', 'templates', 'agent-override-example.yaml'),
|
|
189
|
+
...(pkgRoot ? [join(pkgRoot, 'assets', 'templates', 'agent-override-example.yaml')] : []),
|
|
216
190
|
join(this.projectRoot, 'node_modules', 'agentic-qe', 'assets', 'templates', 'agent-override-example.yaml'),
|
|
217
191
|
];
|
|
218
192
|
for (const src of templateSources) {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utility: find the agentic-qe package root directory.
|
|
3
|
+
*
|
|
4
|
+
* When esbuild bundles the CLI with code-splitting, `import.meta.url`
|
|
5
|
+
* resolves to `dist/cli/chunks/chunk-XXX.js` (3+ levels deep) instead
|
|
6
|
+
* of the expected `dist/init/skills-installer.js` (2 levels deep).
|
|
7
|
+
* Fixed `../../` traversals land at `dist/` instead of the package root,
|
|
8
|
+
* so skills/agents/helpers can't be found.
|
|
9
|
+
*
|
|
10
|
+
* This module walks up from the caller's directory until it finds a
|
|
11
|
+
* `package.json` with `name === "agentic-qe"`, which works regardless
|
|
12
|
+
* of how deep the bundle puts the calling file.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Find the agentic-qe package root by walking up from `import.meta.url`.
|
|
16
|
+
*
|
|
17
|
+
* @param callerMetaUrl – pass `import.meta.url` from the calling module
|
|
18
|
+
* @param maxDepth – how many parent directories to check (default 10)
|
|
19
|
+
* @returns absolute path to the package root, or null if not found
|
|
20
|
+
*/
|
|
21
|
+
export declare function findPackageRoot(callerMetaUrl: string, maxDepth?: number): string | null;
|
|
22
|
+
//# sourceMappingURL=find-package-root.d.ts.map
|