agentic-qe 3.2.3 → 3.3.1

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 (658) hide show
  1. package/.claude/agents/v3/qe-accessibility-auditor.md +90 -0
  2. package/README.md +49 -7
  3. package/package.json +8 -2
  4. package/scripts/cloud-db-config.json +37 -0
  5. package/scripts/cloud-db-connect.sh +37 -0
  6. package/scripts/cloud-db-tunnel.sh +23 -0
  7. package/v3/CHANGELOG.md +253 -0
  8. package/v3/README.md +59 -1
  9. package/v3/assets/agents/v3/qe-accessibility-auditor.md +90 -0
  10. package/v3/dist/adapters/claude-flow/index.d.ts +54 -0
  11. package/v3/dist/adapters/claude-flow/index.d.ts.map +1 -0
  12. package/v3/dist/adapters/claude-flow/index.js +79 -0
  13. package/v3/dist/adapters/claude-flow/index.js.map +1 -0
  14. package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts +70 -0
  15. package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts.map +1 -0
  16. package/v3/dist/adapters/claude-flow/model-router-bridge.js +203 -0
  17. package/v3/dist/adapters/claude-flow/model-router-bridge.js.map +1 -0
  18. package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts +73 -0
  19. package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts.map +1 -0
  20. package/v3/dist/adapters/claude-flow/pretrain-bridge.js +276 -0
  21. package/v3/dist/adapters/claude-flow/pretrain-bridge.js.map +1 -0
  22. package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts +70 -0
  23. package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts.map +1 -0
  24. package/v3/dist/adapters/claude-flow/trajectory-bridge.js +205 -0
  25. package/v3/dist/adapters/claude-flow/trajectory-bridge.js.map +1 -0
  26. package/v3/dist/adapters/claude-flow/types.d.ts +99 -0
  27. package/v3/dist/adapters/claude-flow/types.d.ts.map +1 -0
  28. package/v3/dist/adapters/claude-flow/types.js +6 -0
  29. package/v3/dist/adapters/claude-flow/types.js.map +1 -0
  30. package/v3/dist/causal-discovery/causal-graph.d.ts +80 -1
  31. package/v3/dist/causal-discovery/causal-graph.d.ts.map +1 -1
  32. package/v3/dist/causal-discovery/causal-graph.js +111 -1
  33. package/v3/dist/causal-discovery/causal-graph.js.map +1 -1
  34. package/v3/dist/cli/bundle.js +25321 -15378
  35. package/v3/dist/cli/command-registry.d.ts +55 -0
  36. package/v3/dist/cli/command-registry.d.ts.map +1 -0
  37. package/v3/dist/cli/command-registry.js +103 -0
  38. package/v3/dist/cli/command-registry.js.map +1 -0
  39. package/v3/dist/cli/commands/claude-flow-setup.d.ts +82 -0
  40. package/v3/dist/cli/commands/claude-flow-setup.d.ts.map +1 -0
  41. package/v3/dist/cli/commands/claude-flow-setup.js +334 -0
  42. package/v3/dist/cli/commands/claude-flow-setup.js.map +1 -0
  43. package/v3/dist/cli/commands/code.d.ts +9 -0
  44. package/v3/dist/cli/commands/code.d.ts.map +1 -0
  45. package/v3/dist/cli/commands/code.js +254 -0
  46. package/v3/dist/cli/commands/code.js.map +1 -0
  47. package/v3/dist/cli/commands/completions.d.ts +8 -0
  48. package/v3/dist/cli/commands/completions.d.ts.map +1 -0
  49. package/v3/dist/cli/commands/completions.js +99 -0
  50. package/v3/dist/cli/commands/completions.js.map +1 -0
  51. package/v3/dist/cli/commands/coverage.d.ts +9 -0
  52. package/v3/dist/cli/commands/coverage.d.ts.map +1 -0
  53. package/v3/dist/cli/commands/coverage.js +208 -0
  54. package/v3/dist/cli/commands/coverage.js.map +1 -0
  55. package/v3/dist/cli/commands/fleet.d.ts +11 -0
  56. package/v3/dist/cli/commands/fleet.d.ts.map +1 -0
  57. package/v3/dist/cli/commands/fleet.js +338 -0
  58. package/v3/dist/cli/commands/fleet.js.map +1 -0
  59. package/v3/dist/cli/commands/hooks.d.ts +2 -0
  60. package/v3/dist/cli/commands/hooks.d.ts.map +1 -1
  61. package/v3/dist/cli/commands/hooks.js +13 -2
  62. package/v3/dist/cli/commands/hooks.js.map +1 -1
  63. package/v3/dist/cli/commands/init.d.ts +19 -0
  64. package/v3/dist/cli/commands/init.d.ts.map +1 -0
  65. package/v3/dist/cli/commands/init.js +345 -0
  66. package/v3/dist/cli/commands/init.js.map +1 -0
  67. package/v3/dist/cli/commands/migrate.d.ts +9 -0
  68. package/v3/dist/cli/commands/migrate.d.ts.map +1 -0
  69. package/v3/dist/cli/commands/migrate.js +566 -0
  70. package/v3/dist/cli/commands/migrate.js.map +1 -0
  71. package/v3/dist/cli/commands/quality.d.ts +9 -0
  72. package/v3/dist/cli/commands/quality.d.ts.map +1 -0
  73. package/v3/dist/cli/commands/quality.js +40 -0
  74. package/v3/dist/cli/commands/quality.js.map +1 -0
  75. package/v3/dist/cli/commands/security.d.ts +9 -0
  76. package/v3/dist/cli/commands/security.d.ts.map +1 -0
  77. package/v3/dist/cli/commands/security.js +124 -0
  78. package/v3/dist/cli/commands/security.js.map +1 -0
  79. package/v3/dist/cli/commands/sync.d.ts +19 -0
  80. package/v3/dist/cli/commands/sync.d.ts.map +1 -0
  81. package/v3/dist/cli/commands/sync.js +283 -0
  82. package/v3/dist/cli/commands/sync.js.map +1 -0
  83. package/v3/dist/cli/commands/test.d.ts +9 -0
  84. package/v3/dist/cli/commands/test.d.ts.map +1 -0
  85. package/v3/dist/cli/commands/test.js +166 -0
  86. package/v3/dist/cli/commands/test.js.map +1 -0
  87. package/v3/dist/cli/handlers/agent-handler.d.ts +20 -0
  88. package/v3/dist/cli/handlers/agent-handler.d.ts.map +1 -0
  89. package/v3/dist/cli/handlers/agent-handler.js +158 -0
  90. package/v3/dist/cli/handlers/agent-handler.js.map +1 -0
  91. package/v3/dist/cli/handlers/domain-handler.d.ts +20 -0
  92. package/v3/dist/cli/handlers/domain-handler.d.ts.map +1 -0
  93. package/v3/dist/cli/handlers/domain-handler.js +115 -0
  94. package/v3/dist/cli/handlers/domain-handler.js.map +1 -0
  95. package/v3/dist/cli/handlers/index.d.ts +13 -0
  96. package/v3/dist/cli/handlers/index.d.ts.map +1 -0
  97. package/v3/dist/cli/handlers/index.js +15 -0
  98. package/v3/dist/cli/handlers/index.js.map +1 -0
  99. package/v3/dist/cli/handlers/init-handler.d.ts +38 -0
  100. package/v3/dist/cli/handlers/init-handler.d.ts.map +1 -0
  101. package/v3/dist/cli/handlers/init-handler.js +288 -0
  102. package/v3/dist/cli/handlers/init-handler.js.map +1 -0
  103. package/v3/dist/cli/handlers/interfaces.d.ts +104 -0
  104. package/v3/dist/cli/handlers/interfaces.d.ts.map +1 -0
  105. package/v3/dist/cli/handlers/interfaces.js +109 -0
  106. package/v3/dist/cli/handlers/interfaces.js.map +1 -0
  107. package/v3/dist/cli/handlers/protocol-handler.d.ts +19 -0
  108. package/v3/dist/cli/handlers/protocol-handler.d.ts.map +1 -0
  109. package/v3/dist/cli/handlers/protocol-handler.js +79 -0
  110. package/v3/dist/cli/handlers/protocol-handler.js.map +1 -0
  111. package/v3/dist/cli/handlers/status-handler.d.ts +30 -0
  112. package/v3/dist/cli/handlers/status-handler.d.ts.map +1 -0
  113. package/v3/dist/cli/handlers/status-handler.js +218 -0
  114. package/v3/dist/cli/handlers/status-handler.js.map +1 -0
  115. package/v3/dist/cli/handlers/task-handler.d.ts +22 -0
  116. package/v3/dist/cli/handlers/task-handler.d.ts.map +1 -0
  117. package/v3/dist/cli/handlers/task-handler.js +271 -0
  118. package/v3/dist/cli/handlers/task-handler.js.map +1 -0
  119. package/v3/dist/cli/index.d.ts +4 -0
  120. package/v3/dist/cli/index.d.ts.map +1 -1
  121. package/v3/dist/cli/index.js +62 -2583
  122. package/v3/dist/cli/index.js.map +1 -1
  123. package/v3/dist/cli/wizards/core/index.d.ts +11 -0
  124. package/v3/dist/cli/wizards/core/index.d.ts.map +1 -0
  125. package/v3/dist/cli/wizards/core/index.js +15 -0
  126. package/v3/dist/cli/wizards/core/index.js.map +1 -0
  127. package/v3/dist/cli/wizards/core/wizard-base.d.ts +87 -0
  128. package/v3/dist/cli/wizards/core/wizard-base.d.ts.map +1 -0
  129. package/v3/dist/cli/wizards/core/wizard-base.js +120 -0
  130. package/v3/dist/cli/wizards/core/wizard-base.js.map +1 -0
  131. package/v3/dist/cli/wizards/core/wizard-command.d.ts +182 -0
  132. package/v3/dist/cli/wizards/core/wizard-command.d.ts.map +1 -0
  133. package/v3/dist/cli/wizards/core/wizard-command.js +45 -0
  134. package/v3/dist/cli/wizards/core/wizard-command.js.map +1 -0
  135. package/v3/dist/cli/wizards/core/wizard-step.d.ts +109 -0
  136. package/v3/dist/cli/wizards/core/wizard-step.d.ts.map +1 -0
  137. package/v3/dist/cli/wizards/core/wizard-step.js +384 -0
  138. package/v3/dist/cli/wizards/core/wizard-step.js.map +1 -0
  139. package/v3/dist/cli/wizards/core/wizard-utils.d.ts +117 -0
  140. package/v3/dist/cli/wizards/core/wizard-utils.d.ts.map +1 -0
  141. package/v3/dist/cli/wizards/core/wizard-utils.js +291 -0
  142. package/v3/dist/cli/wizards/core/wizard-utils.js.map +1 -0
  143. package/v3/dist/cli/wizards/coverage-wizard.d.ts +13 -68
  144. package/v3/dist/cli/wizards/coverage-wizard.d.ts.map +1 -1
  145. package/v3/dist/cli/wizards/coverage-wizard.js +127 -391
  146. package/v3/dist/cli/wizards/coverage-wizard.js.map +1 -1
  147. package/v3/dist/cli/wizards/fleet-wizard.d.ts +13 -64
  148. package/v3/dist/cli/wizards/fleet-wizard.d.ts.map +1 -1
  149. package/v3/dist/cli/wizards/fleet-wizard.js +150 -363
  150. package/v3/dist/cli/wizards/fleet-wizard.js.map +1 -1
  151. package/v3/dist/cli/wizards/index.d.ts +2 -0
  152. package/v3/dist/cli/wizards/index.d.ts.map +1 -1
  153. package/v3/dist/cli/wizards/index.js +3 -0
  154. package/v3/dist/cli/wizards/index.js.map +1 -1
  155. package/v3/dist/cli/wizards/security-wizard.d.ts +13 -64
  156. package/v3/dist/cli/wizards/security-wizard.d.ts.map +1 -1
  157. package/v3/dist/cli/wizards/security-wizard.js +152 -395
  158. package/v3/dist/cli/wizards/security-wizard.js.map +1 -1
  159. package/v3/dist/cli/wizards/test-wizard.d.ts +13 -77
  160. package/v3/dist/cli/wizards/test-wizard.d.ts.map +1 -1
  161. package/v3/dist/cli/wizards/test-wizard.js +196 -328
  162. package/v3/dist/cli/wizards/test-wizard.js.map +1 -1
  163. package/v3/dist/coordination/mincut/interfaces.d.ts +8 -2
  164. package/v3/dist/coordination/mincut/interfaces.d.ts.map +1 -1
  165. package/v3/dist/coordination/mincut/interfaces.js.map +1 -1
  166. package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts +8 -0
  167. package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts.map +1 -1
  168. package/v3/dist/coordination/mincut/mincut-health-monitor.js +26 -4
  169. package/v3/dist/coordination/mincut/mincut-health-monitor.js.map +1 -1
  170. package/v3/dist/coordination/mincut/queen-integration.d.ts +7 -0
  171. package/v3/dist/coordination/mincut/queen-integration.d.ts.map +1 -1
  172. package/v3/dist/coordination/mincut/queen-integration.js +19 -1
  173. package/v3/dist/coordination/mincut/queen-integration.js.map +1 -1
  174. package/v3/dist/coordination/queen-coordinator.d.ts +5 -0
  175. package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
  176. package/v3/dist/coordination/queen-coordinator.js +45 -7
  177. package/v3/dist/coordination/queen-coordinator.js.map +1 -1
  178. package/v3/dist/coordination/task-executor.js +2 -2
  179. package/v3/dist/coordination/task-executor.js.map +1 -1
  180. package/v3/dist/domains/chaos-resilience/plugin.js +2 -2
  181. package/v3/dist/domains/chaos-resilience/plugin.js.map +1 -1
  182. package/v3/dist/domains/code-intelligence/plugin.js +2 -2
  183. package/v3/dist/domains/code-intelligence/plugin.js.map +1 -1
  184. package/v3/dist/domains/contract-testing/plugin.js +2 -2
  185. package/v3/dist/domains/contract-testing/plugin.js.map +1 -1
  186. package/v3/dist/domains/coverage-analysis/plugin.d.ts.map +1 -1
  187. package/v3/dist/domains/coverage-analysis/plugin.js +2 -1
  188. package/v3/dist/domains/coverage-analysis/plugin.js.map +1 -1
  189. package/v3/dist/domains/defect-intelligence/plugin.js +2 -2
  190. package/v3/dist/domains/defect-intelligence/plugin.js.map +1 -1
  191. package/v3/dist/domains/domain-interface.d.ts.map +1 -1
  192. package/v3/dist/domains/domain-interface.js +3 -1
  193. package/v3/dist/domains/domain-interface.js.map +1 -1
  194. package/v3/dist/domains/learning-optimization/coordinator.d.ts +5 -0
  195. package/v3/dist/domains/learning-optimization/coordinator.d.ts.map +1 -1
  196. package/v3/dist/domains/learning-optimization/coordinator.js +79 -0
  197. package/v3/dist/domains/learning-optimization/coordinator.js.map +1 -1
  198. package/v3/dist/domains/learning-optimization/plugin.js +2 -2
  199. package/v3/dist/domains/learning-optimization/plugin.js.map +1 -1
  200. package/v3/dist/domains/quality-assessment/plugin.js +2 -2
  201. package/v3/dist/domains/quality-assessment/plugin.js.map +1 -1
  202. package/v3/dist/domains/requirements-validation/plugin.js +2 -2
  203. package/v3/dist/domains/requirements-validation/plugin.js.map +1 -1
  204. package/v3/dist/domains/security-compliance/plugin.js +2 -2
  205. package/v3/dist/domains/security-compliance/plugin.js.map +1 -1
  206. package/v3/dist/domains/test-execution/index.d.ts +2 -1
  207. package/v3/dist/domains/test-execution/index.d.ts.map +1 -1
  208. package/v3/dist/domains/test-execution/index.js +0 -2
  209. package/v3/dist/domains/test-execution/index.js.map +1 -1
  210. package/v3/dist/domains/test-execution/interfaces.d.ts +222 -25
  211. package/v3/dist/domains/test-execution/interfaces.d.ts.map +1 -1
  212. package/v3/dist/domains/test-execution/interfaces.js +130 -3
  213. package/v3/dist/domains/test-execution/interfaces.js.map +1 -1
  214. package/v3/dist/domains/test-execution/plugin.d.ts.map +1 -1
  215. package/v3/dist/domains/test-execution/plugin.js +2 -1
  216. package/v3/dist/domains/test-execution/plugin.js.map +1 -1
  217. package/v3/dist/domains/test-execution/test-prioritization-types.d.ts +5 -172
  218. package/v3/dist/domains/test-execution/test-prioritization-types.d.ts.map +1 -1
  219. package/v3/dist/domains/test-execution/test-prioritization-types.js +6 -129
  220. package/v3/dist/domains/test-execution/test-prioritization-types.js.map +1 -1
  221. package/v3/dist/domains/test-execution/types/index.d.ts +7 -3
  222. package/v3/dist/domains/test-execution/types/index.d.ts.map +1 -1
  223. package/v3/dist/domains/test-execution/types/index.js +7 -17
  224. package/v3/dist/domains/test-execution/types/index.js.map +1 -1
  225. package/v3/dist/domains/test-generation/coordinator.d.ts +32 -1
  226. package/v3/dist/domains/test-generation/coordinator.d.ts.map +1 -1
  227. package/v3/dist/domains/test-generation/coordinator.js +72 -3
  228. package/v3/dist/domains/test-generation/coordinator.js.map +1 -1
  229. package/v3/dist/domains/test-generation/factories/index.d.ts +8 -0
  230. package/v3/dist/domains/test-generation/factories/index.d.ts.map +1 -0
  231. package/v3/dist/domains/test-generation/factories/index.js +8 -0
  232. package/v3/dist/domains/test-generation/factories/index.js.map +1 -0
  233. package/v3/dist/domains/test-generation/factories/test-generator-factory.d.ts +108 -0
  234. package/v3/dist/domains/test-generation/factories/test-generator-factory.d.ts.map +1 -0
  235. package/v3/dist/domains/test-generation/factories/test-generator-factory.js +158 -0
  236. package/v3/dist/domains/test-generation/factories/test-generator-factory.js.map +1 -0
  237. package/v3/dist/domains/test-generation/generators/base-test-generator.d.ts +79 -0
  238. package/v3/dist/domains/test-generation/generators/base-test-generator.d.ts.map +1 -0
  239. package/v3/dist/domains/test-generation/generators/base-test-generator.js +252 -0
  240. package/v3/dist/domains/test-generation/generators/base-test-generator.js.map +1 -0
  241. package/v3/dist/domains/test-generation/generators/index.d.ts +11 -0
  242. package/v3/dist/domains/test-generation/generators/index.d.ts.map +1 -0
  243. package/v3/dist/domains/test-generation/generators/index.js +13 -0
  244. package/v3/dist/domains/test-generation/generators/index.js.map +1 -0
  245. package/v3/dist/domains/test-generation/generators/jest-vitest-generator.d.ts +77 -0
  246. package/v3/dist/domains/test-generation/generators/jest-vitest-generator.d.ts.map +1 -0
  247. package/v3/dist/domains/test-generation/generators/jest-vitest-generator.js +365 -0
  248. package/v3/dist/domains/test-generation/generators/jest-vitest-generator.js.map +1 -0
  249. package/v3/dist/domains/test-generation/generators/mocha-generator.d.ts +56 -0
  250. package/v3/dist/domains/test-generation/generators/mocha-generator.d.ts.map +1 -0
  251. package/v3/dist/domains/test-generation/generators/mocha-generator.js +197 -0
  252. package/v3/dist/domains/test-generation/generators/mocha-generator.js.map +1 -0
  253. package/v3/dist/domains/test-generation/generators/pytest-generator.d.ts +66 -0
  254. package/v3/dist/domains/test-generation/generators/pytest-generator.d.ts.map +1 -0
  255. package/v3/dist/domains/test-generation/generators/pytest-generator.js +240 -0
  256. package/v3/dist/domains/test-generation/generators/pytest-generator.js.map +1 -0
  257. package/v3/dist/domains/test-generation/index.d.ts +2 -1
  258. package/v3/dist/domains/test-generation/index.d.ts.map +1 -1
  259. package/v3/dist/domains/test-generation/index.js +5 -1
  260. package/v3/dist/domains/test-generation/index.js.map +1 -1
  261. package/v3/dist/domains/test-generation/interfaces/index.d.ts +9 -0
  262. package/v3/dist/domains/test-generation/interfaces/index.d.ts.map +1 -0
  263. package/v3/dist/domains/test-generation/interfaces/index.js +9 -0
  264. package/v3/dist/domains/test-generation/interfaces/index.js.map +1 -0
  265. package/v3/dist/domains/test-generation/interfaces/test-generator.interface.d.ts +166 -0
  266. package/v3/dist/domains/test-generation/interfaces/test-generator.interface.d.ts.map +1 -0
  267. package/v3/dist/domains/test-generation/interfaces/test-generator.interface.js +8 -0
  268. package/v3/dist/domains/test-generation/interfaces/test-generator.interface.js.map +1 -0
  269. package/v3/dist/domains/test-generation/interfaces.d.ts +163 -24
  270. package/v3/dist/domains/test-generation/interfaces.d.ts.map +1 -1
  271. package/v3/dist/domains/test-generation/interfaces.js +2 -2
  272. package/v3/dist/domains/test-generation/plugin.d.ts.map +1 -1
  273. package/v3/dist/domains/test-generation/plugin.js +6 -5
  274. package/v3/dist/domains/test-generation/plugin.js.map +1 -1
  275. package/v3/dist/domains/test-generation/services/coherence-gate-service.d.ts +245 -0
  276. package/v3/dist/domains/test-generation/services/coherence-gate-service.d.ts.map +1 -0
  277. package/v3/dist/domains/test-generation/services/coherence-gate-service.js +454 -0
  278. package/v3/dist/domains/test-generation/services/coherence-gate-service.js.map +1 -0
  279. package/v3/dist/domains/test-generation/services/index.d.ts +8 -1
  280. package/v3/dist/domains/test-generation/services/index.d.ts.map +1 -1
  281. package/v3/dist/domains/test-generation/services/index.js +10 -1
  282. package/v3/dist/domains/test-generation/services/index.js.map +1 -1
  283. package/v3/dist/domains/test-generation/services/property-test-generator.d.ts +34 -0
  284. package/v3/dist/domains/test-generation/services/property-test-generator.d.ts.map +1 -0
  285. package/v3/dist/domains/test-generation/services/property-test-generator.js +306 -0
  286. package/v3/dist/domains/test-generation/services/property-test-generator.js.map +1 -0
  287. package/v3/dist/domains/test-generation/services/tdd-generator.d.ts +33 -0
  288. package/v3/dist/domains/test-generation/services/tdd-generator.d.ts.map +1 -0
  289. package/v3/dist/domains/test-generation/services/tdd-generator.js +342 -0
  290. package/v3/dist/domains/test-generation/services/tdd-generator.js.map +1 -0
  291. package/v3/dist/domains/test-generation/services/test-data-generator.d.ts +34 -0
  292. package/v3/dist/domains/test-generation/services/test-data-generator.d.ts.map +1 -0
  293. package/v3/dist/domains/test-generation/services/test-data-generator.js +245 -0
  294. package/v3/dist/domains/test-generation/services/test-data-generator.js.map +1 -0
  295. package/v3/dist/domains/test-generation/services/test-generator.d.ts +51 -160
  296. package/v3/dist/domains/test-generation/services/test-generator.d.ts.map +1 -1
  297. package/v3/dist/domains/test-generation/services/test-generator.js +101 -1858
  298. package/v3/dist/domains/test-generation/services/test-generator.js.map +1 -1
  299. package/v3/dist/domains/visual-accessibility/index.d.ts +2 -1
  300. package/v3/dist/domains/visual-accessibility/index.d.ts.map +1 -1
  301. package/v3/dist/domains/visual-accessibility/index.js +1 -0
  302. package/v3/dist/domains/visual-accessibility/index.js.map +1 -1
  303. package/v3/dist/domains/visual-accessibility/interfaces.d.ts +131 -0
  304. package/v3/dist/domains/visual-accessibility/interfaces.d.ts.map +1 -1
  305. package/v3/dist/domains/visual-accessibility/plugin.d.ts +26 -0
  306. package/v3/dist/domains/visual-accessibility/plugin.d.ts.map +1 -1
  307. package/v3/dist/domains/visual-accessibility/plugin.js +153 -2
  308. package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
  309. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts +42 -1
  310. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts.map +1 -1
  311. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js +69 -0
  312. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js.map +1 -1
  313. package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts +138 -0
  314. package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts.map +1 -0
  315. package/v3/dist/domains/visual-accessibility/services/eu-compliance.js +830 -0
  316. package/v3/dist/domains/visual-accessibility/services/eu-compliance.js.map +1 -0
  317. package/v3/dist/domains/visual-accessibility/services/index.d.ts +1 -0
  318. package/v3/dist/domains/visual-accessibility/services/index.d.ts.map +1 -1
  319. package/v3/dist/domains/visual-accessibility/services/index.js +1 -0
  320. package/v3/dist/domains/visual-accessibility/services/index.js.map +1 -1
  321. package/v3/dist/init/enhancements/claude-flow-adapter.d.ts +84 -0
  322. package/v3/dist/init/enhancements/claude-flow-adapter.d.ts.map +1 -0
  323. package/v3/dist/init/enhancements/claude-flow-adapter.js +250 -0
  324. package/v3/dist/init/enhancements/claude-flow-adapter.js.map +1 -0
  325. package/v3/dist/init/enhancements/detector.d.ts +10 -0
  326. package/v3/dist/init/enhancements/detector.d.ts.map +1 -0
  327. package/v3/dist/init/enhancements/detector.js +87 -0
  328. package/v3/dist/init/enhancements/detector.js.map +1 -0
  329. package/v3/dist/init/enhancements/index.d.ts +13 -0
  330. package/v3/dist/init/enhancements/index.d.ts.map +1 -0
  331. package/v3/dist/init/enhancements/index.js +25 -0
  332. package/v3/dist/init/enhancements/index.js.map +1 -0
  333. package/v3/dist/init/enhancements/types.d.ts +93 -0
  334. package/v3/dist/init/enhancements/types.d.ts.map +1 -0
  335. package/v3/dist/init/enhancements/types.js +6 -0
  336. package/v3/dist/init/enhancements/types.js.map +1 -0
  337. package/v3/dist/init/index.d.ts +8 -0
  338. package/v3/dist/init/index.d.ts.map +1 -1
  339. package/v3/dist/init/index.js +4 -0
  340. package/v3/dist/init/index.js.map +1 -1
  341. package/v3/dist/init/migration/config-migrator.d.ts +31 -0
  342. package/v3/dist/init/migration/config-migrator.d.ts.map +1 -0
  343. package/v3/dist/init/migration/config-migrator.js +133 -0
  344. package/v3/dist/init/migration/config-migrator.js.map +1 -0
  345. package/v3/dist/init/migration/data-migrator.d.ts +72 -0
  346. package/v3/dist/init/migration/data-migrator.d.ts.map +1 -0
  347. package/v3/dist/init/migration/data-migrator.js +233 -0
  348. package/v3/dist/init/migration/data-migrator.js.map +1 -0
  349. package/v3/dist/init/migration/detector.d.ts +44 -0
  350. package/v3/dist/init/migration/detector.d.ts.map +1 -0
  351. package/v3/dist/init/migration/detector.js +106 -0
  352. package/v3/dist/init/migration/detector.js.map +1 -0
  353. package/v3/dist/init/migration/index.d.ts +8 -0
  354. package/v3/dist/init/migration/index.d.ts.map +1 -0
  355. package/v3/dist/init/migration/index.js +8 -0
  356. package/v3/dist/init/migration/index.js.map +1 -0
  357. package/v3/dist/init/orchestrator.d.ts +68 -0
  358. package/v3/dist/init/orchestrator.d.ts.map +1 -0
  359. package/v3/dist/init/orchestrator.js +239 -0
  360. package/v3/dist/init/orchestrator.js.map +1 -0
  361. package/v3/dist/init/phases/01-detection.d.ts +30 -0
  362. package/v3/dist/init/phases/01-detection.d.ts.map +1 -0
  363. package/v3/dist/init/phases/01-detection.js +143 -0
  364. package/v3/dist/init/phases/01-detection.js.map +1 -0
  365. package/v3/dist/init/phases/02-analysis.d.ts +18 -0
  366. package/v3/dist/init/phases/02-analysis.d.ts.map +1 -0
  367. package/v3/dist/init/phases/02-analysis.js +28 -0
  368. package/v3/dist/init/phases/02-analysis.js.map +1 -0
  369. package/v3/dist/init/phases/03-configuration.d.ts +26 -0
  370. package/v3/dist/init/phases/03-configuration.d.ts.map +1 -0
  371. package/v3/dist/init/phases/03-configuration.js +98 -0
  372. package/v3/dist/init/phases/03-configuration.js.map +1 -0
  373. package/v3/dist/init/phases/04-database.d.ts +22 -0
  374. package/v3/dist/init/phases/04-database.d.ts.map +1 -0
  375. package/v3/dist/init/phases/04-database.js +88 -0
  376. package/v3/dist/init/phases/04-database.js.map +1 -0
  377. package/v3/dist/init/phases/05-learning.d.ts +28 -0
  378. package/v3/dist/init/phases/05-learning.d.ts.map +1 -0
  379. package/v3/dist/init/phases/05-learning.js +98 -0
  380. package/v3/dist/init/phases/05-learning.js.map +1 -0
  381. package/v3/dist/init/phases/06-code-intelligence.d.ts +33 -0
  382. package/v3/dist/init/phases/06-code-intelligence.d.ts.map +1 -0
  383. package/v3/dist/init/phases/06-code-intelligence.js +115 -0
  384. package/v3/dist/init/phases/06-code-intelligence.js.map +1 -0
  385. package/v3/dist/init/phases/07-hooks.d.ts +27 -0
  386. package/v3/dist/init/phases/07-hooks.d.ts.map +1 -0
  387. package/v3/dist/init/phases/07-hooks.js +209 -0
  388. package/v3/dist/init/phases/07-hooks.js.map +1 -0
  389. package/v3/dist/init/phases/08-mcp.d.ts +22 -0
  390. package/v3/dist/init/phases/08-mcp.d.ts.map +1 -0
  391. package/v3/dist/init/phases/08-mcp.js +62 -0
  392. package/v3/dist/init/phases/08-mcp.js.map +1 -0
  393. package/v3/dist/init/phases/09-assets.d.ts +23 -0
  394. package/v3/dist/init/phases/09-assets.d.ts.map +1 -0
  395. package/v3/dist/init/phases/09-assets.js +82 -0
  396. package/v3/dist/init/phases/09-assets.js.map +1 -0
  397. package/v3/dist/init/phases/10-workers.d.ts +23 -0
  398. package/v3/dist/init/phases/10-workers.d.ts.map +1 -0
  399. package/v3/dist/init/phases/10-workers.js +111 -0
  400. package/v3/dist/init/phases/10-workers.js.map +1 -0
  401. package/v3/dist/init/phases/11-claude-md.d.ts +26 -0
  402. package/v3/dist/init/phases/11-claude-md.d.ts.map +1 -0
  403. package/v3/dist/init/phases/11-claude-md.js +121 -0
  404. package/v3/dist/init/phases/11-claude-md.js.map +1 -0
  405. package/v3/dist/init/phases/12-verification.d.ts +61 -0
  406. package/v3/dist/init/phases/12-verification.d.ts.map +1 -0
  407. package/v3/dist/init/phases/12-verification.js +370 -0
  408. package/v3/dist/init/phases/12-verification.js.map +1 -0
  409. package/v3/dist/init/phases/index.d.ts +46 -0
  410. package/v3/dist/init/phases/index.d.ts.map +1 -0
  411. package/v3/dist/init/phases/index.js +64 -0
  412. package/v3/dist/init/phases/index.js.map +1 -0
  413. package/v3/dist/init/phases/phase-interface.d.ts +193 -0
  414. package/v3/dist/init/phases/phase-interface.d.ts.map +1 -0
  415. package/v3/dist/init/phases/phase-interface.js +119 -0
  416. package/v3/dist/init/phases/phase-interface.js.map +1 -0
  417. package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.d.ts +24 -62
  418. package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.d.ts.map +1 -1
  419. package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.js +45 -497
  420. package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.js.map +1 -1
  421. package/v3/dist/integrations/agentic-flow/model-router/router.js +2 -2
  422. package/v3/dist/integrations/agentic-flow/model-router/router.js.map +1 -1
  423. package/v3/dist/integrations/agentic-flow/model-router/score-calculator.d.ts +98 -0
  424. package/v3/dist/integrations/agentic-flow/model-router/score-calculator.d.ts.map +1 -0
  425. package/v3/dist/integrations/agentic-flow/model-router/score-calculator.js +197 -0
  426. package/v3/dist/integrations/agentic-flow/model-router/score-calculator.js.map +1 -0
  427. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.d.ts +102 -0
  428. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.d.ts.map +1 -0
  429. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js +372 -0
  430. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js.map +1 -0
  431. package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.d.ts +64 -0
  432. package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.d.ts.map +1 -0
  433. package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.js +120 -0
  434. package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.js.map +1 -0
  435. package/v3/dist/integrations/coherence/coherence-service.d.ts +323 -0
  436. package/v3/dist/integrations/coherence/coherence-service.d.ts.map +1 -0
  437. package/v3/dist/integrations/coherence/coherence-service.js +856 -0
  438. package/v3/dist/integrations/coherence/coherence-service.js.map +1 -0
  439. package/v3/dist/integrations/coherence/engines/category-adapter.d.ts +170 -0
  440. package/v3/dist/integrations/coherence/engines/category-adapter.d.ts.map +1 -0
  441. package/v3/dist/integrations/coherence/engines/category-adapter.js +403 -0
  442. package/v3/dist/integrations/coherence/engines/category-adapter.js.map +1 -0
  443. package/v3/dist/integrations/coherence/engines/causal-adapter.d.ts +159 -0
  444. package/v3/dist/integrations/coherence/engines/causal-adapter.d.ts.map +1 -0
  445. package/v3/dist/integrations/coherence/engines/causal-adapter.js +348 -0
  446. package/v3/dist/integrations/coherence/engines/causal-adapter.js.map +1 -0
  447. package/v3/dist/integrations/coherence/engines/cohomology-adapter.d.ts +174 -0
  448. package/v3/dist/integrations/coherence/engines/cohomology-adapter.d.ts.map +1 -0
  449. package/v3/dist/integrations/coherence/engines/cohomology-adapter.js +401 -0
  450. package/v3/dist/integrations/coherence/engines/cohomology-adapter.js.map +1 -0
  451. package/v3/dist/integrations/coherence/engines/homotopy-adapter.d.ts +201 -0
  452. package/v3/dist/integrations/coherence/engines/homotopy-adapter.d.ts.map +1 -0
  453. package/v3/dist/integrations/coherence/engines/homotopy-adapter.js +324 -0
  454. package/v3/dist/integrations/coherence/engines/homotopy-adapter.js.map +1 -0
  455. package/v3/dist/integrations/coherence/engines/index.d.ts +20 -0
  456. package/v3/dist/integrations/coherence/engines/index.d.ts.map +1 -0
  457. package/v3/dist/integrations/coherence/engines/index.js +26 -0
  458. package/v3/dist/integrations/coherence/engines/index.js.map +1 -0
  459. package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts +193 -0
  460. package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts.map +1 -0
  461. package/v3/dist/integrations/coherence/engines/spectral-adapter.js +565 -0
  462. package/v3/dist/integrations/coherence/engines/spectral-adapter.js.map +1 -0
  463. package/v3/dist/integrations/coherence/engines/witness-adapter.d.ts +175 -0
  464. package/v3/dist/integrations/coherence/engines/witness-adapter.d.ts.map +1 -0
  465. package/v3/dist/integrations/coherence/engines/witness-adapter.js +377 -0
  466. package/v3/dist/integrations/coherence/engines/witness-adapter.js.map +1 -0
  467. package/v3/dist/integrations/coherence/index.d.ts +84 -0
  468. package/v3/dist/integrations/coherence/index.d.ts.map +1 -0
  469. package/v3/dist/integrations/coherence/index.js +114 -0
  470. package/v3/dist/integrations/coherence/index.js.map +1 -0
  471. package/v3/dist/integrations/coherence/threshold-tuner.d.ts +396 -0
  472. package/v3/dist/integrations/coherence/threshold-tuner.d.ts.map +1 -0
  473. package/v3/dist/integrations/coherence/threshold-tuner.js +538 -0
  474. package/v3/dist/integrations/coherence/threshold-tuner.js.map +1 -0
  475. package/v3/dist/integrations/coherence/types.d.ts +879 -0
  476. package/v3/dist/integrations/coherence/types.d.ts.map +1 -0
  477. package/v3/dist/integrations/coherence/types.js +134 -0
  478. package/v3/dist/integrations/coherence/types.js.map +1 -0
  479. package/v3/dist/integrations/coherence/wasm-loader.d.ts +351 -0
  480. package/v3/dist/integrations/coherence/wasm-loader.d.ts.map +1 -0
  481. package/v3/dist/integrations/coherence/wasm-loader.js +842 -0
  482. package/v3/dist/integrations/coherence/wasm-loader.js.map +1 -0
  483. package/v3/dist/integrations/embeddings/index/HNSWIndex.d.ts.map +1 -1
  484. package/v3/dist/integrations/embeddings/index/HNSWIndex.js +4 -1
  485. package/v3/dist/integrations/embeddings/index/HNSWIndex.js.map +1 -1
  486. package/v3/dist/kernel/interfaces.d.ts +8 -1
  487. package/v3/dist/kernel/interfaces.d.ts.map +1 -1
  488. package/v3/dist/learning/aqe-learning-engine.d.ts +272 -0
  489. package/v3/dist/learning/aqe-learning-engine.d.ts.map +1 -0
  490. package/v3/dist/learning/aqe-learning-engine.js +708 -0
  491. package/v3/dist/learning/aqe-learning-engine.js.map +1 -0
  492. package/v3/dist/learning/causal-verifier.d.ts +244 -0
  493. package/v3/dist/learning/causal-verifier.d.ts.map +1 -0
  494. package/v3/dist/learning/causal-verifier.js +300 -0
  495. package/v3/dist/learning/causal-verifier.js.map +1 -0
  496. package/v3/dist/learning/experience-capture.d.ts +266 -0
  497. package/v3/dist/learning/experience-capture.d.ts.map +1 -0
  498. package/v3/dist/learning/experience-capture.js +647 -0
  499. package/v3/dist/learning/experience-capture.js.map +1 -0
  500. package/v3/dist/learning/index.d.ts +8 -0
  501. package/v3/dist/learning/index.d.ts.map +1 -1
  502. package/v3/dist/learning/index.js +16 -0
  503. package/v3/dist/learning/index.js.map +1 -1
  504. package/v3/dist/learning/memory-auditor.d.ts +235 -0
  505. package/v3/dist/learning/memory-auditor.d.ts.map +1 -0
  506. package/v3/dist/learning/memory-auditor.js +480 -0
  507. package/v3/dist/learning/memory-auditor.js.map +1 -0
  508. package/v3/dist/learning/pattern-store.d.ts.map +1 -1
  509. package/v3/dist/learning/pattern-store.js +27 -6
  510. package/v3/dist/learning/pattern-store.js.map +1 -1
  511. package/v3/dist/learning/qe-patterns.d.ts +15 -1
  512. package/v3/dist/learning/qe-patterns.d.ts.map +1 -1
  513. package/v3/dist/learning/qe-patterns.js +26 -5
  514. package/v3/dist/learning/qe-patterns.js.map +1 -1
  515. package/v3/dist/learning/qe-reasoning-bank.d.ts +38 -2
  516. package/v3/dist/learning/qe-reasoning-bank.d.ts.map +1 -1
  517. package/v3/dist/learning/qe-reasoning-bank.js +86 -4
  518. package/v3/dist/learning/qe-reasoning-bank.js.map +1 -1
  519. package/v3/dist/learning/real-qe-reasoning-bank.d.ts +32 -2
  520. package/v3/dist/learning/real-qe-reasoning-bank.d.ts.map +1 -1
  521. package/v3/dist/learning/real-qe-reasoning-bank.js +61 -6
  522. package/v3/dist/learning/real-qe-reasoning-bank.js.map +1 -1
  523. package/v3/dist/mcp/bundle.js +8786 -1737
  524. package/v3/dist/mcp/security/cve-prevention.d.ts +31 -134
  525. package/v3/dist/mcp/security/cve-prevention.d.ts.map +1 -1
  526. package/v3/dist/mcp/security/cve-prevention.js +37 -562
  527. package/v3/dist/mcp/security/cve-prevention.js.map +1 -1
  528. package/v3/dist/mcp/security/index.d.ts +5 -1
  529. package/v3/dist/mcp/security/index.d.ts.map +1 -1
  530. package/v3/dist/mcp/security/validators/command-validator.d.ts +41 -0
  531. package/v3/dist/mcp/security/validators/command-validator.d.ts.map +1 -0
  532. package/v3/dist/mcp/security/validators/command-validator.js +123 -0
  533. package/v3/dist/mcp/security/validators/command-validator.js.map +1 -0
  534. package/v3/dist/mcp/security/validators/crypto-validator.d.ts +40 -0
  535. package/v3/dist/mcp/security/validators/crypto-validator.d.ts.map +1 -0
  536. package/v3/dist/mcp/security/validators/crypto-validator.js +72 -0
  537. package/v3/dist/mcp/security/validators/crypto-validator.js.map +1 -0
  538. package/v3/dist/mcp/security/validators/index.d.ts +12 -0
  539. package/v3/dist/mcp/security/validators/index.d.ts.map +1 -0
  540. package/v3/dist/mcp/security/validators/index.js +22 -0
  541. package/v3/dist/mcp/security/validators/index.js.map +1 -0
  542. package/v3/dist/mcp/security/validators/input-sanitizer.d.ts +56 -0
  543. package/v3/dist/mcp/security/validators/input-sanitizer.d.ts.map +1 -0
  544. package/v3/dist/mcp/security/validators/input-sanitizer.js +157 -0
  545. package/v3/dist/mcp/security/validators/input-sanitizer.js.map +1 -0
  546. package/v3/dist/mcp/security/validators/interfaces.d.ts +164 -0
  547. package/v3/dist/mcp/security/validators/interfaces.d.ts.map +1 -0
  548. package/v3/dist/mcp/security/validators/interfaces.js +6 -0
  549. package/v3/dist/mcp/security/validators/interfaces.js.map +1 -0
  550. package/v3/dist/mcp/security/validators/path-traversal-validator.d.ts +50 -0
  551. package/v3/dist/mcp/security/validators/path-traversal-validator.d.ts.map +1 -0
  552. package/v3/dist/mcp/security/validators/path-traversal-validator.js +242 -0
  553. package/v3/dist/mcp/security/validators/path-traversal-validator.js.map +1 -0
  554. package/v3/dist/mcp/security/validators/regex-safety-validator.d.ts +50 -0
  555. package/v3/dist/mcp/security/validators/regex-safety-validator.d.ts.map +1 -0
  556. package/v3/dist/mcp/security/validators/regex-safety-validator.js +183 -0
  557. package/v3/dist/mcp/security/validators/regex-safety-validator.js.map +1 -0
  558. package/v3/dist/mcp/security/validators/validation-orchestrator.d.ts +66 -0
  559. package/v3/dist/mcp/security/validators/validation-orchestrator.d.ts.map +1 -0
  560. package/v3/dist/mcp/security/validators/validation-orchestrator.js +146 -0
  561. package/v3/dist/mcp/security/validators/validation-orchestrator.js.map +1 -0
  562. package/v3/dist/mcp/server.d.ts.map +1 -1
  563. package/v3/dist/mcp/server.js +1 -0
  564. package/v3/dist/mcp/server.js.map +1 -1
  565. package/v3/dist/mcp/tool-registry.d.ts +3 -1
  566. package/v3/dist/mcp/tool-registry.d.ts.map +1 -1
  567. package/v3/dist/mcp/tool-registry.js +155 -2
  568. package/v3/dist/mcp/tool-registry.js.map +1 -1
  569. package/v3/dist/mcp/tools/coherence/audit.d.ts +107 -0
  570. package/v3/dist/mcp/tools/coherence/audit.d.ts.map +1 -0
  571. package/v3/dist/mcp/tools/coherence/audit.js +236 -0
  572. package/v3/dist/mcp/tools/coherence/audit.js.map +1 -0
  573. package/v3/dist/mcp/tools/coherence/check.d.ts +106 -0
  574. package/v3/dist/mcp/tools/coherence/check.d.ts.map +1 -0
  575. package/v3/dist/mcp/tools/coherence/check.js +205 -0
  576. package/v3/dist/mcp/tools/coherence/check.js.map +1 -0
  577. package/v3/dist/mcp/tools/coherence/collapse.d.ts +123 -0
  578. package/v3/dist/mcp/tools/coherence/collapse.d.ts.map +1 -0
  579. package/v3/dist/mcp/tools/coherence/collapse.js +279 -0
  580. package/v3/dist/mcp/tools/coherence/collapse.js.map +1 -0
  581. package/v3/dist/mcp/tools/coherence/consensus.d.ts +100 -0
  582. package/v3/dist/mcp/tools/coherence/consensus.d.ts.map +1 -0
  583. package/v3/dist/mcp/tools/coherence/consensus.js +201 -0
  584. package/v3/dist/mcp/tools/coherence/consensus.js.map +1 -0
  585. package/v3/dist/mcp/tools/coherence/index.d.ts +31 -0
  586. package/v3/dist/mcp/tools/coherence/index.d.ts.map +1 -0
  587. package/v3/dist/mcp/tools/coherence/index.js +42 -0
  588. package/v3/dist/mcp/tools/coherence/index.js.map +1 -0
  589. package/v3/dist/mcp/tools/index.d.ts +6 -1
  590. package/v3/dist/mcp/tools/index.d.ts.map +1 -1
  591. package/v3/dist/mcp/tools/index.js +9 -1
  592. package/v3/dist/mcp/tools/index.js.map +1 -1
  593. package/v3/dist/mcp/tools/mincut/index.d.ts +1 -1
  594. package/v3/dist/mcp/tools/mincut/index.d.ts.map +1 -1
  595. package/v3/dist/mcp/tools/mincut/index.js.map +1 -1
  596. package/v3/dist/mcp/tools/registry.d.ts +4 -0
  597. package/v3/dist/mcp/tools/registry.d.ts.map +1 -1
  598. package/v3/dist/mcp/tools/registry.js +5 -0
  599. package/v3/dist/mcp/tools/registry.js.map +1 -1
  600. package/v3/dist/mcp/tools/test-generation/generate.d.ts +1 -0
  601. package/v3/dist/mcp/tools/test-generation/generate.d.ts.map +1 -1
  602. package/v3/dist/mcp/tools/test-generation/generate.js +3 -2
  603. package/v3/dist/mcp/tools/test-generation/generate.js.map +1 -1
  604. package/v3/dist/mcp/types.d.ts +1 -1
  605. package/v3/dist/mcp/types.d.ts.map +1 -1
  606. package/v3/dist/strange-loop/belief-reconciler.d.ts +357 -0
  607. package/v3/dist/strange-loop/belief-reconciler.d.ts.map +1 -0
  608. package/v3/dist/strange-loop/belief-reconciler.js +696 -0
  609. package/v3/dist/strange-loop/belief-reconciler.js.map +1 -0
  610. package/v3/dist/strange-loop/index.d.ts +1 -0
  611. package/v3/dist/strange-loop/index.d.ts.map +1 -1
  612. package/v3/dist/strange-loop/index.js +2 -0
  613. package/v3/dist/strange-loop/index.js.map +1 -1
  614. package/v3/dist/strange-loop/strange-loop.d.ts +177 -5
  615. package/v3/dist/strange-loop/strange-loop.d.ts.map +1 -1
  616. package/v3/dist/strange-loop/strange-loop.js +452 -9
  617. package/v3/dist/strange-loop/strange-loop.js.map +1 -1
  618. package/v3/dist/strange-loop/types.d.ts +205 -1
  619. package/v3/dist/strange-loop/types.d.ts.map +1 -1
  620. package/v3/dist/strange-loop/types.js +5 -0
  621. package/v3/dist/strange-loop/types.js.map +1 -1
  622. package/v3/dist/sync/cloud/index.d.ts +8 -0
  623. package/v3/dist/sync/cloud/index.d.ts.map +1 -0
  624. package/v3/dist/sync/cloud/index.js +8 -0
  625. package/v3/dist/sync/cloud/index.js.map +1 -0
  626. package/v3/dist/sync/cloud/postgres-writer.d.ts +88 -0
  627. package/v3/dist/sync/cloud/postgres-writer.d.ts.map +1 -0
  628. package/v3/dist/sync/cloud/postgres-writer.js +319 -0
  629. package/v3/dist/sync/cloud/postgres-writer.js.map +1 -0
  630. package/v3/dist/sync/cloud/tunnel-manager.d.ts +75 -0
  631. package/v3/dist/sync/cloud/tunnel-manager.d.ts.map +1 -0
  632. package/v3/dist/sync/cloud/tunnel-manager.js +221 -0
  633. package/v3/dist/sync/cloud/tunnel-manager.js.map +1 -0
  634. package/v3/dist/sync/index.d.ts +35 -0
  635. package/v3/dist/sync/index.d.ts.map +1 -0
  636. package/v3/dist/sync/index.js +35 -0
  637. package/v3/dist/sync/index.js.map +1 -0
  638. package/v3/dist/sync/interfaces.d.ts +245 -0
  639. package/v3/dist/sync/interfaces.d.ts.map +1 -0
  640. package/v3/dist/sync/interfaces.js +160 -0
  641. package/v3/dist/sync/interfaces.js.map +1 -0
  642. package/v3/dist/sync/readers/index.d.ts +8 -0
  643. package/v3/dist/sync/readers/index.d.ts.map +1 -0
  644. package/v3/dist/sync/readers/index.js +8 -0
  645. package/v3/dist/sync/readers/index.js.map +1 -0
  646. package/v3/dist/sync/readers/json-reader.d.ts +95 -0
  647. package/v3/dist/sync/readers/json-reader.d.ts.map +1 -0
  648. package/v3/dist/sync/readers/json-reader.js +306 -0
  649. package/v3/dist/sync/readers/json-reader.js.map +1 -0
  650. package/v3/dist/sync/readers/sqlite-reader.d.ts +88 -0
  651. package/v3/dist/sync/readers/sqlite-reader.d.ts.map +1 -0
  652. package/v3/dist/sync/readers/sqlite-reader.js +255 -0
  653. package/v3/dist/sync/readers/sqlite-reader.js.map +1 -0
  654. package/v3/dist/sync/sync-agent.d.ts +116 -0
  655. package/v3/dist/sync/sync-agent.d.ts.map +1 -0
  656. package/v3/dist/sync/sync-agent.js +416 -0
  657. package/v3/dist/sync/sync-agent.js.map +1 -0
  658. package/v3/package.json +17 -2
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Cloud Sync Agent
3
+ *
4
+ * Orchestrates syncing local AQE learning data to cloud PostgreSQL.
5
+ * Consolidates data from 6+ fragmented local sources.
6
+ *
7
+ * Features:
8
+ * - Multi-source reading (SQLite, JSON)
9
+ * - IAP tunnel management
10
+ * - Batch upserts with conflict resolution
11
+ * - Progress tracking and reporting
12
+ * - Incremental and full sync modes
13
+ */
14
+ import type { SyncConfig, SyncReport, SyncResult, SyncSource } from './interfaces.js';
15
+ /**
16
+ * Sync agent configuration
17
+ */
18
+ export interface SyncAgentConfig extends SyncConfig {
19
+ /** Callback for progress updates */
20
+ onProgress?: (message: string, progress: number) => void;
21
+ /** Callback for errors */
22
+ onError?: (error: Error, source: string) => void;
23
+ /** Enable verbose logging */
24
+ verbose?: boolean;
25
+ }
26
+ /**
27
+ * Cloud Sync Agent
28
+ */
29
+ export declare class CloudSyncAgent {
30
+ private readonly config;
31
+ private readonly readers;
32
+ private writer;
33
+ private report;
34
+ constructor(config?: Partial<SyncAgentConfig>);
35
+ /**
36
+ * Initialize the sync agent
37
+ */
38
+ initialize(): Promise<void>;
39
+ /**
40
+ * Run a full sync
41
+ */
42
+ syncAll(): Promise<SyncReport>;
43
+ /**
44
+ * Run incremental sync (only changed records)
45
+ */
46
+ syncIncremental(since?: Date): Promise<SyncReport>;
47
+ /**
48
+ * Sync a single source
49
+ */
50
+ syncSource(source: SyncSource): Promise<SyncResult>;
51
+ /**
52
+ * Sync a source incrementally
53
+ */
54
+ private syncSourceIncremental;
55
+ /**
56
+ * Get current sync status
57
+ */
58
+ getStatus(): Promise<{
59
+ sources: SourceStatus[];
60
+ lastSync?: Date;
61
+ }>;
62
+ /**
63
+ * Verify sync by comparing counts
64
+ */
65
+ verify(): Promise<VerifyResult>;
66
+ /**
67
+ * Close all connections
68
+ */
69
+ close(): Promise<void>;
70
+ private createReader;
71
+ private connectToCloud;
72
+ private disconnect;
73
+ private createReport;
74
+ private log;
75
+ private progress;
76
+ }
77
+ /**
78
+ * Source status information
79
+ */
80
+ export interface SourceStatus {
81
+ name: string;
82
+ type: 'sqlite' | 'json';
83
+ targetTable: string;
84
+ recordCount: number;
85
+ enabled: boolean;
86
+ priority: 'high' | 'medium' | 'low';
87
+ error?: string;
88
+ }
89
+ /**
90
+ * Verify result
91
+ */
92
+ export interface VerifyResult {
93
+ verified: boolean;
94
+ results: VerifyTableResult[];
95
+ }
96
+ export interface VerifyTableResult {
97
+ source: string;
98
+ table: string;
99
+ localCount: number;
100
+ cloudCount: number;
101
+ match: boolean;
102
+ diff: number;
103
+ }
104
+ /**
105
+ * Create a sync agent
106
+ */
107
+ export declare function createSyncAgent(config?: Partial<SyncAgentConfig>): CloudSyncAgent;
108
+ /**
109
+ * Quick sync utility
110
+ */
111
+ export declare function syncToCloud(config?: Partial<SyncAgentConfig>): Promise<SyncReport>;
112
+ /**
113
+ * Quick incremental sync utility
114
+ */
115
+ export declare function syncIncrementalToCloud(since?: Date, config?: Partial<SyncAgentConfig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AU,CAAC,CAQrB"}
@@ -0,0 +1,416 @@
1
+ /**
2
+ * Cloud Sync Agent
3
+ *
4
+ * Orchestrates syncing local AQE learning data to cloud PostgreSQL.
5
+ * Consolidates data from 6+ fragmented local sources.
6
+ *
7
+ * Features:
8
+ * - Multi-source reading (SQLite, JSON)
9
+ * - IAP tunnel management
10
+ * - Batch upserts with conflict resolution
11
+ * - Progress tracking and reporting
12
+ * - Incremental and full sync modes
13
+ */
14
+ import { v4 as uuidv4 } from 'uuid';
15
+ import { DEFAULT_SYNC_CONFIG } from './interfaces.js';
16
+ import { createSQLiteReader } from './readers/sqlite-reader.js';
17
+ import { createJSONReader } from './readers/json-reader.js';
18
+ import { createConnectionManager } from './cloud/tunnel-manager.js';
19
+ import { createPostgresWriter } from './cloud/postgres-writer.js';
20
+ /**
21
+ * Cloud Sync Agent
22
+ */
23
+ export class CloudSyncAgent {
24
+ config;
25
+ readers = new Map();
26
+ writer = null;
27
+ report = null;
28
+ constructor(config = {}) {
29
+ this.config = {
30
+ ...DEFAULT_SYNC_CONFIG,
31
+ ...config,
32
+ local: { ...DEFAULT_SYNC_CONFIG.local, ...config.local },
33
+ cloud: { ...DEFAULT_SYNC_CONFIG.cloud, ...config.cloud },
34
+ sync: { ...DEFAULT_SYNC_CONFIG.sync, ...config.sync },
35
+ };
36
+ }
37
+ /**
38
+ * Initialize the sync agent
39
+ */
40
+ async initialize() {
41
+ this.log('Initializing sync agent...');
42
+ // Create readers for each enabled source
43
+ const sources = this.config.sync.sources.filter(s => s.enabled !== false);
44
+ for (const source of sources) {
45
+ const reader = this.createReader(source);
46
+ if (reader) {
47
+ try {
48
+ await reader.initialize();
49
+ this.readers.set(source.name, reader);
50
+ this.log(`Initialized reader: ${source.name}`);
51
+ }
52
+ catch (error) {
53
+ this.log(`Warning: Failed to initialize reader ${source.name}: ${error}`, 'warn');
54
+ }
55
+ }
56
+ }
57
+ this.log(`Initialized ${this.readers.size} readers`);
58
+ }
59
+ /**
60
+ * Run a full sync
61
+ */
62
+ async syncAll() {
63
+ this.report = this.createReport('full');
64
+ try {
65
+ await this.connectToCloud();
66
+ // Sort sources by priority
67
+ const sources = this.config.sync.sources
68
+ .filter(s => s.enabled !== false && this.readers.has(s.name))
69
+ .sort((a, b) => {
70
+ const priorityOrder = { high: 0, medium: 1, low: 2 };
71
+ return priorityOrder[a.priority] - priorityOrder[b.priority];
72
+ });
73
+ let completed = 0;
74
+ const total = sources.length;
75
+ for (const source of sources) {
76
+ this.progress(`Syncing ${source.name}...`, completed / total);
77
+ const result = await this.syncSource(source);
78
+ this.report.results.push(result);
79
+ completed++;
80
+ }
81
+ this.report.status = this.report.results.every(r => r.success) ? 'completed' : 'partial';
82
+ }
83
+ catch (error) {
84
+ this.report.status = 'failed';
85
+ this.report.errors.push(error instanceof Error ? error.message : String(error));
86
+ }
87
+ finally {
88
+ await this.disconnect();
89
+ this.report.completedAt = new Date();
90
+ this.report.totalDurationMs = this.report.completedAt.getTime() - this.report.startedAt.getTime();
91
+ this.report.totalRecordsSynced = this.report.results.reduce((sum, r) => sum + r.recordsSynced, 0);
92
+ this.report.totalConflictsResolved = this.report.results.reduce((sum, r) => sum + r.conflictsResolved, 0);
93
+ }
94
+ return this.report;
95
+ }
96
+ /**
97
+ * Run incremental sync (only changed records)
98
+ */
99
+ async syncIncremental(since) {
100
+ this.report = this.createReport('incremental');
101
+ // Default to 24 hours ago if not specified
102
+ const sinceDate = since || new Date(Date.now() - 24 * 60 * 60 * 1000);
103
+ try {
104
+ await this.connectToCloud();
105
+ const sources = this.config.sync.sources
106
+ .filter(s => s.enabled !== false && this.readers.has(s.name) && s.mode !== 'full')
107
+ .sort((a, b) => {
108
+ const priorityOrder = { high: 0, medium: 1, low: 2 };
109
+ return priorityOrder[a.priority] - priorityOrder[b.priority];
110
+ });
111
+ for (const source of sources) {
112
+ this.progress(`Incremental sync ${source.name}...`, 0);
113
+ const result = await this.syncSourceIncremental(source, sinceDate);
114
+ this.report.results.push(result);
115
+ }
116
+ this.report.status = this.report.results.every(r => r.success) ? 'completed' : 'partial';
117
+ }
118
+ catch (error) {
119
+ this.report.status = 'failed';
120
+ this.report.errors.push(error instanceof Error ? error.message : String(error));
121
+ }
122
+ finally {
123
+ await this.disconnect();
124
+ this.report.completedAt = new Date();
125
+ this.report.totalDurationMs = this.report.completedAt.getTime() - this.report.startedAt.getTime();
126
+ this.report.totalRecordsSynced = this.report.results.reduce((sum, r) => sum + r.recordsSynced, 0);
127
+ }
128
+ return this.report;
129
+ }
130
+ /**
131
+ * Sync a single source
132
+ */
133
+ async syncSource(source) {
134
+ const startTime = Date.now();
135
+ const result = {
136
+ success: false,
137
+ table: source.targetTable,
138
+ source: source.name,
139
+ recordsSynced: 0,
140
+ conflictsResolved: 0,
141
+ recordsSkipped: 0,
142
+ durationMs: 0,
143
+ warnings: [],
144
+ };
145
+ try {
146
+ const reader = this.readers.get(source.name);
147
+ if (!reader) {
148
+ throw new Error(`Reader not found: ${source.name}`);
149
+ }
150
+ // Read all records
151
+ const records = await reader.readAll();
152
+ this.log(`Read ${records.length} records from ${source.name}`);
153
+ if (records.length === 0) {
154
+ result.success = true;
155
+ result.durationMs = Date.now() - startTime;
156
+ return result;
157
+ }
158
+ // Write to cloud
159
+ if (this.writer && !this.config.sync.dryRun) {
160
+ await this.writer.beginTransaction();
161
+ try {
162
+ const written = await this.writer.upsert(source.targetTable, records, {
163
+ skipIfExists: source.mode === 'append',
164
+ });
165
+ result.recordsSynced = written;
166
+ await this.writer.commit();
167
+ }
168
+ catch (error) {
169
+ await this.writer.rollback();
170
+ throw error;
171
+ }
172
+ }
173
+ else {
174
+ // Dry run - just count
175
+ result.recordsSynced = records.length;
176
+ this.log(`[DRY RUN] Would sync ${records.length} records to ${source.targetTable}`);
177
+ }
178
+ result.success = true;
179
+ }
180
+ catch (error) {
181
+ result.error = error instanceof Error ? error.message : String(error);
182
+ this.config.onError?.(error instanceof Error ? error : new Error(String(error)), source.name);
183
+ }
184
+ result.durationMs = Date.now() - startTime;
185
+ return result;
186
+ }
187
+ /**
188
+ * Sync a source incrementally
189
+ */
190
+ async syncSourceIncremental(source, since) {
191
+ const startTime = Date.now();
192
+ const result = {
193
+ success: false,
194
+ table: source.targetTable,
195
+ source: source.name,
196
+ recordsSynced: 0,
197
+ conflictsResolved: 0,
198
+ recordsSkipped: 0,
199
+ durationMs: 0,
200
+ };
201
+ try {
202
+ const reader = this.readers.get(source.name);
203
+ if (!reader) {
204
+ throw new Error(`Reader not found: ${source.name}`);
205
+ }
206
+ // Read changed records
207
+ const records = await reader.readChanged(since);
208
+ this.log(`Read ${records.length} changed records from ${source.name} (since ${since.toISOString()})`);
209
+ if (records.length === 0) {
210
+ result.success = true;
211
+ result.durationMs = Date.now() - startTime;
212
+ return result;
213
+ }
214
+ // Write to cloud
215
+ if (this.writer && !this.config.sync.dryRun) {
216
+ await this.writer.beginTransaction();
217
+ try {
218
+ const written = await this.writer.upsert(source.targetTable, records);
219
+ result.recordsSynced = written;
220
+ await this.writer.commit();
221
+ }
222
+ catch (error) {
223
+ await this.writer.rollback();
224
+ throw error;
225
+ }
226
+ }
227
+ else {
228
+ result.recordsSynced = records.length;
229
+ }
230
+ result.success = true;
231
+ }
232
+ catch (error) {
233
+ result.error = error instanceof Error ? error.message : String(error);
234
+ }
235
+ result.durationMs = Date.now() - startTime;
236
+ return result;
237
+ }
238
+ /**
239
+ * Get current sync status
240
+ */
241
+ async getStatus() {
242
+ const sources = [];
243
+ for (const source of this.config.sync.sources) {
244
+ const reader = this.readers.get(source.name);
245
+ if (reader) {
246
+ const count = await reader.count();
247
+ sources.push({
248
+ name: source.name,
249
+ type: source.type,
250
+ targetTable: source.targetTable,
251
+ recordCount: count,
252
+ enabled: source.enabled !== false,
253
+ priority: source.priority,
254
+ });
255
+ }
256
+ else {
257
+ sources.push({
258
+ name: source.name,
259
+ type: source.type,
260
+ targetTable: source.targetTable,
261
+ recordCount: 0,
262
+ enabled: source.enabled !== false,
263
+ priority: source.priority,
264
+ error: 'Reader not initialized',
265
+ });
266
+ }
267
+ }
268
+ return { sources };
269
+ }
270
+ /**
271
+ * Verify sync by comparing counts
272
+ */
273
+ async verify() {
274
+ const results = [];
275
+ for (const source of this.config.sync.sources.filter(s => s.enabled !== false)) {
276
+ const reader = this.readers.get(source.name);
277
+ if (!reader)
278
+ continue;
279
+ const localCount = await reader.count();
280
+ let cloudCount = 0;
281
+ if (this.writer) {
282
+ try {
283
+ const rows = await this.writer.query(`SELECT COUNT(*) as count FROM ${source.targetTable} WHERE source_env = $1`, [this.config.environment]);
284
+ cloudCount = rows[0]?.count || 0;
285
+ }
286
+ catch {
287
+ cloudCount = -1; // Error
288
+ }
289
+ }
290
+ results.push({
291
+ source: source.name,
292
+ table: source.targetTable,
293
+ localCount,
294
+ cloudCount,
295
+ match: localCount === cloudCount,
296
+ diff: localCount - cloudCount,
297
+ });
298
+ }
299
+ return {
300
+ verified: results.every(r => r.match || r.cloudCount === -1),
301
+ results,
302
+ };
303
+ }
304
+ /**
305
+ * Close all connections
306
+ */
307
+ async close() {
308
+ await this.disconnect();
309
+ for (const entry of Array.from(this.readers.entries())) {
310
+ const [name, reader] = entry;
311
+ try {
312
+ await reader.close();
313
+ }
314
+ catch (error) {
315
+ this.log(`Warning: Failed to close reader ${name}: ${error}`, 'warn');
316
+ }
317
+ }
318
+ this.readers.clear();
319
+ this.log('Sync agent closed');
320
+ }
321
+ // Private helper methods
322
+ createReader(source) {
323
+ const baseDir = process.cwd();
324
+ const environment = this.config.environment;
325
+ if (source.type === 'sqlite') {
326
+ return createSQLiteReader({ source, baseDir, environment });
327
+ }
328
+ if (source.type === 'json') {
329
+ return createJSONReader({ source, baseDir, environment });
330
+ }
331
+ return null;
332
+ }
333
+ async connectToCloud() {
334
+ if (this.writer)
335
+ return;
336
+ const tunnelManager = createConnectionManager(this.config.cloud);
337
+ this.writer = createPostgresWriter({
338
+ cloud: this.config.cloud,
339
+ tunnelManager,
340
+ });
341
+ await this.writer.connect();
342
+ this.log('Connected to cloud database');
343
+ }
344
+ async disconnect() {
345
+ if (this.writer) {
346
+ await this.writer.close();
347
+ this.writer = null;
348
+ }
349
+ }
350
+ createReport(mode) {
351
+ return {
352
+ syncId: uuidv4(),
353
+ startedAt: new Date(),
354
+ status: 'running',
355
+ environment: this.config.environment,
356
+ mode,
357
+ results: [],
358
+ totalRecordsSynced: 0,
359
+ totalConflictsResolved: 0,
360
+ totalDurationMs: 0,
361
+ errors: [],
362
+ };
363
+ }
364
+ log(message, level = 'info') {
365
+ if (!this.config.verbose && level === 'info')
366
+ return;
367
+ const prefix = `[CloudSync:${this.config.environment}]`;
368
+ switch (level) {
369
+ case 'warn':
370
+ console.warn(`${prefix} ${message}`);
371
+ break;
372
+ case 'error':
373
+ console.error(`${prefix} ${message}`);
374
+ break;
375
+ default:
376
+ console.log(`${prefix} ${message}`);
377
+ }
378
+ }
379
+ progress(message, progress) {
380
+ this.config.onProgress?.(message, progress);
381
+ this.log(message);
382
+ }
383
+ }
384
+ /**
385
+ * Create a sync agent
386
+ */
387
+ export function createSyncAgent(config) {
388
+ return new CloudSyncAgent(config);
389
+ }
390
+ /**
391
+ * Quick sync utility
392
+ */
393
+ export async function syncToCloud(config) {
394
+ const agent = createSyncAgent({ ...config, verbose: true });
395
+ await agent.initialize();
396
+ try {
397
+ return await agent.syncAll();
398
+ }
399
+ finally {
400
+ await agent.close();
401
+ }
402
+ }
403
+ /**
404
+ * Quick incremental sync utility
405
+ */
406
+ export async function syncIncrementalToCloud(since, config) {
407
+ const agent = createSyncAgent({ ...config, verbose: true });
408
+ await agent.initialize();
409
+ try {
410
+ return await agent.syncIncremental(since);
411
+ }
412
+ finally {
413
+ await agent.close();
414
+ }
415
+ }
416
+ //# sourceMappingURL=sync-agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-agent.js","sourceRoot":"","sources":["../../src/sync/sync-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,EAAE,IAAI,MAAM,EAA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AO,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,MAAM,KAAK,CAAC,UAAU,EAAE,CAAC;IACzB,IAAI,CAAC;QACH,OAAO,MAAM,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;YAAS,CAAC;QACT,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;AACH,CAAC"}
package/v3/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentic-qe/v3",
3
- "version": "3.2.3",
3
+ "version": "3.3.1",
4
4
  "description": "Agentic QE v3 - Domain-Driven Design Architecture with 12 Bounded Contexts, O(log n) coverage analysis, ReasoningBank learning, 51 specialized QE agents",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -41,6 +41,10 @@
41
41
  "./ruvector": {
42
42
  "import": "./dist/integrations/ruvector/wrappers.js",
43
43
  "types": "./dist/integrations/ruvector/wrappers.d.ts"
44
+ },
45
+ "./sync": {
46
+ "import": "./dist/sync/index.js",
47
+ "types": "./dist/sync/index.d.ts"
44
48
  }
45
49
  },
46
50
  "files": [
@@ -59,6 +63,9 @@
59
63
  "aqe": "tsx src/cli/index.ts",
60
64
  "mcp": "tsx src/mcp/entry.ts",
61
65
  "test": "vitest run",
66
+ "test:safe": "NODE_OPTIONS='--max-old-space-size=1536' vitest run",
67
+ "test:dev": "vitest run --exclude='**/browser/**' --exclude='**/*.e2e.test.ts' --exclude='**/vibium/**' --exclude='**/browser-swarm-coordinator.test.ts'",
68
+ "test:regression": "vitest run",
62
69
  "test:watch": "vitest",
63
70
  "test:coverage": "vitest run --coverage",
64
71
  "test:perf": "vitest bench tests/performance/",
@@ -68,7 +75,13 @@
68
75
  "typecheck": "tsc --noEmit",
69
76
  "clean": "rm -rf dist",
70
77
  "sync:agents": "cp ../.claude/agents/v3/qe-*.md ./assets/agents/v3/ && mkdir -p ./assets/agents/v3/subagents && cp ../.claude/agents/v3/subagents/qe-*.md ./assets/agents/v3/subagents/ 2>/dev/null; echo '✓ Synced v3 QE agents (44 main + 7 subagents = 51 total)'",
71
- "sync:agents:check": "echo 'Checking v3 QE agents sync status:' && for f in ../.claude/agents/v3/qe-*.md; do diff -q \"$f\" \"./assets/agents/v3/$(basename $f)\" >/dev/null 2>&1 || echo \" ⚠ $(basename $f)\"; done && for f in ../.claude/agents/v3/subagents/qe-*.md; do diff -q \"$f\" \"./assets/agents/v3/subagents/$(basename $f)\" >/dev/null 2>&1 || echo \" ⚠ subagents/$(basename $f)\"; done; echo '✓ Check complete'"
78
+ "sync:agents:check": "echo 'Checking v3 QE agents sync status:' && for f in ../.claude/agents/v3/qe-*.md; do diff -q \"$f\" \"./assets/agents/v3/$(basename $f)\" >/dev/null 2>&1 || echo \" ⚠ $(basename $f)\"; done && for f in ../.claude/agents/v3/subagents/qe-*.md; do diff -q \"$f\" \"./assets/agents/v3/subagents/$(basename $f)\" >/dev/null 2>&1 || echo \" ⚠ subagents/$(basename $f)\"; done; echo '✓ Check complete'",
79
+ "sync:cloud": "tsx src/cli/index.ts sync",
80
+ "sync:cloud:full": "tsx src/cli/index.ts sync --full",
81
+ "sync:cloud:status": "tsx src/cli/index.ts sync status",
82
+ "sync:cloud:verify": "tsx src/cli/index.ts sync verify",
83
+ "sync:cloud:init": "tsx src/cli/index.ts sync init --output ./src/sync/schema/cloud-schema.sql",
84
+ "sync:cloud:config": "tsx src/cli/index.ts sync config --sources"
72
85
  },
73
86
  "keywords": [
74
87
  "agentic",
@@ -106,6 +119,8 @@
106
119
  "fast-glob": "^3.3.3",
107
120
  "hnswlib-node": "^3.0.0",
108
121
  "ora": "^9.0.0",
122
+ "pg": "^8.17.2",
123
+ "prime-radiant-advanced-wasm": "^0.1.3",
109
124
  "secure-json-parse": "^4.1.0",
110
125
  "typescript": "^5.9.3",
111
126
  "uuid": "^9.0.0",