agentic-qe 3.2.3 → 3.3.0

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 (340) hide show
  1. package/.claude/agents/v3/qe-accessibility-auditor.md +90 -0
  2. package/README.md +43 -5
  3. package/package.json +3 -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 +165 -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 +11612 -4929
  35. package/v3/dist/cli/commands/claude-flow-setup.d.ts +82 -0
  36. package/v3/dist/cli/commands/claude-flow-setup.d.ts.map +1 -0
  37. package/v3/dist/cli/commands/claude-flow-setup.js +334 -0
  38. package/v3/dist/cli/commands/claude-flow-setup.js.map +1 -0
  39. package/v3/dist/cli/commands/hooks.d.ts +2 -0
  40. package/v3/dist/cli/commands/hooks.d.ts.map +1 -1
  41. package/v3/dist/cli/commands/hooks.js +13 -2
  42. package/v3/dist/cli/commands/hooks.js.map +1 -1
  43. package/v3/dist/cli/commands/init.d.ts +19 -0
  44. package/v3/dist/cli/commands/init.d.ts.map +1 -0
  45. package/v3/dist/cli/commands/init.js +345 -0
  46. package/v3/dist/cli/commands/init.js.map +1 -0
  47. package/v3/dist/cli/index.js +110 -2
  48. package/v3/dist/cli/index.js.map +1 -1
  49. package/v3/dist/coordination/mincut/interfaces.d.ts +8 -2
  50. package/v3/dist/coordination/mincut/interfaces.d.ts.map +1 -1
  51. package/v3/dist/coordination/mincut/interfaces.js.map +1 -1
  52. package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts +5 -0
  53. package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts.map +1 -1
  54. package/v3/dist/coordination/mincut/mincut-health-monitor.js +22 -4
  55. package/v3/dist/coordination/mincut/mincut-health-monitor.js.map +1 -1
  56. package/v3/dist/coordination/mincut/queen-integration.d.ts +4 -0
  57. package/v3/dist/coordination/mincut/queen-integration.d.ts.map +1 -1
  58. package/v3/dist/coordination/mincut/queen-integration.js +14 -1
  59. package/v3/dist/coordination/mincut/queen-integration.js.map +1 -1
  60. package/v3/dist/coordination/queen-coordinator.d.ts +5 -0
  61. package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
  62. package/v3/dist/coordination/queen-coordinator.js +45 -7
  63. package/v3/dist/coordination/queen-coordinator.js.map +1 -1
  64. package/v3/dist/domains/learning-optimization/coordinator.d.ts +5 -0
  65. package/v3/dist/domains/learning-optimization/coordinator.d.ts.map +1 -1
  66. package/v3/dist/domains/learning-optimization/coordinator.js +79 -0
  67. package/v3/dist/domains/learning-optimization/coordinator.js.map +1 -1
  68. package/v3/dist/domains/test-generation/coherence-gate.d.ts +245 -0
  69. package/v3/dist/domains/test-generation/coherence-gate.d.ts.map +1 -0
  70. package/v3/dist/domains/test-generation/coherence-gate.js +454 -0
  71. package/v3/dist/domains/test-generation/coherence-gate.js.map +1 -0
  72. package/v3/dist/domains/test-generation/coordinator.d.ts +32 -1
  73. package/v3/dist/domains/test-generation/coordinator.d.ts.map +1 -1
  74. package/v3/dist/domains/test-generation/coordinator.js +70 -1
  75. package/v3/dist/domains/test-generation/coordinator.js.map +1 -1
  76. package/v3/dist/domains/test-generation/index.d.ts +1 -0
  77. package/v3/dist/domains/test-generation/index.d.ts.map +1 -1
  78. package/v3/dist/domains/test-generation/index.js +4 -0
  79. package/v3/dist/domains/test-generation/index.js.map +1 -1
  80. package/v3/dist/domains/test-generation/services/index.d.ts +1 -0
  81. package/v3/dist/domains/test-generation/services/index.d.ts.map +1 -1
  82. package/v3/dist/domains/test-generation/services/index.js +2 -0
  83. package/v3/dist/domains/test-generation/services/index.js.map +1 -1
  84. package/v3/dist/domains/visual-accessibility/index.d.ts +2 -1
  85. package/v3/dist/domains/visual-accessibility/index.d.ts.map +1 -1
  86. package/v3/dist/domains/visual-accessibility/index.js +1 -0
  87. package/v3/dist/domains/visual-accessibility/index.js.map +1 -1
  88. package/v3/dist/domains/visual-accessibility/interfaces.d.ts +131 -0
  89. package/v3/dist/domains/visual-accessibility/interfaces.d.ts.map +1 -1
  90. package/v3/dist/domains/visual-accessibility/plugin.d.ts +26 -0
  91. package/v3/dist/domains/visual-accessibility/plugin.d.ts.map +1 -1
  92. package/v3/dist/domains/visual-accessibility/plugin.js +151 -0
  93. package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
  94. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts +42 -1
  95. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts.map +1 -1
  96. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js +69 -0
  97. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js.map +1 -1
  98. package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts +138 -0
  99. package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts.map +1 -0
  100. package/v3/dist/domains/visual-accessibility/services/eu-compliance.js +830 -0
  101. package/v3/dist/domains/visual-accessibility/services/eu-compliance.js.map +1 -0
  102. package/v3/dist/domains/visual-accessibility/services/index.d.ts +1 -0
  103. package/v3/dist/domains/visual-accessibility/services/index.d.ts.map +1 -1
  104. package/v3/dist/domains/visual-accessibility/services/index.js +1 -0
  105. package/v3/dist/domains/visual-accessibility/services/index.js.map +1 -1
  106. package/v3/dist/init/enhancements/claude-flow-adapter.d.ts +84 -0
  107. package/v3/dist/init/enhancements/claude-flow-adapter.d.ts.map +1 -0
  108. package/v3/dist/init/enhancements/claude-flow-adapter.js +250 -0
  109. package/v3/dist/init/enhancements/claude-flow-adapter.js.map +1 -0
  110. package/v3/dist/init/enhancements/detector.d.ts +10 -0
  111. package/v3/dist/init/enhancements/detector.d.ts.map +1 -0
  112. package/v3/dist/init/enhancements/detector.js +87 -0
  113. package/v3/dist/init/enhancements/detector.js.map +1 -0
  114. package/v3/dist/init/enhancements/index.d.ts +13 -0
  115. package/v3/dist/init/enhancements/index.d.ts.map +1 -0
  116. package/v3/dist/init/enhancements/index.js +25 -0
  117. package/v3/dist/init/enhancements/index.js.map +1 -0
  118. package/v3/dist/init/enhancements/types.d.ts +93 -0
  119. package/v3/dist/init/enhancements/types.d.ts.map +1 -0
  120. package/v3/dist/init/enhancements/types.js +6 -0
  121. package/v3/dist/init/enhancements/types.js.map +1 -0
  122. package/v3/dist/init/index.d.ts +8 -0
  123. package/v3/dist/init/index.d.ts.map +1 -1
  124. package/v3/dist/init/index.js +4 -0
  125. package/v3/dist/init/index.js.map +1 -1
  126. package/v3/dist/init/migration/config-migrator.d.ts +31 -0
  127. package/v3/dist/init/migration/config-migrator.d.ts.map +1 -0
  128. package/v3/dist/init/migration/config-migrator.js +133 -0
  129. package/v3/dist/init/migration/config-migrator.js.map +1 -0
  130. package/v3/dist/init/migration/data-migrator.d.ts +72 -0
  131. package/v3/dist/init/migration/data-migrator.d.ts.map +1 -0
  132. package/v3/dist/init/migration/data-migrator.js +233 -0
  133. package/v3/dist/init/migration/data-migrator.js.map +1 -0
  134. package/v3/dist/init/migration/detector.d.ts +44 -0
  135. package/v3/dist/init/migration/detector.d.ts.map +1 -0
  136. package/v3/dist/init/migration/detector.js +106 -0
  137. package/v3/dist/init/migration/detector.js.map +1 -0
  138. package/v3/dist/init/migration/index.d.ts +8 -0
  139. package/v3/dist/init/migration/index.d.ts.map +1 -0
  140. package/v3/dist/init/migration/index.js +8 -0
  141. package/v3/dist/init/migration/index.js.map +1 -0
  142. package/v3/dist/init/orchestrator.d.ts +68 -0
  143. package/v3/dist/init/orchestrator.d.ts.map +1 -0
  144. package/v3/dist/init/orchestrator.js +239 -0
  145. package/v3/dist/init/orchestrator.js.map +1 -0
  146. package/v3/dist/init/phases/01-detection.d.ts +30 -0
  147. package/v3/dist/init/phases/01-detection.d.ts.map +1 -0
  148. package/v3/dist/init/phases/01-detection.js +143 -0
  149. package/v3/dist/init/phases/01-detection.js.map +1 -0
  150. package/v3/dist/init/phases/02-analysis.d.ts +18 -0
  151. package/v3/dist/init/phases/02-analysis.d.ts.map +1 -0
  152. package/v3/dist/init/phases/02-analysis.js +28 -0
  153. package/v3/dist/init/phases/02-analysis.js.map +1 -0
  154. package/v3/dist/init/phases/03-configuration.d.ts +26 -0
  155. package/v3/dist/init/phases/03-configuration.d.ts.map +1 -0
  156. package/v3/dist/init/phases/03-configuration.js +98 -0
  157. package/v3/dist/init/phases/03-configuration.js.map +1 -0
  158. package/v3/dist/init/phases/04-database.d.ts +22 -0
  159. package/v3/dist/init/phases/04-database.d.ts.map +1 -0
  160. package/v3/dist/init/phases/04-database.js +88 -0
  161. package/v3/dist/init/phases/04-database.js.map +1 -0
  162. package/v3/dist/init/phases/05-learning.d.ts +28 -0
  163. package/v3/dist/init/phases/05-learning.d.ts.map +1 -0
  164. package/v3/dist/init/phases/05-learning.js +98 -0
  165. package/v3/dist/init/phases/05-learning.js.map +1 -0
  166. package/v3/dist/init/phases/06-code-intelligence.d.ts +33 -0
  167. package/v3/dist/init/phases/06-code-intelligence.d.ts.map +1 -0
  168. package/v3/dist/init/phases/06-code-intelligence.js +115 -0
  169. package/v3/dist/init/phases/06-code-intelligence.js.map +1 -0
  170. package/v3/dist/init/phases/07-hooks.d.ts +27 -0
  171. package/v3/dist/init/phases/07-hooks.d.ts.map +1 -0
  172. package/v3/dist/init/phases/07-hooks.js +209 -0
  173. package/v3/dist/init/phases/07-hooks.js.map +1 -0
  174. package/v3/dist/init/phases/08-mcp.d.ts +22 -0
  175. package/v3/dist/init/phases/08-mcp.d.ts.map +1 -0
  176. package/v3/dist/init/phases/08-mcp.js +62 -0
  177. package/v3/dist/init/phases/08-mcp.js.map +1 -0
  178. package/v3/dist/init/phases/09-assets.d.ts +23 -0
  179. package/v3/dist/init/phases/09-assets.d.ts.map +1 -0
  180. package/v3/dist/init/phases/09-assets.js +82 -0
  181. package/v3/dist/init/phases/09-assets.js.map +1 -0
  182. package/v3/dist/init/phases/10-workers.d.ts +23 -0
  183. package/v3/dist/init/phases/10-workers.d.ts.map +1 -0
  184. package/v3/dist/init/phases/10-workers.js +111 -0
  185. package/v3/dist/init/phases/10-workers.js.map +1 -0
  186. package/v3/dist/init/phases/11-claude-md.d.ts +26 -0
  187. package/v3/dist/init/phases/11-claude-md.d.ts.map +1 -0
  188. package/v3/dist/init/phases/11-claude-md.js +121 -0
  189. package/v3/dist/init/phases/11-claude-md.js.map +1 -0
  190. package/v3/dist/init/phases/12-verification.d.ts +38 -0
  191. package/v3/dist/init/phases/12-verification.d.ts.map +1 -0
  192. package/v3/dist/init/phases/12-verification.js +187 -0
  193. package/v3/dist/init/phases/12-verification.js.map +1 -0
  194. package/v3/dist/init/phases/index.d.ts +46 -0
  195. package/v3/dist/init/phases/index.d.ts.map +1 -0
  196. package/v3/dist/init/phases/index.js +64 -0
  197. package/v3/dist/init/phases/index.js.map +1 -0
  198. package/v3/dist/init/phases/phase-interface.d.ts +193 -0
  199. package/v3/dist/init/phases/phase-interface.d.ts.map +1 -0
  200. package/v3/dist/init/phases/phase-interface.js +119 -0
  201. package/v3/dist/init/phases/phase-interface.js.map +1 -0
  202. package/v3/dist/integrations/coherence/coherence-service.d.ts +323 -0
  203. package/v3/dist/integrations/coherence/coherence-service.d.ts.map +1 -0
  204. package/v3/dist/integrations/coherence/coherence-service.js +799 -0
  205. package/v3/dist/integrations/coherence/coherence-service.js.map +1 -0
  206. package/v3/dist/integrations/coherence/engines/category-adapter.d.ts +170 -0
  207. package/v3/dist/integrations/coherence/engines/category-adapter.d.ts.map +1 -0
  208. package/v3/dist/integrations/coherence/engines/category-adapter.js +403 -0
  209. package/v3/dist/integrations/coherence/engines/category-adapter.js.map +1 -0
  210. package/v3/dist/integrations/coherence/engines/causal-adapter.d.ts +159 -0
  211. package/v3/dist/integrations/coherence/engines/causal-adapter.d.ts.map +1 -0
  212. package/v3/dist/integrations/coherence/engines/causal-adapter.js +348 -0
  213. package/v3/dist/integrations/coherence/engines/causal-adapter.js.map +1 -0
  214. package/v3/dist/integrations/coherence/engines/cohomology-adapter.d.ts +174 -0
  215. package/v3/dist/integrations/coherence/engines/cohomology-adapter.d.ts.map +1 -0
  216. package/v3/dist/integrations/coherence/engines/cohomology-adapter.js +401 -0
  217. package/v3/dist/integrations/coherence/engines/cohomology-adapter.js.map +1 -0
  218. package/v3/dist/integrations/coherence/engines/homotopy-adapter.d.ts +201 -0
  219. package/v3/dist/integrations/coherence/engines/homotopy-adapter.d.ts.map +1 -0
  220. package/v3/dist/integrations/coherence/engines/homotopy-adapter.js +324 -0
  221. package/v3/dist/integrations/coherence/engines/homotopy-adapter.js.map +1 -0
  222. package/v3/dist/integrations/coherence/engines/index.d.ts +20 -0
  223. package/v3/dist/integrations/coherence/engines/index.d.ts.map +1 -0
  224. package/v3/dist/integrations/coherence/engines/index.js +26 -0
  225. package/v3/dist/integrations/coherence/engines/index.js.map +1 -0
  226. package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts +193 -0
  227. package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts.map +1 -0
  228. package/v3/dist/integrations/coherence/engines/spectral-adapter.js +476 -0
  229. package/v3/dist/integrations/coherence/engines/spectral-adapter.js.map +1 -0
  230. package/v3/dist/integrations/coherence/engines/witness-adapter.d.ts +175 -0
  231. package/v3/dist/integrations/coherence/engines/witness-adapter.d.ts.map +1 -0
  232. package/v3/dist/integrations/coherence/engines/witness-adapter.js +377 -0
  233. package/v3/dist/integrations/coherence/engines/witness-adapter.js.map +1 -0
  234. package/v3/dist/integrations/coherence/index.d.ts +84 -0
  235. package/v3/dist/integrations/coherence/index.d.ts.map +1 -0
  236. package/v3/dist/integrations/coherence/index.js +114 -0
  237. package/v3/dist/integrations/coherence/index.js.map +1 -0
  238. package/v3/dist/integrations/coherence/threshold-tuner.d.ts +396 -0
  239. package/v3/dist/integrations/coherence/threshold-tuner.d.ts.map +1 -0
  240. package/v3/dist/integrations/coherence/threshold-tuner.js +538 -0
  241. package/v3/dist/integrations/coherence/threshold-tuner.js.map +1 -0
  242. package/v3/dist/integrations/coherence/types.d.ts +879 -0
  243. package/v3/dist/integrations/coherence/types.d.ts.map +1 -0
  244. package/v3/dist/integrations/coherence/types.js +134 -0
  245. package/v3/dist/integrations/coherence/types.js.map +1 -0
  246. package/v3/dist/integrations/coherence/wasm-loader.d.ts +351 -0
  247. package/v3/dist/integrations/coherence/wasm-loader.d.ts.map +1 -0
  248. package/v3/dist/integrations/coherence/wasm-loader.js +842 -0
  249. package/v3/dist/integrations/coherence/wasm-loader.js.map +1 -0
  250. package/v3/dist/integrations/embeddings/index/HNSWIndex.d.ts.map +1 -1
  251. package/v3/dist/integrations/embeddings/index/HNSWIndex.js +4 -1
  252. package/v3/dist/integrations/embeddings/index/HNSWIndex.js.map +1 -1
  253. package/v3/dist/kernel/interfaces.d.ts +8 -1
  254. package/v3/dist/kernel/interfaces.d.ts.map +1 -1
  255. package/v3/dist/learning/aqe-learning-engine.d.ts +272 -0
  256. package/v3/dist/learning/aqe-learning-engine.d.ts.map +1 -0
  257. package/v3/dist/learning/aqe-learning-engine.js +708 -0
  258. package/v3/dist/learning/aqe-learning-engine.js.map +1 -0
  259. package/v3/dist/learning/causal-verifier.d.ts +244 -0
  260. package/v3/dist/learning/causal-verifier.d.ts.map +1 -0
  261. package/v3/dist/learning/causal-verifier.js +300 -0
  262. package/v3/dist/learning/causal-verifier.js.map +1 -0
  263. package/v3/dist/learning/experience-capture.d.ts +266 -0
  264. package/v3/dist/learning/experience-capture.d.ts.map +1 -0
  265. package/v3/dist/learning/experience-capture.js +647 -0
  266. package/v3/dist/learning/experience-capture.js.map +1 -0
  267. package/v3/dist/learning/index.d.ts +8 -0
  268. package/v3/dist/learning/index.d.ts.map +1 -1
  269. package/v3/dist/learning/index.js +16 -0
  270. package/v3/dist/learning/index.js.map +1 -1
  271. package/v3/dist/learning/memory-auditor.d.ts +235 -0
  272. package/v3/dist/learning/memory-auditor.d.ts.map +1 -0
  273. package/v3/dist/learning/memory-auditor.js +478 -0
  274. package/v3/dist/learning/memory-auditor.js.map +1 -0
  275. package/v3/dist/learning/pattern-store.d.ts.map +1 -1
  276. package/v3/dist/learning/pattern-store.js +27 -6
  277. package/v3/dist/learning/pattern-store.js.map +1 -1
  278. package/v3/dist/learning/qe-patterns.d.ts +15 -1
  279. package/v3/dist/learning/qe-patterns.d.ts.map +1 -1
  280. package/v3/dist/learning/qe-patterns.js +26 -5
  281. package/v3/dist/learning/qe-patterns.js.map +1 -1
  282. package/v3/dist/learning/qe-reasoning-bank.d.ts +38 -2
  283. package/v3/dist/learning/qe-reasoning-bank.d.ts.map +1 -1
  284. package/v3/dist/learning/qe-reasoning-bank.js +86 -4
  285. package/v3/dist/learning/qe-reasoning-bank.js.map +1 -1
  286. package/v3/dist/learning/real-qe-reasoning-bank.d.ts +32 -2
  287. package/v3/dist/learning/real-qe-reasoning-bank.d.ts.map +1 -1
  288. package/v3/dist/learning/real-qe-reasoning-bank.js +61 -6
  289. package/v3/dist/learning/real-qe-reasoning-bank.js.map +1 -1
  290. package/v3/dist/mcp/bundle.js +6303 -266
  291. package/v3/dist/mcp/tools/coherence/audit.d.ts +107 -0
  292. package/v3/dist/mcp/tools/coherence/audit.d.ts.map +1 -0
  293. package/v3/dist/mcp/tools/coherence/audit.js +236 -0
  294. package/v3/dist/mcp/tools/coherence/audit.js.map +1 -0
  295. package/v3/dist/mcp/tools/coherence/check.d.ts +106 -0
  296. package/v3/dist/mcp/tools/coherence/check.d.ts.map +1 -0
  297. package/v3/dist/mcp/tools/coherence/check.js +205 -0
  298. package/v3/dist/mcp/tools/coherence/check.js.map +1 -0
  299. package/v3/dist/mcp/tools/coherence/collapse.d.ts +123 -0
  300. package/v3/dist/mcp/tools/coherence/collapse.d.ts.map +1 -0
  301. package/v3/dist/mcp/tools/coherence/collapse.js +279 -0
  302. package/v3/dist/mcp/tools/coherence/collapse.js.map +1 -0
  303. package/v3/dist/mcp/tools/coherence/consensus.d.ts +100 -0
  304. package/v3/dist/mcp/tools/coherence/consensus.d.ts.map +1 -0
  305. package/v3/dist/mcp/tools/coherence/consensus.js +201 -0
  306. package/v3/dist/mcp/tools/coherence/consensus.js.map +1 -0
  307. package/v3/dist/mcp/tools/coherence/index.d.ts +31 -0
  308. package/v3/dist/mcp/tools/coherence/index.d.ts.map +1 -0
  309. package/v3/dist/mcp/tools/coherence/index.js +42 -0
  310. package/v3/dist/mcp/tools/coherence/index.js.map +1 -0
  311. package/v3/dist/mcp/tools/index.d.ts +6 -1
  312. package/v3/dist/mcp/tools/index.d.ts.map +1 -1
  313. package/v3/dist/mcp/tools/index.js +9 -1
  314. package/v3/dist/mcp/tools/index.js.map +1 -1
  315. package/v3/dist/mcp/tools/mincut/index.d.ts +1 -1
  316. package/v3/dist/mcp/tools/mincut/index.d.ts.map +1 -1
  317. package/v3/dist/mcp/tools/mincut/index.js.map +1 -1
  318. package/v3/dist/mcp/tools/registry.d.ts +4 -0
  319. package/v3/dist/mcp/tools/registry.d.ts.map +1 -1
  320. package/v3/dist/mcp/tools/registry.js +5 -0
  321. package/v3/dist/mcp/tools/registry.js.map +1 -1
  322. package/v3/dist/mcp/types.d.ts +1 -1
  323. package/v3/dist/mcp/types.d.ts.map +1 -1
  324. package/v3/dist/strange-loop/belief-reconciler.d.ts +357 -0
  325. package/v3/dist/strange-loop/belief-reconciler.d.ts.map +1 -0
  326. package/v3/dist/strange-loop/belief-reconciler.js +696 -0
  327. package/v3/dist/strange-loop/belief-reconciler.js.map +1 -0
  328. package/v3/dist/strange-loop/index.d.ts +1 -0
  329. package/v3/dist/strange-loop/index.d.ts.map +1 -1
  330. package/v3/dist/strange-loop/index.js +2 -0
  331. package/v3/dist/strange-loop/index.js.map +1 -1
  332. package/v3/dist/strange-loop/strange-loop.d.ts +177 -5
  333. package/v3/dist/strange-loop/strange-loop.d.ts.map +1 -1
  334. package/v3/dist/strange-loop/strange-loop.js +452 -9
  335. package/v3/dist/strange-loop/strange-loop.js.map +1 -1
  336. package/v3/dist/strange-loop/types.d.ts +205 -1
  337. package/v3/dist/strange-loop/types.d.ts.map +1 -1
  338. package/v3/dist/strange-loop/types.js +5 -0
  339. package/v3/dist/strange-loop/types.js.map +1 -1
  340. package/v3/package.json +5 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","s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,cAAc;IAC7B,sDAAsD;IACtD,YAAY,EAAE,OAAO,CAAC;IACtB,mEAAmE;IACnE,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,IAAI,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,cAKrC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,gCAAgC;IAChC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,YAAY,CAAC;IACzC,qCAAqC;IACrC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,qCAAqC;IACrC,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,+CAA+C;IAC/C,gBAAgB,EAAE,MAAM,CAAC;IACzB,0CAA0C;IAC1C,kBAAkB,CAAC,EAAE,IAAI,CAAC;CAC3B"}
@@ -0,0 +1,134 @@
1
+ /**
2
+ * Agentic QE v3 - Coherence Service Types
3
+ *
4
+ * Type definitions for the Prime Radiant coherence integration.
5
+ * Provides mathematical coherence gates using advanced mathematics:
6
+ * - Sheaf cohomology for contradiction detection
7
+ * - Spectral analysis for collapse prediction
8
+ * - Causal inference for spurious correlation detection
9
+ * - Category theory for type verification
10
+ * - Homotopy type theory for formal verification
11
+ * - Blake3 witness chain for audit trails
12
+ *
13
+ * Per ADR-052, coherence gates verify belief consistency across agents
14
+ * before allowing execution to proceed.
15
+ *
16
+ * @module integrations/coherence/types
17
+ */
18
+ /**
19
+ * Default compute lane configuration
20
+ */
21
+ export const DEFAULT_LANE_CONFIG = {
22
+ reflexThreshold: 0.1,
23
+ retrievalThreshold: 0.4,
24
+ heavyThreshold: 0.7,
25
+ };
26
+ /**
27
+ * Default coherence service configuration
28
+ */
29
+ export const DEFAULT_COHERENCE_CONFIG = {
30
+ enabled: true,
31
+ laneConfig: DEFAULT_LANE_CONFIG,
32
+ coherenceThreshold: 0.1,
33
+ fallbackEnabled: true,
34
+ timeoutMs: 5000,
35
+ cacheEnabled: true,
36
+ cacheTtlMs: 5 * 60 * 1000, // 5 minutes
37
+ };
38
+ /**
39
+ * Default no-op logger
40
+ */
41
+ export const DEFAULT_COHERENCE_LOGGER = {
42
+ debug: () => { },
43
+ info: () => { },
44
+ warn: () => { },
45
+ error: () => { },
46
+ };
47
+ // ============================================================================
48
+ // Error Types
49
+ // ============================================================================
50
+ /**
51
+ * Base error for coherence operations
52
+ */
53
+ export class CoherenceError extends Error {
54
+ code;
55
+ cause;
56
+ constructor(message, code, cause) {
57
+ super(message);
58
+ this.code = code;
59
+ this.cause = cause;
60
+ this.name = 'CoherenceError';
61
+ }
62
+ }
63
+ /**
64
+ * Error when WASM is not available
65
+ */
66
+ export class WasmNotLoadedError extends CoherenceError {
67
+ constructor(message = 'WASM module is not loaded', cause) {
68
+ super(message, 'WASM_NOT_LOADED', cause);
69
+ this.name = 'WasmNotLoadedError';
70
+ }
71
+ }
72
+ /**
73
+ * Error when coherence check fails
74
+ */
75
+ export class CoherenceCheckError extends CoherenceError {
76
+ constructor(message, cause) {
77
+ super(message, 'COHERENCE_CHECK_ERROR', cause);
78
+ this.name = 'CoherenceCheckError';
79
+ }
80
+ }
81
+ /**
82
+ * Error when operation times out
83
+ */
84
+ export class CoherenceTimeoutError extends CoherenceError {
85
+ operation;
86
+ timeoutMs;
87
+ constructor(operation, timeoutMs) {
88
+ super(`Coherence operation '${operation}' timed out after ${timeoutMs}ms`, 'TIMEOUT');
89
+ this.operation = operation;
90
+ this.timeoutMs = timeoutMs;
91
+ this.name = 'CoherenceTimeoutError';
92
+ }
93
+ }
94
+ /**
95
+ * Error when there are unresolvable contradictions
96
+ */
97
+ export class UnresolvableContradictionError extends CoherenceError {
98
+ contradictions;
99
+ constructor(contradictions) {
100
+ super(`Found ${contradictions.length} unresolvable contradiction(s)`, 'UNRESOLVABLE_CONTRADICTION');
101
+ this.contradictions = contradictions;
102
+ this.name = 'UnresolvableContradictionError';
103
+ }
104
+ }
105
+ /**
106
+ * Error when WASM loading fails after all retries
107
+ */
108
+ export class WasmLoadError extends CoherenceError {
109
+ attempts;
110
+ constructor(message, attempts, cause) {
111
+ super(message, 'WASM_LOAD_FAILED', cause);
112
+ this.attempts = attempts;
113
+ this.name = 'WasmLoadError';
114
+ }
115
+ }
116
+ /**
117
+ * Default WASM loader configuration
118
+ */
119
+ export const DEFAULT_WASM_LOADER_CONFIG = {
120
+ maxAttempts: 3,
121
+ baseDelayMs: 100,
122
+ maxDelayMs: 5000,
123
+ timeoutMs: 10000,
124
+ };
125
+ /**
126
+ * Default fallback result for degraded mode
127
+ */
128
+ export const DEFAULT_FALLBACK_RESULT = {
129
+ usedFallback: true,
130
+ confidence: 0.5,
131
+ retryCount: 0,
132
+ activatedAt: undefined,
133
+ };
134
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/integrations/coherence/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAgCH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAsB;IACpD,eAAe,EAAE,GAAG;IACpB,kBAAkB,EAAE,GAAG;IACvB,cAAc,EAAE,GAAG;CACpB,CAAC;AAiZF;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAA2B;IAC9D,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,mBAAmB;IAC/B,kBAAkB,EAAE,GAAG;IACvB,eAAe,EAAE,IAAI;IACrB,SAAS,EAAE,IAAI;IACf,YAAY,EAAE,IAAI;IAClB,UAAU,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,YAAY;CACxC,CAAC;AA8CF;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAoB;IACvD,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC;IACf,IAAI,EAAE,GAAG,EAAE,G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AS,cAAc,CAAC,MAAM,gCAAgC,EAC9D,4BAA4B,CAC7B,CAAC;QALc,mBAAc,GAAd,cAAc,CAAiB;QAM/C,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAC;IAC/C,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,cAAc;IAG7B;IAFlB,YACE,OAAe,EACC,QAAgB,EAChC,KAAa;QAEb,KAAK,CAAC,OAAO,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC;QAH1B,aAAQ,GAAR,QAAQ,CAAQ;QAIhC,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AA6FD;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAqB;IAC1D,WAAW,EAAE,CAAC;IACd,WAAW,EAAE,GAAG;IAChB,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,KAAK;CACjB,CAAC;AAuBF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAmB;IACrD,YAAY,EAAE,IAAI;IAClB,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,SAAS;CACvB,CAAC"}
@@ -0,0 +1,351 @@
1
+ /**
2
+ * WASM Loader for Prime-Radiant Coherence Engines
3
+ *
4
+ * Provides lazy loading of the prime-radiant-advanced-wasm module with:
5
+ * - Retry logic with exponential backoff (3 attempts by default)
6
+ * - Event emission for monitoring load status
7
+ * - Graceful error handling
8
+ * - Node.js 18+ compatibility
9
+ *
10
+ * @module integrations/coherence/wasm-loader
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * import { wasmLoader } from './wasm-loader';
15
+ *
16
+ * // Add event listeners
17
+ * wasmLoader.on('loaded', ({ version, loadTimeMs }) => {
18
+ * console.log(`WASM loaded v${version} in ${loadTimeMs}ms`);
19
+ * });
20
+ *
21
+ * wasmLoader.on('retry', ({ attempt, maxAttempts, delayMs }) => {
22
+ * console.log(`Retry ${attempt}/${maxAttempts} in ${delayMs}ms`);
23
+ * });
24
+ *
25
+ * // Load and use engines
26
+ * const engines = await wasmLoader.getEngines();
27
+ * const energy = engines.cohomology.consistencyEnergy(graph);
28
+ * ```
29
+ */
30
+ import type { RawCoherenceEngines, WasmLoaderConfig, WasmLoaderEvent, WasmLoaderEventListener, IWasmLoader, WasmModule, FallbackResult, FallbackState } from './types.js';
31
+ /**
32
+ * State of the WASM loader
33
+ */
34
+ type LoaderState = 'unloaded' | 'loading' | 'loaded' | 'failed' | 'degraded';
35
+ /**
36
+ * WASM Loader for Prime-Radiant coherence engines.
37
+ *
38
+ * Provides lazy loading with retry logic and event emission.
39
+ * Uses the Singleton pattern to ensure only one loader instance.
40
+ * Implements IWasmLoader interface for CoherenceService compatibility.
41
+ *
42
+ * ADR-052 A4.3 Enhancements:
43
+ * - Full graceful degradation with fallback results
44
+ * - Emits 'degraded_mode' event via internal EventBus
45
+ * - Exponential backoff retry (1s, 2s, 4s)
46
+ * - Never blocks execution due to WASM failure
47
+ */
48
+ export declare class WasmLoader implements IWasmLoader {
49
+ private state;
50
+ private wasmModule;
51
+ private engines;
52
+ private loadPromise;
53
+ private lastError;
54
+ private config;
55
+ private version;
56
+ private fallbackState;
57
+ private retryTimer;
58
+ private degradedModeStartTime;
59
+ private eventListeners;
60
+ /**
61
+ * Create a new WASM loader instance.
62
+ *
63
+ * @param config - Loader configuration (optional)
64
+ */
65
+ constructor(config?: Partial<WasmLoaderConfig>);
66
+ /**
67
+ * Check if the WASM module is loaded and ready.
68
+ *
69
+ * @returns True if the module is loaded and engines are available
70
+ *
71
+ * @example
72
+ * ```typescript
73
+ * if (wasmLoader.isLoaded()) {
74
+ * const engines = wasmLoader.getEnginesSync();
75
+ * }
76
+ * ```
77
+ */
78
+ isLoaded(): boolean;
79
+ /**
80
+ * Get the current loader state.
81
+ *
82
+ * @returns Current state: 'unloaded', 'loading', 'loaded', or 'failed'
83
+ */
84
+ getState(): LoaderState;
85
+ /**
86
+ * Get the loaded WASM version (empty string if not loaded).
87
+ *
88
+ * @returns Version string from the WASM module
89
+ */
90
+ getVersion(): string;
91
+ /**
92
+ * Get the last error that occurred during loading (if any).
93
+ *
94
+ * @returns The last error or null if no error
95
+ */
96
+ getLastError(): Error | null;
97
+ /**
98
+ * ADR-052 A4.3: Check if currently operating in fallback/degraded mode.
99
+ *
100
+ * @returns True if WASM is unavailable and fallback is active
101
+ */
102
+ isInDegradedMode(): boolean;
103
+ /**
104
+ * ADR-052 A4.3: Get the current fallback state.
105
+ *
106
+ * @returns Current fallback state with retry information
107
+ */
108
+ getFallbackState(): FallbackState;
109
+ /**
110
+ * ADR-052 A4.3: Get a fallback result when WASM is unavailable.
111
+ * Returns a "coherent" result with low confidence (0.5) and usedFallback: true.
112
+ * NEVER blocks execution.
113
+ *
114
+ * @returns FallbackResult with usedFallback: true and confidence: 0.5
115
+ */
116
+ getFallbackResult(): FallbackResult;
117
+ /**
118
+ * Load the WASM module and initialize all engines.
119
+ *
120
+ * This method is idempotent - calling it multiple times will return
121
+ * the same promise if loading is in progress, or the cached engines
122
+ * if already loaded.
123
+ *
124
+ * @returns Promise resolving to all coherence engines
125
+ * @throws {WasmLoadError} If loading fails after all retry attempts
126
+ *
127
+ * @example
128
+ * ```typescript
129
+ * try {
130
+ * const engines = await wasmLoader.getEngines();
131
+ * const energy = engines.cohomology.consistencyEnergy(graph);
132
+ * } catch (error) {
133
+ * if (error instanceof WasmLoadError) {
134
+ * console.error(`Failed after ${error.attempts} attempts`);
135
+ * }
136
+ * }
137
+ * ```
138
+ */
139
+ getEngines(): Promise<RawCoherenceEngines>;
140
+ /**
141
+ * ADR-052 A4.3: Get engines with graceful fallback - NEVER throws.
142
+ *
143
+ * This method attempts to load WASM but returns null with a FallbackResult
144
+ * instead of throwing. Use this when you want to handle degraded mode gracefully.
145
+ *
146
+ * @returns Object with engines (or null) and fallback information
147
+ *
148
+ * @example
149
+ * ```typescript
150
+ * const { engines, fallback } = await wasmLoader.getEnginesWithFallback();
151
+ *
152
+ * if (fallback.usedFallback) {
153
+ * console.warn('Operating in degraded mode:', fallback.lastError);
154
+ * // Use TypeScript fallback implementation
155
+ * } else {
156
+ * // Use WASM engines
157
+ * const energy = engines!.cohomology.consistencyEnergy(graph);
158
+ * }
159
+ * ```
160
+ */
161
+ getEnginesWithFallback(): Promise<{
162
+ engines: RawCoherenceEngines | null;
163
+ fallback: FallbackResult;
164
+ }>;
165
+ /**
166
+ * Get engines synchronously if already loaded.
167
+ *
168
+ * @returns Coherence engines
169
+ * @throws {WasmNotLoadedError} If WASM is not loaded
170
+ *
171
+ * @example
172
+ * ```typescript
173
+ * if (wasmLoader.isLoaded()) {
174
+ * const engines = wasmLoader.getEnginesSync();
175
+ * }
176
+ * ```
177
+ */
178
+ getEnginesSync(): RawCoherenceEngines;
179
+ /**
180
+ * Check if WASM module is available for loading.
181
+ * Required by IWasmLoader interface.
182
+ *
183
+ * @returns Promise resolving to true if WASM can be loaded
184
+ */
185
+ isAvailable(): Promise<boolean>;
186
+ /**
187
+ * Load the WASM module.
188
+ * Required by IWasmLoader interface.
189
+ *
190
+ * @returns Promise resolving to the loaded WasmModule
191
+ */
192
+ load(): Promise<WasmModule>;
193
+ /**
194
+ * Get the loaded WASM module synchronously.
195
+ * Required by IWasmLoader interface.
196
+ *
197
+ * @returns The loaded WasmModule
198
+ * @throws {WasmNotLoadedError} If the module is not loaded
199
+ */
200
+ getModule(): WasmModule;
201
+ /**
202
+ * Subscribe to loader events.
203
+ *
204
+ * @param event - Event name: 'loaded', 'error', or 'retry'
205
+ * @param listener - Callback function
206
+ * @returns Unsubscribe function
207
+ *
208
+ * @example
209
+ * ```typescript
210
+ * const unsubscribe = wasmLoader.on('loaded', ({ version }) => {
211
+ * console.log(`Loaded version ${version}`);
212
+ * });
213
+ *
214
+ * // Later, to unsubscribe:
215
+ * unsubscribe();
216
+ * ```
217
+ */
218
+ on<E extends WasmLoaderEvent>(event: E, listener: WasmLoaderEventListener<E>): () => void;
219
+ /**
220
+ * Unsubscribe from loader events.
221
+ *
222
+ * @param event - Event name
223
+ * @param listener - Callback function to remove
224
+ */
225
+ off<E extends WasmLoaderEvent>(event: E, listener: WasmLoaderEventListener<E>): void;
226
+ /**
227
+ * Reset the loader state to allow reloading.
228
+ *
229
+ * This frees any loaded engines and resets the state to 'unloaded'.
230
+ * Useful for testing or recovery scenarios.
231
+ */
232
+ reset(): void;
233
+ /**
234
+ * ADR-052 A4.3: Force a retry of WASM loading.
235
+ * Can be called manually to trigger an immediate retry attempt.
236
+ *
237
+ * @returns Promise resolving to true if WASM was loaded, false otherwise
238
+ */
239
+ forceRetry(): Promise<boolean>;
240
+ /**
241
+ * Load the WASM module with retry logic and exponential backoff.
242
+ */
243
+ private loadWithRetry;
244
+ /**
245
+ * Attempt to load the WASM module once.
246
+ *
247
+ * This method handles both Node.js and browser environments:
248
+ * - Node.js: Uses initSync() with WASM bytes read from filesystem
249
+ * - Browser: Uses default() async init with fetch
250
+ */
251
+ private attemptLoad;
252
+ /**
253
+ * Initialize WASM module for Node.js environment.
254
+ *
255
+ * In Node.js, the default async init uses fetch() which isn't available.
256
+ * Instead, we read the WASM binary from disk and use initSync().
257
+ */
258
+ private initializeForNodeJs;
259
+ /**
260
+ * Emit an event to all registered listeners.
261
+ */
262
+ private emit;
263
+ /**
264
+ * Sleep for a specified duration.
265
+ */
266
+ private sleep;
267
+ /**
268
+ * ADR-052 A4.3: Enter degraded/fallback mode after WASM load failure.
269
+ * Logs warning, emits degraded_mode event, and schedules retry with exponential backoff.
270
+ */
271
+ private enterDegradedMode;
272
+ /**
273
+ * ADR-052 A4.3: Schedule a background retry of WASM loading.
274
+ * Never blocks execution (requirement 5).
275
+ */
276
+ private scheduleBackgroundRetry;
277
+ /**
278
+ * ADR-052 A4.3: Attempt to recover WASM in the background.
279
+ * Called by the scheduled retry timer.
280
+ */
281
+ private attemptBackgroundRecovery;
282
+ /**
283
+ * ADR-052 A4.3: Emit recovery event when WASM is restored after degraded mode.
284
+ */
285
+ private emitRecoveryEvent;
286
+ }
287
+ /**
288
+ * Default WASM loader instance (singleton).
289
+ *
290
+ * Use this for most cases. Create a new WasmLoader instance only if you
291
+ * need custom configuration or isolated state.
292
+ *
293
+ * @example
294
+ * ```typescript
295
+ * import { wasmLoader } from './wasm-loader';
296
+ *
297
+ * const engines = await wasmLoader.getEngines();
298
+ * ```
299
+ */
300
+ export declare const wasmLoader: WasmLoader;
301
+ /**
302
+ * Check if WASM is loaded (convenience function).
303
+ *
304
+ * @returns True if the default loader has loaded the WASM module
305
+ */
306
+ export declare function isLoaded(): boolean;
307
+ /**
308
+ * Get engines from the default loader (convenience function).
309
+ *
310
+ * @returns Promise resolving to coherence engines
311
+ */
312
+ export declare function getEngines(): Promise<RawCoherenceEngines>;
313
+ /**
314
+ * Create a custom loader with specific configuration.
315
+ *
316
+ * @param config - Loader configuration
317
+ * @returns New WasmLoader instance
318
+ *
319
+ * @example
320
+ * ```typescript
321
+ * const customLoader = createLoader({
322
+ * maxAttempts: 5,
323
+ * baseDelayMs: 200,
324
+ * });
325
+ * ```
326
+ */
327
+ export declare function createLoader(config: Partial<WasmLoaderConfig>): WasmLoader;
328
+ /**
329
+ * Check if the default loader is in degraded mode (convenience function).
330
+ *
331
+ * @returns True if operating with fallback logic
332
+ */
333
+ export declare function isInDegradedMode(): boolean;
334
+ /**
335
+ * Get the fallback state from the default loader (convenience function).
336
+ *
337
+ * @returns Current fallback state
338
+ */
339
+ export declare function getFallbackState(): FallbackState;
340
+ /**
341
+ * Get engines with fallback from the default loader (convenience function).
342
+ * NEVER throws - returns fallback result on failure.
343
+ *
344
+ * @returns Object with engines (or null) and fallback information
345
+ */
346
+ export declare function getEnginesWithFallback(): Promise<{
347
+ engines: RawCoherenceEngines | null;
348
+ fallback: FallbackResult;
349
+ }>;
350
+ export default wasmLoader;
351
+ //# sourceMappingURL=wasm-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wasm-loader.d.ts","sourceRoot":"","sources":["../../../src/integrations/coherence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