agentic-qe 3.14.6 → 3.14.8

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 (467) hide show
  1. package/.claude/helpers/.helpers-version +1 -1
  2. package/.claude/helpers/auto-memory-hook.mjs +18 -9
  3. package/.claude/helpers/helpers.manifest.json +6 -5
  4. package/.claude/helpers/hook-handler.cjs +40 -12
  5. package/.claude/helpers/memory.cjs +86 -0
  6. package/.claude/helpers/router.cjs +105 -0
  7. package/.claude/helpers/session.cjs +166 -0
  8. package/.claude/helpers/statusline.cjs +73 -621
  9. package/.claude/skills/skills-manifest.json +1 -1
  10. package/CHANGELOG.md +204 -0
  11. package/assets/skills/skills-manifest.json +1 -1
  12. package/dist/adapters/a2a/notifications/retry-queue.js +5 -0
  13. package/dist/adapters/claude-flow/pretrain-bridge.js +3 -2
  14. package/dist/agents/claim-verifier/verifiers/file-verifier.js +3 -2
  15. package/dist/cli/bundle.js +8 -8
  16. package/dist/cli/chunks/adapter-XYCOXQCC.js +2 -0
  17. package/dist/cli/chunks/{agent-booster-wasm-2YGML6OU.js → agent-booster-wasm-67OKGDGZ.js} +2 -2
  18. package/dist/cli/chunks/{agent-handler-D5SSQYNU.js → agent-handler-4HZEQ3WQ.js} +2 -2
  19. package/dist/cli/chunks/{agent-memory-branch-YHPLTITV.js → agent-memory-branch-IBHZQSRN.js} +2 -2
  20. package/dist/cli/chunks/aqe-learning-engine-DTJCROTG.js +2 -0
  21. package/dist/cli/chunks/{arena-7BGOXGXO.js → arena-EJBIGSF4.js} +2 -2
  22. package/dist/cli/chunks/{arena-MCE6EU7K.js → arena-LCLRGUIK.js} +4 -4
  23. package/dist/cli/chunks/{audit-BMWTQECB.js → audit-PY4JNDQQ.js} +3 -3
  24. package/dist/cli/chunks/base-5TQ34GMD.js +2 -0
  25. package/dist/cli/chunks/{better-sqlite3-PMUNGASU.js → better-sqlite3-2JG5K6XT.js} +2 -2
  26. package/dist/cli/chunks/{brain-handler-QPUFYX7F.js → brain-handler-3UYK55GA.js} +4 -4
  27. package/dist/cli/chunks/{branch-enumerator-WKFDGRN4.js → branch-enumerator-GOSWOX46.js} +2 -2
  28. package/dist/cli/chunks/{browser-VY5HKH5X.js → browser-DC2JV47Z.js} +2 -2
  29. package/dist/cli/chunks/browser-workflow-KWX4ESTJ.js +2 -0
  30. package/dist/cli/chunks/{chunk-FWASDOT2.js → chunk-25EEIAHS.js} +2 -2
  31. package/dist/cli/chunks/{chunk-P6OYS755.js → chunk-3576QGPP.js} +1 -1
  32. package/dist/cli/chunks/{chunk-2TMWAQQ3.js → chunk-3EKG7HFV.js} +4 -4
  33. package/dist/cli/chunks/{chunk-QZANMBIT.js → chunk-3FCHH4VP.js} +1 -1
  34. package/dist/cli/chunks/{chunk-CD542DNJ.js → chunk-3S5IIK32.js} +1 -1
  35. package/dist/cli/chunks/{chunk-5VFPCSK7.js → chunk-3X2JSW3R.js} +1 -1
  36. package/dist/cli/chunks/{chunk-D45SG6CP.js → chunk-4HXFPBAA.js} +1 -1
  37. package/dist/cli/chunks/{chunk-JVNTSNWU.js → chunk-4PY44TKH.js} +2 -2
  38. package/dist/cli/chunks/{chunk-DZ3AUAAB.js → chunk-4RNCVSVN.js} +2 -2
  39. package/dist/cli/chunks/{chunk-JBTPOIAC.js → chunk-56M4QNXU.js} +2 -2
  40. package/dist/cli/chunks/{chunk-H52HZ67P.js → chunk-5X4HDW5W.js} +2 -2
  41. package/dist/cli/chunks/{chunk-UNFFDHER.js → chunk-673XJBGW.js} +10 -32
  42. package/dist/cli/chunks/{chunk-RTFO5UQH.js → chunk-6F7MFHTY.js} +2 -2
  43. package/dist/cli/chunks/{chunk-Y3LZ35OG.js → chunk-6GJWT2OY.js} +2 -2
  44. package/dist/cli/chunks/{chunk-JXGFRBUO.js → chunk-6GNWVPMR.js} +2 -2
  45. package/dist/cli/chunks/{chunk-3EA536JF.js → chunk-6VTC3OHD.js} +2 -2
  46. package/dist/cli/chunks/{chunk-W6HXLH5G.js → chunk-775WGWLL.js} +3 -3
  47. package/dist/cli/chunks/{chunk-TVYY3OCX.js → chunk-77WL5HQW.js} +1 -1
  48. package/dist/cli/chunks/chunk-7STWD4KJ.js +3 -0
  49. package/dist/cli/chunks/{chunk-YSLL6VSL.js → chunk-7TNCEVWX.js} +2 -2
  50. package/dist/cli/chunks/{chunk-Z7WODOTH.js → chunk-7X3LMTRA.js} +2 -2
  51. package/dist/cli/chunks/{chunk-RZZCUIAI.js → chunk-A53MMSGC.js} +2 -2
  52. package/dist/cli/chunks/{chunk-QW6VMTBR.js → chunk-A5CLVZC3.js} +2 -2
  53. package/dist/cli/chunks/{chunk-IG5GNEC6.js → chunk-AEYJ4ZLA.js} +1 -1
  54. package/dist/cli/chunks/{chunk-NMAIY4PX.js → chunk-AJ5PCJQ2.js} +11 -11
  55. package/dist/cli/chunks/{chunk-WO4QMXIG.js → chunk-AJMAKUS3.js} +2 -2
  56. package/dist/cli/chunks/{chunk-2NPKIBAZ.js → chunk-AOD2ES44.js} +2 -2
  57. package/dist/cli/chunks/chunk-AR2S4DOB.js +2 -0
  58. package/dist/cli/chunks/{chunk-257E2A5M.js → chunk-AUFV2G2J.js} +5 -5
  59. package/dist/cli/chunks/{chunk-BVR7RMC5.js → chunk-B2QKBQYD.js} +1 -1
  60. package/dist/cli/chunks/{chunk-B6D2CHEH.js → chunk-BCCSV3RH.js} +1 -1
  61. package/dist/cli/chunks/{chunk-2YXGBZWV.js → chunk-BFIXUKOR.js} +1 -1
  62. package/dist/cli/chunks/chunk-BHPTHC5O.js +4 -0
  63. package/dist/cli/chunks/{chunk-AIRGNL55.js → chunk-BITFGVZ4.js} +2 -2
  64. package/dist/cli/chunks/{chunk-MBRHSU6W.js → chunk-BL6273KR.js} +10 -10
  65. package/dist/cli/chunks/{chunk-SMDN3BQZ.js → chunk-BOIUENWW.js} +1 -1
  66. package/dist/cli/chunks/{chunk-YS4FCTWF.js → chunk-BT3MI2BW.js} +1 -1
  67. package/dist/cli/chunks/{chunk-JZOS5FCX.js → chunk-BTBJ2NLH.js} +2 -2
  68. package/dist/cli/chunks/{chunk-CCK4BF76.js → chunk-BUVJIVFG.js} +1 -1
  69. package/dist/cli/chunks/{chunk-2JVWITNK.js → chunk-BZIPW2PA.js} +56 -80
  70. package/dist/cli/chunks/{chunk-BPEDWS6O.js → chunk-C647D42G.js} +2 -2
  71. package/dist/cli/chunks/{chunk-6U7LNMWZ.js → chunk-CBWM5NOO.js} +3 -3
  72. package/dist/cli/chunks/{chunk-72KXSMWI.js → chunk-CIEXUYY7.js} +1 -1
  73. package/dist/cli/chunks/{chunk-SE4WIB26.js → chunk-CLUHGBLN.js} +4 -4
  74. package/dist/cli/chunks/{chunk-JIXUMYKZ.js → chunk-CQEWL32R.js} +1 -1
  75. package/dist/cli/chunks/{chunk-CM7U6TAX.js → chunk-CXUC7YKA.js} +2 -2
  76. package/dist/cli/chunks/{chunk-7LPR6HJG.js → chunk-D2Y36V5J.js} +2 -2
  77. package/dist/cli/chunks/{chunk-BJTJLJRZ.js → chunk-DSJJHPPS.js} +4 -4
  78. package/dist/cli/chunks/{chunk-ZVWVV4EX.js → chunk-DZHXCOSK.js} +1 -1
  79. package/dist/cli/chunks/{chunk-7Z5LHRC3.js → chunk-EBV3WFIR.js} +2 -2
  80. package/dist/cli/chunks/{chunk-KNNISEDY.js → chunk-EKO5QL2B.js} +1 -1
  81. package/dist/cli/chunks/{chunk-XAS3XRYM.js → chunk-EMOZ5O5S.js} +1 -1
  82. package/dist/cli/chunks/{chunk-62N4NUJH.js → chunk-ES7TAJRJ.js} +2 -2
  83. package/dist/cli/chunks/chunk-EXQGHTPD.js +65 -0
  84. package/dist/cli/chunks/{chunk-Q7EAGKAE.js → chunk-F2WAB4WK.js} +2 -2
  85. package/dist/cli/chunks/{chunk-L4RUBPLR.js → chunk-F57FTFWS.js} +2 -2
  86. package/dist/cli/chunks/{chunk-GGRHV6D7.js → chunk-F6JJNBE5.js} +1 -1
  87. package/dist/cli/chunks/{chunk-3EZOZN25.js → chunk-FRC7AFB4.js} +2 -2
  88. package/dist/cli/chunks/{chunk-RSXXCL4A.js → chunk-G36RZF2Y.js} +1 -1
  89. package/dist/cli/chunks/{chunk-ZSPU4MOS.js → chunk-G3C7Z6FO.js} +2 -2
  90. package/dist/cli/chunks/{chunk-SNOBH4AZ.js → chunk-GA63ESNT.js} +2 -2
  91. package/dist/cli/chunks/{chunk-HNFVJP4I.js → chunk-GHMJFICO.js} +2 -2
  92. package/dist/cli/chunks/{chunk-7D3V65N5.js → chunk-GK5WLUX3.js} +1 -1
  93. package/dist/cli/chunks/{chunk-RETBYIAC.js → chunk-GQJ4QDEN.js} +6 -6
  94. package/dist/cli/chunks/chunk-GVLRE3BV.js +12 -0
  95. package/dist/cli/chunks/{chunk-MW2GGZZ5.js → chunk-H5UH234L.js} +1 -1
  96. package/dist/cli/chunks/{chunk-HM6ZSCPI.js → chunk-HBAFXWSO.js} +1 -1
  97. package/dist/cli/chunks/{chunk-DHVX5UB2.js → chunk-HE3BDBAO.js} +2 -2
  98. package/dist/cli/chunks/{chunk-YFBSPLJG.js → chunk-HHANMCD2.js} +1 -1
  99. package/dist/cli/chunks/chunk-HPVYJ6JH.js +2 -0
  100. package/dist/cli/chunks/{chunk-PX5YDCRH.js → chunk-I6NZFBT3.js} +3 -3
  101. package/dist/cli/chunks/{chunk-5J6W7SIA.js → chunk-ISBOHF6Y.js} +1 -1
  102. package/dist/cli/chunks/{chunk-UCFQALXO.js → chunk-J24AJEDE.js} +2 -2
  103. package/dist/cli/chunks/{chunk-FBMN7B46.js → chunk-J5HTQHJK.js} +2 -2
  104. package/dist/cli/chunks/{chunk-GPYVDFB3.js → chunk-JDOVO4E4.js} +205 -195
  105. package/dist/cli/chunks/chunk-JQAJUXRE.js +2 -0
  106. package/dist/cli/chunks/{chunk-RG52OKAM.js → chunk-JRK5GX56.js} +1 -1
  107. package/dist/cli/chunks/{chunk-I33ERSGB.js → chunk-JRLZ7LZ3.js} +2 -2
  108. package/dist/cli/chunks/{chunk-NQZ5AR3D.js → chunk-JTOFLDU7.js} +2 -2
  109. package/dist/cli/chunks/{chunk-NHWGMJAP.js → chunk-K6EOHGKS.js} +2 -2
  110. package/dist/cli/chunks/{chunk-5QQSIGUA.js → chunk-KKXH25IH.js} +2 -2
  111. package/dist/cli/chunks/{chunk-VGFFFKGK.js → chunk-KNSQWM2E.js} +2 -2
  112. package/dist/cli/chunks/{chunk-B6MOJC3X.js → chunk-L5T32SRF.js} +1 -1
  113. package/dist/cli/chunks/{chunk-WGM35YWL.js → chunk-LKFBW2QM.js} +2 -2
  114. package/dist/cli/chunks/{chunk-AJRUJAAK.js → chunk-LMAI74EP.js} +1 -1
  115. package/dist/cli/chunks/{chunk-C6KWXUFJ.js → chunk-LQVS5IWH.js} +2 -2
  116. package/dist/cli/chunks/{chunk-H5BS5VH7.js → chunk-LRGTPUJA.js} +2 -2
  117. package/dist/cli/chunks/{chunk-3HZS4M3O.js → chunk-LTHV4PIG.js} +2 -2
  118. package/dist/cli/chunks/{chunk-7CUQCCMD.js → chunk-M7QKCHLQ.js} +2 -2
  119. package/dist/cli/chunks/{chunk-CF2ISEOJ.js → chunk-N3ASALOL.js} +2 -2
  120. package/dist/cli/chunks/{chunk-ZCRTRYXK.js → chunk-NEXBTLN6.js} +2 -2
  121. package/dist/cli/chunks/{chunk-VMNWDJIZ.js → chunk-NJEEKYEP.js} +3 -3
  122. package/dist/cli/chunks/{chunk-ZEV3YTO7.js → chunk-NWUFTLSF.js} +2 -2
  123. package/dist/cli/chunks/{chunk-MQROI74N.js → chunk-O4QB2GFL.js} +2 -2
  124. package/dist/cli/chunks/{chunk-GDSXITFH.js → chunk-OA75C4HY.js} +2 -2
  125. package/dist/cli/chunks/{chunk-SESK3ARK.js → chunk-OVMG6EEF.js} +2 -2
  126. package/dist/cli/chunks/{chunk-MUOG6QXR.js → chunk-OX7MJFLC.js} +2 -2
  127. package/dist/cli/chunks/{chunk-ELLBS5RP.js → chunk-OZJQN7YE.js} +2 -2
  128. package/dist/cli/chunks/{chunk-D6CJIGRU.js → chunk-PFXCRRR6.js} +55 -55
  129. package/dist/cli/chunks/{chunk-ZL6SYKUK.js → chunk-PVJLQ2YZ.js} +1 -1
  130. package/dist/cli/chunks/{chunk-6LIHFV7O.js → chunk-QDRFLM77.js} +2 -2
  131. package/dist/cli/chunks/{chunk-H6ZM3PUT.js → chunk-QH7C4PTX.js} +1 -1
  132. package/dist/cli/chunks/chunk-QKM4XT2F.js +2 -0
  133. package/dist/cli/chunks/{chunk-V4DM6ELU.js → chunk-QP7EKLWU.js} +2 -2
  134. package/dist/cli/chunks/{chunk-BAMN2CHI.js → chunk-QPACHVDI.js} +1 -1
  135. package/dist/cli/chunks/{chunk-QDFTT3RF.js → chunk-QQVE65ER.js} +2 -2
  136. package/dist/cli/chunks/{chunk-LL3IGZBI.js → chunk-QYCZYJH7.js} +2 -2
  137. package/dist/cli/chunks/{chunk-DUYOVM5I.js → chunk-R6I5I724.js} +2 -2
  138. package/dist/cli/chunks/{chunk-ENGZ4D5V.js → chunk-RJJIPTVH.js} +2 -2
  139. package/dist/cli/chunks/{chunk-7NITCZWD.js → chunk-RM6OC35G.js} +1 -1
  140. package/dist/cli/chunks/{chunk-Q5XTSMWR.js → chunk-RTD4U7IW.js} +2 -2
  141. package/dist/cli/chunks/{chunk-DBDPRORT.js → chunk-SKJQKOFJ.js} +2 -2
  142. package/dist/cli/chunks/{chunk-ICTXTNQZ.js → chunk-SMBGK7XI.js} +1 -1
  143. package/dist/cli/chunks/{chunk-PI7TJS62.js → chunk-SPS472C5.js} +2 -2
  144. package/dist/cli/chunks/{chunk-IV5UZOHH.js → chunk-SUNXA2UR.js} +2 -2
  145. package/dist/cli/chunks/{chunk-IB27QACC.js → chunk-SVP3BP52.js} +2 -2
  146. package/dist/cli/chunks/{chunk-5OOMJGFN.js → chunk-T4WQPE77.js} +1 -1
  147. package/dist/cli/chunks/{chunk-66VWCR67.js → chunk-T53ZN4NO.js} +2 -2
  148. package/dist/cli/chunks/chunk-T6W2EYHC.js +2 -0
  149. package/dist/cli/chunks/{chunk-EAY2JMZG.js → chunk-T7YCNOW5.js} +2 -2
  150. package/dist/cli/chunks/{chunk-FZOBD67M.js → chunk-TCQWVVSR.js} +1 -1
  151. package/dist/cli/chunks/{chunk-SJUXE4IC.js → chunk-TGRHO4ES.js} +2 -2
  152. package/dist/cli/chunks/{chunk-6RE3X4V5.js → chunk-TP7L4EX6.js} +2 -2
  153. package/dist/cli/chunks/{chunk-6SQM2MUX.js → chunk-TT45RCLN.js} +2 -2
  154. package/dist/cli/chunks/{chunk-AVBJYI5I.js → chunk-TUZNWRYC.js} +1 -1
  155. package/dist/cli/chunks/{chunk-YHKEDEAA.js → chunk-U2QTL5T2.js} +3 -3
  156. package/dist/cli/chunks/chunk-U64QORFO.js +2 -0
  157. package/dist/cli/chunks/{chunk-BBT64TII.js → chunk-UHLZKH6B.js} +4 -4
  158. package/dist/cli/chunks/{chunk-GSF6MB64.js → chunk-UIWXKRTK.js} +2 -2
  159. package/dist/cli/chunks/{chunk-JMONHE4B.js → chunk-UNFE4RPV.js} +1 -1
  160. package/dist/cli/chunks/{chunk-DPYSUDAO.js → chunk-UQGIC5OX.js} +1 -1
  161. package/dist/cli/chunks/{chunk-IAF6T27S.js → chunk-VAXTPLO3.js} +2 -2
  162. package/dist/cli/chunks/{chunk-6SH5VZUD.js → chunk-VCSNNLWL.js} +2 -2
  163. package/dist/cli/chunks/chunk-VSPNIDQK.js +21 -0
  164. package/dist/cli/chunks/{chunk-6OS76PHI.js → chunk-VV2JVYOI.js} +2 -2
  165. package/dist/cli/chunks/{chunk-IQO7UCFR.js → chunk-VW7AXJQS.js} +2 -2
  166. package/dist/cli/chunks/{chunk-UQ32JHES.js → chunk-W7JUD4EZ.js} +2 -2
  167. package/dist/cli/chunks/chunk-WFKE7NZ5.js +12 -0
  168. package/dist/cli/chunks/{chunk-RFNPJK6N.js → chunk-WVEHKAIH.js} +3 -3
  169. package/dist/cli/chunks/{chunk-64VGZQLB.js → chunk-XAESN54Q.js} +1 -1
  170. package/dist/cli/chunks/{chunk-BMAPORJ7.js → chunk-XECZYQT5.js} +2 -2
  171. package/dist/cli/chunks/chunk-XFT4FYTC.js +2 -0
  172. package/dist/cli/chunks/{chunk-Y3UOUNHM.js → chunk-YHX74M7C.js} +2 -2
  173. package/dist/cli/chunks/chunk-YIWBJ637.js +2 -0
  174. package/dist/cli/chunks/{chunk-SDRHUMJB.js → chunk-Z5UZOYQS.js} +2 -2
  175. package/dist/cli/chunks/{chunk-7J6QC567.js → chunk-Z6G3QVZ4.js} +12 -12
  176. package/dist/cli/chunks/ci-5LIV2HW5.js +82 -0
  177. package/dist/cli/chunks/{ci-output-LDT24TS3.js → ci-output-UO5BDFU4.js} +2 -2
  178. package/dist/cli/chunks/{circuit-breaker-F5V4KITU.js → circuit-breaker-UQDPXYRD.js} +2 -2
  179. package/dist/cli/chunks/{claude-flow-setup-DT6WQQVD.js → claude-flow-setup-62QES3QX.js} +2 -2
  180. package/dist/cli/chunks/client-AJZKCP4I.js +2 -0
  181. package/dist/cli/chunks/{cline-installer-G7TJOAEX.js → cline-installer-X7VZTSZG.js} +2 -2
  182. package/dist/cli/chunks/{code-PGE6A42V.js → code-H3BF4L4H.js} +3 -3
  183. package/dist/cli/chunks/{code-index-extractor-RNITH372.js → code-index-extractor-BJGFZGGL.js} +2 -2
  184. package/dist/cli/chunks/{codex-installer-LBX77AI3.js → codex-installer-KVZWKU6S.js} +2 -2
  185. package/dist/cli/chunks/{completions-4AWLAARX.js → completions-YMILE6V7.js} +2 -2
  186. package/dist/cli/chunks/{complexity-analyzer-ZPNSS476.js → complexity-analyzer-J26N2PWG.js} +2 -2
  187. package/dist/cli/chunks/{continuedev-installer-UAPWX6OA.js → continuedev-installer-MAR42OV7.js} +2 -2
  188. package/dist/cli/chunks/{copilot-installer-BJN2YJGI.js → copilot-installer-CVOJF6OT.js} +2 -2
  189. package/dist/cli/chunks/core-handlers-MQHEMGDV.js +2 -0
  190. package/dist/cli/chunks/{cost-tracker-MHP2VJ63.js → cost-tracker-SXLWXE55.js} +2 -2
  191. package/dist/cli/chunks/{coverage-PQB4IEFG.js → coverage-D7HCHFP3.js} +3 -3
  192. package/dist/cli/chunks/cross-domain-router-3QNMZV5R.js +2 -0
  193. package/dist/cli/chunks/{cursor-installer-ZXBWYAS3.js → cursor-installer-X37VHIKW.js} +2 -2
  194. package/dist/cli/chunks/{daemon-64C7R6OJ.js → daemon-JN7SOH6F.js} +4 -4
  195. package/dist/cli/chunks/{daemon-N2BEGEFY.js → daemon-LIW47IDM.js} +4 -4
  196. package/dist/cli/chunks/{dag-attention-scheduler-SPZDAPNL.js → dag-attention-scheduler-QCHHIZBT.js} +2 -2
  197. package/dist/cli/chunks/{detect-LXJBSSZW.js → detect-WRFCWAX5.js} +2 -2
  198. package/dist/cli/chunks/{dist-node-U3TKZ2IZ.js → dist-node-6FWT4XZO.js} +2 -2
  199. package/dist/cli/chunks/{domain-handler-3DDWUVSR.js → domain-handler-SNFPNMRT.js} +2 -2
  200. package/dist/cli/chunks/{domain-plugins-JJVWI4OQ.js → domain-plugins-MXKHH62P.js} +2 -2
  201. package/dist/cli/chunks/domain-transfer-47UJNERX.js +2 -0
  202. package/dist/cli/chunks/dream-OSWAITPT.js +2 -0
  203. package/dist/cli/chunks/{embed-and-insert-pattern-JPAR7TXX.js → embed-and-insert-pattern-LZFAUNBQ.js} +2 -2
  204. package/dist/cli/chunks/{eval-SOLG23EA.js → eval-AMUXTMJB.js} +2 -2
  205. package/dist/cli/chunks/{experience-capture-middleware-T7G2VOOD.js → experience-capture-middleware-3D65TR2C.js} +4 -4
  206. package/dist/cli/chunks/{fast-paths-32N3ELI4.js → fast-paths-Y7BBMM56.js} +2 -2
  207. package/dist/cli/chunks/{feature-flags-APJDQ4N7.js → feature-flags-JMQQ7JW4.js} +2 -2
  208. package/dist/cli/chunks/{feature-flags-NAHKLDRN.js → feature-flags-VESRRQ6V.js} +2 -2
  209. package/dist/cli/chunks/{file-discovery-YKVM3MDB.js → file-discovery-JJKQQUV6.js} +2 -2
  210. package/dist/cli/chunks/{fleet-55M5CJS4.js → fleet-WIGHICJF.js} +4 -4
  211. package/dist/cli/chunks/{gnn-wrapper-UD6E6S6Z.js → gnn-wrapper-BFNPETTT.js} +2 -2
  212. package/dist/cli/chunks/{heartbeat-handler-OYVW3VSC.js → heartbeat-handler-HDXKTGUI.js} +4 -4
  213. package/dist/cli/chunks/heartbeat-scheduler-BVRVVIE2.js +2 -0
  214. package/dist/cli/chunks/hnsw-adapter-MZTHXULS.js +2 -0
  215. package/dist/cli/chunks/hnsw-index-KHEX4VDG.js +2 -0
  216. package/dist/cli/chunks/{hnsw-legacy-bridge-HBYIS3ZW.js → hnsw-legacy-bridge-6A7OTAPT.js} +2 -2
  217. package/dist/cli/chunks/{hnswlib-node-EQPM42OU.js → hnswlib-node-LKV2H47B.js} +2 -2
  218. package/dist/cli/chunks/{hooks-5ZSSJWO6.js → hooks-KDSFYQQG.js} +10 -10
  219. package/dist/cli/chunks/hybrid-backend-2B3LCLR4.js +2 -0
  220. package/dist/cli/chunks/{hypergraph-engine-XBGVQ4PD.js → hypergraph-engine-GDLPEPUC.js} +2 -2
  221. package/dist/cli/chunks/{hypergraph-handler-CAWAQ673.js → hypergraph-handler-4UMFA2EW.js} +3 -3
  222. package/dist/cli/chunks/impact-analyzer-4R4VWOGQ.js +2 -0
  223. package/dist/cli/chunks/{init-handler-PRHXSARK.js → init-handler-4GCHPQHD.js} +16 -14
  224. package/dist/cli/chunks/init-wizard-TAOPXHHD.js +2 -0
  225. package/dist/cli/chunks/kernel-6I6VZUWY.js +2 -0
  226. package/dist/cli/chunks/{kilocode-installer-F7LXBM7I.js → kilocode-installer-HJZMT2G5.js} +2 -2
  227. package/dist/cli/chunks/{kiro-installer-NM723ZRG.js → kiro-installer-WUPY67HG.js} +2 -2
  228. package/dist/cli/chunks/knowledge-graph-KFMTTUR5.js +2 -0
  229. package/dist/cli/chunks/{learning-5QYIDHH3.js → learning-AXKIS7IG.js} +4 -4
  230. package/dist/cli/chunks/{llm-router-43HKWPSX.js → llm-router-HUDPNZLJ.js} +4 -4
  231. package/dist/cli/chunks/llm-router-service-2D74XVM3.js +2 -0
  232. package/dist/cli/chunks/{load-5YDBWSCS.js → load-RM44POD7.js} +2 -2
  233. package/dist/cli/chunks/load-test-53FWOWNS.js +2 -0
  234. package/dist/cli/chunks/{mcp-UMAPMNMY.js → mcp-5JVQRBOP.js} +2 -2
  235. package/dist/cli/chunks/{memory-FWCPCQFP.js → memory-VGZ2V6PL.js} +5 -5
  236. package/dist/cli/chunks/memory-backend-KFJDDPEZ.js +2 -0
  237. package/dist/cli/chunks/memory-handlers-EI537Z32.js +2 -0
  238. package/dist/cli/chunks/{multi-model-executor-2XTBGLE4.js → multi-model-executor-WPRKCSCM.js} +2 -2
  239. package/dist/cli/chunks/{opencode-installer-GIXOJ6NS.js → opencode-installer-YAJMRCQO.js} +2 -2
  240. package/dist/cli/chunks/{orchestrator-VW6BKHLI.js → orchestrator-MUGWBUYP.js} +17 -17
  241. package/dist/cli/chunks/pattern-null-store-7DMU5CJ4.js +2 -0
  242. package/dist/cli/chunks/{pattern-usage-recorder-7CEUC3J7.js → pattern-usage-recorder-ZQJJ2YNG.js} +2 -2
  243. package/dist/cli/chunks/{pipeline-IGUQPPPO.js → pipeline-F4DXDUDC.js} +2 -2
  244. package/dist/cli/chunks/{platform-2P636I7B.js → platform-HI3A3OWF.js} +2 -2
  245. package/dist/cli/chunks/{plugin-NY6SWDPE.js → plugin-XRITPTR7.js} +2 -2
  246. package/dist/cli/chunks/{prime-radiant-advanced-wasm-2UUDTIO2.js → prime-radiant-advanced-wasm-HHNJP7CQ.js} +2 -2
  247. package/dist/cli/chunks/{project-root-IOISG5KX.js → project-root-2VN4WO2A.js} +2 -2
  248. package/dist/cli/chunks/protocol-executor-2EMTBTMG.js +2 -0
  249. package/dist/cli/chunks/{protocol-handler-ZTPCRQ5W.js → protocol-handler-ZEVHSEBG.js} +2 -2
  250. package/dist/cli/chunks/{prove-SQX5A3IG.js → prove-C4BLZWBS.js} +2 -2
  251. package/dist/cli/chunks/qe-reasoning-bank-VZHZZPHE.js +2 -0
  252. package/dist/cli/chunks/{quality-DROILKRY.js → quality-M3DTE4KK.js} +2 -2
  253. package/dist/cli/chunks/quality-gate-V6KS7ML3.js +7 -0
  254. package/dist/cli/chunks/queen-coordinator-7MYTTUHI.js +2 -0
  255. package/dist/cli/chunks/{real-embeddings-P5U3MGYC.js → real-embeddings-YWSE3IRT.js} +2 -2
  256. package/dist/cli/chunks/{ref-validation-KY73NQXD.js → ref-validation-ZWOTFA3T.js} +2 -2
  257. package/dist/cli/chunks/{roocode-installer-6JPPRB3W.js → roocode-installer-GJBIWETD.js} +2 -2
  258. package/dist/cli/chunks/router-ZD4LXAWA.js +2 -0
  259. package/dist/cli/chunks/routing-feedback-FSLMDVGD.js +2 -0
  260. package/dist/cli/chunks/{routing-handler-VTJIVFUO.js → routing-handler-CFYLGNAR.js} +2 -2
  261. package/dist/cli/chunks/{ruvector-commands-C6RPSJJO.js → ruvector-commands-EDKG456B.js} +2 -2
  262. package/dist/cli/chunks/rvf-dual-writer-LTKTDRFS.js +2 -0
  263. package/dist/cli/chunks/rvf-migration-adapter-IF24EVC5.js +2 -0
  264. package/dist/cli/chunks/{rvf-migration-coordinator-R53URRIO.js → rvf-migration-coordinator-ZMEYMAI6.js} +2 -2
  265. package/dist/cli/chunks/rvf-native-adapter-E6JNBKMZ.js +2 -0
  266. package/dist/cli/chunks/{rvf-store-integrity-MMXN5TEJ.js → rvf-store-integrity-AH6PNJP6.js} +2 -2
  267. package/dist/cli/chunks/safe-db-F6TRB5KZ.js +2 -0
  268. package/dist/cli/chunks/schedule-HBD4BYTE.js +2 -0
  269. package/dist/cli/chunks/scheduler-6FYWPMQC.js +2 -0
  270. package/dist/cli/chunks/{security-3B3R2NL4.js → security-ZU2GW3ZM.js} +3 -3
  271. package/dist/cli/chunks/{shared-rvf-adapter-VIJB7JUS.js → shared-rvf-adapter-5FOVSL3T.js} +2 -2
  272. package/dist/cli/chunks/{shared-rvf-dual-writer-UVWGDUWC.js → shared-rvf-dual-writer-IO4DC4XV.js} +2 -2
  273. package/dist/cli/chunks/sqlite-persistence-DOU72F5Z.js +2 -0
  274. package/dist/cli/chunks/{standalone-memory-M4LWAAYZ.js → standalone-memory-3UXDZ7HI.js} +2 -2
  275. package/dist/cli/chunks/{status-handler-YYFV6OZL.js → status-handler-264CHTWS.js} +2 -2
  276. package/dist/cli/chunks/{structural-health-27E6LLKB.js → structural-health-E2QPUOZE.js} +2 -2
  277. package/dist/cli/chunks/{sync-J3LJ56WN.js → sync-2ACMWM7D.js} +2 -2
  278. package/dist/cli/chunks/sync-N2L2OST4.js +2 -0
  279. package/dist/cli/chunks/{task-handler-4MCEBQZL.js → task-handler-IB5CVOTY.js} +2 -2
  280. package/dist/cli/chunks/task-handlers-QBMYNJHE.js +9 -0
  281. package/dist/cli/chunks/test-7RGLRDSP.js +33 -0
  282. package/dist/cli/chunks/{test-scheduling-ZJBFRZ3J.js → test-scheduling-RJABJT2W.js} +3 -3
  283. package/dist/cli/chunks/token-bootstrap-JVHMHB72.js +2 -0
  284. package/dist/cli/chunks/{token-usage-3X5WMTG2.js → token-usage-3ECHQVCY.js} +2 -2
  285. package/dist/cli/chunks/{transformers-MVL4C5IX.js → transformers-KJH3IJWI.js} +2 -2
  286. package/dist/cli/chunks/{tree-sitter-wasm-parser-SLW65ZFO.js → tree-sitter-wasm-parser-XN6PFI32.js} +2 -2
  287. package/dist/cli/chunks/{types-TG5P3CRS.js → types-5BAPXOLS.js} +2 -2
  288. package/dist/cli/chunks/unified-memory-GHAYAXWZ.js +2 -0
  289. package/dist/cli/chunks/unified-memory-hnsw-CCC63YXT.js +2 -0
  290. package/dist/cli/chunks/unified-persistence-HKRHI5PG.js +2 -0
  291. package/dist/cli/chunks/{upgrade-ETBHDEPY.js → upgrade-S5NFQZID.js} +2 -2
  292. package/dist/cli/chunks/{validate-C2A73LZK.js → validate-BIBWOLJD.js} +2 -2
  293. package/dist/cli/chunks/{validate-swarm-67XN42ML.js → validate-swarm-WAA3LBHH.js} +2 -2
  294. package/dist/cli/chunks/visual-security-APOXJ3Q3.js +2 -0
  295. package/dist/cli/chunks/{web-tree-sitter-USJN77P4.js → web-tree-sitter-OTBQTHAV.js} +2 -2
  296. package/dist/cli/chunks/{windsurf-installer-5GGZXGJW.js → windsurf-installer-NNQ22EW6.js} +2 -2
  297. package/dist/cli/chunks/witness-chain-7IP5IJGT.js +2 -0
  298. package/dist/cli/chunks/{witness-chain-IWS5ZHHL.js → witness-chain-E7MUBOJW.js} +2 -2
  299. package/dist/cli/chunks/witness-chain-repair-FW4QSN4C.js +2 -0
  300. package/dist/cli/chunks/{witness-chain-verifier-3GEADWPE.js → witness-chain-verifier-YMROEBVL.js} +2 -2
  301. package/dist/cli/chunks/{witness-key-manager-ZWEIK3VJ.js → witness-key-manager-4CGRNDMJ.js} +2 -2
  302. package/dist/cli/chunks/{workflow-KHMVVBBA.js → workflow-4VRSTRAN.js} +4 -4
  303. package/dist/cli/chunks/workflow-orchestrator-2HNW5ZMQ.js +2 -0
  304. package/dist/cli/chunks/wrappers-4M4UTGEU.js +2 -0
  305. package/dist/cli/commands/ci.js +18 -7
  306. package/dist/cli/commands/quality-gate.js +6 -1
  307. package/dist/cli/commands/test.js +18 -3
  308. package/dist/cli/handlers/init-handler.d.ts +2 -0
  309. package/dist/cli/handlers/init-handler.js +8 -2
  310. package/dist/cli/index.js +15 -2
  311. package/dist/cli/process-store-cleanup.d.ts +7 -0
  312. package/dist/cli/process-store-cleanup.js +27 -0
  313. package/dist/cli/utils/ci-config.d.ts +3 -3
  314. package/dist/cli/utils/ci-config.js +202 -68
  315. package/dist/coordination/handlers/test-execution-handlers.js +13 -8
  316. package/dist/coordination/index.d.ts +1 -1
  317. package/dist/coordination/queen-event-handlers.js +9 -6
  318. package/dist/coordination/result-saver.js +1 -1
  319. package/dist/coordination/services/index.d.ts +1 -1
  320. package/dist/coordination/services/task-audit-logger.d.ts +38 -13
  321. package/dist/coordination/services/task-audit-logger.js +33 -5
  322. package/dist/coordination/task-executor.d.ts +5 -0
  323. package/dist/coordination/task-executor.js +10 -5
  324. package/dist/domains/quality-assessment/quality-evidence.d.ts +3 -1
  325. package/dist/domains/quality-assessment/quality-evidence.js +7 -2
  326. package/dist/domains/test-execution/services/retry-handler.js +32 -13
  327. package/dist/domains/test-execution/services/test-executor.d.ts +3 -3
  328. package/dist/domains/test-execution/services/test-executor.js +66 -22
  329. package/dist/domains/test-generation/coordinator.js +6 -5
  330. package/dist/domains/test-generation/interfaces.d.ts +11 -1
  331. package/dist/domains/test-generation/services/behavior-example-validation.d.ts +36 -0
  332. package/dist/domains/test-generation/services/behavior-example-validation.js +89 -0
  333. package/dist/domains/test-generation/services/behavior-examples.d.ts +8 -0
  334. package/dist/domains/test-generation/services/behavior-examples.js +65 -0
  335. package/dist/domains/test-generation/services/test-generator.d.ts +1 -1
  336. package/dist/domains/test-generation/services/test-generator.js +59 -30
  337. package/dist/domains/visual-accessibility/services/axe-core-audit.d.ts +0 -15
  338. package/dist/domains/visual-accessibility/services/axe-core-audit.js +12 -10
  339. package/dist/init/browser-engine-installer.d.ts +5 -5
  340. package/dist/init/browser-engine-installer.js +28 -6
  341. package/dist/init/fleet-integration.js +3 -2
  342. package/dist/init/init-wizard-steps.js +3 -2
  343. package/dist/init/init-wizard.d.ts +2 -0
  344. package/dist/init/orchestrator.js +1 -0
  345. package/dist/init/phases/06-code-intelligence.js +6 -4
  346. package/dist/init/phases/09-assets.js +8 -18
  347. package/dist/init/phases/phase-interface.d.ts +2 -0
  348. package/dist/integrations/agentic-flow/reasoning-bank/index.d.ts +2 -5
  349. package/dist/integrations/ruvector/sona-persistence.d.ts +1 -0
  350. package/dist/integrations/ruvector/sona-persistence.js +74 -20
  351. package/dist/integrations/ruvector/sona-wrapper.d.ts +2 -0
  352. package/dist/integrations/ruvector/sona-wrapper.js +13 -0
  353. package/dist/integrations/vibium/client.d.ts +1 -0
  354. package/dist/integrations/vibium/client.js +24 -11
  355. package/dist/integrations/vibium/runtime.d.ts +14 -0
  356. package/dist/integrations/vibium/runtime.js +94 -0
  357. package/dist/kernel/memory-backend.js +5 -4
  358. package/dist/kernel/pattern-fts-self-heal.d.ts +63 -0
  359. package/dist/kernel/pattern-fts-self-heal.js +193 -0
  360. package/dist/kernel/process-lifecycle.d.ts +60 -0
  361. package/dist/kernel/process-lifecycle.js +91 -0
  362. package/dist/kernel/unified-memory-schemas.d.ts +15 -1
  363. package/dist/kernel/unified-memory-schemas.js +53 -25
  364. package/dist/kernel/unified-memory.js +34 -36
  365. package/dist/kernel/unified-persistence.js +12 -6
  366. package/dist/learning/aqe-learning-engine.js +3 -2
  367. package/dist/learning/experience-capture.d.ts +2 -1
  368. package/dist/learning/experience-capture.js +23 -8
  369. package/dist/learning/pattern-store.d.ts +1 -1
  370. package/dist/learning/pattern-store.js +27 -30
  371. package/dist/learning/qe-patterns.d.ts +6 -0
  372. package/dist/learning/qe-reasoning-bank.d.ts +1 -0
  373. package/dist/learning/qe-reasoning-bank.js +14 -4
  374. package/dist/learning/real-qe-reasoning-bank.d.ts +9 -4
  375. package/dist/learning/real-qe-reasoning-bank.js +28 -4
  376. package/dist/learning/rvf-pattern-store.js +19 -19
  377. package/dist/learning/sqlite-persistence.js +9 -24
  378. package/dist/mcp/bundle.js +545 -581
  379. package/dist/mcp/connection-pool.d.ts +2 -0
  380. package/dist/mcp/connection-pool.js +13 -2
  381. package/dist/mcp/entry.js +52 -6
  382. package/dist/mcp/handlers/domain-handler-configs.js +12 -4
  383. package/dist/mcp/handlers/memory-handlers.d.ts +1 -0
  384. package/dist/mcp/handlers/memory-handlers.js +16 -6
  385. package/dist/mcp/handlers/task-handlers.js +11 -7
  386. package/dist/mcp/protocol-server.js +47 -11
  387. package/dist/mcp/services/reasoning-bank-service.d.ts +6 -1
  388. package/dist/mcp/services/reasoning-bank-service.js +5 -1
  389. package/dist/mcp/tools/test-execution/e2e-execute.js +9 -1
  390. package/dist/mcp/tools/test-generation/generate.d.ts +6 -1
  391. package/dist/mcp/tools/test-generation/generate.js +8 -0
  392. package/dist/mcp/types.d.ts +8 -2
  393. package/dist/optimization/session-cache.js +13 -11
  394. package/dist/plugins/cache.js +10 -3
  395. package/dist/shared/embeddings/embedding-cache.js +4 -4
  396. package/dist/shared/error-utils.d.ts +15 -0
  397. package/dist/shared/error-utils.js +21 -0
  398. package/dist/shared/events/domain-events.d.ts +2 -1
  399. package/dist/shared/llm/cache.js +7 -10
  400. package/dist/shared/retry-engine.js +4 -0
  401. package/dist/shared/test-runner-process.d.ts +10 -0
  402. package/dist/shared/test-runner-process.js +210 -0
  403. package/dist/validation/quality-verdict.js +3 -2
  404. package/dist/workers/quality-daemon/priority-queue.js +4 -1
  405. package/package.json +10 -6
  406. package/dist/cli/chunks/adapter-UYOJPTOX.js +0 -2
  407. package/dist/cli/chunks/aqe-learning-engine-JR5AVQXR.js +0 -2
  408. package/dist/cli/chunks/base-DRZ2LS6X.js +0 -2
  409. package/dist/cli/chunks/browser-workflow-CJ7T3MXF.js +0 -2
  410. package/dist/cli/chunks/chunk-3NIG7S5W.js +0 -2
  411. package/dist/cli/chunks/chunk-4N23RFDU.js +0 -2
  412. package/dist/cli/chunks/chunk-AHKELLIO.js +0 -12
  413. package/dist/cli/chunks/chunk-DK4XN4CU.js +0 -2
  414. package/dist/cli/chunks/chunk-E6G2RD5H.js +0 -4
  415. package/dist/cli/chunks/chunk-MJS53PRX.js +0 -2
  416. package/dist/cli/chunks/chunk-PZPWRQ2M.js +0 -21
  417. package/dist/cli/chunks/chunk-QGA55PFM.js +0 -12
  418. package/dist/cli/chunks/chunk-SPV2VKC5.js +0 -3
  419. package/dist/cli/chunks/chunk-TCHGOB2N.js +0 -2
  420. package/dist/cli/chunks/chunk-UKA2KOXE.js +0 -2
  421. package/dist/cli/chunks/chunk-WCJBU2KI.js +0 -2
  422. package/dist/cli/chunks/chunk-Z6GGIRQQ.js +0 -65
  423. package/dist/cli/chunks/ci-W6K6G2KZ.js +0 -81
  424. package/dist/cli/chunks/client-KHWJT6FB.js +0 -2
  425. package/dist/cli/chunks/core-handlers-HING5RRG.js +0 -2
  426. package/dist/cli/chunks/cross-domain-router-PQTD6AZN.js +0 -2
  427. package/dist/cli/chunks/domain-transfer-M36KUJ2U.js +0 -2
  428. package/dist/cli/chunks/dream-WUGRSNCV.js +0 -2
  429. package/dist/cli/chunks/heartbeat-scheduler-33XX5XNQ.js +0 -2
  430. package/dist/cli/chunks/hnsw-adapter-XQPERX3H.js +0 -2
  431. package/dist/cli/chunks/hnsw-index-2GNXTWHH.js +0 -2
  432. package/dist/cli/chunks/hybrid-backend-CCF7URKI.js +0 -2
  433. package/dist/cli/chunks/impact-analyzer-HGKAZWIG.js +0 -2
  434. package/dist/cli/chunks/init-wizard-72MFBI3G.js +0 -2
  435. package/dist/cli/chunks/kernel-BRCBVMSK.js +0 -2
  436. package/dist/cli/chunks/knowledge-graph-DG44IPEI.js +0 -2
  437. package/dist/cli/chunks/llm-router-service-24KXFX32.js +0 -2
  438. package/dist/cli/chunks/load-test-N4TAYJY3.js +0 -2
  439. package/dist/cli/chunks/memory-backend-NVYFYVAU.js +0 -2
  440. package/dist/cli/chunks/memory-handlers-UTWCNCHL.js +0 -2
  441. package/dist/cli/chunks/pattern-null-store-SBPNYDBR.js +0 -2
  442. package/dist/cli/chunks/protocol-executor-IBYEII5Q.js +0 -2
  443. package/dist/cli/chunks/qe-reasoning-bank-7IETWW6W.js +0 -2
  444. package/dist/cli/chunks/quality-gate-PWKWDJY2.js +0 -7
  445. package/dist/cli/chunks/queen-coordinator-NHUK2MWJ.js +0 -2
  446. package/dist/cli/chunks/router-SRSO3IHF.js +0 -2
  447. package/dist/cli/chunks/routing-feedback-PASRE5HY.js +0 -2
  448. package/dist/cli/chunks/rvf-dual-writer-4M4J67OU.js +0 -2
  449. package/dist/cli/chunks/rvf-migration-adapter-TSXGT5LF.js +0 -2
  450. package/dist/cli/chunks/rvf-native-adapter-MOF3E7BR.js +0 -2
  451. package/dist/cli/chunks/safe-db-QJLFO33B.js +0 -2
  452. package/dist/cli/chunks/schedule-YIVXW5O2.js +0 -2
  453. package/dist/cli/chunks/scheduler-AON7DWSJ.js +0 -2
  454. package/dist/cli/chunks/sqlite-persistence-75VHKKQB.js +0 -2
  455. package/dist/cli/chunks/sync-26CEGSTC.js +0 -2
  456. package/dist/cli/chunks/task-handlers-GYBAWKE2.js +0 -9
  457. package/dist/cli/chunks/test-MPC5HRH5.js +0 -33
  458. package/dist/cli/chunks/token-bootstrap-2Y2XITBX.js +0 -2
  459. package/dist/cli/chunks/unified-memory-UCQ6AB32.js +0 -2
  460. package/dist/cli/chunks/unified-memory-hnsw-IXYUMKRR.js +0 -2
  461. package/dist/cli/chunks/unified-persistence-7E6JQ4FZ.js +0 -2
  462. package/dist/cli/chunks/vibium-NILGKHLN.js +0 -2
  463. package/dist/cli/chunks/visual-security-4VZXPEVG.js +0 -2
  464. package/dist/cli/chunks/witness-chain-JQA2VPZI.js +0 -2
  465. package/dist/cli/chunks/witness-chain-repair-4UA7IPS3.js +0 -2
  466. package/dist/cli/chunks/workflow-orchestrator-GI5NQH7C.js +0 -2
  467. package/dist/cli/chunks/wrappers-N6XIK5PT.js +0 -2
@@ -56,6 +56,7 @@ declare class ConnectionPoolImpl {
56
56
  private readonly config;
57
57
  private healthCheckInterval;
58
58
  private initialized;
59
+ private initializationPromise;
59
60
  private totalRequests;
60
61
  private cacheHits;
61
62
  private acquisitionTimes;
@@ -67,6 +68,7 @@ declare class ConnectionPoolImpl {
67
68
  * Initialize the connection pool with minConnections
68
69
  */
69
70
  initialize(): Promise<void>;
71
+ private initializeOnce;
70
72
  /**
71
73
  * Acquire a connection from the pool (O(1) operation)
72
74
  * Uses semaphore pattern to prevent race conditions
@@ -27,6 +27,7 @@ class ConnectionPoolImpl {
27
27
  config;
28
28
  healthCheckInterval = null;
29
29
  initialized = false;
30
+ initializationPromise = null;
30
31
  // Performance tracking
31
32
  totalRequests = 0;
32
33
  cacheHits = 0;
@@ -45,6 +46,14 @@ class ConnectionPoolImpl {
45
46
  if (this.initialized) {
46
47
  return;
47
48
  }
49
+ if (!this.initializationPromise) {
50
+ this.initializationPromise = this.initializeOnce().finally(() => {
51
+ this.initializationPromise = null;
52
+ });
53
+ }
54
+ return this.initializationPromise;
55
+ }
56
+ async initializeOnce() {
48
57
  // Pre-warm minimum connections
49
58
  const warmupPromises = [];
50
59
  for (let i = 0; i < this.config.minConnections; i++) {
@@ -115,7 +124,7 @@ class ConnectionPoolImpl {
115
124
  // O(1) acquisition from idle set
116
125
  for (const connId of this.idleConnections) {
117
126
  const conn = this.connections.get(connId);
118
- if (conn && conn.isHealthy) {
127
+ if (conn && conn.isHealthy && !conn.inUse) {
119
128
  // Mark as in use and remove from idle set
120
129
  conn.inUse = true;
121
130
  conn.lastUsedAt = Date.now();
@@ -134,6 +143,7 @@ class ConnectionPoolImpl {
134
143
  const newConn = this.createConnectionSync();
135
144
  if (newConn) {
136
145
  newConn.inUse = true;
146
+ this.idleConnections.delete(newConn.id);
137
147
  this.cacheHits++;
138
148
  const elapsed = performance.now() - startTime;
139
149
  this.trackAcquisitionTime(elapsed);
@@ -224,7 +234,7 @@ class ConnectionPoolImpl {
224
234
  const pruned = [];
225
235
  for (const [id, conn] of this.connections.entries()) {
226
236
  // Prune if unhealthy or idle for too long
227
- if (!conn.isHealthy || (now - conn.lastUsedAt > this.config.idleTimeoutMs)) {
237
+ if (!conn.inUse && (!conn.isHealthy || (now - conn.lastUsedAt > this.config.idleTimeoutMs))) {
228
238
  pruned.push(id);
229
239
  }
230
240
  }
@@ -252,6 +262,7 @@ class ConnectionPoolImpl {
252
262
  * Shutdown the pool
253
263
  */
254
264
  async shutdown() {
265
+ await this.initializationPromise;
255
266
  if (this.healthCheckInterval) {
256
267
  clearInterval(this.healthCheckInterval);
257
268
  this.healthCheckInterval = null;
package/dist/mcp/entry.js CHANGED
@@ -22,6 +22,9 @@ import { createInfraHealingOrchestratorSync, ShellCommandRunner } from '../stran
22
22
  import { setInfraHealingOrchestrator, handleFleetInit } from './handlers/index.js';
23
23
  import { parallelPrefetch } from '../boot/parallel-prefetch.js';
24
24
  import { initFeatureFlagsFromEnv } from '../integrations/ruvector/feature-flags.js';
25
+ import { resetSharedRvfAdapter } from '../integrations/ruvector/shared-rvf-adapter.js';
26
+ import { resetSharedRvfDualWriter } from '../integrations/ruvector/shared-rvf-dual-writer.js';
27
+ import { claimProcessLifecycle, closeRegisteredStores } from '../kernel/process-lifecycle.js';
25
28
  import { readFileSync } from 'node:fs';
26
29
  import { resolve, dirname } from 'node:path';
27
30
  import { fileURLToPath } from 'node:url';
@@ -29,6 +32,41 @@ const require = createRequire(import.meta.url);
29
32
  const pkg = require('../../package.json');
30
33
  let server = null;
31
34
  let httpServer = null;
35
+ /**
36
+ * Close the shared RVF stores (#801). Closing the native handle is what removes
37
+ * its own `patterns.rvf.lock` marker; an adapter that never opened (or another
38
+ * live process's store) is untouched. Both resets are synchronous and
39
+ * idempotent: each handle is closed at most once however many shutdown paths
40
+ * reach this.
41
+ */
42
+ function releaseSharedRvfStores() {
43
+ // Dual writer first, then the adapter, each independent of the other's failure.
44
+ try {
45
+ resetSharedRvfDualWriter();
46
+ }
47
+ catch { /* best effort */ }
48
+ try {
49
+ resetSharedRvfAdapter();
50
+ }
51
+ catch { /* best effort */ }
52
+ }
53
+ let processStoresReleased = false;
54
+ /**
55
+ * Release every process-wide store exactly once, on every shutdown path:
56
+ * the shared RVF stores first, then the kernel's unified persistence/memory
57
+ * (registered closers), whose close() checkpoints the memory.db WAL. All
58
+ * synchronous, so the process 'exit' backstop can run it too; never throws.
59
+ */
60
+ function releaseProcessStores() {
61
+ if (processStoresReleased)
62
+ return;
63
+ processStoresReleased = true;
64
+ releaseSharedRvfStores();
65
+ try {
66
+ closeRegisteredStores();
67
+ }
68
+ catch { /* best effort */ }
69
+ }
32
70
  async function main() {
33
71
  initFeatureFlagsFromEnv();
34
72
  // Output startup message BEFORE suppressing stderr (Claude Code health check needs this)
@@ -76,18 +114,26 @@ async function main() {
76
114
  if (server) {
77
115
  await server.stop();
78
116
  }
79
- // Close data stores AFTER server has drained connections
80
- try {
81
- const { resetSharedRvfDualWriter } = await import('../integrations/ruvector/shared-rvf-dual-writer.js');
82
- resetSharedRvfDualWriter();
83
- }
84
- catch { /* ignore */ }
85
117
  }
86
118
  catch { /* best-effort — the watchdog still guarantees exit */ }
119
+ finally {
120
+ // Close data stores AFTER the server has drained connections, and even
121
+ // when a step above threw. Shared pattern-store consumers leave
122
+ // singleton disposal to this lifecycle; memory.db closes last.
123
+ releaseProcessStores();
124
+ }
87
125
  process.exit(0);
88
126
  };
127
+ // #801: this server owns the process lifecycle. The kernel stores' and the
128
+ // `aqe` CLI wrapper's SIGINT/SIGTERM handlers, and the JSON-RPC `shutdown`
129
+ // method, route to this one shutdown instead of calling process.exit()
130
+ // underneath it (which skipped the drain and leaked patterns.rvf.lock).
131
+ claimProcessLifecycle({ name: 'mcp', shutdown: (reason) => { void shutdown(reason); } });
89
132
  process.on('SIGINT', () => { void shutdown('SIGINT'); });
90
133
  process.on('SIGTERM', () => { void shutdown('SIGTERM'); });
134
+ // Last line of defence for exits that bypass shutdown() (the watchdog, or a
135
+ // process.exit elsewhere): 'exit' listeners run synchronously on every exit.
136
+ process.on('exit', releaseProcessStores);
91
137
  // Issue #513: when the parent (e.g. the Claude Code session) exits, our stdin
92
138
  // reaches EOF. An orphaned stdio MCP server has no parent to serve, so exit
93
139
  // instead of lingering at high CPU. Guarded to a piped stdin so an
@@ -10,6 +10,7 @@ import { generateV2LearningFeedback, analyzeComplexity, generateV2AIInsights, ge
10
10
  import { MetricsCollector } from '../metrics/index.js';
11
11
  import { DEFAULT_FRAMEWORKS, FRAMEWORK_TO_LANGUAGE, } from '../../shared/types/test-frameworks.js';
12
12
  import { buildRiskDecisionFromQualityGate, validateRiskDecision, } from '../../contracts/verdicts.js';
13
+ import { validateBehaviorExamples } from '../../domains/test-generation/services/behavior-example-validation.js';
13
14
  const SUPPORTED_LANGUAGES = Object.keys(DEFAULT_FRAMEWORKS);
14
15
  /**
15
16
  * Normalize a language string from MCP input. Returns the canonical
@@ -77,8 +78,13 @@ export const testGenerateConfig = {
77
78
  else {
78
79
  framework = DEFAULT_FRAMEWORKS[language];
79
80
  }
81
+ // #795: validate caller fixtures here, before the task reaches the
82
+ // domain. Throwing from mapToPayload returns a clean tool error without
83
+ // submitting a task, so malformed input cannot trip the domain breaker.
84
+ const behaviorExamples = validateBehaviorExamples(params.behaviorExamples);
80
85
  return {
81
86
  sourceCode: params.sourceCode,
87
+ behaviorExamples,
82
88
  filePath: params.filePath,
83
89
  language,
84
90
  framework,
@@ -124,6 +130,8 @@ export const testGenerateConfig = {
124
130
  estimatedDuration: t.type === 'integration' ? 2000 : 1000,
125
131
  aiGenerated: llmEnhanced,
126
132
  testCode: t.testCode,
133
+ generationMode: t.generationMode,
134
+ generationLimits: t.generationLimits,
127
135
  sourceFile: t.sourceFile,
128
136
  testFile: t.testFile || t.file,
129
137
  }))
@@ -135,11 +143,11 @@ export const testGenerateConfig = {
135
143
  suggestions: antiPatterns.map(ap => `Fix: ${ap.type} - ${ap.suggestion}`),
136
144
  aiInsights,
137
145
  coverage: {
138
- predicted: data.coverageEstimate || params?.coverageGoal || 80,
146
+ predicted: data.coverageEstimate ?? null,
139
147
  // #567: a template scaffold's coverage prediction is a guess, not a
140
148
  // 0.9-confidence estimate. Don't dress it up as one.
141
- confidence: llmEnhanced ? 0.9 : 0.3,
142
- achievable: true,
149
+ confidence: data.coverageEstimate == null ? 0 : llmEnhanced ? 0.9 : 0,
150
+ achievable: data.coverageEstimate == null ? null : true,
143
151
  },
144
152
  properties: tests.filter(t => t.type === 'property').map(t => ({
145
153
  name: t.name,
@@ -152,7 +160,7 @@ export const testGenerateConfig = {
152
160
  taskId,
153
161
  status: 'completed',
154
162
  testsGenerated: tests.length,
155
- coverageEstimate: data.coverageEstimate || params?.coverageGoal || 80,
163
+ coverageEstimate: data.coverageEstimate ?? null,
156
164
  patternsUsed: data.patternsUsed || ['assertion-patterns', 'mock-generation', 'edge-case-detection'],
157
165
  duration,
158
166
  savedFiles,
@@ -21,6 +21,7 @@ interface MemoryQueryResult {
21
21
  score?: number;
22
22
  timestamp?: string;
23
23
  }>;
24
+ /** Matching candidates fetched, including the look-ahead; not a corpus-wide count. */
24
25
  total: number;
25
26
  hasMore: boolean;
26
27
  searchType: 'pattern' | 'semantic';
@@ -5,6 +5,7 @@
5
5
  * ADR-058: Integrated with MemoryWriteGate for contradiction detection
6
6
  * and ComplianceReporter for violation tracking.
7
7
  */
8
+ import { randomUUID } from 'node:crypto';
8
9
  import { getFleetState, isFleetInitialized } from './core-handlers.js';
9
10
  // ADR-058: Governance integration for memory writes
10
11
  import { toErrorMessage } from '../../shared/error-utils.js';
@@ -199,8 +200,15 @@ export async function handleMemoryQuery(params) {
199
200
  }
200
201
  try {
201
202
  const namespace = params.namespace || 'default';
202
- const limit = params.limit || 100;
203
- const offset = params.offset || 0;
203
+ const limit = params.limit ?? 100;
204
+ const offset = params.offset ?? 0;
205
+ if (!Number.isSafeInteger(limit) || limit < 0 ||
206
+ !Number.isSafeInteger(offset) || offset < 0 ||
207
+ !Number.isSafeInteger(limit + offset + 1)) {
208
+ return { success: false, error: 'Memory query limit and offset must be non-negative safe integers with a safe combined page size.' };
209
+ }
210
+ // One extra candidate proves whether another page exists without scanning all memory.
211
+ const fetchLimit = limit + offset + 1;
204
212
  // Determine if we should use semantic (HNSW vector) search
205
213
  const useSemantic = params.semantic === true ||
206
214
  (params.semantic !== false && params.pattern && isNaturalLanguageQuery(params.pattern));
@@ -209,8 +217,9 @@ export async function handleMemoryQuery(params) {
209
217
  try {
210
218
  // Generate real 384-dim transformer embedding for accurate cosine similarity search
211
219
  const embedding = await computeRealEmbedding(params.pattern);
212
- const keyPrefix = namespace !== 'default' ? `${namespace}:` : undefined;
213
- const filtered = await memory.vectorSearch(embedding, limit + offset, keyPrefix);
220
+ // Semantic queries have the same namespace boundary as pattern queries.
221
+ const keyPrefix = `${namespace}:`;
222
+ const filtered = await memory.vectorSearch(embedding, fetchLimit, keyPrefix);
214
223
  const paginatedResults = filtered.slice(offset, offset + limit);
215
224
  const entries = paginatedResults.map(r => {
216
225
  const parts = r.key.split(':');
@@ -240,7 +249,7 @@ export async function handleMemoryQuery(params) {
240
249
  const pattern = params.pattern
241
250
  ? `${namespace}:${params.pattern}`
242
251
  : `${namespace}:*`;
243
- const keys = await memory.search(pattern, limit + offset);
252
+ const keys = await memory.search(pattern, fetchLimit);
244
253
  // Apply pagination
245
254
  const paginatedKeys = keys.slice(offset, offset + limit);
246
255
  const entries = paginatedKeys.map((key) => {
@@ -353,7 +362,8 @@ export async function handleMemoryShare(params) {
353
362
  }
354
363
  try {
355
364
  // Store shared knowledge for each target agent
356
- const sharedKey = `shared:${params.knowledgeDomain}:${Date.now()}`;
365
+ // Concurrent agents can publish several findings within the same millisecond.
366
+ const sharedKey = `shared:${params.knowledgeDomain}:${Date.now()}:${randomUUID()}`;
357
367
  const sharedContent = {
358
368
  source: params.sourceAgentId,
359
369
  targets: params.targetAgentIds,
@@ -250,7 +250,7 @@ export async function handleTaskOrchestrate(params) {
250
250
  // routing — the catalog of consolidated long-term patterns was never
251
251
  // consulted for new tasks. Fail-soft: empty array on error.
252
252
  const patternHintMatches = await reasoningBankService
253
- .searchPatterns(params.task, {
253
+ .searchPatternMatches(params.task, {
254
254
  limit: 5,
255
255
  domain: params.context?.project ?? inferredDomain,
256
256
  })
@@ -289,13 +289,15 @@ export async function handleTaskOrchestrate(params) {
289
289
  // workflow branch routes through executeWorkflow, so the same catalog
290
290
  // of consolidated long-term patterns should reach it.
291
291
  patternHints: patternHintMatches.length > 0
292
- ? patternHintMatches.map(p => ({
292
+ ? patternHintMatches.map(({ pattern: p, similarity, score, matchType, canReuse }) => ({
293
293
  patternId: p.id,
294
294
  name: p.name,
295
295
  description: p.description,
296
296
  confidence: p.confidence,
297
- similarity: p.qualityScore,
298
- canReuse: p.tier === 'long-term',
297
+ similarity,
298
+ score,
299
+ matchType,
300
+ canReuse,
299
301
  }))
300
302
  : undefined,
301
303
  };
@@ -371,13 +373,15 @@ export async function handleTaskOrchestrate(params) {
371
373
  } : undefined,
372
374
  // HNSW A pattern hints for the executing agent
373
375
  patternHints: patternHintMatches.length > 0
374
- ? patternHintMatches.map(p => ({
376
+ ? patternHintMatches.map(({ pattern: p, similarity, score, matchType, canReuse }) => ({
375
377
  patternId: p.id,
376
378
  name: p.name,
377
379
  description: p.description,
378
380
  confidence: p.confidence,
379
- similarity: p.qualityScore,
380
- canReuse: p.tier === 'long-term',
381
+ similarity,
382
+ score,
383
+ matchType,
384
+ canReuse,
381
385
  }))
382
386
  : undefined,
383
387
  },
@@ -42,6 +42,8 @@ import { getPerformanceMonitor, } from './performance-monitor.js';
42
42
  // ADR-062: Loop detection for MCP tool calls
43
43
  import { ToolCallSignatureTracker } from '../kernel/anti-drift-middleware.js';
44
44
  import { formatErrorForLog } from '../logging/redaction.js';
45
+ import { BEHAVIOR_EXAMPLE_ITEM_SCHEMA } from '../domains/test-generation/services/behavior-example-validation.js';
46
+ import { requestOwnedShutdown } from '../kernel/process-lifecycle.js';
45
47
  import { createRequire } from 'module';
46
48
  const _require = createRequire(import.meta.url);
47
49
  const _pkg = _require('../../package.json');
@@ -383,10 +385,16 @@ export class MCPProtocolServer {
383
385
  }
384
386
  async handleShutdown() {
385
387
  console.error('[MCP] Shutdown requested');
386
- // Graceful shutdown - stop accepting new requests
388
+ // Reply first, then shut down. #801: the entry point's lifecycle owner
389
+ // runs the same graceful shutdown as stdin EOF and signals (drains the
390
+ // server, then releases the shared RVF stores). Without an owner (an
391
+ // embedded server), await stop() under a bounded cap before exiting.
387
392
  setTimeout(() => {
388
- this.stop();
389
- process.exit(0);
393
+ if (requestOwnedShutdown('jsonrpc-shutdown'))
394
+ return;
395
+ const exit = () => process.exit(0);
396
+ setTimeout(exit, 3000).unref();
397
+ this.stop().catch(() => { }).finally(exit);
390
398
  }, 100);
391
399
  return {};
392
400
  }
@@ -409,6 +417,7 @@ export class MCPProtocolServer {
409
417
  const startTime = performance.now();
410
418
  let success = false;
411
419
  let cacheable;
420
+ let invalidatesCache = false;
412
421
  // Emit AG-UI progress event for tool start
413
422
  const stepId = `${name}-${Date.now()}`;
414
423
  this.eventAdapter.adapt({
@@ -453,14 +462,13 @@ export class MCPProtocolServer {
453
462
  // IMP-00: Execute pre-tool-call middleware
454
463
  const processedCtx = await this.middlewareChain.executePreHooks(ctx);
455
464
  // Issue #473: Session-cache lookup for read-only tools.
456
- // Concurrency-safe tools are idempotent in practice — same input yields
457
- // the same output, so we can short-circuit repeated calls with an O(1)
458
- // fingerprint lookup. Tools without isConcurrencySafe (writes, scans,
459
- // executions) always re-run.
460
- // Explicit quality gates depend on current measured evidence and its age,
461
- // not just arguments. A cached approval can outlive or contradict evidence.
465
+ // Concurrency safety does not imply stable output: status and metrics
466
+ // can change in the background without another MCP mutation. Live reads
467
+ // opt out of reuse while retaining their concurrency-safe scheduling hint.
468
+ // Explicit quality gates also depend on current measured evidence/age.
462
469
  const measuredQualityGate = name === 'quality_assess' && processedCtx.params?.runGate === true;
463
- cacheable = tool.definition.isConcurrencySafe === true && !measuredQualityGate;
470
+ invalidatesCache = tool.definition.isConcurrencySafe !== true || measuredQualityGate;
471
+ cacheable = !invalidatesCache && tool.definition.isCacheable !== false;
464
472
  let cacheFingerprint = null;
465
473
  let cacheGeneration = null;
466
474
  if (cacheable && process.env.AQE_SESSION_CACHE !== 'off') {
@@ -584,7 +592,7 @@ export class MCPProtocolServer {
584
592
  // Tool names and success flags do not prove whether state changed.
585
593
  // Unknown cross-domain effects require a global flush, including after
586
594
  // a handler throws or reports failure following a partial effect.
587
- if (cacheable === false && process.env.AQE_SESSION_CACHE !== 'off') {
595
+ if (invalidatesCache && process.env.AQE_SESSION_CACHE !== 'off') {
588
596
  try {
589
597
  const { getSessionCache } = await import('../optimization/session-cache.js');
590
598
  getSessionCache().invalidateAll();
@@ -623,6 +631,7 @@ export class MCPProtocolServer {
623
631
  description: 'Get fleet status: agents, tasks, health, and learning stats. Example: fleet_status({ verbose: true })',
624
632
  category: 'core',
625
633
  isConcurrencySafe: true,
634
+ isCacheable: false,
626
635
  parameters: [
627
636
  { name: 'verbose', type: 'boolean', description: 'Include detailed information', default: false },
628
637
  ],
@@ -635,6 +644,7 @@ export class MCPProtocolServer {
635
644
  description: 'Check fleet and per-domain health status with load metrics. Example: fleet_health({ domain: "test-generation" })',
636
645
  category: 'core',
637
646
  isConcurrencySafe: true,
647
+ isCacheable: false,
638
648
  parameters: [
639
649
  { name: 'domain', type: 'string', description: 'Specific domain to check' },
640
650
  ],
@@ -662,6 +672,7 @@ export class MCPProtocolServer {
662
672
  description: 'List tasks with optional status/limit filtering. Example: task_list({ status: "running", limit: 10 })',
663
673
  category: 'task',
664
674
  isConcurrencySafe: true,
675
+ isCacheable: false,
665
676
  parameters: [
666
677
  { name: 'status', type: 'string', description: 'Filter by status' },
667
678
  { name: 'limit', type: 'number', description: 'Maximum results', default: 50 },
@@ -675,6 +686,7 @@ export class MCPProtocolServer {
675
686
  description: 'Get detailed status, progress, and result of a specific task. Example: task_status({ taskId: "abc-123" })',
676
687
  category: 'task',
677
688
  isConcurrencySafe: true,
689
+ isCacheable: false,
678
690
  parameters: [
679
691
  { name: 'taskId', type: 'string', description: 'Task ID', required: true },
680
692
  ],
@@ -711,6 +723,7 @@ export class MCPProtocolServer {
711
723
  description: 'List all active agents, optionally filtered by domain. Example: agent_list({ domain: "test-generation" })',
712
724
  category: 'agent',
713
725
  isConcurrencySafe: true,
726
+ isCacheable: false,
714
727
  parameters: [
715
728
  { name: 'domain', type: 'string', description: 'Filter by domain' },
716
729
  ],
@@ -735,6 +748,7 @@ export class MCPProtocolServer {
735
748
  description: 'Get CPU, memory, and task performance metrics for agents. Example: agent_metrics({ agentId: "agent-1" })',
736
749
  category: 'agent',
737
750
  isConcurrencySafe: true,
751
+ isCacheable: false,
738
752
  parameters: [
739
753
  { name: 'agentId', type: 'string', description: 'Specific agent ID', required: true },
740
754
  ],
@@ -747,6 +761,7 @@ export class MCPProtocolServer {
747
761
  description: 'Get detailed status and current task of a specific agent. Example: agent_status({ agentId: "agent-1" })',
748
762
  category: 'agent',
749
763
  isConcurrencySafe: true,
764
+ isCacheable: false,
750
765
  parameters: [
751
766
  { name: 'agentId', type: 'string', description: 'Agent ID', required: true },
752
767
  ],
@@ -760,6 +775,7 @@ export class MCPProtocolServer {
760
775
  description: 'List all active domain teams and their agent counts. Example: team_list({ domain: "coverage-analysis" })',
761
776
  category: 'agent',
762
777
  isConcurrencySafe: true,
778
+ isCacheable: false,
763
779
  parameters: [
764
780
  { name: 'domain', type: 'string', description: 'Filter by domain' },
765
781
  ],
@@ -772,6 +788,7 @@ export class MCPProtocolServer {
772
788
  description: 'Get team health, agent utilization, and consensus status for a domain. Example: team_health({ domain: "security-compliance" })',
773
789
  category: 'agent',
774
790
  isConcurrencySafe: true,
791
+ isCacheable: false,
775
792
  parameters: [
776
793
  { name: 'domain', type: 'string', description: 'Domain to check', required: true },
777
794
  ],
@@ -840,6 +857,7 @@ export class MCPProtocolServer {
840
857
  { name: 'testType', type: 'string', description: 'Type of tests', enum: ['unit', 'integration', 'e2e'] },
841
858
  { 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'] },
842
859
  { name: 'coverageGoal', type: 'number', description: 'Target coverage percentage (0-100)', default: 80 },
860
+ { name: 'behaviorExamples', type: 'array', description: 'Trusted specification fixtures: [{functionName: "add", args: [2,3], expected: 5}]. Named JS/TS functions with required simple parameters; unit vitest/jest/node-test. No source-derived oracle. Omit for scaffolding.', items: BEHAVIOR_EXAMPLE_ITEM_SCHEMA },
843
861
  { name: 'aiEnhancement', type: 'boolean', description: 'Enable AI-powered enhancement', default: true },
844
862
  { name: 'detectAntiPatterns', type: 'boolean', description: 'Detect and report anti-patterns', default: false },
845
863
  ],
@@ -1015,6 +1033,8 @@ export class MCPProtocolServer {
1015
1033
  { name: 'pattern', type: 'string', description: 'Key pattern (glob) or natural language query (for semantic search)' },
1016
1034
  { name: 'namespace', type: 'string', description: 'Memory namespace' },
1017
1035
  { name: 'semantic', type: 'boolean', description: 'Use HNSW vector search instead of pattern matching. Auto-detected when pattern contains spaces and no wildcards.' },
1036
+ { name: 'limit', type: 'number', description: 'Maximum entries in the page (non-negative safe integer)', default: 100 },
1037
+ { name: 'offset', type: 'number', description: 'Number of entries to skip (non-negative safe integer)', default: 0 },
1018
1038
  ],
1019
1039
  },
1020
1040
  handler: (params) => handleMemoryQuery(params),
@@ -1037,6 +1057,7 @@ export class MCPProtocolServer {
1037
1057
  description: 'Get memory usage statistics: entry counts, namespaces, and storage size. Example: memory_usage({})',
1038
1058
  category: 'memory',
1039
1059
  isConcurrencySafe: true,
1060
+ isCacheable: false,
1040
1061
  parameters: [],
1041
1062
  },
1042
1063
  handler: () => handleMemoryUsage(),
@@ -1080,6 +1101,7 @@ export class MCPProtocolServer {
1080
1101
  description: 'Get model routing statistics: tier distribution, cost savings, and routing log. Example: routing_metrics({ includeLog: true, logLimit: 20 })',
1081
1102
  category: 'routing',
1082
1103
  isConcurrencySafe: true,
1104
+ isCacheable: false,
1083
1105
  parameters: [
1084
1106
  { name: 'includeLog', type: 'boolean', description: 'Include routing log entries', default: false },
1085
1107
  { name: 'logLimit', type: 'number', description: 'Max log entries to return', default: 100 },
@@ -1093,6 +1115,7 @@ export class MCPProtocolServer {
1093
1115
  description: 'Get economic routing report: tier efficiency, budget status, cost-per-quality analysis, and savings opportunities. Example: routing_economics({ taskComplexity: 0.5 })',
1094
1116
  category: 'routing',
1095
1117
  isConcurrencySafe: true,
1118
+ isCacheable: false,
1096
1119
  parameters: [
1097
1120
  { name: 'taskComplexity', type: 'number', description: 'Task complexity score 0-1 for tier scoring (default: 0.5)', default: 0.5 },
1098
1121
  ],
@@ -1106,6 +1129,7 @@ export class MCPProtocolServer {
1106
1129
  description: 'Get infrastructure self-healing status: detected failures, recovery stats, and failing services. Example: infra_healing_status({ verbose: true })',
1107
1130
  category: 'infra-healing',
1108
1131
  isConcurrencySafe: true,
1132
+ isCacheable: false,
1109
1133
  parameters: [
1110
1134
  { name: 'verbose', type: 'boolean', description: 'Include detailed observation data', default: false },
1111
1135
  ],
@@ -1206,6 +1230,7 @@ export class MCPProtocolServer {
1206
1230
  description: 'Get cross-phase memory statistics (total signals, by loop, by namespace)',
1207
1231
  category: 'cross-phase',
1208
1232
  isConcurrencySafe: true,
1233
+ isCacheable: false,
1209
1234
  parameters: [],
1210
1235
  },
1211
1236
  handler: () => handleCrossPhaseStats(),
@@ -1298,6 +1323,7 @@ export class MCPProtocolServer {
1298
1323
  description: 'List all loaded YAML pipelines. Example: pipeline_list({})',
1299
1324
  category: 'coordination',
1300
1325
  isConcurrencySafe: true,
1326
+ isCacheable: false,
1301
1327
  parameters: [],
1302
1328
  },
1303
1329
  handler: (params) => handlePipelineList(params),
@@ -1337,6 +1363,7 @@ export class MCPProtocolServer {
1337
1363
  description: 'Get session operation cache statistics: hit rate, cache size, tokens saved via O(1) fingerprint reuse. Example: session_cache_stats({})',
1338
1364
  category: 'learning',
1339
1365
  isConcurrencySafe: true,
1366
+ isCacheable: false,
1340
1367
  parameters: [],
1341
1368
  },
1342
1369
  handler: async () => {
@@ -1371,6 +1398,7 @@ export class MCPProtocolServer {
1371
1398
  description: 'Check AQE server health: returns status, loaded domains, memory stats, HNSW index status, and pattern count. Example: aqe_health({})',
1372
1399
  category: 'core',
1373
1400
  isConcurrencySafe: true,
1401
+ isCacheable: false,
1374
1402
  parameters: [],
1375
1403
  },
1376
1404
  handler: () => handleAQEHealth(),
@@ -1382,6 +1410,7 @@ export class MCPProtocolServer {
1382
1410
  description: 'Get RVF migration status: current stage, metrics, consistency, and gate evaluation. Example: migration_status({})',
1383
1411
  category: 'persistence',
1384
1412
  isConcurrencySafe: true,
1413
+ isCacheable: false,
1385
1414
  parameters: [],
1386
1415
  },
1387
1416
  handler: () => handleMigrationStatus(),
@@ -1392,6 +1421,7 @@ export class MCPProtocolServer {
1392
1421
  description: 'Run a consistency check comparing SQLite and RVF search results. Samples random patterns and reports divergences. Example: migration_check({})',
1393
1422
  category: 'persistence',
1394
1423
  isConcurrencySafe: true,
1424
+ isCacheable: false,
1395
1425
  parameters: [],
1396
1426
  },
1397
1427
  handler: () => handleMigrationCheck(),
@@ -1533,6 +1563,12 @@ export class MCPProtocolServer {
1533
1563
  enum: param.enum,
1534
1564
  };
1535
1565
  }
1566
+ if (param.type === 'array' && param.items) {
1567
+ properties[param.name] = {
1568
+ ...properties[param.name],
1569
+ items: param.items,
1570
+ };
1571
+ }
1536
1572
  if (param.default !== undefined) {
1537
1573
  properties[param.name] = {
1538
1574
  ...properties[param.name],
@@ -12,7 +12,7 @@
12
12
  * - Synchronous learning (no fire-and-forget)
13
13
  */
14
14
  import { type Trajectory, type TrajectoryStep as TrackerTrajectoryStep, type TrajectoryOptions, type ExperienceGuidance, type EnhancedReasoningBankAdapterStats } from '../../integrations/agentic-flow/reasoning-bank/index.js';
15
- import { type RealQERoutingRequest, type RealQERoutingResult, type RealQEReasoningBankStats } from '../../learning/real-qe-reasoning-bank.js';
15
+ import { type RealQERoutingRequest, type RealQERoutingResult, type RealQEReasoningBankStats, type RealQEPatternSearchResult } from '../../learning/real-qe-reasoning-bank.js';
16
16
  import type { QEPattern, QEDomain } from '../../learning/qe-patterns.js';
17
17
  /**
18
18
  * Task outcome record for learning
@@ -203,6 +203,11 @@ export declare class ReasoningBankService {
203
203
  limit?: number;
204
204
  domain?: QEDomain;
205
205
  }): Promise<QEPattern[]>;
206
+ /** Preserve measured relevance and vector reuse safety for orchestration. */
207
+ searchPatternMatches(query: string, options?: {
208
+ limit?: number;
209
+ domain?: QEDomain;
210
+ }): Promise<RealQEPatternSearchResult[]>;
206
211
  /**
207
212
  * Get service statistics
208
213
  */
@@ -492,6 +492,10 @@ export class ReasoningBankService {
492
492
  * Search for similar patterns
493
493
  */
494
494
  async searchPatterns(query, options) {
495
+ return (await this.searchPatternMatches(query, options)).map(match => match.pattern);
496
+ }
497
+ /** Preserve measured relevance and vector reuse safety for orchestration. */
498
+ async searchPatternMatches(query, options) {
495
499
  if (this.disposed) {
496
500
  return [];
497
501
  }
@@ -504,7 +508,7 @@ export class ReasoningBankService {
504
508
  console.error('[ReasoningBankService] Search returned error:', results.error);
505
509
  return [];
506
510
  }
507
- return results.value.map((r) => r.pattern);
511
+ return results.value;
508
512
  }
509
513
  catch (error) {
510
514
  console.error('[ReasoningBankService] Search failed:', error);
@@ -36,15 +36,20 @@ export class E2EExecuteTool extends MCPToolBase {
36
36
  };
37
37
  }
38
38
  const startTime = Date.now();
39
+ let vibiumClient;
39
40
  try {
40
41
  // Get E2E runner from domain
41
42
  const { createE2ETestRunnerService } = await import('../../../domains/test-execution/index.js');
42
43
  const { createVibiumClient } = await import('../../../integrations/vibium/index.js');
43
44
  // Create Vibium client
44
- const vibiumClient = await createVibiumClient({
45
+ vibiumClient = await createVibiumClient({
45
46
  enabled: true,
47
+ fallbackEnabled: false,
46
48
  });
47
49
  // Create E2E runner
50
+ if (!await vibiumClient.isAvailable()) {
51
+ throw new Error('Browser unavailable; run aqe init --browser-engine');
52
+ }
48
53
  const runner = createE2ETestRunnerService(vibiumClient, runnerConfig);
49
54
  // Execute test case or suite
50
55
  if (testCase) {
@@ -106,6 +111,9 @@ export class E2EExecuteTool extends MCPToolBase {
106
111
  error: `E2E test execution failed: ${toErrorMessage(error)}`,
107
112
  };
108
113
  }
114
+ finally {
115
+ await vibiumClient?.dispose();
116
+ }
109
117
  }
110
118
  }
111
119
  // ============================================================================