agentic-qe 3.9.29 → 3.9.31

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 (341) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +176 -0
  3. package/assets/skills/skills-manifest.json +1 -1
  4. package/dist/bridge/captured-experience-bridge.js +31 -2
  5. package/dist/cli/bundle.js +5 -5
  6. package/dist/cli/chunks/adapter-CI2GZYME.js +2 -0
  7. package/dist/cli/chunks/{agent-booster-wasm-EPRGXS5D.js → agent-booster-wasm-AQXZYWZY.js} +2 -2
  8. package/dist/cli/chunks/{agent-handler-LF6D64UE.js → agent-handler-7N4ZPXCY.js} +2 -2
  9. package/dist/cli/chunks/{agent-memory-branch-XD3UQD6Y.js → agent-memory-branch-FLKF2JVX.js} +2 -2
  10. package/dist/cli/chunks/aqe-learning-engine-KNQKALLI.js +2 -0
  11. package/dist/cli/chunks/{audit-MNJONFOL.js → audit-B4V4IKTA.js} +2 -2
  12. package/dist/cli/chunks/base-P7PRMQWY.js +2 -0
  13. package/dist/cli/chunks/{hnswlib-node-PSQJ3C65.js → better-sqlite3-NYOVLWBG.js} +2 -2
  14. package/dist/cli/chunks/{brain-handler-SA2G3FDO.js → brain-handler-OOXJ2KYY.js} +4 -4
  15. package/dist/cli/chunks/{branch-enumerator-T7SZZTMH.js → branch-enumerator-LFKFW3A4.js} +2 -2
  16. package/dist/cli/chunks/{browser-OH5HUVOG.js → browser-F72IES2I.js} +3 -3
  17. package/dist/cli/chunks/browser-workflow-QUP4A763.js +2 -0
  18. package/dist/cli/chunks/{chunk-K7CFDRVW.js → chunk-2NLZXG6V.js} +1 -1
  19. package/dist/cli/chunks/{chunk-5Q26UGSU.js → chunk-35SFAIXE.js} +2 -2
  20. package/dist/cli/chunks/{chunk-UI6KM5PK.js → chunk-3VKB4HVT.js} +2 -2
  21. package/dist/cli/chunks/{chunk-UKYPDNQR.js → chunk-462MZLJB.js} +1 -1
  22. package/dist/cli/chunks/{chunk-WUKSEOUO.js → chunk-47QIAHUJ.js} +2 -2
  23. package/dist/cli/chunks/{chunk-R55RXPHB.js → chunk-4N736EES.js} +2 -2
  24. package/dist/cli/chunks/{chunk-5XRNUFEG.js → chunk-52D3CYE5.js} +2 -2
  25. package/dist/cli/chunks/{chunk-5MUYYPPW.js → chunk-5AMAJCZS.js} +3 -3
  26. package/dist/cli/chunks/{chunk-2JK43GR4.js → chunk-5G2L4XRU.js} +2 -2
  27. package/dist/cli/chunks/{chunk-C7MWQ4BI.js → chunk-5M4F3PAL.js} +1 -1
  28. package/dist/cli/chunks/{chunk-PYAITX6B.js → chunk-5WWQLPB4.js} +2 -2
  29. package/dist/cli/chunks/chunk-5Z6PYYWK.js +2 -0
  30. package/dist/cli/chunks/{chunk-VHJRWMZ5.js → chunk-62KYX5NH.js} +2 -2
  31. package/dist/cli/chunks/{chunk-667A24A4.js → chunk-7MXQV7RB.js} +12 -6
  32. package/dist/cli/chunks/{chunk-N5SS5YIS.js → chunk-7OVVBBOZ.js} +2 -2
  33. package/dist/cli/chunks/{chunk-TESFXE2W.js → chunk-7RPEBKQZ.js} +2 -2
  34. package/dist/cli/chunks/{chunk-3T4Q5V4B.js → chunk-7UHRT5AX.js} +2 -2
  35. package/dist/cli/chunks/{chunk-7PYHCYLJ.js → chunk-7V7TP242.js} +1 -1
  36. package/dist/cli/chunks/{chunk-IBSTVSKT.js → chunk-A424Z7LA.js} +1 -1
  37. package/dist/cli/chunks/{chunk-IX5LUHCN.js → chunk-AKFRM4IO.js} +2 -2
  38. package/dist/cli/chunks/{chunk-UGXYKPM4.js → chunk-AKJWBJDK.js} +2 -2
  39. package/dist/cli/chunks/{chunk-MBNFD2C3.js → chunk-AQN6PDHI.js} +1 -1
  40. package/dist/cli/chunks/{chunk-YCK464TF.js → chunk-BMS7WFDB.js} +1 -1
  41. package/dist/cli/chunks/{chunk-C7G7TA2H.js → chunk-BYHUGO73.js} +3 -3
  42. package/dist/cli/chunks/{chunk-ZZAZQKOA.js → chunk-CFLA2GBS.js} +2 -2
  43. package/dist/cli/chunks/{chunk-7AIVTUMM.js → chunk-CNKOIHF6.js} +2 -2
  44. package/dist/cli/chunks/{chunk-23B7TDPN.js → chunk-CQWZNVIM.js} +2 -2
  45. package/dist/cli/chunks/{chunk-REFFJUYT.js → chunk-CUSLB7MB.js} +2 -2
  46. package/dist/cli/chunks/chunk-CYUGE5ZQ.js +2 -0
  47. package/dist/cli/chunks/{chunk-BZ4OMPVJ.js → chunk-DMF4Z2M6.js} +2 -2
  48. package/dist/cli/chunks/{chunk-HEUAPPKE.js → chunk-DUF733Z7.js} +1 -1
  49. package/dist/cli/chunks/{chunk-VKJLHKLY.js → chunk-EAIPJSKH.js} +2 -2
  50. package/dist/cli/chunks/{chunk-GHBQVPJT.js → chunk-EJXRBAQF.js} +2 -2
  51. package/dist/cli/chunks/{chunk-N6A4XFUM.js → chunk-EKYPQ5DX.js} +1 -1
  52. package/dist/cli/chunks/{chunk-ZPFBEZV5.js → chunk-ENCFLC44.js} +2 -2
  53. package/dist/cli/chunks/{chunk-WQX2Q42U.js → chunk-FOAWHNOP.js} +2 -2
  54. package/dist/cli/chunks/{chunk-GBLW4QDV.js → chunk-FUHPLXJX.js} +1 -1
  55. package/dist/cli/chunks/{chunk-3E4VPGNW.js → chunk-G2U7Q6V6.js} +2 -2
  56. package/dist/cli/chunks/{chunk-7WRIYQG7.js → chunk-G3YKCZWQ.js} +3 -3
  57. package/dist/cli/chunks/{chunk-OLJLSLCY.js → chunk-GJSH4UZ3.js} +3 -3
  58. package/dist/cli/chunks/{chunk-XP5OUB2X.js → chunk-GN7FUCJH.js} +1 -1
  59. package/dist/cli/chunks/{chunk-UO3QSXYD.js → chunk-GQFAVT2I.js} +1 -1
  60. package/dist/cli/chunks/{chunk-AUE4QOT7.js → chunk-HHEIQHLQ.js} +2 -2
  61. package/dist/cli/chunks/{chunk-LRWREDZU.js → chunk-I3TFGMOQ.js} +1 -1
  62. package/dist/cli/chunks/{chunk-BUMNLVMC.js → chunk-IRRGUXAU.js} +1 -1
  63. package/dist/cli/chunks/{chunk-ZMZS6NKQ.js → chunk-IY4P35N3.js} +2 -2
  64. package/dist/cli/chunks/{chunk-SKIG6EOQ.js → chunk-JF3U456G.js} +2 -2
  65. package/dist/cli/chunks/{chunk-YEXQMYOM.js → chunk-JJRZOLDY.js} +2 -2
  66. package/dist/cli/chunks/{chunk-G426VZ5K.js → chunk-JKKV5KKS.js} +2 -2
  67. package/dist/cli/chunks/{chunk-I6PVI7R5.js → chunk-JMLOEW7Y.js} +2 -2
  68. package/dist/cli/chunks/chunk-JRIDPOEZ.js +95 -0
  69. package/dist/cli/chunks/{chunk-MCJRIW7M.js → chunk-K37CNLQZ.js} +1 -1
  70. package/dist/cli/chunks/{chunk-LIEKDXTS.js → chunk-K6MFAVXK.js} +2 -2
  71. package/dist/cli/chunks/{chunk-OPPASGEB.js → chunk-KJAIE7SL.js} +4 -4
  72. package/dist/cli/chunks/{chunk-ZWI5Z2SI.js → chunk-KXRDQQGN.js} +2 -2
  73. package/dist/cli/chunks/{chunk-Y7VPSAWH.js → chunk-L4JTTPU7.js} +2 -2
  74. package/dist/cli/chunks/{chunk-RXAJBMM7.js → chunk-L63KB63A.js} +2 -2
  75. package/dist/cli/chunks/{chunk-KX3XTWNR.js → chunk-L7DNPOAQ.js} +2 -2
  76. package/dist/cli/chunks/{chunk-LJDPZC6Q.js → chunk-LF5RO6WO.js} +1 -1
  77. package/dist/cli/chunks/{chunk-GWBI5IMK.js → chunk-LRWRFKQH.js} +1 -1
  78. package/dist/cli/chunks/{chunk-JXWZZTPN.js → chunk-M6RVKGIP.js} +2 -2
  79. package/dist/cli/chunks/{chunk-IQXDL7BX.js → chunk-MAJ5QFVY.js} +1 -1
  80. package/dist/cli/chunks/chunk-MYCVU3D3.js +14 -0
  81. package/dist/cli/chunks/{chunk-C7SJS5E4.js → chunk-N6P7ENG7.js} +2 -2
  82. package/dist/cli/chunks/{chunk-KQYKPEY6.js → chunk-N6SIKSCO.js} +2 -2
  83. package/dist/cli/chunks/{chunk-BP3KVVEM.js → chunk-NBKM7NKX.js} +2 -2
  84. package/dist/cli/chunks/{chunk-TZG7TJD5.js → chunk-NLUBN642.js} +2 -2
  85. package/dist/cli/chunks/{chunk-HCVIUAF2.js → chunk-NNF3GCGF.js} +2 -2
  86. package/dist/cli/chunks/{chunk-AYESXBSX.js → chunk-NTVJKQ5S.js} +2 -2
  87. package/dist/cli/chunks/{chunk-LPSIKIE2.js → chunk-NZQYNUGM.js} +2 -2
  88. package/dist/cli/chunks/{chunk-JX2AS6QZ.js → chunk-ONMJJ2C3.js} +1 -1
  89. package/dist/cli/chunks/{chunk-AOZ3JGJQ.js → chunk-OXOXNAEZ.js} +2 -2
  90. package/dist/cli/chunks/chunk-PSF6YQQM.js +180 -0
  91. package/dist/cli/chunks/{chunk-OW47RQEW.js → chunk-PTOTOBOU.js} +1 -1
  92. package/dist/cli/chunks/{chunk-FIMBLHR5.js → chunk-PUSZ4NBY.js} +2 -2
  93. package/dist/cli/chunks/chunk-PYYNY7RJ.js +2 -0
  94. package/dist/cli/chunks/{chunk-JXWJ6BLR.js → chunk-QEJBJST4.js} +1 -1
  95. package/dist/cli/chunks/{chunk-AQ4ZSM4D.js → chunk-QGLWFZVQ.js} +2 -2
  96. package/dist/cli/chunks/{chunk-ONFODTGV.js → chunk-QITO7E7Y.js} +1 -1
  97. package/dist/cli/chunks/{chunk-YWW6YPT5.js → chunk-QMSDKKYG.js} +1 -1
  98. package/dist/cli/chunks/{chunk-DCZV4QTP.js → chunk-RBDAHW2M.js} +2 -2
  99. package/dist/cli/chunks/{chunk-TLPIUYN3.js → chunk-RDJWUKIR.js} +2 -2
  100. package/dist/cli/chunks/{chunk-FDETLFX4.js → chunk-REJEFTWX.js} +1 -1
  101. package/dist/cli/chunks/{chunk-BVHLZ3TP.js → chunk-ROEIR3OD.js} +1 -1
  102. package/dist/cli/chunks/{chunk-GTJNB5B4.js → chunk-RTGNWRQI.js} +2 -2
  103. package/dist/cli/chunks/{chunk-XJJQZULZ.js → chunk-SL4TAJOE.js} +2 -2
  104. package/dist/cli/chunks/{chunk-ENJBAK7Y.js → chunk-T4DDCMKG.js} +113 -113
  105. package/dist/cli/chunks/{chunk-ZIX5MU4Q.js → chunk-TJGIIGKL.js} +2 -2
  106. package/dist/cli/chunks/{chunk-ZOORGOLY.js → chunk-TLCCM2AF.js} +1 -1
  107. package/dist/cli/chunks/{chunk-RBHWBTKA.js → chunk-TVHWI77X.js} +1 -1
  108. package/dist/cli/chunks/{chunk-P7HWW3VH.js → chunk-TYUIQSSF.js} +2 -2
  109. package/dist/cli/chunks/{chunk-YXMKMUQX.js → chunk-UIIEZMSM.js} +1 -1
  110. package/dist/cli/chunks/{chunk-VWDVQFEV.js → chunk-UIRTXM7C.js} +71 -71
  111. package/dist/cli/chunks/{chunk-2HUYG6Q6.js → chunk-UNXUSYRL.js} +3 -3
  112. package/dist/cli/chunks/chunk-VA45HLBF.js +2 -0
  113. package/dist/cli/chunks/{chunk-BMMXCDTH.js → chunk-VAIOZDG5.js} +1 -1
  114. package/dist/cli/chunks/{chunk-3YS4ZLL2.js → chunk-VLAGWLHF.js} +2 -2
  115. package/dist/cli/chunks/{chunk-SCXRYZ3U.js → chunk-VOOJDHLI.js} +14 -8
  116. package/dist/cli/chunks/{chunk-RRQH5BMQ.js → chunk-VSKABN3B.js} +29 -17
  117. package/dist/cli/chunks/{chunk-HHDPHHTX.js → chunk-VUL5HIKR.js} +2 -2
  118. package/dist/cli/chunks/{chunk-ZXWHKLZN.js → chunk-W7XVEWKQ.js} +1 -1
  119. package/dist/cli/chunks/{chunk-CZEQFAKE.js → chunk-WB6TI6Q3.js} +2 -2
  120. package/dist/cli/chunks/{chunk-YDBBXRH7.js → chunk-X2FLWV5C.js} +2 -2
  121. package/dist/cli/chunks/{chunk-G7LVJXZR.js → chunk-XE4YKDIM.js} +2 -2
  122. package/dist/cli/chunks/{chunk-A7ZCJ2XN.js → chunk-XGBIXRKD.js} +2 -2
  123. package/dist/cli/chunks/{chunk-B23E53WF.js → chunk-XMMWYQJK.js} +2 -2
  124. package/dist/cli/chunks/{chunk-3MFAU2JA.js → chunk-XNJ6DIEW.js} +2 -2
  125. package/dist/cli/chunks/{chunk-VJR2JIYP.js → chunk-XTWYCMAM.js} +2 -2
  126. package/dist/cli/chunks/{chunk-POV6V35B.js → chunk-XY3WUGD3.js} +2 -2
  127. package/dist/cli/chunks/{chunk-OU2FFOML.js → chunk-YEZJE2ZW.js} +4 -4
  128. package/dist/cli/chunks/{chunk-HDKXJMRS.js → chunk-YLEMSN46.js} +1 -1
  129. package/dist/cli/chunks/{chunk-SH7N3Y63.js → chunk-YMN4C32S.js} +3 -3
  130. package/dist/cli/chunks/{chunk-KIUJ4EI5.js → chunk-YN7HCVUP.js} +2 -2
  131. package/dist/cli/chunks/{chunk-WYSM5565.js → chunk-YQJBE6NX.js} +2 -2
  132. package/dist/cli/chunks/{chunk-QNIOQ4AR.js → chunk-ZBJRNCWX.js} +2 -2
  133. package/dist/cli/chunks/{chunk-NZIU2SEI.js → chunk-ZG4EKPGV.js} +1 -1
  134. package/dist/cli/chunks/{chunk-4ZAX5A6E.js → chunk-ZWSRIJ2T.js} +2 -2
  135. package/dist/cli/chunks/{ci-5BS5ALBZ.js → ci-LRTJSZHT.js} +2 -2
  136. package/dist/cli/chunks/{ci-output-I7CGW62R.js → ci-output-LISCHUKD.js} +2 -2
  137. package/dist/cli/chunks/{circuit-breaker-7P2V65XX.js → circuit-breaker-7PMP25KZ.js} +2 -2
  138. package/dist/cli/chunks/{claude-flow-setup-EKRLBRCE.js → claude-flow-setup-DOW4QVMC.js} +2 -2
  139. package/dist/cli/chunks/client-XF6SJO2C.js +2 -0
  140. package/dist/cli/chunks/{cline-installer-U6KRJJHQ.js → cline-installer-2NXQGW73.js} +2 -2
  141. package/dist/cli/chunks/{code-I6PB6YM7.js → code-3X6RWAS7.js} +2 -2
  142. package/dist/cli/chunks/{code-index-extractor-NP7JW32L.js → code-index-extractor-4ABP5WCP.js} +2 -2
  143. package/dist/cli/chunks/{codex-installer-52W4TK27.js → codex-installer-V7PII6GL.js} +2 -2
  144. package/dist/cli/chunks/{completions-LTOAC3Y5.js → completions-Y7LNQ63I.js} +2 -2
  145. package/dist/cli/chunks/{complexity-analyzer-RXAF5SX3.js → complexity-analyzer-XLYMAM6I.js} +2 -2
  146. package/dist/cli/chunks/{continuedev-installer-BNUOLW2M.js → continuedev-installer-GOT4TKNT.js} +2 -2
  147. package/dist/cli/chunks/{copilot-installer-YXANWEVX.js → copilot-installer-D6BAQVIO.js} +2 -2
  148. package/dist/cli/chunks/{cost-tracker-EBAHKAGL.js → cost-tracker-VT7C5Q52.js} +2 -2
  149. package/dist/cli/chunks/{coverage-SWVKYJ6V.js → coverage-C62MRP4M.js} +3 -3
  150. package/dist/cli/chunks/cross-domain-router-J2OFPM6R.js +2 -0
  151. package/dist/cli/chunks/{cursor-installer-QIZPJ5YQ.js → cursor-installer-WAWSS2K2.js} +2 -2
  152. package/dist/cli/chunks/{daemon-YPL4BMZX.js → daemon-CP2ETHRF.js} +3 -3
  153. package/dist/cli/chunks/{dag-attention-scheduler-6XXECMF2.js → dag-attention-scheduler-SZIZWPV7.js} +2 -2
  154. package/dist/cli/chunks/{detect-GGTJLBM6.js → detect-AJX6NJEP.js} +2 -2
  155. package/dist/cli/chunks/{dist-node-B6P2AD27.js → dist-node-E5X47QTY.js} +2 -2
  156. package/dist/cli/chunks/{domain-handler-TSZJEND7.js → domain-handler-FN3PIP45.js} +2 -2
  157. package/dist/cli/chunks/{domain-transfer-EBKK2ZKV.js → domain-transfer-N3TOJEMT.js} +2 -2
  158. package/dist/cli/chunks/dream-D5LD5SOZ.js +2 -0
  159. package/dist/cli/chunks/{embed-and-insert-pattern-OMRWRS6V.js → embed-and-insert-pattern-PJI5TZKR.js} +2 -2
  160. package/dist/cli/chunks/{eval-Q5PAQA5O.js → eval-OS54TDQU.js} +2 -2
  161. package/dist/cli/chunks/{experience-capture-middleware-5MOUWAON.js → experience-capture-middleware-FBM4ANZW.js} +3 -3
  162. package/dist/cli/chunks/{fast-paths-32E3N4KU.js → fast-paths-2CVAAPQO.js} +2 -2
  163. package/dist/cli/chunks/{feature-flags-WRIWP5VL.js → feature-flags-A5KFWVFC.js} +2 -2
  164. package/dist/cli/chunks/{feature-flags-VERJA5SQ.js → feature-flags-GEXTW6OT.js} +2 -2
  165. package/dist/cli/chunks/{file-discovery-2X6CZSTB.js → file-discovery-KWLVC7KN.js} +2 -2
  166. package/dist/cli/chunks/{fleet-VB2JTP7P.js → fleet-MNKH356S.js} +3 -3
  167. package/dist/cli/chunks/{gnn-wrapper-HNKBFKUD.js → gnn-wrapper-ALTWYFVZ.js} +2 -2
  168. package/dist/cli/chunks/{heartbeat-handler-Y5GIRQNS.js → heartbeat-handler-MBMEPEGW.js} +4 -4
  169. package/dist/cli/chunks/{heartbeat-scheduler-UGB57DTJ.js → heartbeat-scheduler-OH3SS7MH.js} +2 -2
  170. package/dist/cli/chunks/hnsw-adapter-M2MMM3N6.js +2 -0
  171. package/dist/cli/chunks/hnsw-index-JO7KNF7M.js +2 -0
  172. package/dist/cli/chunks/{hnsw-legacy-bridge-A6G6GPMS.js → hnsw-legacy-bridge-WTD5PR5V.js} +2 -2
  173. package/dist/cli/chunks/{better-sqlite3-XT27JRMH.js → hnswlib-node-WENGW3YX.js} +2 -2
  174. package/dist/cli/chunks/hooks-ELHGEBFK.js +248 -0
  175. package/dist/cli/chunks/{hybrid-router-LTAQGTNR.js → hybrid-router-D6ZMIZCE.js} +2 -2
  176. package/dist/cli/chunks/{hypergraph-engine-IRTPRX6K.js → hypergraph-engine-JOQ6TERZ.js} +2 -2
  177. package/dist/cli/chunks/{hypergraph-handler-6IVDHP2K.js → hypergraph-handler-HX45YWWN.js} +3 -3
  178. package/dist/cli/chunks/impact-analyzer-ROQL4J7P.js +2 -0
  179. package/dist/cli/chunks/{init-handler-NNLOQN2F.js → init-handler-TNVU6NQ6.js} +6 -6
  180. package/dist/cli/chunks/init-wizard-4BDFZX4M.js +2 -0
  181. package/dist/cli/chunks/kernel-37Y63WKR.js +2 -0
  182. package/dist/cli/chunks/{kilocode-installer-Q5A6WBX2.js → kilocode-installer-YC5RJIY4.js} +2 -2
  183. package/dist/cli/chunks/{kiro-installer-ZVOLX6AX.js → kiro-installer-EAB26M55.js} +2 -2
  184. package/dist/cli/chunks/knowledge-graph-V3DX6ZCX.js +2 -0
  185. package/dist/cli/chunks/learning-A2OB7D2B.js +117 -0
  186. package/dist/cli/chunks/{llm-router-EFIOXD3E.js → llm-router-KEG6PA7C.js} +4 -4
  187. package/dist/cli/chunks/{load-7HYD5K5T.js → load-D6ZDLVA3.js} +2 -2
  188. package/dist/cli/chunks/load-test-HPBA2CMT.js +2 -0
  189. package/dist/cli/chunks/{mcp-TQEPJY5L.js → mcp-ERJHZ6FN.js} +2 -2
  190. package/dist/cli/chunks/{memory-2P5KRDUP.js → memory-GSRIJIVR.js} +5 -5
  191. package/dist/cli/chunks/memory-backend-DODDBB46.js +2 -0
  192. package/dist/cli/chunks/memory-handlers-MFLCRS7V.js +2 -0
  193. package/dist/cli/chunks/{multi-model-executor-Z74ALKIH.js → multi-model-executor-GK3V7ERC.js} +2 -2
  194. package/dist/cli/chunks/{opencode-installer-2NICPXQZ.js → opencode-installer-6TTN26RG.js} +2 -2
  195. package/dist/cli/chunks/{orchestrator-ZPVU3M4M.js → orchestrator-YVTSM6QW.js} +37 -18
  196. package/dist/cli/chunks/{pipeline-B55E7S5P.js → pipeline-EWLJCY5G.js} +2 -2
  197. package/dist/cli/chunks/{platform-6FY6335Y.js → platform-2ULHQQME.js} +2 -2
  198. package/dist/cli/chunks/{plugin-F23VOSIL.js → plugin-PYN2KOXA.js} +2 -2
  199. package/dist/cli/chunks/{prime-radiant-advanced-wasm-LL7WPCNW.js → prime-radiant-advanced-wasm-IULCTOGZ.js} +2 -2
  200. package/dist/cli/chunks/protocol-executor-D56OYMCJ.js +2 -0
  201. package/dist/cli/chunks/{protocol-handler-JWPPGEUR.js → protocol-handler-FZYI2SBP.js} +2 -2
  202. package/dist/cli/chunks/{prove-S4PD63BK.js → prove-DN7S74SP.js} +2 -2
  203. package/dist/cli/chunks/{provider-manager-R7YYUTO3.js → provider-manager-FT3MCROB.js} +2 -2
  204. package/dist/cli/chunks/qe-reasoning-bank-KXROIEK7.js +2 -0
  205. package/dist/cli/chunks/{quality-UIG6G2BR.js → quality-ITBU6LGC.js} +2 -2
  206. package/dist/cli/chunks/queen-coordinator-XOGATERL.js +2 -0
  207. package/dist/cli/chunks/{real-embeddings-7GJEWY4C.js → real-embeddings-PZUZ5RXJ.js} +2 -2
  208. package/dist/cli/chunks/{roocode-installer-Y5YVCVVS.js → roocode-installer-2LMVZOUZ.js} +2 -2
  209. package/dist/cli/chunks/router-3EHNUCOM.js +2 -0
  210. package/dist/cli/chunks/routing-feedback-ZHKGET22.js +2 -0
  211. package/dist/cli/chunks/{routing-handler-YFBT7LZH.js → routing-handler-5RB73UCF.js} +2 -2
  212. package/dist/cli/chunks/{ruvector-commands-7WCRMBWZ.js → ruvector-commands-VBN4APMG.js} +2 -2
  213. package/dist/cli/chunks/{rvf-dual-writer-PPZ5AVFW.js → rvf-dual-writer-BNY4AUWT.js} +2 -2
  214. package/dist/cli/chunks/{rvf-migration-adapter-SVW4AKVC.js → rvf-migration-adapter-73MKPBGV.js} +2 -2
  215. package/dist/cli/chunks/{rvf-migration-coordinator-TNCPU743.js → rvf-migration-coordinator-SGVB7ZAZ.js} +2 -2
  216. package/dist/cli/chunks/rvf-native-adapter-4YC5IQUW.js +2 -0
  217. package/dist/cli/chunks/safe-db-PLJRHQIC.js +2 -0
  218. package/dist/cli/chunks/schedule-7DGELVJE.js +2 -0
  219. package/dist/cli/chunks/scheduler-VWASEC2J.js +2 -0
  220. package/dist/cli/chunks/{security-22YXZGU3.js → security-XUH4H7R3.js} +3 -3
  221. package/dist/cli/chunks/shared-rvf-adapter-DCVDY2XW.js +2 -0
  222. package/dist/cli/chunks/{shared-rvf-dual-writer-Q5OSQNW5.js → shared-rvf-dual-writer-GML4EDYF.js} +2 -2
  223. package/dist/cli/chunks/sqlite-persistence-CTEBGVOW.js +2 -0
  224. package/dist/cli/chunks/{status-handler-CTEEZTVQ.js → status-handler-XI7GJF6Z.js} +2 -2
  225. package/dist/cli/chunks/{structural-health-S72DLFPZ.js → structural-health-WPCYKOXV.js} +2 -2
  226. package/dist/cli/chunks/{sync-2AJ5S27F.js → sync-SFKTCRZC.js} +10 -10
  227. package/dist/cli/chunks/{task-handler-XQCQAUM3.js → task-handler-FZB55IEG.js} +2 -2
  228. package/dist/cli/chunks/{task-handlers-U6DXLSYJ.js → task-handlers-EXZGFH7F.js} +3 -3
  229. package/dist/cli/chunks/{test-K7C4CWFH.js → test-XYRN4OVU.js} +4 -4
  230. package/dist/cli/chunks/{test-scheduling-WQBR6C3V.js → test-scheduling-FLVOPGOT.js} +5 -5
  231. package/dist/cli/chunks/{token-bootstrap-IRZHAD7N.js → token-bootstrap-FDCFVRHM.js} +2 -2
  232. package/dist/cli/chunks/{token-usage-DIK6QRD5.js → token-usage-MHNZF3DM.js} +2 -2
  233. package/dist/cli/chunks/{transformers-RPUPJLSR.js → transformers-4CRVTMWY.js} +2 -2
  234. package/dist/cli/chunks/{tree-sitter-wasm-parser-A45KH4YZ.js → tree-sitter-wasm-parser-CI3V4AND.js} +2 -2
  235. package/dist/cli/chunks/{types-LO5DGIJC.js → types-RKCD4BNL.js} +2 -2
  236. package/dist/cli/chunks/unified-memory-YDKXKW3D.js +2 -0
  237. package/dist/cli/chunks/unified-memory-hnsw-6N7YZCLR.js +2 -0
  238. package/dist/cli/chunks/unified-persistence-UTWLPUQI.js +2 -0
  239. package/dist/cli/chunks/{upgrade-QZNMQOBY.js → upgrade-463W7VKH.js} +2 -2
  240. package/dist/cli/chunks/{validate-675K5FDZ.js → validate-LENSMEAY.js} +2 -2
  241. package/dist/cli/chunks/{validate-swarm-TJXJFTT4.js → validate-swarm-4FEBNAWA.js} +2 -2
  242. package/dist/cli/chunks/{vibium-2FFU5KPE.js → vibium-TXNVIVWJ.js} +2 -2
  243. package/dist/cli/chunks/visual-security-DGXSOFKD.js +2 -0
  244. package/dist/cli/chunks/{web-tree-sitter-VX55VO25.js → web-tree-sitter-BZEGWID4.js} +2 -2
  245. package/dist/cli/chunks/{windsurf-installer-A7FNN7RB.js → windsurf-installer-7AFXJTPU.js} +2 -2
  246. package/dist/cli/chunks/{witness-chain-QLIBCLCH.js → witness-chain-G6SUZOZG.js} +2 -2
  247. package/dist/cli/chunks/witness-chain-VP4MF6EU.js +2 -0
  248. package/dist/cli/chunks/{workflow-LQDA5VYM.js → workflow-EVQPO6FH.js} +4 -4
  249. package/dist/cli/chunks/workflow-orchestrator-VXSYAKQY.js +2 -0
  250. package/dist/cli/chunks/{wrappers-KE6AZMO6.js → wrappers-HR6RUDI2.js} +2 -2
  251. package/dist/cli/commands/hooks-handlers/editing-hooks.js +9 -3
  252. package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +16 -24
  253. package/dist/cli/commands/hooks-handlers/hooks-shared.d.ts +1 -1
  254. package/dist/cli/commands/hooks-handlers/hooks-shared.js +8 -1
  255. package/dist/cli/commands/hooks-handlers/routing-hooks.js +15 -3
  256. package/dist/cli/commands/hooks-handlers/task-hooks.js +37 -46
  257. package/dist/cli/commands/learning.js +194 -0
  258. package/dist/cli/commands/sync.js +3 -0
  259. package/dist/domains/requirements-validation/services/quality-criteria/quality-criteria-service.js +4 -1
  260. package/dist/init/phases/07-hooks.js +4 -1
  261. package/dist/init/phases/10-workers.js +24 -2
  262. package/dist/integrations/agentic-flow/onnx-embeddings/embedding-generator.js +15 -12
  263. package/dist/integrations/n8n/agent-factory.js +4 -1
  264. package/dist/integrations/n8n/n8n-adapter.js +4 -1
  265. package/dist/kernel/interfaces.d.ts +12 -0
  266. package/dist/kernel/kernel.d.ts +1 -0
  267. package/dist/kernel/kernel.js +57 -0
  268. package/dist/kernel/unified-memory-schemas.d.ts +1 -1
  269. package/dist/kernel/unified-memory-schemas.js +7 -1
  270. package/dist/learning/agent-routing.d.ts +134 -1
  271. package/dist/learning/agent-routing.js +185 -2
  272. package/dist/learning/dream/dream-insights-pruner.d.ts +49 -0
  273. package/dist/learning/dream/dream-insights-pruner.js +53 -0
  274. package/dist/learning/dream/dream-scheduler.js +17 -0
  275. package/dist/learning/loop-health.d.ts +84 -0
  276. package/dist/learning/loop-health.js +91 -0
  277. package/dist/learning/pattern-usage-recorder.d.ts +58 -0
  278. package/dist/learning/pattern-usage-recorder.js +72 -0
  279. package/dist/learning/qe-reasoning-bank-types.d.ts +11 -0
  280. package/dist/learning/qe-reasoning-bank.d.ts +11 -0
  281. package/dist/learning/qe-reasoning-bank.js +86 -3
  282. package/dist/learning/routing-topology-gate.d.ts +40 -0
  283. package/dist/learning/routing-topology-gate.js +55 -0
  284. package/dist/learning/sqlite-persistence.d.ts +6 -1
  285. package/dist/learning/sqlite-persistence.js +14 -20
  286. package/dist/mcp/bundle.js +3833 -3807
  287. package/dist/mcp/handlers/domain-handler-configs.js +72 -13
  288. package/dist/mcp/protocol-server.d.ts +6 -0
  289. package/dist/mcp/protocol-server.js +91 -2
  290. package/dist/mcp/tools/coherence/collapse.d.ts +4 -0
  291. package/dist/mcp/tools/coherence/collapse.js +48 -21
  292. package/dist/mcp/tools/embeddings/embedding.js +5 -2
  293. package/dist/routing/routing-feedback.js +7 -3
  294. package/dist/routing/routing-outcomes-migration.d.ts +31 -0
  295. package/dist/routing/routing-outcomes-migration.js +60 -0
  296. package/dist/test-scheduling/pipeline.d.ts +1 -1
  297. package/dist/test-scheduling/pipeline.js +8 -2
  298. package/dist/workers/workers/learning-consolidation.d.ts +28 -0
  299. package/dist/workers/workers/learning-consolidation.js +204 -0
  300. package/dist/workflows/browser/workflow-loader.js +4 -1
  301. package/package.json +1 -1
  302. package/dist/cli/chunks/adapter-4NVP2SYD.js +0 -2
  303. package/dist/cli/chunks/aqe-learning-engine-ZTR5KIGB.js +0 -2
  304. package/dist/cli/chunks/base-2M65XYDE.js +0 -2
  305. package/dist/cli/chunks/browser-workflow-7EXB6DUF.js +0 -2
  306. package/dist/cli/chunks/chunk-6ZJROHI3.js +0 -2
  307. package/dist/cli/chunks/chunk-J3CLEYJP.js +0 -14
  308. package/dist/cli/chunks/chunk-SRSL5OFF.js +0 -180
  309. package/dist/cli/chunks/chunk-WLPP7V3W.js +0 -95
  310. package/dist/cli/chunks/chunk-YXS6SHB2.js +0 -2
  311. package/dist/cli/chunks/client-KTEVHNVO.js +0 -2
  312. package/dist/cli/chunks/cross-domain-router-23RTLMQL.js +0 -2
  313. package/dist/cli/chunks/dream-KNO2ZF24.js +0 -2
  314. package/dist/cli/chunks/hnsw-adapter-JQHOAYXA.js +0 -2
  315. package/dist/cli/chunks/hnsw-index-AIUQDZLY.js +0 -2
  316. package/dist/cli/chunks/hooks-Z4U7DCTP.js +0 -259
  317. package/dist/cli/chunks/impact-analyzer-ULJRGNBM.js +0 -2
  318. package/dist/cli/chunks/init-wizard-R2WC5V2W.js +0 -2
  319. package/dist/cli/chunks/kernel-ZDQG4UWQ.js +0 -2
  320. package/dist/cli/chunks/knowledge-graph-RLCAQW6I.js +0 -2
  321. package/dist/cli/chunks/learning-NZLHSX4F.js +0 -107
  322. package/dist/cli/chunks/load-test-KH35UZSW.js +0 -2
  323. package/dist/cli/chunks/memory-backend-NOYRJTBH.js +0 -2
  324. package/dist/cli/chunks/memory-handlers-YEQ4LSIX.js +0 -2
  325. package/dist/cli/chunks/protocol-executor-OL36TRHK.js +0 -2
  326. package/dist/cli/chunks/qe-reasoning-bank-C4QW56VE.js +0 -2
  327. package/dist/cli/chunks/queen-coordinator-FDDIA6BW.js +0 -2
  328. package/dist/cli/chunks/router-RRKX62UE.js +0 -2
  329. package/dist/cli/chunks/routing-feedback-NRJJVC35.js +0 -2
  330. package/dist/cli/chunks/rvf-native-adapter-TQLQYN7Y.js +0 -2
  331. package/dist/cli/chunks/safe-db-COFZGOYL.js +0 -2
  332. package/dist/cli/chunks/schedule-QAMKOCVJ.js +0 -2
  333. package/dist/cli/chunks/scheduler-RFETEEGY.js +0 -2
  334. package/dist/cli/chunks/shared-rvf-adapter-QNA66NKB.js +0 -2
  335. package/dist/cli/chunks/sqlite-persistence-43TV2RI3.js +0 -2
  336. package/dist/cli/chunks/unified-memory-VSSMXGHP.js +0 -2
  337. package/dist/cli/chunks/unified-memory-hnsw-ZV324XYA.js +0 -2
  338. package/dist/cli/chunks/unified-persistence-EE2UVIXW.js +0 -2
  339. package/dist/cli/chunks/visual-security-LWH7LME7.js +0 -2
  340. package/dist/cli/chunks/witness-chain-3YAV5SLZ.js +0 -2
  341. package/dist/cli/chunks/workflow-orchestrator-4UG2CNYN.js +0 -2
@@ -8,6 +8,35 @@
8
8
  */
9
9
  import { generateV2LearningFeedback, analyzeComplexity, generateV2AIInsights, generateV2Tests, detectAntiPatterns, generateTestId, } from './handler-factory';
10
10
  import { MetricsCollector } from '../metrics';
11
+ import { DEFAULT_FRAMEWORKS, FRAMEWORK_TO_LANGUAGE, } from '../../shared/types/test-frameworks.js';
12
+ const SUPPORTED_LANGUAGES = Object.keys(DEFAULT_FRAMEWORKS);
13
+ /**
14
+ * Normalize a language string from MCP input. Returns the canonical
15
+ * SupportedLanguage or null if we don't have a generator for it.
16
+ * Issue #474: previously unsupported languages silently produced JS/vitest.
17
+ */
18
+ function normalizeLanguage(input) {
19
+ if (!input)
20
+ return 'typescript';
21
+ const lower = input.toLowerCase().trim();
22
+ // Common aliases
23
+ const aliases = {
24
+ ts: 'typescript',
25
+ js: 'javascript',
26
+ py: 'python',
27
+ 'c#': 'csharp',
28
+ 'c-sharp': 'csharp',
29
+ 'cs': 'csharp',
30
+ golang: 'go',
31
+ rs: 'rust',
32
+ kt: 'kotlin',
33
+ };
34
+ if (aliases[lower])
35
+ return aliases[lower];
36
+ if (SUPPORTED_LANGUAGES.includes(lower))
37
+ return lower;
38
+ return null;
39
+ }
11
40
  // ============================================================================
12
41
  // Test Generation Configuration
13
42
  // ============================================================================
@@ -18,19 +47,49 @@ export const testGenerateConfig = {
18
47
  defaultTimeout: 120000,
19
48
  buildTaskDescription: (params) => `Generate ${params.testType || 'unit'} tests for ${params.language || 'typescript'} code`,
20
49
  includeCodeContext: (params) => params.sourceCode,
21
- mapToPayload: (params, routingResult) => ({
22
- sourceCode: params.sourceCode,
23
- filePath: params.filePath,
24
- language: params.language || 'typescript',
25
- framework: params.framework || 'vitest',
26
- testType: params.testType || 'unit',
27
- coverageGoal: params.coverageGoal || 80,
28
- aiEnhancement: params.aiEnhancement !== false,
29
- detectAntiPatterns: params.detectAntiPatterns || false,
30
- routingTier: routingResult?.decision.tier,
31
- useAgentBooster: routingResult?.useAgentBooster,
32
- compiledContext: routingResult?.compiledContext,
33
- }),
50
+ mapToPayload: (params, routingResult) => {
51
+ // Issue #474: validate language and pick the matching framework instead of
52
+ // silently emitting vitest JS for anything we don't recognize.
53
+ const language = normalizeLanguage(params.language);
54
+ if (language === null) {
55
+ throw new Error(`Unsupported language '${params.language}'. Supported languages: ` +
56
+ `${SUPPORTED_LANGUAGES.join(', ')}. ` +
57
+ `Open a feature request for additional language support.`);
58
+ }
59
+ // Pick framework: user-provided wins; otherwise derive from language.
60
+ // Reject obvious mismatches (e.g. language=python, framework=vitest).
61
+ let framework;
62
+ if (params.framework) {
63
+ framework = params.framework;
64
+ const fwLang = FRAMEWORK_TO_LANGUAGE[framework];
65
+ if (fwLang && fwLang !== language) {
66
+ // typescript<->javascript is a soft compatibility — JS frameworks
67
+ // can target both. Treat as same family.
68
+ const isJsFamily = (l) => l === 'javascript' || l === 'typescript';
69
+ if (!(isJsFamily(fwLang) && isJsFamily(language))) {
70
+ throw new Error(`Framework '${framework}' targets ${fwLang}, but language was '${language}'. ` +
71
+ `Either pick a matching framework or omit \`framework\` to use the default ` +
72
+ `(${DEFAULT_FRAMEWORKS[language]}).`);
73
+ }
74
+ }
75
+ }
76
+ else {
77
+ framework = DEFAULT_FRAMEWORKS[language];
78
+ }
79
+ return {
80
+ sourceCode: params.sourceCode,
81
+ filePath: params.filePath,
82
+ language,
83
+ framework,
84
+ testType: params.testType || 'unit',
85
+ coverageGoal: params.coverageGoal || 80,
86
+ aiEnhancement: params.aiEnhancement !== false,
87
+ detectAntiPatterns: params.detectAntiPatterns || false,
88
+ routingTier: routingResult?.decision.tier,
89
+ useAgentBooster: routingResult?.useAgentBooster,
90
+ compiledContext: routingResult?.compiledContext,
91
+ };
92
+ },
34
93
  mapToResult: (taskId, data, duration, savedFiles, params) => {
35
94
  const sourceCode = params?.sourceCode || '';
36
95
  const language = params?.language || 'typescript';
@@ -33,6 +33,12 @@ export interface MCPServerInfo {
33
33
  protocolVersion: string;
34
34
  }
35
35
  export declare class MCPProtocolServer {
36
+ /**
37
+ * Issue #473: Decide if a tool result is "successful enough" to cache.
38
+ * Refuse to cache anything that looks like a failure so we don't serve
39
+ * errors back to future callers.
40
+ */
41
+ private isSuccessfulResult;
36
42
  private readonly config;
37
43
  private readonly transport;
38
44
  private readonly registry;
@@ -46,7 +46,40 @@ const _pkg = _require('../../package.json');
46
46
  // ============================================================================
47
47
  // MCP Protocol Server
48
48
  // ============================================================================
49
+ /**
50
+ * Issue #473: parse the MCP tool name into a (domain, action) pair so the
51
+ * session cache can compute a deterministic fingerprint that's stable across
52
+ * naming styles. Handles both flat (`memory_query`) and slash (`qe/embeddings/search`).
53
+ */
54
+ function parseToolDomainAction(name) {
55
+ if (name.includes('/')) {
56
+ const idx = name.lastIndexOf('/');
57
+ return { domain: name.slice(0, idx) || 'mcp', action: name.slice(idx + 1) };
58
+ }
59
+ const us = name.indexOf('_');
60
+ if (us > 0) {
61
+ return { domain: name.slice(0, us), action: name.slice(us + 1) };
62
+ }
63
+ return { domain: 'mcp', action: name };
64
+ }
49
65
  export class MCPProtocolServer {
66
+ /**
67
+ * Issue #473: Decide if a tool result is "successful enough" to cache.
68
+ * Refuse to cache anything that looks like a failure so we don't serve
69
+ * errors back to future callers.
70
+ */
71
+ isSuccessfulResult(result) {
72
+ if (!result || typeof result !== 'object')
73
+ return false;
74
+ const r = result;
75
+ if (r.isError === true)
76
+ return false;
77
+ if (r.success === false)
78
+ return false;
79
+ if (typeof r.error === 'string' && r.error.length > 0)
80
+ return false;
81
+ return true;
82
+ }
50
83
  config;
51
84
  transport;
52
85
  registry;
@@ -386,10 +419,66 @@ export class MCPProtocolServer {
386
419
  try {
387
420
  // IMP-00: Execute pre-tool-call middleware
388
421
  const processedCtx = await this.middlewareChain.executePreHooks(ctx);
422
+ // Issue #473: Session-cache lookup for read-only tools.
423
+ // Concurrency-safe tools are idempotent in practice — same input yields
424
+ // the same output, so we can short-circuit repeated calls with an O(1)
425
+ // fingerprint lookup. Tools without isConcurrencySafe (writes, scans,
426
+ // executions) always re-run.
427
+ const cacheable = tool.definition.isConcurrencySafe === true;
428
+ let cacheFingerprint = null;
429
+ if (cacheable && process.env.AQE_SESSION_CACHE !== 'off') {
430
+ try {
431
+ const { getSessionCache } = await import('../optimization/session-cache.js');
432
+ const cache = getSessionCache();
433
+ const { domain, action } = parseToolDomainAction(name);
434
+ cacheFingerprint = cache.computeFingerprint(domain, action, processedCtx.params || {});
435
+ const hit = cache.get(cacheFingerprint);
436
+ if (hit) {
437
+ // Cache hit — return the stored result without running the handler.
438
+ const cachedText = JSON.stringify(hit.result, null, 2);
439
+ this.eventAdapter.adapt({
440
+ success: true,
441
+ data: hit.result,
442
+ metadata: {
443
+ executionTime: performance.now() - startTime,
444
+ timestamp: new Date().toISOString(),
445
+ requestId: stepId,
446
+ toolName: name,
447
+ },
448
+ });
449
+ success = true;
450
+ return {
451
+ content: [{
452
+ type: 'text',
453
+ text: loopSteeringPrefix ? loopSteeringPrefix + cachedText : cachedText,
454
+ }],
455
+ };
456
+ }
457
+ }
458
+ catch {
459
+ // Cache failure must never break tool execution.
460
+ cacheFingerprint = null;
461
+ }
462
+ }
389
463
  const result = await tool.handler(processedCtx.params);
390
464
  success = true;
391
465
  // IMP-00: Execute post-tool-result middleware
392
466
  const processedResult = await this.middlewareChain.executePostHooks(processedCtx, result);
467
+ // Issue #473: Store successful results for future cache hits.
468
+ // Only cache successful results — error objects shouldn't be served back.
469
+ if (cacheable && cacheFingerprint && this.isSuccessfulResult(processedResult)) {
470
+ try {
471
+ const { getSessionCache } = await import('../optimization/session-cache.js');
472
+ const cache = getSessionCache();
473
+ const { domain, action } = parseToolDomainAction(name);
474
+ // Estimate tokens conservatively by length-of-JSON / 4 chars-per-token.
475
+ const tokenEstimate = Math.max(50, Math.floor(JSON.stringify(processedResult).length / 4));
476
+ cache.set(cacheFingerprint, domain, action, processedResult, tokenEstimate);
477
+ }
478
+ catch {
479
+ // never block on cache write
480
+ }
481
+ }
393
482
  // Emit AG-UI result event for tool completion
394
483
  this.eventAdapter.adapt({
395
484
  success: true,
@@ -688,9 +777,9 @@ export class MCPProtocolServer {
688
777
  parameters: [
689
778
  { name: 'sourceCode', type: 'string', description: 'Source code to generate tests for' },
690
779
  { name: 'filePath', type: 'string', description: 'Original source file path (used as the import target in generated tests; if omitted, generated tests reference the temp source)' },
691
- { name: 'language', type: 'string', description: 'Programming language' },
780
+ { name: 'language', type: 'string', description: 'Programming language (one of: typescript, javascript, python, java, csharp, go, rust, swift, kotlin, dart). Issue #474.', enum: ['typescript', 'javascript', 'python', 'java', 'csharp', 'go', 'rust', 'swift', 'kotlin', 'dart'] },
692
781
  { name: 'testType', type: 'string', description: 'Type of tests', enum: ['unit', 'integration', 'e2e'] },
693
- { name: 'framework', type: 'string', description: 'Test framework to use', enum: ['jest', 'vitest', 'mocha', 'pytest', 'node-test'], default: 'vitest' },
782
+ { name: 'framework', type: 'string', description: 'Test framework to use. If omitted, derived from `language`.', enum: ['jest', 'vitest', 'mocha', 'pytest', 'node-test', 'junit5', 'testng', 'xunit', 'nunit', 'go-test', 'rust-test', 'swift-testing', 'xctest', 'kotlin-junit', 'flutter-test', 'jest-rn'] },
694
783
  { name: 'coverageGoal', type: 'number', description: 'Target coverage percentage (0-100)', default: 80 },
695
784
  { name: 'aiEnhancement', type: 'boolean', description: 'Enable AI-powered enhancement', default: true },
696
785
  { name: 'detectAntiPatterns', type: 'boolean', description: 'Detect and report anti-patterns', default: false },
@@ -105,6 +105,10 @@ export declare class CoherenceCollapseTool extends MCPToolBase<CoherenceCollapse
105
105
  execute(params: CoherenceCollapseParams, context: MCPToolContext): Promise<ToolResult<CoherenceCollapseResult>>;
106
106
  /**
107
107
  * Categorize risk level
108
+ *
109
+ * Non-finite inputs (NaN, null, undefined coerced) fall back to 'low'
110
+ * rather than tripping the default-arm and returning 'critical' for
111
+ * degenerate input (issue #470).
108
112
  */
109
113
  private categorizeRisk;
110
114
  /**
@@ -112,27 +112,30 @@ export class CoherenceCollapseTool extends MCPToolBase {
112
112
  try {
113
113
  // Get service
114
114
  const service = await this.getService();
115
- // Convert to SwarmState format expected by the service
115
+ // Convert to SwarmState format expected by the service.
116
+ // Default any missing numeric fields to safe values so degenerate inputs
117
+ // can't propagate NaN into risk scoring (issue #470).
116
118
  const state = {
117
119
  agents: swarmState.agents.map((a) => ({
118
120
  agentId: a.agentId,
119
121
  agentType: (a.agentType || 'worker'),
120
- health: a.health,
122
+ health: Number.isFinite(a.health) ? a.health : 1.0,
121
123
  beliefs: [],
122
124
  lastActivity: new Date(),
123
125
  errorCount: a.errorCount ?? 0,
124
- successRate: a.successRate ?? 1.0,
126
+ successRate: Number.isFinite(a.successRate) ? a.successRate : 1.0,
125
127
  })),
126
- activeTasks: swarmState.activeTasks,
127
- pendingTasks: swarmState.pendingTasks,
128
- errorRate: swarmState.errorRate,
129
- utilization: swarmState.utilization,
128
+ activeTasks: Number.isFinite(swarmState.activeTasks) ? swarmState.activeTasks : 0,
129
+ pendingTasks: Number.isFinite(swarmState.pendingTasks) ? swarmState.pendingTasks : 0,
130
+ errorRate: Number.isFinite(swarmState.errorRate) ? swarmState.errorRate : 0,
131
+ utilization: Number.isFinite(swarmState.utilization) ? swarmState.utilization : 0,
130
132
  timestamp: new Date(),
131
133
  };
132
134
  // Predict collapse using spectral analysis
133
135
  const result = await service.predictCollapse(state);
134
136
  // Determine risk level
135
- const riskLevel = this.categorizeRisk(result.risk);
137
+ const safeRisk = Number.isFinite(result.risk) ? result.risk : 0;
138
+ const riskLevel = this.categorizeRisk(safeRisk);
136
139
  // Generate enhanced recommendations
137
140
  const recommendations = [
138
141
  ...result.recommendations,
@@ -140,11 +143,16 @@ export class CoherenceCollapseTool extends MCPToolBase {
140
143
  ];
141
144
  const executionTimeMs = Date.now() - startTime;
142
145
  this.markAsRealData();
146
+ // Derive isAtRisk from riskLevel rather than raw risk, so the two
147
+ // can never disagree (issue #470). When risk is non-finite we treat
148
+ // it as "low" — categorizeRisk falls back to 0 above.
149
+ const isAtRisk = riskLevel === 'high' || riskLevel === 'critical' ||
150
+ (riskLevel === 'medium' && safeRisk >= riskThreshold);
143
151
  return {
144
152
  success: true,
145
153
  data: {
146
- risk: result.risk,
147
- isAtRisk: result.risk >= riskThreshold,
154
+ risk: safeRisk,
155
+ isAtRisk,
148
156
  riskLevel,
149
157
  fiedlerValue: result.fiedlerValue,
150
158
  collapseImminent: result.collapseImminent,
@@ -183,8 +191,14 @@ export class CoherenceCollapseTool extends MCPToolBase {
183
191
  }
184
192
  /**
185
193
  * Categorize risk level
194
+ *
195
+ * Non-finite inputs (NaN, null, undefined coerced) fall back to 'low'
196
+ * rather than tripping the default-arm and returning 'critical' for
197
+ * degenerate input (issue #470).
186
198
  */
187
199
  categorizeRisk(risk) {
200
+ if (!Number.isFinite(risk))
201
+ return 'low';
188
202
  if (risk < 0.25)
189
203
  return 'low';
190
204
  if (risk < 0.5)
@@ -228,26 +242,35 @@ export class CoherenceCollapseTool extends MCPToolBase {
228
242
  let risk = 0;
229
243
  const recommendations = [];
230
244
  const weakVertices = [];
245
+ // Default missing numeric fields so degenerate input (e.g. agents without
246
+ // a `health` value) doesn't propagate NaN through the score (issue #470).
247
+ const errorRate = Number.isFinite(state.errorRate) ? state.errorRate : 0;
248
+ const utilization = Number.isFinite(state.utilization) ? state.utilization : 0;
249
+ const pendingTasks = Number.isFinite(state.pendingTasks) ? state.pendingTasks : 0;
250
+ const activeTasks = Number.isFinite(state.activeTasks) ? state.activeTasks : 0;
231
251
  // Factor: Average agent health
232
- const avgHealth = state.agents.reduce((sum, a) => sum + a.health, 0) / state.agents.length;
252
+ const healths = state.agents.map(a => Number.isFinite(a.health) ? a.health : 1.0);
253
+ const avgHealth = healths.length > 0
254
+ ? healths.reduce((sum, h) => sum + h, 0) / healths.length
255
+ : 1.0;
233
256
  risk += (1 - avgHealth) * 0.3;
234
257
  // Factor: Error rate
235
- risk += Math.min(0.25, state.errorRate * 2.5);
258
+ risk += Math.min(0.25, errorRate * 2.5);
236
259
  // Factor: Utilization
237
- if (state.utilization > 0.7) {
238
- risk += (state.utilization - 0.7) * 0.5;
260
+ if (utilization > 0.7) {
261
+ risk += (utilization - 0.7) * 0.5;
239
262
  }
240
263
  // Factor: Task pressure
241
- const taskPressure = state.pendingTasks / Math.max(1, state.activeTasks);
264
+ const taskPressure = pendingTasks / Math.max(1, activeTasks);
242
265
  if (taskPressure > 1) {
243
266
  risk += Math.min(0.2, (taskPressure - 1) * 0.1);
244
267
  }
245
- // Identify weak agents
246
- for (const agent of state.agents) {
247
- if (agent.health < 0.5 || (agent.errorCount ?? 0) > 5) {
268
+ // Identify weak agents (using sanitized health values)
269
+ state.agents.forEach((agent, i) => {
270
+ if (healths[i] < 0.5 || (agent.errorCount ?? 0) > 5) {
248
271
  weakVertices.push(agent.agentId);
249
272
  }
250
- }
273
+ });
251
274
  risk = Math.min(1, risk);
252
275
  // Generate recommendations
253
276
  if (risk >= riskThreshold) {
@@ -260,10 +283,14 @@ export class CoherenceCollapseTool extends MCPToolBase {
260
283
  if (risk < 0.25) {
261
284
  recommendations.push('Swarm appears stable - continue normal operations');
262
285
  }
286
+ const riskLevel = this.categorizeRisk(risk);
287
+ // Keep isAtRisk consistent with riskLevel (issue #470)
288
+ const isAtRisk = riskLevel === 'high' || riskLevel === 'critical' ||
289
+ (riskLevel === 'medium' && risk >= riskThreshold);
263
290
  return {
264
291
  risk,
265
- isAtRisk: risk >= riskThreshold,
266
- riskLevel: this.categorizeRisk(risk),
292
+ isAtRisk,
293
+ riskLevel,
267
294
  fiedlerValue: 0, // Can't compute without spectral analysis
268
295
  collapseImminent: risk >= 0.75,
269
296
  weakVertices,
@@ -211,10 +211,13 @@ export class EmbeddingSearchTool extends MCPToolBase {
211
211
  const startTime = performance.now();
212
212
  try {
213
213
  const adapter = await getEmbeddingAdapter();
214
+ // Issue #469: previously used `||` which turned an explicit
215
+ // `threshold: 0` into the default 0.5. Use `??` so callers can
216
+ // legitimately disable the filter with 0.
214
217
  const results = await adapter.searchByText(params.query, {
215
218
  metric: SimilarityMetric.COSINE,
216
- topK: params.topK || 10,
217
- threshold: params.threshold || 0.5,
219
+ topK: params.topK ?? 10,
220
+ threshold: params.threshold ?? 0.5,
218
221
  namespace: params.namespace,
219
222
  });
220
223
  const latencyMs = performance.now() - startTime;
@@ -12,6 +12,7 @@ import { safeJsonParse } from '../shared/safe-json.js';
12
12
  import { toErrorMessage } from '../shared/error-utils.js';
13
13
  import { EMACalibrator } from './calibration/index.js';
14
14
  import { AutoEscalationTracker } from './escalation/index.js';
15
+ import { ensureRoutingOutcomesAdr095Columns } from './routing-outcomes-migration.js';
15
16
  import { EconomicRoutingModel, } from './economic-routing.js';
16
17
  import { getGlobalCostTracker } from '../shared/llm/cost-tracker.js';
17
18
  // ============================================================================
@@ -144,9 +145,9 @@ export class RoutingFeedbackCollector {
144
145
  return;
145
146
  try {
146
147
  const database = this.db.getDatabase();
147
- // Ensure schema columns exist for databases created before ADR-092.
148
- // Runs once per process via the flag; new databases have columns from
149
- // unified-memory-schemas.ts CREATE TABLE.
148
+ // Ensure schema columns exist for databases created before ADR-092
149
+ // and ADR-095. Runs once per process via the flag; new databases have
150
+ // columns from unified-memory-schemas.ts CREATE TABLE.
150
151
  if (!RoutingFeedbackCollector.schemaMigrated) {
151
152
  for (const col of [
152
153
  'ALTER TABLE routing_outcomes ADD COLUMN model_tier TEXT',
@@ -157,6 +158,9 @@ export class RoutingFeedbackCollector {
157
158
  }
158
159
  catch { /* column already exists */ }
159
160
  }
161
+ // ADR-095: routing exploration columns via shared helper so all
162
+ // writer paths agree on the column set.
163
+ ensureRoutingOutcomesAdr095Columns(database);
160
164
  RoutingFeedbackCollector.schemaMigrated = true;
161
165
  }
162
166
  const modelTier = this.inferTier(outcome.usedAgent);
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Routing Outcomes Schema Migration (ADR-095)
3
+ *
4
+ * Idempotently adds the ADR-095 columns (`exploration`, `criticality`,
5
+ * `q_weight`) to `routing_outcomes` for databases created before this
6
+ * release. New databases get the columns from `unified-memory-schemas.ts`
7
+ * at CREATE TABLE time; this helper handles upgrades.
8
+ *
9
+ * Pattern matches the existing ADR-092 migration in
10
+ * `src/routing/routing-feedback.ts:199-207` — try the ALTER, swallow the
11
+ * "duplicate column name" error if the column already exists.
12
+ *
13
+ * Callers run this before INSERTing rows that reference the new columns.
14
+ * A process-local flag prevents repeated migration attempts.
15
+ */
16
+ import type { Database as DatabaseType } from 'better-sqlite3';
17
+ /**
18
+ * Add the ADR-095 columns to routing_outcomes if they don't already exist.
19
+ * Safe to call multiple times — second and later calls are no-ops.
20
+ *
21
+ * Failure to migrate (e.g. table doesn't exist yet, permission error) is
22
+ * NOT fatal — callers that depend on the new columns should fall back to
23
+ * not writing them. The schema is forward-compatible: inserts that omit
24
+ * the new columns get the defaults.
25
+ */
26
+ export declare function ensureRoutingOutcomesAdr095Columns(db: DatabaseType): void;
27
+ /**
28
+ * Reset the process-local migration flag. Test-only.
29
+ */
30
+ export declare function resetRoutingOutcomesMigrationState(): void;
31
+ //# sourceMappingURL=routing-outcomes-migration.d.ts.map
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Routing Outcomes Schema Migration (ADR-095)
3
+ *
4
+ * Idempotently adds the ADR-095 columns (`exploration`, `criticality`,
5
+ * `q_weight`) to `routing_outcomes` for databases created before this
6
+ * release. New databases get the columns from `unified-memory-schemas.ts`
7
+ * at CREATE TABLE time; this helper handles upgrades.
8
+ *
9
+ * Pattern matches the existing ADR-092 migration in
10
+ * `src/routing/routing-feedback.ts:199-207` — try the ALTER, swallow the
11
+ * "duplicate column name" error if the column already exists.
12
+ *
13
+ * Callers run this before INSERTing rows that reference the new columns.
14
+ * A process-local flag prevents repeated migration attempts.
15
+ */
16
+ let migrated = false;
17
+ /**
18
+ * Add the ADR-095 columns to routing_outcomes if they don't already exist.
19
+ * Safe to call multiple times — second and later calls are no-ops.
20
+ *
21
+ * Failure to migrate (e.g. table doesn't exist yet, permission error) is
22
+ * NOT fatal — callers that depend on the new columns should fall back to
23
+ * not writing them. The schema is forward-compatible: inserts that omit
24
+ * the new columns get the defaults.
25
+ */
26
+ export function ensureRoutingOutcomesAdr095Columns(db) {
27
+ if (migrated)
28
+ return;
29
+ for (const stmt of [
30
+ 'ALTER TABLE routing_outcomes ADD COLUMN exploration INTEGER NOT NULL DEFAULT 0',
31
+ 'ALTER TABLE routing_outcomes ADD COLUMN criticality REAL',
32
+ 'ALTER TABLE routing_outcomes ADD COLUMN q_weight REAL',
33
+ ]) {
34
+ try {
35
+ db.prepare(stmt).run();
36
+ }
37
+ catch {
38
+ // Column already exists, or table doesn't exist yet. Both are
39
+ // acceptable — ALTER is additive, and a missing table means the
40
+ // unified schema hasn't been applied yet (caller's INSERT will fail
41
+ // separately with a clearer error).
42
+ }
43
+ }
44
+ // Index on exploration for the bucket-comparison queries used by
45
+ // `aqe learning loop-health`. Idempotent via IF NOT EXISTS.
46
+ try {
47
+ db.prepare('CREATE INDEX IF NOT EXISTS idx_routing_outcomes_exploration ON routing_outcomes(exploration)').run();
48
+ }
49
+ catch {
50
+ // Table missing; index attempt is best-effort.
51
+ }
52
+ migrated = true;
53
+ }
54
+ /**
55
+ * Reset the process-local migration flag. Test-only.
56
+ */
57
+ export function resetRoutingOutcomesMigrationState() {
58
+ migrated = false;
59
+ }
60
+ //# sourceMappingURL=routing-outcomes-migration.js.map
@@ -29,7 +29,7 @@ import { type VitestConfig } from './executors/vitest-executor';
29
29
  import { GitAwareTestSelector } from './git-aware/test-selector';
30
30
  import { FlakyTestTracker, type FlakyTrackerConfig } from './flaky-tracking/flaky-tracker';
31
31
  import { type GitHubActionsConfig } from './cicd/github-actions';
32
- import type { TestPhase, PhaseResult, CIEnvironment } from './interfaces';
32
+ import { type TestPhase, type PhaseResult, type CIEnvironment } from './interfaces';
33
33
  type MemoryBackend = import('../kernel/interfaces').MemoryBackend;
34
34
  export interface PipelineConfig {
35
35
  /** Working directory for git and test execution */
@@ -29,6 +29,7 @@ import { VitestPhaseExecutor } from './executors/vitest-executor';
29
29
  import { createTestSelector } from './git-aware/test-selector';
30
30
  import { createFlakyTracker, loadFlakyTracker, saveFlakyTracker, } from './flaky-tracking/flaky-tracker';
31
31
  import { createGitHubActionsReporter, detectCIEnvironment, } from './cicd/github-actions';
32
+ import { DEFAULT_TEST_PHASES } from './interfaces';
32
33
  // ============================================================================
33
34
  // Test Scheduling Pipeline
34
35
  // ============================================================================
@@ -81,10 +82,15 @@ export class TestSchedulingPipeline {
81
82
  baseRef: config.baseRef,
82
83
  impactAnalyzer, // INTEGRATION: Pass analyzer to selector
83
84
  });
84
- // 5. Create PhaseScheduler with executor
85
+ // 5. Create PhaseScheduler with executor.
86
+ // Fall back to DEFAULT_TEST_PHASES when callers (e.g. the MCP wrapper)
87
+ // don't provide an explicit phase list — otherwise the scheduler
88
+ // would crash with "this.config.phases is not iterable" (issue #472).
85
89
  const scheduler = createPhaseScheduler(executor, {
86
90
  ...config.scheduler,
87
- phases: config.phases,
91
+ phases: config.phases && config.phases.length > 0
92
+ ? config.phases
93
+ : DEFAULT_TEST_PHASES,
88
94
  });
89
95
  // 6. Create GitHubActionsReporter
90
96
  const reporter = createGitHubActionsReporter(config.reporter);
@@ -30,6 +30,34 @@ export declare class LearningConsolidationWorker extends BaseWorker {
30
30
  * Task Execution -> Experience Capture -> Pattern Extraction -> Pattern Promotion -> Pattern Utilization -> Improved Routing
31
31
  */
32
32
  private runContinuousLearningLoop;
33
+ /**
34
+ * #486 Gap A: mine experiences into `learning:pattern:*` kv per domain.
35
+ *
36
+ * The producer side of the learning-optimization domain pipeline:
37
+ *
38
+ * captured_experiences (SQLite)
39
+ * → bridge drain → learning.ExperienceCaptured event
40
+ * → handleExperienceCaptured → recordExperience
41
+ * → learning:experience:* kv (✓ working post-v3.9.29)
42
+ * → mineExperiences (THIS STEP)
43
+ * → extractPatternsFromExperiences → learnPattern → storePattern
44
+ * → learning:pattern:* kv
45
+ *
46
+ * Without this step the chain ends at the experience kv, so `getPatternStats`
47
+ * reports zero patterns and the `LearningConsolidationWorker.collectPatterns`
48
+ * step a few lines above throws "No learning patterns to consolidate yet".
49
+ *
50
+ * Per-domain cursor avoids re-processing the same experiences (which would
51
+ * duplicate-write since `learnPattern` uses uuidv4 for pattern IDs). Cursor
52
+ * is stored in WorkerMemory under `learning:consolidation-cursor:{domain}`
53
+ * as an ISO timestamp. On first run, the cursor defaults to `now - 1 day`
54
+ * to match the lookback used elsewhere by `runLearningCycle`.
55
+ *
56
+ * Failures are isolated per domain — one bad domain doesn't block others.
57
+ * On failure or empty mining the cursor stays put so the next tick retries
58
+ * the same window with new experiences.
59
+ */
60
+ private mineExperiencesPerDomain;
33
61
  /**
34
62
  * Create patterns from pattern candidates
35
63
  */