agentic-qe 3.8.13 → 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.
Files changed (359) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +48 -0
  3. package/dist/adapters/a2ui/integration/agui-sync.js +2 -1
  4. package/dist/audit/witness-chain.js +15 -3
  5. package/dist/boot/fast-paths.d.ts +24 -0
  6. package/dist/boot/fast-paths.js +43 -0
  7. package/dist/boot/parallel-prefetch.d.ts +26 -0
  8. package/dist/boot/parallel-prefetch.js +36 -0
  9. package/dist/cli/bundle.js +12 -9431
  10. package/dist/cli/chunks/adapter-WBR5NXS3.js +2 -0
  11. package/dist/cli/chunks/agent-booster-wasm-PQYB7VRU.js +2 -0
  12. package/dist/cli/chunks/agent-handler-QDAB5NQS.js +33 -0
  13. package/dist/cli/chunks/aqe-learning-engine-TK4JQCGT.js +2 -0
  14. package/dist/cli/chunks/audit-S7JUYYVP.js +3 -0
  15. package/dist/cli/chunks/base-2WXOSMBQ.js +2 -0
  16. package/dist/cli/chunks/better-sqlite3-7KY2RDXO.js +2 -0
  17. package/dist/cli/chunks/brain-handler-PPEGDCN4.js +68 -0
  18. package/dist/cli/chunks/branch-enumerator-XK4V5W7L.js +7 -0
  19. package/dist/cli/chunks/browser-PALA5PL3.js +4 -0
  20. package/dist/cli/chunks/browser-workflow-42F7GK5T.js +2 -0
  21. package/dist/cli/chunks/chunk-24FKIJNC.js +15 -0
  22. package/dist/cli/chunks/chunk-263XS447.js +2 -0
  23. package/dist/cli/chunks/chunk-2BZFNEN2.js +4 -0
  24. package/dist/cli/chunks/chunk-2E5NQNSU.js +180 -0
  25. package/dist/cli/chunks/chunk-2I7J3O6V.js +2 -0
  26. package/dist/cli/chunks/chunk-3ADGXLTM.js +14 -0
  27. package/dist/cli/chunks/chunk-3IHG3WOY.js +12 -0
  28. package/dist/cli/chunks/chunk-3IUNFTIF.js +2 -0
  29. package/dist/cli/chunks/chunk-3JPRUND5.js +2 -0
  30. package/dist/cli/chunks/chunk-3NZLZHJI.js +2 -0
  31. package/dist/cli/chunks/chunk-3THRQEZ2.js +95 -0
  32. package/dist/cli/chunks/chunk-3ZOONQG6.js +2 -0
  33. package/dist/cli/chunks/chunk-4B6NCELM.js +2 -0
  34. package/dist/cli/chunks/chunk-4I2IOUS4.js +2 -0
  35. package/dist/cli/chunks/chunk-4VBTXZRM.js +2 -0
  36. package/dist/cli/chunks/chunk-4VUPRTVX.js +3 -0
  37. package/dist/cli/chunks/chunk-4YOMLWEK.js +70 -0
  38. package/dist/cli/chunks/chunk-4YS3IJ45.js +2 -0
  39. package/dist/cli/chunks/chunk-5SKGFSKD.js +2 -0
  40. package/dist/cli/chunks/chunk-5T2ZQWKF.js +27 -0
  41. package/dist/cli/chunks/chunk-62ADTHV7.js +2 -0
  42. package/dist/cli/chunks/chunk-6EOS7KX2.js +2 -0
  43. package/dist/cli/chunks/chunk-6SVX4DJC.js +6 -0
  44. package/dist/cli/chunks/chunk-72WOAVK6.js +2 -0
  45. package/dist/cli/chunks/chunk-7R6YMLVS.js +3 -0
  46. package/dist/cli/chunks/chunk-7VDBAVTY.js +2 -0
  47. package/dist/cli/chunks/chunk-AFLLQ5PP.js +15 -0
  48. package/dist/cli/chunks/chunk-AKE543X2.js +2 -0
  49. package/dist/cli/chunks/chunk-B36CDR4U.js +2 -0
  50. package/dist/cli/chunks/chunk-B6LLWYQ6.js +2 -0
  51. package/dist/cli/chunks/chunk-BDIEMZ22.js +91 -0
  52. package/dist/cli/chunks/chunk-BGXNSCXX.js +4 -0
  53. package/dist/cli/chunks/chunk-BLBRY5UD.js +2 -0
  54. package/dist/cli/chunks/chunk-BPWXXEH2.js +3029 -0
  55. package/dist/cli/chunks/chunk-BR26T7ZS.js +180 -0
  56. package/dist/cli/chunks/chunk-BTREG4IW.js +2 -0
  57. package/dist/cli/chunks/chunk-BULKFVYX.js +2 -0
  58. package/dist/cli/chunks/chunk-BXAXGEFC.js +24 -0
  59. package/dist/cli/chunks/chunk-CL6POIX4.js +2 -0
  60. package/dist/cli/chunks/chunk-CS2KS7LP.js +2 -0
  61. package/dist/cli/chunks/chunk-CWFB6BSA.js +316 -0
  62. package/dist/cli/chunks/chunk-DRT3WKQW.js +2 -0
  63. package/dist/cli/chunks/chunk-EHDQJQ6Y.js +27 -0
  64. package/dist/cli/chunks/chunk-ESVQ6MEB.js +2 -0
  65. package/dist/cli/chunks/chunk-FEKY7T6Q.js +2 -0
  66. package/dist/cli/chunks/chunk-FGA7VIFR.js +7 -0
  67. package/dist/cli/chunks/chunk-FIA6X7UL.js +2 -0
  68. package/dist/cli/chunks/chunk-GAOJV3OX.js +2 -0
  69. package/dist/cli/chunks/chunk-GKNNSCLC.js +5 -0
  70. package/dist/cli/chunks/chunk-GPQ57KA4.js +2 -0
  71. package/dist/cli/chunks/chunk-GRUUQAR6.js +2 -0
  72. package/dist/cli/chunks/chunk-HRO6OZQD.js +2 -0
  73. package/dist/cli/chunks/chunk-HY6PMO5W.js +66 -0
  74. package/dist/cli/chunks/chunk-IAV2JMIX.js +167 -0
  75. package/dist/cli/chunks/chunk-IFNIIK34.js +21 -0
  76. package/dist/cli/chunks/chunk-IGJPMN4I.js +3 -0
  77. package/dist/cli/chunks/chunk-J3KWWR6Z.js +1 -0
  78. package/dist/cli/chunks/chunk-JBANAPWG.js +2 -0
  79. package/dist/cli/chunks/chunk-JJO7Y4H3.js +604 -0
  80. package/dist/cli/chunks/chunk-JRYGQO2W.js +2 -0
  81. package/dist/cli/chunks/chunk-JXM26HEE.js +2 -0
  82. package/dist/cli/chunks/chunk-JZSDOIXA.js +2 -0
  83. package/dist/cli/chunks/chunk-KP5NUODU.js +3 -0
  84. package/dist/cli/chunks/chunk-LHJQD2VU.js +750 -0
  85. package/dist/cli/chunks/chunk-LNQIY6BP.js +2 -0
  86. package/dist/cli/chunks/chunk-MDUHYUHF.js +2 -0
  87. package/dist/cli/chunks/chunk-MV6CMOJQ.js +65 -0
  88. package/dist/cli/chunks/chunk-MZOFWJTM.js +2 -0
  89. package/dist/cli/chunks/chunk-N2NS2PHA.js +45 -0
  90. package/dist/cli/chunks/chunk-N4TL73TH.js +314 -0
  91. package/dist/cli/chunks/chunk-N5UXCLFI.js +2 -0
  92. package/dist/cli/chunks/chunk-NZ2VCPN4.js +2 -0
  93. package/dist/cli/chunks/chunk-OF4D7MYI.js +2 -0
  94. package/dist/cli/chunks/chunk-OI5NGQO2.js +2 -0
  95. package/dist/cli/chunks/chunk-OLHKGP35.js +2 -0
  96. package/dist/cli/chunks/chunk-QOVHWZEP.js +1 -0
  97. package/dist/cli/chunks/chunk-RFSN6IDA.js +79 -0
  98. package/dist/cli/chunks/chunk-RTGGL7D7.js +4 -0
  99. package/dist/cli/chunks/chunk-RU5WAHB7.js +3 -0
  100. package/dist/cli/chunks/chunk-SUSEVMZT.js +2 -0
  101. package/dist/cli/chunks/chunk-TLHP5EII.js +2 -0
  102. package/dist/cli/chunks/chunk-TWUWL5EJ.js +2 -0
  103. package/dist/cli/chunks/chunk-U5RN7YQW.js +2 -0
  104. package/dist/cli/chunks/chunk-UFUVUO3J.js +2 -0
  105. package/dist/cli/chunks/chunk-UQHYFOBX.js +16 -0
  106. package/dist/cli/chunks/chunk-VOS4NQSF.js +2 -0
  107. package/dist/cli/chunks/chunk-VSVXUTJN.js +256 -0
  108. package/dist/cli/chunks/chunk-WBQSXPBI.js +2 -0
  109. package/dist/cli/chunks/chunk-WGMPEW2T.js +2 -0
  110. package/dist/cli/chunks/chunk-WIEC7VKK.js +2 -0
  111. package/dist/cli/chunks/chunk-WJ3DLOXF.js +14 -0
  112. package/dist/cli/chunks/chunk-X3KI6JOY.js +9 -0
  113. package/dist/cli/chunks/chunk-X5IJGWYG.js +2 -0
  114. package/dist/cli/chunks/chunk-XIBDETCS.js +146 -0
  115. package/dist/cli/chunks/chunk-XLRQYLWW.js +2 -0
  116. package/dist/cli/chunks/chunk-XO6PVK2P.js +3 -0
  117. package/dist/cli/chunks/chunk-XRE2HCWG.js +3 -0
  118. package/dist/cli/chunks/chunk-XT2V2322.js +2 -0
  119. package/dist/cli/chunks/chunk-Y7BHKZFJ.js +18 -0
  120. package/dist/cli/chunks/chunk-YAGODYIG.js +59 -0
  121. package/dist/cli/chunks/chunk-YANUP2RO.js +2 -0
  122. package/dist/cli/chunks/chunk-YPFOCNOE.js +30 -0
  123. package/dist/cli/chunks/chunk-YR6ZZGH7.js +81 -0
  124. package/dist/cli/chunks/chunk-YVA65UZL.js +2 -0
  125. package/dist/cli/chunks/chunk-YW2THB5Q.js +2 -0
  126. package/dist/cli/chunks/chunk-ZAPS3UGQ.js +20 -0
  127. package/dist/cli/chunks/chunk-ZDATDCYN.js +2 -0
  128. package/dist/cli/chunks/ci-J374KDLI.js +81 -0
  129. package/dist/cli/chunks/ci-output-7JN7F6CI.js +2 -0
  130. package/dist/cli/chunks/claude-flow-setup-245JLJCN.js +2 -0
  131. package/dist/cli/chunks/client-MCSNSH2C.js +2 -0
  132. package/dist/cli/chunks/cline-installer-LBA2M5N3.js +4 -0
  133. package/dist/cli/chunks/code-U4N4WONM.js +38 -0
  134. package/dist/cli/chunks/code-index-extractor-A57Z6BO4.js +3 -0
  135. package/dist/cli/chunks/codex-installer-UXMK2N4T.js +8 -0
  136. package/dist/cli/chunks/completions-W66BSCOE.js +1364 -0
  137. package/dist/cli/chunks/complexity-analyzer-AB4OZARV.js +2 -0
  138. package/dist/cli/chunks/continuedev-installer-LRFZ2SJM.js +14 -0
  139. package/dist/cli/chunks/copilot-installer-CQ3JYBIB.js +3 -0
  140. package/dist/cli/chunks/cost-tracker-4F723RB6.js +2 -0
  141. package/dist/cli/chunks/coverage-4PUEQXAY.js +27 -0
  142. package/dist/cli/chunks/cross-domain-router-OWR5IJ5G.js +2 -0
  143. package/dist/cli/chunks/cursor-installer-JZEDEDHA.js +3 -0
  144. package/dist/cli/chunks/daemon-B7TWGHXQ.js +19 -0
  145. package/dist/cli/chunks/dag-attention-scheduler-JWO6XI6A.js +2 -0
  146. package/dist/cli/chunks/detect-L6ZZHUSX.js +2 -0
  147. package/dist/cli/chunks/domain-handler-FT5FLZWL.js +25 -0
  148. package/dist/cli/chunks/domain-transfer-5Y4FGJAJ.js +2 -0
  149. package/dist/cli/chunks/dream-4TDBIYED.js +2 -0
  150. package/dist/cli/chunks/esm-node-2PKHKOTS.js +2 -0
  151. package/dist/cli/chunks/eval-GHMPFGWV.js +15 -0
  152. package/dist/cli/chunks/fast-paths-B3R647KN.js +2 -0
  153. package/dist/cli/chunks/feature-flags-DWS7ARSX.js +2 -0
  154. package/dist/cli/chunks/feature-flags-IVQ3AL4Q.js +2 -0
  155. package/dist/cli/chunks/file-discovery-QFPA6GMV.js +2 -0
  156. package/dist/cli/chunks/fleet-EKOKMOMW.js +43 -0
  157. package/dist/cli/chunks/gnn-wrapper-OYC55N5E.js +2 -0
  158. package/dist/cli/chunks/heartbeat-handler-MBBS4IBU.js +48 -0
  159. package/dist/cli/chunks/heartbeat-scheduler-XDGMOT7X.js +2 -0
  160. package/dist/cli/chunks/hnsw-index-YO7CT23I.js +2 -0
  161. package/dist/cli/chunks/hnswlib-node-56YWVXFE.js +2 -0
  162. package/dist/cli/chunks/hooks-L5VLZGEK.js +101 -0
  163. package/dist/cli/chunks/hypergraph-engine-A4Y2ZRAG.js +2 -0
  164. package/dist/cli/chunks/hypergraph-handler-3HDGB5SZ.js +35 -0
  165. package/dist/cli/chunks/impact-analyzer-UEIGXSZ4.js +2 -0
  166. package/dist/cli/chunks/init-handler-JDET6WUN.js +68 -0
  167. package/dist/cli/chunks/init-wizard-JWZUGIPJ.js +2 -0
  168. package/dist/cli/chunks/kernel-YNDTVKIW.js +2 -0
  169. package/dist/cli/chunks/kilocode-installer-GZZG5AFW.js +4 -0
  170. package/dist/cli/chunks/kiro-installer-IWNY5TKH.js +74 -0
  171. package/dist/cli/chunks/knowledge-graph-NGJKFTSN.js +2 -0
  172. package/dist/cli/chunks/learning-722ZNSZ6.js +107 -0
  173. package/dist/cli/chunks/llm-router-DNAV746L.js +30 -0
  174. package/dist/cli/chunks/load-Y3GCUFM4.js +2 -0
  175. package/dist/cli/chunks/load-test-GZUBXFF3.js +2 -0
  176. package/dist/cli/chunks/mcp-LKPIBZ3W.js +2 -0
  177. package/dist/cli/chunks/memory-L57MLFOP.js +32 -0
  178. package/dist/cli/chunks/memory-backend-3NQIZUXE.js +2 -0
  179. package/dist/cli/chunks/memory-handlers-MDZQ7HVW.js +2 -0
  180. package/dist/cli/chunks/opencode-installer-4HUB36H5.js +3 -0
  181. package/dist/cli/chunks/orchestrator-QHSBB2UC.js +371 -0
  182. package/dist/cli/chunks/pipeline-D3QER35Z.js +19 -0
  183. package/dist/cli/chunks/platform-T4E7Q3RD.js +2 -0
  184. package/dist/cli/chunks/plugin-JHW2YPRC.js +27 -0
  185. package/dist/cli/chunks/prime-radiant-advanced-wasm-G7CFNNQV.js +2 -0
  186. package/dist/cli/chunks/protocol-executor-SPUVRDWT.js +2 -0
  187. package/dist/cli/chunks/protocol-handler-2BQQ4HDM.js +20 -0
  188. package/dist/cli/chunks/prove-UQ6JFT73.js +3 -0
  189. package/dist/cli/chunks/qe-reasoning-bank-3HBK2FVD.js +2 -0
  190. package/dist/cli/chunks/quality-JRZYMC77.js +7 -0
  191. package/dist/cli/chunks/queen-coordinator-RW3NKO5A.js +2 -0
  192. package/dist/cli/chunks/real-embeddings-GK63VF35.js +2 -0
  193. package/dist/cli/chunks/roocode-installer-F4E2LAYR.js +4 -0
  194. package/dist/cli/chunks/router-RJGHWDQ3.js +2 -0
  195. package/dist/cli/chunks/routing-feedback-ZXBXFKX6.js +2 -0
  196. package/dist/cli/chunks/routing-handler-VNKFUUGB.js +20 -0
  197. package/dist/cli/chunks/ruvector-commands-2TLNHC3A.js +8 -0
  198. package/dist/cli/chunks/rvf-dual-writer-MQW2SJLT.js +2 -0
  199. package/dist/cli/chunks/rvf-native-adapter-LKFKTMUN.js +2 -0
  200. package/dist/cli/chunks/safe-db-G22E5ROA.js +2 -0
  201. package/dist/cli/chunks/schedule-Y7VVCPYV.js +2 -0
  202. package/dist/cli/chunks/scheduler-AUQIFQB7.js +2 -0
  203. package/dist/cli/chunks/security-EBEG2OPU.js +14 -0
  204. package/dist/cli/chunks/shared-rvf-dual-writer-BVSCQAFS.js +2 -0
  205. package/dist/cli/chunks/sqlite-persistence-JAVHUGGL.js +2 -0
  206. package/dist/cli/chunks/status-handler-VZ32M4G4.js +45 -0
  207. package/dist/cli/chunks/structural-health-K6LRCKV6.js +2 -0
  208. package/dist/cli/chunks/sync-MHSHNLIM.js +23 -0
  209. package/dist/cli/chunks/task-handler-JNOIBZ2G.js +49 -0
  210. package/dist/cli/chunks/task-handlers-P5DSUKND.js +2 -0
  211. package/dist/cli/chunks/test-DO22BNIL.js +33 -0
  212. package/dist/cli/chunks/test-scheduling-VLRQZEFL.js +15 -0
  213. package/dist/cli/chunks/token-bootstrap-4VJKGVMK.js +2 -0
  214. package/dist/cli/chunks/token-usage-LG3PXRXH.js +25 -0
  215. package/dist/cli/chunks/transformers-GY7SIKEU.js +2 -0
  216. package/dist/cli/chunks/tree-sitter-wasm-parser-FT2KB66N.js +2 -0
  217. package/dist/cli/chunks/types-QJGNBKP2.js +2 -0
  218. package/dist/cli/chunks/unified-memory-XYGENQUT.js +2 -0
  219. package/dist/cli/chunks/unified-memory-hnsw-MVEGQBF3.js +2 -0
  220. package/dist/cli/chunks/unified-persistence-PFRCWEUG.js +2 -0
  221. package/dist/cli/chunks/validate-VQCRSVNQ.js +21 -0
  222. package/dist/cli/chunks/validate-swarm-A5DHAWTP.js +14 -0
  223. package/dist/cli/chunks/vibium-RZBSL4EB.js +2 -0
  224. package/dist/cli/chunks/visual-security-V47BLGJM.js +2 -0
  225. package/dist/cli/chunks/web-tree-sitter-7C4NXEOF.js +2 -0
  226. package/dist/cli/chunks/windsurf-installer-ES3KPQG3.js +7 -0
  227. package/dist/cli/chunks/witness-chain-BR63P4A7.js +2 -0
  228. package/dist/cli/chunks/workflow-JETHX4ML.js +51 -0
  229. package/dist/cli/chunks/workflow-orchestrator-7PZMX3JZ.js +2 -0
  230. package/dist/cli/chunks/wrappers-WP5RH745.js +2 -0
  231. package/dist/cli/commands/daemon.d.ts +13 -0
  232. package/dist/cli/commands/daemon.js +224 -0
  233. package/dist/cli/commands/hooks-handlers/hooks-shared.js +2 -1
  234. package/dist/cli/commands/plugin.d.ts +12 -0
  235. package/dist/cli/commands/plugin.js +135 -0
  236. package/dist/cli/commands/workflow.d.ts +10 -0
  237. package/dist/cli/commands/workflow.js +587 -0
  238. package/dist/cli/handlers/brain-handler.js +13 -8
  239. package/dist/cli/handlers/heartbeat-handler.d.ts +1 -0
  240. package/dist/cli/handlers/heartbeat-handler.js +20 -10
  241. package/dist/cli/handlers/hypergraph-handler.js +3 -3
  242. package/dist/cli/handlers/init-handler.js +10 -9
  243. package/dist/cli/handlers/interfaces.d.ts +4 -4
  244. package/dist/cli/index.js +159 -638
  245. package/dist/cli/lazy-registry.d.ts +27 -0
  246. package/dist/cli/lazy-registry.js +70 -0
  247. package/dist/context/compaction/context-budget.d.ts +71 -0
  248. package/dist/context/compaction/context-budget.js +120 -0
  249. package/dist/context/compaction/index.d.ts +96 -0
  250. package/dist/context/compaction/index.js +259 -0
  251. package/dist/context/compaction/llm-caller-adapter.d.ts +14 -0
  252. package/dist/context/compaction/llm-caller-adapter.js +47 -0
  253. package/dist/context/compaction/tier1-microcompact.d.ts +33 -0
  254. package/dist/context/compaction/tier1-microcompact.js +47 -0
  255. package/dist/context/compaction/tier2-session-summary.d.ts +72 -0
  256. package/dist/context/compaction/tier2-session-summary.js +172 -0
  257. package/dist/context/compaction/tier3-llm-compact.d.ts +65 -0
  258. package/dist/context/compaction/tier3-llm-compact.js +166 -0
  259. package/dist/context/compaction/tier4-reactive.d.ts +54 -0
  260. package/dist/context/compaction/tier4-reactive.js +129 -0
  261. package/dist/coordination/consensus/providers/claude-provider.d.ts +1 -0
  262. package/dist/coordination/consensus/providers/claude-provider.js +23 -3
  263. package/dist/domains/test-generation/generators/base-test-generator.d.ts +1 -1
  264. package/dist/domains/test-generation/generators/base-test-generator.js +11 -11
  265. package/dist/domains/test-generation/generators/go-test-generator.js +12 -12
  266. package/dist/domains/test-generation/generators/junit5-generator.js +9 -9
  267. package/dist/domains/test-generation/generators/kotlin-junit-generator.js +10 -10
  268. package/dist/domains/test-generation/generators/pytest-generator.js +8 -8
  269. package/dist/domains/test-generation/generators/swift-testing-generator.js +8 -8
  270. package/dist/domains/test-generation/generators/test-value-helpers.d.ts +20 -0
  271. package/dist/domains/test-generation/generators/test-value-helpers.js +48 -0
  272. package/dist/domains/test-generation/generators/xunit-generator.js +11 -11
  273. package/dist/hooks/cross-phase-hooks.d.ts +11 -0
  274. package/dist/hooks/cross-phase-hooks.js +73 -9
  275. package/dist/hooks/security/config-snapshot.d.ts +21 -0
  276. package/dist/hooks/security/config-snapshot.js +33 -0
  277. package/dist/hooks/security/exit-codes.d.ts +28 -0
  278. package/dist/hooks/security/exit-codes.js +33 -0
  279. package/dist/hooks/security/index.d.ts +15 -0
  280. package/dist/hooks/security/index.js +15 -0
  281. package/dist/hooks/security/ssrf-guard.d.ts +25 -0
  282. package/dist/hooks/security/ssrf-guard.js +69 -0
  283. package/dist/index.d.ts +1 -1
  284. package/dist/index.js +1 -2
  285. package/dist/init/init-wizard-hooks.js +15 -1
  286. package/dist/init/phases/07-hooks.js +2 -2
  287. package/dist/init/settings-merge.js +3 -7
  288. package/dist/kernel/kernel.js +35 -0
  289. package/dist/kernel/memory-backend.js +3 -1
  290. package/dist/mcp/bundle.js +416 -362
  291. package/dist/mcp/entry.js +132 -77
  292. package/dist/mcp/http-server.js +4 -1
  293. package/dist/mcp/index.d.ts +2 -2
  294. package/dist/mcp/index.js +5 -4
  295. package/dist/mcp/middleware/batch-executor.d.ts +46 -0
  296. package/dist/mcp/middleware/batch-executor.js +150 -0
  297. package/dist/mcp/middleware/microcompact.d.ts +97 -0
  298. package/dist/mcp/middleware/microcompact.js +179 -0
  299. package/dist/mcp/middleware/middleware-chain.d.ts +37 -0
  300. package/dist/mcp/middleware/middleware-chain.js +60 -0
  301. package/dist/mcp/protocol-server.d.ts +16 -0
  302. package/dist/mcp/protocol-server.js +140 -36
  303. package/dist/mcp/services/session-durability-middleware.d.ts +22 -0
  304. package/dist/mcp/services/session-durability-middleware.js +64 -0
  305. package/dist/mcp/services/session-resume.d.ts +29 -0
  306. package/dist/mcp/services/session-resume.js +221 -0
  307. package/dist/mcp/services/session-store.d.ts +84 -0
  308. package/dist/mcp/services/session-store.js +163 -0
  309. package/dist/mcp/tool-registry.d.ts +9 -0
  310. package/dist/mcp/tool-registry.js +30 -1
  311. package/dist/mcp/types.d.ts +1 -0
  312. package/dist/plugins/cache.d.ts +44 -0
  313. package/dist/plugins/cache.js +149 -0
  314. package/dist/plugins/index.d.ts +15 -0
  315. package/dist/plugins/index.js +15 -0
  316. package/dist/plugins/lifecycle.d.ts +67 -0
  317. package/dist/plugins/lifecycle.js +175 -0
  318. package/dist/plugins/manifest.d.ts +45 -0
  319. package/dist/plugins/manifest.js +173 -0
  320. package/dist/plugins/resolver.d.ts +37 -0
  321. package/dist/plugins/resolver.js +80 -0
  322. package/dist/plugins/security.d.ts +23 -0
  323. package/dist/plugins/security.js +125 -0
  324. package/dist/plugins/sources/github.d.ts +17 -0
  325. package/dist/plugins/sources/github.js +77 -0
  326. package/dist/plugins/sources/local.d.ts +20 -0
  327. package/dist/plugins/sources/local.js +32 -0
  328. package/dist/plugins/sources/npm.d.ts +18 -0
  329. package/dist/plugins/sources/npm.js +82 -0
  330. package/dist/shared/llm/retry.d.ts +5 -2
  331. package/dist/shared/llm/retry.js +7 -3
  332. package/dist/shared/prompt-cache-latch.d.ts +41 -0
  333. package/dist/shared/prompt-cache-latch.js +63 -0
  334. package/dist/shared/retry-engine.d.ts +77 -0
  335. package/dist/shared/retry-engine.js +194 -0
  336. package/dist/workers/daemon.d.ts +8 -0
  337. package/dist/workers/daemon.js +13 -0
  338. package/dist/workers/quality-daemon/ci-monitor.d.ts +55 -0
  339. package/dist/workers/quality-daemon/ci-monitor.js +147 -0
  340. package/dist/workers/quality-daemon/coverage-delta.d.ts +72 -0
  341. package/dist/workers/quality-daemon/coverage-delta.js +135 -0
  342. package/dist/workers/quality-daemon/git-watcher.d.ts +51 -0
  343. package/dist/workers/quality-daemon/git-watcher.js +209 -0
  344. package/dist/workers/quality-daemon/index.d.ts +119 -0
  345. package/dist/workers/quality-daemon/index.js +343 -0
  346. package/dist/workers/quality-daemon/nightly-consolidation.d.ts +74 -0
  347. package/dist/workers/quality-daemon/nightly-consolidation.js +136 -0
  348. package/dist/workers/quality-daemon/notification-service.d.ts +67 -0
  349. package/dist/workers/quality-daemon/notification-service.js +178 -0
  350. package/dist/workers/quality-daemon/persistent-memory.d.ts +31 -0
  351. package/dist/workers/quality-daemon/persistent-memory.js +30 -0
  352. package/dist/workers/quality-daemon/priority-queue.d.ts +97 -0
  353. package/dist/workers/quality-daemon/priority-queue.js +126 -0
  354. package/dist/workers/quality-daemon/test-suggester.d.ts +50 -0
  355. package/dist/workers/quality-daemon/test-suggester.js +121 -0
  356. package/dist/workers/worker-manager.js +2 -1
  357. package/package.json +1 -1
  358. package/dist/mcp/server.d.ts +0 -46
  359. package/dist/mcp/server.js +0 -802
@@ -0,0 +1,135 @@
1
+ /**
2
+ * IMP-10: QE Quality Daemon — Coverage Delta Analysis
3
+ *
4
+ * Compares current coverage with previous snapshot to identify:
5
+ * - Newly uncovered lines in changed files
6
+ * - Coverage regressions
7
+ * - Coverage gaps exceeding configurable thresholds
8
+ *
9
+ * Enqueues test suggestion tasks when gaps exceed threshold.
10
+ */
11
+ const DEFAULTS = {
12
+ regressionThreshold: 2,
13
+ gapThreshold: 60,
14
+ memoryPrefix: 'quality-daemon:coverage',
15
+ };
16
+ export class CoverageDeltaAnalyzer {
17
+ queue;
18
+ options;
19
+ constructor(queue, options) {
20
+ this.queue = queue;
21
+ this.options = { ...DEFAULTS, ...options };
22
+ }
23
+ /**
24
+ * Analyze coverage delta between the current and previous snapshot.
25
+ * Stores the current snapshot and enqueues test suggestions if needed.
26
+ */
27
+ async analyze(current, memory, changedFiles) {
28
+ const previousRaw = await memory.get(`${this.options.memoryPrefix}:snapshot`);
29
+ // Store current snapshot for next comparison
30
+ await memory.set(`${this.options.memoryPrefix}:snapshot`, current);
31
+ if (!previousRaw) {
32
+ return {
33
+ regressionDetected: false,
34
+ overallDelta: { line: 0, branch: 0, function: 0, statement: 0 },
35
+ affectedFiles: [],
36
+ newGaps: [],
37
+ };
38
+ }
39
+ const previous = previousRaw;
40
+ const overallDelta = {
41
+ line: current.overall.line - previous.overall.line,
42
+ branch: current.overall.branch - previous.overall.branch,
43
+ function: current.overall.function - previous.overall.function,
44
+ statement: current.overall.statement - previous.overall.statement,
45
+ };
46
+ const regressionDetected = overallDelta.line < -this.options.regressionThreshold ||
47
+ overallDelta.branch < -this.options.regressionThreshold;
48
+ // Compute per-file deltas
49
+ const filesToCheck = changedFiles ?? Object.keys(current.files);
50
+ const affectedFiles = [];
51
+ const newGaps = [];
52
+ for (const file of filesToCheck) {
53
+ const curr = current.files[file];
54
+ const prev = previous.files[file];
55
+ if (!curr)
56
+ continue;
57
+ const lineDelta = prev ? curr.line - prev.line : 0;
58
+ const branchDelta = prev ? curr.branch - prev.branch : 0;
59
+ const newUncovered = prev
60
+ ? curr.uncoveredLines.filter((l) => !prev.uncoveredLines.includes(l))
61
+ : curr.uncoveredLines;
62
+ if (lineDelta !== 0 || branchDelta !== 0 || newUncovered.length > 0) {
63
+ affectedFiles.push({ file, lineDelta, branchDelta, newUncoveredLines: newUncovered });
64
+ }
65
+ if (curr.line < this.options.gapThreshold) {
66
+ const riskScore = this.computeRiskScore(curr, newUncovered.length);
67
+ newGaps.push({
68
+ file,
69
+ uncoveredLines: curr.uncoveredLines,
70
+ currentCoverage: curr.line,
71
+ riskScore,
72
+ });
73
+ }
74
+ }
75
+ // Enqueue test suggestion if regression or new gaps found
76
+ if (regressionDetected || newGaps.length > 0) {
77
+ this.enqueueTestSuggestion(current, previous, newGaps);
78
+ }
79
+ // Store delta result
80
+ await memory.set(`${this.options.memoryPrefix}:delta`, {
81
+ timestamp: Date.now(),
82
+ overallDelta,
83
+ regressionDetected,
84
+ affectedFileCount: affectedFiles.length,
85
+ gapCount: newGaps.length,
86
+ });
87
+ return { regressionDetected, overallDelta, affectedFiles, newGaps };
88
+ }
89
+ /**
90
+ * Build a CoverageSnapshot from raw lcov/istanbul data stored in memory.
91
+ */
92
+ async buildSnapshot(memory) {
93
+ const latest = await memory.get('coverage:latest');
94
+ if (!latest)
95
+ return undefined;
96
+ return {
97
+ timestamp: Date.now(),
98
+ overall: {
99
+ line: latest.line,
100
+ branch: latest.branch,
101
+ function: latest.function,
102
+ statement: latest.statement,
103
+ },
104
+ files: latest.files ?? {},
105
+ };
106
+ }
107
+ // ============================================================================
108
+ // Private
109
+ // ============================================================================
110
+ computeRiskScore(coverage, newUncoveredCount) {
111
+ // Higher risk = lower coverage + more new uncovered lines
112
+ // Clamp coverage to [0, 100] to prevent negative risk scores
113
+ const clampedCoverage = Math.min(100, Math.max(0, coverage.line));
114
+ const coverageFactor = 1 - clampedCoverage / 100;
115
+ const uncoveredFactor = Math.min(newUncoveredCount / 50, 1);
116
+ return Math.min(1, coverageFactor * 0.6 + uncoveredFactor * 0.4);
117
+ }
118
+ enqueueTestSuggestion(current, previous, gaps) {
119
+ const payload = {
120
+ type: 'coverage_delta',
121
+ previousSnapshot: `snapshot-${previous.timestamp}`,
122
+ currentSnapshot: `snapshot-${current.timestamp}`,
123
+ };
124
+ const item = {
125
+ id: `coverage-delta-${Date.now()}`,
126
+ priority: gaps.some((g) => g.riskScore > 0.8) ? 'now' : 'next',
127
+ payload,
128
+ createdAt: Date.now(),
129
+ source: 'coverage-delta',
130
+ ttlMs: 10 * 60 * 1000, // 10 min TTL
131
+ };
132
+ this.queue.enqueue(item);
133
+ }
134
+ }
135
+ //# sourceMappingURL=coverage-delta.js.map
@@ -0,0 +1,51 @@
1
+ /**
2
+ * IMP-10: QE Quality Daemon — Git Watcher
3
+ *
4
+ * Watches `.git/refs/heads/` for new commits via fs.watch.
5
+ * Parses git log to determine changed files and enqueues
6
+ * 'next' priority analysis tasks into the daemon queue.
7
+ */
8
+ import type { PriorityQueue } from './priority-queue';
9
+ export interface GitWatcherOptions {
10
+ /** Root of the git repository (defaults to cwd) */
11
+ repoRoot?: string;
12
+ /** Debounce interval for fs.watch events (ms) */
13
+ debounceMs?: number;
14
+ /** Maximum number of changed files to track per commit */
15
+ maxChangedFiles?: number;
16
+ /** Polling interval in ms for platforms without recursive fs.watch (e.g. Linux). Default: 5000 */
17
+ pollIntervalMs?: number;
18
+ }
19
+ /**
20
+ * Watches git refs for new commits and enqueues analysis tasks.
21
+ */
22
+ export declare class GitWatcher {
23
+ private readonly queue;
24
+ private watcher;
25
+ private pollTimer;
26
+ private options;
27
+ private lastKnownHeads;
28
+ private debounceTimer;
29
+ private _running;
30
+ private _polling;
31
+ constructor(queue: PriorityQueue, options?: GitWatcherOptions);
32
+ get running(): boolean;
33
+ /**
34
+ * Start watching git refs for changes.
35
+ */
36
+ start(): Promise<void>;
37
+ /**
38
+ * Stop watching.
39
+ */
40
+ stop(): void;
41
+ /**
42
+ * Manual poll — useful for platforms where fs.watch is unreliable.
43
+ * Compares current HEAD hashes with last known and enqueues changes.
44
+ */
45
+ poll(): Promise<string[]>;
46
+ private handleRefChange;
47
+ private processRefChange;
48
+ private enqueueCommitAnalysis;
49
+ private snapshotHeads;
50
+ }
51
+ //# sourceMappingURL=git-watcher.d.ts.map
@@ -0,0 +1,209 @@
1
+ /**
2
+ * IMP-10: QE Quality Daemon — Git Watcher
3
+ *
4
+ * Watches `.git/refs/heads/` for new commits via fs.watch.
5
+ * Parses git log to determine changed files and enqueues
6
+ * 'next' priority analysis tasks into the daemon queue.
7
+ */
8
+ import { watch } from 'fs';
9
+ import { execFile } from 'child_process';
10
+ import { promisify } from 'util';
11
+ import { resolve, join } from 'path';
12
+ import { existsSync, readFileSync } from 'fs';
13
+ const execFileAsync = promisify(execFile);
14
+ const DEFAULTS = {
15
+ repoRoot: process.cwd(),
16
+ debounceMs: 500,
17
+ maxChangedFiles: 200,
18
+ pollIntervalMs: 5000,
19
+ };
20
+ /**
21
+ * Watches git refs for new commits and enqueues analysis tasks.
22
+ */
23
+ export class GitWatcher {
24
+ queue;
25
+ watcher;
26
+ pollTimer;
27
+ options;
28
+ lastKnownHeads = new Map();
29
+ debounceTimer;
30
+ _running = false;
31
+ _polling = false;
32
+ constructor(queue, options) {
33
+ this.queue = queue;
34
+ this.options = { ...DEFAULTS, ...options };
35
+ }
36
+ get running() {
37
+ return this._running;
38
+ }
39
+ /**
40
+ * Start watching git refs for changes.
41
+ */
42
+ async start() {
43
+ if (this._running)
44
+ return;
45
+ const refsDir = resolve(this.options.repoRoot, '.git', 'refs', 'heads');
46
+ if (!existsSync(refsDir)) {
47
+ throw new Error(`Git refs directory not found: ${refsDir}`);
48
+ }
49
+ // Snapshot current HEADs
50
+ await this.snapshotHeads();
51
+ // fs.watch({ recursive: true }) only works on macOS and Windows.
52
+ // On Linux, fall back to polling (Finding 3).
53
+ const supportsRecursive = process.platform === 'darwin' || process.platform === 'win32';
54
+ if (supportsRecursive) {
55
+ this.watcher = watch(refsDir, { recursive: true }, (_event, filename) => {
56
+ if (!filename)
57
+ return;
58
+ this.handleRefChange(filename);
59
+ });
60
+ }
61
+ else {
62
+ // Linux: use git-based polling instead of unreliable fs.watch
63
+ this.pollTimer = setInterval(() => {
64
+ this.poll().catch((err) => {
65
+ console.debug('[GitWatcher] Poll error:', err);
66
+ });
67
+ }, this.options.pollIntervalMs);
68
+ }
69
+ this._running = true;
70
+ }
71
+ /**
72
+ * Stop watching.
73
+ */
74
+ stop() {
75
+ if (this.debounceTimer) {
76
+ clearTimeout(this.debounceTimer);
77
+ this.debounceTimer = undefined;
78
+ }
79
+ if (this.pollTimer) {
80
+ clearInterval(this.pollTimer);
81
+ this.pollTimer = undefined;
82
+ }
83
+ if (this.watcher) {
84
+ this.watcher.close();
85
+ this.watcher = undefined;
86
+ }
87
+ this._running = false;
88
+ }
89
+ /**
90
+ * Manual poll — useful for platforms where fs.watch is unreliable.
91
+ * Compares current HEAD hashes with last known and enqueues changes.
92
+ */
93
+ async poll() {
94
+ // Guard against concurrent poll + watch race condition
95
+ if (this._polling)
96
+ return [];
97
+ this._polling = true;
98
+ const changedBranches = [];
99
+ try {
100
+ const { stdout } = await execFileAsync('git', [
101
+ 'for-each-ref',
102
+ '--format=%(refname:short) %(objectname:short)',
103
+ 'refs/heads/',
104
+ ], { cwd: this.options.repoRoot });
105
+ for (const line of stdout.trim().split('\n')) {
106
+ if (!line)
107
+ continue;
108
+ const [branch, hash] = line.split(' ');
109
+ const lastHash = this.lastKnownHeads.get(branch);
110
+ if (lastHash && lastHash !== hash) {
111
+ changedBranches.push(branch);
112
+ await this.enqueueCommitAnalysis(branch, hash);
113
+ }
114
+ this.lastKnownHeads.set(branch, hash);
115
+ }
116
+ }
117
+ catch {
118
+ // git not available or not a repo — silently skip
119
+ }
120
+ finally {
121
+ this._polling = false;
122
+ }
123
+ return changedBranches;
124
+ }
125
+ // ============================================================================
126
+ // Private
127
+ // ============================================================================
128
+ handleRefChange(filename) {
129
+ // Debounce rapid fs events (git writes multiple times per commit)
130
+ if (this.debounceTimer)
131
+ clearTimeout(this.debounceTimer);
132
+ this.debounceTimer = setTimeout(() => {
133
+ this.processRefChange(filename).catch((err) => {
134
+ console.debug('[GitWatcher] Error processing ref change:', err);
135
+ });
136
+ }, this.options.debounceMs);
137
+ }
138
+ async processRefChange(filename) {
139
+ const branch = filename.replace(/\\/g, '/');
140
+ const refsDir = resolve(this.options.repoRoot, '.git', 'refs', 'heads');
141
+ const refFile = join(refsDir, filename);
142
+ let newHash;
143
+ try {
144
+ newHash = readFileSync(refFile, 'utf-8').trim();
145
+ }
146
+ catch {
147
+ return; // ref deleted or unreadable
148
+ }
149
+ const lastHash = this.lastKnownHeads.get(branch);
150
+ if (lastHash === newHash)
151
+ return; // no change
152
+ this.lastKnownHeads.set(branch, newHash);
153
+ await this.enqueueCommitAnalysis(branch, newHash);
154
+ }
155
+ async enqueueCommitAnalysis(branch, commitHash) {
156
+ let changedFiles = [];
157
+ try {
158
+ const { stdout } = await execFileAsync('git', [
159
+ 'diff-tree',
160
+ '--no-commit-id',
161
+ '--name-only',
162
+ '-r',
163
+ commitHash,
164
+ ], { cwd: this.options.repoRoot });
165
+ changedFiles = stdout
166
+ .trim()
167
+ .split('\n')
168
+ .filter(Boolean)
169
+ .slice(0, this.options.maxChangedFiles);
170
+ }
171
+ catch {
172
+ // fallback: empty changed files list
173
+ }
174
+ const payload = {
175
+ type: 'git_commit',
176
+ branch,
177
+ commitHash,
178
+ changedFiles,
179
+ };
180
+ const item = {
181
+ id: `git-${commitHash}-${Date.now()}`,
182
+ priority: 'next',
183
+ payload,
184
+ createdAt: Date.now(),
185
+ source: 'git-watcher',
186
+ ttlMs: 5 * 60 * 1000, // 5 min TTL
187
+ };
188
+ this.queue.enqueue(item);
189
+ }
190
+ async snapshotHeads() {
191
+ try {
192
+ const { stdout } = await execFileAsync('git', [
193
+ 'for-each-ref',
194
+ '--format=%(refname:short) %(objectname:short)',
195
+ 'refs/heads/',
196
+ ], { cwd: this.options.repoRoot });
197
+ for (const line of stdout.trim().split('\n')) {
198
+ if (!line)
199
+ continue;
200
+ const [branch, hash] = line.split(' ');
201
+ this.lastKnownHeads.set(branch, hash);
202
+ }
203
+ }
204
+ catch {
205
+ // not a git repo or git not available
206
+ }
207
+ }
208
+ }
209
+ //# sourceMappingURL=git-watcher.js.map
@@ -0,0 +1,119 @@
1
+ /**
2
+ * IMP-10: QE Quality Daemon — Orchestrator
3
+ *
4
+ * Central tick-loop that coordinates all daemon subsystems:
5
+ * - Priority queue processing
6
+ * - Git commit watching
7
+ * - Coverage delta analysis
8
+ * - CI/CD health monitoring
9
+ * - Test suggestion generation
10
+ * - Nightly consolidation (dream cycle)
11
+ * - Notification delivery
12
+ *
13
+ * Resource-aware: throttles when CPU > 70% or memory > 80%.
14
+ */
15
+ import type { WorkerMemory } from '../interfaces';
16
+ import { PriorityQueue } from './priority-queue';
17
+ import { GitWatcher, type GitWatcherOptions } from './git-watcher';
18
+ import { CoverageDeltaAnalyzer, type CoverageDeltaOptions } from './coverage-delta';
19
+ import { CIMonitor, type CIMonitorOptions } from './ci-monitor';
20
+ import { TestSuggester, type TestSuggesterOptions } from './test-suggester';
21
+ import { NightlyConsolidation, type NightlyConsolidationOptions } from './nightly-consolidation';
22
+ import { NotificationService, type NotificationServiceOptions } from './notification-service';
23
+ export interface QualityDaemonConfig {
24
+ /** Tick interval in ms (default: 30s) */
25
+ tickIntervalMs?: number;
26
+ /** CI poll interval in ms (default: 5 min) */
27
+ ciPollIntervalMs?: number;
28
+ /** Coverage check interval in ms (default: 2 min) */
29
+ coverageCheckIntervalMs?: number;
30
+ /** CPU usage threshold to throttle (0-1, default: 0.7) */
31
+ cpuThreshold?: number;
32
+ /** Memory usage threshold to throttle (0-1, default: 0.8) */
33
+ memoryThreshold?: number;
34
+ /** Git watcher options */
35
+ git?: GitWatcherOptions;
36
+ /** Coverage delta options */
37
+ coverage?: CoverageDeltaOptions;
38
+ /** CI monitor options */
39
+ ci?: CIMonitorOptions;
40
+ /** Test suggester options */
41
+ suggestions?: TestSuggesterOptions;
42
+ /** Nightly consolidation options */
43
+ nightly?: NightlyConsolidationOptions;
44
+ /** Notification service options */
45
+ notifications?: NotificationServiceOptions;
46
+ }
47
+ export interface QualityDaemonStatus {
48
+ readonly running: boolean;
49
+ readonly uptimeSeconds: number;
50
+ readonly tickCount: number;
51
+ readonly queueDepth: {
52
+ now: number;
53
+ next: number;
54
+ later: number;
55
+ };
56
+ readonly lastTickAt: number | undefined;
57
+ readonly throttled: boolean;
58
+ readonly commitsAnalyzed: number;
59
+ readonly suggestionsGenerated: number;
60
+ readonly notificationsSent: number;
61
+ readonly ciHealth: number;
62
+ readonly coverageHealth: number;
63
+ readonly lastCICheck: number | undefined;
64
+ readonly lastCoverageCheck: number | undefined;
65
+ }
66
+ export declare class QualityDaemon {
67
+ readonly queue: PriorityQueue;
68
+ readonly gitWatcher: GitWatcher;
69
+ readonly coverageDelta: CoverageDeltaAnalyzer;
70
+ readonly ciMonitor: CIMonitor;
71
+ readonly testSuggester: TestSuggester;
72
+ readonly nightlyConsolidation: NightlyConsolidation;
73
+ readonly notificationService: NotificationService;
74
+ private tickTimer;
75
+ private _running;
76
+ private _startedAt;
77
+ private _tickCount;
78
+ private _lastTickAt;
79
+ private _throttled;
80
+ private _commitsAnalyzed;
81
+ private _suggestionsGenerated;
82
+ private _ciHealth;
83
+ private _coverageHealth;
84
+ private _lastCICheck;
85
+ private _lastCoverageCheck;
86
+ private _memory;
87
+ private config;
88
+ constructor(config?: QualityDaemonConfig);
89
+ get running(): boolean;
90
+ /**
91
+ * Start the quality daemon tick loop.
92
+ */
93
+ start(memory: WorkerMemory): Promise<void>;
94
+ /**
95
+ * Stop the quality daemon.
96
+ */
97
+ stop(): Promise<void>;
98
+ /**
99
+ * Get daemon status.
100
+ */
101
+ getStatus(): QualityDaemonStatus;
102
+ private scheduleTick;
103
+ private tick;
104
+ private processQueue;
105
+ private processNowItems;
106
+ private handleQueueItem;
107
+ private runPeriodicChecks;
108
+ private isResourceConstrained;
109
+ }
110
+ export { PriorityQueue } from './priority-queue';
111
+ export type { QueueItem, QueuePriority, DaemonTaskPayload } from './priority-queue';
112
+ export { GitWatcher } from './git-watcher';
113
+ export { CoverageDeltaAnalyzer } from './coverage-delta';
114
+ export { CIMonitor } from './ci-monitor';
115
+ export { TestSuggester } from './test-suggester';
116
+ export { NightlyConsolidation } from './nightly-consolidation';
117
+ export { NotificationService } from './notification-service';
118
+ export { PersistentWorkerMemory } from './persistent-memory';
119
+ //# sourceMappingURL=index.d.ts.map