agentic-qe 3.10.2 → 3.10.4

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 (418) hide show
  1. package/.claude/skills/release/SKILL.md +10 -10
  2. package/.claude/skills/skills-manifest.json +1 -1
  3. package/CHANGELOG.md +88 -0
  4. package/assets/grammars/tree-sitter-c_sharp.wasm +0 -0
  5. package/assets/grammars/tree-sitter-java.wasm +0 -0
  6. package/assets/grammars/tree-sitter-javascript.wasm +0 -0
  7. package/assets/grammars/tree-sitter-python.wasm +0 -0
  8. package/assets/grammars/tree-sitter-rust.wasm +0 -0
  9. package/assets/grammars/tree-sitter-swift.wasm +0 -0
  10. package/assets/grammars/tree-sitter-tsx.wasm +0 -0
  11. package/assets/grammars/tree-sitter-typescript.wasm +0 -0
  12. package/assets/skills/skills-manifest.json +1 -1
  13. package/dist/agents/claim-verifier/claim-verifier-service.js +4 -2
  14. package/dist/agents/claim-verifier/verifiers/test-verifier.js +31 -23
  15. package/dist/agents/devils-advocate/agent.js +1 -1
  16. package/dist/cli/bundle.js +5 -5
  17. package/dist/cli/chunks/adapter-A62ETL5C.js +2 -0
  18. package/dist/cli/chunks/{agent-booster-wasm-DHSIPFTH.js → agent-booster-wasm-EJPDSWON.js} +2 -2
  19. package/dist/cli/chunks/{agent-handler-FPQVHGGT.js → agent-handler-2DZB7LGI.js} +2 -2
  20. package/dist/cli/chunks/{agent-memory-branch-OLOF5ZHV.js → agent-memory-branch-SSFYAVIK.js} +2 -2
  21. package/dist/cli/chunks/aqe-learning-engine-MTCRAV6N.js +2 -0
  22. package/dist/cli/chunks/audit-42XG5JFB.js +3 -0
  23. package/dist/cli/chunks/base-KKEBUHZC.js +2 -0
  24. package/dist/cli/chunks/{hnswlib-node-ZGSUMHDC.js → better-sqlite3-PX5JM3DG.js} +2 -2
  25. package/dist/cli/chunks/{brain-handler-ROZUHCOT.js → brain-handler-LFHX2TYP.js} +3 -3
  26. package/dist/cli/chunks/{branch-enumerator-VK7G4NKJ.js → branch-enumerator-AX7DKGV7.js} +2 -2
  27. package/dist/cli/chunks/{browser-Q2S75M2F.js → browser-4NYLZ7FA.js} +2 -2
  28. package/dist/cli/chunks/browser-workflow-XHYAJUB6.js +2 -0
  29. package/dist/cli/chunks/{chunk-XPCNUX2U.js → chunk-2B6ETC7C.js} +2 -2
  30. package/dist/cli/chunks/{chunk-YI6GNRQM.js → chunk-2G2PVVQG.js} +2 -2
  31. package/dist/cli/chunks/{chunk-2244IFZA.js → chunk-2L5VFVCG.js} +1 -1
  32. package/dist/cli/chunks/{chunk-EVCOCGVJ.js → chunk-2TYO4VZH.js} +4 -4
  33. package/dist/cli/chunks/{chunk-U3EUH6LX.js → chunk-3ISX5B77.js} +2 -2
  34. package/dist/cli/chunks/{chunk-WZJUMJ2S.js → chunk-3UGUX34A.js} +1 -1
  35. package/dist/cli/chunks/{chunk-6ZFHIKQG.js → chunk-4BX72XG4.js} +3 -3
  36. package/dist/cli/chunks/{chunk-UUFOHMUG.js → chunk-4FTLYIMW.js} +2 -2
  37. package/dist/cli/chunks/{chunk-XDU624HU.js → chunk-5FNNCVXR.js} +1 -1
  38. package/dist/cli/chunks/{chunk-7Z46RDDV.js → chunk-5Q3L4QEE.js} +3 -3
  39. package/dist/cli/chunks/{chunk-AH7FXNFE.js → chunk-5T2HDET6.js} +3 -3
  40. package/dist/cli/chunks/{chunk-24LUQICS.js → chunk-5T4J3IPG.js} +2 -2
  41. package/dist/cli/chunks/{chunk-HHCYSAH3.js → chunk-6OLHPWSN.js} +2 -2
  42. package/dist/cli/chunks/{chunk-5PRFFHFV.js → chunk-6SCIX2W2.js} +2 -2
  43. package/dist/cli/chunks/{chunk-2JDLQWSV.js → chunk-6WF2MOQB.js} +2 -2
  44. package/dist/cli/chunks/{chunk-YNNOY3XN.js → chunk-7BQXEYRV.js} +2 -2
  45. package/dist/cli/chunks/{chunk-MMIQ5DMA.js → chunk-7VO5IEJ2.js} +2 -2
  46. package/dist/cli/chunks/{chunk-XDSA7YUQ.js → chunk-AIBE3J4A.js} +1 -1
  47. package/dist/cli/chunks/{chunk-AV7KYE5P.js → chunk-AMW27FSS.js} +5 -5
  48. package/dist/cli/chunks/{chunk-22D6VBPD.js → chunk-AZJYDM2K.js} +2 -2
  49. package/dist/cli/chunks/{chunk-PYIHZXCI.js → chunk-B6CT4ILU.js} +4 -4
  50. package/dist/cli/chunks/{chunk-ZK2BH23O.js → chunk-BEFRQOLH.js} +2 -2
  51. package/dist/cli/chunks/{chunk-CIRPP7RQ.js → chunk-C2446H7G.js} +2 -2
  52. package/dist/cli/chunks/{chunk-ON4D4TJ4.js → chunk-D7IWGQTW.js} +2 -2
  53. package/dist/cli/chunks/{chunk-6KSCXPPL.js → chunk-D7PI4CYZ.js} +2 -2
  54. package/dist/cli/chunks/{chunk-BQCSCAUC.js → chunk-DAIM72HV.js} +2 -2
  55. package/dist/cli/chunks/{chunk-XMJTTF5N.js → chunk-DPKECIKN.js} +3 -3
  56. package/dist/cli/chunks/{chunk-DZZEHPSJ.js → chunk-E6CGBOZY.js} +3 -3
  57. package/dist/cli/chunks/{chunk-OIRZJCZY.js → chunk-EGTOSQZK.js} +2 -2
  58. package/dist/cli/chunks/{chunk-WDMPJ2M2.js → chunk-EMZ3DXMG.js} +2 -2
  59. package/dist/cli/chunks/{chunk-QBRHKTFT.js → chunk-EWI37TJA.js} +1 -1
  60. package/dist/cli/chunks/{chunk-A5RMQG4N.js → chunk-F34OO2Q7.js} +3 -3
  61. package/dist/cli/chunks/{chunk-7SWD3D6Y.js → chunk-F6QPAVWS.js} +2 -2
  62. package/dist/cli/chunks/chunk-F77X5DAF.js +2 -0
  63. package/dist/cli/chunks/{chunk-Y63MBMOV.js → chunk-FDFJJFQT.js} +2 -2
  64. package/dist/cli/chunks/{chunk-YWZHMXTO.js → chunk-FQ7I4JBQ.js} +2 -2
  65. package/dist/cli/chunks/{chunk-S3ZO7JXS.js → chunk-G5FPWH5O.js} +4 -4
  66. package/dist/cli/chunks/{chunk-QSE67XJO.js → chunk-GDMH7NPV.js} +2 -2
  67. package/dist/cli/chunks/{chunk-MEY43PIQ.js → chunk-GILL32E2.js} +2 -2
  68. package/dist/cli/chunks/{chunk-LQTWPSYL.js → chunk-GLMDRGJD.js} +1 -1
  69. package/dist/cli/chunks/{chunk-MNV3E5KY.js → chunk-GS33ZRJH.js} +4 -4
  70. package/dist/cli/chunks/chunk-HPYGMKZF.js +2 -0
  71. package/dist/cli/chunks/{chunk-EQBEGDTG.js → chunk-HTLAPMTK.js} +1 -1
  72. package/dist/cli/chunks/{chunk-C2M74HCN.js → chunk-IAK76TIZ.js} +1 -1
  73. package/dist/cli/chunks/{chunk-2EDWGHDA.js → chunk-ICF5RPQU.js} +2 -2
  74. package/dist/cli/chunks/{chunk-ZXTO4C7R.js → chunk-IPAQ4HVX.js} +2 -2
  75. package/dist/cli/chunks/{chunk-RLXTBL3H.js → chunk-ISRTT4I7.js} +22 -22
  76. package/dist/cli/chunks/{chunk-SW4OKUTC.js → chunk-IYFMDIYZ.js} +2 -2
  77. package/dist/cli/chunks/{chunk-7IZ2OPC2.js → chunk-JRBGHWAM.js} +2 -2
  78. package/dist/cli/chunks/{chunk-QJ2EHLJ2.js → chunk-JYR3X4OC.js} +1 -1
  79. package/dist/cli/chunks/{chunk-5QHSLWLP.js → chunk-K72J52JO.js} +2 -2
  80. package/dist/cli/chunks/{chunk-PIZYRPMT.js → chunk-K7CW2X6U.js} +2 -2
  81. package/dist/cli/chunks/{chunk-3Z4FHA2E.js → chunk-K7K4TFJM.js} +4 -4
  82. package/dist/cli/chunks/{chunk-5HB54RUS.js → chunk-KCXE2LZU.js} +2 -2
  83. package/dist/cli/chunks/{chunk-THRTUW4Z.js → chunk-KGPAWNNR.js} +1 -1
  84. package/dist/cli/chunks/{chunk-MYWQTCS4.js → chunk-KJ56OXH4.js} +1 -1
  85. package/dist/cli/chunks/{chunk-ZDHMZPSL.js → chunk-KUFC4DBX.js} +1 -1
  86. package/dist/cli/chunks/{chunk-CV2SBMBW.js → chunk-KWZEBHAP.js} +2 -2
  87. package/dist/cli/chunks/{chunk-X2VAOIUY.js → chunk-L6VNEEN6.js} +1 -1
  88. package/dist/cli/chunks/{chunk-S3OZ7XSY.js → chunk-LHPR7ROV.js} +1 -1
  89. package/dist/cli/chunks/{chunk-HO37VP4O.js → chunk-LKK3NIHC.js} +1 -1
  90. package/dist/cli/chunks/{chunk-XRJECWZE.js → chunk-LOFA3U4X.js} +1 -1
  91. package/dist/cli/chunks/{chunk-AWFIEGR3.js → chunk-LYKSIOOT.js} +2 -2
  92. package/dist/cli/chunks/chunk-M2PSXKTG.js +2 -0
  93. package/dist/cli/chunks/{chunk-CMACGG4Z.js → chunk-M3MKP5VN.js} +1 -1
  94. package/dist/cli/chunks/{chunk-UYYBPWU3.js → chunk-M4ARHDY4.js} +1 -1
  95. package/dist/cli/chunks/chunk-M5DBKHM4.js +2 -0
  96. package/dist/cli/chunks/{chunk-7IVQ6OVR.js → chunk-MDWJXSBA.js} +2 -2
  97. package/dist/cli/chunks/{chunk-IICTTDAA.js → chunk-MFWWPRBV.js} +2 -2
  98. package/dist/cli/chunks/{chunk-4BXGVM2C.js → chunk-MHWYQHGN.js} +1 -1
  99. package/dist/cli/chunks/{chunk-HJME6G5M.js → chunk-MIQBRVK2.js} +1 -1
  100. package/dist/cli/chunks/{chunk-FY3CUPNN.js → chunk-MKZQBBCU.js} +2 -2
  101. package/dist/cli/chunks/{chunk-MCOFJHSJ.js → chunk-MQ5WMWUK.js} +5 -5
  102. package/dist/cli/chunks/chunk-MQIAN57O.js +2 -0
  103. package/dist/cli/chunks/{chunk-6NZHEM4V.js → chunk-MU4P4P4E.js} +3 -3
  104. package/dist/cli/chunks/{chunk-ETN5563K.js → chunk-MWV4KPOB.js} +2 -2
  105. package/dist/cli/chunks/{chunk-XTCUN36Z.js → chunk-N244P4MM.js} +2 -2
  106. package/dist/cli/chunks/{chunk-DRWGK3YO.js → chunk-N3MM4Z33.js} +2 -2
  107. package/dist/cli/chunks/{chunk-QQNCSEZG.js → chunk-N4CXUGXE.js} +2 -2
  108. package/dist/cli/chunks/{chunk-PEK6NGVJ.js → chunk-ND6YSW5N.js} +1 -1
  109. package/dist/cli/chunks/{chunk-7V5UHLNY.js → chunk-NJYI7HX7.js} +3 -3
  110. package/dist/cli/chunks/{chunk-YACT5WFC.js → chunk-NSRDP7RD.js} +2 -2
  111. package/dist/cli/chunks/{chunk-L7VIX22Y.js → chunk-NZGLDOU4.js} +15 -15
  112. package/dist/cli/chunks/{chunk-MNUTRAUV.js → chunk-O3SG32PS.js} +1 -1
  113. package/dist/cli/chunks/{chunk-ZGNZJJFF.js → chunk-OIFJH7TF.js} +1 -1
  114. package/dist/cli/chunks/{chunk-LZCBSFAU.js → chunk-OKKTDHHF.js} +6 -6
  115. package/dist/cli/chunks/{chunk-3RHHKYUR.js → chunk-OO7KJ34Y.js} +2 -2
  116. package/dist/cli/chunks/{chunk-STEGWLH5.js → chunk-OV4BLIKJ.js} +2 -2
  117. package/dist/cli/chunks/{chunk-AOI67HA3.js → chunk-PISW5HUX.js} +1 -1
  118. package/dist/cli/chunks/{chunk-SJH3HYNC.js → chunk-PLD4IGDL.js} +2 -2
  119. package/dist/cli/chunks/{chunk-2OH3ALYB.js → chunk-PMWWWYUM.js} +1 -1
  120. package/dist/cli/chunks/{chunk-EA7ZSN3V.js → chunk-PWJZZCHJ.js} +1 -1
  121. package/dist/cli/chunks/{chunk-HA63NBFK.js → chunk-PZ4PRZXN.js} +37 -37
  122. package/dist/cli/chunks/chunk-PZCSJZVJ.js +2 -0
  123. package/dist/cli/chunks/{chunk-CTDLI2ON.js → chunk-Q53M4LI7.js} +1 -1
  124. package/dist/cli/chunks/{chunk-WSVUSIAZ.js → chunk-QPMAXDJ2.js} +2 -2
  125. package/dist/cli/chunks/{chunk-MCZHKXB4.js → chunk-RJKYPWFD.js} +2 -2
  126. package/dist/cli/chunks/{chunk-7QRMARM7.js → chunk-RUC3FCRK.js} +2 -2
  127. package/dist/cli/chunks/{chunk-5PL7WTCU.js → chunk-SC6UFGJ6.js} +2 -2
  128. package/dist/cli/chunks/{chunk-FO43SQXP.js → chunk-SJC7OKF3.js} +2 -2
  129. package/dist/cli/chunks/{chunk-R2O6OKT2.js → chunk-STMMZXS6.js} +1 -1
  130. package/dist/cli/chunks/{chunk-ORF2UKQH.js → chunk-SVILIQQQ.js} +1 -1
  131. package/dist/cli/chunks/{chunk-UVU7XLJY.js → chunk-SXMGNMFL.js} +5 -5
  132. package/dist/cli/chunks/{chunk-OIEQF7PG.js → chunk-SZKFT6CD.js} +2 -2
  133. package/dist/cli/chunks/{chunk-G5U6Q42D.js → chunk-TBJ566KV.js} +2 -2
  134. package/dist/cli/chunks/{chunk-SVYTN2GT.js → chunk-TCV5DASI.js} +2 -2
  135. package/dist/cli/chunks/chunk-TWAWEP4X.js +59 -0
  136. package/dist/cli/chunks/chunk-U27GVYXA.js +2 -0
  137. package/dist/cli/chunks/{chunk-FPAW77XV.js → chunk-UFKVKNAA.js} +1 -1
  138. package/dist/cli/chunks/{chunk-HJORBNXW.js → chunk-USB7GCIC.js} +1 -1
  139. package/dist/cli/chunks/{chunk-4GTDW2XL.js → chunk-UW3ZSFFB.js} +2 -2
  140. package/dist/cli/chunks/{chunk-OXCEUR5F.js → chunk-UWAUYDW4.js} +2 -2
  141. package/dist/cli/chunks/{chunk-4F3ZTXHP.js → chunk-UXJVR323.js} +2 -2
  142. package/dist/cli/chunks/{chunk-AIUSZC6K.js → chunk-V5G3SMAJ.js} +2 -2
  143. package/dist/cli/chunks/{chunk-DMQPO43S.js → chunk-VDKMBOUK.js} +1 -1
  144. package/dist/cli/chunks/{chunk-5WJ3FWL4.js → chunk-VJ2D6FST.js} +24 -24
  145. package/dist/cli/chunks/chunk-VJOPNK2L.js +2 -0
  146. package/dist/cli/chunks/{chunk-JF53LRBL.js → chunk-VRE2EBFI.js} +2 -2
  147. package/dist/cli/chunks/{chunk-WNR2KAUH.js → chunk-WI5WXYIS.js} +2 -2
  148. package/dist/cli/chunks/{chunk-OWQ6HEYI.js → chunk-WIYWDON4.js} +2 -2
  149. package/dist/cli/chunks/{chunk-KB5L5TTF.js → chunk-WYMQ6FZR.js} +5 -5
  150. package/dist/cli/chunks/{chunk-TJKDATEU.js → chunk-XBFEHVBO.js} +2 -2
  151. package/dist/cli/chunks/{chunk-7SJX4CFK.js → chunk-XDZXLEJK.js} +1 -1
  152. package/dist/cli/chunks/{chunk-QEPFXY6G.js → chunk-XJXCSCCP.js} +1 -1
  153. package/dist/cli/chunks/{chunk-OPFN5LFT.js → chunk-XVA56PXZ.js} +4 -4
  154. package/dist/cli/chunks/{chunk-PXTDEO65.js → chunk-Y2EDDV5U.js} +2 -2
  155. package/dist/cli/chunks/{chunk-VSUTI4G6.js → chunk-YSLE6NNG.js} +2 -2
  156. package/dist/cli/chunks/{chunk-XGBAHAGC.js → chunk-Z4BTPQLG.js} +4 -4
  157. package/dist/cli/chunks/{chunk-NZO4WUSO.js → chunk-ZM4QGYGK.js} +3 -3
  158. package/dist/cli/chunks/{ci-PYCRCL7G.js → ci-2BLMQNX3.js} +6 -6
  159. package/dist/cli/chunks/{ci-output-EKQQFE2D.js → ci-output-XK4PPSN7.js} +2 -2
  160. package/dist/cli/chunks/{circuit-breaker-RH3Q2MJO.js → circuit-breaker-W7X4NPFE.js} +2 -2
  161. package/dist/cli/chunks/{claude-flow-setup-DUDXB4VV.js → claude-flow-setup-GLBLSYNJ.js} +2 -2
  162. package/dist/cli/chunks/client-C6CJOCRN.js +2 -0
  163. package/dist/cli/chunks/{cline-installer-3Q4WIWUG.js → cline-installer-7WX7DBGI.js} +2 -2
  164. package/dist/cli/chunks/{code-E4Q6DGOO.js → code-SP3HAQWG.js} +20 -19
  165. package/dist/cli/chunks/{code-index-extractor-2PCISUOW.js → code-index-extractor-44HH36UG.js} +2 -2
  166. package/dist/cli/chunks/{codex-installer-YNNNOLJ6.js → codex-installer-LMXRWLPU.js} +2 -2
  167. package/dist/cli/chunks/{completions-2F7TUFBD.js → completions-GL5FTZAN.js} +2 -2
  168. package/dist/cli/chunks/{complexity-analyzer-2B6MHO7W.js → complexity-analyzer-CQMYGETL.js} +2 -2
  169. package/dist/cli/chunks/{continuedev-installer-ENOKRU5M.js → continuedev-installer-CYVYS5B7.js} +2 -2
  170. package/dist/cli/chunks/{copilot-installer-6YD2KM5F.js → copilot-installer-M7XVII2A.js} +2 -2
  171. package/dist/cli/chunks/{cost-tracker-FCH4QOEA.js → cost-tracker-S4ET4FH3.js} +2 -2
  172. package/dist/cli/chunks/{coverage-JTOXZE3T.js → coverage-DFVSSQ4A.js} +3 -3
  173. package/dist/cli/chunks/cross-domain-router-I3GEA5G6.js +2 -0
  174. package/dist/cli/chunks/{cursor-installer-QZFBUGLQ.js → cursor-installer-KWDSQPQC.js} +2 -2
  175. package/dist/cli/chunks/{daemon-K4QFB5FQ.js → daemon-2HD54QVO.js} +3 -3
  176. package/dist/cli/chunks/daemon-CRX46BBO.js +10 -0
  177. package/dist/cli/chunks/{dag-attention-scheduler-BXAAW33V.js → dag-attention-scheduler-SCP6WPZB.js} +2 -2
  178. package/dist/cli/chunks/{detect-UGSWIOAD.js → detect-XS2GDCEX.js} +2 -2
  179. package/dist/cli/chunks/{dist-node-FN3HX3OK.js → dist-node-U43MVQ3F.js} +2 -2
  180. package/dist/cli/chunks/{domain-handler-7PP7VYA7.js → domain-handler-HITMDULH.js} +2 -2
  181. package/dist/cli/chunks/{domain-transfer-XZM44W7I.js → domain-transfer-TJF7DNI4.js} +2 -2
  182. package/dist/cli/chunks/dream-JCQMG2RL.js +2 -0
  183. package/dist/cli/chunks/{embed-and-insert-pattern-JZVERJ5L.js → embed-and-insert-pattern-JKG33YZK.js} +2 -2
  184. package/dist/cli/chunks/{eval-466NFF2D.js → eval-NF5Y4W37.js} +3 -3
  185. package/dist/cli/chunks/{experience-capture-middleware-I7IQCC7V.js → experience-capture-middleware-VMMFYJ4D.js} +3 -3
  186. package/dist/cli/chunks/{fast-paths-34OICNZA.js → fast-paths-W2Q53IR2.js} +2 -2
  187. package/dist/cli/chunks/{feature-flags-6UBIVTAD.js → feature-flags-B4PBMQJO.js} +2 -2
  188. package/dist/cli/chunks/{feature-flags-X5WBBWSO.js → feature-flags-PVI7A4RE.js} +2 -2
  189. package/dist/cli/chunks/{file-discovery-NLMDBWXX.js → file-discovery-E4L3I33I.js} +2 -2
  190. package/dist/cli/chunks/{fleet-W7CYCHDI.js → fleet-LE5SHVLK.js} +3 -3
  191. package/dist/cli/chunks/{gnn-wrapper-K4VTAG5X.js → gnn-wrapper-MWWJBLOH.js} +2 -2
  192. package/dist/cli/chunks/{heartbeat-handler-ZGKF2Z6T.js → heartbeat-handler-XOUVNPQK.js} +4 -4
  193. package/dist/cli/chunks/heartbeat-scheduler-FBHE4ZWH.js +2 -0
  194. package/dist/cli/chunks/hnsw-adapter-EOOA4WXD.js +2 -0
  195. package/dist/cli/chunks/hnsw-index-TD3KRPND.js +2 -0
  196. package/dist/cli/chunks/{hnsw-legacy-bridge-ELDRLKK5.js → hnsw-legacy-bridge-W3T5ZDDP.js} +2 -2
  197. package/dist/cli/chunks/{better-sqlite3-5BT5FO64.js → hnswlib-node-3TZFES5I.js} +2 -2
  198. package/dist/cli/chunks/hooks-RUPQVIUM.js +250 -0
  199. package/dist/cli/chunks/hybrid-router-64O6PXZ2.js +2 -0
  200. package/dist/cli/chunks/{hypergraph-engine-UWFW3XP5.js → hypergraph-engine-VDFK3JYH.js} +2 -2
  201. package/dist/cli/chunks/{hypergraph-handler-PK2BI46K.js → hypergraph-handler-EUDGEF25.js} +3 -3
  202. package/dist/cli/chunks/impact-analyzer-ITQHXGTM.js +2 -0
  203. package/dist/cli/chunks/{init-handler-HNG6KJOU.js → init-handler-MZEAJOZK.js} +6 -6
  204. package/dist/cli/chunks/init-wizard-DZ4IKGQI.js +2 -0
  205. package/dist/cli/chunks/kernel-HSVY4ZYK.js +2 -0
  206. package/dist/cli/chunks/{kilocode-installer-25V7FEJ4.js → kilocode-installer-ECBYWT6M.js} +2 -2
  207. package/dist/cli/chunks/{kiro-installer-7RMTTCQB.js → kiro-installer-KYFCSYTG.js} +2 -2
  208. package/dist/cli/chunks/knowledge-graph-H32TXXX4.js +2 -0
  209. package/dist/cli/chunks/{learning-XQC2MG2R.js → learning-4RAFMDSB.js} +3 -3
  210. package/dist/cli/chunks/{llm-router-6KTTONH4.js → llm-router-JHBNLYP3.js} +12 -12
  211. package/dist/cli/chunks/llm-router-service-3FKESBUX.js +2 -0
  212. package/dist/cli/chunks/{load-BV64P3AL.js → load-4DVQML7P.js} +2 -2
  213. package/dist/cli/chunks/load-test-LKHURZGZ.js +2 -0
  214. package/dist/cli/chunks/{mcp-U5ZN77TA.js → mcp-LCWMU4GZ.js} +2 -2
  215. package/dist/cli/chunks/{memory-WB5BNBK7.js → memory-3DTJAURT.js} +5 -5
  216. package/dist/cli/chunks/memory-backend-XRJRZ6CK.js +2 -0
  217. package/dist/cli/chunks/memory-handlers-BL6E3XAK.js +2 -0
  218. package/dist/cli/chunks/{multi-model-executor-3X3W3UTY.js → multi-model-executor-AVR5SZOO.js} +2 -2
  219. package/dist/cli/chunks/{opencode-installer-TTTMG7ZZ.js → opencode-installer-DW2426QM.js} +3 -3
  220. package/dist/cli/chunks/{orchestrator-BLCGSHMZ.js → orchestrator-AHF4W5GS.js} +8 -8
  221. package/dist/cli/chunks/{pipeline-DZPGMRG7.js → pipeline-N6THEWYE.js} +2 -2
  222. package/dist/cli/chunks/{platform-EVMZAUNV.js → platform-MRCFQF7X.js} +2 -2
  223. package/dist/cli/chunks/{plugin-OR55K4HT.js → plugin-6YKUN5QM.js} +2 -2
  224. package/dist/cli/chunks/{prime-radiant-advanced-wasm-4ODV27HD.js → prime-radiant-advanced-wasm-2YPAHSVS.js} +2 -2
  225. package/dist/cli/chunks/protocol-executor-KABPB6PQ.js +2 -0
  226. package/dist/cli/chunks/{protocol-handler-ZOTI5PID.js → protocol-handler-Y2NMUKWQ.js} +2 -2
  227. package/dist/cli/chunks/{prove-DIMBYJ7V.js → prove-DZUNWBFD.js} +2 -2
  228. package/dist/cli/chunks/provider-manager-U7EBM3FA.js +2 -0
  229. package/dist/cli/chunks/qe-reasoning-bank-64O2OQIW.js +2 -0
  230. package/dist/cli/chunks/{quality-7MX4VL6M.js → quality-AIFQMGUV.js} +2 -2
  231. package/dist/cli/chunks/queen-coordinator-SV3COGIL.js +2 -0
  232. package/dist/cli/chunks/{real-embeddings-YPUHWRN2.js → real-embeddings-5XL4LOG2.js} +2 -2
  233. package/dist/cli/chunks/{roocode-installer-WG5AU4QM.js → roocode-installer-LV3WONT5.js} +2 -2
  234. package/dist/cli/chunks/router-QARRPMED.js +2 -0
  235. package/dist/cli/chunks/routing-feedback-KD2JFTPK.js +2 -0
  236. package/dist/cli/chunks/{routing-handler-LZB4MN2K.js → routing-handler-WSMUILGD.js} +2 -2
  237. package/dist/cli/chunks/{ruvector-commands-YE4ADBMC.js → ruvector-commands-BCEIDTW3.js} +2 -2
  238. package/dist/cli/chunks/{rvf-dual-writer-QS5ATW4C.js → rvf-dual-writer-LRSPC6H3.js} +2 -2
  239. package/dist/cli/chunks/{rvf-migration-adapter-YIGKSBD3.js → rvf-migration-adapter-QHNX6353.js} +2 -2
  240. package/dist/cli/chunks/{rvf-migration-coordinator-2NDCWP7F.js → rvf-migration-coordinator-SLNB3XPW.js} +2 -2
  241. package/dist/cli/chunks/rvf-native-adapter-4LLGF5AY.js +2 -0
  242. package/dist/cli/chunks/safe-db-RAX3H2P7.js +2 -0
  243. package/dist/cli/chunks/schedule-RQZGLLUY.js +2 -0
  244. package/dist/cli/chunks/scheduler-ACWTN4LN.js +2 -0
  245. package/dist/cli/chunks/{security-HT4SUT24.js → security-CYY6TECQ.js} +3 -3
  246. package/dist/cli/chunks/shared-rvf-adapter-U6JE4O6A.js +2 -0
  247. package/dist/cli/chunks/{shared-rvf-dual-writer-ZKFO7CBY.js → shared-rvf-dual-writer-PJBSNBRV.js} +2 -2
  248. package/dist/cli/chunks/sqlite-persistence-SWNBO257.js +2 -0
  249. package/dist/cli/chunks/{status-handler-AMEMKBI4.js → status-handler-W723LXX5.js} +2 -2
  250. package/dist/cli/chunks/{structural-health-RBADRLC3.js → structural-health-WZUPZBB5.js} +2 -2
  251. package/dist/cli/chunks/{sync-PCB23M4K.js → sync-UA22CKUS.js} +2 -2
  252. package/dist/cli/chunks/sync-ZLMF53TB.js +2 -0
  253. package/dist/cli/chunks/{task-handler-J26FSCH5.js → task-handler-SENTEEXZ.js} +2 -2
  254. package/dist/cli/chunks/{task-handlers-AQRLR6BL.js → task-handlers-FGVUZOCC.js} +3 -3
  255. package/dist/cli/chunks/{test-YXWSIOSB.js → test-Q37C3WI2.js} +4 -4
  256. package/dist/cli/chunks/{test-scheduling-XY532GI4.js → test-scheduling-E6SPIBTH.js} +4 -4
  257. package/dist/cli/chunks/token-bootstrap-HQFFMZUF.js +2 -0
  258. package/dist/cli/chunks/{token-usage-2MJVE4DT.js → token-usage-JHNWTZ7L.js} +3 -3
  259. package/dist/cli/chunks/{transformers-QSNTOD2Z.js → transformers-TEXDUVNI.js} +2 -2
  260. package/dist/cli/chunks/tree-sitter-wasm-parser-MWSS52H6.js +2 -0
  261. package/dist/cli/chunks/{types-RNKRSYMO.js → types-YQRKHYH3.js} +2 -2
  262. package/dist/cli/chunks/unified-memory-QG3FDRKR.js +2 -0
  263. package/dist/cli/chunks/unified-memory-hnsw-KOR4EOIG.js +2 -0
  264. package/dist/cli/chunks/unified-persistence-J6NIRYKM.js +2 -0
  265. package/dist/cli/chunks/{upgrade-EKJHIFWP.js → upgrade-JKMEDURI.js} +2 -2
  266. package/dist/cli/chunks/{validate-KS4T7LWC.js → validate-URO7G6OE.js} +4 -4
  267. package/dist/cli/chunks/validate-swarm-VZVJ56Z5.js +14 -0
  268. package/dist/cli/chunks/{vibium-FLUQO4IF.js → vibium-G5WZILL6.js} +2 -2
  269. package/dist/cli/chunks/visual-security-RAWV6YLN.js +2 -0
  270. package/dist/cli/chunks/{web-tree-sitter-UMC63DWD.js → web-tree-sitter-LECH5T6H.js} +2 -2
  271. package/dist/cli/chunks/{windsurf-installer-V3FQGJIQ.js → windsurf-installer-2NPLC2YW.js} +2 -2
  272. package/dist/cli/chunks/{witness-chain-GE74TLSO.js → witness-chain-X347C36A.js} +2 -2
  273. package/dist/cli/chunks/witness-chain-ZO7FIM35.js +2 -0
  274. package/dist/cli/chunks/{workflow-4YZ2RPWA.js → workflow-V4ALYZ73.js} +4 -4
  275. package/dist/cli/chunks/workflow-orchestrator-7SKITNIJ.js +2 -0
  276. package/dist/cli/chunks/wrappers-QXOPRPR4.js +2 -0
  277. package/dist/cli/commands/code.js +6 -0
  278. package/dist/cli/commands/hooks-handlers/task-hooks.js +50 -0
  279. package/dist/cli/commands/learning.js +5 -5
  280. package/dist/cli/commands/llm-router.js +1 -1
  281. package/dist/cli/commands/workflow.js +1 -0
  282. package/dist/coordination/consensus/providers/native-learning-provider.d.ts +1 -1
  283. package/dist/coordination/consensus/providers/ollama-provider.d.ts +1 -1
  284. package/dist/coordination/consensus/providers/openrouter-provider.d.ts +1 -1
  285. package/dist/coordination/handlers/code-intelligence-handlers.js +6 -0
  286. package/dist/coordination/mincut/neural-goap.js +24 -20
  287. package/dist/coordination/protocols/code-intelligence-index.js +31 -25
  288. package/dist/coordination/queen-coordinator.js +4 -0
  289. package/dist/coordination/queen-work-stealing.js +1 -2
  290. package/dist/domains/chaos-resilience/coordinator.js +19 -15
  291. package/dist/domains/chaos-resilience/services/chaos-engineer.js +5 -2
  292. package/dist/domains/chaos-resilience/services/load-tester.js +15 -11
  293. package/dist/domains/code-intelligence/interfaces.d.ts +5 -0
  294. package/dist/domains/code-intelligence/services/c4-model/index.js +12 -6
  295. package/dist/domains/code-intelligence/services/impact-analyzer.js +6 -2
  296. package/dist/domains/code-intelligence/services/knowledge-graph.d.ts +42 -0
  297. package/dist/domains/code-intelligence/services/knowledge-graph.js +278 -93
  298. package/dist/domains/code-intelligence/services/semantic-analyzer.js +8 -2
  299. package/dist/domains/contract-testing/coordinator.js +1 -1
  300. package/dist/domains/coverage-analysis/coordinator.js +4 -2
  301. package/dist/domains/learning-optimization/coordinator.js +1 -0
  302. package/dist/domains/quality-assessment/coherence/gate-controller.js +32 -26
  303. package/dist/domains/requirements-validation/coordinator.js +1 -0
  304. package/dist/domains/test-execution/services/e2e/wait-condition-handler.js +1 -1
  305. package/dist/domains/test-execution/services/retry-handler.js +18 -12
  306. package/dist/domains/test-generation/coordinator.js +1 -1
  307. package/dist/domains/test-generation/services/pattern-matcher.js +7 -5
  308. package/dist/domains/test-generation/services/test-generator.js +3 -2
  309. package/dist/domains/visual-accessibility/coordinator.js +24 -20
  310. package/dist/index.d.ts +2 -2
  311. package/dist/index.js +2 -2
  312. package/dist/init/phases/12-verification.js +3 -3
  313. package/dist/integrations/agentic-flow/model-router/router.js +1 -1
  314. package/dist/integrations/embeddings/base/EmbeddingGenerator.js +11 -7
  315. package/dist/integrations/ruvector/hypergraph-engine.js +2 -2
  316. package/dist/integrations/ruvector/shared-rvf-adapter.js +12 -1
  317. package/dist/integrations/ruvector/shared-rvf-dual-writer.js +6 -2
  318. package/dist/integrations/ruvector/spectral-math.js +2 -2
  319. package/dist/integrations/ruvector/spectral-sparsifier.js +1 -1
  320. package/dist/kernel/kernel.js +1 -1
  321. package/dist/kernel/project-root.d.ts +33 -0
  322. package/dist/kernel/project-root.js +86 -0
  323. package/dist/kernel/unified-memory-hnsw.js +1 -0
  324. package/dist/kernel/unified-memory.d.ts +2 -19
  325. package/dist/kernel/unified-memory.js +8 -64
  326. package/dist/learning/experience-capture.js +1 -1
  327. package/dist/learning/local-judge-client.d.ts +55 -0
  328. package/dist/learning/local-judge-client.js +127 -0
  329. package/dist/learning/nagual-client.d.ts +73 -0
  330. package/dist/learning/nagual-client.js +150 -0
  331. package/dist/learning/pattern-store.js +10 -3
  332. package/dist/learning/qe-reasoning-bank.js +9 -1
  333. package/dist/learning/qe-unified-memory.js +8 -6
  334. package/dist/mcp/bundle.js +405 -403
  335. package/dist/mcp/entry.js +44 -33
  336. package/dist/mcp/handlers/core-handlers.js +2 -2
  337. package/dist/mcp/handlers/cross-phase-handlers.js +5 -3
  338. package/dist/mcp/handlers/handler-factory.d.ts +5 -0
  339. package/dist/mcp/handlers/handler-factory.js +44 -4
  340. package/dist/mcp/http-server.js +1 -0
  341. package/dist/mcp/protocol-server.js +2 -2
  342. package/dist/mcp/tools/code-intelligence/analyze.js +1 -1
  343. package/dist/mcp/tools/learning-optimization/optimize.js +1 -1
  344. package/dist/mcp/tools/qx-analysis/heuristics-engine.js +195 -173
  345. package/dist/mcp/tools/visual-accessibility/index.js +1 -1
  346. package/dist/mcp/transport/stdio.d.ts +7 -0
  347. package/dist/mcp/transport/stdio.js +39 -2
  348. package/dist/mcp/transport/websocket/websocket-transport.js +1 -0
  349. package/dist/optimization/auto-tuner.js +1 -1
  350. package/dist/planning/goap-planner.js +1 -0
  351. package/dist/routing/agent-dependency-graph.js +4 -1
  352. package/dist/shared/llm/router/config-store.js +1 -1
  353. package/dist/shared/metrics/system-metrics.js +6 -4
  354. package/dist/shared/parsers/tree-sitter-wasm-parser.d.ts +12 -0
  355. package/dist/shared/parsers/tree-sitter-wasm-parser.js +35 -0
  356. package/dist/shared/parsers/treesitter-ts-extractor.d.ts +39 -0
  357. package/dist/shared/parsers/treesitter-ts-extractor.js +196 -0
  358. package/dist/shared/utils/safe-expression-evaluator.js +8 -5
  359. package/dist/sync/cloud/postgres-writer.js +2 -0
  360. package/dist/sync/readers/json-reader.js +1 -1
  361. package/dist/test-scheduling/git-aware/test-selector.js +1 -1
  362. package/dist/workers/daemon.js +2 -0
  363. package/dist/workers/quality-daemon/git-watcher.js +2 -0
  364. package/dist/workers/quality-daemon/index.js +28 -24
  365. package/dist/workers/worker-manager.js +4 -0
  366. package/package.json +5 -4
  367. package/dist/cli/chunks/adapter-CR6J5C76.js +0 -2
  368. package/dist/cli/chunks/aqe-learning-engine-2MNTHMB6.js +0 -2
  369. package/dist/cli/chunks/audit-ALRYPHGP.js +0 -3
  370. package/dist/cli/chunks/base-AOQNGMTL.js +0 -2
  371. package/dist/cli/chunks/browser-workflow-UJ4A2ZXO.js +0 -2
  372. package/dist/cli/chunks/chunk-7DKYCVJI.js +0 -2
  373. package/dist/cli/chunks/chunk-FO73PZVU.js +0 -2
  374. package/dist/cli/chunks/chunk-I677W5BT.js +0 -59
  375. package/dist/cli/chunks/chunk-IAZEDWRX.js +0 -2
  376. package/dist/cli/chunks/chunk-RNREAOY4.js +0 -2
  377. package/dist/cli/chunks/chunk-UWXH2UQK.js +0 -2
  378. package/dist/cli/chunks/chunk-ZQUXNG5X.js +0 -2
  379. package/dist/cli/chunks/client-RDPWGOSA.js +0 -2
  380. package/dist/cli/chunks/cross-domain-router-4K5ZVZEZ.js +0 -2
  381. package/dist/cli/chunks/daemon-M422U3ZA.js +0 -10
  382. package/dist/cli/chunks/dream-RPNWM7VS.js +0 -2
  383. package/dist/cli/chunks/heartbeat-scheduler-JBCXMMZO.js +0 -2
  384. package/dist/cli/chunks/hnsw-adapter-3SC2HZIG.js +0 -2
  385. package/dist/cli/chunks/hnsw-index-FQORAR6K.js +0 -2
  386. package/dist/cli/chunks/hooks-T4CBINAV.js +0 -248
  387. package/dist/cli/chunks/hybrid-router-6CBFDXPR.js +0 -2
  388. package/dist/cli/chunks/impact-analyzer-SOEFVZWG.js +0 -2
  389. package/dist/cli/chunks/init-wizard-3E4IU5M4.js +0 -2
  390. package/dist/cli/chunks/kernel-GFZP4G5J.js +0 -2
  391. package/dist/cli/chunks/knowledge-graph-BKRKBU26.js +0 -2
  392. package/dist/cli/chunks/llm-router-service-KE4IGZPP.js +0 -2
  393. package/dist/cli/chunks/load-test-VSYJV2AO.js +0 -2
  394. package/dist/cli/chunks/memory-backend-B72RGHRF.js +0 -2
  395. package/dist/cli/chunks/memory-handlers-NWCH7AUO.js +0 -2
  396. package/dist/cli/chunks/protocol-executor-V3F37FPO.js +0 -2
  397. package/dist/cli/chunks/provider-manager-2PN72TT6.js +0 -2
  398. package/dist/cli/chunks/qe-reasoning-bank-P665QNIR.js +0 -2
  399. package/dist/cli/chunks/queen-coordinator-XD4F7BGB.js +0 -2
  400. package/dist/cli/chunks/router-4SSNWDJC.js +0 -2
  401. package/dist/cli/chunks/routing-feedback-O2JSIBW6.js +0 -2
  402. package/dist/cli/chunks/rvf-native-adapter-WIUHYXRB.js +0 -2
  403. package/dist/cli/chunks/safe-db-WL5Y7ZNS.js +0 -2
  404. package/dist/cli/chunks/schedule-U7QDGU5A.js +0 -2
  405. package/dist/cli/chunks/scheduler-LXKGQYXA.js +0 -2
  406. package/dist/cli/chunks/shared-rvf-adapter-4IZOJL33.js +0 -2
  407. package/dist/cli/chunks/sqlite-persistence-4KFO3SEB.js +0 -2
  408. package/dist/cli/chunks/sync-ARDDLQBS.js +0 -2
  409. package/dist/cli/chunks/token-bootstrap-KL2QIQ36.js +0 -2
  410. package/dist/cli/chunks/tree-sitter-wasm-parser-QJOKHOIW.js +0 -2
  411. package/dist/cli/chunks/unified-memory-7AS4LIEF.js +0 -2
  412. package/dist/cli/chunks/unified-memory-hnsw-GREESNJX.js +0 -2
  413. package/dist/cli/chunks/unified-persistence-BPJOMZOA.js +0 -2
  414. package/dist/cli/chunks/validate-swarm-SKKWRP2H.js +0 -14
  415. package/dist/cli/chunks/visual-security-BW662FHQ.js +0 -2
  416. package/dist/cli/chunks/witness-chain-OXVDLNVT.js +0 -2
  417. package/dist/cli/chunks/workflow-orchestrator-KKNR46XV.js +0 -2
  418. package/dist/cli/chunks/wrappers-37NLMKPE.js +0 -2
@@ -60,7 +60,7 @@ If any stale version strings are found in source files, fix them ALL before cont
60
60
  Update package.json to the target version:
61
61
 
62
62
  ```bash
63
- cd /workspaces/agentic-qe-new && npm version <version> --no-git-tag-version
63
+ cd /workspaces/agentic-qe && npm version <version> --no-git-tag-version
64
64
  ```
65
65
 
66
66
  Also update `fleetVersion` in `.claude/skills/skills-manifest.json`.
@@ -166,17 +166,17 @@ All three must exist: CLI bundle, main entry point, MCP server.
166
166
  mkdir -p /tmp/aqe-release-test && cd /tmp/aqe-release-test
167
167
 
168
168
  # Run init using the LOCAL build (not published version)
169
- node /workspaces/agentic-qe-new/dist/cli/bundle.js init --auto
169
+ node /workspaces/agentic-qe/dist/cli/bundle.js init --auto
170
170
  ```
171
171
  Verify init completes without errors and creates the expected project structure (`.agentic-qe/` directory, config files).
172
172
 
173
173
  #### 8c. Verify CLI
174
174
  ```bash
175
175
  # Version output
176
- node /workspaces/agentic-qe-new/dist/cli/bundle.js --version
176
+ node /workspaces/agentic-qe/dist/cli/bundle.js --version
177
177
 
178
178
  # System status
179
- node /workspaces/agentic-qe-new/dist/cli/bundle.js status
179
+ node /workspaces/agentic-qe/dist/cli/bundle.js status
180
180
  ```
181
181
  Both must succeed without errors.
182
182
 
@@ -185,13 +185,13 @@ Both must succeed without errors.
185
185
  cd /tmp/aqe-release-test
186
186
 
187
187
  # Verify learning subsystem
188
- node /workspaces/agentic-qe-new/dist/cli/bundle.js learning stats 2>&1 | head -10
188
+ node /workspaces/agentic-qe/dist/cli/bundle.js learning stats 2>&1 | head -10
189
189
 
190
190
  # Verify agent listing works
191
- node /workspaces/agentic-qe-new/dist/cli/bundle.js agent list 2>&1 | head -10
191
+ node /workspaces/agentic-qe/dist/cli/bundle.js agent list 2>&1 | head -10
192
192
 
193
193
  # Verify health check
194
- node /workspaces/agentic-qe-new/dist/cli/bundle.js health 2>&1 | head -10
194
+ node /workspaces/agentic-qe/dist/cli/bundle.js health 2>&1 | head -10
195
195
  ```
196
196
  These should respond (even if empty results) without errors, confirming the subsystems initialize properly.
197
197
 
@@ -206,7 +206,7 @@ npm install ./agentic-qe-<version>.tgz 2>&1 | tail -3
206
206
  node node_modules/.bin/aqe --version 2>&1
207
207
  EXIT=$?
208
208
  echo "Exit code: $EXIT"
209
- cd /workspaces/agentic-qe-new
209
+ cd /workspaces/agentic-qe
210
210
  rm -rf "$CLEAN_DIR"
211
211
  ```
212
212
  Must exit 0 and print the correct version. If it crashes with `ERR_MODULE_NOT_FOUND`, a dependency is marked as external in the build scripts but not listed in `dependencies`. Fix by either bundling it, lazy-loading it, or adding it to dependencies.
@@ -223,7 +223,7 @@ rm -rf /tmp/aqe-release-test
223
223
  Run the same tests that CI runs on PRs and during publish. Skip e2e browser tests unless the user explicitly requests them.
224
224
 
225
225
  ```bash
226
- cd /workspaces/agentic-qe-new
226
+ cd /workspaces/agentic-qe
227
227
 
228
228
  # Performance gates (fast — validates perf thresholds)
229
229
  npm run performance:gate
@@ -249,7 +249,7 @@ All mandatory test suites must pass. Pre-existing MCP handler test failures (tes
249
249
  2. No forbidden dismissal phrases ("I believe it's unlikely", "can't see how this would fail", etc.)
250
250
  without a tracking issue reference in the same paragraph
251
251
  ```bash
252
- cd /workspaces/agentic-qe-new
252
+ cd /workspaces/agentic-qe
253
253
 
254
254
  # Stage version bump + changelog + release docs + any version audit fixes
255
255
  git add package.json package-lock.json CHANGELOG.md docs/releases/README.md docs/releases/v<version>.md
@@ -939,7 +939,7 @@
939
939
  },
940
940
  "metadata": {
941
941
  "generatedBy": "Agentic QE Fleet",
942
- "fleetVersion": "3.10.2",
942
+ "fleetVersion": "3.10.4",
943
943
  "manifestVersion": "1.4.0",
944
944
  "lastUpdated": "2026-04-13T00:00:00.000Z",
945
945
  "contributors": [
package/CHANGELOG.md CHANGED
@@ -5,6 +5,94 @@ All notable changes to the Agentic QE project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.10.4] - 2026-06-08
9
+
10
+ Two correctness fixes that keep a project's self-learning where it belongs and
11
+ stop orphaned MCP servers from burning CPU, plus opt-in support for running your
12
+ own local Nagual pattern hub and LLM judge.
13
+
14
+ ### Added
15
+
16
+ - **Optional local Nagual pattern hub + local LLM judge (opt-in).** Point the
17
+ cross-project knowledge hub at a locally-run `nagual serve` instance via
18
+ `NAGUAL_URL`, and score pattern quality with a local Ollama-compatible model
19
+ via `NAGUAL_JUDGE_URL` / `NAGUAL_JUDGE_MODEL`. When configured, pre-task
20
+ analysis surfaces relevant cross-project patterns for complex tasks in QE
21
+ domains. Entirely best-effort and disabled unless the env vars are set — no
22
+ behavior change for existing users.
23
+
24
+ ### Fixed
25
+
26
+ - **Project learning was being written outside its own `.agentic-qe/` (#516).**
27
+ Two root-resolution defects are fixed: (1) `findProjectRoot()` now prefers the
28
+ **nearest** `.agentic-qe` instead of the topmost, so an ancestor store (e.g.
29
+ `~/.agentic-qe`, created by any `aqe` run from `$HOME`) no longer hijacks every
30
+ descendant project and fragments its learning into `$HOME`; (2) the RVF
31
+ substrate (`patterns.rvf` / `brain.rvf`) now resolves its location through the
32
+ project root instead of a cwd-relative default, so running a hook, worker, or
33
+ `aqe` command from a subfolder no longer scatters stray, orphaned stores.
34
+ - **Orphaned `aqe-mcp` server busy-looped at high CPU and ignored SIGTERM (#513).**
35
+ When the parent Claude Code session exited, the stdio MCP server was reparented
36
+ and spun at 70–98% CPU indefinitely, surviving `kill` (only `kill -9` worked).
37
+ Stdin EOF is now treated as terminal — the server shuts down gracefully instead
38
+ of entering a reconnect busy-loop — backed by an idempotent shutdown path with a
39
+ watchdog timeout and `unref()`'d background timers so an orphan can never linger.
40
+
41
+ ## [3.10.3] - 2026-06-03
42
+
43
+ Code-intelligence overhaul for the JS/TS ecosystem (#511) plus a critical fix for
44
+ MCP domain tools hanging on a fresh install.
45
+
46
+ ### Added
47
+
48
+ - **TypeScript/JavaScript code intelligence with no `typescript` dependency.**
49
+ `aqe code index` / `deps` / `impact` / `search` now parse TS/JS/TSX using
50
+ bundled tree-sitter WASM grammars, so they work out of the box on the entire
51
+ JS/TS ecosystem — including AQE's own source. Previously every TS/JS file
52
+ errored with "TypeScript is required for code analysis" and produced 0
53
+ nodes/edges unless the user separately installed the multi-megabyte TypeScript
54
+ compiler. The compiler is still used automatically as a higher-fidelity path
55
+ when present. Grammars are built reproducibly via `scripts/build-grammars.sh`.
56
+
57
+ ### Fixed
58
+
59
+ - **MCP domain tools hung forever on a fresh install.** Every MCP tool that goes
60
+ through the queen/router path (`code_index`, `quality_assess`, `defect_predict`,
61
+ …) spun a CPU core and never returned the first time pretrained patterns were
62
+ seeded — `QEReasoningBank.initialize()` recursed via `storePattern()` because
63
+ the `initialized` flag was set after seeding instead of before. The CLI was
64
+ unaffected (it calls domain services directly). Fixed the init ordering; as
65
+ defense-in-depth the advisory pattern-search/routing step is now timeout-bounded
66
+ so a future stall there can never block a tool call.
67
+ - **`aqe code deps` returned 0 edges on TS/JS repos (#511).** The knowledge graph
68
+ was kept in-memory only, so `deps`/`search` (separate CLI processes from
69
+ `index`) always saw an empty graph. Nodes/edges are now persisted; relative
70
+ import specifiers resolve to their file nodes so the dependency graph actually
71
+ connects; and the dependency traversal no longer fabricates phantom cycles.
72
+ - **`aqe code search` returned 0 results even for present terms (#511).** Indexed
73
+ content was written with a `{namespace}` store option but read back without it
74
+ (the #491 Bug 2 pattern), so every matched vector was silently dropped.
75
+ - **Code-intelligence graph is now shared by CLI and MCP.** The graph is pinned to
76
+ a fixed `code-intelligence:kg` namespace instead of the backend default, so a
77
+ graph indexed by one tool is readable by the other and the init existence check
78
+ finds it. `index --incremental` prunes a file's stale entities/edges, the
79
+ FileReader cache is evicted before re-reading, and MCP `code_index` reports real
80
+ symbol/relation counts (was always 0/0).
81
+ - **`index` is now honest about unsupported languages.** It warns when files are
82
+ indexed under a language with no dependency extractor instead of reporting edge
83
+ counts that `deps` then shows as 0.
84
+ - **tree-sitter WASM grammars repaired.** The bundled python/java/c#/rust/swift
85
+ grammars were built with the pre-0.25 emscripten format and silently failed to
86
+ load with web-tree-sitter 0.26 (falling back to regex). Rebuilt with the
87
+ matching toolchain so they load correctly.
88
+
89
+ ### Changed
90
+
91
+ - **Lint debt cleanup.** Removed dead imports across the tree, wrapped
92
+ case-clause declarations, documented intentional rule violations, ignored
93
+ `src/_archived`, and aligned the bounded-context count metadata (1072 → ~472
94
+ lint problems). No behavioral changes.
95
+
8
96
  ## [3.10.2] - 2026-06-02
9
97
 
10
98
  Self-learning hardening release with two critical hook/dream fixes reported by users.
@@ -939,7 +939,7 @@
939
939
  },
940
940
  "metadata": {
941
941
  "generatedBy": "Agentic QE Fleet",
942
- "fleetVersion": "3.10.0",
942
+ "fleetVersion": "3.10.4",
943
943
  "manifestVersion": "1.4.0",
944
944
  "lastUpdated": "2026-04-13T00:00:00.000Z",
945
945
  "contributors": [
@@ -249,8 +249,10 @@ export class ClaimVerifierService {
249
249
  return this.fileVerifier.verify(claim, options);
250
250
  case 'multi-model':
251
251
  // Not yet implemented - fall back to recommended method
252
- const fallbackMethod = this.getRecommendedMethod(claim.type);
253
- return this.executeVerification(claim, fallbackMethod, options);
252
+ {
253
+ const fallbackMethod = this.getRecommendedMethod(claim.type);
254
+ return this.executeVerification(claim, fallbackMethod, options);
255
+ }
254
256
  default:
255
257
  throw createVerificationError('METHOD_NOT_AVAILABLE', `Verification method '${method}' is not available`, { retryable: false });
256
258
  }
@@ -73,33 +73,41 @@ export class TestBasedVerifier {
73
73
  let confidence = 0;
74
74
  switch (claimType) {
75
75
  case 'test-count':
76
- const testResults = await this.verifyTestCount(claim);
77
- evidence = testResults.evidence;
78
- verified = testResults.verified;
79
- reasoning = testResults.reasoning;
80
- confidence = testResults.confidence;
81
- break;
76
+ {
77
+ const testResults = await this.verifyTestCount(claim);
78
+ evidence = testResults.evidence;
79
+ verified = testResults.verified;
80
+ reasoning = testResults.reasoning;
81
+ confidence = testResults.confidence;
82
+ break;
83
+ }
82
84
  case 'test-results':
83
- const executionResults = await this.verifyTestExecution(claim);
84
- evidence = executionResults.evidence;
85
- verified = executionResults.verified;
86
- reasoning = executionResults.reasoning;
87
- confidence = executionResults.confidence;
88
- break;
85
+ {
86
+ const executionResults = await this.verifyTestExecution(claim);
87
+ evidence = executionResults.evidence;
88
+ verified = executionResults.verified;
89
+ reasoning = executionResults.reasoning;
90
+ confidence = executionResults.confidence;
91
+ break;
92
+ }
89
93
  case 'coverage':
90
- const coverageResults = await this.verifyCoverage(claim);
91
- evidence = coverageResults.evidence;
92
- verified = coverageResults.verified;
93
- reasoning = coverageResults.reasoning;
94
- confidence = coverageResults.confidence;
95
- break;
94
+ {
95
+ const coverageResults = await this.verifyCoverage(claim);
96
+ evidence = coverageResults.evidence;
97
+ verified = coverageResults.verified;
98
+ reasoning = coverageResults.reasoning;
99
+ confidence = coverageResults.confidence;
100
+ break;
101
+ }
96
102
  default:
97
103
  // Check existing evidence
98
- const existingResults = await this.verifyExistingEvidence(claim.evidence);
99
- evidence = existingResults.evidence;
100
- verified = existingResults.verified;
101
- reasoning = existingResults.reasoning;
102
- confidence = existingResults.confidence;
104
+ {
105
+ const existingResults = await this.verifyExistingEvidence(claim.evidence);
106
+ evidence = existingResults.evidence;
107
+ verified = existingResults.verified;
108
+ reasoning = existingResults.reasoning;
109
+ confidence = existingResults.confidence;
110
+ }
103
111
  }
104
112
  const verificationTimeMs = Date.now() - startTime;
105
113
  return {
@@ -99,7 +99,7 @@ export class DevilsAdvocate {
99
99
  }
100
100
  // 4-5: Filter by confidence and severity
101
101
  const minSeverityIndex = SEVERITY_ORDER.indexOf(this.config.minSeverity);
102
- let filtered = allChallenges.filter(c => {
102
+ const filtered = allChallenges.filter(c => {
103
103
  if (c.confidence < this.config.minConfidence)
104
104
  return false;
105
105
  const severityIndex = SEVERITY_ORDER.indexOf(c.severity);
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.2");process.exit(0)}
3
- import{a as y}from"./chunks/chunk-FPAW77XV.js";import{a as f,c as A}from"./chunks/chunk-XPCNUX2U.js";import"./chunks/chunk-ORF2UKQH.js";A();import{Command as P}from"commander";import m from"chalk";function h(e,i,a,s){let l=e.command(i).description(a);if(s)for(let u of s)l.alias(u);return l.helpOption(!1),l.allowUnknownOption(!0),l.allowExcessArguments(!0),l}function w(e,i){let a=e.commands,s=a.indexOf(i);s>=0&&a.splice(s,1)}function o(e,i){let a=h(e,i.name,i.description,i.aliases);a.action(async()=>{try{let s=await i.factory();w(e,a),e.addCommand(s),await e.parseAsync(process.argv)}catch(s){console.error(`Failed to load command '${i.name}':`,s instanceof Error?s.message:s),process.exit(1)}})}function d(e,i,a,s,l,u){let g=h(e,i,a,u);g.action(async()=>{try{let p=await s();w(e,g),p.register(e,l),await e.parseAsync(process.argv)}catch(p){console.error(`Failed to load command '${i}':`,p instanceof Error?p.message:p),process.exit(1)}})}var S=["[UnifiedMemory]","[HybridBackend]","[UnifiedPersistence]","[PersistentSONAEngine]","[QueenGovernance]","[QueenCoordinator]","[Queen]","[QUEEN]","[DomainBreakerRegistry]","[RealEmbeddings]","[HNSWIndex]","[PatternStore]","[TestGenerationCoordinator]","[CodeIntelligence]","[ProductFactorsBridge]","[LearningOptimizationCoordinator]","[DreamEngine]","[DreamScheduler]","[SecurityCompliance]","[Providers]","[GNN]","[test-generation]","[test-execution]","[coverage-analysis]","[quality-assessment]","[defect-intelligence]","[requirements-validation]","[code-intelligence]","[security-compliance]","[contract-testing]","[visual-accessibility]","[chaos-resilience]","[learning-optimization]","[enterprise-integration]","[coordination]","[PatternLearnerService]","[RequirementsValidation]","[ParserRegistry]","[AdversarialDefense]","[ContinueGateIntegration]","[ContinueGate]","[SQLitePatternStore]","[TokenTracking]","[InfraHealing]","[ExperienceCapture]"],I=/^\[\d{2}:\d{2}:\d{2}\.\d{3}\]\s+\[/,b=console.log.bind(console);console.log=(...e)=>{let a=(typeof e[0]=="string"?e[0]:"").trimStart();if(S.some(s=>a.startsWith(s))||I.test(a)){process.stderr.write(e.map(String).join(" ")+`
2
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.4");process.exit(0)}
3
+ import{a as y}from"./chunks/chunk-UFKVKNAA.js";import{a as f,c as A}from"./chunks/chunk-2B6ETC7C.js";import"./chunks/chunk-SVILIQQQ.js";A();import{Command as P}from"commander";import m from"chalk";function h(e,i,a,s){let l=e.command(i).description(a);if(s)for(let u of s)l.alias(u);return l.helpOption(!1),l.allowUnknownOption(!0),l.allowExcessArguments(!0),l}function w(e,i){let a=e.commands,s=a.indexOf(i);s>=0&&a.splice(s,1)}function o(e,i){let a=h(e,i.name,i.description,i.aliases);a.action(async()=>{try{let s=await i.factory();w(e,a),e.addCommand(s),await e.parseAsync(process.argv)}catch(s){console.error(`Failed to load command '${i.name}':`,s instanceof Error?s.message:s),process.exit(1)}})}function d(e,i,a,s,l,u){let g=h(e,i,a,u);g.action(async()=>{try{let p=await s();w(e,g),p.register(e,l),await e.parseAsync(process.argv)}catch(p){console.error(`Failed to load command '${i}':`,p instanceof Error?p.message:p),process.exit(1)}})}var S=["[UnifiedMemory]","[HybridBackend]","[UnifiedPersistence]","[PersistentSONAEngine]","[QueenGovernance]","[QueenCoordinator]","[Queen]","[QUEEN]","[DomainBreakerRegistry]","[RealEmbeddings]","[HNSWIndex]","[PatternStore]","[TestGenerationCoordinator]","[CodeIntelligence]","[ProductFactorsBridge]","[LearningOptimizationCoordinator]","[DreamEngine]","[DreamScheduler]","[SecurityCompliance]","[Providers]","[GNN]","[test-generation]","[test-execution]","[coverage-analysis]","[quality-assessment]","[defect-intelligence]","[requirements-validation]","[code-intelligence]","[security-compliance]","[contract-testing]","[visual-accessibility]","[chaos-resilience]","[learning-optimization]","[enterprise-integration]","[coordination]","[PatternLearnerService]","[RequirementsValidation]","[ParserRegistry]","[AdversarialDefense]","[ContinueGateIntegration]","[ContinueGate]","[SQLitePatternStore]","[TokenTracking]","[InfraHealing]","[ExperienceCapture]"],I=/^\[\d{2}:\d{2}:\d{2}\.\d{3}\]\s+\[/,b=console.log.bind(console);console.log=(...e)=>{let a=(typeof e[0]=="string"?e[0]:"").trimStart();if(S.some(s=>a.startsWith(s))||I.test(a)){process.stderr.write(e.map(String).join(" ")+`
4
4
  `);return}b(...e)};console.info=(...e)=>{process.stderr.write(e.map(String).join(" ")+`
5
- `)};var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function C(e,i){let a=e.getDomainAPI("visual-accessibility");if(a?.registerWorkflowActions)try{a.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register visual-accessibility workflow actions: ${f(l)}`))}let s=e.getDomainAPI("requirements-validation");if(s?.registerWorkflowActions)try{s.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register requirements-validation workflow actions: ${f(l)}`))}}async function D(){let{QEKernelImpl:e}=await import("./chunks/kernel-GFZP4G5J.js"),{CrossDomainEventRouter:i}=await import("./chunks/cross-domain-router-4K5ZVZEZ.js"),{DefaultProtocolExecutor:a}=await import("./chunks/protocol-executor-V3F37FPO.js"),{WorkflowOrchestrator:s}=await import("./chunks/workflow-orchestrator-KKNR46XV.js"),{createQueenCoordinator:l}=await import("./chunks/queen-coordinator-XD4F7BGB.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-LXKGQYXA.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...y],enableExperienceBridge:!1}),await t.kernel.initialize(),t.router=new i(t.kernel.eventBus),await t.router.initialize();let g=E=>t.kernel.getDomainAPI(E),p=new a(t.kernel.eventBus,t.kernel.memory,g);t.workflowOrchestrator=new s(t.kernel.eventBus,t.kernel.memory,t.kernel.coordinator),await t.workflowOrchestrator.initialize(),C(t.kernel,t.workflowOrchestrator),t.persistentScheduler=u(),t.queen=l(t.kernel,t.router,p,void 0),await t.queen.initialize(),t.initialized=!0}async function k(){if(t.initialized&&t.kernel&&t.queen)return!0;let e=await import("fs"),a=(await import("path")).resolve(".agentic-qe");return e.existsSync(a)?c():(console.error(m.red(`
5
+ `)};var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function C(e,i){let a=e.getDomainAPI("visual-accessibility");if(a?.registerWorkflowActions)try{a.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register visual-accessibility workflow actions: ${f(l)}`))}let s=e.getDomainAPI("requirements-validation");if(s?.registerWorkflowActions)try{s.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register requirements-validation workflow actions: ${f(l)}`))}}async function D(){let{QEKernelImpl:e}=await import("./chunks/kernel-HSVY4ZYK.js"),{CrossDomainEventRouter:i}=await import("./chunks/cross-domain-router-I3GEA5G6.js"),{DefaultProtocolExecutor:a}=await import("./chunks/protocol-executor-KABPB6PQ.js"),{WorkflowOrchestrator:s}=await import("./chunks/workflow-orchestrator-7SKITNIJ.js"),{createQueenCoordinator:l}=await import("./chunks/queen-coordinator-SV3COGIL.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-ACWTN4LN.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...y],enableExperienceBridge:!1}),await t.kernel.initialize(),t.router=new i(t.kernel.eventBus),await t.router.initialize();let g=E=>t.kernel.getDomainAPI(E),p=new a(t.kernel.eventBus,t.kernel.memory,g);t.workflowOrchestrator=new s(t.kernel.eventBus,t.kernel.memory,t.kernel.coordinator),await t.workflowOrchestrator.initialize(),C(t.kernel,t.workflowOrchestrator),t.persistentScheduler=u(),t.queen=l(t.kernel,t.router,p,void 0),await t.queen.initialize(),t.initialized=!0}async function k(){if(t.initialized&&t.kernel&&t.queen)return!0;let e=await import("fs"),a=(await import("path")).resolve(".agentic-qe");return e.existsSync(a)?c():(console.error(m.red(`
6
6
  Error: AQE system not initialized in this directory.`)),console.log(m.yellow("Run `aqe init` first to set up this project.\n")),!1)}async function c(){if(t.initialized&&t.kernel&&t.queen)return!0;process.stderr.write(m.gray("Auto-initializing v3 system...")+`
7
7
  `);let e=3e4,i=new Promise((a,s)=>{setTimeout(()=>s(new Error("Initialization timeout after 30 seconds")),e)});try{return await Promise.race([D(),i]),process.stderr.write(m.green("System ready")+`
8
8
 
9
- `),!0}catch(a){return a.message.includes("timeout")?(console.error(m.red("Initialization timed out after 30 seconds.")),console.log(m.yellow("Try running `aqe init` manually."))):(console.error(m.red("Failed to auto-initialize:"),a),console.log(m.yellow("Try running `aqe init` manually."))),!1}}async function r(e=0){try{t.workflowOrchestrator&&t.workflowOrchestrator.dispose().catch(()=>{}),t.queen&&t.queen.dispose().catch(()=>{}),t.router&&t.router.dispose().catch(()=>{}),t.kernel&&t.kernel.dispose().catch(()=>{})}catch{}process.exit(e)}var n=new P,v="3.10.2";n.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(v);d(n,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-HNG6KJOU.js").then(e=>e.createInitHandler(r)),t);d(n,"status","Show system status",()=>import("./chunks/status-handler-AMEMKBI4.js").then(e=>e.createStatusHandler(r,k)),t);d(n,"health","Check system health",()=>import("./chunks/status-handler-AMEMKBI4.js").then(e=>e.createHealthHandler(r,k)),t);d(n,"task","Manage QE tasks",()=>import("./chunks/task-handler-J26FSCH5.js").then(e=>e.createTaskHandler(r,c)),t);d(n,"agent","Manage QE agents",()=>import("./chunks/agent-handler-FPQVHGGT.js").then(e=>e.createAgentHandler(r,c)),t);d(n,"domain","Domain operations",()=>import("./chunks/domain-handler-7PP7VYA7.js").then(e=>e.createDomainHandler(r,c)),t);d(n,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-ZOTI5PID.js").then(e=>e.createProtocolHandler(r,c)),t);d(n,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-ROZUHCOT.js").then(e=>e.createBrainHandler(r,c)),t);d(n,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-PK2BI46K.js").then(e=>e.createHypergraphHandler(r,c)),t,["hg"]);d(n,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-ZGKF2Z6T.js").then(e=>e.createHeartbeatHandler(r)),t);d(n,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-LZB4MN2K.js").then(e=>e.createRoutingHandler(r)),t);o(n,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-4YZ2RPWA.js").then(e=>e.createWorkflowCommand(t,r,c))});o(n,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-YXWSIOSB.js").then(e=>e.createTestCommand(t,r,c))});o(n,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-JTOXZE3T.js").then(e=>e.createCoverageCommand(t,r,c))});o(n,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-7MX4VL6M.js").then(e=>e.createQualityCommand(t,r,c))});o(n,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-HT4SUT24.js").then(e=>e.createSecurityCommand(t,r,c))});o(n,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-E4Q6DGOO.js").then(e=>e.createCodeCommand(t,r,c))});o(n,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-2F7TUFBD.js").then(e=>e.createCompletionsCommand(r))});o(n,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-EKJHIFWP.js").then(e=>e.createUpgradeCommand(r))});o(n,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-W7CYCHDI.js").then(e=>e.createFleetCommand(t,r,c,C))});o(n,{name:"validate",description:"Validation commands for skills and agents",factory:()=>import("./chunks/validate-swarm-SKKWRP2H.js").then(e=>e.createValidateSwarmCommand(t,r,c))});o(n,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-KS4T7LWC.js").then(e=>e.createValidateCommand(t,r,c))});o(n,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-466NFF2D.js").then(e=>e.createEvalCommand())});o(n,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-PYCRCL7G.js").then(e=>e.createCICommand(t,r,c))});o(n,{name:"token-usage",description:"View and analyze token consumption metrics (ADR-042)",factory:()=>import("./chunks/token-usage-2MJVE4DT.js").then(e=>e.createTokenUsageCommand())});o(n,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-6KTTONH4.js").then(e=>e.createLLMRouterCommand())});o(n,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-PCB23M4K.js").then(e=>e.createSyncCommands())});o(n,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-T4CBINAV.js").then(e=>e.createHooksCommand())});o(n,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-XQC2MG2R.js").then(e=>e.createLearningCommand())});o(n,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>import("./chunks/memory-WB5BNBK7.js").then(e=>e.createMemoryCommand(t,r,c))});o(n,{name:"mcp",description:"Start the MCP protocol server for Claude Code integration",factory:()=>import("./chunks/mcp-U5ZN77TA.js").then(e=>e.createMcpCommand())});o(n,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-EVMZAUNV.js").then(e=>e.createPlatformCommand())});o(n,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-DIMBYJ7V.js").then(e=>e.createProveCommand(t,r,c))});o(n,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-YE4ADBMC.js").then(e=>e.createRuVectorCommand())});o(n,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-ALRYPHGP.js").then(e=>e.createAuditCommand(t,r,c))});o(n,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-DZPGMRG7.js").then(e=>e.createPipelineCommand(t,r,c))});o(n,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-OR55K4HT.js").then(e=>e.createPluginCommand())});o(n,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-K4QFB5FQ.js").then(e=>e.createDaemonCommand())});process.on("SIGINT",async()=>{console.log(m.yellow(`
9
+ `),!0}catch(a){return a.message.includes("timeout")?(console.error(m.red("Initialization timed out after 30 seconds.")),console.log(m.yellow("Try running `aqe init` manually."))):(console.error(m.red("Failed to auto-initialize:"),a),console.log(m.yellow("Try running `aqe init` manually."))),!1}}async function r(e=0){try{t.workflowOrchestrator&&t.workflowOrchestrator.dispose().catch(()=>{}),t.queen&&t.queen.dispose().catch(()=>{}),t.router&&t.router.dispose().catch(()=>{}),t.kernel&&t.kernel.dispose().catch(()=>{})}catch{}process.exit(e)}var n=new P,v="3.10.4";n.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(v);d(n,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-MZEAJOZK.js").then(e=>e.createInitHandler(r)),t);d(n,"status","Show system status",()=>import("./chunks/status-handler-W723LXX5.js").then(e=>e.createStatusHandler(r,k)),t);d(n,"health","Check system health",()=>import("./chunks/status-handler-W723LXX5.js").then(e=>e.createHealthHandler(r,k)),t);d(n,"task","Manage QE tasks",()=>import("./chunks/task-handler-SENTEEXZ.js").then(e=>e.createTaskHandler(r,c)),t);d(n,"agent","Manage QE agents",()=>import("./chunks/agent-handler-2DZB7LGI.js").then(e=>e.createAgentHandler(r,c)),t);d(n,"domain","Domain operations",()=>import("./chunks/domain-handler-HITMDULH.js").then(e=>e.createDomainHandler(r,c)),t);d(n,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-Y2NMUKWQ.js").then(e=>e.createProtocolHandler(r,c)),t);d(n,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-LFHX2TYP.js").then(e=>e.createBrainHandler(r,c)),t);d(n,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-EUDGEF25.js").then(e=>e.createHypergraphHandler(r,c)),t,["hg"]);d(n,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-XOUVNPQK.js").then(e=>e.createHeartbeatHandler(r)),t);d(n,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-WSMUILGD.js").then(e=>e.createRoutingHandler(r)),t);o(n,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-V4ALYZ73.js").then(e=>e.createWorkflowCommand(t,r,c))});o(n,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-Q37C3WI2.js").then(e=>e.createTestCommand(t,r,c))});o(n,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-DFVSSQ4A.js").then(e=>e.createCoverageCommand(t,r,c))});o(n,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-AIFQMGUV.js").then(e=>e.createQualityCommand(t,r,c))});o(n,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-CYY6TECQ.js").then(e=>e.createSecurityCommand(t,r,c))});o(n,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-SP3HAQWG.js").then(e=>e.createCodeCommand(t,r,c))});o(n,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-GL5FTZAN.js").then(e=>e.createCompletionsCommand(r))});o(n,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-JKMEDURI.js").then(e=>e.createUpgradeCommand(r))});o(n,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-LE5SHVLK.js").then(e=>e.createFleetCommand(t,r,c,C))});o(n,{name:"validate",description:"Validation commands for skills and agents",factory:()=>import("./chunks/validate-swarm-VZVJ56Z5.js").then(e=>e.createValidateSwarmCommand(t,r,c))});o(n,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-URO7G6OE.js").then(e=>e.createValidateCommand(t,r,c))});o(n,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-NF5Y4W37.js").then(e=>e.createEvalCommand())});o(n,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-2BLMQNX3.js").then(e=>e.createCICommand(t,r,c))});o(n,{name:"token-usage",description:"View and analyze token consumption metrics (ADR-042)",factory:()=>import("./chunks/token-usage-JHNWTZ7L.js").then(e=>e.createTokenUsageCommand())});o(n,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-JHBNLYP3.js").then(e=>e.createLLMRouterCommand())});o(n,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-UA22CKUS.js").then(e=>e.createSyncCommands())});o(n,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-RUPQVIUM.js").then(e=>e.createHooksCommand())});o(n,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-4RAFMDSB.js").then(e=>e.createLearningCommand())});o(n,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>import("./chunks/memory-3DTJAURT.js").then(e=>e.createMemoryCommand(t,r,c))});o(n,{name:"mcp",description:"Start the MCP protocol server for Claude Code integration",factory:()=>import("./chunks/mcp-LCWMU4GZ.js").then(e=>e.createMcpCommand())});o(n,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-MRCFQF7X.js").then(e=>e.createPlatformCommand())});o(n,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-DZUNWBFD.js").then(e=>e.createProveCommand(t,r,c))});o(n,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-BCEIDTW3.js").then(e=>e.createRuVectorCommand())});o(n,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-42XG5JFB.js").then(e=>e.createAuditCommand(t,r,c))});o(n,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-N6THEWYE.js").then(e=>e.createPipelineCommand(t,r,c))});o(n,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-6YKUN5QM.js").then(e=>e.createPluginCommand())});o(n,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-2HD54QVO.js").then(e=>e.createDaemonCommand())});process.on("SIGINT",async()=>{console.log(m.yellow(`
10
10
 
11
11
  Shutting down...`)),console.log(m.green(`Shutdown complete
12
12
  `)),await r(0)});process.on("SIGTERM",async()=>{console.log(m.yellow(`
13
- Received SIGTERM, shutting down gracefully...`)),await r(0)});async function x(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-34OICNZA.js");e(process.argv)&&(console.log(v),process.exit(0));let{bootstrapTokenTracking:i}=await import("./chunks/token-bootstrap-KL2QIQ36.js");await i({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"}),await n.parseAsync(),await r(0)}x().catch(async e=>{console.error(m.red("Fatal error:"),e),await r(1)});
13
+ Received SIGTERM, shutting down gracefully...`)),await r(0)});async function x(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-W2Q53IR2.js");e(process.argv)&&(console.log(v),process.exit(0));let{bootstrapTokenTracking:i}=await import("./chunks/token-bootstrap-HQFFMZUF.js");await i({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"}),await n.parseAsync(),await r(0)}x().catch(async e=>{console.error(m.red("Fatal error:"),e),await r(1)});
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.4");process.exit(0)}
2
+ import{a,b,c}from"./chunk-ZM4QGYGK.js";import"./chunk-LYKSIOOT.js";import"./chunk-USB7GCIC.js";import"./chunk-IYFMDIYZ.js";import"./chunk-2B6ETC7C.js";import"./chunk-SVILIQQQ.js";export{a as AgentBoosterAdapter,b as createAgentBoosterAdapter,c as createAgentBoosterAdapterSync};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.2");process.exit(0)}
2
- import{a as x}from"./chunk-IAZEDWRX.js";import{c as f}from"./chunk-JF53LRBL.js";import"./chunk-ORF2UKQH.js";x();import{createRequire as w}from"module";var S=f.create("agent-booster-wasm"),t={JavaScript:0,TypeScript:1,Python:2,Rust:3,Go:4,Java:5,C:6,Cpp:7},l={ExactReplace:0,FuzzyReplace:1,InsertAfter:2,InsertBefore:3,Append:4},v={0:"JavaScript",1:"TypeScript",2:"Python",3:"Rust",4:"Go",5:"Java",6:"C",7:"Cpp"},a=null,u=null,p=null;async function g(){if(a)return!0;if(p)return!1;try{if(a=w(import.meta.url)("./agent_booster_wasm.js"),!a)throw new Error("WASM module loaded but is null");return u=new a.AgentBoosterWasm,!0}catch(e){return p=e,console.warn("[AgentBoosterWASM] Failed to load WASM module:",e),!1}}function A(e){return{".js":t.JavaScript,".mjs":t.JavaScript,".cjs":t.JavaScript,".jsx":t.JavaScript,".ts":t.TypeScript,".tsx":t.TypeScript,".mts":t.TypeScript,".cts":t.TypeScript,".py":t.Python,".rs":t.Rust,".go":t.Go,".java":t.Java,".c":t.C,".h":t.C,".cpp":t.Cpp,".cc":t.Cpp,".cxx":t.Cpp,".hpp":t.Cpp}[e.toLowerCase()]??t.JavaScript}var M=[{name:"var-to-const",detect:(e,r)=>e.includes("var ")&&r.includes("const "),apply:(e,r)=>e.replace(/\bvar\s+/g,"const ")},{name:"var-to-let",detect:(e,r)=>e.includes("var ")&&r.includes("let "),apply:(e,r)=>e.replace(/\bvar\s+/g,"let ")},{name:"add-types-function",detect:(e,r)=>e.includes("function")&&!e.includes(":")&&r.includes(":"),apply:(e,r)=>r},{name:"async-wrapper",detect:(e,r)=>!e.includes("async")&&r.includes("async")&&r.includes("await"),apply:(e,r)=>r},{name:"try-catch-wrapper",detect:(e,r)=>!e.includes("try {")&&r.includes("try {"),apply:(e,r)=>r},{name:"null-check",detect:(e,r)=>!e.includes("if (!")&&!e.includes("if (!")&&(r.includes("if (!")||r.includes("?.")),apply:(e,r)=>r},{name:"test-assertion",detect:(e,r)=>e.includes("test(")&&!e.includes("expect(")&&r.includes("expect("),apply:(e,r)=>r}];function y(e,r){for(let n of M)if(n.detect(e,r))try{return{success:!0,code:n.apply(e,r),pattern:n.name}}catch(s){S.debug("Pattern transform failed, trying next",{pattern:n.name,error:s instanceof Error?s.message:String(s)});continue}return{success:!1,code:r}}async function b(e,r,n,s={}){let o=performance.now(),{confidenceThreshold:T=.5,allowFallback:d=!0}=s;if(!e.trim())return{success:!0,mergedCode:r,confidence:1,strategy:l.Append,syntaxValid:!0,source:"fallback",latencyMs:performance.now()-o};if(await g()&&u&&a)try{let c=a.WasmLanguage[v[n]],i=u.apply_edit(e,r,c);return{success:!0,mergedCode:i.merged_code,confidence:i.confidence,strategy:i.strategy,syntaxValid:i.syntax_valid,source:"wasm",latencyMs:performance.now()-o}}catch(c){let i=c;if(d){let m=y(e,r);if(m.success)return{success:!0,mergedCode:m.code,confidence:.7,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:i.message}}if(d){let c=y(e,r);return{success:c.success,mergedCode:c.code,confidence:c.success?.7:0,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:p?.message??"WASM not available"}}async function W(e,r={}){return Promise.all(e.map(({original:n,edit:s,language:o})=>b(n,s,o,r)))}async function C(){return g()}async function L(){return await g()&&a?a.AgentBoosterWasm.version():"unavailable"}async function R(){if(await g(),u&&a)try{u.apply_edit("function x() {}","function x() {}",a.WasmLanguage.JavaScript)}catch(e){console.debug("[AgentBoosterWASM] Warmup error:",e instanceof Error?e.message:e)}}var _={transform:b,batchTransform:W,isWasmAvailable:C,getVersion:L,warmup:R,Language:t,MergeStrategy:l,languageFromExtension:A};export{t as Language,l as MergeStrategy,W as batchTransform,_ as default,L as getVersion,C as isWasmAvailable,A as languageFromExtension,b as transform,R as warmup};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.4");process.exit(0)}
2
+ import{a as x}from"./chunk-HPYGMKZF.js";import{c as f}from"./chunk-VRE2EBFI.js";import"./chunk-SVILIQQQ.js";x();import{createRequire as w}from"module";var S=f.create("agent-booster-wasm"),t={JavaScript:0,TypeScript:1,Python:2,Rust:3,Go:4,Java:5,C:6,Cpp:7},l={ExactReplace:0,FuzzyReplace:1,InsertAfter:2,InsertBefore:3,Append:4},v={0:"JavaScript",1:"TypeScript",2:"Python",3:"Rust",4:"Go",5:"Java",6:"C",7:"Cpp"},a=null,u=null,p=null;async function g(){if(a)return!0;if(p)return!1;try{if(a=w(import.meta.url)("./agent_booster_wasm.js"),!a)throw new Error("WASM module loaded but is null");return u=new a.AgentBoosterWasm,!0}catch(e){return p=e,console.warn("[AgentBoosterWASM] Failed to load WASM module:",e),!1}}function A(e){return{".js":t.JavaScript,".mjs":t.JavaScript,".cjs":t.JavaScript,".jsx":t.JavaScript,".ts":t.TypeScript,".tsx":t.TypeScript,".mts":t.TypeScript,".cts":t.TypeScript,".py":t.Python,".rs":t.Rust,".go":t.Go,".java":t.Java,".c":t.C,".h":t.C,".cpp":t.Cpp,".cc":t.Cpp,".cxx":t.Cpp,".hpp":t.Cpp}[e.toLowerCase()]??t.JavaScript}var M=[{name:"var-to-const",detect:(e,r)=>e.includes("var ")&&r.includes("const "),apply:(e,r)=>e.replace(/\bvar\s+/g,"const ")},{name:"var-to-let",detect:(e,r)=>e.includes("var ")&&r.includes("let "),apply:(e,r)=>e.replace(/\bvar\s+/g,"let ")},{name:"add-types-function",detect:(e,r)=>e.includes("function")&&!e.includes(":")&&r.includes(":"),apply:(e,r)=>r},{name:"async-wrapper",detect:(e,r)=>!e.includes("async")&&r.includes("async")&&r.includes("await"),apply:(e,r)=>r},{name:"try-catch-wrapper",detect:(e,r)=>!e.includes("try {")&&r.includes("try {"),apply:(e,r)=>r},{name:"null-check",detect:(e,r)=>!e.includes("if (!")&&!e.includes("if (!")&&(r.includes("if (!")||r.includes("?.")),apply:(e,r)=>r},{name:"test-assertion",detect:(e,r)=>e.includes("test(")&&!e.includes("expect(")&&r.includes("expect("),apply:(e,r)=>r}];function y(e,r){for(let n of M)if(n.detect(e,r))try{return{success:!0,code:n.apply(e,r),pattern:n.name}}catch(s){S.debug("Pattern transform failed, trying next",{pattern:n.name,error:s instanceof Error?s.message:String(s)});continue}return{success:!1,code:r}}async function b(e,r,n,s={}){let o=performance.now(),{confidenceThreshold:T=.5,allowFallback:d=!0}=s;if(!e.trim())return{success:!0,mergedCode:r,confidence:1,strategy:l.Append,syntaxValid:!0,source:"fallback",latencyMs:performance.now()-o};if(await g()&&u&&a)try{let c=a.WasmLanguage[v[n]],i=u.apply_edit(e,r,c);return{success:!0,mergedCode:i.merged_code,confidence:i.confidence,strategy:i.strategy,syntaxValid:i.syntax_valid,source:"wasm",latencyMs:performance.now()-o}}catch(c){let i=c;if(d){let m=y(e,r);if(m.success)return{success:!0,mergedCode:m.code,confidence:.7,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:i.message}}if(d){let c=y(e,r);return{success:c.success,mergedCode:c.code,confidence:c.success?.7:0,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:p?.message??"WASM not available"}}async function W(e,r={}){return Promise.all(e.map(({original:n,edit:s,language:o})=>b(n,s,o,r)))}async function C(){return g()}async function L(){return await g()&&a?a.AgentBoosterWasm.version():"unavailable"}async function R(){if(await g(),u&&a)try{u.apply_edit("function x() {}","function x() {}",a.WasmLanguage.JavaScript)}catch(e){console.debug("[AgentBoosterWASM] Warmup error:",e instanceof Error?e.message:e)}}var _={transform:b,batchTransform:W,isWasmAvailable:C,getVersion:L,warmup:R,Language:t,MergeStrategy:l,languageFromExtension:A};export{t as Language,l as MergeStrategy,W as batchTransform,_ as default,L as getVersion,C as isWasmAvailable,A as languageFromExtension,b as transform,R as warmup};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.2");process.exit(0)}
2
- import{b as p}from"./chunk-FO43SQXP.js";import{a as g}from"./chunk-MYWQTCS4.js";import"./chunk-SW4OKUTC.js";import"./chunk-ORF2UKQH.js";import s from"chalk";var l=class{name="agent";description="Manage QE agents";cleanupAndExit;ensureInitialized;constructor(n,t){this.cleanupAndExit=n,this.ensureInitialized=t}register(n,t){let a=n.command("agent").description(this.description);a.command("list").description("List all agents").option("-d, --domain <domain>","Filter by domain").option("-s, --status <status>","Filter by status").action(async e=>{await this.executeList(e,t)}),a.command("spawn <domain>").description("Spawn an agent in a domain").option("-t, --type <type>","Agent type","worker").option("-c, --capabilities <caps>","Comma-separated capabilities","general").option("--no-progress","Disable progress indicator").action(async(e,o)=>{await this.executeSpawn(e,o,t)})}async executeList(n,t){if(await this.ensureInitialized())try{let a=n.domain?t.queen.getAgentsByDomain(n.domain):t.queen.listAllAgents();if(n.status&&(a=a.filter(e=>e.status===n.status)),console.log(s.blue(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.4");process.exit(0)}
2
+ import{b as p}from"./chunk-SJC7OKF3.js";import{a as g}from"./chunk-KJ56OXH4.js";import"./chunk-IYFMDIYZ.js";import"./chunk-SVILIQQQ.js";import s from"chalk";var l=class{name="agent";description="Manage QE agents";cleanupAndExit;ensureInitialized;constructor(n,t){this.cleanupAndExit=n,this.ensureInitialized=t}register(n,t){let a=n.command("agent").description(this.description);a.command("list").description("List all agents").option("-d, --domain <domain>","Filter by domain").option("-s, --status <status>","Filter by status").action(async e=>{await this.executeList(e,t)}),a.command("spawn <domain>").description("Spawn an agent in a domain").option("-t, --type <type>","Agent type","worker").option("-c, --capabilities <caps>","Comma-separated capabilities","general").option("--no-progress","Disable progress indicator").action(async(e,o)=>{await this.executeSpawn(e,o,t)})}async executeList(n,t){if(await this.ensureInitialized())try{let a=n.domain?t.queen.getAgentsByDomain(n.domain):t.queen.listAllAgents();if(n.status&&(a=a.filter(e=>e.status===n.status)),console.log(s.blue(`
3
3
  Agents (${a.length})
4
4
  `)),a.length===0)console.log(s.gray(" No agents found"));else{let e=new Map;for(let i of a)e.has(i.domain)||e.set(i.domain,[]),e.get(i.domain).push(i);let o=Array.from(e.entries());for(let[i,m]of o){console.log(s.cyan(` ${i}:`));for(let r of m)console.log(` ${r.id}`),console.log(` Type: ${r.type}`),console.log(` Status: ${g(r.status)}`),r.startedAt&&console.log(s.gray(` Started: ${r.startedAt.toISOString()}`));console.log("")}}}catch(a){console.error(s.red(`
5
5
  Failed to list agents:`),a),await this.cleanupAndExit(1)}}async executeSpawn(n,t,a){if(await this.ensureInitialized())try{let e=t.capabilities.split(",");console.log(s.blue(`
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.2");process.exit(0)}
2
- import"./chunk-ORF2UKQH.js";import{existsSync as i,mkdirSync as d,unlinkSync as s,readdirSync as p,statSync as f}from"fs";import{join as o,basename as l}from"path";var v={branchDir:".agentic-qe/branches",defaultStrategy:"child-wins",orphanMaxAgeMs:36e5},g=class{config;parentAdapter;activeBranches=new Map;witnessChain=null;constructor(t,e){this.parentAdapter=t,this.config={...v,...e}}setWitnessChain(t){this.witnessChain=t}createBranch(t){if(this.activeBranches.has(t))throw new Error(`Branch already exists for agent ${t}`);i(this.config.branchDir)||d(this.config.branchDir,{recursive:!0});let e=o(this.config.branchDir,`${t}.rvf`),r=this.parentAdapter.path(),n=this.parentAdapter.derive(e),a={agentId:t,childPath:e,parentPath:r,childAdapter:n,createdAt:Date.now(),ingestLog:[]};return this.activeBranches.set(t,a),a}recordIngest(t,e){let r=this.activeBranches.get(t);if(r)for(let n of e)r.ingestLog.push({id:n.id,vector:n.vector})}async mergeBranch(t,e){let r=e??this.config.defaultStrategy,n=performance.now(),a=0;if(r==="child-wins"&&t.ingestLog.length>0)try{a=this.parentAdapter.ingest(t.ingestLog).accepted}catch(c){console.warn(`[AgentMemoryBranch] Merge replay failed for ${t.agentId}:`,c)}return this.witnessChain?.append("BRANCH_MERGE",{agentId:t.agentId,strategy:r,vectorsMerged:a,branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId),{vectorsMerged:a,strategy:r,durationMs:performance.now()-n}}discardBranch(t){this.witnessChain?.append("BRANCH_DISCARD",{agentId:t.agentId,action:"discard",branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId)}getBranch(t){return this.activeBranches.get(t)}getActiveBranches(){return Array.from(this.activeBranches.values())}listBranchFiles(){return i(this.config.branchDir)?p(this.config.branchDir).filter(e=>e.endsWith(".rvf")).map(e=>{let r=o(this.config.branchDir,e),n=f(r);return{agentId:l(e,".rvf"),path:r,sizeBytes:n.size,modifiedAt:n.mtime}}):[]}cleanupOrphans(t){let e=t??this.config.orphanMaxAgeMs,r=Date.now(),n=0;for(let a of this.listBranchFiles())if(r-a.modifiedAt.getTime()>e&&!this.activeBranches.has(a.agentId))try{s(a.path);let h=`${a.path}.idmap.json`;i(h)&&s(h),n++}catch{}return n}cleanupBranchFile(t){try{t.childAdapter.close()}catch{}try{i(t.childPath)&&s(t.childPath);let e=`${t.childPath}.idmap.json`;i(e)&&s(e)}catch{}}};export{g as AgentMemoryBranch};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.4");process.exit(0)}
2
+ import"./chunk-SVILIQQQ.js";import{existsSync as i,mkdirSync as d,unlinkSync as s,readdirSync as p,statSync as f}from"fs";import{join as o,basename as l}from"path";var v={branchDir:".agentic-qe/branches",defaultStrategy:"child-wins",orphanMaxAgeMs:36e5},g=class{config;parentAdapter;activeBranches=new Map;witnessChain=null;constructor(t,e){this.parentAdapter=t,this.config={...v,...e}}setWitnessChain(t){this.witnessChain=t}createBranch(t){if(this.activeBranches.has(t))throw new Error(`Branch already exists for agent ${t}`);i(this.config.branchDir)||d(this.config.branchDir,{recursive:!0});let e=o(this.config.branchDir,`${t}.rvf`),r=this.parentAdapter.path(),n=this.parentAdapter.derive(e),a={agentId:t,childPath:e,parentPath:r,childAdapter:n,createdAt:Date.now(),ingestLog:[]};return this.activeBranches.set(t,a),a}recordIngest(t,e){let r=this.activeBranches.get(t);if(r)for(let n of e)r.ingestLog.push({id:n.id,vector:n.vector})}async mergeBranch(t,e){let r=e??this.config.defaultStrategy,n=performance.now(),a=0;if(r==="child-wins"&&t.ingestLog.length>0)try{a=this.parentAdapter.ingest(t.ingestLog).accepted}catch(c){console.warn(`[AgentMemoryBranch] Merge replay failed for ${t.agentId}:`,c)}return this.witnessChain?.append("BRANCH_MERGE",{agentId:t.agentId,strategy:r,vectorsMerged:a,branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId),{vectorsMerged:a,strategy:r,durationMs:performance.now()-n}}discardBranch(t){this.witnessChain?.append("BRANCH_DISCARD",{agentId:t.agentId,action:"discard",branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId)}getBranch(t){return this.activeBranches.get(t)}getActiveBranches(){return Array.from(this.activeBranches.values())}listBranchFiles(){return i(this.config.branchDir)?p(this.config.branchDir).filter(e=>e.endsWith(".rvf")).map(e=>{let r=o(this.config.branchDir,e),n=f(r);return{agentId:l(e,".rvf"),path:r,sizeBytes:n.size,modifiedAt:n.mtime}}):[]}cleanupOrphans(t){let e=t??this.config.orphanMaxAgeMs,r=Date.now(),n=0;for(let a of this.listBranchFiles())if(r-a.modifiedAt.getTime()>e&&!this.activeBranches.has(a.agentId))try{s(a.path);let h=`${a.path}.idmap.json`;i(h)&&s(h),n++}catch{}return n}cleanupBranchFile(t){try{t.childAdapter.close()}catch{}try{i(t.childPath)&&s(t.childPath);let e=`${t.childPath}.idmap.json`;i(e)&&s(e)}catch{}}};export{g as AgentMemoryBranch};
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.4");process.exit(0)}
2
+ import{a,b,c,d,e,f}from"./chunk-2TYO4VZH.js";import"./chunk-5Q3L4QEE.js";import"./chunk-AMW27FSS.js";import"./chunk-GLMDRGJD.js";import"./chunk-OKKTDHHF.js";import"./chunk-SC6UFGJ6.js";import"./chunk-VDKMBOUK.js";import"./chunk-KGPAWNNR.js";import"./chunk-OIFJH7TF.js";import"./chunk-MQIAN57O.js";import"./chunk-YSLE6NNG.js";import"./chunk-XBFEHVBO.js";import"./chunk-TCV5DASI.js";import"./chunk-5T2HDET6.js";import"./chunk-NZGLDOU4.js";import"./chunk-K72J52JO.js";import"./chunk-U27GVYXA.js";import"./chunk-IYFMDIYZ.js";import"./chunk-KWZEBHAP.js";import"./chunk-HPYGMKZF.js";import"./chunk-VRE2EBFI.js";import"./chunk-UFKVKNAA.js";import"./chunk-2B6ETC7C.js";import"./chunk-PISW5HUX.js";import"./chunk-RJKYPWFD.js";import"./chunk-2G2PVVQG.js";import"./chunk-UWAUYDW4.js";import"./chunk-N3MM4Z33.js";import"./chunk-6OLHPWSN.js";import"./chunk-WI5WXYIS.js";import"./chunk-EMZ3DXMG.js";import"./chunk-MFWWPRBV.js";import"./chunk-D7IWGQTW.js";import"./chunk-SVILIQQQ.js";export{b as AQELearningEngine,a as DEFAULT_ENGINE_CONFIG,c as DEFAULT_META_LEARNING_CONFIG,d as MetaLearningEngine,e as createAQELearningEngine,f as createDefaultLearningEngine};
@@ -0,0 +1,3 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.4");process.exit(0)}
2
+ import{d as c,e as u,f as h,g as m}from"./chunk-UW3ZSFFB.js";import{m as p}from"./chunk-NZGLDOU4.js";import"./chunk-K72J52JO.js";import{b as s}from"./chunk-U27GVYXA.js";import"./chunk-IYFMDIYZ.js";import"./chunk-HPYGMKZF.js";import"./chunk-VRE2EBFI.js";import"./chunk-2B6ETC7C.js";import"./chunk-RJKYPWFD.js";import{p as l,q as d}from"./chunk-2G2PVVQG.js";import"./chunk-UWAUYDW4.js";import"./chunk-N3MM4Z33.js";import"./chunk-6OLHPWSN.js";import"./chunk-WI5WXYIS.js";import"./chunk-EMZ3DXMG.js";import"./chunk-MFWWPRBV.js";import"./chunk-D7IWGQTW.js";import{g as f}from"./chunk-SVILIQQQ.js";import{Command as g}from"commander";import a from"chalk";p();import{existsSync as y}from"node:fs";import b from"node:path";function C(n,i){let t=[];t.push(a.bold("Witness Chain Audit Verification")),t.push("");let e=i?a.green("ENABLED"):a.yellow("DISABLED");t.push(` Feature Flag: ${e}`),t.push(` Chain Length: ${n.length} receipts`);let r=n.valid?a.green("VALID"):a.red("BROKEN");return t.push(` Integrity: ${r}`),n.length>0&&t.push(` Last Hash: ${n.lastHash.slice(0,16)}...`),!n.valid&&n.brokenAt>=0&&(t.push(""),t.push(a.red(` Break detected at index ${n.brokenAt}`)),t.push(a.red(` ${n.message}`))),t.push(""),t.join(`
3
+ `)}function x(){try{let n=s(),i=b.join(n,".agentic-qe","memory.db");if(!y(i))return null;let t=(d(),f(l)),e=new t(i),r=c(e),o=h(r);return e.close(),o}catch{return null}}async function A(n){let i=m(),e=(x()??u()).verifyChain(),r={featureEnabled:i,chainLength:e.length,integrity:e.valid,brokenAt:e.brokenAt,lastHash:e.lastHash,message:e.message};return n.format==="json"?console.log(JSON.stringify(r,null,2)):console.log(C(e,i)),r}function v(n,i,t){let e=new g("audit").description("Witness chain audit trail management");return e.command("verify").description("Verify witness chain integrity").option("-F, --format <format>","Output format (json|text)","text").action(async r=>{try{await A({format:r.format}),await i(0)}catch(o){console.error("Failed to verify witness chain:",o),await i(1)}}),e}export{v as createAuditCommand,C as formatVerificationText,A as handleAuditVerify};
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.4");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h,i,j}from"./chunk-F77X5DAF.js";import"./chunk-TBJ566KV.js";import"./chunk-NZGLDOU4.js";import"./chunk-K72J52JO.js";import"./chunk-U27GVYXA.js";import"./chunk-IYFMDIYZ.js";import"./chunk-HPYGMKZF.js";import"./chunk-VRE2EBFI.js";import"./chunk-2B6ETC7C.js";import"./chunk-PISW5HUX.js";import"./chunk-RJKYPWFD.js";import"./chunk-2G2PVVQG.js";import"./chunk-UWAUYDW4.js";import"./chunk-N3MM4Z33.js";import"./chunk-6OLHPWSN.js";import"./chunk-WI5WXYIS.js";import"./chunk-EMZ3DXMG.js";import"./chunk-MFWWPRBV.js";import"./chunk-D7IWGQTW.js";import"./chunk-SVILIQQQ.js";export{j as MCPToolBase,i as defaultToolLogger,h as getLLMRouter,d as getMemoryBackend,f as getSharedLLMRouter,b as getSharedMemoryBackend,a as registerRvfResetFn,g as resetSharedLLMRouter,c as resetSharedMemoryBackend,e as setSharedLLMRouter};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.2");process.exit(0)}
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q as p}from"./chunk-BQCSCAUC.js";import"./chunk-ORF2UKQH.js";p();export{i as DotProductAttention,h as FlashAttention,k as HyperbolicAttention,l as LinearAttention,m as MoEAttention,j as MultiHeadAttention,b as RuvectorLayer,n as SonaEngine,c as TensorCompress,a as default,d as differentiableSearch,f as getCompressionLevel,e as hierarchicalForward,g as init,o as pipeline};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.4");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q as p}from"./chunk-2G2PVVQG.js";import"./chunk-SVILIQQQ.js";p();export{i as DotProductAttention,h as FlashAttention,k as HyperbolicAttention,l as LinearAttention,m as MoEAttention,j as MultiHeadAttention,b as RuvectorLayer,n as SonaEngine,c as TensorCompress,a as default,d as differentiableSearch,f as getCompressionLevel,e as hierarchicalForward,g as init,o as pipeline};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.2");process.exit(0)}
2
- import{a as A,b as L,c as F,d as R,e as Y,f as T,g as P,h as C,i as j,j as X,k as V,l as ge,m as $,n as Z,o as ye,p as _,q as J,r as U,s as W}from"./chunk-7IVQ6OVR.js";import{h as pe}from"./chunk-VSUTI4G6.js";import"./chunk-L7VIX22Y.js";import"./chunk-5QHSLWLP.js";import{b as x,d as Q}from"./chunk-SW4OKUTC.js";import{a as fe,b as me,c as ue,d as k,f as We}from"./chunk-CV2SBMBW.js";import"./chunk-IAZEDWRX.js";import"./chunk-JF53LRBL.js";import"./chunk-XPCNUX2U.js";import{a as O,b as Ue}from"./chunk-MCZHKXB4.js";import"./chunk-YI6GNRQM.js";import"./chunk-OXCEUR5F.js";import"./chunk-DRWGK3YO.js";import"./chunk-HHCYSAH3.js";import"./chunk-WNR2KAUH.js";import"./chunk-WDMPJ2M2.js";import"./chunk-IICTTDAA.js";import"./chunk-ON4D4TJ4.js";import"./chunk-ORF2UKQH.js";import B from"path";import o from"chalk";Ue();Q();import{existsSync as z,mkdirSync as ze,writeFileSync as He,readFileSync as ee}from"fs";import{join as E,resolve as ne}from"path";var Ke={rl_q_values:"includeQValues",dream_insights:"includeDreamInsights",dream_cycles:"includeDreamInsights",witness_chain:"includeWitnessChain",vectors:"includeVectors"};function Ge(e,n){let r=Ke[e.tableName];return!(r&&n[r]===!1)}var Qe=1e4;function Ye(e,n,r,t){if(!Ge(n,r))return Z(E(t,n.fileName),[]),{count:0,rows:[]};let[a,s]=n.domainColumn?$(r.domains,n.domainColumn):[void 0,[]];if(X(e,n.tableName,a,s)>=Qe){let d=n.blobColumns,c=d&&d.length>0?p=>T(p,d):void 0;return{count:ye(E(t,n.fileName),ge(e,n.tableName,a,s),c)}}let i=V(e,n.tableName,a,s);return n.blobColumns&&n.blobColumns.length>0&&(i=i.map(d=>T(d,n.blobColumns))),Z(E(t,n.fileName),i),{count:i.length,rows:i}}function be(e){let n=[];for(let r of R){let t=E(e,r.fileName);z(t)?n.push(C(ee(t,"utf-8"))):n.push(C(""))}return C(n.join(":"))}function he(e,n,r="memory.db"){let t=ne(n.outputPath);z(t)||ze(t,{recursive:!0});let a=0,s={},l=new Set;for(let u of R){let p=Ye(e,u,n,t);if(s[u.tableName]=p.count,a+=p.count,u.tableName==="qe_patterns"){if(p.rows)for(let f of p.rows)f.qe_domain&&l.add(f.qe_domain);else if(p.count>0){let[f,w]=u.domainColumn?$(n.domains,u.domainColumn):[void 0,[]],y=`SELECT DISTINCT qe_domain FROM qe_patterns ${f?`WHERE ${f} AND qe_domain IS NOT NULL`:"WHERE qe_domain IS NOT NULL"}`;try{let g=e.prepare(y).all(...w||[]);for(let v of g)l.add(v.qe_domain)}catch{}}}}let i=n.includeVectors!==!1?X(e,"vectors"):0,d=be(t),c={version:"3.0",exportedAt:new Date().toISOString(),sourceDb:r,stats:{patternCount:s.qe_patterns||0,vectorCount:i,qValueCount:s.rl_q_values||0,dreamInsightCount:s.dream_insights||0,witnessChainLength:s.witness_chain||0,totalRecords:a},domains:[...l].sort(),checksum:d,tableRecordCounts:s};return He(E(t,"manifest.json"),JSON.stringify(c,null,2),"utf-8"),c}var Xe=new Set(["qe_patterns","rl_q_values","dream_insights","witness_chain"]);function Ze(e){return e==="1.0"?R.filter(n=>Xe.has(n.tableName)):e==="3.0"?R:(console.warn(`[brain-import] Unknown manifest version '${e}'. Attempting full import \u2014 some files may be missing.`),R)}function we(e,n,r){let t=ne(n),a=E(t,"manifest.json");if(!z(a))throw new Error(`Manifest not found at ${a}`);let s=x(ee(a,"utf-8")),l=be(t);if(l!==s.checksum)throw new Error(`Checksum mismatch: expected ${s.checksum}, got ${l}. The export may have been tampered with or corrupted.`);let i=Ze(s.version);if(r.dryRun){let f=0;for(let w of i){let m=_(E(t,w.fileName),x);f+=m.length}return{imported:f,skipped:0,conflicts:0}}W(e);let d=0,c=0,u=0;return e.transaction(()=>{for(let f of i){let w=E(t,f.fileName),m=_(w,x);f.blobColumns&&f.blobColumns.length>0&&(m=m.map(y=>P(y,f.blobColumns)));for(let y of m){let g;if(f.dedupColumns&&f.dedupColumns.length>0)g=U(e,f.tableName,y,f.dedupColumns);else{let v=A[f.tableName]||"id",b=F[f.tableName],I=L[f.tableName];g=J(e,f.tableName,y,v,r.mergeStrategy,b,I)}d+=g.imported,c+=g.skipped,u+=g.conflicts}}})(),{imported:d,skipped:c,conflicts:u}}function ve(e){let n=ne(e),r=E(n,"manifest.json");if(!z(r))throw new Error(`Manifest not found at ${r}`);return x(ee(r,"utf-8"))}We();import{existsSync as H,statSync as en,unlinkSync as Re,writeFileSync as nn}from"fs";import{resolve as te}from"path";function Se(e,n,r="memory.db"){if(!k())throw new Error("@ruvector/rvf-node is not available. Install it or use --format jsonl instead.");let t=te(n.outputPath),a=n.dimension??384;H(t)&&Re(t);let s=`${t}.idmap.json`;H(s)&&Re(s);let l=fe(t,a);try{let i={},d=new Set,c=0;for(let S of R){let[h,ce]=S.domainColumn?$(n.domains,S.domainColumn):[void 0,[]],D=V(e,S.tableName,h,ce);if(S.tableName==="qe_patterns")for(let q of D)q.qe_domain&&d.add(q.qe_domain);let G=Y[S.tableName];G&&G.length>0&&(D=D.map(q=>T(q,G))),i[S.tableName]=D,c+=D.length}let u=0,p=[];if(j(e,"qe_pattern_embeddings")){let S=e.prepare("SELECT pattern_id, embedding, dimension FROM qe_pattern_embeddings").all();for(let h of S)h.embedding&&h.dimension===a&&p.push({id:`pe:${h.pattern_id}`,vector:new Float32Array(h.embedding.buffer,h.embedding.byteOffset,a),metadata:{tableName:"qe_pattern_embeddings"}})}if(j(e,"captured_experiences")){let S=e.prepare("SELECT id, embedding, embedding_dimension, domain, quality FROM captured_experiences WHERE embedding IS NOT NULL").all();for(let h of S)h.embedding_dimension===a&&p.push({id:`exp:${h.id}`,vector:new Float32Array(h.embedding.buffer,h.embedding.byteOffset,a),metadata:{tableName:"captured_experiences",domain:h.domain,confidence:h.quality}})}if(j(e,"sona_patterns")){let S=e.prepare("SELECT id, state_embedding, domain, confidence FROM sona_patterns WHERE state_embedding IS NOT NULL").all();for(let h of S)h.state_embedding.byteLength/4===a&&p.push({id:`sona:${h.id}`,vector:new Float32Array(h.state_embedding.buffer,h.state_embedding.byteOffset,a),metadata:{tableName:"sona_patterns",domain:h.domain,confidence:h.confidence}})}p.length>0&&(u=l.ingest(p).accepted);let f={version:"3.0",format:"rvf",exportedAt:new Date().toISOString(),sourceDb:r,domains:[...d].sort(),tables:i},w=JSON.stringify(f),m=C(w),y=Buffer.from(w);l.embedKernel(y);let g=n.sign?l.sign(y)??void 0:void 0,v=g?n.signerKeyId??"default":void 0,b=l.fileId(),I=b?{fileId:b,parentId:l.parentId(),lineageDepth:l.lineageDepth()}:void 0,N=l.status(),M={version:"3.0",format:"rvf",exportedAt:f.exportedAt,sourceDb:r,stats:{patternCount:(i.qe_patterns||[]).length,embeddingCount:u,qValueCount:(i.rl_q_values||[]).length,dreamInsightCount:(i.dream_insights||[]).length,witnessChainLength:(i.witness_chain||[]).length,totalRecords:c},domains:f.domains,checksum:m,rvfStatus:{totalVectors:N.totalVectors,totalSegments:N.totalSegments,fileSizeBytes:N.fileSizeBytes},...g?{signature:g,signerKeyId:v}:{},...I?{lineage:I}:{}};if(g)try{l.freeze()}catch{}let Je=`${t}.manifest.json`;return nn(Je,JSON.stringify(M,null,2),"utf-8"),M}finally{l.close()}}var tn={patterns:"qe_patterns",qValues:"rl_q_values",dreamInsights:"dream_insights",witnessChain:"witness_chain"};function xe(e,n,r){if(!k())throw new Error("@ruvector/rvf-node is not available. Install it or use JSONL format.");let t=te(n);if(!H(t))throw new Error(`RVF file not found: ${t}`);let a=me(t);try{let s=a.verifyWitness();if(!s.valid&&(s.totalEntries>0||s.errors.length>0)){let m=s.errors.length>0?s.errors.join("; "):"unknown integrity error";throw new Error(`RVF witness verification failed: ${m}`)}let l=a.extractKernel();if(!l||!l.image)throw new Error("No brain data found in RVF file (missing kernel segment)");let i;try{i=JSON.parse(l.image.toString("utf-8"))}catch(m){throw new Error(`Failed to parse brain kernel data as JSON: ${m instanceof Error?m.message:m}`)}if(r.dryRun){let m=0;if(i.tables)for(let y of Object.values(i.tables))m+=y?.length??0;else m=(i.patterns?.length??0)+(i.qValues?.length??0)+(i.dreamInsights?.length??0)+(i.witnessChain?.length??0);return{imported:m,skipped:0,conflicts:0,embeddingsRestored:0}}W(e);let d=0,c=0,u=0,p=0,f={};if(i.tables)Object.assign(f,i.tables);else for(let[m,y]of Object.entries(tn)){let g=i[m];Array.isArray(g)&&(f[y]=g)}if(e.transaction(()=>{for(let m of R){let y=f[m.tableName];if(!y||!Array.isArray(y))continue;let g=Y[m.tableName];if(g&&g.length>0){y=y.map(v=>P(v,g));for(let v of y)for(let b of g)v[b]instanceof Buffer&&p++}for(let v of y){let b;if(m.dedupColumns&&m.dedupColumns.length>0)b=U(e,m.tableName,v,m.dedupColumns);else{let I=A[m.tableName]||"id",N=F[m.tableName],M=L[m.tableName];b=J(e,m.tableName,v,I,r.mergeStrategy,N,M)}d+=b.imported,c+=b.skipped,u+=b.conflicts}}})(),u>0)try{a.compact()}catch{}return{imported:d,skipped:c,conflicts:u,embeddingsRestored:p}}finally{a.close()}}function K(e){if(!k())throw new Error("@ruvector/rvf-node is not available.");let n=te(e);if(!H(n))throw new Error(`RVF file not found: ${n}`);let r=ue(n);try{let t=r.extractKernel();if(!t||!t.image)throw new Error("No brain data found in RVF file");let a=t.image.toString("utf-8"),s;try{s=JSON.parse(a)}catch(w){throw new Error(`Failed to parse brain kernel data as JSON: ${w instanceof Error?w.message:w}`)}let l=r.status(),i=en(n).size,d=s.tables,c=d?d.qe_patterns?.length??0:s.patterns?.length??0,u=d?d.rl_q_values?.length??0:s.qValues?.length??0,p=d?d.dream_insights?.length??0:s.dreamInsights?.length??0,f=d?d.witness_chain?.length??0:s.witnessChain?.length??0;return{version:"3.0",format:"rvf",exportedAt:s.exportedAt??"unknown",sourceDb:s.sourceDb??"unknown",stats:{patternCount:c,embeddingCount:l.totalVectors,qValueCount:u,dreamInsightCount:p,witnessChainLength:f},domains:s.domains??[],checksum:C(a),rvfStatus:{totalVectors:l.totalVectors,totalSegments:l.totalSegments,fileSizeBytes:i}}}finally{r.close()}}function re(){return k()}Q();import{existsSync as ae,readFileSync as rn,statSync as on}from"fs";import{join as oe,resolve as Ce}from"path";function Ie(e,n,r={}){let t=Ce(e),a=Ce(n),s=Ee(t),l=Ee(a),i=Be(t,s),d=Be(a,l),c=s==="jsonl"&&l==="jsonl",u=ln({pathA:t,pathB:a,manifestA:i,manifestB:d,recordLevel:c,tableFilter:r.tableFilter,maxIdsPerBucket:r.maxIdsPerBucket??500}),p=new Set(i.domains),f=new Set(d.domains),w=i.domains.filter(b=>!f.has(b)),m=d.domains.filter(b=>!p.has(b)),y=i.checksum===d.checksum,g=i.version===d.version,v=y&&g&&u.every(b=>b.delta===0&&(b.added?.length??0)===0&&(b.removed?.length??0)===0&&(b.changed?.length??0)===0);return{pathA:t,pathB:a,formatA:s,formatB:l,manifestA:i,manifestB:d,checksumMatch:y,versionMatch:g,identical:v,recordLevel:c,tableDiffs:u,domainsOnlyInA:w,domainsOnlyInB:m}}function Ee(e){if(!ae(e))throw new Error(`Path not found: ${e}`);if(e.endsWith(".rvf"))return"rvf";if(on(e).isFile())throw new Error(`Unsupported brain export: ${e} (expected a .rvf file or a JSONL directory)`);return"jsonl"}function Be(e,n){return n==="rvf"?sn(e):an(e)}function an(e){let n=oe(e,"manifest.json");if(!ae(n))throw new Error(`Manifest not found at ${n}`);let r=x(rn(n,"utf-8"));return Oe(r,"jsonl")}function sn(e){let n=K(e);return Oe(n,"rvf")}function Oe(e,n){return{format:n,version:e.version??"unknown",exportedAt:e.exportedAt??"unknown",sourceDb:e.sourceDb??"unknown",checksum:e.checksum??"",totalRecords:e.stats?.totalRecords??0,domains:e.domains??[],tableRecordCounts:e.tableRecordCounts??{}}}function ln(e){let n=e.tableFilter?R.filter(t=>t.tableName===e.tableFilter):R;if(e.tableFilter&&n.length===0)throw new Error(`Unknown table: ${e.tableFilter}`);let r=[];for(let t of n){let a=e.manifestA.tableRecordCounts[t.tableName]??0,s=e.manifestB.tableRecordCounts[t.tableName]??0,l=s-a,i,d,c;if(e.recordLevel&&dn(t)){let u=cn(oe(e.pathA,t.fileName),oe(e.pathB,t.fileName),t,e.maxIdsPerBucket);i=u.added,d=u.removed,c=u.changed}r.push({tableName:t.tableName,countA:a,countB:s,delta:l,...i!==void 0?{added:i}:{},...d!==void 0?{removed:d}:{},...c!==void 0?{changed:c}:{}})}return r}function dn(e){return!0}function cn(e,n,r,t){let a=_e(e,r),s=_e(n,r),l=[],i=[],d=[];for(let[c,u]of a){let p=s.get(c);if(p===void 0)i.length<t&&i.push(c);else if(p!==u){if(r.dedupColumns&&r.dedupColumns.length>0)continue;d.length<t&&d.push(c)}}for(let c of s.keys())a.has(c)||l.length<t&&l.push(c);return l.sort(),i.sort(),d.sort(),{added:l,removed:i,changed:d}}function _e(e,n){let r=new Map;if(!ae(e))return r;let t=_(e,x);for(let a of t){let s=fn(a,n);if(s===void 0)continue;let l=mn(a);r.set(s,un(l))}return r}function fn(e,n){if(n.dedupColumns&&n.dedupColumns.length>0){let a=[];for(let s of n.dedupColumns){let l=e[s];if(l==null)return;a.push(String(l))}return a.join("")}let r=A[n.tableName]??"id",t=e[r];if(t!=null)return String(t)}function mn(e){let n=Object.keys(e).sort(),r={};for(let t of n)r[t]=e[t];return JSON.stringify(r)}function un(e){return C(e)}Q();import{existsSync as ie,statSync as pn}from"fs";import{join as Ae,resolve as gn}from"path";var yn=20,bn="qe_patterns";function Ne(e,n={}){let r=gn(e);vn(r);let t=n.table??bn,a=R.find(g=>g.tableName===t);if(!a)throw new Error(`Unknown table: ${t}`);let s=Ae(r,a.fileName);if(!ie(s))throw new Error(`Table file not found: ${a.fileName} (expected in ${r}). Was this export generated with --format jsonl?`);let l=_(s,x),i=a.domainColumn,d=Math.max(1,n.limit??yn),c=n.query?n.query.toLowerCase():void 0,u=n.domains&&n.domains.length>0?new Set(n.domains):void 0,p=n.since,f=n.until,w=n.patternType,m=0,y=[];for(let g of l)hn(g,{domainColumn:i,domains:u,patternType:w,since:p,until:f,queryLower:c})&&(m++,y.length<d&&y.push(wn(g,a.tableName,i)));return{table:t,inputPath:r,totalScanned:l.length,totalMatched:m,limit:d,hits:y,truncated:m>d}}function hn(e,n){if(n.domains){if(!n.domainColumn)return!1;let r=e[n.domainColumn];if(typeof r!="string"||!n.domains.has(r))return!1}if(n.patternType!==void 0&&e.pattern_type!==n.patternType)return!1;if(n.since!==void 0||n.until!==void 0){let r=De(e);if(r===void 0||n.since!==void 0&&r<n.since||n.until!==void 0&&r>n.until)return!1}if(n.queryLower!==void 0){let r=typeof e.name=="string"?e.name.toLowerCase():"",t=typeof e.description=="string"?e.description.toLowerCase():"";if(!r.includes(n.queryLower)&&!t.includes(n.queryLower))return!1}return!0}function De(e){for(let n of["updated_at","created_at","timestamp"]){let r=e[n];if(typeof r=="string"&&r.length>0)return r}}function wn(e,n,r){let t=(typeof e.id=="string"||typeof e.id=="number"?String(e.id):void 0)??`${n}:?`,a={name:typeof e.name=="string"?e.name:void 0,description:typeof e.description=="string"?e.description:void 0,domain:r&&typeof e[r]=="string"?e[r]:void 0,patternType:typeof e.pattern_type=="string"?e.pattern_type:void 0,confidence:typeof e.confidence=="number"?e.confidence:void 0,updatedAt:De(e)};return{id:t,display:a,row:e}}function vn(e){if(!ie(e))throw new Error(`Path not found: ${e}`);if(pn(e).isFile())throw e.endsWith(".rvf")?new Error("Brain search does not support RVF exports. Re-export with --format jsonl, or use `aqe brain info` for RVF summaries."):new Error(`Unsupported brain export: ${e} (expected a JSONL directory)`);let r=Ae(e,"manifest.json");if(!ie(r))throw new Error(`Manifest not found at ${r}. Is this a brain export directory?`)}function ke(e,n){if(!e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='qe_patterns'").get())return{created:0,skipped:0};e.exec(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.4");process.exit(0)}
2
+ import{a as A,b as L,c as F,d as R,e as Y,f as T,g as P,h as C,i as j,j as X,k as V,l as ge,m as $,n as Z,o as ye,p as _,q as J,r as U,s as W}from"./chunk-MDWJXSBA.js";import{h as pe}from"./chunk-YSLE6NNG.js";import"./chunk-NZGLDOU4.js";import"./chunk-K72J52JO.js";import"./chunk-U27GVYXA.js";import{b as x,d as Q}from"./chunk-IYFMDIYZ.js";import{a as fe,b as me,c as ue,d as k,f as We}from"./chunk-KWZEBHAP.js";import"./chunk-HPYGMKZF.js";import"./chunk-VRE2EBFI.js";import"./chunk-2B6ETC7C.js";import{a as O,b as Ue}from"./chunk-RJKYPWFD.js";import"./chunk-2G2PVVQG.js";import"./chunk-UWAUYDW4.js";import"./chunk-N3MM4Z33.js";import"./chunk-6OLHPWSN.js";import"./chunk-WI5WXYIS.js";import"./chunk-EMZ3DXMG.js";import"./chunk-MFWWPRBV.js";import"./chunk-D7IWGQTW.js";import"./chunk-SVILIQQQ.js";import B from"path";import o from"chalk";Ue();Q();import{existsSync as z,mkdirSync as ze,writeFileSync as He,readFileSync as ee}from"fs";import{join as E,resolve as ne}from"path";var Ke={rl_q_values:"includeQValues",dream_insights:"includeDreamInsights",dream_cycles:"includeDreamInsights",witness_chain:"includeWitnessChain",vectors:"includeVectors"};function Ge(e,n){let r=Ke[e.tableName];return!(r&&n[r]===!1)}var Qe=1e4;function Ye(e,n,r,t){if(!Ge(n,r))return Z(E(t,n.fileName),[]),{count:0,rows:[]};let[a,s]=n.domainColumn?$(r.domains,n.domainColumn):[void 0,[]];if(X(e,n.tableName,a,s)>=Qe){let d=n.blobColumns,c=d&&d.length>0?p=>T(p,d):void 0;return{count:ye(E(t,n.fileName),ge(e,n.tableName,a,s),c)}}let i=V(e,n.tableName,a,s);return n.blobColumns&&n.blobColumns.length>0&&(i=i.map(d=>T(d,n.blobColumns))),Z(E(t,n.fileName),i),{count:i.length,rows:i}}function be(e){let n=[];for(let r of R){let t=E(e,r.fileName);z(t)?n.push(C(ee(t,"utf-8"))):n.push(C(""))}return C(n.join(":"))}function he(e,n,r="memory.db"){let t=ne(n.outputPath);z(t)||ze(t,{recursive:!0});let a=0,s={},l=new Set;for(let u of R){let p=Ye(e,u,n,t);if(s[u.tableName]=p.count,a+=p.count,u.tableName==="qe_patterns"){if(p.rows)for(let f of p.rows)f.qe_domain&&l.add(f.qe_domain);else if(p.count>0){let[f,w]=u.domainColumn?$(n.domains,u.domainColumn):[void 0,[]],y=`SELECT DISTINCT qe_domain FROM qe_patterns ${f?`WHERE ${f} AND qe_domain IS NOT NULL`:"WHERE qe_domain IS NOT NULL"}`;try{let g=e.prepare(y).all(...w||[]);for(let v of g)l.add(v.qe_domain)}catch{}}}}let i=n.includeVectors!==!1?X(e,"vectors"):0,d=be(t),c={version:"3.0",exportedAt:new Date().toISOString(),sourceDb:r,stats:{patternCount:s.qe_patterns||0,vectorCount:i,qValueCount:s.rl_q_values||0,dreamInsightCount:s.dream_insights||0,witnessChainLength:s.witness_chain||0,totalRecords:a},domains:[...l].sort(),checksum:d,tableRecordCounts:s};return He(E(t,"manifest.json"),JSON.stringify(c,null,2),"utf-8"),c}var Xe=new Set(["qe_patterns","rl_q_values","dream_insights","witness_chain"]);function Ze(e){return e==="1.0"?R.filter(n=>Xe.has(n.tableName)):e==="3.0"?R:(console.warn(`[brain-import] Unknown manifest version '${e}'. Attempting full import \u2014 some files may be missing.`),R)}function we(e,n,r){let t=ne(n),a=E(t,"manifest.json");if(!z(a))throw new Error(`Manifest not found at ${a}`);let s=x(ee(a,"utf-8")),l=be(t);if(l!==s.checksum)throw new Error(`Checksum mismatch: expected ${s.checksum}, got ${l}. The export may have been tampered with or corrupted.`);let i=Ze(s.version);if(r.dryRun){let f=0;for(let w of i){let m=_(E(t,w.fileName),x);f+=m.length}return{imported:f,skipped:0,conflicts:0}}W(e);let d=0,c=0,u=0;return e.transaction(()=>{for(let f of i){let w=E(t,f.fileName),m=_(w,x);f.blobColumns&&f.blobColumns.length>0&&(m=m.map(y=>P(y,f.blobColumns)));for(let y of m){let g;if(f.dedupColumns&&f.dedupColumns.length>0)g=U(e,f.tableName,y,f.dedupColumns);else{let v=A[f.tableName]||"id",b=F[f.tableName],I=L[f.tableName];g=J(e,f.tableName,y,v,r.mergeStrategy,b,I)}d+=g.imported,c+=g.skipped,u+=g.conflicts}}})(),{imported:d,skipped:c,conflicts:u}}function ve(e){let n=ne(e),r=E(n,"manifest.json");if(!z(r))throw new Error(`Manifest not found at ${r}`);return x(ee(r,"utf-8"))}We();import{existsSync as H,statSync as en,unlinkSync as Re,writeFileSync as nn}from"fs";import{resolve as te}from"path";function Se(e,n,r="memory.db"){if(!k())throw new Error("@ruvector/rvf-node is not available. Install it or use --format jsonl instead.");let t=te(n.outputPath),a=n.dimension??384;H(t)&&Re(t);let s=`${t}.idmap.json`;H(s)&&Re(s);let l=fe(t,a);try{let i={},d=new Set,c=0;for(let S of R){let[h,ce]=S.domainColumn?$(n.domains,S.domainColumn):[void 0,[]],D=V(e,S.tableName,h,ce);if(S.tableName==="qe_patterns")for(let q of D)q.qe_domain&&d.add(q.qe_domain);let G=Y[S.tableName];G&&G.length>0&&(D=D.map(q=>T(q,G))),i[S.tableName]=D,c+=D.length}let u=0,p=[];if(j(e,"qe_pattern_embeddings")){let S=e.prepare("SELECT pattern_id, embedding, dimension FROM qe_pattern_embeddings").all();for(let h of S)h.embedding&&h.dimension===a&&p.push({id:`pe:${h.pattern_id}`,vector:new Float32Array(h.embedding.buffer,h.embedding.byteOffset,a),metadata:{tableName:"qe_pattern_embeddings"}})}if(j(e,"captured_experiences")){let S=e.prepare("SELECT id, embedding, embedding_dimension, domain, quality FROM captured_experiences WHERE embedding IS NOT NULL").all();for(let h of S)h.embedding_dimension===a&&p.push({id:`exp:${h.id}`,vector:new Float32Array(h.embedding.buffer,h.embedding.byteOffset,a),metadata:{tableName:"captured_experiences",domain:h.domain,confidence:h.quality}})}if(j(e,"sona_patterns")){let S=e.prepare("SELECT id, state_embedding, domain, confidence FROM sona_patterns WHERE state_embedding IS NOT NULL").all();for(let h of S)h.state_embedding.byteLength/4===a&&p.push({id:`sona:${h.id}`,vector:new Float32Array(h.state_embedding.buffer,h.state_embedding.byteOffset,a),metadata:{tableName:"sona_patterns",domain:h.domain,confidence:h.confidence}})}p.length>0&&(u=l.ingest(p).accepted);let f={version:"3.0",format:"rvf",exportedAt:new Date().toISOString(),sourceDb:r,domains:[...d].sort(),tables:i},w=JSON.stringify(f),m=C(w),y=Buffer.from(w);l.embedKernel(y);let g=n.sign?l.sign(y)??void 0:void 0,v=g?n.signerKeyId??"default":void 0,b=l.fileId(),I=b?{fileId:b,parentId:l.parentId(),lineageDepth:l.lineageDepth()}:void 0,N=l.status(),M={version:"3.0",format:"rvf",exportedAt:f.exportedAt,sourceDb:r,stats:{patternCount:(i.qe_patterns||[]).length,embeddingCount:u,qValueCount:(i.rl_q_values||[]).length,dreamInsightCount:(i.dream_insights||[]).length,witnessChainLength:(i.witness_chain||[]).length,totalRecords:c},domains:f.domains,checksum:m,rvfStatus:{totalVectors:N.totalVectors,totalSegments:N.totalSegments,fileSizeBytes:N.fileSizeBytes},...g?{signature:g,signerKeyId:v}:{},...I?{lineage:I}:{}};if(g)try{l.freeze()}catch{}let Je=`${t}.manifest.json`;return nn(Je,JSON.stringify(M,null,2),"utf-8"),M}finally{l.close()}}var tn={patterns:"qe_patterns",qValues:"rl_q_values",dreamInsights:"dream_insights",witnessChain:"witness_chain"};function xe(e,n,r){if(!k())throw new Error("@ruvector/rvf-node is not available. Install it or use JSONL format.");let t=te(n);if(!H(t))throw new Error(`RVF file not found: ${t}`);let a=me(t);try{let s=a.verifyWitness();if(!s.valid&&(s.totalEntries>0||s.errors.length>0)){let m=s.errors.length>0?s.errors.join("; "):"unknown integrity error";throw new Error(`RVF witness verification failed: ${m}`)}let l=a.extractKernel();if(!l||!l.image)throw new Error("No brain data found in RVF file (missing kernel segment)");let i;try{i=JSON.parse(l.image.toString("utf-8"))}catch(m){throw new Error(`Failed to parse brain kernel data as JSON: ${m instanceof Error?m.message:m}`)}if(r.dryRun){let m=0;if(i.tables)for(let y of Object.values(i.tables))m+=y?.length??0;else m=(i.patterns?.length??0)+(i.qValues?.length??0)+(i.dreamInsights?.length??0)+(i.witnessChain?.length??0);return{imported:m,skipped:0,conflicts:0,embeddingsRestored:0}}W(e);let d=0,c=0,u=0,p=0,f={};if(i.tables)Object.assign(f,i.tables);else for(let[m,y]of Object.entries(tn)){let g=i[m];Array.isArray(g)&&(f[y]=g)}if(e.transaction(()=>{for(let m of R){let y=f[m.tableName];if(!y||!Array.isArray(y))continue;let g=Y[m.tableName];if(g&&g.length>0){y=y.map(v=>P(v,g));for(let v of y)for(let b of g)v[b]instanceof Buffer&&p++}for(let v of y){let b;if(m.dedupColumns&&m.dedupColumns.length>0)b=U(e,m.tableName,v,m.dedupColumns);else{let I=A[m.tableName]||"id",N=F[m.tableName],M=L[m.tableName];b=J(e,m.tableName,v,I,r.mergeStrategy,N,M)}d+=b.imported,c+=b.skipped,u+=b.conflicts}}})(),u>0)try{a.compact()}catch{}return{imported:d,skipped:c,conflicts:u,embeddingsRestored:p}}finally{a.close()}}function K(e){if(!k())throw new Error("@ruvector/rvf-node is not available.");let n=te(e);if(!H(n))throw new Error(`RVF file not found: ${n}`);let r=ue(n);try{let t=r.extractKernel();if(!t||!t.image)throw new Error("No brain data found in RVF file");let a=t.image.toString("utf-8"),s;try{s=JSON.parse(a)}catch(w){throw new Error(`Failed to parse brain kernel data as JSON: ${w instanceof Error?w.message:w}`)}let l=r.status(),i=en(n).size,d=s.tables,c=d?d.qe_patterns?.length??0:s.patterns?.length??0,u=d?d.rl_q_values?.length??0:s.qValues?.length??0,p=d?d.dream_insights?.length??0:s.dreamInsights?.length??0,f=d?d.witness_chain?.length??0:s.witnessChain?.length??0;return{version:"3.0",format:"rvf",exportedAt:s.exportedAt??"unknown",sourceDb:s.sourceDb??"unknown",stats:{patternCount:c,embeddingCount:l.totalVectors,qValueCount:u,dreamInsightCount:p,witnessChainLength:f},domains:s.domains??[],checksum:C(a),rvfStatus:{totalVectors:l.totalVectors,totalSegments:l.totalSegments,fileSizeBytes:i}}}finally{r.close()}}function re(){return k()}Q();import{existsSync as ae,readFileSync as rn,statSync as on}from"fs";import{join as oe,resolve as Ce}from"path";function Ie(e,n,r={}){let t=Ce(e),a=Ce(n),s=Ee(t),l=Ee(a),i=Be(t,s),d=Be(a,l),c=s==="jsonl"&&l==="jsonl",u=ln({pathA:t,pathB:a,manifestA:i,manifestB:d,recordLevel:c,tableFilter:r.tableFilter,maxIdsPerBucket:r.maxIdsPerBucket??500}),p=new Set(i.domains),f=new Set(d.domains),w=i.domains.filter(b=>!f.has(b)),m=d.domains.filter(b=>!p.has(b)),y=i.checksum===d.checksum,g=i.version===d.version,v=y&&g&&u.every(b=>b.delta===0&&(b.added?.length??0)===0&&(b.removed?.length??0)===0&&(b.changed?.length??0)===0);return{pathA:t,pathB:a,formatA:s,formatB:l,manifestA:i,manifestB:d,checksumMatch:y,versionMatch:g,identical:v,recordLevel:c,tableDiffs:u,domainsOnlyInA:w,domainsOnlyInB:m}}function Ee(e){if(!ae(e))throw new Error(`Path not found: ${e}`);if(e.endsWith(".rvf"))return"rvf";if(on(e).isFile())throw new Error(`Unsupported brain export: ${e} (expected a .rvf file or a JSONL directory)`);return"jsonl"}function Be(e,n){return n==="rvf"?sn(e):an(e)}function an(e){let n=oe(e,"manifest.json");if(!ae(n))throw new Error(`Manifest not found at ${n}`);let r=x(rn(n,"utf-8"));return Oe(r,"jsonl")}function sn(e){let n=K(e);return Oe(n,"rvf")}function Oe(e,n){return{format:n,version:e.version??"unknown",exportedAt:e.exportedAt??"unknown",sourceDb:e.sourceDb??"unknown",checksum:e.checksum??"",totalRecords:e.stats?.totalRecords??0,domains:e.domains??[],tableRecordCounts:e.tableRecordCounts??{}}}function ln(e){let n=e.tableFilter?R.filter(t=>t.tableName===e.tableFilter):R;if(e.tableFilter&&n.length===0)throw new Error(`Unknown table: ${e.tableFilter}`);let r=[];for(let t of n){let a=e.manifestA.tableRecordCounts[t.tableName]??0,s=e.manifestB.tableRecordCounts[t.tableName]??0,l=s-a,i,d,c;if(e.recordLevel&&dn(t)){let u=cn(oe(e.pathA,t.fileName),oe(e.pathB,t.fileName),t,e.maxIdsPerBucket);i=u.added,d=u.removed,c=u.changed}r.push({tableName:t.tableName,countA:a,countB:s,delta:l,...i!==void 0?{added:i}:{},...d!==void 0?{removed:d}:{},...c!==void 0?{changed:c}:{}})}return r}function dn(e){return!0}function cn(e,n,r,t){let a=_e(e,r),s=_e(n,r),l=[],i=[],d=[];for(let[c,u]of a){let p=s.get(c);if(p===void 0)i.length<t&&i.push(c);else if(p!==u){if(r.dedupColumns&&r.dedupColumns.length>0)continue;d.length<t&&d.push(c)}}for(let c of s.keys())a.has(c)||l.length<t&&l.push(c);return l.sort(),i.sort(),d.sort(),{added:l,removed:i,changed:d}}function _e(e,n){let r=new Map;if(!ae(e))return r;let t=_(e,x);for(let a of t){let s=fn(a,n);if(s===void 0)continue;let l=mn(a);r.set(s,un(l))}return r}function fn(e,n){if(n.dedupColumns&&n.dedupColumns.length>0){let a=[];for(let s of n.dedupColumns){let l=e[s];if(l==null)return;a.push(String(l))}return a.join("")}let r=A[n.tableName]??"id",t=e[r];if(t!=null)return String(t)}function mn(e){let n=Object.keys(e).sort(),r={};for(let t of n)r[t]=e[t];return JSON.stringify(r)}function un(e){return C(e)}Q();import{existsSync as ie,statSync as pn}from"fs";import{join as Ae,resolve as gn}from"path";var yn=20,bn="qe_patterns";function Ne(e,n={}){let r=gn(e);vn(r);let t=n.table??bn,a=R.find(g=>g.tableName===t);if(!a)throw new Error(`Unknown table: ${t}`);let s=Ae(r,a.fileName);if(!ie(s))throw new Error(`Table file not found: ${a.fileName} (expected in ${r}). Was this export generated with --format jsonl?`);let l=_(s,x),i=a.domainColumn,d=Math.max(1,n.limit??yn),c=n.query?n.query.toLowerCase():void 0,u=n.domains&&n.domains.length>0?new Set(n.domains):void 0,p=n.since,f=n.until,w=n.patternType,m=0,y=[];for(let g of l)hn(g,{domainColumn:i,domains:u,patternType:w,since:p,until:f,queryLower:c})&&(m++,y.length<d&&y.push(wn(g,a.tableName,i)));return{table:t,inputPath:r,totalScanned:l.length,totalMatched:m,limit:d,hits:y,truncated:m>d}}function hn(e,n){if(n.domains){if(!n.domainColumn)return!1;let r=e[n.domainColumn];if(typeof r!="string"||!n.domains.has(r))return!1}if(n.patternType!==void 0&&e.pattern_type!==n.patternType)return!1;if(n.since!==void 0||n.until!==void 0){let r=De(e);if(r===void 0||n.since!==void 0&&r<n.since||n.until!==void 0&&r>n.until)return!1}if(n.queryLower!==void 0){let r=typeof e.name=="string"?e.name.toLowerCase():"",t=typeof e.description=="string"?e.description.toLowerCase():"";if(!r.includes(n.queryLower)&&!t.includes(n.queryLower))return!1}return!0}function De(e){for(let n of["updated_at","created_at","timestamp"]){let r=e[n];if(typeof r=="string"&&r.length>0)return r}}function wn(e,n,r){let t=(typeof e.id=="string"||typeof e.id=="number"?String(e.id):void 0)??`${n}:?`,a={name:typeof e.name=="string"?e.name:void 0,description:typeof e.description=="string"?e.description:void 0,domain:r&&typeof e[r]=="string"?e[r]:void 0,patternType:typeof e.pattern_type=="string"?e.pattern_type:void 0,confidence:typeof e.confidence=="number"?e.confidence:void 0,updatedAt:De(e)};return{id:t,display:a,row:e}}function vn(e){if(!ie(e))throw new Error(`Path not found: ${e}`);if(pn(e).isFile())throw e.endsWith(".rvf")?new Error("Brain search does not support RVF exports. Re-export with --format jsonl, or use `aqe brain info` for RVF summaries."):new Error(`Unsupported brain export: ${e} (expected a JSONL directory)`);let r=Ae(e,"manifest.json");if(!ie(r))throw new Error(`Manifest not found at ${r}. Is this a brain export directory?`)}function ke(e,n){if(!e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='qe_patterns'").get())return{created:0,skipped:0};e.exec(`
3
3
  CREATE TEMP TABLE IF NOT EXISTS _covered_patterns (
4
4
  pattern_id TEXT PRIMARY KEY
5
5
  )
@@ -74,7 +74,7 @@ Examples:
74
74
  aqe brain diff ./brain-a ./brain-b --verbose
75
75
  aqe brain search -i ./brain-export --query oauth --domain test-generation
76
76
  aqe brain search -i ./brain-export --since 2026-03-01 --limit 50 --json
77
- `}};async function se(e){if(e)return e;let{findProjectRoot:n}=await import("./unified-memory-7AS4LIEF.js");return B.join(n(),".agentic-qe","memory.db")}function je(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Sn(e){let n=Number.parseInt(e,10);return!Number.isFinite(n)||n<1?20:n}function xn(e){if(e===void 0)return;let n=Array.isArray(e)?e:[e],r=[];for(let t of n)for(let a of t.split(",")){let s=a.trim();s&&r.push(s)}return r.length>0?r:void 0}function Cn(e,n){console.log(o.blue(`
77
+ `}};async function se(e){if(e)return e;let{findProjectRoot:n}=await import("./unified-memory-QG3FDRKR.js");return B.join(n(),".agentic-qe","memory.db")}function je(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Sn(e){let n=Number.parseInt(e,10);return!Number.isFinite(n)||n<1?20:n}function xn(e){if(e===void 0)return;let n=Array.isArray(e)?e:[e],r=[];for(let t of n)for(let a of t.split(",")){let s=a.trim();s&&r.push(s)}return r.length>0?r:void 0}function Cn(e,n){console.log(o.blue(`
78
78
  Brain Diff
79
79
  `)),console.log(` A: ${o.cyan(e.pathA)} (${e.formatA})`),console.log(` B: ${o.cyan(e.pathB)} (${e.formatB})`),console.log(` Versions: ${o.cyan(e.manifestA.version)} \u2192 ${o.cyan(e.manifestB.version)}`+(e.versionMatch?o.gray(" (match)"):o.yellow(" (differ)"))),console.log(` Checksums: ${o.gray(e.manifestA.checksum.slice(0,12))}\u2026 \u2192 ${o.gray(e.manifestB.checksum.slice(0,12))}\u2026`+(e.checksumMatch?o.gray(" (match)"):o.yellow(" (differ)"))),console.log(` Exported: ${o.gray(e.manifestA.exportedAt)} \u2192 ${o.gray(e.manifestB.exportedAt)}`),console.log(` Records: ${o.cyan(e.manifestA.totalRecords)} \u2192 ${o.cyan(e.manifestB.totalRecords)} `+Ve(e.manifestB.totalRecords-e.manifestA.totalRecords)),(e.domainsOnlyInA.length>0||e.domainsOnlyInB.length>0)&&(console.log(o.blue(`
80
80
  Domains:`)),e.domainsOnlyInA.length>0&&console.log(` Only in A: ${o.yellow(e.domainsOnlyInA.join(", "))}`),e.domainsOnlyInB.length>0&&console.log(` Only in B: ${o.yellow(e.domainsOnlyInB.join(", "))}`)),e.recordLevel||console.log(o.gray(`