agentic-qe 3.9.25 → 3.9.27

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 (308) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +173 -0
  3. package/assets/skills/skills-manifest.json +1 -1
  4. package/dist/bridge/captured-experience-bridge.d.ts +40 -0
  5. package/dist/bridge/captured-experience-bridge.js +232 -0
  6. package/dist/cli/bundle.js +5 -5
  7. package/dist/cli/chunks/adapter-T3LXVVV6.js +2 -0
  8. package/dist/cli/chunks/{agent-booster-wasm-3JH5PJWN.js → agent-booster-wasm-ITOX2PFK.js} +2 -2
  9. package/dist/cli/chunks/{agent-handler-3FEJU2TM.js → agent-handler-NGVDEBFM.js} +2 -2
  10. package/dist/cli/chunks/{agent-memory-branch-FCLJ7NQB.js → agent-memory-branch-6WLQE4UP.js} +2 -2
  11. package/dist/cli/chunks/aqe-learning-engine-NDMVUAJB.js +2 -0
  12. package/dist/cli/chunks/{audit-FSLEJMM5.js → audit-KTNR6LYC.js} +2 -2
  13. package/dist/cli/chunks/base-NQRD32GI.js +2 -0
  14. package/dist/cli/chunks/{hnswlib-node-KUWXTCD4.js → better-sqlite3-ROUVYY3W.js} +2 -2
  15. package/dist/cli/chunks/{brain-handler-IVRXCPLL.js → brain-handler-ZFLB6Q37.js} +3 -3
  16. package/dist/cli/chunks/{branch-enumerator-EXW3AFAQ.js → branch-enumerator-SONBYE7U.js} +2 -2
  17. package/dist/cli/chunks/{browser-3J6OTKWZ.js → browser-D6YYID5Y.js} +2 -2
  18. package/dist/cli/chunks/browser-workflow-WSAEHMFE.js +2 -0
  19. package/dist/cli/chunks/{chunk-I5AVFRDJ.js → chunk-2IKQT3IF.js} +1 -1
  20. package/dist/cli/chunks/{chunk-LTWNVZDR.js → chunk-2J3B4ONK.js} +2 -2
  21. package/dist/cli/chunks/{chunk-4ASWQOFE.js → chunk-2MO2U3NO.js} +2 -2
  22. package/dist/cli/chunks/{chunk-MYDJYPBT.js → chunk-2O6XVANK.js} +2 -2
  23. package/dist/cli/chunks/{chunk-MP4GPPOD.js → chunk-2SEXNZIJ.js} +2 -2
  24. package/dist/cli/chunks/{chunk-3ITRVWXL.js → chunk-2UPD2NX5.js} +1 -1
  25. package/dist/cli/chunks/{chunk-XNXFB4TV.js → chunk-2Z2DD5YW.js} +2 -2
  26. package/dist/cli/chunks/{chunk-73SK2MNU.js → chunk-3BTSXIJ3.js} +2 -2
  27. package/dist/cli/chunks/{chunk-MMWH7D2O.js → chunk-4AWB4BKC.js} +2 -2
  28. package/dist/cli/chunks/{chunk-75PD5ATI.js → chunk-4DTF53TE.js} +2 -2
  29. package/dist/cli/chunks/{chunk-P6REB3IC.js → chunk-4K7KTT4Q.js} +1 -1
  30. package/dist/cli/chunks/{chunk-OGBDSSVO.js → chunk-4SLL4YG2.js} +2 -2
  31. package/dist/cli/chunks/{chunk-OJ7RJC7F.js → chunk-4Z2KY7N3.js} +1 -1
  32. package/dist/cli/chunks/{chunk-DNIU6W6Z.js → chunk-5DDRRXKR.js} +2 -2
  33. package/dist/cli/chunks/{chunk-7QILWWRD.js → chunk-5GBDMANM.js} +2 -2
  34. package/dist/cli/chunks/{chunk-FHKQSSQT.js → chunk-5W3XL5YW.js} +2 -2
  35. package/dist/cli/chunks/{chunk-4DVQS5LA.js → chunk-5WPQATT7.js} +2 -2
  36. package/dist/cli/chunks/{chunk-W7ULVE22.js → chunk-6BGF3VZJ.js} +2 -2
  37. package/dist/cli/chunks/{chunk-XXG6OQSR.js → chunk-6BIHLI3A.js} +25 -9
  38. package/dist/cli/chunks/{chunk-M4F7EAR6.js → chunk-6IYCOEW7.js} +2 -2
  39. package/dist/cli/chunks/{chunk-XMYX6HAG.js → chunk-6R2OTCWG.js} +2 -2
  40. package/dist/cli/chunks/{chunk-J2O5RRNH.js → chunk-7EC2C5QP.js} +1 -1
  41. package/dist/cli/chunks/{chunk-3LSHQUQ2.js → chunk-7QXW6HLF.js} +2 -2
  42. package/dist/cli/chunks/{chunk-QJKXAYOM.js → chunk-A4QYEA22.js} +2 -2
  43. package/dist/cli/chunks/{chunk-M4GE3R5K.js → chunk-A7D5532X.js} +2 -2
  44. package/dist/cli/chunks/{chunk-AZ3GC5UX.js → chunk-AAYGZTW3.js} +3 -3
  45. package/dist/cli/chunks/{chunk-T5WFV3EH.js → chunk-ADU5MOQE.js} +1 -1
  46. package/dist/cli/chunks/{chunk-ILIKB32B.js → chunk-BT5YOORE.js} +2 -2
  47. package/dist/cli/chunks/{chunk-FO3VJDCI.js → chunk-BZNIVIZE.js} +1 -1
  48. package/dist/cli/chunks/{chunk-W2OPF27P.js → chunk-C7TMWGMN.js} +3 -3
  49. package/dist/cli/chunks/{chunk-3OPXTQMB.js → chunk-CNWWQYZ3.js} +1 -1
  50. package/dist/cli/chunks/{chunk-6PW5L2SC.js → chunk-COTY53RT.js} +2 -2
  51. package/dist/cli/chunks/{chunk-ML7AEOPI.js → chunk-CYNQW276.js} +2 -2
  52. package/dist/cli/chunks/{chunk-2IRRXFBV.js → chunk-DL6L4FGW.js} +2 -2
  53. package/dist/cli/chunks/{chunk-VLNCDVU6.js → chunk-DPMCEGYQ.js} +2 -2
  54. package/dist/cli/chunks/{chunk-VUEYEMMJ.js → chunk-DURR7FQ2.js} +9 -9
  55. package/dist/cli/chunks/{chunk-KAVN56IT.js → chunk-E3K7FQKW.js} +2 -2
  56. package/dist/cli/chunks/{chunk-7VNGENWZ.js → chunk-ET5RCLBO.js} +2 -2
  57. package/dist/cli/chunks/{chunk-XPXL75LN.js → chunk-EW2JQIYW.js} +1 -1
  58. package/dist/cli/chunks/{chunk-XC34CWA3.js → chunk-F5PNA7J3.js} +2 -2
  59. package/dist/cli/chunks/{chunk-4GVLZIHN.js → chunk-FQZM3SVW.js} +2 -2
  60. package/dist/cli/chunks/{chunk-EKQI2HRL.js → chunk-FY3TF4SA.js} +2 -2
  61. package/dist/cli/chunks/{chunk-V3L3FD4I.js → chunk-G4KZCXZK.js} +1 -1
  62. package/dist/cli/chunks/{chunk-XBGO4NQE.js → chunk-GGIE7KUU.js} +2 -2
  63. package/dist/cli/chunks/{chunk-PMAMZZ6B.js → chunk-GXHMSIBM.js} +1 -1
  64. package/dist/cli/chunks/{chunk-4FRRDVWH.js → chunk-HEZJOCD7.js} +2 -2
  65. package/dist/cli/chunks/{chunk-R7VO6E3E.js → chunk-HPB5MPJP.js} +2 -2
  66. package/dist/cli/chunks/{chunk-VRNRR3VU.js → chunk-HV7V34DZ.js} +2 -2
  67. package/dist/cli/chunks/{chunk-W5RRYCQ7.js → chunk-HYCRKKJN.js} +2 -2
  68. package/dist/cli/chunks/{chunk-XBBNMF3C.js → chunk-I3YJEVI2.js} +2 -2
  69. package/dist/cli/chunks/{chunk-IJH3WAC4.js → chunk-I73XKAOF.js} +3 -3
  70. package/dist/cli/chunks/{chunk-7YV5T64G.js → chunk-IQITE3HO.js} +1 -1
  71. package/dist/cli/chunks/{chunk-U67BTJC3.js → chunk-ITGHTWHH.js} +2 -2
  72. package/dist/cli/chunks/{chunk-FUNP4GGE.js → chunk-IUUT6Q5I.js} +2 -2
  73. package/dist/cli/chunks/{chunk-76RCKSCL.js → chunk-J24PEKZ5.js} +2 -2
  74. package/dist/cli/chunks/{chunk-GV3LIGPJ.js → chunk-J2ZH6IHM.js} +2 -2
  75. package/dist/cli/chunks/{chunk-NADXRFKX.js → chunk-J6EDIEZB.js} +1 -1
  76. package/dist/cli/chunks/{chunk-R3OII6WM.js → chunk-JBL5G5VJ.js} +1 -1
  77. package/dist/cli/chunks/{chunk-AQXKM5VB.js → chunk-JN7WVS57.js} +2 -2
  78. package/dist/cli/chunks/{chunk-X66FBTTD.js → chunk-JP7AOQZZ.js} +1 -1
  79. package/dist/cli/chunks/{chunk-VYFRA4ZP.js → chunk-JZTMCQVH.js} +1 -1
  80. package/dist/cli/chunks/{chunk-6IRQAAMQ.js → chunk-KFDY5AD7.js} +1 -1
  81. package/dist/cli/chunks/{chunk-I5WMRFJ2.js → chunk-LU27B4M7.js} +3 -3
  82. package/dist/cli/chunks/{chunk-5DOCH2OX.js → chunk-LXGVB3FK.js} +1 -1
  83. package/dist/cli/chunks/{chunk-DPDDWIL7.js → chunk-MFRS4KFZ.js} +2 -2
  84. package/dist/cli/chunks/{chunk-PFH2G7AP.js → chunk-MHPA6IWB.js} +2 -2
  85. package/dist/cli/chunks/{chunk-KYDLYPOG.js → chunk-MKDGVPE3.js} +129 -124
  86. package/dist/cli/chunks/{chunk-VZVHYH7B.js → chunk-MSA7UH3M.js} +1 -1
  87. package/dist/cli/chunks/{chunk-WOD7Y7NC.js → chunk-NTTW3LSE.js} +2 -2
  88. package/dist/cli/chunks/{chunk-UHWGEZXG.js → chunk-NWSFGZKC.js} +1 -1
  89. package/dist/cli/chunks/{chunk-LFD3YTNY.js → chunk-O7XW2BWN.js} +2 -2
  90. package/dist/cli/chunks/{chunk-F3IEJL4O.js → chunk-OA5ZH3IH.js} +2 -2
  91. package/dist/cli/chunks/{chunk-X33KZ6WO.js → chunk-OHT5NJXJ.js} +1 -1
  92. package/dist/cli/chunks/{chunk-NIXA5DVA.js → chunk-PBP2TWV7.js} +2 -2
  93. package/dist/cli/chunks/{chunk-74YWPNUB.js → chunk-PFHUT2VE.js} +2 -2
  94. package/dist/cli/chunks/{chunk-5KWOG53N.js → chunk-PGS2MYE7.js} +1 -1
  95. package/dist/cli/chunks/{chunk-5XCHNZNW.js → chunk-PIR3KN5M.js} +2 -2
  96. package/dist/cli/chunks/{chunk-2ZN6YGSA.js → chunk-PMP6QRTB.js} +5 -5
  97. package/dist/cli/chunks/{chunk-N64WUFUI.js → chunk-PU7S6SEW.js} +4 -4
  98. package/dist/cli/chunks/{chunk-QFNWLRPV.js → chunk-PXFK5V2E.js} +2 -2
  99. package/dist/cli/chunks/{chunk-MAWGLIAE.js → chunk-Q5GQ267O.js} +1 -1
  100. package/dist/cli/chunks/{chunk-73SPNQDP.js → chunk-QM2LHV7P.js} +2 -2
  101. package/dist/cli/chunks/{chunk-TCRBP7GO.js → chunk-RAVTYXUD.js} +1 -1
  102. package/dist/cli/chunks/{chunk-JXSEJIIB.js → chunk-RDJZLKU2.js} +1 -1
  103. package/dist/cli/chunks/{chunk-THQNIMJU.js → chunk-RE5OY7WL.js} +2 -2
  104. package/dist/cli/chunks/{chunk-KVZKBPKC.js → chunk-RM7WNXRT.js} +2 -2
  105. package/dist/cli/chunks/{chunk-ZGGHGWXF.js → chunk-RPDLRKAT.js} +1 -1
  106. package/dist/cli/chunks/{chunk-2ACE3T6H.js → chunk-S3QE2RBR.js} +10 -10
  107. package/dist/cli/chunks/{chunk-IV4OBL4P.js → chunk-SCS3RUTT.js} +1 -1
  108. package/dist/cli/chunks/{chunk-JPB44BMP.js → chunk-SL5MAYYP.js} +2 -2
  109. package/dist/cli/chunks/{chunk-7G2UJMKQ.js → chunk-T46HLTI3.js} +2 -2
  110. package/dist/cli/chunks/{chunk-4EUPBVPV.js → chunk-T5HPBBVB.js} +1 -1
  111. package/dist/cli/chunks/{chunk-5SGWYFOV.js → chunk-U7S7A7LB.js} +1 -1
  112. package/dist/cli/chunks/{chunk-HLVL2N5U.js → chunk-UIKOUIGI.js} +2 -2
  113. package/dist/cli/chunks/{chunk-EY2W47L3.js → chunk-V7HMKS5S.js} +2 -2
  114. package/dist/cli/chunks/{chunk-FFP7OV5L.js → chunk-VNC7ANGV.js} +2 -2
  115. package/dist/cli/chunks/{chunk-QOVAU4DT.js → chunk-VRPZU5KM.js} +1 -1
  116. package/dist/cli/chunks/{chunk-NURG5LQO.js → chunk-W5EOH4NH.js} +1 -1
  117. package/dist/cli/chunks/{chunk-DZVIMPC2.js → chunk-WD5T5PE6.js} +2 -2
  118. package/dist/cli/chunks/{chunk-HEVA2HR3.js → chunk-WGYJD6DT.js} +2 -2
  119. package/dist/cli/chunks/{chunk-SKRQF45C.js → chunk-WHI7FVTH.js} +2 -2
  120. package/dist/cli/chunks/{chunk-SDOG2MMY.js → chunk-WLT5RGLK.js} +2 -2
  121. package/dist/cli/chunks/{chunk-5RJENBAG.js → chunk-WPN2NYZ3.js} +3 -3
  122. package/dist/cli/chunks/{chunk-CRTUB5NH.js → chunk-WVRFTL46.js} +1 -1
  123. package/dist/cli/chunks/{chunk-5ZADSKFC.js → chunk-X6HOSOIT.js} +3 -3
  124. package/dist/cli/chunks/{chunk-P5ZV4RCF.js → chunk-XFDOE4QW.js} +2 -2
  125. package/dist/cli/chunks/{chunk-AFQNJJWA.js → chunk-XLFWSEZ4.js} +2 -2
  126. package/dist/cli/chunks/{chunk-FL2G2VFC.js → chunk-XLY5LUNG.js} +2 -2
  127. package/dist/cli/chunks/{chunk-H6IV3LHA.js → chunk-XM3HKZ4U.js} +2 -2
  128. package/dist/cli/chunks/{chunk-MVT2F4Z4.js → chunk-XS63BAQL.js} +4 -4
  129. package/dist/cli/chunks/{chunk-JFWRCQCV.js → chunk-YHROZCDI.js} +2 -2
  130. package/dist/cli/chunks/{chunk-LKRGOCDO.js → chunk-YLSLQ2DT.js} +2 -2
  131. package/dist/cli/chunks/{chunk-Q3MHHREJ.js → chunk-YYGYN4RJ.js} +2 -2
  132. package/dist/cli/chunks/{chunk-6UH7B3PE.js → chunk-ZC5WKTB5.js} +1 -1
  133. package/dist/cli/chunks/chunk-ZGJTIDFI.js +2 -0
  134. package/dist/cli/chunks/{ci-2UUAA532.js → ci-TNCEZMBI.js} +2 -2
  135. package/dist/cli/chunks/{ci-output-NLBMSDOP.js → ci-output-GXRUBE4X.js} +2 -2
  136. package/dist/cli/chunks/{circuit-breaker-UMHTVSA2.js → circuit-breaker-UY3UVWZK.js} +2 -2
  137. package/dist/cli/chunks/{claude-flow-setup-Q6A7T2CH.js → claude-flow-setup-G4PJY2IE.js} +2 -2
  138. package/dist/cli/chunks/client-XZQV5LLD.js +2 -0
  139. package/dist/cli/chunks/{cline-installer-UPIZH2ZF.js → cline-installer-VDCVZLLN.js} +2 -2
  140. package/dist/cli/chunks/{code-TPVQFW7C.js → code-2COXCETT.js} +2 -2
  141. package/dist/cli/chunks/{code-index-extractor-Z7J3RZ4Q.js → code-index-extractor-TBRSOYNZ.js} +2 -2
  142. package/dist/cli/chunks/{codex-installer-GTT3IBZT.js → codex-installer-CNUIJ7RF.js} +2 -2
  143. package/dist/cli/chunks/{completions-TXYGM6BK.js → completions-42LTVU5S.js} +2 -2
  144. package/dist/cli/chunks/{complexity-analyzer-HMXULCFI.js → complexity-analyzer-2ECJ3OPO.js} +2 -2
  145. package/dist/cli/chunks/{continuedev-installer-3GDGFMEE.js → continuedev-installer-FW2GFUG2.js} +2 -2
  146. package/dist/cli/chunks/{copilot-installer-S4KIV6OT.js → copilot-installer-QSV6WUBZ.js} +2 -2
  147. package/dist/cli/chunks/{cost-tracker-E2M57AGD.js → cost-tracker-CH3CSBR5.js} +2 -2
  148. package/dist/cli/chunks/{coverage-NXF6THG2.js → coverage-XNF65ZHG.js} +3 -3
  149. package/dist/cli/chunks/cross-domain-router-FTKMTQQC.js +2 -0
  150. package/dist/cli/chunks/{cursor-installer-GSMPSNIZ.js → cursor-installer-FP44QVKZ.js} +2 -2
  151. package/dist/cli/chunks/{daemon-IGNIH3TQ.js → daemon-RCTFQOCN.js} +3 -3
  152. package/dist/cli/chunks/{dag-attention-scheduler-FFCTYK3P.js → dag-attention-scheduler-SRMUBFRY.js} +2 -2
  153. package/dist/cli/chunks/{detect-CFB72DRI.js → detect-6N6E24MC.js} +2 -2
  154. package/dist/cli/chunks/{dist-node-RGD4BMAQ.js → dist-node-T6UY6WUC.js} +2 -2
  155. package/dist/cli/chunks/{domain-handler-SAKJIOXO.js → domain-handler-67FVCSTC.js} +2 -2
  156. package/dist/cli/chunks/{domain-transfer-44QPKEAY.js → domain-transfer-T6QVO7Q7.js} +2 -2
  157. package/dist/cli/chunks/dream-RB4NFA6Z.js +2 -0
  158. package/dist/cli/chunks/{embed-and-insert-pattern-Z4MA4ZST.js → embed-and-insert-pattern-ZGTGPFKX.js} +2 -2
  159. package/dist/cli/chunks/{eval-IDTYZI7P.js → eval-KBCCSN2V.js} +2 -2
  160. package/dist/cli/chunks/{experience-capture-middleware-HXLGMWLK.js → experience-capture-middleware-QH2I2HCM.js} +3 -3
  161. package/dist/cli/chunks/{fast-paths-V47QDNVC.js → fast-paths-ZP3R5NWJ.js} +2 -2
  162. package/dist/cli/chunks/{feature-flags-RALYJOEU.js → feature-flags-MGYWJNZ2.js} +2 -2
  163. package/dist/cli/chunks/{feature-flags-YWKFG357.js → feature-flags-TTPWNBQU.js} +2 -2
  164. package/dist/cli/chunks/{file-discovery-R3CDYNKP.js → file-discovery-VUIFTAJQ.js} +2 -2
  165. package/dist/cli/chunks/{fleet-XBVAD6CL.js → fleet-RFCEBGRJ.js} +3 -3
  166. package/dist/cli/chunks/{gnn-wrapper-HVZMQHEX.js → gnn-wrapper-JSEZQYAZ.js} +2 -2
  167. package/dist/cli/chunks/{heartbeat-handler-BBHOWYMJ.js → heartbeat-handler-ZRVNKBJK.js} +4 -4
  168. package/dist/cli/chunks/{heartbeat-scheduler-SNUBX4LF.js → heartbeat-scheduler-ZQTLT3DW.js} +2 -2
  169. package/dist/cli/chunks/hnsw-adapter-ZKM2ITVF.js +2 -0
  170. package/dist/cli/chunks/hnsw-index-CFYACM4M.js +2 -0
  171. package/dist/cli/chunks/{hnsw-legacy-bridge-NKQVKQ3J.js → hnsw-legacy-bridge-Y6MPTDAI.js} +2 -2
  172. package/dist/cli/chunks/{better-sqlite3-SAJ7HAFG.js → hnswlib-node-X73LVNSE.js} +2 -2
  173. package/dist/cli/chunks/hooks-RIKFUPBG.js +259 -0
  174. package/dist/cli/chunks/{hybrid-router-YUVRBFMA.js → hybrid-router-B35QFYSN.js} +2 -2
  175. package/dist/cli/chunks/{hypergraph-engine-EKOOW425.js → hypergraph-engine-GABHICVB.js} +2 -2
  176. package/dist/cli/chunks/{hypergraph-handler-M4MSX62E.js → hypergraph-handler-NCMVBN4Q.js} +3 -3
  177. package/dist/cli/chunks/impact-analyzer-DOLCGJKR.js +2 -0
  178. package/dist/cli/chunks/{init-handler-W3DIXGVJ.js → init-handler-7ROPCNFB.js} +6 -6
  179. package/dist/cli/chunks/init-wizard-BMYBCQNH.js +2 -0
  180. package/dist/cli/chunks/kernel-FUWIWNAU.js +2 -0
  181. package/dist/cli/chunks/{kilocode-installer-VVFIT4TJ.js → kilocode-installer-JXHO4YK3.js} +2 -2
  182. package/dist/cli/chunks/{kiro-installer-JCNYLJXT.js → kiro-installer-7SUM4FLK.js} +2 -2
  183. package/dist/cli/chunks/knowledge-graph-JFX7VTYG.js +2 -0
  184. package/dist/cli/chunks/{learning-5X4UDI4G.js → learning-74DAUWK5.js} +3 -3
  185. package/dist/cli/chunks/{llm-router-M6NOWWP3.js → llm-router-LYQ3AJYV.js} +4 -4
  186. package/dist/cli/chunks/{load-UMYB2ZGL.js → load-EKML5ERV.js} +2 -2
  187. package/dist/cli/chunks/load-test-5J6WURNM.js +2 -0
  188. package/dist/cli/chunks/{mcp-ZDAIT7D5.js → mcp-XBL5K2W4.js} +2 -2
  189. package/dist/cli/chunks/{memory-FIWC4JNS.js → memory-FVYBB4DR.js} +5 -5
  190. package/dist/cli/chunks/memory-backend-SLFDDGZB.js +2 -0
  191. package/dist/cli/chunks/{memory-handlers-AHZIB4VB.js → memory-handlers-LN7J33BW.js} +2 -2
  192. package/dist/cli/chunks/{multi-model-executor-SA4CVCSA.js → multi-model-executor-5LK2OUJ7.js} +2 -2
  193. package/dist/cli/chunks/{opencode-installer-S6UDYAAQ.js → opencode-installer-FY7QUQ3U.js} +2 -2
  194. package/dist/cli/chunks/{orchestrator-JNVRGX5Z.js → orchestrator-UYVNXY2H.js} +5 -5
  195. package/dist/cli/chunks/{pipeline-TLZ66K2O.js → pipeline-ZALCCJ2O.js} +2 -2
  196. package/dist/cli/chunks/{platform-MQ5UXRLD.js → platform-J2VZO4PZ.js} +2 -2
  197. package/dist/cli/chunks/{plugin-5S4YEY4C.js → plugin-2J74277Q.js} +2 -2
  198. package/dist/cli/chunks/{prime-radiant-advanced-wasm-LIVSVFZA.js → prime-radiant-advanced-wasm-XUBMJ4Z5.js} +2 -2
  199. package/dist/cli/chunks/protocol-executor-3T2LU2YQ.js +2 -0
  200. package/dist/cli/chunks/{protocol-handler-KQIOJKTK.js → protocol-handler-YGOAM45F.js} +2 -2
  201. package/dist/cli/chunks/{prove-YFRZIQ2O.js → prove-7K3XVHHK.js} +2 -2
  202. package/dist/cli/chunks/{provider-manager-OKEHQIHC.js → provider-manager-S7GYXNYK.js} +2 -2
  203. package/dist/cli/chunks/qe-reasoning-bank-KPX2L7ZZ.js +2 -0
  204. package/dist/cli/chunks/{quality-GGBNSKJU.js → quality-7WK5BINE.js} +2 -2
  205. package/dist/cli/chunks/queen-coordinator-G7ZZKP7M.js +2 -0
  206. package/dist/cli/chunks/{real-embeddings-2KWJAO6Y.js → real-embeddings-SE7AMRSP.js} +2 -2
  207. package/dist/cli/chunks/{roocode-installer-KYZQFIEV.js → roocode-installer-WAMTTOPL.js} +2 -2
  208. package/dist/cli/chunks/router-UNMP4QIG.js +2 -0
  209. package/dist/cli/chunks/routing-feedback-OG5NUKZD.js +2 -0
  210. package/dist/cli/chunks/{routing-handler-Y5FLAUB2.js → routing-handler-PMHQRA32.js} +2 -2
  211. package/dist/cli/chunks/{ruvector-commands-MHSEXDRI.js → ruvector-commands-GFL76O4H.js} +2 -2
  212. package/dist/cli/chunks/{rvf-dual-writer-5PV65OR3.js → rvf-dual-writer-GWBC6LPL.js} +2 -2
  213. package/dist/cli/chunks/{rvf-migration-adapter-3SZW2YA4.js → rvf-migration-adapter-CXIG3BWR.js} +2 -2
  214. package/dist/cli/chunks/{rvf-migration-coordinator-5LN2I44C.js → rvf-migration-coordinator-EOQMTSCT.js} +2 -2
  215. package/dist/cli/chunks/rvf-native-adapter-EPXU4UUM.js +2 -0
  216. package/dist/cli/chunks/safe-db-BYZRI4XX.js +2 -0
  217. package/dist/cli/chunks/schedule-Z4ICJMF6.js +2 -0
  218. package/dist/cli/chunks/scheduler-T4IIRLST.js +2 -0
  219. package/dist/cli/chunks/{security-THETDKDS.js → security-TUU4SO7E.js} +3 -3
  220. package/dist/cli/chunks/shared-rvf-adapter-FDAQL677.js +2 -0
  221. package/dist/cli/chunks/{shared-rvf-dual-writer-NFUIB2ZL.js → shared-rvf-dual-writer-REFYUOL6.js} +2 -2
  222. package/dist/cli/chunks/sqlite-persistence-SNTM6622.js +2 -0
  223. package/dist/cli/chunks/{status-handler-CUW2OUS2.js → status-handler-V3FJKB72.js} +2 -2
  224. package/dist/cli/chunks/{structural-health-IK2LN4ES.js → structural-health-YS2IIXLZ.js} +2 -2
  225. package/dist/cli/chunks/{sync-DA33QCRD.js → sync-K5GEHWLO.js} +2 -2
  226. package/dist/cli/chunks/{task-handler-24CAZ4MB.js → task-handler-XPCZ2JHK.js} +2 -2
  227. package/dist/cli/chunks/{task-handlers-YHMFT7G3.js → task-handlers-JTL52AMR.js} +3 -3
  228. package/dist/cli/chunks/{test-ED6UE2EP.js → test-5FJNVFGF.js} +4 -4
  229. package/dist/cli/chunks/{test-scheduling-RQP2IPFY.js → test-scheduling-JPL25DXR.js} +3 -3
  230. package/dist/cli/chunks/{token-bootstrap-POOTQ33M.js → token-bootstrap-QPFQ4UAT.js} +2 -2
  231. package/dist/cli/chunks/{token-usage-YNKDAQDK.js → token-usage-MVT2IZ5R.js} +2 -2
  232. package/dist/cli/chunks/{transformers-NONXIEJK.js → transformers-ZXK7QT3Z.js} +2 -2
  233. package/dist/cli/chunks/{tree-sitter-wasm-parser-HF7WUMJQ.js → tree-sitter-wasm-parser-VBZAQFTO.js} +2 -2
  234. package/dist/cli/chunks/{types-UUKKK3L5.js → types-UQCZMHTU.js} +2 -2
  235. package/dist/cli/chunks/unified-memory-RL5XRRVQ.js +2 -0
  236. package/dist/cli/chunks/unified-memory-hnsw-FMHZ5TCH.js +2 -0
  237. package/dist/cli/chunks/unified-persistence-GI5NFSWC.js +2 -0
  238. package/dist/cli/chunks/{upgrade-ZNUFD44G.js → upgrade-TETHVGBS.js} +2 -2
  239. package/dist/cli/chunks/{validate-6IFD37Q4.js → validate-7YJTPQC7.js} +2 -2
  240. package/dist/cli/chunks/{validate-swarm-74CENSXV.js → validate-swarm-QO32GODJ.js} +2 -2
  241. package/dist/cli/chunks/{vibium-B2DDFMOQ.js → vibium-HDRQBZAY.js} +2 -2
  242. package/dist/cli/chunks/visual-security-TARFNARP.js +2 -0
  243. package/dist/cli/chunks/{web-tree-sitter-X6ELMFG4.js → web-tree-sitter-4QMH7RWP.js} +2 -2
  244. package/dist/cli/chunks/{windsurf-installer-HEIKCJDP.js → windsurf-installer-HMBCR4V3.js} +2 -2
  245. package/dist/cli/chunks/{witness-chain-TO6YFTUT.js → witness-chain-2SYYDES4.js} +2 -2
  246. package/dist/cli/chunks/witness-chain-U36QGK2S.js +2 -0
  247. package/dist/cli/chunks/{workflow-WY73P2QK.js → workflow-CNFOBA7L.js} +4 -4
  248. package/dist/cli/chunks/workflow-orchestrator-WILFC5ES.js +2 -0
  249. package/dist/cli/chunks/{wrappers-VF7LWJER.js → wrappers-5KG5VXFG.js} +2 -2
  250. package/dist/cli/commands/hooks-handlers/editing-hooks.js +21 -6
  251. package/dist/cli/commands/hooks-handlers/hooks-dream-learning.d.ts +2 -0
  252. package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +106 -6
  253. package/dist/cli/commands/hooks-handlers/hooks-shared.d.ts +20 -0
  254. package/dist/cli/commands/hooks-handlers/hooks-shared.js +111 -6
  255. package/dist/cli/commands/hooks-handlers/routing-hooks.js +33 -35
  256. package/dist/cli/commands/hooks-handlers/task-hooks.js +16 -3
  257. package/dist/kernel/kernel.d.ts +1 -0
  258. package/dist/kernel/kernel.js +21 -0
  259. package/dist/learning/pattern-promotion.d.ts +6 -0
  260. package/dist/learning/pattern-promotion.js +5 -0
  261. package/dist/learning/qe-reasoning-bank-types.d.ts +12 -3
  262. package/dist/learning/qe-reasoning-bank.d.ts +10 -3
  263. package/dist/learning/qe-reasoning-bank.js +67 -15
  264. package/dist/learning/rvf-pattern-store.d.ts +9 -0
  265. package/dist/learning/rvf-pattern-store.js +42 -0
  266. package/dist/learning/sqlite-persistence.d.ts +18 -0
  267. package/dist/learning/sqlite-persistence.js +59 -0
  268. package/dist/mcp/bundle.js +358 -337
  269. package/dist/optimization/index.d.ts +0 -2
  270. package/dist/optimization/index.js +0 -2
  271. package/dist/workers/workers/learning-consolidation.js +9 -3
  272. package/package.json +8 -3
  273. package/dist/cli/chunks/adapter-DRRUAQGD.js +0 -2
  274. package/dist/cli/chunks/aqe-learning-engine-5WYTKZ2I.js +0 -2
  275. package/dist/cli/chunks/base-LQVASZ6V.js +0 -2
  276. package/dist/cli/chunks/browser-workflow-TXQBTTSA.js +0 -2
  277. package/dist/cli/chunks/chunk-EOZIQTHG.js +0 -2
  278. package/dist/cli/chunks/client-TMGGCVZM.js +0 -2
  279. package/dist/cli/chunks/cross-domain-router-3WM3FES7.js +0 -2
  280. package/dist/cli/chunks/dream-SSRYUA2N.js +0 -2
  281. package/dist/cli/chunks/hnsw-adapter-HGJUAHPN.js +0 -2
  282. package/dist/cli/chunks/hnsw-index-Q6GETC2C.js +0 -2
  283. package/dist/cli/chunks/hooks-HOD4SK3C.js +0 -237
  284. package/dist/cli/chunks/impact-analyzer-AIOLML23.js +0 -2
  285. package/dist/cli/chunks/init-wizard-FVH6XXAD.js +0 -2
  286. package/dist/cli/chunks/kernel-EBLOZQ7R.js +0 -2
  287. package/dist/cli/chunks/knowledge-graph-BXVKN4TE.js +0 -2
  288. package/dist/cli/chunks/load-test-DAFHZ5B4.js +0 -2
  289. package/dist/cli/chunks/memory-backend-LW2HMGVV.js +0 -2
  290. package/dist/cli/chunks/protocol-executor-LP4ID64X.js +0 -2
  291. package/dist/cli/chunks/qe-reasoning-bank-6KBZMXKR.js +0 -2
  292. package/dist/cli/chunks/queen-coordinator-3ZAXRHXE.js +0 -2
  293. package/dist/cli/chunks/router-QJUMFZN6.js +0 -2
  294. package/dist/cli/chunks/routing-feedback-TVYNKT3K.js +0 -2
  295. package/dist/cli/chunks/rvf-native-adapter-G5NC4S6V.js +0 -2
  296. package/dist/cli/chunks/safe-db-7STPJWYA.js +0 -2
  297. package/dist/cli/chunks/schedule-NTT6YXMP.js +0 -2
  298. package/dist/cli/chunks/scheduler-BC5VEZI2.js +0 -2
  299. package/dist/cli/chunks/shared-rvf-adapter-T63WSHGK.js +0 -2
  300. package/dist/cli/chunks/sqlite-persistence-GJDAUFQU.js +0 -2
  301. package/dist/cli/chunks/unified-memory-JVMA5MJR.js +0 -2
  302. package/dist/cli/chunks/unified-memory-hnsw-SSBWEA2T.js +0 -2
  303. package/dist/cli/chunks/unified-persistence-CWGWVHCB.js +0 -2
  304. package/dist/cli/chunks/visual-security-LGOI2DGK.js +0 -2
  305. package/dist/cli/chunks/witness-chain-JDFTWTJS.js +0 -2
  306. package/dist/cli/chunks/workflow-orchestrator-IDCHNGN6.js +0 -2
  307. package/dist/optimization/qe-workers.d.ts +0 -193
  308. package/dist/optimization/qe-workers.js +0 -692
@@ -939,7 +939,7 @@
939
939
  },
940
940
  "metadata": {
941
941
  "generatedBy": "Agentic QE Fleet",
942
- "fleetVersion": "3.9.25",
942
+ "fleetVersion": "3.9.27",
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,179 @@ 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.9.27] - 2026-05-14
9
+
10
+ Two architectural fixes from downstream investigations against v3.9.26.
11
+
12
+ ### Fixed
13
+
14
+ - **`session-start` hook could leak unbounded writes to `patterns.rvf`** (#478) —
15
+ `getHooksSystem()` bounded `ReasoningBank.initialize()` with `Promise.race`
16
+ against a 10 s timeout. When the timeout won, the losing init promise kept
17
+ running in the background and continued to append to the RVF pattern store
18
+ indefinitely (downstream report: 43.8 GB written in 29 minutes, disk
19
+ filled, `SIGKILL` required). Threaded an `AbortSignal` through
20
+ `ReasoningBank.initialize()`, `loadPretrainedPatterns()`, and
21
+ `seedCrossDomainPatterns()` — every awaited step now calls
22
+ `signal.throwIfAborted()` before doing work, so the timeout actually
23
+ cancels the bootstrap instead of leaking past it. The hook caller was
24
+ switched from `Promise.race` to `AbortController` + `setTimeout`. The
25
+ hybrid backend init still uses race semantics for now (its own signature
26
+ refactor is separate), but the leaked promise's resulting backend is
27
+ disposed once it resolves so SQLite handles aren't held open in the
28
+ background.
29
+
30
+ - **Hook-driven activity never reached the 13 domain plugins** (#479) — the
31
+ hook subprocess fires events on `hookRegistry`, the kernel-side domain
32
+ plugins listen on `eventBus`, and the two systems were not bridged. In
33
+ default `aqe init --auto` deployments (Claude Code hook driven), every
34
+ domain plugin's `subscribeToEvents()` listened to events that nothing
35
+ emitted; `learning:pattern:*` keys stayed at zero, `qe_learning_optimize`
36
+ reported `experiencesProcessed: 0`, and the `learning-consolidation`
37
+ worker logged "No learning patterns found" on every cycle. Added a
38
+ `CapturedExperienceBridge` that runs inside `QEKernelImpl` and drains the
39
+ shared `captured_experiences` SQLite table (already populated by hooks
40
+ and MCP wrapped handlers) into the kernel's `eventBus` as
41
+ `learning.ExperienceCaptured` plus domain-specific events. Cursor-based
42
+ drain survives kernel restarts and never republishes. Domain plugins now
43
+ receive hook activity transparently in every kernel-owning process
44
+ (CLI, MCP server).
45
+
46
+ ### Removed
47
+
48
+ - **Dead `v3-qe-bridge.sh` script and its config reference** — already
49
+ declared dead in the v3.6.6 release notes; targeted a `v3/dist/` path
50
+ that no longer exists in the flat repo layout, so it silently no-op'd
51
+ every invocation. Removed `.claude/hooks/v3-qe-bridge.sh` and the
52
+ `AQE_V3_HOOK_BRIDGE` env var in `.claude/settings.json`.
53
+
54
+ - **Obsolete planning docs** — `docs/LEARNING_IMPROVEMENT_PLAN.md` and
55
+ `docs/LEARNING_SYSTEMS_ANALYSIS.md` were v3-alpha era artifacts that
56
+ documented the broken bridge as the integration mechanism and referenced
57
+ paths (`v3/src/...`) that haven't existed since the dist flatten.
58
+
59
+ - **Five orphan workers in `src/optimization/qe-workers.ts`** (949 LOC) and
60
+ their tautological tests (407 LOC). `PatternConsolidatorWorker`,
61
+ `DreamConsolidatorWorker`, `CoverageGapScannerWorker`,
62
+ `FlakyTestDetectorWorker`, `RoutingAccuracyMonitorWorker` had zero
63
+ internal callers and no documented use case. Their functionality is
64
+ fully covered by the live `LearningConsolidationWorker`
65
+ (pattern consolidation, dream cycles via `runDreamCycle()`, confidence
66
+ decay, cross-domain identification, Phase 7 continuous learning loop)
67
+ and `FlakyDetectorWorker` (flaky tests). Re-exports in
68
+ `src/optimization/index.ts` cleaned up.
69
+
70
+ ### Changed
71
+
72
+ - **`learning-consolidation` worker error message** now explains the
73
+ bridge dependency instead of telling operators to "ensure the
74
+ learning-optimization domain has stored pattern data" — that message
75
+ predated the bridge fix and gaslighted users on fresh installs.
76
+
77
+ ## [3.9.26] - 2026-05-13
78
+
79
+ **Ten learning-pipeline fixes reported by Jordi against v3.9.24.** Most are
80
+ short-circuits in the post-task hook chain that look fine in isolation but
81
+ break the end-to-end Stream B/D/F learning loop: experiences land tagged as
82
+ `agent='unknown'` and `task='edit: '`, every Q-learning bucket converges on
83
+ the same key, dream insights are generated but never applied, patterns cross
84
+ the promotion thresholds but stay short-term forever, and stale sentinels
85
+ invert the routing-quality metric. Each fix is small but the cumulative
86
+ effect is that the learning loop now actually converges on real per-agent
87
+ signal instead of zeros.
88
+
89
+ ### Fixed
90
+
91
+ - **`post-edit` recorded experiences with `task = "edit: "` for ~88% of
92
+ turns** (#453) — `$TOOL_INPUT_file_path` doesn't expand reliably in
93
+ Claude Code's PostToolUse context, so `--file ""` arrived empty and every
94
+ captured experience was tagged with no path. Embeddings were useless and
95
+ consolidation matched nothing. Now falls back to reading
96
+ `tool_input.file_path` from the Claude Code event JSON on stdin (mirrors
97
+ the existing route-hook stdin path).
98
+
99
+ - **`aqe hooks stats --json` always reported zero** (#454) —
100
+ `QEReasoningBank.getStats()` only read in-memory counters, which reset to
101
+ zero on every hook subprocess start. Live DBs with 1,900+ routing rows
102
+ and 270+ learning outcomes all reported as 0. Now falls back to
103
+ aggregated DB totals when the in-memory counters are zero. Live verify:
104
+ `routingRequests: 1904, avgRoutingConfidence: 0.396, learningOutcomes:
105
+ 272, patternSuccessRate: 0.75`.
106
+
107
+ - **Patterns never promoted from `short-term` to `long-term`** (#455) —
108
+ `recordOutcome()` runs with a synthetic `task:agent:taskId` pattern ID
109
+ that never matches `qe_patterns.id`, so the promotion check was always
110
+ skipped. The bridge loop in `persistTaskOutcome` updates the real pattern
111
+ IDs but had no inline promotion check. Patterns crossed
112
+ `successful_uses≥3 / success_rate≥0.7 / confidence≥0.6` and stayed pinned
113
+ at short-term forever. Added a guarded UPDATE inside the bridge loop.
114
+
115
+ - **Dream cycles wrote insights but never applied them** (#456) — hook-fired
116
+ dreams called `engine.dream()` and closed the engine without invoking
117
+ `applyInsight()`. `DreamScheduler.autoApplyInsights()` wires this in the
118
+ daemon path; the hook path had no equivalent. Reporter saw 378 unapplied
119
+ insights vs. 9 applied. Now iterates `result.insights` and applies each
120
+ `actionable && confidenceScore ≥ 0.5` after `dream()` returns.
121
+
122
+ - **Q-learning router couldn't differentiate per agent** (#460) —
123
+ `--agent "$TOOL_RESULT_agent_id"` arrived empty (Claude Code doesn't
124
+ expose that env var in PostToolUse), so every `rl_q_values` row landed
125
+ under `action_key='unknown'`. Now falls back to the pre-task bridge's
126
+ recommended agent when `--agent` is empty, while still respecting an
127
+ explicit user override.
128
+
129
+ - **Concurrent hooks triggered overlapping dream cycles that died on
130
+ `database is locked`** (#461) — multiple subprocesses saw the same stale
131
+ `lastDreamTime`, all started ~10s cycles, and ~35% failed on the WAL
132
+ writer (`busy_timeout` only serializes sequential contention, not
133
+ simultaneous writers). Added a `dream_cycles` peek before opening the
134
+ engine: if a `status='running'` row exists in the last 60s, bail out
135
+ with `reason='already-running'`. Fail-open.
136
+
137
+ - **`patterns.rvf` accumulated orphan vectors across upgrades** (#462) —
138
+ upgrade workflows rewrote `qe_patterns` via `INSERT OR REPLACE` without
139
+ calling `RvfPatternStore.delete()` on the old IDs. Ghost vectors won
140
+ cosine-similarity matches and routed to non-existent IDs, so
141
+ `getPattern()` returned null and writes failed silently. Reporter saw
142
+ 24 RVF vectors vs. 16 DB rows. `initialize()` now diffs the RVF idmap
143
+ against the DB and deletes orphans on every cold start.
144
+
145
+ - **`experience_applications.tokens_saved` was hardcoded to 0** (#463) —
146
+ the learning-ROI column was permanently useless across every post-task
147
+ invocation. Replaced the literal 0 with `Math.round(qualityScore * 100)`,
148
+ scaling the existing 6-dim outcome quality (0.335 worst-case to 0.675
149
+ best-case) into a non-trivial 34-68 signal until a real per-task
150
+ token-delta calculation is wired in.
151
+
152
+ - **High-quality `cli-hook` experiences blanket-excluded from
153
+ consolidation** (#464) — issue #348 had filtered out
154
+ `agent='cli-hook'` rows to keep low-quality Bash telemetry
155
+ (quality ~0.40) out of the pipeline. But post-edit experiences are also
156
+ tagged `agent='cli-hook'` with quality ~0.75 and success_rate ~1.0,
157
+ and they're the dominant share. The `HAVING avg_quality≥0.5 AND
158
+ success_rate≥0.6` clause already filters by quality — dropping the
159
+ over-broad agent-name filter so real usage produces patterns again.
160
+
161
+ - **Stale `routing_outcomes` sentinels inverted the quality metric** (#465)
162
+ — sessions that terminated without firing `Stop` (compact, kill, IDE
163
+ crash) left their sentinels at `quality_score=-1` forever, and newer
164
+ sessions kept pre-empting them in `ORDER BY DESC` so the LIMIT-1 close
165
+ never reached them. Reporter saw 122/149 rows stuck at -1, inverting
166
+ `AVG(quality_score)` from a real +0.666 to an observed -0.717. `post-route`
167
+ now runs a second sweep UPDATE on sentinels older than 5 minutes, tagged
168
+ with `error='stale-sentinel'` for filterability.
169
+
170
+ ### Closed as duplicates
171
+
172
+ - #457 (dup of #454) — getStats DB aggregation fallback
173
+ - #458 (dup of #455) — bridge-loop pattern promotion
174
+ - #459 (dup of #456) — dream insight auto-apply
175
+
176
+ ### Security
177
+
178
+ - **Patched 11 Dependabot alerts** — `@protobufjs/utf8` and OpenTelemetry
179
+ bumps merged from main (#476).
180
+
8
181
  ## [3.9.25] - 2026-05-12
9
182
 
10
183
  **Fixes the route sentinel that `routing_outcomes` never closed.** `route` hooks
@@ -939,7 +939,7 @@
939
939
  },
940
940
  "metadata": {
941
941
  "generatedBy": "Agentic QE Fleet",
942
- "fleetVersion": "3.9.25",
942
+ "fleetVersion": "3.9.27",
943
943
  "manifestVersion": "1.4.0",
944
944
  "lastUpdated": "2026-04-13T00:00:00.000Z",
945
945
  "contributors": [
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Captured-Experience Bridge — Issue #479
3
+ *
4
+ * Drains rows from the `captured_experiences` SQLite table (populated by
5
+ * hook subprocesses that fire on every Claude Code Edit/Task/Bash) and
6
+ * republishes each row as a `DomainEvent` on the kernel-side `eventBus`.
7
+ *
8
+ * This is the *only* path by which hook-driven activity reaches the 13
9
+ * domain plugins' `subscribeToEvents()` registrations. Hook subprocesses
10
+ * are short-lived `npx aqe hooks ...` processes — they have no eventBus
11
+ * and no domain plugins, so a direct `hookRegistry → eventBus` subscriber
12
+ * inside `getHooksSystem()` cannot work. The shared state hooks leave
13
+ * behind is the SQLite table; this bridge is the consumer of that queue.
14
+ *
15
+ * Wired from `QEKernelImpl.initialize()` so every process that owns a
16
+ * kernel (CLI commands, MCP server) automatically picks up new hook
17
+ * captures and fans them out as domain events.
18
+ */
19
+ import type { EventBus, MemoryBackend } from '../kernel/interfaces.js';
20
+ export interface CapturedExperienceBridgeOptions {
21
+ intervalMs?: number;
22
+ batchSize?: number;
23
+ }
24
+ export declare class CapturedExperienceBridge {
25
+ private readonly eventBus;
26
+ private readonly memory;
27
+ private cursor;
28
+ private intervalId;
29
+ private draining;
30
+ private readonly intervalMs;
31
+ private readonly batchSize;
32
+ constructor(eventBus: EventBus, memory: MemoryBackend, options?: CapturedExperienceBridgeOptions);
33
+ start(): Promise<void>;
34
+ stop(): Promise<void>;
35
+ /** Visible for tests — perform one drain pass on demand. */
36
+ drainOnce(): Promise<number>;
37
+ private drainSafe;
38
+ private drain;
39
+ }
40
+ //# sourceMappingURL=captured-experience-bridge.d.ts.map
@@ -0,0 +1,232 @@
1
+ /**
2
+ * Captured-Experience Bridge — Issue #479
3
+ *
4
+ * Drains rows from the `captured_experiences` SQLite table (populated by
5
+ * hook subprocesses that fire on every Claude Code Edit/Task/Bash) and
6
+ * republishes each row as a `DomainEvent` on the kernel-side `eventBus`.
7
+ *
8
+ * This is the *only* path by which hook-driven activity reaches the 13
9
+ * domain plugins' `subscribeToEvents()` registrations. Hook subprocesses
10
+ * are short-lived `npx aqe hooks ...` processes — they have no eventBus
11
+ * and no domain plugins, so a direct `hookRegistry → eventBus` subscriber
12
+ * inside `getHooksSystem()` cannot work. The shared state hooks leave
13
+ * behind is the SQLite table; this bridge is the consumer of that queue.
14
+ *
15
+ * Wired from `QEKernelImpl.initialize()` so every process that owns a
16
+ * kernel (CLI commands, MCP server) automatically picks up new hook
17
+ * captures and fans them out as domain events.
18
+ */
19
+ import { randomUUID } from 'crypto';
20
+ import { getUnifiedMemory } from '../kernel/unified-memory.js';
21
+ /** Cursor key in the kernel's MemoryBackend so the bridge resumes after restart. */
22
+ const CURSOR_KEY = 'aqe/bridge/captured-experiences/cursor';
23
+ /** Default polling cadence — short enough that domain plugins react quickly,
24
+ * long enough that idle systems don't burn CPU. */
25
+ const DEFAULT_INTERVAL_MS = 5_000;
26
+ /** Cap rows per drain so a backlog doesn't block the event loop. */
27
+ const DEFAULT_BATCH_SIZE = 100;
28
+ export class CapturedExperienceBridge {
29
+ eventBus;
30
+ memory;
31
+ cursor = 0;
32
+ intervalId;
33
+ draining = false;
34
+ intervalMs;
35
+ batchSize;
36
+ constructor(eventBus, memory, options = {}) {
37
+ this.eventBus = eventBus;
38
+ this.memory = memory;
39
+ this.intervalMs = options.intervalMs ?? DEFAULT_INTERVAL_MS;
40
+ this.batchSize = options.batchSize ?? DEFAULT_BATCH_SIZE;
41
+ }
42
+ async start() {
43
+ if (this.intervalId)
44
+ return;
45
+ // Restore cursor so we don't re-publish events from prior process lifetimes.
46
+ const stored = await this.memory.get(CURSOR_KEY);
47
+ this.cursor = typeof stored === 'number' ? stored : 0;
48
+ // Drain immediately so events sitting in the table from the last hook
49
+ // burst reach the domains without waiting for the first tick.
50
+ await this.drainSafe();
51
+ this.intervalId = setInterval(() => {
52
+ void this.drainSafe();
53
+ }, this.intervalMs);
54
+ // Don't keep the process alive solely for this poller.
55
+ this.intervalId.unref?.();
56
+ }
57
+ async stop() {
58
+ if (this.intervalId) {
59
+ clearInterval(this.intervalId);
60
+ this.intervalId = undefined;
61
+ }
62
+ }
63
+ /** Visible for tests — perform one drain pass on demand. */
64
+ async drainOnce() {
65
+ return this.drainSafe();
66
+ }
67
+ async drainSafe() {
68
+ if (this.draining)
69
+ return 0;
70
+ this.draining = true;
71
+ try {
72
+ return await this.drain();
73
+ }
74
+ catch (err) {
75
+ // Bridge is best-effort: never crash the kernel because of a stale
76
+ // schema or a transient SQLite lock. Surface to console so operators
77
+ // can spot persistent failures.
78
+ console.warn('[CapturedExperienceBridge] drain failed:', err instanceof Error ? err.message : err);
79
+ return 0;
80
+ }
81
+ finally {
82
+ this.draining = false;
83
+ }
84
+ }
85
+ async drain() {
86
+ const um = getUnifiedMemory();
87
+ if (!um.isInitialized())
88
+ return 0;
89
+ const db = um.getDatabase();
90
+ // Skip cleanly if the schema isn't there yet (kernel started before any
91
+ // hook ever fired in this project).
92
+ const tableExists = db
93
+ .prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='captured_experiences'")
94
+ .get();
95
+ if (!tableExists)
96
+ return 0;
97
+ const rows = db
98
+ .prepare(`SELECT rowid, id, task, agent, domain, success, quality,
99
+ duration_ms, source, completed_at
100
+ FROM captured_experiences
101
+ WHERE rowid > ?
102
+ ORDER BY rowid ASC
103
+ LIMIT ?`)
104
+ .all(this.cursor, this.batchSize);
105
+ if (rows.length === 0)
106
+ return 0;
107
+ let published = 0;
108
+ for (const row of rows) {
109
+ for (const event of mapRowToEvents(row)) {
110
+ try {
111
+ await this.eventBus.publish(event);
112
+ published += 1;
113
+ }
114
+ catch (err) {
115
+ // One bad subscriber must not stall the whole drain.
116
+ console.warn(`[CapturedExperienceBridge] publish failed for ${event.type}:`, err instanceof Error ? err.message : err);
117
+ }
118
+ }
119
+ this.cursor = row.rowid;
120
+ }
121
+ await this.memory.set(CURSOR_KEY, this.cursor);
122
+ return published;
123
+ }
124
+ }
125
+ // ----------------------------------------------------------------------
126
+ // Row → DomainEvent mapping
127
+ // ----------------------------------------------------------------------
128
+ //
129
+ // Every captured experience yields a `learning.ExperienceCaptured` event
130
+ // (the learning-optimization domain consumes this for its replay/dream
131
+ // pipeline). When the row's `domain` field matches a known QE domain, we
132
+ // also emit the domain-specific event the corresponding plugin listens
133
+ // for in `subscribeToEvents()`.
134
+ //
135
+ // Mapping is intentionally narrow: we only emit events that at least one
136
+ // domain plugin actually subscribes to (verified at issue #479 filing).
137
+ // Adding a new event here only makes sense after a subscriber exists.
138
+ function mapRowToEvents(row) {
139
+ const timestamp = parseTimestamp(row.completed_at);
140
+ const correlationId = row.id;
141
+ const events = [];
142
+ // 1. Universal experience event — always emit.
143
+ events.push(buildEvent({
144
+ type: 'learning.ExperienceCaptured',
145
+ source: 'learning-optimization',
146
+ correlationId,
147
+ timestamp,
148
+ payload: {
149
+ experienceId: row.id,
150
+ domain: row.domain ?? '',
151
+ agent: row.agent ?? '',
152
+ task: row.task ?? '',
153
+ success: row.success === 1,
154
+ quality: row.quality,
155
+ durationMs: row.duration_ms,
156
+ sourceHook: row.source ?? '',
157
+ },
158
+ }));
159
+ // 2. Domain-specific event — fan out by `domain` field.
160
+ const domainSpecific = mapDomainSpecificEvent(row, timestamp, correlationId);
161
+ if (domainSpecific)
162
+ events.push(domainSpecific);
163
+ return events;
164
+ }
165
+ function mapDomainSpecificEvent(row, timestamp, correlationId) {
166
+ const basePayload = {
167
+ experienceId: row.id,
168
+ agent: row.agent ?? '',
169
+ task: row.task ?? '',
170
+ success: row.success === 1,
171
+ quality: row.quality,
172
+ durationMs: row.duration_ms,
173
+ };
174
+ switch (row.domain) {
175
+ case 'test-generation':
176
+ return buildEvent({
177
+ type: 'test-generation.TestGenerated',
178
+ source: 'test-generation',
179
+ correlationId,
180
+ timestamp,
181
+ payload: basePayload,
182
+ });
183
+ case 'test-execution':
184
+ return buildEvent({
185
+ type: 'test-execution.TestRunCompleted',
186
+ source: 'test-execution',
187
+ correlationId,
188
+ timestamp,
189
+ payload: basePayload,
190
+ });
191
+ case 'coverage-analysis':
192
+ // Successful coverage runs publish CoverageReportCreated;
193
+ // failed/incomplete runs publish CoverageGapDetected so the
194
+ // subscribers (code-intelligence, test-generation) can react.
195
+ return buildEvent({
196
+ type: row.success === 1
197
+ ? 'coverage-analysis.CoverageReportCreated'
198
+ : 'coverage-analysis.CoverageGapDetected',
199
+ source: 'coverage-analysis',
200
+ correlationId,
201
+ timestamp,
202
+ payload: basePayload,
203
+ });
204
+ case 'code-intelligence':
205
+ // Hook-fired edits surface here as FileChanged; the plugin's
206
+ // handler decides whether to re-index based on payload.
207
+ return buildEvent({
208
+ type: 'code-intelligence.FileChanged',
209
+ source: 'code-intelligence',
210
+ correlationId,
211
+ timestamp,
212
+ payload: basePayload,
213
+ });
214
+ default:
215
+ return null;
216
+ }
217
+ }
218
+ function buildEvent(input) {
219
+ return {
220
+ id: randomUUID(),
221
+ type: input.type,
222
+ timestamp: input.timestamp,
223
+ source: input.source,
224
+ correlationId: input.correlationId,
225
+ payload: input.payload,
226
+ };
227
+ }
228
+ function parseTimestamp(value) {
229
+ const parsed = new Date(value);
230
+ return Number.isNaN(parsed.getTime()) ? new Date() : parsed;
231
+ }
232
+ //# sourceMappingURL=captured-experience-bridge.js.map
@@ -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.9.25");process.exit(0)}
3
- import{a as y}from"./chunks/chunk-VZVHYH7B.js";import{a as f,c as A}from"./chunks/chunk-SKRQF45C.js";import"./chunks/chunk-3OPXTQMB.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.9.27");process.exit(0)}
3
+ import{a as y}from"./chunks/chunk-MSA7UH3M.js";import{a as f,c as A}from"./chunks/chunk-WHI7FVTH.js";import"./chunks/chunk-CNWWQYZ3.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-EBLOZQ7R.js"),{CrossDomainEventRouter:i}=await import("./chunks/cross-domain-router-3WM3FES7.js"),{DefaultProtocolExecutor:a}=await import("./chunks/protocol-executor-LP4ID64X.js"),{WorkflowOrchestrator:s}=await import("./chunks/workflow-orchestrator-IDCHNGN6.js"),{createQueenCoordinator:l}=await import("./chunks/queen-coordinator-3ZAXRHXE.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-BC5VEZI2.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...y]}),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-FUWIWNAU.js"),{CrossDomainEventRouter:i}=await import("./chunks/cross-domain-router-FTKMTQQC.js"),{DefaultProtocolExecutor:a}=await import("./chunks/protocol-executor-3T2LU2YQ.js"),{WorkflowOrchestrator:s}=await import("./chunks/workflow-orchestrator-WILFC5ES.js"),{createQueenCoordinator:l}=await import("./chunks/queen-coordinator-G7ZZKP7M.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-T4IIRLST.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...y]}),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.9.25";n.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(v);d(n,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-W3DIXGVJ.js").then(e=>e.createInitHandler(r)),t);d(n,"status","Show system status",()=>import("./chunks/status-handler-CUW2OUS2.js").then(e=>e.createStatusHandler(r,k)),t);d(n,"health","Check system health",()=>import("./chunks/status-handler-CUW2OUS2.js").then(e=>e.createHealthHandler(r,k)),t);d(n,"task","Manage QE tasks",()=>import("./chunks/task-handler-24CAZ4MB.js").then(e=>e.createTaskHandler(r,c)),t);d(n,"agent","Manage QE agents",()=>import("./chunks/agent-handler-3FEJU2TM.js").then(e=>e.createAgentHandler(r,c)),t);d(n,"domain","Domain operations",()=>import("./chunks/domain-handler-SAKJIOXO.js").then(e=>e.createDomainHandler(r,c)),t);d(n,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-KQIOJKTK.js").then(e=>e.createProtocolHandler(r,c)),t);d(n,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-IVRXCPLL.js").then(e=>e.createBrainHandler(r,c)),t);d(n,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-M4MSX62E.js").then(e=>e.createHypergraphHandler(r,c)),t,["hg"]);d(n,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-BBHOWYMJ.js").then(e=>e.createHeartbeatHandler(r)),t);d(n,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-Y5FLAUB2.js").then(e=>e.createRoutingHandler(r)),t);o(n,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-WY73P2QK.js").then(e=>e.createWorkflowCommand(t,r,c))});o(n,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-ED6UE2EP.js").then(e=>e.createTestCommand(t,r,c))});o(n,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-NXF6THG2.js").then(e=>e.createCoverageCommand(t,r,c))});o(n,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-GGBNSKJU.js").then(e=>e.createQualityCommand(t,r,c))});o(n,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-THETDKDS.js").then(e=>e.createSecurityCommand(t,r,c))});o(n,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-TPVQFW7C.js").then(e=>e.createCodeCommand(t,r,c))});o(n,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-TXYGM6BK.js").then(e=>e.createCompletionsCommand(r))});o(n,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-ZNUFD44G.js").then(e=>e.createUpgradeCommand(r))});o(n,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-XBVAD6CL.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-74CENSXV.js").then(e=>e.createValidateSwarmCommand(t,r,c))});o(n,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-6IFD37Q4.js").then(e=>e.createValidateCommand(t,r,c))});o(n,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-IDTYZI7P.js").then(e=>e.createEvalCommand())});o(n,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-2UUAA532.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-YNKDAQDK.js").then(e=>e.createTokenUsageCommand())});o(n,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-M6NOWWP3.js").then(e=>e.createLLMRouterCommand())});o(n,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-DA33QCRD.js").then(e=>e.createSyncCommands())});o(n,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-HOD4SK3C.js").then(e=>e.createHooksCommand())});o(n,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-5X4UDI4G.js").then(e=>e.createLearningCommand())});o(n,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>import("./chunks/memory-FIWC4JNS.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-ZDAIT7D5.js").then(e=>e.createMcpCommand())});o(n,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-MQ5UXRLD.js").then(e=>e.createPlatformCommand())});o(n,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-YFRZIQ2O.js").then(e=>e.createProveCommand(t,r,c))});o(n,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-MHSEXDRI.js").then(e=>e.createRuVectorCommand())});o(n,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-FSLEJMM5.js").then(e=>e.createAuditCommand(t,r,c))});o(n,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-TLZ66K2O.js").then(e=>e.createPipelineCommand(t,r,c))});o(n,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-5S4YEY4C.js").then(e=>e.createPluginCommand())});o(n,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-IGNIH3TQ.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.9.27";n.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(v);d(n,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-7ROPCNFB.js").then(e=>e.createInitHandler(r)),t);d(n,"status","Show system status",()=>import("./chunks/status-handler-V3FJKB72.js").then(e=>e.createStatusHandler(r,k)),t);d(n,"health","Check system health",()=>import("./chunks/status-handler-V3FJKB72.js").then(e=>e.createHealthHandler(r,k)),t);d(n,"task","Manage QE tasks",()=>import("./chunks/task-handler-XPCZ2JHK.js").then(e=>e.createTaskHandler(r,c)),t);d(n,"agent","Manage QE agents",()=>import("./chunks/agent-handler-NGVDEBFM.js").then(e=>e.createAgentHandler(r,c)),t);d(n,"domain","Domain operations",()=>import("./chunks/domain-handler-67FVCSTC.js").then(e=>e.createDomainHandler(r,c)),t);d(n,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-YGOAM45F.js").then(e=>e.createProtocolHandler(r,c)),t);d(n,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-ZFLB6Q37.js").then(e=>e.createBrainHandler(r,c)),t);d(n,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-NCMVBN4Q.js").then(e=>e.createHypergraphHandler(r,c)),t,["hg"]);d(n,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-ZRVNKBJK.js").then(e=>e.createHeartbeatHandler(r)),t);d(n,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-PMHQRA32.js").then(e=>e.createRoutingHandler(r)),t);o(n,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-CNFOBA7L.js").then(e=>e.createWorkflowCommand(t,r,c))});o(n,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-5FJNVFGF.js").then(e=>e.createTestCommand(t,r,c))});o(n,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-XNF65ZHG.js").then(e=>e.createCoverageCommand(t,r,c))});o(n,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-7WK5BINE.js").then(e=>e.createQualityCommand(t,r,c))});o(n,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-TUU4SO7E.js").then(e=>e.createSecurityCommand(t,r,c))});o(n,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-2COXCETT.js").then(e=>e.createCodeCommand(t,r,c))});o(n,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-42LTVU5S.js").then(e=>e.createCompletionsCommand(r))});o(n,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-TETHVGBS.js").then(e=>e.createUpgradeCommand(r))});o(n,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-RFCEBGRJ.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-QO32GODJ.js").then(e=>e.createValidateSwarmCommand(t,r,c))});o(n,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-7YJTPQC7.js").then(e=>e.createValidateCommand(t,r,c))});o(n,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-KBCCSN2V.js").then(e=>e.createEvalCommand())});o(n,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-TNCEZMBI.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-MVT2IZ5R.js").then(e=>e.createTokenUsageCommand())});o(n,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-LYQ3AJYV.js").then(e=>e.createLLMRouterCommand())});o(n,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-K5GEHWLO.js").then(e=>e.createSyncCommands())});o(n,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-RIKFUPBG.js").then(e=>e.createHooksCommand())});o(n,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-74DAUWK5.js").then(e=>e.createLearningCommand())});o(n,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>import("./chunks/memory-FVYBB4DR.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-XBL5K2W4.js").then(e=>e.createMcpCommand())});o(n,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-J2VZO4PZ.js").then(e=>e.createPlatformCommand())});o(n,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-7K3XVHHK.js").then(e=>e.createProveCommand(t,r,c))});o(n,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-GFL76O4H.js").then(e=>e.createRuVectorCommand())});o(n,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-KTNR6LYC.js").then(e=>e.createAuditCommand(t,r,c))});o(n,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-ZALCCJ2O.js").then(e=>e.createPipelineCommand(t,r,c))});o(n,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-2J74277Q.js").then(e=>e.createPluginCommand())});o(n,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-RCTFQOCN.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 z(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-V47QDNVC.js");e(process.argv)&&(console.log(v),process.exit(0));let{bootstrapTokenTracking:i}=await import("./chunks/token-bootstrap-POOTQ33M.js");await i({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"}),await n.parseAsync(),await r(0)}z().catch(async e=>{console.error(m.red("Fatal error:"),e),await r(1)});
13
+ Received SIGTERM, shutting down gracefully...`)),await r(0)});async function z(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-ZP3R5NWJ.js");e(process.argv)&&(console.log(v),process.exit(0));let{bootstrapTokenTracking:i}=await import("./chunks/token-bootstrap-QPFQ4UAT.js");await i({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"}),await n.parseAsync(),await r(0)}z().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.9.27");process.exit(0)}
2
+ import{a,b,c}from"./chunk-WPN2NYZ3.js";import"./chunk-YYGYN4RJ.js";import"./chunk-GXHMSIBM.js";import"./chunk-PIR3KN5M.js";import"./chunk-WHI7FVTH.js";import"./chunk-CNWWQYZ3.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.9.25");process.exit(0)}
2
- import{a as x}from"./chunk-EOZIQTHG.js";import{c as f}from"./chunk-P5ZV4RCF.js";import"./chunk-3OPXTQMB.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.9.27");process.exit(0)}
2
+ import{a as x}from"./chunk-ZGJTIDFI.js";import{c as f}from"./chunk-XFDOE4QW.js";import"./chunk-CNWWQYZ3.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.9.25");process.exit(0)}
2
- import{b as p}from"./chunk-4DVQS5LA.js";import{a as g}from"./chunk-NADXRFKX.js";import"./chunk-5XCHNZNW.js";import"./chunk-3OPXTQMB.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.9.27");process.exit(0)}
2
+ import{b as p}from"./chunk-5WPQATT7.js";import{a as g}from"./chunk-J6EDIEZB.js";import"./chunk-PIR3KN5M.js";import"./chunk-CNWWQYZ3.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.9.25");process.exit(0)}
2
- import"./chunk-3OPXTQMB.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.9.27");process.exit(0)}
2
+ import"./chunk-CNWWQYZ3.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.9.27");process.exit(0)}
2
+ import{a,b,c,d,e,f}from"./chunk-I73XKAOF.js";import"./chunk-F5PNA7J3.js";import"./chunk-S3QE2RBR.js";import"./chunk-PMP6QRTB.js";import"./chunk-W5EOH4NH.js";import"./chunk-RAVTYXUD.js";import"./chunk-RPDLRKAT.js";import"./chunk-6BIHLI3A.js";import"./chunk-6R2OTCWG.js";import"./chunk-6BGF3VZJ.js";import"./chunk-HV7V34DZ.js";import"./chunk-O7XW2BWN.js";import"./chunk-5DDRRXKR.js";import"./chunk-T46HLTI3.js";import"./chunk-JN7WVS57.js";import"./chunk-ZGJTIDFI.js";import"./chunk-XFDOE4QW.js";import"./chunk-PIR3KN5M.js";import"./chunk-MSA7UH3M.js";import"./chunk-WHI7FVTH.js";import"./chunk-SCS3RUTT.js";import"./chunk-HPB5MPJP.js";import"./chunk-RE5OY7WL.js";import"./chunk-HYCRKKJN.js";import"./chunk-2J3B4ONK.js";import"./chunk-CYNQW276.js";import"./chunk-WLT5RGLK.js";import"./chunk-HEZJOCD7.js";import"./chunk-XLFWSEZ4.js";import"./chunk-2MO2U3NO.js";import"./chunk-CNWWQYZ3.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};
@@ -1,3 +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.9.25");process.exit(0)}
2
- import{f as s,o as p}from"./chunk-7G2UJMKQ.js";import"./chunk-AQXKM5VB.js";import{d as c,e as u,f as h,g as m}from"./chunk-2IRRXFBV.js";import"./chunk-EOZIQTHG.js";import"./chunk-P5ZV4RCF.js";import"./chunk-5XCHNZNW.js";import"./chunk-SKRQF45C.js";import"./chunk-R7VO6E3E.js";import{p as l,q as d}from"./chunk-THQNIMJU.js";import"./chunk-W5RRYCQ7.js";import"./chunk-LTWNVZDR.js";import"./chunk-ML7AEOPI.js";import"./chunk-SDOG2MMY.js";import"./chunk-4FRRDVWH.js";import"./chunk-AFQNJJWA.js";import"./chunk-4ASWQOFE.js";import{g as f}from"./chunk-3OPXTQMB.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(`
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.9.27");process.exit(0)}
2
+ import{f as s,o as p}from"./chunk-T46HLTI3.js";import"./chunk-JN7WVS57.js";import{d as c,e as u,f as h,g as m}from"./chunk-DL6L4FGW.js";import"./chunk-ZGJTIDFI.js";import"./chunk-XFDOE4QW.js";import"./chunk-PIR3KN5M.js";import"./chunk-WHI7FVTH.js";import"./chunk-HPB5MPJP.js";import{p as l,q as d}from"./chunk-RE5OY7WL.js";import"./chunk-HYCRKKJN.js";import"./chunk-2J3B4ONK.js";import"./chunk-CYNQW276.js";import"./chunk-WLT5RGLK.js";import"./chunk-HEZJOCD7.js";import"./chunk-XLFWSEZ4.js";import"./chunk-2MO2U3NO.js";import{g as f}from"./chunk-CNWWQYZ3.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
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};