agentic-qe 3.8.14 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +28 -0
- package/dist/adapters/a2ui/integration/agui-sync.js +2 -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-WBR5NXS3.js +2 -0
- package/dist/cli/chunks/agent-booster-wasm-PQYB7VRU.js +2 -0
- package/dist/cli/chunks/agent-handler-QDAB5NQS.js +33 -0
- package/dist/cli/chunks/aqe-learning-engine-TK4JQCGT.js +2 -0
- package/dist/cli/chunks/audit-S7JUYYVP.js +3 -0
- package/dist/cli/chunks/base-2WXOSMBQ.js +2 -0
- package/dist/cli/chunks/better-sqlite3-7KY2RDXO.js +2 -0
- package/dist/cli/chunks/brain-handler-PPEGDCN4.js +68 -0
- package/dist/cli/chunks/branch-enumerator-XK4V5W7L.js +7 -0
- package/dist/cli/chunks/browser-PALA5PL3.js +4 -0
- package/dist/cli/chunks/browser-workflow-42F7GK5T.js +2 -0
- package/dist/cli/chunks/chunk-24FKIJNC.js +15 -0
- package/dist/cli/chunks/chunk-263XS447.js +2 -0
- package/dist/cli/chunks/chunk-2BZFNEN2.js +4 -0
- package/dist/cli/chunks/chunk-2E5NQNSU.js +180 -0
- package/dist/cli/chunks/chunk-2I7J3O6V.js +2 -0
- package/dist/cli/chunks/chunk-3ADGXLTM.js +14 -0
- package/dist/cli/chunks/chunk-3IHG3WOY.js +12 -0
- package/dist/cli/chunks/chunk-3IUNFTIF.js +2 -0
- package/dist/cli/chunks/chunk-3JPRUND5.js +2 -0
- package/dist/cli/chunks/chunk-3NZLZHJI.js +2 -0
- package/dist/cli/chunks/chunk-3THRQEZ2.js +95 -0
- package/dist/cli/chunks/chunk-3ZOONQG6.js +2 -0
- package/dist/cli/chunks/chunk-4B6NCELM.js +2 -0
- package/dist/cli/chunks/chunk-4I2IOUS4.js +2 -0
- package/dist/cli/chunks/chunk-4VBTXZRM.js +2 -0
- package/dist/cli/chunks/chunk-4VUPRTVX.js +3 -0
- package/dist/cli/chunks/chunk-4YOMLWEK.js +70 -0
- package/dist/cli/chunks/chunk-4YS3IJ45.js +2 -0
- package/dist/cli/chunks/chunk-5SKGFSKD.js +2 -0
- package/dist/cli/chunks/chunk-5T2ZQWKF.js +27 -0
- package/dist/cli/chunks/chunk-62ADTHV7.js +2 -0
- package/dist/cli/chunks/chunk-6EOS7KX2.js +2 -0
- package/dist/cli/chunks/chunk-6SVX4DJC.js +6 -0
- package/dist/cli/chunks/chunk-72WOAVK6.js +2 -0
- package/dist/cli/chunks/chunk-7R6YMLVS.js +3 -0
- package/dist/cli/chunks/chunk-7VDBAVTY.js +2 -0
- package/dist/cli/chunks/chunk-AFLLQ5PP.js +15 -0
- package/dist/cli/chunks/chunk-AKE543X2.js +2 -0
- package/dist/cli/chunks/chunk-B36CDR4U.js +2 -0
- package/dist/cli/chunks/chunk-B6LLWYQ6.js +2 -0
- package/dist/cli/chunks/chunk-BDIEMZ22.js +91 -0
- package/dist/cli/chunks/chunk-BGXNSCXX.js +4 -0
- package/dist/cli/chunks/chunk-BLBRY5UD.js +2 -0
- package/dist/cli/chunks/chunk-BPWXXEH2.js +3029 -0
- package/dist/cli/chunks/chunk-BR26T7ZS.js +180 -0
- package/dist/cli/chunks/chunk-BTREG4IW.js +2 -0
- package/dist/cli/chunks/chunk-BULKFVYX.js +2 -0
- package/dist/cli/chunks/chunk-BXAXGEFC.js +24 -0
- package/dist/cli/chunks/chunk-CL6POIX4.js +2 -0
- package/dist/cli/chunks/chunk-CS2KS7LP.js +2 -0
- package/dist/cli/chunks/chunk-CWFB6BSA.js +316 -0
- package/dist/cli/chunks/chunk-DRT3WKQW.js +2 -0
- package/dist/cli/chunks/chunk-EHDQJQ6Y.js +27 -0
- package/dist/cli/chunks/chunk-ESVQ6MEB.js +2 -0
- package/dist/cli/chunks/chunk-FEKY7T6Q.js +2 -0
- package/dist/cli/chunks/chunk-FGA7VIFR.js +7 -0
- package/dist/cli/chunks/chunk-FIA6X7UL.js +2 -0
- package/dist/cli/chunks/chunk-GAOJV3OX.js +2 -0
- package/dist/cli/chunks/chunk-GKNNSCLC.js +5 -0
- package/dist/cli/chunks/chunk-GPQ57KA4.js +2 -0
- package/dist/cli/chunks/chunk-GRUUQAR6.js +2 -0
- package/dist/cli/chunks/chunk-HRO6OZQD.js +2 -0
- package/dist/cli/chunks/chunk-HY6PMO5W.js +66 -0
- package/dist/cli/chunks/chunk-IAV2JMIX.js +167 -0
- package/dist/cli/chunks/chunk-IFNIIK34.js +21 -0
- package/dist/cli/chunks/chunk-IGJPMN4I.js +3 -0
- package/dist/cli/chunks/chunk-J3KWWR6Z.js +1 -0
- package/dist/cli/chunks/chunk-JBANAPWG.js +2 -0
- package/dist/cli/chunks/chunk-JJO7Y4H3.js +604 -0
- package/dist/cli/chunks/chunk-JRYGQO2W.js +2 -0
- package/dist/cli/chunks/chunk-JXM26HEE.js +2 -0
- package/dist/cli/chunks/chunk-JZSDOIXA.js +2 -0
- package/dist/cli/chunks/chunk-KP5NUODU.js +3 -0
- package/dist/cli/chunks/chunk-LHJQD2VU.js +750 -0
- package/dist/cli/chunks/chunk-LNQIY6BP.js +2 -0
- package/dist/cli/chunks/chunk-MDUHYUHF.js +2 -0
- package/dist/cli/chunks/chunk-MV6CMOJQ.js +65 -0
- package/dist/cli/chunks/chunk-MZOFWJTM.js +2 -0
- package/dist/cli/chunks/chunk-N2NS2PHA.js +45 -0
- package/dist/cli/chunks/chunk-N4TL73TH.js +314 -0
- package/dist/cli/chunks/chunk-N5UXCLFI.js +2 -0
- package/dist/cli/chunks/chunk-NZ2VCPN4.js +2 -0
- package/dist/cli/chunks/chunk-OF4D7MYI.js +2 -0
- package/dist/cli/chunks/chunk-OI5NGQO2.js +2 -0
- package/dist/cli/chunks/chunk-OLHKGP35.js +2 -0
- package/dist/cli/chunks/chunk-QOVHWZEP.js +1 -0
- package/dist/cli/chunks/chunk-RFSN6IDA.js +79 -0
- package/dist/cli/chunks/chunk-RTGGL7D7.js +4 -0
- package/dist/cli/chunks/chunk-RU5WAHB7.js +3 -0
- package/dist/cli/chunks/chunk-SUSEVMZT.js +2 -0
- package/dist/cli/chunks/chunk-TLHP5EII.js +2 -0
- package/dist/cli/chunks/chunk-TWUWL5EJ.js +2 -0
- package/dist/cli/chunks/chunk-U5RN7YQW.js +2 -0
- package/dist/cli/chunks/chunk-UFUVUO3J.js +2 -0
- package/dist/cli/chunks/chunk-UQHYFOBX.js +16 -0
- package/dist/cli/chunks/chunk-VOS4NQSF.js +2 -0
- package/dist/cli/chunks/chunk-VSVXUTJN.js +256 -0
- package/dist/cli/chunks/chunk-WBQSXPBI.js +2 -0
- package/dist/cli/chunks/chunk-WGMPEW2T.js +2 -0
- package/dist/cli/chunks/chunk-WIEC7VKK.js +2 -0
- package/dist/cli/chunks/chunk-WJ3DLOXF.js +14 -0
- package/dist/cli/chunks/chunk-X3KI6JOY.js +9 -0
- package/dist/cli/chunks/chunk-X5IJGWYG.js +2 -0
- package/dist/cli/chunks/chunk-XIBDETCS.js +146 -0
- package/dist/cli/chunks/chunk-XLRQYLWW.js +2 -0
- package/dist/cli/chunks/chunk-XO6PVK2P.js +3 -0
- package/dist/cli/chunks/chunk-XRE2HCWG.js +3 -0
- package/dist/cli/chunks/chunk-XT2V2322.js +2 -0
- package/dist/cli/chunks/chunk-Y7BHKZFJ.js +18 -0
- package/dist/cli/chunks/chunk-YAGODYIG.js +59 -0
- package/dist/cli/chunks/chunk-YANUP2RO.js +2 -0
- package/dist/cli/chunks/chunk-YPFOCNOE.js +30 -0
- package/dist/cli/chunks/chunk-YR6ZZGH7.js +81 -0
- package/dist/cli/chunks/chunk-YVA65UZL.js +2 -0
- package/dist/cli/chunks/chunk-YW2THB5Q.js +2 -0
- package/dist/cli/chunks/chunk-ZAPS3UGQ.js +20 -0
- package/dist/cli/chunks/chunk-ZDATDCYN.js +2 -0
- package/dist/cli/chunks/ci-J374KDLI.js +81 -0
- package/dist/cli/chunks/ci-output-7JN7F6CI.js +2 -0
- package/dist/cli/chunks/claude-flow-setup-245JLJCN.js +2 -0
- package/dist/cli/chunks/client-MCSNSH2C.js +2 -0
- package/dist/cli/chunks/cline-installer-LBA2M5N3.js +4 -0
- package/dist/cli/chunks/code-U4N4WONM.js +38 -0
- package/dist/cli/chunks/code-index-extractor-A57Z6BO4.js +3 -0
- package/dist/cli/chunks/codex-installer-UXMK2N4T.js +8 -0
- package/dist/cli/chunks/completions-W66BSCOE.js +1364 -0
- package/dist/cli/chunks/complexity-analyzer-AB4OZARV.js +2 -0
- package/dist/cli/chunks/continuedev-installer-LRFZ2SJM.js +14 -0
- package/dist/cli/chunks/copilot-installer-CQ3JYBIB.js +3 -0
- package/dist/cli/chunks/cost-tracker-4F723RB6.js +2 -0
- package/dist/cli/chunks/coverage-4PUEQXAY.js +27 -0
- package/dist/cli/chunks/cross-domain-router-OWR5IJ5G.js +2 -0
- package/dist/cli/chunks/cursor-installer-JZEDEDHA.js +3 -0
- package/dist/cli/chunks/daemon-B7TWGHXQ.js +19 -0
- package/dist/cli/chunks/dag-attention-scheduler-JWO6XI6A.js +2 -0
- package/dist/cli/chunks/detect-L6ZZHUSX.js +2 -0
- package/dist/cli/chunks/domain-handler-FT5FLZWL.js +25 -0
- package/dist/cli/chunks/domain-transfer-5Y4FGJAJ.js +2 -0
- package/dist/cli/chunks/dream-4TDBIYED.js +2 -0
- package/dist/cli/chunks/esm-node-2PKHKOTS.js +2 -0
- package/dist/cli/chunks/eval-GHMPFGWV.js +15 -0
- package/dist/cli/chunks/fast-paths-B3R647KN.js +2 -0
- package/dist/cli/chunks/feature-flags-DWS7ARSX.js +2 -0
- package/dist/cli/chunks/feature-flags-IVQ3AL4Q.js +2 -0
- package/dist/cli/chunks/file-discovery-QFPA6GMV.js +2 -0
- package/dist/cli/chunks/fleet-EKOKMOMW.js +43 -0
- package/dist/cli/chunks/gnn-wrapper-OYC55N5E.js +2 -0
- package/dist/cli/chunks/heartbeat-handler-MBBS4IBU.js +48 -0
- package/dist/cli/chunks/heartbeat-scheduler-XDGMOT7X.js +2 -0
- package/dist/cli/chunks/hnsw-index-YO7CT23I.js +2 -0
- package/dist/cli/chunks/hnswlib-node-56YWVXFE.js +2 -0
- package/dist/cli/chunks/hooks-L5VLZGEK.js +101 -0
- package/dist/cli/chunks/hypergraph-engine-A4Y2ZRAG.js +2 -0
- package/dist/cli/chunks/hypergraph-handler-3HDGB5SZ.js +35 -0
- package/dist/cli/chunks/impact-analyzer-UEIGXSZ4.js +2 -0
- package/dist/cli/chunks/init-handler-JDET6WUN.js +68 -0
- package/dist/cli/chunks/init-wizard-JWZUGIPJ.js +2 -0
- package/dist/cli/chunks/kernel-YNDTVKIW.js +2 -0
- package/dist/cli/chunks/kilocode-installer-GZZG5AFW.js +4 -0
- package/dist/cli/chunks/kiro-installer-IWNY5TKH.js +74 -0
- package/dist/cli/chunks/knowledge-graph-NGJKFTSN.js +2 -0
- package/dist/cli/chunks/learning-722ZNSZ6.js +107 -0
- package/dist/cli/chunks/llm-router-DNAV746L.js +30 -0
- package/dist/cli/chunks/load-Y3GCUFM4.js +2 -0
- package/dist/cli/chunks/load-test-GZUBXFF3.js +2 -0
- package/dist/cli/chunks/mcp-LKPIBZ3W.js +2 -0
- package/dist/cli/chunks/memory-L57MLFOP.js +32 -0
- package/dist/cli/chunks/memory-backend-3NQIZUXE.js +2 -0
- package/dist/cli/chunks/memory-handlers-MDZQ7HVW.js +2 -0
- package/dist/cli/chunks/opencode-installer-4HUB36H5.js +3 -0
- package/dist/cli/chunks/orchestrator-QHSBB2UC.js +371 -0
- package/dist/cli/chunks/pipeline-D3QER35Z.js +19 -0
- package/dist/cli/chunks/platform-T4E7Q3RD.js +2 -0
- package/dist/cli/chunks/plugin-JHW2YPRC.js +27 -0
- package/dist/cli/chunks/prime-radiant-advanced-wasm-G7CFNNQV.js +2 -0
- package/dist/cli/chunks/protocol-executor-SPUVRDWT.js +2 -0
- package/dist/cli/chunks/protocol-handler-2BQQ4HDM.js +20 -0
- package/dist/cli/chunks/prove-UQ6JFT73.js +3 -0
- package/dist/cli/chunks/qe-reasoning-bank-3HBK2FVD.js +2 -0
- package/dist/cli/chunks/quality-JRZYMC77.js +7 -0
- package/dist/cli/chunks/queen-coordinator-RW3NKO5A.js +2 -0
- package/dist/cli/chunks/real-embeddings-GK63VF35.js +2 -0
- package/dist/cli/chunks/roocode-installer-F4E2LAYR.js +4 -0
- package/dist/cli/chunks/router-RJGHWDQ3.js +2 -0
- package/dist/cli/chunks/routing-feedback-ZXBXFKX6.js +2 -0
- package/dist/cli/chunks/routing-handler-VNKFUUGB.js +20 -0
- package/dist/cli/chunks/ruvector-commands-2TLNHC3A.js +8 -0
- package/dist/cli/chunks/rvf-dual-writer-MQW2SJLT.js +2 -0
- package/dist/cli/chunks/rvf-native-adapter-LKFKTMUN.js +2 -0
- package/dist/cli/chunks/safe-db-G22E5ROA.js +2 -0
- package/dist/cli/chunks/schedule-Y7VVCPYV.js +2 -0
- package/dist/cli/chunks/scheduler-AUQIFQB7.js +2 -0
- package/dist/cli/chunks/security-EBEG2OPU.js +14 -0
- package/dist/cli/chunks/shared-rvf-dual-writer-BVSCQAFS.js +2 -0
- package/dist/cli/chunks/sqlite-persistence-JAVHUGGL.js +2 -0
- package/dist/cli/chunks/status-handler-VZ32M4G4.js +45 -0
- package/dist/cli/chunks/structural-health-K6LRCKV6.js +2 -0
- package/dist/cli/chunks/sync-MHSHNLIM.js +23 -0
- package/dist/cli/chunks/task-handler-JNOIBZ2G.js +49 -0
- package/dist/cli/chunks/task-handlers-P5DSUKND.js +2 -0
- package/dist/cli/chunks/test-DO22BNIL.js +33 -0
- package/dist/cli/chunks/test-scheduling-VLRQZEFL.js +15 -0
- package/dist/cli/chunks/token-bootstrap-4VJKGVMK.js +2 -0
- package/dist/cli/chunks/token-usage-LG3PXRXH.js +25 -0
- package/dist/cli/chunks/transformers-GY7SIKEU.js +2 -0
- package/dist/cli/chunks/tree-sitter-wasm-parser-FT2KB66N.js +2 -0
- package/dist/cli/chunks/types-QJGNBKP2.js +2 -0
- package/dist/cli/chunks/unified-memory-XYGENQUT.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-MVEGQBF3.js +2 -0
- package/dist/cli/chunks/unified-persistence-PFRCWEUG.js +2 -0
- package/dist/cli/chunks/validate-VQCRSVNQ.js +21 -0
- package/dist/cli/chunks/validate-swarm-A5DHAWTP.js +14 -0
- package/dist/cli/chunks/vibium-RZBSL4EB.js +2 -0
- package/dist/cli/chunks/visual-security-V47BLGJM.js +2 -0
- package/dist/cli/chunks/web-tree-sitter-7C4NXEOF.js +2 -0
- package/dist/cli/chunks/windsurf-installer-ES3KPQG3.js +7 -0
- package/dist/cli/chunks/witness-chain-BR63P4A7.js +2 -0
- package/dist/cli/chunks/workflow-JETHX4ML.js +51 -0
- package/dist/cli/chunks/workflow-orchestrator-7PZMX3JZ.js +2 -0
- package/dist/cli/chunks/wrappers-WP5RH745.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/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/consensus/providers/claude-provider.d.ts +1 -0
- package/dist/coordination/consensus/providers/claude-provider.js +23 -3
- 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/kernel/kernel.js +35 -0
- package/dist/kernel/memory-backend.js +3 -1
- package/dist/mcp/bundle.js +405 -351
- package/dist/mcp/entry.js +132 -77
- 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 +11 -0
- package/dist/mcp/protocol-server.js +130 -35
- 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 +1 -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 +1 -1
|
@@ -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,
|
|
@@ -48,6 +55,12 @@ export class MCPProtocolServer {
|
|
|
48
55
|
monitor = getPerformanceMonitor();
|
|
49
56
|
// AG-UI EventAdapter for streaming events to HTTP clients
|
|
50
57
|
eventAdapter;
|
|
58
|
+
// IMP-00: Middleware chain for pre/post tool-call hooks
|
|
59
|
+
middlewareChain;
|
|
60
|
+
// IMP-04: Session durability store
|
|
61
|
+
sessionStore;
|
|
62
|
+
// IMP-08: 4-tier context compaction pipeline
|
|
63
|
+
compactionPipeline;
|
|
51
64
|
// Connection recovery state
|
|
52
65
|
reconnecting = false;
|
|
53
66
|
pendingRequests = [];
|
|
@@ -64,6 +77,23 @@ export class MCPProtocolServer {
|
|
|
64
77
|
this.registry = createToolRegistry();
|
|
65
78
|
// Initialize AG-UI EventAdapter for streaming
|
|
66
79
|
this.eventAdapter = createEventAdapter();
|
|
80
|
+
// IMP-00: Initialize middleware chain
|
|
81
|
+
this.middlewareChain = new MiddlewareChain();
|
|
82
|
+
// IMP-04: Initialize session store and register durability middleware
|
|
83
|
+
this.sessionStore = new SessionStore();
|
|
84
|
+
this.sessionStore.startSession();
|
|
85
|
+
this.middlewareChain.register(createSessionDurabilityMiddleware(this.sessionStore));
|
|
86
|
+
// IMP-01: Register microcompact middleware for stale result eviction
|
|
87
|
+
// Extract the engine so it can be shared with IMP-08's Tier 1
|
|
88
|
+
const microcompact = createMicrocompactMiddleware();
|
|
89
|
+
this.middlewareChain.register(microcompact.middleware);
|
|
90
|
+
// IMP-08: Initialize 4-tier compaction pipeline with shared microcompact engine
|
|
91
|
+
// and LLM caller for Tier 3 (falls back to extractive if no API key)
|
|
92
|
+
this.compactionPipeline = new CompactionPipeline({
|
|
93
|
+
sharedMicrocompactEngine: microcompact.engine,
|
|
94
|
+
llmCaller: createLLMCompactCaller(),
|
|
95
|
+
});
|
|
96
|
+
this.middlewareChain.register(this.compactionPipeline.createMiddleware());
|
|
67
97
|
// Register all tools
|
|
68
98
|
this.registerAllTools();
|
|
69
99
|
}
|
|
@@ -119,52 +149,61 @@ export class MCPProtocolServer {
|
|
|
119
149
|
if (this.reconnecting)
|
|
120
150
|
return;
|
|
121
151
|
this.reconnecting = true;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
152
|
+
try {
|
|
153
|
+
// IMP-03: Use unified retry engine instead of hardcoded loop
|
|
154
|
+
const { attempts } = await withRetry(async () => { this.transport.reconnect(); }, {
|
|
155
|
+
maxAttempts: 3,
|
|
156
|
+
baseDelayMs: 1000,
|
|
157
|
+
maxDelayMs: 8000,
|
|
158
|
+
jitterFraction: 0.25,
|
|
159
|
+
onRetry: (attempt, _error, delayMs) => {
|
|
160
|
+
console.error(`[MCP] Reconnect attempt ${attempt + 1}/3 in ${Math.round(delayMs)}ms...`);
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
console.error(`[MCP] Reconnected after ${attempts} attempt(s)`);
|
|
164
|
+
this.reconnecting = false;
|
|
165
|
+
// Replay any buffered requests
|
|
166
|
+
const buffered = [...this.pendingRequests];
|
|
167
|
+
this.pendingRequests = [];
|
|
168
|
+
for (const { resolve, request } of buffered) {
|
|
169
|
+
try {
|
|
170
|
+
const result = await this.handleRequest(request);
|
|
171
|
+
resolve(result);
|
|
172
|
+
}
|
|
173
|
+
catch (err) {
|
|
174
|
+
console.error(`[MCP] Failed to replay buffered request: ${request.method}`);
|
|
143
175
|
}
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
catch (err) {
|
|
147
|
-
console.error(`[MCP] Reconnect attempt ${attempt + 1} failed: ${err instanceof Error ? err.message : err}`);
|
|
148
176
|
}
|
|
149
177
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
178
|
+
catch {
|
|
179
|
+
this.reconnecting = false;
|
|
180
|
+
console.error('[MCP] All reconnect attempts failed. Tools unavailable until transport is restored.');
|
|
181
|
+
// Reject all buffered requests
|
|
182
|
+
const buffered = [...this.pendingRequests];
|
|
183
|
+
this.pendingRequests = [];
|
|
184
|
+
for (const { reject } of buffered) {
|
|
185
|
+
reject(new Error('MCP connection lost and reconnect failed'));
|
|
186
|
+
}
|
|
157
187
|
}
|
|
158
188
|
}
|
|
159
189
|
/**
|
|
160
190
|
* Stop the MCP server
|
|
161
191
|
*/
|
|
162
192
|
async stop() {
|
|
193
|
+
this.sessionStore.close(); // IMP-04: Flush session before shutdown
|
|
163
194
|
this.transport.stop();
|
|
164
195
|
await disposeFleet();
|
|
165
196
|
await shutdownConnectionPool();
|
|
166
197
|
console.error('[MCP] Server stopped');
|
|
167
198
|
}
|
|
199
|
+
/** IMP-00: Register a middleware into the tool-call chain. */
|
|
200
|
+
registerMiddleware(mw) {
|
|
201
|
+
this.middlewareChain.register(mw);
|
|
202
|
+
}
|
|
203
|
+
/** IMP-00: Get registered middleware (for testing/introspection). */
|
|
204
|
+
getMiddleware() {
|
|
205
|
+
return this.middlewareChain.getRegistered();
|
|
206
|
+
}
|
|
168
207
|
/**
|
|
169
208
|
* Get server capabilities
|
|
170
209
|
*/
|
|
@@ -309,13 +348,24 @@ export class MCPProtocolServer {
|
|
|
309
348
|
toolName: name,
|
|
310
349
|
timestamp: new Date().toISOString(),
|
|
311
350
|
});
|
|
351
|
+
// IMP-00: Build middleware context
|
|
352
|
+
const ctx = {
|
|
353
|
+
toolName: name,
|
|
354
|
+
params: args,
|
|
355
|
+
timestamp: Date.now(),
|
|
356
|
+
metadata: { stepId },
|
|
357
|
+
};
|
|
312
358
|
try {
|
|
313
|
-
|
|
359
|
+
// IMP-00: Execute pre-tool-call middleware
|
|
360
|
+
const processedCtx = await this.middlewareChain.executePreHooks(ctx);
|
|
361
|
+
const result = await tool.handler(processedCtx.params);
|
|
314
362
|
success = true;
|
|
363
|
+
// IMP-00: Execute post-tool-result middleware
|
|
364
|
+
const processedResult = await this.middlewareChain.executePostHooks(processedCtx, result);
|
|
315
365
|
// Emit AG-UI result event for tool completion
|
|
316
366
|
this.eventAdapter.adapt({
|
|
317
367
|
success: true,
|
|
318
|
-
data:
|
|
368
|
+
data: processedResult,
|
|
319
369
|
metadata: {
|
|
320
370
|
executionTime: performance.now() - startTime,
|
|
321
371
|
requestId: stepId,
|
|
@@ -325,13 +375,29 @@ export class MCPProtocolServer {
|
|
|
325
375
|
content: [
|
|
326
376
|
{
|
|
327
377
|
type: 'text',
|
|
328
|
-
text: JSON.stringify(
|
|
378
|
+
text: JSON.stringify(processedResult, null, 2),
|
|
329
379
|
},
|
|
330
380
|
],
|
|
331
381
|
};
|
|
332
382
|
}
|
|
333
383
|
catch (err) {
|
|
334
384
|
const error = err;
|
|
385
|
+
// IMP-08: Detect context overflow (413) and trigger reactive compaction
|
|
386
|
+
const errorMsg = error.message || '';
|
|
387
|
+
const is413 = errorMsg.includes('413')
|
|
388
|
+
|| errorMsg.includes('context_length_exceeded')
|
|
389
|
+
|| errorMsg.includes('maximum context length')
|
|
390
|
+
|| errorMsg.includes('too many tokens');
|
|
391
|
+
if (is413) {
|
|
392
|
+
try {
|
|
393
|
+
await this.compactionPipeline.handleOverflow('status_413');
|
|
394
|
+
}
|
|
395
|
+
catch {
|
|
396
|
+
// Compaction failed — continue with error response
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
// IMP-00: Execute error middleware
|
|
400
|
+
await this.middlewareChain.executeErrorHooks(ctx, error);
|
|
335
401
|
// Emit AG-UI result event for tool failure
|
|
336
402
|
this.eventAdapter.adapt({
|
|
337
403
|
success: false,
|
|
@@ -380,6 +446,7 @@ export class MCPProtocolServer {
|
|
|
380
446
|
name: 'fleet_status',
|
|
381
447
|
description: 'Get fleet status: agents, tasks, health, and learning stats. Example: fleet_status({ verbose: true })',
|
|
382
448
|
category: 'core',
|
|
449
|
+
isConcurrencySafe: true,
|
|
383
450
|
parameters: [
|
|
384
451
|
{ name: 'verbose', type: 'boolean', description: 'Include detailed information', default: false },
|
|
385
452
|
],
|
|
@@ -391,6 +458,7 @@ export class MCPProtocolServer {
|
|
|
391
458
|
name: 'fleet_health',
|
|
392
459
|
description: 'Check fleet and per-domain health status with load metrics. Example: fleet_health({ domain: "test-generation" })',
|
|
393
460
|
category: 'core',
|
|
461
|
+
isConcurrencySafe: true,
|
|
394
462
|
parameters: [
|
|
395
463
|
{ name: 'domain', type: 'string', description: 'Specific domain to check' },
|
|
396
464
|
],
|
|
@@ -416,6 +484,7 @@ export class MCPProtocolServer {
|
|
|
416
484
|
name: 'task_list',
|
|
417
485
|
description: 'List tasks with optional status/limit filtering. Example: task_list({ status: "running", limit: 10 })',
|
|
418
486
|
category: 'task',
|
|
487
|
+
isConcurrencySafe: true,
|
|
419
488
|
parameters: [
|
|
420
489
|
{ name: 'status', type: 'string', description: 'Filter by status' },
|
|
421
490
|
{ name: 'limit', type: 'number', description: 'Maximum results', default: 50 },
|
|
@@ -428,6 +497,7 @@ export class MCPProtocolServer {
|
|
|
428
497
|
name: 'task_status',
|
|
429
498
|
description: 'Get detailed status, progress, and result of a specific task. Example: task_status({ taskId: "abc-123" })',
|
|
430
499
|
category: 'task',
|
|
500
|
+
isConcurrencySafe: true,
|
|
431
501
|
parameters: [
|
|
432
502
|
{ name: 'taskId', type: 'string', description: 'Task ID', required: true },
|
|
433
503
|
],
|
|
@@ -463,6 +533,7 @@ export class MCPProtocolServer {
|
|
|
463
533
|
name: 'agent_list',
|
|
464
534
|
description: 'List all active agents, optionally filtered by domain. Example: agent_list({ domain: "test-generation" })',
|
|
465
535
|
category: 'agent',
|
|
536
|
+
isConcurrencySafe: true,
|
|
466
537
|
parameters: [
|
|
467
538
|
{ name: 'domain', type: 'string', description: 'Filter by domain' },
|
|
468
539
|
],
|
|
@@ -486,6 +557,7 @@ export class MCPProtocolServer {
|
|
|
486
557
|
name: 'agent_metrics',
|
|
487
558
|
description: 'Get CPU, memory, and task performance metrics for agents. Example: agent_metrics({ agentId: "agent-1" })',
|
|
488
559
|
category: 'agent',
|
|
560
|
+
isConcurrencySafe: true,
|
|
489
561
|
parameters: [
|
|
490
562
|
{ name: 'agentId', type: 'string', description: 'Specific agent ID' },
|
|
491
563
|
],
|
|
@@ -497,6 +569,7 @@ export class MCPProtocolServer {
|
|
|
497
569
|
name: 'agent_status',
|
|
498
570
|
description: 'Get detailed status and current task of a specific agent. Example: agent_status({ agentId: "agent-1" })',
|
|
499
571
|
category: 'agent',
|
|
572
|
+
isConcurrencySafe: true,
|
|
500
573
|
parameters: [
|
|
501
574
|
{ name: 'agentId', type: 'string', description: 'Agent ID', required: true },
|
|
502
575
|
],
|
|
@@ -509,6 +582,7 @@ export class MCPProtocolServer {
|
|
|
509
582
|
name: 'team_list',
|
|
510
583
|
description: 'List all active domain teams and their agent counts. Example: team_list({ domain: "coverage-analysis" })',
|
|
511
584
|
category: 'agent',
|
|
585
|
+
isConcurrencySafe: true,
|
|
512
586
|
parameters: [
|
|
513
587
|
{ name: 'domain', type: 'string', description: 'Filter by domain' },
|
|
514
588
|
],
|
|
@@ -520,6 +594,7 @@ export class MCPProtocolServer {
|
|
|
520
594
|
name: 'team_health',
|
|
521
595
|
description: 'Get team health, agent utilization, and consensus status for a domain. Example: team_health({ domain: "security-compliance" })',
|
|
522
596
|
category: 'agent',
|
|
597
|
+
isConcurrencySafe: true,
|
|
523
598
|
parameters: [
|
|
524
599
|
{ name: 'domain', type: 'string', description: 'Domain to check', required: true },
|
|
525
600
|
],
|
|
@@ -608,6 +683,7 @@ export class MCPProtocolServer {
|
|
|
608
683
|
name: 'coverage_analyze_sublinear',
|
|
609
684
|
description: 'Analyze code coverage with O(log n) sublinear algorithm and ML-powered gap detection. Example: coverage_analyze_sublinear({ target: "src/", detectGaps: true })',
|
|
610
685
|
category: 'domain',
|
|
686
|
+
isConcurrencySafe: true,
|
|
611
687
|
parameters: [
|
|
612
688
|
{ name: 'target', type: 'string', description: 'Target path to analyze' },
|
|
613
689
|
{ name: 'detectGaps', type: 'boolean', description: 'Detect coverage gaps', default: true },
|
|
@@ -621,6 +697,7 @@ export class MCPProtocolServer {
|
|
|
621
697
|
name: 'quality_assess',
|
|
622
698
|
description: 'Assess code quality metrics and optionally run a pass/fail quality gate. Example: quality_assess({ runGate: true })',
|
|
623
699
|
category: 'domain',
|
|
700
|
+
isConcurrencySafe: true,
|
|
624
701
|
parameters: [
|
|
625
702
|
{ name: 'runGate', type: 'boolean', description: 'Run quality gate evaluation', default: false },
|
|
626
703
|
],
|
|
@@ -685,6 +762,7 @@ export class MCPProtocolServer {
|
|
|
685
762
|
name: 'defect_predict',
|
|
686
763
|
description: 'Predict potential defects using AI analysis of code complexity and change history. Example: defect_predict({ target: "src/auth/" })',
|
|
687
764
|
category: 'domain',
|
|
765
|
+
isConcurrencySafe: true,
|
|
688
766
|
parameters: [
|
|
689
767
|
{ name: 'target', type: 'string', description: 'Target path' },
|
|
690
768
|
],
|
|
@@ -697,6 +775,7 @@ export class MCPProtocolServer {
|
|
|
697
775
|
name: 'requirements_validate',
|
|
698
776
|
description: 'Validate requirements for completeness and generate BDD scenarios. Example: requirements_validate({ requirementsPath: "docs/requirements.md" })',
|
|
699
777
|
category: 'domain',
|
|
778
|
+
isConcurrencySafe: true,
|
|
700
779
|
parameters: [
|
|
701
780
|
{ name: 'requirementsPath', type: 'string', description: 'Path to requirements' },
|
|
702
781
|
],
|
|
@@ -709,6 +788,7 @@ export class MCPProtocolServer {
|
|
|
709
788
|
name: 'code_index',
|
|
710
789
|
description: 'Index source code into the knowledge graph for dependency and impact analysis. Example: code_index({ target: "src/" })',
|
|
711
790
|
category: 'domain',
|
|
791
|
+
isConcurrencySafe: true,
|
|
712
792
|
parameters: [
|
|
713
793
|
{ name: 'target', type: 'string', description: 'Target path' },
|
|
714
794
|
],
|
|
@@ -734,6 +814,7 @@ export class MCPProtocolServer {
|
|
|
734
814
|
name: 'memory_retrieve',
|
|
735
815
|
description: 'Retrieve a value by key from memory. Example: memory_retrieve({ key: "pattern-auth", namespace: "patterns" })',
|
|
736
816
|
category: 'memory',
|
|
817
|
+
isConcurrencySafe: true,
|
|
737
818
|
parameters: [
|
|
738
819
|
{ name: 'key', type: 'string', description: 'Memory key', required: true },
|
|
739
820
|
{ name: 'namespace', type: 'string', description: 'Memory namespace', default: 'default' },
|
|
@@ -746,6 +827,7 @@ export class MCPProtocolServer {
|
|
|
746
827
|
name: 'memory_query',
|
|
747
828
|
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
829
|
category: 'memory',
|
|
830
|
+
isConcurrencySafe: true,
|
|
749
831
|
parameters: [
|
|
750
832
|
{ name: 'pattern', type: 'string', description: 'Key pattern (glob) or natural language query (for semantic search)' },
|
|
751
833
|
{ name: 'namespace', type: 'string', description: 'Memory namespace' },
|
|
@@ -771,6 +853,7 @@ export class MCPProtocolServer {
|
|
|
771
853
|
name: 'memory_usage',
|
|
772
854
|
description: 'Get memory usage statistics: entry counts, namespaces, and storage size. Example: memory_usage({})',
|
|
773
855
|
category: 'memory',
|
|
856
|
+
isConcurrencySafe: true,
|
|
774
857
|
parameters: [],
|
|
775
858
|
},
|
|
776
859
|
handler: () => handleMemoryUsage(),
|
|
@@ -813,6 +896,7 @@ export class MCPProtocolServer {
|
|
|
813
896
|
name: 'routing_metrics',
|
|
814
897
|
description: 'Get model routing statistics: tier distribution, cost savings, and routing log. Example: routing_metrics({ includeLog: true, logLimit: 20 })',
|
|
815
898
|
category: 'routing',
|
|
899
|
+
isConcurrencySafe: true,
|
|
816
900
|
parameters: [
|
|
817
901
|
{ name: 'includeLog', type: 'boolean', description: 'Include routing log entries', default: false },
|
|
818
902
|
{ name: 'logLimit', type: 'number', description: 'Max log entries to return', default: 100 },
|
|
@@ -825,6 +909,7 @@ export class MCPProtocolServer {
|
|
|
825
909
|
name: 'routing_economics',
|
|
826
910
|
description: 'Get economic routing report: tier efficiency, budget status, cost-per-quality analysis, and savings opportunities. Example: routing_economics({ taskComplexity: 0.5 })',
|
|
827
911
|
category: 'routing',
|
|
912
|
+
isConcurrencySafe: true,
|
|
828
913
|
parameters: [
|
|
829
914
|
{ name: 'taskComplexity', type: 'number', description: 'Task complexity score 0-1 for tier scoring (default: 0.5)', default: 0.5 },
|
|
830
915
|
],
|
|
@@ -837,6 +922,7 @@ export class MCPProtocolServer {
|
|
|
837
922
|
name: 'infra_healing_status',
|
|
838
923
|
description: 'Get infrastructure self-healing status: detected failures, recovery stats, and failing services. Example: infra_healing_status({ verbose: true })',
|
|
839
924
|
category: 'infra-healing',
|
|
925
|
+
isConcurrencySafe: true,
|
|
840
926
|
parameters: [
|
|
841
927
|
{ name: 'verbose', type: 'boolean', description: 'Include detailed observation data', default: false },
|
|
842
928
|
],
|
|
@@ -886,6 +972,7 @@ export class MCPProtocolServer {
|
|
|
886
972
|
name: 'cross_phase_query',
|
|
887
973
|
description: 'Query cross-phase signals by loop type with optional filters',
|
|
888
974
|
category: 'cross-phase',
|
|
975
|
+
isConcurrencySafe: true,
|
|
889
976
|
parameters: [
|
|
890
977
|
{ name: 'loop', type: 'string', description: 'Feedback loop type', required: true, enum: ['strategic', 'tactical', 'operational', 'quality-criteria'] },
|
|
891
978
|
{ name: 'maxAge', type: 'string', description: 'Maximum signal age (e.g., "30d", "24h")' },
|
|
@@ -935,6 +1022,7 @@ export class MCPProtocolServer {
|
|
|
935
1022
|
name: 'cross_phase_stats',
|
|
936
1023
|
description: 'Get cross-phase memory statistics (total signals, by loop, by namespace)',
|
|
937
1024
|
category: 'cross-phase',
|
|
1025
|
+
isConcurrencySafe: true,
|
|
938
1026
|
parameters: [],
|
|
939
1027
|
},
|
|
940
1028
|
handler: () => handleCrossPhaseStats(),
|
|
@@ -944,6 +1032,7 @@ export class MCPProtocolServer {
|
|
|
944
1032
|
name: 'format_signals',
|
|
945
1033
|
description: 'Format cross-phase signals for injection into agent prompts',
|
|
946
1034
|
category: 'cross-phase',
|
|
1035
|
+
isConcurrencySafe: true,
|
|
947
1036
|
parameters: [
|
|
948
1037
|
{ name: 'signals', type: 'array', description: 'Signals to format', required: true },
|
|
949
1038
|
],
|
|
@@ -1010,6 +1099,7 @@ export class MCPProtocolServer {
|
|
|
1010
1099
|
name: 'pipeline_list',
|
|
1011
1100
|
description: 'List all loaded YAML pipelines. Example: pipeline_list({})',
|
|
1012
1101
|
category: 'coordination',
|
|
1102
|
+
isConcurrencySafe: true,
|
|
1013
1103
|
parameters: [],
|
|
1014
1104
|
},
|
|
1015
1105
|
handler: (params) => handlePipelineList(params),
|
|
@@ -1019,6 +1109,7 @@ export class MCPProtocolServer {
|
|
|
1019
1109
|
name: 'pipeline_validate',
|
|
1020
1110
|
description: 'Validate a YAML pipeline definition without loading it. Example: pipeline_validate({ yaml: "name: test\\nsteps: ..." })',
|
|
1021
1111
|
category: 'coordination',
|
|
1112
|
+
isConcurrencySafe: true,
|
|
1022
1113
|
parameters: [
|
|
1023
1114
|
{ name: 'yaml', type: 'string', description: 'YAML pipeline definition to validate', required: true },
|
|
1024
1115
|
{ name: 'variables', type: 'object', description: 'Variable substitutions for validation' },
|
|
@@ -1034,18 +1125,21 @@ export class MCPProtocolServer {
|
|
|
1034
1125
|
name: 'session_cache_stats',
|
|
1035
1126
|
description: 'Get session operation cache statistics: hit rate, cache size, tokens saved via O(1) fingerprint reuse. Example: session_cache_stats({})',
|
|
1036
1127
|
category: 'learning',
|
|
1128
|
+
isConcurrencySafe: true,
|
|
1037
1129
|
parameters: [],
|
|
1038
1130
|
},
|
|
1039
1131
|
handler: async () => {
|
|
1040
1132
|
try {
|
|
1041
1133
|
const { getSessionCache } = await import('../optimization/session-cache.js');
|
|
1042
1134
|
const stats = getSessionCache().getStats();
|
|
1135
|
+
const compactionStats = this.compactionPipeline.getStats();
|
|
1043
1136
|
return {
|
|
1044
1137
|
success: true,
|
|
1045
1138
|
data: {
|
|
1046
1139
|
...stats,
|
|
1047
1140
|
hitRatePercent: `${(stats.hitRate * 100).toFixed(1)}%`,
|
|
1048
1141
|
description: 'Session cache provides O(1) exact-match lookups before HNSW similarity search',
|
|
1142
|
+
compaction: compactionStats,
|
|
1049
1143
|
},
|
|
1050
1144
|
};
|
|
1051
1145
|
}
|
|
@@ -1065,6 +1159,7 @@ export class MCPProtocolServer {
|
|
|
1065
1159
|
name: 'aqe_health',
|
|
1066
1160
|
description: 'Check AQE server health: returns status, loaded domains, memory stats, HNSW index status, and pattern count. Example: aqe_health({})',
|
|
1067
1161
|
category: 'core',
|
|
1162
|
+
isConcurrencySafe: true,
|
|
1068
1163
|
parameters: [],
|
|
1069
1164
|
},
|
|
1070
1165
|
handler: () => handleAQEHealth(),
|
|
@@ -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
|