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
@@ -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{a as i,b as v,c as d,d as p}from"./chunk-MYDJYPBT.js";import{a as h}from"./chunk-XNXFB4TV.js";import"./chunk-3LSHQUQ2.js";import{a as k}from"./chunk-7VNGENWZ.js";import"./chunk-MAWGLIAE.js";import"./chunk-5DOCH2OX.js";import"./chunk-73SK2MNU.js";import"./chunk-P6REB3IC.js";import"./chunk-NURG5LQO.js";import"./chunk-ZGGHGWXF.js";import"./chunk-XXG6OQSR.js";import"./chunk-DNIU6W6Z.js";import"./chunk-7G2UJMKQ.js";import"./chunk-AQXKM5VB.js";import"./chunk-2IRRXFBV.js";import"./chunk-EOZIQTHG.js";import"./chunk-P5ZV4RCF.js";import"./chunk-5XCHNZNW.js";import"./chunk-VZVHYH7B.js";import"./chunk-SKRQF45C.js";import"./chunk-IV4OBL4P.js";import"./chunk-R7VO6E3E.js";import"./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"./chunk-3OPXTQMB.js";import{Command as x}from"commander";import o from"chalk";function _(e,t,a){let c=new x("validate").description("Validation commands for skills and agents");return c.command("swarm").description("Validate skills in parallel using Claude Flow swarms (ADR-056)").option("-s, --skills <skills>",'Comma-separated list of skills to validate, or "all" for P0 skills',"all").option("-m, --models <models>","Comma-separated list of models to validate against",p.join(",")).option("-t, --topology <topology>","Swarm topology: hierarchical or mesh","hierarchical").option("--max-concurrent <number>","Maximum concurrent skill validations",String(i.maxConcurrentSkills)).option("--max-models <number>","Maximum concurrent models per skill",String(i.maxConcurrentModels)).option("--timeout <ms>","Timeout per validation in milliseconds",String(i.timeout)).option("--no-retry","Disable retries on failure").option("-v, --verbose","Show detailed output").option("--json","Output results as JSON").action(async l=>{if(await a())try{console.log(o.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{a as i,b as v,c as d,d as p}from"./chunk-2O6XVANK.js";import{a as h}from"./chunk-2Z2DD5YW.js";import"./chunk-7QXW6HLF.js";import{a as k}from"./chunk-ET5RCLBO.js";import"./chunk-Q5GQ267O.js";import"./chunk-LXGVB3FK.js";import"./chunk-3BTSXIJ3.js";import"./chunk-4K7KTT4Q.js";import"./chunk-W5EOH4NH.js";import"./chunk-RPDLRKAT.js";import"./chunk-6BIHLI3A.js";import"./chunk-5DDRRXKR.js";import"./chunk-T46HLTI3.js";import"./chunk-JN7WVS57.js";import"./chunk-DL6L4FGW.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";import{Command as x}from"commander";import o from"chalk";function _(e,t,a){let c=new x("validate").description("Validation commands for skills and agents");return c.command("swarm").description("Validate skills in parallel using Claude Flow swarms (ADR-056)").option("-s, --skills <skills>",'Comma-separated list of skills to validate, or "all" for P0 skills',"all").option("-m, --models <models>","Comma-separated list of models to validate against",p.join(",")).option("-t, --topology <topology>","Swarm topology: hierarchical or mesh","hierarchical").option("--max-concurrent <number>","Maximum concurrent skill validations",String(i.maxConcurrentSkills)).option("--max-models <number>","Maximum concurrent models per skill",String(i.maxConcurrentModels)).option("--timeout <ms>","Timeout per validation in milliseconds",String(i.timeout)).option("--no-retry","Disable retries on failure").option("-v, --verbose","Show detailed output").option("--json","Output results as JSON").action(async l=>{if(await a())try{console.log(o.blue(`
3
3
  Swarm Skill Validation
4
4
  `));let r=l.skills==="all"?[...d]:l.skills.split(",").map(y=>y.trim()),u=l.models.split(",").map(y=>y.trim()),g=P(l.topology),n={topology:g,maxConcurrentSkills:parseInt(l.maxConcurrent,10)||i.maxConcurrentSkills,maxConcurrentModels:parseInt(l.maxModels,10)||i.maxConcurrentModels,timeout:parseInt(l.timeout,10)||i.timeout,continueOnFailure:!0,retry:l.retry!==!1?i.retry:void 0};l.verbose&&(console.log(o.gray("Configuration:")),console.log(o.gray(` Topology: ${n.topology}`)),console.log(o.gray(` Skills: ${r.length}`)),console.log(o.gray(` Models: ${u.length}`)),console.log(o.gray(` Max Concurrent Skills: ${n.maxConcurrentSkills}`)),console.log(o.gray(` Max Concurrent Models: ${n.maxConcurrentModels}`)),console.log(o.gray(` Timeout: ${n.timeout}ms`)),console.log(o.gray(` Retry: ${n.retry?"enabled":"disabled"}`)),console.log("")),console.log(o.cyan(` Skills: ${r.join(", ")}`)),console.log(o.cyan(` Models: ${u.join(", ")}`)),console.log(o.cyan(` Topology: ${g}`)),console.log("");let m=await R(e),f=k(m),C=v(n,f),w=Date.now();console.log(o.yellow(` Starting parallel validation...
5
5
  `));let $=await C.validateSkillsParallel(r,u),s=C.getSummary($),b=Date.now()-w;l.json?T(s):V(s,l.verbose),console.log(o.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{c as t}from"./chunk-3OPXTQMB.js";import{createRequire as o}from"module";var i,e,a,c,l,p,s,m,u,d,A,f,h,_,b,v,L,n=t(()=>{i=o(import.meta.url),e=i("vibium"),a=e,{RuvectorLayer:c,TensorCompress:l,differentiableSearch:p,hierarchicalForward:s,getCompressionLevel:m,init:u,FlashAttention:d,DotProductAttention:A,MultiHeadAttention:f,HyperbolicAttention:h,LinearAttention:_,MoEAttention:b,SonaEngine:v,pipeline:L}=e||{}});n();export{A as DotProductAttention,d as FlashAttention,h as HyperbolicAttention,_ as LinearAttention,b as MoEAttention,f as MultiHeadAttention,c as RuvectorLayer,v as SonaEngine,l as TensorCompress,a as default,p as differentiableSearch,m as getCompressionLevel,s as hierarchicalForward,u as init,L 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.9.27");process.exit(0)}
2
+ import{c as t}from"./chunk-CNWWQYZ3.js";import{createRequire as o}from"module";var i,e,a,c,l,p,s,m,u,d,A,f,h,_,b,v,L,n=t(()=>{i=o(import.meta.url),e=i("vibium"),a=e,{RuvectorLayer:c,TensorCompress:l,differentiableSearch:p,hierarchicalForward:s,getCompressionLevel:m,init:u,FlashAttention:d,DotProductAttention:A,MultiHeadAttention:f,HyperbolicAttention:h,LinearAttention:_,MoEAttention:b,SonaEngine:v,pipeline:L}=e||{}});n();export{A as DotProductAttention,d as FlashAttention,h as HyperbolicAttention,_ as LinearAttention,b as MoEAttention,f as MultiHeadAttention,c as RuvectorLayer,v as SonaEngine,l as TensorCompress,a as default,p as differentiableSearch,m as getCompressionLevel,s as hierarchicalForward,u as init,L as pipeline};
@@ -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}from"./chunk-OA5ZH3IH.js";import"./chunk-BT5YOORE.js";import"./chunk-MHPA6IWB.js";import"./chunk-T46HLTI3.js";import"./chunk-JN7WVS57.js";import"./chunk-ZGJTIDFI.js";import"./chunk-XFDOE4QW.js";import"./chunk-PIR3KN5M.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{a as VisualSecurityTool};
@@ -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{createRequire as t}from"module";var o=t(import.meta.url),e=o("web-tree-sitter"),i=e,{RuvectorLayer:n,TensorCompress:a,differentiableSearch:c,hierarchicalForward:s,getCompressionLevel:l,init:p,FlashAttention:m,DotProductAttention:u,MultiHeadAttention:d,HyperbolicAttention:A,LinearAttention:f,MoEAttention:h,SonaEngine:_,pipeline:b}=e||{};export{u as DotProductAttention,m as FlashAttention,A as HyperbolicAttention,f as LinearAttention,h as MoEAttention,d as MultiHeadAttention,n as RuvectorLayer,_ as SonaEngine,a as TensorCompress,i as default,c as differentiableSearch,l as getCompressionLevel,s as hierarchicalForward,p as init,b 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.9.27");process.exit(0)}
2
+ import"./chunk-CNWWQYZ3.js";import{createRequire as t}from"module";var o=t(import.meta.url),e=o("web-tree-sitter"),i=e,{RuvectorLayer:n,TensorCompress:a,differentiableSearch:c,hierarchicalForward:s,getCompressionLevel:l,init:p,FlashAttention:m,DotProductAttention:u,MultiHeadAttention:d,HyperbolicAttention:A,LinearAttention:f,MoEAttention:h,SonaEngine:_,pipeline:b}=e||{};export{u as DotProductAttention,m as FlashAttention,A as HyperbolicAttention,f as LinearAttention,h as MoEAttention,d as MultiHeadAttention,n as RuvectorLayer,_ as SonaEngine,a as TensorCompress,i as default,c as differentiableSearch,l as getCompressionLevel,s as hierarchicalForward,p as init,b 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.9.25");process.exit(0)}
2
- import{b as u}from"./chunk-FO3VJDCI.js";import{a as f,c as h}from"./chunk-SKRQF45C.js";import"./chunk-3OPXTQMB.js";h();import{existsSync as i,mkdirSync as d,readFileSync as g,writeFileSync as a}from"fs";import{join as p,dirname as v}from"path";var c=class{projectRoot;overwrite;generator;constructor(e){this.projectRoot=e.projectRoot,this.overwrite=e.overwrite??!1,this.generator=u()}async install(){let e={success:!0,mcpConfigured:!1,rulesInstalled:!1,errors:[],configPath:"",rulesPath:""};try{let t=this.generator.generateMcpConfig("windsurf"),r=p(this.projectRoot,t.path);if(e.configPath=r,!i(r)||this.overwrite){let o=v(r);if(i(o)||d(o,{recursive:!0}),i(r)&&this.overwrite){let m=this.mergeExistingConfig(r,t.content);a(r,m)}else a(r,t.content);e.mcpConfigured=!0}let n=this.generator.generateBehavioralRules("windsurf"),s=p(this.projectRoot,n.path);if(e.rulesPath=s,!i(s)||this.overwrite){if(i(s)&&this.overwrite){let o=this.mergeExistingRules(s,n.content);a(s,o)}else a(s,n.content);e.rulesInstalled=!0}}catch(t){e.success=!1,e.errors.push(`Windsurf installation failed: ${f(t)}`)}return e}mergeExistingConfig(e,t){try{let r=JSON.parse(g(e,"utf-8")),n=JSON.parse(t);return r.mcpServers||(r.mcpServers={}),Object.assign(r.mcpServers,n.mcpServers),JSON.stringify(r,null,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{b as u}from"./chunk-BZNIVIZE.js";import{a as f,c as h}from"./chunk-WHI7FVTH.js";import"./chunk-CNWWQYZ3.js";h();import{existsSync as i,mkdirSync as d,readFileSync as g,writeFileSync as a}from"fs";import{join as p,dirname as v}from"path";var c=class{projectRoot;overwrite;generator;constructor(e){this.projectRoot=e.projectRoot,this.overwrite=e.overwrite??!1,this.generator=u()}async install(){let e={success:!0,mcpConfigured:!1,rulesInstalled:!1,errors:[],configPath:"",rulesPath:""};try{let t=this.generator.generateMcpConfig("windsurf"),r=p(this.projectRoot,t.path);if(e.configPath=r,!i(r)||this.overwrite){let o=v(r);if(i(o)||d(o,{recursive:!0}),i(r)&&this.overwrite){let m=this.mergeExistingConfig(r,t.content);a(r,m)}else a(r,t.content);e.mcpConfigured=!0}let n=this.generator.generateBehavioralRules("windsurf"),s=p(this.projectRoot,n.path);if(e.rulesPath=s,!i(s)||this.overwrite){if(i(s)&&this.overwrite){let o=this.mergeExistingRules(s,n.content);a(s,o)}else a(s,n.content);e.rulesInstalled=!0}}catch(t){e.success=!1,e.errors.push(`Windsurf installation failed: ${f(t)}`)}return e}mergeExistingConfig(e,t){try{let r=JSON.parse(g(e,"utf-8")),n=JSON.parse(t);return r.mcpServers||(r.mcpServers={}),Object.assign(r.mcpServers,n.mcpServers),JSON.stringify(r,null,2)+`
3
3
  `}catch{return t}}mergeExistingRules(e,t){try{let r=g(e,"utf-8");return r.includes("Agentic QE")||r.includes("fleet_init")?r:r.trimEnd()+`
4
4
 
5
5
  ---
@@ -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,b,c,d,e,f,g}from"./chunk-2IRRXFBV.js";import"./chunk-EOZIQTHG.js";import"./chunk-P5ZV4RCF.js";import"./chunk-4ASWQOFE.js";import"./chunk-3OPXTQMB.js";export{c as PersistentWitnessChain,a as SPRTAccumulator,b as WitnessChain,f as createPersistentWitnessChain,e as createWitnessChain,d as createWitnessChainSQLitePersistence,g as isWitnessChainFeatureEnabled};
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,g}from"./chunk-DL6L4FGW.js";import"./chunk-ZGJTIDFI.js";import"./chunk-XFDOE4QW.js";import"./chunk-2MO2U3NO.js";import"./chunk-CNWWQYZ3.js";export{c as PersistentWitnessChain,a as SPRTAccumulator,b as WitnessChain,f as createPersistentWitnessChain,e as createWitnessChain,d as createWitnessChainSQLitePersistence,g as isWitnessChainFeatureEnabled};
@@ -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,g,h}from"./chunk-HV7V34DZ.js";import"./chunk-T46HLTI3.js";import"./chunk-JN7WVS57.js";import"./chunk-ZGJTIDFI.js";import"./chunk-XFDOE4QW.js";import"./chunk-PIR3KN5M.js";import"./chunk-WHI7FVTH.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{a as GENESIS_PREV_HASH,f as WitnessChain,h as createWitnessChain,g as getWitnessChain,d as hashWith,e as serializeEntry,b as sha256,c as shake256};
@@ -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"./chunk-HEVA2HR3.js";import{b as $}from"./chunk-NADXRFKX.js";import{d as R}from"./chunk-QFNWLRPV.js";import{b as k,c as C,d as b}from"./chunk-4GVLZIHN.js";import{c as W}from"./chunk-5XCHNZNW.js";import"./chunk-VZVHYH7B.js";import"./chunk-SKRQF45C.js";import"./chunk-3OPXTQMB.js";import{Command as O}from"commander";import o from"chalk";function P(d,a){let m=d.indexOf("=");return m>0&&(a[d.substring(0,m)]=d.substring(m+1)),a}function x(d,a,m){let y=new O("workflow").description("Manage QE workflows and pipelines (ADR-041)");return y.command("run <file>").description("Execute a QE pipeline from YAML file").option("-w, --watch","Watch execution progress").option("-v, --verbose","Show detailed output").option("--params <json>","Additional parameters as JSON","{}").action(async(t,l)=>{if(!await m())return;let e=await import("fs"),c=(await import("path")).resolve(t);try{console.log(o.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"./chunk-WGYJD6DT.js";import{b as $}from"./chunk-J6EDIEZB.js";import{d as R}from"./chunk-PXFK5V2E.js";import{b as k,c as C,d as b}from"./chunk-FQZM3SVW.js";import{c as W}from"./chunk-PIR3KN5M.js";import"./chunk-MSA7UH3M.js";import"./chunk-WHI7FVTH.js";import"./chunk-CNWWQYZ3.js";import{Command as O}from"commander";import o from"chalk";function P(d,a){let m=d.indexOf("=");return m>0&&(a[d.substring(0,m)]=d.substring(m+1)),a}function x(d,a,m){let y=new O("workflow").description("Manage QE workflows and pipelines (ADR-041)");return y.command("run <file>").description("Execute a QE pipeline from YAML file").option("-w, --watch","Watch execution progress").option("-v, --verbose","Show detailed output").option("--params <json>","Additional parameters as JSON","{}").action(async(t,l)=>{if(!await m())return;let e=await import("fs"),c=(await import("path")).resolve(t);try{console.log(o.blue(`
3
3
  Running workflow from: ${t}
4
4
  `));let s=k(c);if(!s.success||!s.workflow){console.log(o.red("Failed to parse pipeline:"));for(let w of s.errors)console.log(o.red(` ${w}`));await a(1)}let r={...W(l.params,"params")};if(s.pipeline){for(let w of s.pipeline.stages)if(w.params)for(let[S,h]of Object.entries(w.params))r[S]=h}if(!d.workflowOrchestrator.getWorkflow(s.workflow.id)){let w=d.workflowOrchestrator.registerWorkflow(s.workflow);w.success||(console.log(o.red(`Failed to register workflow: ${w.error.message}`)),await a(1))}let n=await d.workflowOrchestrator.executeWorkflow(s.workflow.id,r);if(!n.success){console.log(o.red(`Failed to start workflow: ${n.error.message}`)),await a(1);return}let p=n.value;if(console.log(o.cyan(` Execution ID: ${p}`)),console.log(o.gray(` Workflow: ${s.workflow.name}`)),console.log(o.gray(` Stages: ${s.workflow.steps.length}`)),console.log(""),l.watch){console.log(o.blue(`Workflow Progress:
5
5
  `));let w,S=Date.now();for(;;){let g=d.workflowOrchestrator.getWorkflowStatus(p);if(!g)break;if(!w||w.progress!==g.progress||w.status!==g.status||JSON.stringify(w.currentSteps)!==JSON.stringify(g.currentSteps)){process.stdout.write("\r\x1B[K");let v="\u2588".repeat(Math.floor(g.progress/5))+"\u2591".repeat(20-Math.floor(g.progress/5)),D=g.status==="completed"?o.green:g.status==="failed"?o.red:g.status==="running"?o.yellow:o.gray;console.log(` [${v}] ${g.progress}% - ${D(g.status)}`),g.currentSteps.length>0&&l.verbose&&console.log(o.gray(` Running: ${g.currentSteps.join(", ")}`)),w=g}if(g.status==="completed"||g.status==="failed"||g.status==="cancelled")break;await new Promise(v=>setTimeout(v,500))}let h=d.workflowOrchestrator.getWorkflowStatus(p);if(h){console.log("");let g=h.duration||Date.now()-S;h.status==="completed"?(console.log(o.green("Workflow completed successfully")),console.log(o.gray(` Duration: ${$(g)}`)),console.log(o.gray(` Completed: ${h.completedSteps.length} stages`)),h.skippedSteps.length>0&&console.log(o.yellow(` Skipped: ${h.skippedSteps.length} stages`))):h.status==="failed"?(console.log(o.red("Workflow failed")),console.log(o.red(` Error: ${h.error}`)),console.log(o.gray(` Failed stages: ${h.failedSteps.join(", ")}`))):console.log(o.yellow(`Workflow ${h.status}`))}}else console.log(o.green("Workflow execution started")),console.log(o.gray(` Use 'aqe workflow status ${p}' to check progress`));console.log(""),await a(0)}catch(s){console.error(o.red(`
@@ -35,10 +35,10 @@ Workflow cancelled: ${t}
35
35
  `)):console.log(o.red(`
36
36
  Failed to cancel workflow: ${l.error.message}
37
37
  `)),await a(l.success?0:1)}catch(l){console.error(o.red(`
38
- Failed to cancel workflow:`),l),await a(1)}}),y.command("browser-list").description("List available browser workflow templates").action(async()=>{try{let{BrowserWorkflowTool:t}=await import("./browser-workflow-TXQBTTSA.js"),e=await new t().invoke({});if(e.success&&e.data){console.log(o.blue(`
38
+ Failed to cancel workflow:`),l),await a(1)}}),y.command("browser-list").description("List available browser workflow templates").action(async()=>{try{let{BrowserWorkflowTool:t}=await import("./browser-workflow-WSAEHMFE.js"),e=await new t().invoke({});if(e.success&&e.data){console.log(o.blue(`
39
39
  Browser Workflow Templates:
40
40
  `));for(let u of e.data.availableTemplates)console.log(` ${o.cyan(u)}`);console.log("")}else console.log(o.red(`Failed: ${e.error||"Unknown error"}`));await a(0)}catch(t){console.error(o.red(`
41
- Failed:`),t),await a(1)}}),y.command("browser-load [template]").description("Load and validate a browser workflow template or inline YAML").option("--yaml <yaml>","Inline YAML workflow definition").option("-v, --var <key=value>","Variable override (repeatable)",P,{}).option("-F, --format <format>","Output format (text|json)","text").option("-o, --output <path>","Write output to file").action(async(t,l)=>{try{let{BrowserWorkflowTool:e}=await import("./browser-workflow-TXQBTTSA.js"),{writeOutput:u,toJSON:c}=await import("./ci-output-NLBMSDOP.js"),s=new e,f={variables:l.var||{}};if(l.yaml)f.workflowYaml=l.yaml;else if(t)if(t.endsWith(".yaml")||t.endsWith(".yml")){let i=await import("fs"),p=(await import("path")).resolve(t);i.existsSync(p)||(console.log(o.red(`
41
+ Failed:`),t),await a(1)}}),y.command("browser-load [template]").description("Load and validate a browser workflow template or inline YAML").option("--yaml <yaml>","Inline YAML workflow definition").option("-v, --var <key=value>","Variable override (repeatable)",P,{}).option("-F, --format <format>","Output format (text|json)","text").option("-o, --output <path>","Write output to file").action(async(t,l)=>{try{let{BrowserWorkflowTool:e}=await import("./browser-workflow-WSAEHMFE.js"),{writeOutput:u,toJSON:c}=await import("./ci-output-GXRUBE4X.js"),s=new e,f={variables:l.var||{}};if(l.yaml)f.workflowYaml=l.yaml;else if(t)if(t.endsWith(".yaml")||t.endsWith(".yml")){let i=await import("fs"),p=(await import("path")).resolve(t);i.existsSync(p)||(console.log(o.red(`
42
42
  File not found: ${p}
43
43
  `)),await a(1)),f.workflowYaml=i.readFileSync(p,"utf-8")}else f.templateName=t;else console.log(o.red(`
44
44
  Provide a template name or --yaml. Use "workflow browser-list" to see templates.
@@ -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}from"./chunk-DPMCEGYQ.js";import"./chunk-PFHUT2VE.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 DEFAULT_WORKFLOW_CONFIG,a as WorkflowEvents,c as WorkflowOrchestrator,d as createWorkflowOrchestrator};
@@ -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,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v as L,w as M,x as N}from"./chunk-76RCKSCL.js";import"./chunk-7G2UJMKQ.js";import"./chunk-AQXKM5VB.js";import"./chunk-EOZIQTHG.js";import"./chunk-P5ZV4RCF.js";import{a as v,b as w,c as x,d as y,e as z,f as A,g as B,h as C,i as D,j as E,k as F,l as G,m as H,n as I,o as J,p as K}from"./chunk-M4GE3R5K.js";import"./chunk-5XCHNZNW.js";import"./chunk-SKRQF45C.js";import"./chunk-R7VO6E3E.js";import"./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"./chunk-3OPXTQMB.js";export{z as GNNLayerFactory,i as QEFlashAttention,x as QEGNNEmbeddingIndex,y as QEGNNIndexFactory,a as QESONA,e as QE_FLASH_ATTENTION_CONFIG,g as QE_PERFORMANCE_TARGETS,f as QE_SONA_CONFIG,A as TensorCompressionFactory,u as batchComputeAttention,K as batchDifferentiableSearch,M as checkRuvectorPackagesAvailable,c as createDomainQESONA,j as createQEFlashAttention,b as createQESONA,D as getDifferentiableSearch,F as getGetCompressionLevel,E as getHierarchicalForward,G as getInit,h as getOptimalBlockConfig,k as getQEFlashAttentionConfig,n as getRuvectorDotProductAttention,m as getRuvectorFlashAttention,p as getRuvectorHyperbolicAttention,B as getRuvectorLayer,q as getRuvectorLinearAttention,r as getRuvectorMoEAttention,o as getRuvectorMultiHeadAttention,L as getRuvectorPackageVersions,C as getTensorCompress,l as getWorkloadTypes,N as initAllRuvectorPackages,w as initGNN,d as isAttentionAvailable,v as isGNNAvailable,s as toFloat32Array,H as toFloat32ArrayGNN,J as toIEmbedding,t as toNumberArrayAttn,I as toNumberArrayGNN};
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,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v as L,w as M,x as N}from"./chunk-J24PEKZ5.js";import"./chunk-T46HLTI3.js";import"./chunk-JN7WVS57.js";import"./chunk-ZGJTIDFI.js";import"./chunk-XFDOE4QW.js";import{a as v,b as w,c as x,d as y,e as z,f as A,g as B,h as C,i as D,j as E,k as F,l as G,m as H,n as I,o as J,p as K}from"./chunk-A7D5532X.js";import"./chunk-PIR3KN5M.js";import"./chunk-WHI7FVTH.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{z as GNNLayerFactory,i as QEFlashAttention,x as QEGNNEmbeddingIndex,y as QEGNNIndexFactory,a as QESONA,e as QE_FLASH_ATTENTION_CONFIG,g as QE_PERFORMANCE_TARGETS,f as QE_SONA_CONFIG,A as TensorCompressionFactory,u as batchComputeAttention,K as batchDifferentiableSearch,M as checkRuvectorPackagesAvailable,c as createDomainQESONA,j as createQEFlashAttention,b as createQESONA,D as getDifferentiableSearch,F as getGetCompressionLevel,E as getHierarchicalForward,G as getInit,h as getOptimalBlockConfig,k as getQEFlashAttentionConfig,n as getRuvectorDotProductAttention,m as getRuvectorFlashAttention,p as getRuvectorHyperbolicAttention,B as getRuvectorLayer,q as getRuvectorLinearAttention,r as getRuvectorMoEAttention,o as getRuvectorMultiHeadAttention,L as getRuvectorPackageVersions,C as getTensorCompress,l as getWorkloadTypes,N as initAllRuvectorPackages,w as initGNN,d as isAttentionAvailable,v as isGNNAvailable,s as toFloat32Array,H as toFloat32ArrayGNN,J as toIEmbedding,t as toNumberArrayAttn,I as toNumberArrayGNN};
@@ -8,7 +8,7 @@ import chalk from 'chalk';
8
8
  import path from 'node:path';
9
9
  import { QE_HOOK_EVENTS } from '../../../learning/qe-hooks.js';
10
10
  import { findProjectRoot } from '../../../kernel/unified-memory.js';
11
- import { getHooksSystem, createHybridBackendWithTimeout, incrementDreamExperience, persistCommandExperience, printJson, printSuccess, printError, printGuidance, } from './hooks-shared.js';
11
+ import { getHooksSystem, createHybridBackendWithTimeout, incrementDreamExperience, persistCommandExperience, printJson, printSuccess, printError, printGuidance, readStdinJsonEvent, extractFilePathFromEvent, } from './hooks-shared.js';
12
12
  /**
13
13
  * Register pre-edit and post-edit subcommands on the hooks command.
14
14
  */
@@ -84,14 +84,29 @@ export function registerEditingHooks(hooks) {
84
84
  try {
85
85
  const { hookRegistry } = await getHooksSystem();
86
86
  const success = options.success || !options.failure;
87
- // Generate synthetic patternId from file path if none provided
88
- const filePath = options.file || '';
87
+ // Generate synthetic patternId from file path if none provided.
88
+ //
89
+ // `--file` falls back to the Claude Code hook event JSON on stdin.
90
+ // PostToolUse events carry `tool_input.file_path` (and older shapes use
91
+ // `toolInput.file_path`) — without this fallback, $TOOL_INPUT_file_path
92
+ // expansion silently produces `--file ""` and every captured experience
93
+ // ends up tagged `edit: ` with no file path (#453).
94
+ let filePath = options.file || '';
95
+ if (!filePath.trim()) {
96
+ try {
97
+ const rawEvent = await readStdinJsonEvent();
98
+ filePath = extractFilePathFromEvent(rawEvent);
99
+ }
100
+ catch {
101
+ // best-effort — never crash the hook host
102
+ }
103
+ }
89
104
  const fileName = filePath.split('/').pop() || 'unknown';
90
105
  const isTestFile = /\.(test|spec)\.(ts|js|tsx|jsx)$/.test(fileName);
91
106
  const domain = isTestFile ? 'test-generation' : 'code-intelligence';
92
107
  const syntheticPatternId = options.patternId || `edit:${domain}:${fileName}`;
93
108
  const results = await hookRegistry.emit(QE_HOOK_EVENTS.PostTestGeneration, {
94
- targetFile: options.file,
109
+ targetFile: filePath,
95
110
  success,
96
111
  patternId: syntheticPatternId,
97
112
  generatedTests: null,
@@ -138,14 +153,14 @@ export function registerEditingHooks(hooks) {
138
153
  if (options.json) {
139
154
  printJson({
140
155
  success: true,
141
- file: options.file,
156
+ file: filePath,
142
157
  editSuccess: success,
143
158
  patternsLearned: result.patternsLearned || 0,
144
159
  dreamTriggered,
145
160
  });
146
161
  }
147
162
  else {
148
- printSuccess(`Recorded edit outcome for ${options.file}`);
163
+ printSuccess(`Recorded edit outcome for ${filePath || '(unknown file)'}`);
149
164
  if (result.patternsLearned) {
150
165
  console.log(chalk.green(` Patterns learned: ${result.patternsLearned}`));
151
166
  }
@@ -29,6 +29,8 @@ export declare function checkAndTriggerDream(memoryBackend: MemoryBackend): Prom
29
29
  triggered: boolean;
30
30
  reason?: string;
31
31
  insightsGenerated?: number;
32
+ /** Number of insights that were applied to qe_patterns (#456). */
33
+ insightsApplied?: number;
32
34
  }>;
33
35
  /**
34
36
  * Increment the experience counter in dream state.
@@ -45,6 +45,37 @@ export async function checkAndTriggerDream(memoryBackend) {
45
45
  }
46
46
  const reason = timeTriggered ? 'time-interval' : 'experience-threshold';
47
47
  console.log(chalk.dim(`[hooks] Dream trigger: ${reason} (${dreamState.experienceCount} experiences, ${Math.round(timeSinceLastDream / 60000)}min since last dream)`));
48
+ // Issue #461: concurrent hook subprocesses all see the same stale
49
+ // dreamState.lastDreamTime, race past the time/experience triggers, and
50
+ // start ~10s dream cycles in parallel. They then all hit the WAL writer
51
+ // at roughly the same time and 35% of cycles fail with
52
+ // `database is locked` (duration_ms ≈ 10050ms — the full cycle ran, only
53
+ // the write-back failed). `busy_timeout` doesn't help: it serializes
54
+ // sequential contention, not simultaneous writers.
55
+ //
56
+ // Peek at dream_cycles before we open the engine — if another process
57
+ // has started a cycle in the last 60s, bail out with reason='already-
58
+ // running'. Fail-open: any error in the guard lets the dream proceed,
59
+ // so this can never make things worse than they were before.
60
+ try {
61
+ const { getUnifiedMemory } = await import('../../../kernel/unified-memory.js');
62
+ const um = getUnifiedMemory();
63
+ if (um.isInitialized()) {
64
+ const db = um.getDatabase();
65
+ const running = db
66
+ .prepare(`SELECT COUNT(*) AS n FROM dream_cycles
67
+ WHERE status = 'running'
68
+ AND start_time > datetime('now', '-60 seconds')`)
69
+ .get();
70
+ if (running && running.n > 0) {
71
+ return { triggered: false, reason: 'already-running' };
72
+ }
73
+ }
74
+ }
75
+ catch {
76
+ // fail-open — if dream_cycles table is missing or unified memory not
77
+ // ready, we'd rather risk the rare lock than block dreaming entirely.
78
+ }
48
79
  // Run a quick dream cycle
49
80
  const { createDreamEngine } = await import('../../../learning/dream/index.js');
50
81
  const { createQEReasoningBank: createRB } = await import('../../../learning/qe-reasoning-bank.js');
@@ -76,6 +107,27 @@ export async function checkAndTriggerDream(memoryBackend) {
76
107
  await engine.loadPatternsAsConcepts(importPatterns);
77
108
  }
78
109
  const result = await engine.dream(10000);
110
+ // Issue #456: apply actionable insights inline so the hook path doesn't
111
+ // leave the backlog growing forever. DreamScheduler.autoApplyInsights()
112
+ // wires this in the daemon path, but checkAndTriggerDream is the
113
+ // hook-driven path and has no scheduler — without this block, every
114
+ // hook-fired dream cycle writes insights with applied=0 and they
115
+ // accumulate indefinitely (#456 evidence: 378 unapplied / 9 applied).
116
+ // Threshold matches DreamSchedulerConfig.insightConfidenceThreshold
117
+ // default (0.5) and InsightGenerator's `actionable` gate.
118
+ let insightsApplied = 0;
119
+ try {
120
+ for (const insight of result.insights) {
121
+ if (insight.actionable && insight.confidenceScore >= 0.5) {
122
+ const applyResult = await engine.applyInsight(insight.id);
123
+ if (applyResult.success)
124
+ insightsApplied++;
125
+ }
126
+ }
127
+ }
128
+ catch (applyErr) {
129
+ console.error(chalk.dim(`[hooks] Dream apply: ${applyErr instanceof Error ? applyErr.message : 'unknown'}`));
130
+ }
79
131
  // Update state
80
132
  dreamState.lastDreamTime = new Date().toISOString();
81
133
  dreamState.experienceCount = 0;
@@ -86,6 +138,7 @@ export async function checkAndTriggerDream(memoryBackend) {
86
138
  triggered: true,
87
139
  reason,
88
140
  insightsGenerated: result.insights.length,
141
+ insightsApplied,
89
142
  };
90
143
  }
91
144
  catch (error) {
@@ -236,12 +289,19 @@ export async function persistTaskOutcome(opts) {
236
289
  model_tier, started_at, completed_at, source)
237
290
  VALUES (?, ?, ?, ?, ?, ?, ?, NULL, datetime('now'), datetime('now'), ?)
238
291
  `).run(experienceId, taskField.slice(0, 500), opts.agent, opts.domain ?? 'general', opts.success ? 1 : 0, qualityScore, durationMs, 'cli-hook-post-task');
239
- // 2. Base experience_applications row
292
+ // 2. Base experience_applications row.
293
+ //
294
+ // Issue #463: tokens_saved was hardcoded to 0 on every row, so the
295
+ // learning-ROI column was permanently useless. qualityScore is already
296
+ // computed above and ranges 0.34 (failure+slow) to 0.68 (success+fast).
297
+ // Scale by 100 as a proxy until a real per-task token-delta calculation
298
+ // is wired in — gives a non-trivial 34-68 signal that downstream
299
+ // analytics can reason about.
240
300
  db.prepare(`
241
301
  INSERT INTO experience_applications
242
302
  (id, experience_id, task, success, tokens_saved, feedback, applied_at)
243
303
  VALUES (?, ?, ?, ?, ?, ?, datetime('now'))
244
- `).run(`app-${Date.now()}-${randomUUID().slice(0, 8)}`, experienceId, taskField, opts.success ? 1 : 0, 0, `[Patch 060] post-task outcome: ${opts.success ? 'success' : 'failure'}`);
304
+ `).run(`app-${Date.now()}-${randomUUID().slice(0, 8)}`, experienceId, taskField, opts.success ? 1 : 0, Math.round(qualityScore * 100), `[Patch 060] post-task outcome: ${opts.success ? 'success' : 'failure'}`);
245
305
  // 3. Read bridge → fan out per-pattern application rows + delete bridge
246
306
  try {
247
307
  const bridgeRow = db.prepare(`
@@ -287,6 +347,27 @@ export async function persistTaskOutcome(opts) {
287
347
  WHERE id = ?
288
348
  `);
289
349
  const getPatternConfidence = db.prepare(`SELECT confidence FROM qe_patterns WHERE id = ?`);
350
+ // Issue #455: recordOutcome() is called with a synthetic
351
+ // `task:agent:taskId` patternId that never matches qe_patterns.id, so
352
+ // checkPatternPromotionWithCoherence() is skipped for the real UUIDs
353
+ // updated here. Without an inline promotion check, short-term patterns
354
+ // that cross the thresholds (successful_uses ≥ 3, success_rate ≥ 0.7,
355
+ // confidence ≥ 0.6) stay short-term forever — qe_patterns.long-term
356
+ // count never grows past zero.
357
+ const promotionSelectStmt = db.prepare(`
358
+ SELECT tier, successful_uses, success_rate, confidence
359
+ FROM qe_patterns
360
+ WHERE id = ?
361
+ `);
362
+ const promotionUpdateStmt = db.prepare(`
363
+ UPDATE qe_patterns
364
+ SET tier = 'long-term', updated_at = datetime('now')
365
+ WHERE id = ?
366
+ AND tier = 'short-term'
367
+ AND successful_uses >= 3
368
+ AND success_rate >= 0.7
369
+ AND confidence >= 0.6
370
+ `);
290
371
  for (const patternId of bridge.selectedPatternIds) {
291
372
  insertApp.run(`app-${Date.now()}-${randomUUID().slice(0, 8)}`, experienceId, `${taskField}:pattern:${patternId}`, opts.success ? 1 : 0, perPatternTokens, `[Patch 160+300] task-bridge pattern_id=${patternId} ts=${perPatternTokens}`);
292
373
  try {
@@ -297,6 +378,19 @@ export async function persistTaskOutcome(opts) {
297
378
  }
298
379
  }
299
380
  catch { /* fail-soft per pattern */ }
381
+ // Issue #455: re-read post-UPDATE state and promote if thresholds met.
382
+ // Guarded WHERE clause makes the UPDATE idempotent and no-op for
383
+ // already-long-term rows or rows below threshold.
384
+ try {
385
+ const pm = promotionSelectStmt.get(patternId);
386
+ if (pm?.tier === 'short-term' &&
387
+ pm.successful_uses >= 3 &&
388
+ pm.success_rate >= 0.7 &&
389
+ pm.confidence >= 0.6) {
390
+ promotionUpdateStmt.run(patternId);
391
+ }
392
+ }
393
+ catch { /* fail-soft per pattern */ }
300
394
  }
301
395
  // 4. Delete bridge entry (one-shot consumption)
302
396
  if (bridgeRow) {
@@ -530,9 +624,16 @@ export async function consolidateExperiencesToPatterns() {
530
624
  }
531
625
  }
532
626
  // Aggregate unprocessed experiences by domain+agent with quality thresholds.
533
- // Exclude 'cli-hook' agent — these are low-quality hook telemetry events
534
- // (quality ~0.40, success_rate ~0.24) that flood the pipeline and block
535
- // real pattern creation. See issue #348.
627
+ //
628
+ // Issue #464: dropped the `AND agent != 'cli-hook'` filter. The original
629
+ // exclusion (issue #348) was meant to keep low-quality Bash telemetry
630
+ // (quality ~0.40, success_rate ~0.24) from flooding the pipeline — but
631
+ // post-edit experiences also use agent='cli-hook' and have avg_quality
632
+ // ~0.75 / success_rate ~1.0, well above the HAVING thresholds. Excluding
633
+ // by agent name meant the dominant share of high-quality experiences was
634
+ // ineligible and consolidation never produced patterns. The HAVING clause
635
+ // below is the real quality gate; tighten it if #348's concern resurfaces
636
+ // rather than filtering by agent name.
536
637
  const aggregates = db.prepare(`
537
638
  SELECT
538
639
  domain,
@@ -545,7 +646,6 @@ export async function consolidateExperiencesToPatterns() {
545
646
  GROUP_CONCAT(DISTINCT source) as sources
546
647
  FROM captured_experiences
547
648
  WHERE application_count = 0
548
- AND agent != 'cli-hook'
549
649
  GROUP BY domain, agent
550
650
  HAVING cnt >= 3 AND avg_quality >= 0.5 AND success_rate >= 0.6
551
651
  ORDER BY avg_quality DESC
@@ -67,5 +67,25 @@ export declare function printJson(data: unknown): void;
67
67
  export declare function printSuccess(message: string): void;
68
68
  export declare function printError(message: string): void;
69
69
  export declare function printGuidance(guidance: string[]): void;
70
+ /**
71
+ * Read piped stdin with a short timeout. Claude Code delivers
72
+ * UserPromptSubmit / PostToolUse / PreToolUse events as JSON on stdin —
73
+ * `$PROMPT`, `$TOOL_INPUT_file_path`, etc. are NOT exposed as env vars in
74
+ * every hook surface, so reading stdin is the only reliable fallback when
75
+ * the explicit CLI option resolves to an empty string.
76
+ *
77
+ * Returns '' when stdin is a TTY (interactive run) or no data arrives
78
+ * before the timeout. Never throws — a hook must never crash the host.
79
+ */
80
+ export declare function readStdinJsonEvent(timeoutMs?: number): Promise<string>;
81
+ /**
82
+ * Extract a file path from a Claude Code PostToolUse / PreToolUse hook event.
83
+ * Edit / Write / MultiEdit / NotebookEdit tools all put the target path in
84
+ * `tool_input.file_path` (snake_case from Claude Code) — older transports
85
+ * use `toolInput.file_path`. Returns '' when no recognized field is present.
86
+ *
87
+ * Exported for unit testing.
88
+ */
89
+ export declare function extractFilePathFromEvent(raw: string): string;
70
90
  export { DREAM_STATE_KEY, DREAM_INTERVAL_MS, DREAM_EXPERIENCE_THRESHOLD, DREAM_MIN_GAP_MS, type DreamHookState, type TaskBridgePayload, type TaskOutcomeResult, checkAndTriggerDream, incrementDreamExperience, persistCommandExperience, persistTaskOutcome, updateHookRouterQValue, updateRoutingOutcomeQuality, consolidateExperiencesToPatterns, } from './hooks-dream-learning.js';
71
91
  //# sourceMappingURL=hooks-shared.d.ts.map
@@ -77,11 +77,23 @@ export async function initializeHooksSystem() {
77
77
  embeddingDimension: 384,
78
78
  useONNXEmbeddings: true, // Use real transformer embeddings (384-dim)
79
79
  }, state.coherenceService ?? undefined);
80
- // Initialize with timeout
80
+ // Initialize with cancellable timeout (issue #478).
81
+ //
82
+ // We can't use Promise.race() to bound initialize() because the loser
83
+ // promise keeps running — and on a slow init the leaked promise would
84
+ // continue appending to patterns.rvf indefinitely (downstream report:
85
+ // 43.8 GB in 29 minutes). Instead, drive cancellation through an
86
+ // AbortSignal that initialize() checks between every step, so the
87
+ // work actually stops when the deadline fires.
81
88
  const initTimeout = 10000; // 10 seconds
82
- const initPromise = state.reasoningBank.initialize();
83
- const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error('ReasoningBank init timeout')), initTimeout));
84
- await Promise.race([initPromise, timeoutPromise]);
89
+ const controller = new AbortController();
90
+ const timer = setTimeout(() => controller.abort(new Error('ReasoningBank init timeout')), initTimeout);
91
+ try {
92
+ await state.reasoningBank.initialize({ signal: controller.signal });
93
+ }
94
+ finally {
95
+ clearTimeout(timer);
96
+ }
85
97
  // Wire RVF dual-writer for vector replication (optional, best-effort)
86
98
  try {
87
99
  const { getSharedRvfDualWriter } = await import('../../../integrations/ruvector/shared-rvf-dual-writer.js');
@@ -170,9 +182,30 @@ export async function createHybridBackendWithTimeout(dataDir) {
170
182
  enableFallback: true,
171
183
  defaultNamespace: 'qe-patterns',
172
184
  });
185
+ // HybridMemoryBackend.initialize() does not accept an AbortSignal yet
186
+ // (separate refactor). Use Promise.race for the timeout, but if the
187
+ // timeout wins, dispose the backend once init resolves so we don't leak
188
+ // SQLite/WAL handles in the background (issue #478 family).
189
+ let timedOut = false;
173
190
  const initPromise = backend.initialize();
174
- const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error('Backend init timeout')), timeoutMs));
175
- await Promise.race([initPromise, timeoutPromise]);
191
+ const timeoutPromise = new Promise((_, reject) => setTimeout(() => {
192
+ timedOut = true;
193
+ reject(new Error('Backend init timeout'));
194
+ }, timeoutMs));
195
+ try {
196
+ await Promise.race([initPromise, timeoutPromise]);
197
+ }
198
+ catch (err) {
199
+ if (timedOut) {
200
+ // Tear down the backend after the leaked init completes so its
201
+ // SQLite connections, WAL handles, and pool entries are released.
202
+ // .catch() prevents "unhandled rejection" if dispose itself throws.
203
+ void initPromise
204
+ .then(() => backend.dispose())
205
+ .catch(() => undefined);
206
+ }
207
+ throw err;
208
+ }
176
209
  return backend;
177
210
  }
178
211
  /**
@@ -250,6 +283,78 @@ export function printGuidance(guidance) {
250
283
  });
251
284
  }
252
285
  // ============================================================================
286
+ // Stdin Event Helpers
287
+ // ============================================================================
288
+ /**
289
+ * Read piped stdin with a short timeout. Claude Code delivers
290
+ * UserPromptSubmit / PostToolUse / PreToolUse events as JSON on stdin —
291
+ * `$PROMPT`, `$TOOL_INPUT_file_path`, etc. are NOT exposed as env vars in
292
+ * every hook surface, so reading stdin is the only reliable fallback when
293
+ * the explicit CLI option resolves to an empty string.
294
+ *
295
+ * Returns '' when stdin is a TTY (interactive run) or no data arrives
296
+ * before the timeout. Never throws — a hook must never crash the host.
297
+ */
298
+ export async function readStdinJsonEvent(timeoutMs = 500) {
299
+ if (process.stdin.isTTY)
300
+ return '';
301
+ return new Promise((resolve) => {
302
+ let data = '';
303
+ const timer = setTimeout(() => {
304
+ process.stdin.removeAllListeners();
305
+ process.stdin.pause();
306
+ resolve(data);
307
+ }, timeoutMs);
308
+ process.stdin.setEncoding('utf8');
309
+ process.stdin.on('data', (chunk) => {
310
+ data += chunk;
311
+ });
312
+ process.stdin.on('end', () => {
313
+ clearTimeout(timer);
314
+ resolve(data);
315
+ });
316
+ process.stdin.on('error', () => {
317
+ clearTimeout(timer);
318
+ resolve(data);
319
+ });
320
+ process.stdin.resume();
321
+ });
322
+ }
323
+ /**
324
+ * Extract a file path from a Claude Code PostToolUse / PreToolUse hook event.
325
+ * Edit / Write / MultiEdit / NotebookEdit tools all put the target path in
326
+ * `tool_input.file_path` (snake_case from Claude Code) — older transports
327
+ * use `toolInput.file_path`. Returns '' when no recognized field is present.
328
+ *
329
+ * Exported for unit testing.
330
+ */
331
+ export function extractFilePathFromEvent(raw) {
332
+ if (!raw.trim())
333
+ return '';
334
+ let event;
335
+ try {
336
+ event = JSON.parse(raw);
337
+ }
338
+ catch {
339
+ return '';
340
+ }
341
+ const toolInputSnake = event.tool_input;
342
+ const toolInputCamel = event.toolInput;
343
+ const candidates = [
344
+ toolInputSnake?.file_path,
345
+ toolInputSnake?.filePath,
346
+ toolInputCamel?.file_path,
347
+ toolInputCamel?.filePath,
348
+ event.file_path,
349
+ event.filePath,
350
+ ];
351
+ for (const c of candidates) {
352
+ if (typeof c === 'string' && c.trim())
353
+ return c;
354
+ }
355
+ return '';
356
+ }
357
+ // ============================================================================
253
358
  // Dream Scheduler & Learning — re-exported from hooks-dream-learning.ts
254
359
  // ============================================================================
255
360
  export { DREAM_STATE_KEY, DREAM_INTERVAL_MS, DREAM_EXPERIENCE_THRESHOLD, DREAM_MIN_GAP_MS, checkAndTriggerDream, incrementDreamExperience, persistCommandExperience, persistTaskOutcome, updateHookRouterQValue, updateRoutingOutcomeQuality, consolidateExperiencesToPatterns, } from './hooks-dream-learning.js';
@@ -8,41 +8,7 @@ import { randomUUID } from 'crypto';
8
8
  import chalk from 'chalk';
9
9
  import path from 'node:path';
10
10
  import { findProjectRoot, getUnifiedMemory } from '../../../kernel/unified-memory.js';
11
- import { applyHookBusyTimeout, getHooksSystem, createHybridBackendWithTimeout, incrementDreamExperience, printJson, printError, printGuidance, } from './hooks-shared.js';
12
- /**
13
- * Read piped stdin with a short timeout. Claude Code delivers
14
- * UserPromptSubmit / PostToolUse / etc. events as JSON on stdin —
15
- * `$PROMPT` is NOT exposed as an env var, so reading stdin is the
16
- * only reliable way to recover the prompt body for routing.
17
- *
18
- * Returns '' when stdin is a TTY (interactive run) or no data arrives
19
- * before the timeout. Never throws — a hook must never crash the host.
20
- */
21
- async function readStdinJsonEvent(timeoutMs = 500) {
22
- if (process.stdin.isTTY)
23
- return '';
24
- return new Promise((resolve) => {
25
- let data = '';
26
- const timer = setTimeout(() => {
27
- process.stdin.removeAllListeners();
28
- process.stdin.pause();
29
- resolve(data);
30
- }, timeoutMs);
31
- process.stdin.setEncoding('utf8');
32
- process.stdin.on('data', (chunk) => {
33
- data += chunk;
34
- });
35
- process.stdin.on('end', () => {
36
- clearTimeout(timer);
37
- resolve(data);
38
- });
39
- process.stdin.on('error', () => {
40
- clearTimeout(timer);
41
- resolve(data);
42
- });
43
- process.stdin.resume();
44
- });
45
- }
11
+ import { applyHookBusyTimeout, getHooksSystem, createHybridBackendWithTimeout, incrementDreamExperience, printJson, printError, printGuidance, readStdinJsonEvent, } from './hooks-shared.js';
46
12
  /**
47
13
  * Extract a routable task description from a Claude Code hook event JSON
48
14
  * payload. Different hook surfaces use different field names — try the
@@ -234,14 +200,46 @@ export function registerRoutingHooks(hooks) {
234
200
  LIMIT 1
235
201
  )
236
202
  `).run(success ? 1 : 0, qualityScore);
203
+ // Issue #465: orphan-sentinel sweep. Sessions that terminate without
204
+ // firing Stop (context compact, process kill, IDE crash) leave their
205
+ // sentinels at quality_score=-1 forever — every subsequent post-route
206
+ // call only closes the most-recent one (LIMIT 1) and newer rows keep
207
+ // pre-empting old ones in the ORDER BY DESC. Reporter saw 122/149
208
+ // rows stuck at -1, inverting AVG(quality_score) to -0.717.
209
+ //
210
+ // We use the conservative base score (0.325 = no success/duration
211
+ // bonus) rather than the current turn's qualityScore: those orphans
212
+ // belong to UNKNOWN historical turns and shouldn't inherit the
213
+ // current turn's outcome. Tag with error='stale-sentinel' so
214
+ // precision-sensitive queries can filter them out.
215
+ // Discriminator mirrors the LIMIT-1 close above and #451's symmetric
216
+ // design: route sentinels are owned by post-route, pre-task sentinels
217
+ // (task_json carries "taskId") are owned by post-task. Sweeping a
218
+ // pre-task sentinel here would race with updateRoutingOutcomeQuality
219
+ // and break the ownership split. If pre-task sentinels orphan, that
220
+ // belongs in a separate fix.
221
+ const staleResult = db.prepare(`
222
+ UPDATE routing_outcomes
223
+ SET success = 0,
224
+ quality_score = 0.325,
225
+ duration_ms = 0,
226
+ error = 'stale-sentinel'
227
+ WHERE quality_score = -1
228
+ AND task_json NOT LIKE '%"taskId"%'
229
+ AND created_at < datetime('now', '-300 seconds')
230
+ `).run();
237
231
  if (options.json) {
238
232
  printJson({
239
233
  success: true,
240
234
  resolved: result.changes > 0,
235
+ staleSwept: staleResult.changes,
241
236
  qualityScore,
242
237
  turnSuccess: success,
243
238
  });
244
239
  }
240
+ else if (staleResult.changes > 0) {
241
+ console.log(chalk.dim(`[hooks] post-route: swept ${staleResult.changes} stale sentinel(s)`));
242
+ }
245
243
  return;
246
244
  }
247
245
  catch (error) {