agentic-qe 3.8.14 → 3.9.1
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 +60 -0
- package/dist/adapters/a2ui/integration/agui-sync.js +2 -1
- package/dist/audit/witness-chain.d.ts +1 -1
- package/dist/boot/fast-paths.d.ts +24 -0
- package/dist/boot/fast-paths.js +43 -0
- package/dist/boot/parallel-prefetch.d.ts +26 -0
- package/dist/boot/parallel-prefetch.js +36 -0
- package/dist/cli/bundle.js +12 -9431
- package/dist/cli/chunks/adapter-NTM4ZH3P.js +2 -0
- package/dist/cli/chunks/agent-booster-wasm-UH2J6BNA.js +2 -0
- package/dist/cli/chunks/agent-handler-ZCBWQE3X.js +33 -0
- package/dist/cli/chunks/agent-memory-branch-2BAVI7UW.js +2 -0
- package/dist/cli/chunks/aqe-learning-engine-RVX6MPYK.js +2 -0
- package/dist/cli/chunks/audit-G5UIJBSQ.js +3 -0
- package/dist/cli/chunks/base-7HKNQ6UP.js +2 -0
- package/dist/cli/chunks/better-sqlite3-YHIAPPVT.js +2 -0
- package/dist/cli/chunks/brain-handler-5EE3J5PR.js +68 -0
- package/dist/cli/chunks/branch-enumerator-OV54PID5.js +7 -0
- package/dist/cli/chunks/browser-7RZGKOEO.js +4 -0
- package/dist/cli/chunks/browser-workflow-UOFSQK7X.js +2 -0
- package/dist/cli/chunks/chunk-24E47G3D.js +604 -0
- package/dist/cli/chunks/chunk-35H73OPP.js +2 -0
- package/dist/cli/chunks/chunk-36X2O3BL.js +3 -0
- package/dist/cli/chunks/chunk-3JESHZQM.js +2 -0
- package/dist/cli/chunks/chunk-3VAKR43Z.js +2 -0
- package/dist/cli/chunks/chunk-3WQNW6CH.js +2 -0
- package/dist/cli/chunks/chunk-43M6Y6VF.js +15 -0
- package/dist/cli/chunks/chunk-4BHOAQJH.js +2 -0
- package/dist/cli/chunks/chunk-4LWXZCSD.js +146 -0
- package/dist/cli/chunks/chunk-4TNXEANY.js +2 -0
- package/dist/cli/chunks/chunk-4XBY5JDT.js +4 -0
- package/dist/cli/chunks/chunk-4XREPCBZ.js +2 -0
- package/dist/cli/chunks/chunk-5GPTM2RV.js +2 -0
- package/dist/cli/chunks/chunk-5KBQQP3X.js +7 -0
- package/dist/cli/chunks/chunk-5LDBKZ6P.js +2 -0
- package/dist/cli/chunks/chunk-6BSJNG2S.js +2 -0
- package/dist/cli/chunks/chunk-6YC24TPL.js +27 -0
- package/dist/cli/chunks/chunk-7ATLJCSG.js +2 -0
- package/dist/cli/chunks/chunk-7JQTHPCD.js +2 -0
- package/dist/cli/chunks/chunk-7YUOUVN7.js +2 -0
- package/dist/cli/chunks/chunk-7ZNINH6J.js +59 -0
- package/dist/cli/chunks/chunk-A57BEPL7.js +3 -0
- package/dist/cli/chunks/chunk-AFPMCMVX.js +45 -0
- package/dist/cli/chunks/chunk-AREIP4FX.js +3 -0
- package/dist/cli/chunks/chunk-B2I7BJLL.js +3 -0
- package/dist/cli/chunks/chunk-BEHP3DEF.js +66 -0
- package/dist/cli/chunks/chunk-C24ZDUCM.js +30 -0
- package/dist/cli/chunks/chunk-D4PSFWND.js +2 -0
- package/dist/cli/chunks/chunk-D55PSO5D.js +81 -0
- package/dist/cli/chunks/chunk-DC3HPOOJ.js +2 -0
- package/dist/cli/chunks/chunk-DMGLX76J.js +180 -0
- package/dist/cli/chunks/chunk-E33KQBMW.js +2 -0
- package/dist/cli/chunks/chunk-EQFZQPFN.js +2 -0
- package/dist/cli/chunks/chunk-FPRL6UDF.js +2 -0
- package/dist/cli/chunks/chunk-FRNB4CH2.js +2 -0
- package/dist/cli/chunks/chunk-FWDKVTK4.js +2 -0
- package/dist/cli/chunks/chunk-GFNUESMU.js +2 -0
- package/dist/cli/chunks/chunk-GJW6V35N.js +2 -0
- package/dist/cli/chunks/chunk-GLIFZWV2.js +2 -0
- package/dist/cli/chunks/chunk-GNUUBTSX.js +14 -0
- package/dist/cli/chunks/chunk-HAUXLXKZ.js +2 -0
- package/dist/cli/chunks/chunk-HTXSUTWL.js +9 -0
- package/dist/cli/chunks/chunk-I5WZ2NM2.js +95 -0
- package/dist/cli/chunks/chunk-I7TA453K.js +2 -0
- package/dist/cli/chunks/chunk-IF6GW6IY.js +27 -0
- package/dist/cli/chunks/chunk-IHWSNYL2.js +5 -0
- package/dist/cli/chunks/chunk-IJKYJGJL.js +2 -0
- package/dist/cli/chunks/chunk-IQPXANCE.js +14 -0
- package/dist/cli/chunks/chunk-JCEY7RLP.js +2 -0
- package/dist/cli/chunks/chunk-JSOBRKMA.js +2 -0
- package/dist/cli/chunks/chunk-KIGRLIU4.js +2 -0
- package/dist/cli/chunks/chunk-L4H54Z27.js +21 -0
- package/dist/cli/chunks/chunk-LCOEBFAB.js +2 -0
- package/dist/cli/chunks/chunk-MZ54VM6A.js +2 -0
- package/dist/cli/chunks/chunk-NB47YT6A.js +167 -0
- package/dist/cli/chunks/chunk-NG3BKE7V.js +2 -0
- package/dist/cli/chunks/chunk-NG4TE3OW.js +2 -0
- package/dist/cli/chunks/chunk-O636JKJR.js +18 -0
- package/dist/cli/chunks/chunk-O6QQ4HLS.js +2 -0
- package/dist/cli/chunks/chunk-OFNIQCGX.js +2 -0
- package/dist/cli/chunks/chunk-OTSJU5LH.js +2 -0
- package/dist/cli/chunks/chunk-POLFT2PQ.js +15 -0
- package/dist/cli/chunks/chunk-QAYTL6KC.js +2 -0
- package/dist/cli/chunks/chunk-QMFP5OKH.js +2 -0
- package/dist/cli/chunks/chunk-RAJO7VML.js +2 -0
- package/dist/cli/chunks/chunk-RKIGOARX.js +2 -0
- package/dist/cli/chunks/chunk-RU6Q5HOC.js +3 -0
- package/dist/cli/chunks/chunk-RV6SGDET.js +2 -0
- package/dist/cli/chunks/chunk-RWXI7XAR.js +2 -0
- package/dist/cli/chunks/chunk-RXVYOXDB.js +2 -0
- package/dist/cli/chunks/chunk-SGRN6JFB.js +2 -0
- package/dist/cli/chunks/chunk-SVNX4UWR.js +3029 -0
- package/dist/cli/chunks/chunk-TL7ABIMP.js +2 -0
- package/dist/cli/chunks/chunk-TOLYWONQ.js +2 -0
- package/dist/cli/chunks/chunk-TPXYS3WG.js +3 -0
- package/dist/cli/chunks/chunk-U5JQGRHZ.js +2 -0
- package/dist/cli/chunks/chunk-UB7RGVKO.js +2 -0
- package/dist/cli/chunks/chunk-UBKK7KCR.js +70 -0
- package/dist/cli/chunks/chunk-UMGWGX7C.js +2 -0
- package/dist/cli/chunks/chunk-UN4PA4M2.js +2 -0
- package/dist/cli/chunks/chunk-US7INRP2.js +314 -0
- package/dist/cli/chunks/chunk-UWDBFPHQ.js +750 -0
- package/dist/cli/chunks/chunk-UZZCWWIG.js +2 -0
- package/dist/cli/chunks/chunk-V4HM4QAO.js +24 -0
- package/dist/cli/chunks/chunk-V4U3CTS2.js +180 -0
- package/dist/cli/chunks/chunk-VCCMCFDU.js +2 -0
- package/dist/cli/chunks/chunk-VEWIT6VN.js +4 -0
- package/dist/cli/chunks/chunk-VNYGVG4Y.js +2 -0
- package/dist/cli/chunks/chunk-VO3OVD5D.js +4 -0
- package/dist/cli/chunks/chunk-VY74OMGQ.js +6 -0
- package/dist/cli/chunks/chunk-WDJBGXC2.js +2 -0
- package/dist/cli/chunks/chunk-WDV6TN7E.js +65 -0
- package/dist/cli/chunks/chunk-WLXEDOG4.js +2 -0
- package/dist/cli/chunks/chunk-WXXAAXNS.js +12 -0
- package/dist/cli/chunks/chunk-X4MZYBOU.js +256 -0
- package/dist/cli/chunks/chunk-XE2YAYU5.js +12 -0
- package/dist/cli/chunks/chunk-XP6XKBNW.js +2 -0
- package/dist/cli/chunks/chunk-XPB6ZVQY.js +2 -0
- package/dist/cli/chunks/chunk-XRVUSKQV.js +1 -0
- package/dist/cli/chunks/chunk-XSITQBYB.js +20 -0
- package/dist/cli/chunks/chunk-XTLA4F5Z.js +91 -0
- package/dist/cli/chunks/chunk-XU6L2VJY.js +2 -0
- package/dist/cli/chunks/chunk-XUFHYPZK.js +2 -0
- package/dist/cli/chunks/chunk-Y2ZEDXTV.js +16 -0
- package/dist/cli/chunks/chunk-YQWB4QUP.js +316 -0
- package/dist/cli/chunks/chunk-YUQIXT3G.js +79 -0
- package/dist/cli/chunks/chunk-YYYB2JN5.js +2 -0
- package/dist/cli/chunks/chunk-ZEUVPLGX.js +2 -0
- package/dist/cli/chunks/chunk-ZSRQHJEW.js +3 -0
- package/dist/cli/chunks/ci-N4NTYAAI.js +81 -0
- package/dist/cli/chunks/ci-output-XYR2PSYH.js +2 -0
- package/dist/cli/chunks/claude-flow-setup-FX7PRBJV.js +2 -0
- package/dist/cli/chunks/client-CRRENRK4.js +2 -0
- package/dist/cli/chunks/cline-installer-GTHQOK7U.js +4 -0
- package/dist/cli/chunks/code-4G6ZHVNI.js +38 -0
- package/dist/cli/chunks/code-index-extractor-MKJTP5AK.js +3 -0
- package/dist/cli/chunks/codex-installer-UGS773DT.js +8 -0
- package/dist/cli/chunks/completions-B3BXNXAU.js +1364 -0
- package/dist/cli/chunks/complexity-analyzer-PMN77CUP.js +2 -0
- package/dist/cli/chunks/continuedev-installer-3DYKSIP3.js +14 -0
- package/dist/cli/chunks/copilot-installer-IUC5HDHD.js +3 -0
- package/dist/cli/chunks/cost-tracker-GSGQ7O5T.js +2 -0
- package/dist/cli/chunks/coverage-PO72QC3P.js +27 -0
- package/dist/cli/chunks/cross-domain-router-FSCGJG3B.js +2 -0
- package/dist/cli/chunks/cursor-installer-FK53S3ZL.js +3 -0
- package/dist/cli/chunks/daemon-4UIQTQ73.js +19 -0
- package/dist/cli/chunks/dag-attention-scheduler-ZGIMLECE.js +2 -0
- package/dist/cli/chunks/detect-XXHLTLL7.js +2 -0
- package/dist/cli/chunks/domain-handler-PPGFP7P4.js +25 -0
- package/dist/cli/chunks/domain-transfer-Q5UAE65W.js +2 -0
- package/dist/cli/chunks/dream-PONKQULG.js +2 -0
- package/dist/cli/chunks/esm-node-XLWDJRBX.js +2 -0
- package/dist/cli/chunks/eval-JVJKHSTQ.js +15 -0
- package/dist/cli/chunks/fast-paths-3KX4ZV66.js +2 -0
- package/dist/cli/chunks/feature-flags-2NOVE7DL.js +2 -0
- package/dist/cli/chunks/feature-flags-GKHHG2I2.js +2 -0
- package/dist/cli/chunks/file-discovery-XFSGQNM3.js +2 -0
- package/dist/cli/chunks/fleet-FOIDAXLR.js +43 -0
- package/dist/cli/chunks/gnn-wrapper-HPCQREKP.js +2 -0
- package/dist/cli/chunks/heartbeat-handler-HTR3EFFV.js +48 -0
- package/dist/cli/chunks/heartbeat-scheduler-NZQWN7CH.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-BNA5WUAB.js +2 -0
- package/dist/cli/chunks/hnsw-index-RQIIAE7S.js +2 -0
- package/dist/cli/chunks/hnsw-legacy-bridge-H6OA3AA3.js +2 -0
- package/dist/cli/chunks/hnswlib-node-FF27BDMD.js +2 -0
- package/dist/cli/chunks/hooks-63NZQ7NH.js +101 -0
- package/dist/cli/chunks/hypergraph-engine-XMSLA4XH.js +2 -0
- package/dist/cli/chunks/hypergraph-handler-ID6J6GS2.js +35 -0
- package/dist/cli/chunks/impact-analyzer-FS2UNVP4.js +2 -0
- package/dist/cli/chunks/init-handler-CIKZGGAY.js +68 -0
- package/dist/cli/chunks/init-wizard-TUU5PPY6.js +2 -0
- package/dist/cli/chunks/kernel-XFG42WAG.js +2 -0
- package/dist/cli/chunks/kilocode-installer-N7NLISYY.js +4 -0
- package/dist/cli/chunks/kiro-installer-U6XIPAT3.js +74 -0
- package/dist/cli/chunks/knowledge-graph-XV7FPU2T.js +2 -0
- package/dist/cli/chunks/learning-NKOF7KDJ.js +107 -0
- package/dist/cli/chunks/llm-router-34WHT3PH.js +30 -0
- package/dist/cli/chunks/load-ZW4Z3YLT.js +2 -0
- package/dist/cli/chunks/load-test-F4L7RTXJ.js +2 -0
- package/dist/cli/chunks/mcp-6R7SVGKO.js +2 -0
- package/dist/cli/chunks/memory-OUYCBU4M.js +32 -0
- package/dist/cli/chunks/memory-backend-DTJD2DWF.js +2 -0
- package/dist/cli/chunks/memory-handlers-WNXKZRNM.js +2 -0
- package/dist/cli/chunks/opencode-installer-FR75GHFU.js +3 -0
- package/dist/cli/chunks/orchestrator-AK7ZMVNH.js +371 -0
- package/dist/cli/chunks/pipeline-CFOPG7EM.js +19 -0
- package/dist/cli/chunks/platform-NY3ULBR7.js +2 -0
- package/dist/cli/chunks/plugin-LRANQYUR.js +27 -0
- package/dist/cli/chunks/prime-radiant-advanced-wasm-6KEIU55P.js +2 -0
- package/dist/cli/chunks/protocol-executor-6W4PS2D4.js +2 -0
- package/dist/cli/chunks/protocol-handler-ESSZGJ7R.js +20 -0
- package/dist/cli/chunks/prove-EF2PPY65.js +3 -0
- package/dist/cli/chunks/qe-reasoning-bank-7G3TZLEA.js +2 -0
- package/dist/cli/chunks/quality-AYBXB635.js +7 -0
- package/dist/cli/chunks/queen-coordinator-NFPKGMQN.js +2 -0
- package/dist/cli/chunks/real-embeddings-QPBXE7MA.js +2 -0
- package/dist/cli/chunks/roocode-installer-UF6MMBH6.js +4 -0
- package/dist/cli/chunks/router-F4B7Q66G.js +2 -0
- package/dist/cli/chunks/routing-feedback-5CIDDW7P.js +2 -0
- package/dist/cli/chunks/routing-handler-5TVKFU7V.js +20 -0
- package/dist/cli/chunks/ruvector-commands-E33VXFIA.js +8 -0
- package/dist/cli/chunks/rvf-dual-writer-O3AZKD24.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-IKEUZ2HX.js +2 -0
- package/dist/cli/chunks/rvf-migration-coordinator-M4H7W4RN.js +2 -0
- package/dist/cli/chunks/rvf-native-adapter-UX3WAPIP.js +2 -0
- package/dist/cli/chunks/safe-db-QBBNXEVK.js +2 -0
- package/dist/cli/chunks/schedule-GFT4NN6Z.js +2 -0
- package/dist/cli/chunks/scheduler-CQ56T7DB.js +2 -0
- package/dist/cli/chunks/security-ZLWT7IU3.js +14 -0
- package/dist/cli/chunks/shared-rvf-adapter-EXACQ2PT.js +2 -0
- package/dist/cli/chunks/shared-rvf-dual-writer-G43LQDIV.js +2 -0
- package/dist/cli/chunks/sqlite-persistence-JHSUZPAW.js +2 -0
- package/dist/cli/chunks/status-handler-7P23CXUI.js +45 -0
- package/dist/cli/chunks/structural-health-SCNBNL7K.js +2 -0
- package/dist/cli/chunks/sync-BYZBBH65.js +23 -0
- package/dist/cli/chunks/task-handler-DWJQXZ2K.js +49 -0
- package/dist/cli/chunks/task-handlers-35JIXVRW.js +2 -0
- package/dist/cli/chunks/test-2JSS4XW7.js +33 -0
- package/dist/cli/chunks/test-scheduling-TWJ5I7N3.js +15 -0
- package/dist/cli/chunks/token-bootstrap-LLLNJT5V.js +2 -0
- package/dist/cli/chunks/token-usage-EQ4HM4EZ.js +25 -0
- package/dist/cli/chunks/transformers-PBIR5U5S.js +2 -0
- package/dist/cli/chunks/tree-sitter-wasm-parser-X3L2GXUX.js +2 -0
- package/dist/cli/chunks/types-OD43K2NP.js +2 -0
- package/dist/cli/chunks/unified-memory-YPHONR2T.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-HJS4OXWM.js +2 -0
- package/dist/cli/chunks/unified-persistence-EFZRO6AW.js +2 -0
- package/dist/cli/chunks/validate-POMLT2KU.js +21 -0
- package/dist/cli/chunks/validate-swarm-UOC4JGZT.js +14 -0
- package/dist/cli/chunks/vibium-5JF6LAXI.js +2 -0
- package/dist/cli/chunks/visual-security-7KWFLYNB.js +2 -0
- package/dist/cli/chunks/web-tree-sitter-R7WR7J7B.js +2 -0
- package/dist/cli/chunks/windsurf-installer-ZSPEUBKR.js +7 -0
- package/dist/cli/chunks/witness-chain-CFSPCXHG.js +2 -0
- package/dist/cli/chunks/witness-chain-RWU6WT37.js +2 -0
- package/dist/cli/chunks/workflow-YNQT3OW2.js +51 -0
- package/dist/cli/chunks/workflow-orchestrator-Z6TAVMQP.js +2 -0
- package/dist/cli/chunks/wrappers-BP4FODVH.js +2 -0
- package/dist/cli/commands/daemon.d.ts +13 -0
- package/dist/cli/commands/daemon.js +224 -0
- package/dist/cli/commands/hooks-handlers/hooks-shared.js +2 -1
- package/dist/cli/commands/plugin.d.ts +12 -0
- package/dist/cli/commands/plugin.js +135 -0
- package/dist/cli/commands/ruvector-commands.js +14 -2
- package/dist/cli/commands/workflow.d.ts +10 -0
- package/dist/cli/commands/workflow.js +587 -0
- package/dist/cli/handlers/brain-handler.js +13 -8
- package/dist/cli/handlers/heartbeat-handler.d.ts +1 -0
- package/dist/cli/handlers/heartbeat-handler.js +20 -10
- package/dist/cli/handlers/hypergraph-handler.js +3 -3
- package/dist/cli/handlers/init-handler.js +10 -9
- package/dist/cli/handlers/interfaces.d.ts +4 -4
- package/dist/cli/index.js +159 -638
- package/dist/cli/lazy-registry.d.ts +27 -0
- package/dist/cli/lazy-registry.js +70 -0
- package/dist/context/compaction/context-budget.d.ts +71 -0
- package/dist/context/compaction/context-budget.js +120 -0
- package/dist/context/compaction/index.d.ts +96 -0
- package/dist/context/compaction/index.js +259 -0
- package/dist/context/compaction/llm-caller-adapter.d.ts +14 -0
- package/dist/context/compaction/llm-caller-adapter.js +47 -0
- package/dist/context/compaction/tier1-microcompact.d.ts +33 -0
- package/dist/context/compaction/tier1-microcompact.js +47 -0
- package/dist/context/compaction/tier2-session-summary.d.ts +72 -0
- package/dist/context/compaction/tier2-session-summary.js +172 -0
- package/dist/context/compaction/tier3-llm-compact.d.ts +65 -0
- package/dist/context/compaction/tier3-llm-compact.js +166 -0
- package/dist/context/compaction/tier4-reactive.d.ts +54 -0
- package/dist/context/compaction/tier4-reactive.js +129 -0
- 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/consensus/providers/claude-provider.d.ts +1 -0
- package/dist/coordination/consensus/providers/claude-provider.js +23 -3
- 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/hooks/cross-phase-hooks.d.ts +11 -0
- package/dist/hooks/cross-phase-hooks.js +73 -9
- package/dist/hooks/security/config-snapshot.d.ts +21 -0
- package/dist/hooks/security/config-snapshot.js +33 -0
- package/dist/hooks/security/exit-codes.d.ts +28 -0
- package/dist/hooks/security/exit-codes.js +33 -0
- package/dist/hooks/security/index.d.ts +15 -0
- package/dist/hooks/security/index.js +15 -0
- package/dist/hooks/security/ssrf-guard.d.ts +25 -0
- package/dist/hooks/security/ssrf-guard.js +69 -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 +141 -1
- package/dist/kernel/memory-backend.js +3 -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 +217 -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 +66 -0
- package/dist/learning/rvf-pattern-store.js +447 -0
- package/dist/mcp/bundle.js +1937 -1793
- package/dist/mcp/entry.js +132 -77
- 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/middleware/batch-executor.d.ts +46 -0
- package/dist/mcp/middleware/batch-executor.js +150 -0
- package/dist/mcp/middleware/microcompact.d.ts +97 -0
- package/dist/mcp/middleware/microcompact.js +179 -0
- package/dist/mcp/middleware/middleware-chain.d.ts +37 -0
- package/dist/mcp/middleware/middleware-chain.js +60 -0
- package/dist/mcp/protocol-server.d.ts +12 -0
- package/dist/mcp/protocol-server.js +192 -36
- package/dist/mcp/services/session-durability-middleware.d.ts +22 -0
- package/dist/mcp/services/session-durability-middleware.js +64 -0
- package/dist/mcp/services/session-resume.d.ts +29 -0
- package/dist/mcp/services/session-resume.js +221 -0
- package/dist/mcp/services/session-store.d.ts +84 -0
- package/dist/mcp/services/session-store.js +163 -0
- package/dist/mcp/tool-registry.d.ts +9 -0
- package/dist/mcp/tool-registry.js +30 -1
- package/dist/mcp/types.d.ts +2 -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/dist/plugins/cache.d.ts +44 -0
- package/dist/plugins/cache.js +149 -0
- package/dist/plugins/index.d.ts +15 -0
- package/dist/plugins/index.js +15 -0
- package/dist/plugins/lifecycle.d.ts +67 -0
- package/dist/plugins/lifecycle.js +175 -0
- package/dist/plugins/manifest.d.ts +45 -0
- package/dist/plugins/manifest.js +173 -0
- package/dist/plugins/resolver.d.ts +37 -0
- package/dist/plugins/resolver.js +80 -0
- package/dist/plugins/security.d.ts +23 -0
- package/dist/plugins/security.js +125 -0
- package/dist/plugins/sources/github.d.ts +17 -0
- package/dist/plugins/sources/github.js +77 -0
- package/dist/plugins/sources/local.d.ts +20 -0
- package/dist/plugins/sources/local.js +32 -0
- package/dist/plugins/sources/npm.d.ts +18 -0
- package/dist/plugins/sources/npm.js +82 -0
- package/dist/shared/llm/retry.d.ts +5 -2
- package/dist/shared/llm/retry.js +7 -3
- package/dist/shared/prompt-cache-latch.d.ts +41 -0
- package/dist/shared/prompt-cache-latch.js +63 -0
- package/dist/shared/retry-engine.d.ts +77 -0
- package/dist/shared/retry-engine.js +194 -0
- package/dist/workers/daemon.d.ts +8 -0
- package/dist/workers/daemon.js +13 -0
- package/dist/workers/quality-daemon/ci-monitor.d.ts +55 -0
- package/dist/workers/quality-daemon/ci-monitor.js +147 -0
- package/dist/workers/quality-daemon/coverage-delta.d.ts +72 -0
- package/dist/workers/quality-daemon/coverage-delta.js +135 -0
- package/dist/workers/quality-daemon/git-watcher.d.ts +51 -0
- package/dist/workers/quality-daemon/git-watcher.js +209 -0
- package/dist/workers/quality-daemon/index.d.ts +119 -0
- package/dist/workers/quality-daemon/index.js +343 -0
- package/dist/workers/quality-daemon/nightly-consolidation.d.ts +74 -0
- package/dist/workers/quality-daemon/nightly-consolidation.js +136 -0
- package/dist/workers/quality-daemon/notification-service.d.ts +67 -0
- package/dist/workers/quality-daemon/notification-service.js +178 -0
- package/dist/workers/quality-daemon/persistent-memory.d.ts +31 -0
- package/dist/workers/quality-daemon/persistent-memory.js +30 -0
- package/dist/workers/quality-daemon/priority-queue.d.ts +97 -0
- package/dist/workers/quality-daemon/priority-queue.js +126 -0
- package/dist/workers/quality-daemon/test-suggester.d.ts +50 -0
- package/dist/workers/quality-daemon/test-suggester.js +121 -0
- package/dist/workers/worker-manager.js +2 -1
- package/package.json +10 -10
|
@@ -7,6 +7,13 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { createStdioTransport, JSON_RPC_ERRORS, } from './transport';
|
|
9
9
|
import { createToolRegistry } from './tool-registry';
|
|
10
|
+
import { MiddlewareChain } from './middleware/middleware-chain';
|
|
11
|
+
import { createMicrocompactMiddleware } from './middleware/microcompact';
|
|
12
|
+
import { SessionStore } from './services/session-store';
|
|
13
|
+
import { createSessionDurabilityMiddleware } from './services/session-durability-middleware';
|
|
14
|
+
import { withRetry } from '../shared/retry-engine';
|
|
15
|
+
import { CompactionPipeline } from '../context/compaction';
|
|
16
|
+
import { createLLMCompactCaller } from '../context/compaction/llm-caller-adapter';
|
|
10
17
|
// AG-UI EventAdapter for streaming events
|
|
11
18
|
import { createEventAdapter, } from '../adapters/ag-ui/index.js';
|
|
12
19
|
import { handleFleetInit, handleFleetStatus, handleFleetHealth, handleAQEHealth, disposeFleet, handleTaskSubmit, handleTaskList, handleTaskStatus, handleTaskCancel, handleTaskOrchestrate,
|
|
@@ -23,12 +30,16 @@ handleValidationPipeline,
|
|
|
23
30
|
// Imp-9: YAML pipeline handlers
|
|
24
31
|
handlePipelineLoad, handlePipelineRun, handlePipelineList, handlePipelineValidate,
|
|
25
32
|
// Cross-phase handlers
|
|
26
|
-
handleCrossPhaseStore, handleCrossPhaseQuery, handleAgentComplete, handlePhaseStart, handlePhaseEnd, handleCrossPhaseStats, handleFormatSignals, handleCrossPhaseCleanup,
|
|
33
|
+
handleCrossPhaseStore, handleCrossPhaseQuery, handleAgentComplete, handlePhaseStart, handlePhaseEnd, handleCrossPhaseStats, handleFormatSignals, handleCrossPhaseCleanup,
|
|
34
|
+
// ADR-072: RVF Migration handlers
|
|
35
|
+
handleMigrationStatus, handleMigrationCheck, handleMigrationPromote, } from './handlers';
|
|
27
36
|
// ADR-039: Performance optimization imports
|
|
28
37
|
import { registerMissingQETools } from './qe-tool-bridge.js';
|
|
29
38
|
import { getConnectionPool, initializeConnectionPool, shutdownConnectionPool, } from './connection-pool';
|
|
30
39
|
import { getLoadBalancer, } from './load-balancer';
|
|
31
40
|
import { getPerformanceMonitor, } from './performance-monitor';
|
|
41
|
+
// ADR-062: Loop detection for MCP tool calls
|
|
42
|
+
import { ToolCallSignatureTracker } from '../kernel/anti-drift-middleware.js';
|
|
32
43
|
import { createRequire } from 'module';
|
|
33
44
|
const _require = createRequire(import.meta.url);
|
|
34
45
|
const _pkg = _require('../../package.json');
|
|
@@ -48,6 +59,14 @@ export class MCPProtocolServer {
|
|
|
48
59
|
monitor = getPerformanceMonitor();
|
|
49
60
|
// AG-UI EventAdapter for streaming events to HTTP clients
|
|
50
61
|
eventAdapter;
|
|
62
|
+
// IMP-00: Middleware chain for pre/post tool-call hooks
|
|
63
|
+
middlewareChain;
|
|
64
|
+
// IMP-04: Session durability store
|
|
65
|
+
sessionStore;
|
|
66
|
+
// IMP-08: 4-tier context compaction pipeline
|
|
67
|
+
compactionPipeline;
|
|
68
|
+
// ADR-062: Loop detection tracker for MCP tool calls
|
|
69
|
+
loopTracker;
|
|
51
70
|
// Connection recovery state
|
|
52
71
|
reconnecting = false;
|
|
53
72
|
pendingRequests = [];
|
|
@@ -64,6 +83,25 @@ export class MCPProtocolServer {
|
|
|
64
83
|
this.registry = createToolRegistry();
|
|
65
84
|
// Initialize AG-UI EventAdapter for streaming
|
|
66
85
|
this.eventAdapter = createEventAdapter();
|
|
86
|
+
// IMP-00: Initialize middleware chain
|
|
87
|
+
this.middlewareChain = new MiddlewareChain();
|
|
88
|
+
// IMP-04: Initialize session store and register durability middleware
|
|
89
|
+
this.sessionStore = new SessionStore();
|
|
90
|
+
this.sessionStore.startSession();
|
|
91
|
+
this.middlewareChain.register(createSessionDurabilityMiddleware(this.sessionStore));
|
|
92
|
+
// IMP-01: Register microcompact middleware for stale result eviction
|
|
93
|
+
// Extract the engine so it can be shared with IMP-08's Tier 1
|
|
94
|
+
const microcompact = createMicrocompactMiddleware();
|
|
95
|
+
this.middlewareChain.register(microcompact.middleware);
|
|
96
|
+
// IMP-08: Initialize 4-tier compaction pipeline with shared microcompact engine
|
|
97
|
+
// and LLM caller for Tier 3 (falls back to extractive if no API key)
|
|
98
|
+
this.compactionPipeline = new CompactionPipeline({
|
|
99
|
+
sharedMicrocompactEngine: microcompact.engine,
|
|
100
|
+
llmCaller: createLLMCompactCaller(),
|
|
101
|
+
});
|
|
102
|
+
this.middlewareChain.register(this.compactionPipeline.createMiddleware());
|
|
103
|
+
// ADR-062: Initialize loop detection tracker
|
|
104
|
+
this.loopTracker = new ToolCallSignatureTracker();
|
|
67
105
|
// Register all tools
|
|
68
106
|
this.registerAllTools();
|
|
69
107
|
}
|
|
@@ -119,52 +157,61 @@ export class MCPProtocolServer {
|
|
|
119
157
|
if (this.reconnecting)
|
|
120
158
|
return;
|
|
121
159
|
this.reconnecting = true;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
160
|
+
try {
|
|
161
|
+
// IMP-03: Use unified retry engine instead of hardcoded loop
|
|
162
|
+
const { attempts } = await withRetry(async () => { this.transport.reconnect(); }, {
|
|
163
|
+
maxAttempts: 3,
|
|
164
|
+
baseDelayMs: 1000,
|
|
165
|
+
maxDelayMs: 8000,
|
|
166
|
+
jitterFraction: 0.25,
|
|
167
|
+
onRetry: (attempt, _error, delayMs) => {
|
|
168
|
+
console.error(`[MCP] Reconnect attempt ${attempt + 1}/3 in ${Math.round(delayMs)}ms...`);
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
console.error(`[MCP] Reconnected after ${attempts} attempt(s)`);
|
|
172
|
+
this.reconnecting = false;
|
|
173
|
+
// Replay any buffered requests
|
|
174
|
+
const buffered = [...this.pendingRequests];
|
|
175
|
+
this.pendingRequests = [];
|
|
176
|
+
for (const { resolve, request } of buffered) {
|
|
177
|
+
try {
|
|
178
|
+
const result = await this.handleRequest(request);
|
|
179
|
+
resolve(result);
|
|
180
|
+
}
|
|
181
|
+
catch (err) {
|
|
182
|
+
console.error(`[MCP] Failed to replay buffered request: ${request.method}`);
|
|
143
183
|
}
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
catch (err) {
|
|
147
|
-
console.error(`[MCP] Reconnect attempt ${attempt + 1} failed: ${err instanceof Error ? err.message : err}`);
|
|
148
184
|
}
|
|
149
185
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
186
|
+
catch {
|
|
187
|
+
this.reconnecting = false;
|
|
188
|
+
console.error('[MCP] All reconnect attempts failed. Tools unavailable until transport is restored.');
|
|
189
|
+
// Reject all buffered requests
|
|
190
|
+
const buffered = [...this.pendingRequests];
|
|
191
|
+
this.pendingRequests = [];
|
|
192
|
+
for (const { reject } of buffered) {
|
|
193
|
+
reject(new Error('MCP connection lost and reconnect failed'));
|
|
194
|
+
}
|
|
157
195
|
}
|
|
158
196
|
}
|
|
159
197
|
/**
|
|
160
198
|
* Stop the MCP server
|
|
161
199
|
*/
|
|
162
200
|
async stop() {
|
|
201
|
+
this.sessionStore.close(); // IMP-04: Flush session before shutdown
|
|
163
202
|
this.transport.stop();
|
|
164
203
|
await disposeFleet();
|
|
165
204
|
await shutdownConnectionPool();
|
|
166
205
|
console.error('[MCP] Server stopped');
|
|
167
206
|
}
|
|
207
|
+
/** IMP-00: Register a middleware into the tool-call chain. */
|
|
208
|
+
registerMiddleware(mw) {
|
|
209
|
+
this.middlewareChain.register(mw);
|
|
210
|
+
}
|
|
211
|
+
/** IMP-00: Get registered middleware (for testing/introspection). */
|
|
212
|
+
getMiddleware() {
|
|
213
|
+
return this.middlewareChain.getRegistered();
|
|
214
|
+
}
|
|
168
215
|
/**
|
|
169
216
|
* Get server capabilities
|
|
170
217
|
*/
|
|
@@ -309,29 +356,77 @@ export class MCPProtocolServer {
|
|
|
309
356
|
toolName: name,
|
|
310
357
|
timestamp: new Date().toISOString(),
|
|
311
358
|
});
|
|
359
|
+
// IMP-00: Build middleware context
|
|
360
|
+
const ctx = {
|
|
361
|
+
toolName: name,
|
|
362
|
+
params: args,
|
|
363
|
+
timestamp: Date.now(),
|
|
364
|
+
metadata: { stepId },
|
|
365
|
+
};
|
|
366
|
+
// ADR-062: Loop detection — check for repeated identical tool calls
|
|
367
|
+
let loopSteeringPrefix = '';
|
|
368
|
+
if (process.env.AQE_LOOP_DETECTION_ENABLED !== 'false') {
|
|
369
|
+
try {
|
|
370
|
+
const loopResult = this.loopTracker.trackCall('mcp-client', name, args);
|
|
371
|
+
if (loopResult.action === 'steer') {
|
|
372
|
+
// BLOCK the tool call — return error with steering message to break the loop
|
|
373
|
+
return {
|
|
374
|
+
content: [{ type: 'text', text: loopResult.steeringMessage || 'Loop detected: repeated identical tool call blocked.' }],
|
|
375
|
+
isError: true,
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
else if (loopResult.action === 'warn' && loopResult.steeringMessage) {
|
|
379
|
+
loopSteeringPrefix = loopResult.steeringMessage + '\n\n';
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
catch {
|
|
383
|
+
// Loop detection must not break tool execution
|
|
384
|
+
}
|
|
385
|
+
}
|
|
312
386
|
try {
|
|
313
|
-
|
|
387
|
+
// IMP-00: Execute pre-tool-call middleware
|
|
388
|
+
const processedCtx = await this.middlewareChain.executePreHooks(ctx);
|
|
389
|
+
const result = await tool.handler(processedCtx.params);
|
|
314
390
|
success = true;
|
|
391
|
+
// IMP-00: Execute post-tool-result middleware
|
|
392
|
+
const processedResult = await this.middlewareChain.executePostHooks(processedCtx, result);
|
|
315
393
|
// Emit AG-UI result event for tool completion
|
|
316
394
|
this.eventAdapter.adapt({
|
|
317
395
|
success: true,
|
|
318
|
-
data:
|
|
396
|
+
data: processedResult,
|
|
319
397
|
metadata: {
|
|
320
398
|
executionTime: performance.now() - startTime,
|
|
321
399
|
requestId: stepId,
|
|
322
400
|
},
|
|
323
401
|
});
|
|
402
|
+
const resultText = JSON.stringify(processedResult, null, 2);
|
|
324
403
|
return {
|
|
325
404
|
content: [
|
|
326
405
|
{
|
|
327
406
|
type: 'text',
|
|
328
|
-
text:
|
|
407
|
+
text: loopSteeringPrefix ? loopSteeringPrefix + resultText : resultText,
|
|
329
408
|
},
|
|
330
409
|
],
|
|
331
410
|
};
|
|
332
411
|
}
|
|
333
412
|
catch (err) {
|
|
334
413
|
const error = err;
|
|
414
|
+
// IMP-08: Detect context overflow (413) and trigger reactive compaction
|
|
415
|
+
const errorMsg = error.message || '';
|
|
416
|
+
const is413 = errorMsg.includes('413')
|
|
417
|
+
|| errorMsg.includes('context_length_exceeded')
|
|
418
|
+
|| errorMsg.includes('maximum context length')
|
|
419
|
+
|| errorMsg.includes('too many tokens');
|
|
420
|
+
if (is413) {
|
|
421
|
+
try {
|
|
422
|
+
await this.compactionPipeline.handleOverflow('status_413');
|
|
423
|
+
}
|
|
424
|
+
catch {
|
|
425
|
+
// Compaction failed — continue with error response
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
// IMP-00: Execute error middleware
|
|
429
|
+
await this.middlewareChain.executeErrorHooks(ctx, error);
|
|
335
430
|
// Emit AG-UI result event for tool failure
|
|
336
431
|
this.eventAdapter.adapt({
|
|
337
432
|
success: false,
|
|
@@ -380,6 +475,7 @@ export class MCPProtocolServer {
|
|
|
380
475
|
name: 'fleet_status',
|
|
381
476
|
description: 'Get fleet status: agents, tasks, health, and learning stats. Example: fleet_status({ verbose: true })',
|
|
382
477
|
category: 'core',
|
|
478
|
+
isConcurrencySafe: true,
|
|
383
479
|
parameters: [
|
|
384
480
|
{ name: 'verbose', type: 'boolean', description: 'Include detailed information', default: false },
|
|
385
481
|
],
|
|
@@ -391,6 +487,7 @@ export class MCPProtocolServer {
|
|
|
391
487
|
name: 'fleet_health',
|
|
392
488
|
description: 'Check fleet and per-domain health status with load metrics. Example: fleet_health({ domain: "test-generation" })',
|
|
393
489
|
category: 'core',
|
|
490
|
+
isConcurrencySafe: true,
|
|
394
491
|
parameters: [
|
|
395
492
|
{ name: 'domain', type: 'string', description: 'Specific domain to check' },
|
|
396
493
|
],
|
|
@@ -416,6 +513,7 @@ export class MCPProtocolServer {
|
|
|
416
513
|
name: 'task_list',
|
|
417
514
|
description: 'List tasks with optional status/limit filtering. Example: task_list({ status: "running", limit: 10 })',
|
|
418
515
|
category: 'task',
|
|
516
|
+
isConcurrencySafe: true,
|
|
419
517
|
parameters: [
|
|
420
518
|
{ name: 'status', type: 'string', description: 'Filter by status' },
|
|
421
519
|
{ name: 'limit', type: 'number', description: 'Maximum results', default: 50 },
|
|
@@ -428,6 +526,7 @@ export class MCPProtocolServer {
|
|
|
428
526
|
name: 'task_status',
|
|
429
527
|
description: 'Get detailed status, progress, and result of a specific task. Example: task_status({ taskId: "abc-123" })',
|
|
430
528
|
category: 'task',
|
|
529
|
+
isConcurrencySafe: true,
|
|
431
530
|
parameters: [
|
|
432
531
|
{ name: 'taskId', type: 'string', description: 'Task ID', required: true },
|
|
433
532
|
],
|
|
@@ -463,6 +562,7 @@ export class MCPProtocolServer {
|
|
|
463
562
|
name: 'agent_list',
|
|
464
563
|
description: 'List all active agents, optionally filtered by domain. Example: agent_list({ domain: "test-generation" })',
|
|
465
564
|
category: 'agent',
|
|
565
|
+
isConcurrencySafe: true,
|
|
466
566
|
parameters: [
|
|
467
567
|
{ name: 'domain', type: 'string', description: 'Filter by domain' },
|
|
468
568
|
],
|
|
@@ -486,6 +586,7 @@ export class MCPProtocolServer {
|
|
|
486
586
|
name: 'agent_metrics',
|
|
487
587
|
description: 'Get CPU, memory, and task performance metrics for agents. Example: agent_metrics({ agentId: "agent-1" })',
|
|
488
588
|
category: 'agent',
|
|
589
|
+
isConcurrencySafe: true,
|
|
489
590
|
parameters: [
|
|
490
591
|
{ name: 'agentId', type: 'string', description: 'Specific agent ID' },
|
|
491
592
|
],
|
|
@@ -497,6 +598,7 @@ export class MCPProtocolServer {
|
|
|
497
598
|
name: 'agent_status',
|
|
498
599
|
description: 'Get detailed status and current task of a specific agent. Example: agent_status({ agentId: "agent-1" })',
|
|
499
600
|
category: 'agent',
|
|
601
|
+
isConcurrencySafe: true,
|
|
500
602
|
parameters: [
|
|
501
603
|
{ name: 'agentId', type: 'string', description: 'Agent ID', required: true },
|
|
502
604
|
],
|
|
@@ -509,6 +611,7 @@ export class MCPProtocolServer {
|
|
|
509
611
|
name: 'team_list',
|
|
510
612
|
description: 'List all active domain teams and their agent counts. Example: team_list({ domain: "coverage-analysis" })',
|
|
511
613
|
category: 'agent',
|
|
614
|
+
isConcurrencySafe: true,
|
|
512
615
|
parameters: [
|
|
513
616
|
{ name: 'domain', type: 'string', description: 'Filter by domain' },
|
|
514
617
|
],
|
|
@@ -520,6 +623,7 @@ export class MCPProtocolServer {
|
|
|
520
623
|
name: 'team_health',
|
|
521
624
|
description: 'Get team health, agent utilization, and consensus status for a domain. Example: team_health({ domain: "security-compliance" })',
|
|
522
625
|
category: 'agent',
|
|
626
|
+
isConcurrencySafe: true,
|
|
523
627
|
parameters: [
|
|
524
628
|
{ name: 'domain', type: 'string', description: 'Domain to check', required: true },
|
|
525
629
|
],
|
|
@@ -608,6 +712,7 @@ export class MCPProtocolServer {
|
|
|
608
712
|
name: 'coverage_analyze_sublinear',
|
|
609
713
|
description: 'Analyze code coverage with O(log n) sublinear algorithm and ML-powered gap detection. Example: coverage_analyze_sublinear({ target: "src/", detectGaps: true })',
|
|
610
714
|
category: 'domain',
|
|
715
|
+
isConcurrencySafe: true,
|
|
611
716
|
parameters: [
|
|
612
717
|
{ name: 'target', type: 'string', description: 'Target path to analyze' },
|
|
613
718
|
{ name: 'detectGaps', type: 'boolean', description: 'Detect coverage gaps', default: true },
|
|
@@ -621,6 +726,7 @@ export class MCPProtocolServer {
|
|
|
621
726
|
name: 'quality_assess',
|
|
622
727
|
description: 'Assess code quality metrics and optionally run a pass/fail quality gate. Example: quality_assess({ runGate: true })',
|
|
623
728
|
category: 'domain',
|
|
729
|
+
isConcurrencySafe: true,
|
|
624
730
|
parameters: [
|
|
625
731
|
{ name: 'runGate', type: 'boolean', description: 'Run quality gate evaluation', default: false },
|
|
626
732
|
],
|
|
@@ -685,6 +791,7 @@ export class MCPProtocolServer {
|
|
|
685
791
|
name: 'defect_predict',
|
|
686
792
|
description: 'Predict potential defects using AI analysis of code complexity and change history. Example: defect_predict({ target: "src/auth/" })',
|
|
687
793
|
category: 'domain',
|
|
794
|
+
isConcurrencySafe: true,
|
|
688
795
|
parameters: [
|
|
689
796
|
{ name: 'target', type: 'string', description: 'Target path' },
|
|
690
797
|
],
|
|
@@ -697,6 +804,7 @@ export class MCPProtocolServer {
|
|
|
697
804
|
name: 'requirements_validate',
|
|
698
805
|
description: 'Validate requirements for completeness and generate BDD scenarios. Example: requirements_validate({ requirementsPath: "docs/requirements.md" })',
|
|
699
806
|
category: 'domain',
|
|
807
|
+
isConcurrencySafe: true,
|
|
700
808
|
parameters: [
|
|
701
809
|
{ name: 'requirementsPath', type: 'string', description: 'Path to requirements' },
|
|
702
810
|
],
|
|
@@ -709,6 +817,7 @@ export class MCPProtocolServer {
|
|
|
709
817
|
name: 'code_index',
|
|
710
818
|
description: 'Index source code into the knowledge graph for dependency and impact analysis. Example: code_index({ target: "src/" })',
|
|
711
819
|
category: 'domain',
|
|
820
|
+
isConcurrencySafe: true,
|
|
712
821
|
parameters: [
|
|
713
822
|
{ name: 'target', type: 'string', description: 'Target path' },
|
|
714
823
|
],
|
|
@@ -734,6 +843,7 @@ export class MCPProtocolServer {
|
|
|
734
843
|
name: 'memory_retrieve',
|
|
735
844
|
description: 'Retrieve a value by key from memory. Example: memory_retrieve({ key: "pattern-auth", namespace: "patterns" })',
|
|
736
845
|
category: 'memory',
|
|
846
|
+
isConcurrencySafe: true,
|
|
737
847
|
parameters: [
|
|
738
848
|
{ name: 'key', type: 'string', description: 'Memory key', required: true },
|
|
739
849
|
{ name: 'namespace', type: 'string', description: 'Memory namespace', default: 'default' },
|
|
@@ -746,6 +856,7 @@ export class MCPProtocolServer {
|
|
|
746
856
|
name: 'memory_query',
|
|
747
857
|
description: 'Query memory using glob patterns or HNSW semantic vector search. Example: memory_query({ pattern: "auth*", namespace: "patterns" }) or memory_query({ pattern: "authentication best practices", semantic: true })',
|
|
748
858
|
category: 'memory',
|
|
859
|
+
isConcurrencySafe: true,
|
|
749
860
|
parameters: [
|
|
750
861
|
{ name: 'pattern', type: 'string', description: 'Key pattern (glob) or natural language query (for semantic search)' },
|
|
751
862
|
{ name: 'namespace', type: 'string', description: 'Memory namespace' },
|
|
@@ -771,6 +882,7 @@ export class MCPProtocolServer {
|
|
|
771
882
|
name: 'memory_usage',
|
|
772
883
|
description: 'Get memory usage statistics: entry counts, namespaces, and storage size. Example: memory_usage({})',
|
|
773
884
|
category: 'memory',
|
|
885
|
+
isConcurrencySafe: true,
|
|
774
886
|
parameters: [],
|
|
775
887
|
},
|
|
776
888
|
handler: () => handleMemoryUsage(),
|
|
@@ -813,6 +925,7 @@ export class MCPProtocolServer {
|
|
|
813
925
|
name: 'routing_metrics',
|
|
814
926
|
description: 'Get model routing statistics: tier distribution, cost savings, and routing log. Example: routing_metrics({ includeLog: true, logLimit: 20 })',
|
|
815
927
|
category: 'routing',
|
|
928
|
+
isConcurrencySafe: true,
|
|
816
929
|
parameters: [
|
|
817
930
|
{ name: 'includeLog', type: 'boolean', description: 'Include routing log entries', default: false },
|
|
818
931
|
{ name: 'logLimit', type: 'number', description: 'Max log entries to return', default: 100 },
|
|
@@ -825,6 +938,7 @@ export class MCPProtocolServer {
|
|
|
825
938
|
name: 'routing_economics',
|
|
826
939
|
description: 'Get economic routing report: tier efficiency, budget status, cost-per-quality analysis, and savings opportunities. Example: routing_economics({ taskComplexity: 0.5 })',
|
|
827
940
|
category: 'routing',
|
|
941
|
+
isConcurrencySafe: true,
|
|
828
942
|
parameters: [
|
|
829
943
|
{ name: 'taskComplexity', type: 'number', description: 'Task complexity score 0-1 for tier scoring (default: 0.5)', default: 0.5 },
|
|
830
944
|
],
|
|
@@ -837,6 +951,7 @@ export class MCPProtocolServer {
|
|
|
837
951
|
name: 'infra_healing_status',
|
|
838
952
|
description: 'Get infrastructure self-healing status: detected failures, recovery stats, and failing services. Example: infra_healing_status({ verbose: true })',
|
|
839
953
|
category: 'infra-healing',
|
|
954
|
+
isConcurrencySafe: true,
|
|
840
955
|
parameters: [
|
|
841
956
|
{ name: 'verbose', type: 'boolean', description: 'Include detailed observation data', default: false },
|
|
842
957
|
],
|
|
@@ -886,6 +1001,7 @@ export class MCPProtocolServer {
|
|
|
886
1001
|
name: 'cross_phase_query',
|
|
887
1002
|
description: 'Query cross-phase signals by loop type with optional filters',
|
|
888
1003
|
category: 'cross-phase',
|
|
1004
|
+
isConcurrencySafe: true,
|
|
889
1005
|
parameters: [
|
|
890
1006
|
{ name: 'loop', type: 'string', description: 'Feedback loop type', required: true, enum: ['strategic', 'tactical', 'operational', 'quality-criteria'] },
|
|
891
1007
|
{ name: 'maxAge', type: 'string', description: 'Maximum signal age (e.g., "30d", "24h")' },
|
|
@@ -935,6 +1051,7 @@ export class MCPProtocolServer {
|
|
|
935
1051
|
name: 'cross_phase_stats',
|
|
936
1052
|
description: 'Get cross-phase memory statistics (total signals, by loop, by namespace)',
|
|
937
1053
|
category: 'cross-phase',
|
|
1054
|
+
isConcurrencySafe: true,
|
|
938
1055
|
parameters: [],
|
|
939
1056
|
},
|
|
940
1057
|
handler: () => handleCrossPhaseStats(),
|
|
@@ -944,6 +1061,7 @@ export class MCPProtocolServer {
|
|
|
944
1061
|
name: 'format_signals',
|
|
945
1062
|
description: 'Format cross-phase signals for injection into agent prompts',
|
|
946
1063
|
category: 'cross-phase',
|
|
1064
|
+
isConcurrencySafe: true,
|
|
947
1065
|
parameters: [
|
|
948
1066
|
{ name: 'signals', type: 'array', description: 'Signals to format', required: true },
|
|
949
1067
|
],
|
|
@@ -1010,6 +1128,7 @@ export class MCPProtocolServer {
|
|
|
1010
1128
|
name: 'pipeline_list',
|
|
1011
1129
|
description: 'List all loaded YAML pipelines. Example: pipeline_list({})',
|
|
1012
1130
|
category: 'coordination',
|
|
1131
|
+
isConcurrencySafe: true,
|
|
1013
1132
|
parameters: [],
|
|
1014
1133
|
},
|
|
1015
1134
|
handler: (params) => handlePipelineList(params),
|
|
@@ -1019,6 +1138,7 @@ export class MCPProtocolServer {
|
|
|
1019
1138
|
name: 'pipeline_validate',
|
|
1020
1139
|
description: 'Validate a YAML pipeline definition without loading it. Example: pipeline_validate({ yaml: "name: test\\nsteps: ..." })',
|
|
1021
1140
|
category: 'coordination',
|
|
1141
|
+
isConcurrencySafe: true,
|
|
1022
1142
|
parameters: [
|
|
1023
1143
|
{ name: 'yaml', type: 'string', description: 'YAML pipeline definition to validate', required: true },
|
|
1024
1144
|
{ name: 'variables', type: 'object', description: 'Variable substitutions for validation' },
|
|
@@ -1034,18 +1154,21 @@ export class MCPProtocolServer {
|
|
|
1034
1154
|
name: 'session_cache_stats',
|
|
1035
1155
|
description: 'Get session operation cache statistics: hit rate, cache size, tokens saved via O(1) fingerprint reuse. Example: session_cache_stats({})',
|
|
1036
1156
|
category: 'learning',
|
|
1157
|
+
isConcurrencySafe: true,
|
|
1037
1158
|
parameters: [],
|
|
1038
1159
|
},
|
|
1039
1160
|
handler: async () => {
|
|
1040
1161
|
try {
|
|
1041
1162
|
const { getSessionCache } = await import('../optimization/session-cache.js');
|
|
1042
1163
|
const stats = getSessionCache().getStats();
|
|
1164
|
+
const compactionStats = this.compactionPipeline.getStats();
|
|
1043
1165
|
return {
|
|
1044
1166
|
success: true,
|
|
1045
1167
|
data: {
|
|
1046
1168
|
...stats,
|
|
1047
1169
|
hitRatePercent: `${(stats.hitRate * 100).toFixed(1)}%`,
|
|
1048
1170
|
description: 'Session cache provides O(1) exact-match lookups before HNSW similarity search',
|
|
1171
|
+
compaction: compactionStats,
|
|
1049
1172
|
},
|
|
1050
1173
|
};
|
|
1051
1174
|
}
|
|
@@ -1065,10 +1188,43 @@ export class MCPProtocolServer {
|
|
|
1065
1188
|
name: 'aqe_health',
|
|
1066
1189
|
description: 'Check AQE server health: returns status, loaded domains, memory stats, HNSW index status, and pattern count. Example: aqe_health({})',
|
|
1067
1190
|
category: 'core',
|
|
1191
|
+
isConcurrencySafe: true,
|
|
1068
1192
|
parameters: [],
|
|
1069
1193
|
},
|
|
1070
1194
|
handler: () => handleAQEHealth(),
|
|
1071
1195
|
});
|
|
1196
|
+
// ADR-072 Phase 3: RVF Migration tools
|
|
1197
|
+
this.registerTool({
|
|
1198
|
+
definition: {
|
|
1199
|
+
name: 'migration_status',
|
|
1200
|
+
description: 'Get RVF migration status: current stage, metrics, consistency, and gate evaluation. Example: migration_status({})',
|
|
1201
|
+
category: 'persistence',
|
|
1202
|
+
isConcurrencySafe: true,
|
|
1203
|
+
parameters: [],
|
|
1204
|
+
},
|
|
1205
|
+
handler: () => handleMigrationStatus(),
|
|
1206
|
+
});
|
|
1207
|
+
this.registerTool({
|
|
1208
|
+
definition: {
|
|
1209
|
+
name: 'migration_check',
|
|
1210
|
+
description: 'Run a consistency check comparing SQLite and RVF search results. Samples random patterns and reports divergences. Example: migration_check({})',
|
|
1211
|
+
category: 'persistence',
|
|
1212
|
+
isConcurrencySafe: true,
|
|
1213
|
+
parameters: [],
|
|
1214
|
+
},
|
|
1215
|
+
handler: () => handleMigrationCheck(),
|
|
1216
|
+
});
|
|
1217
|
+
this.registerTool({
|
|
1218
|
+
definition: {
|
|
1219
|
+
name: 'migration_promote',
|
|
1220
|
+
description: 'Attempt to promote to the next RVF migration stage. Evaluates stage gate criteria. Example: migration_promote({ force: false })',
|
|
1221
|
+
category: 'persistence',
|
|
1222
|
+
parameters: [
|
|
1223
|
+
{ name: 'force', type: 'boolean', description: 'Skip gate checks and force promotion', default: false },
|
|
1224
|
+
],
|
|
1225
|
+
},
|
|
1226
|
+
handler: (params) => handleMigrationPromote(params),
|
|
1227
|
+
});
|
|
1072
1228
|
// Register QE domain tools not already covered by hardcoded handlers above
|
|
1073
1229
|
const bridgedCount = registerMissingQETools((entry) => this.registerTool(entry));
|
|
1074
1230
|
console.error(`[MCP] Registered ${this.tools.size} tools (${bridgedCount} via QE bridge)`);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic QE v3 - Session Durability Middleware
|
|
3
|
+
*
|
|
4
|
+
* IMP-04: Transcript-First Session Durability
|
|
5
|
+
* Middleware factory that registers pre/post/error hooks on the
|
|
6
|
+
* MiddlewareChain to log every tool call lifecycle event into
|
|
7
|
+
* the SessionStore.
|
|
8
|
+
*
|
|
9
|
+
* @module mcp/services/session-durability-middleware
|
|
10
|
+
*/
|
|
11
|
+
import type { ToolMiddleware } from '../middleware/middleware-chain';
|
|
12
|
+
import type { SessionStore } from './session-store';
|
|
13
|
+
/**
|
|
14
|
+
* Creates a ToolMiddleware that appends session entries for every
|
|
15
|
+
* tool call, result, and error. Registers at priority 50.
|
|
16
|
+
*
|
|
17
|
+
* - preToolCall: appends a `tool_call` entry with state='running'
|
|
18
|
+
* - postToolResult: appends a `tool_result` entry with state='idle'
|
|
19
|
+
* - onError: appends an `error` entry with state='requires_action'
|
|
20
|
+
*/
|
|
21
|
+
export declare function createSessionDurabilityMiddleware(store: SessionStore): ToolMiddleware;
|
|
22
|
+
//# sourceMappingURL=session-durability-middleware.d.ts.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic QE v3 - Session Durability Middleware
|
|
3
|
+
*
|
|
4
|
+
* IMP-04: Transcript-First Session Durability
|
|
5
|
+
* Middleware factory that registers pre/post/error hooks on the
|
|
6
|
+
* MiddlewareChain to log every tool call lifecycle event into
|
|
7
|
+
* the SessionStore.
|
|
8
|
+
*
|
|
9
|
+
* @module mcp/services/session-durability-middleware
|
|
10
|
+
*/
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// Middleware Factory
|
|
13
|
+
// ============================================================================
|
|
14
|
+
/**
|
|
15
|
+
* Creates a ToolMiddleware that appends session entries for every
|
|
16
|
+
* tool call, result, and error. Registers at priority 50.
|
|
17
|
+
*
|
|
18
|
+
* - preToolCall: appends a `tool_call` entry with state='running'
|
|
19
|
+
* - postToolResult: appends a `tool_result` entry with state='idle'
|
|
20
|
+
* - onError: appends an `error` entry with state='requires_action'
|
|
21
|
+
*/
|
|
22
|
+
export function createSessionDurabilityMiddleware(store) {
|
|
23
|
+
const disabled = process.env.AQE_SESSION_DURABILITY === 'false';
|
|
24
|
+
return {
|
|
25
|
+
name: 'session-durability',
|
|
26
|
+
priority: 50,
|
|
27
|
+
async preToolCall(context) {
|
|
28
|
+
if (disabled)
|
|
29
|
+
return context;
|
|
30
|
+
store.append({
|
|
31
|
+
timestamp: context.timestamp,
|
|
32
|
+
type: 'tool_call',
|
|
33
|
+
toolName: context.toolName,
|
|
34
|
+
params: context.params,
|
|
35
|
+
state: 'running',
|
|
36
|
+
});
|
|
37
|
+
return context;
|
|
38
|
+
},
|
|
39
|
+
async postToolResult(context, result) {
|
|
40
|
+
if (disabled)
|
|
41
|
+
return result;
|
|
42
|
+
store.append({
|
|
43
|
+
timestamp: Date.now(),
|
|
44
|
+
type: 'tool_result',
|
|
45
|
+
toolName: context.toolName,
|
|
46
|
+
result,
|
|
47
|
+
state: 'idle',
|
|
48
|
+
});
|
|
49
|
+
return result;
|
|
50
|
+
},
|
|
51
|
+
async onError(context, error) {
|
|
52
|
+
if (disabled)
|
|
53
|
+
return;
|
|
54
|
+
store.append({
|
|
55
|
+
timestamp: Date.now(),
|
|
56
|
+
type: 'error',
|
|
57
|
+
toolName: context.toolName,
|
|
58
|
+
result: { message: error.message, stack: error.stack },
|
|
59
|
+
state: 'requires_action',
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=session-durability-middleware.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic QE v3 - Session Resume Service
|
|
3
|
+
*
|
|
4
|
+
* IMP-04: Transcript-First Session Durability
|
|
5
|
+
* Reads an existing JSONL session file by sampling the head (first 4KB)
|
|
6
|
+
* and tail (last 64KB) to reconstruct metadata and recent entries
|
|
7
|
+
* without reading the entire file.
|
|
8
|
+
*
|
|
9
|
+
* @module mcp/services/session-resume
|
|
10
|
+
*/
|
|
11
|
+
import type { SessionEntry, SessionMetadata } from './session-store';
|
|
12
|
+
export interface SessionResumeResult {
|
|
13
|
+
metadata: SessionMetadata;
|
|
14
|
+
recentEntries: SessionEntry[];
|
|
15
|
+
lastState: 'idle' | 'running' | 'requires_action';
|
|
16
|
+
canResume: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Resume a session from a JSONL file.
|
|
20
|
+
*
|
|
21
|
+
* Reads the first 4KB (head) to extract session start metadata and
|
|
22
|
+
* the last 64KB (tail) to get recent entries. Parses JSONL lines,
|
|
23
|
+
* reconstructs the parentUuid linked list, and returns metadata +
|
|
24
|
+
* recent entries + resume capability.
|
|
25
|
+
*
|
|
26
|
+
* Corrupt or incomplete lines are skipped gracefully.
|
|
27
|
+
*/
|
|
28
|
+
export declare function resumeSession(filePath: string): SessionResumeResult;
|
|
29
|
+
//# sourceMappingURL=session-resume.d.ts.map
|