agentdb 1.6.0 → 2.0.0-alpha.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 (734) hide show
  1. package/README.md +1098 -350
  2. package/dist/agentdb-advanced.js +2110 -0
  3. package/dist/agentdb-advanced.min.js +1 -0
  4. package/dist/agentdb.min.js +4 -4
  5. package/dist/backends/GraphBackend.d.ts +196 -0
  6. package/dist/backends/GraphBackend.d.ts.map +1 -0
  7. package/dist/backends/GraphBackend.js +33 -0
  8. package/dist/backends/GraphBackend.js.map +1 -0
  9. package/dist/backends/LearningBackend.d.ts +148 -0
  10. package/dist/backends/LearningBackend.d.ts.map +1 -0
  11. package/dist/backends/LearningBackend.js +27 -0
  12. package/dist/backends/LearningBackend.js.map +1 -0
  13. package/dist/backends/VectorBackend.d.ts +119 -0
  14. package/dist/backends/VectorBackend.d.ts.map +1 -0
  15. package/dist/backends/VectorBackend.js +14 -0
  16. package/dist/backends/VectorBackend.js.map +1 -0
  17. package/dist/backends/detector.d.ts +81 -0
  18. package/dist/backends/detector.d.ts.map +1 -0
  19. package/dist/backends/detector.js +192 -0
  20. package/dist/backends/detector.js.map +1 -0
  21. package/dist/backends/factory.d.ts +50 -0
  22. package/dist/backends/factory.d.ts.map +1 -0
  23. package/dist/backends/factory.js +161 -0
  24. package/dist/backends/factory.js.map +1 -0
  25. package/dist/backends/graph/GraphDatabaseAdapter.d.ts +139 -0
  26. package/dist/backends/graph/GraphDatabaseAdapter.d.ts.map +1 -0
  27. package/dist/backends/graph/GraphDatabaseAdapter.js +194 -0
  28. package/dist/backends/graph/GraphDatabaseAdapter.js.map +1 -0
  29. package/dist/backends/hnswlib/HNSWLibBackend.d.ts +92 -0
  30. package/dist/backends/hnswlib/HNSWLibBackend.d.ts.map +1 -0
  31. package/dist/backends/hnswlib/HNSWLibBackend.js +316 -0
  32. package/dist/backends/hnswlib/HNSWLibBackend.js.map +1 -0
  33. package/dist/backends/hnswlib/index.d.ts +7 -0
  34. package/dist/backends/hnswlib/index.d.ts.map +1 -0
  35. package/dist/backends/hnswlib/index.js +7 -0
  36. package/dist/backends/hnswlib/index.js.map +1 -0
  37. package/dist/backends/index.d.ts +14 -0
  38. package/dist/backends/index.d.ts.map +1 -0
  39. package/dist/backends/index.js +13 -0
  40. package/dist/backends/index.js.map +1 -0
  41. package/dist/backends/ruvector/RuVectorBackend.d.ts +75 -0
  42. package/dist/backends/ruvector/RuVectorBackend.d.ts.map +1 -0
  43. package/dist/backends/ruvector/RuVectorBackend.js +198 -0
  44. package/dist/backends/ruvector/RuVectorBackend.js.map +1 -0
  45. package/dist/backends/ruvector/RuVectorLearning.d.ts +104 -0
  46. package/dist/backends/ruvector/RuVectorLearning.d.ts.map +1 -0
  47. package/dist/backends/ruvector/RuVectorLearning.js +177 -0
  48. package/dist/backends/ruvector/RuVectorLearning.js.map +1 -0
  49. package/dist/backends/ruvector/index.d.ts +9 -0
  50. package/dist/backends/ruvector/index.d.ts.map +1 -0
  51. package/dist/backends/ruvector/index.js +8 -0
  52. package/dist/backends/ruvector/index.js.map +1 -0
  53. package/dist/browser/AdvancedFeatures.d.ts +144 -0
  54. package/dist/browser/AdvancedFeatures.d.ts.map +1 -0
  55. package/dist/browser/AdvancedFeatures.js +430 -0
  56. package/dist/browser/AdvancedFeatures.js.map +1 -0
  57. package/dist/browser/HNSWIndex.d.ts +117 -0
  58. package/dist/browser/HNSWIndex.d.ts.map +1 -0
  59. package/dist/browser/HNSWIndex.js +402 -0
  60. package/dist/browser/HNSWIndex.js.map +1 -0
  61. package/dist/browser/ProductQuantization.d.ts +107 -0
  62. package/dist/browser/ProductQuantization.d.ts.map +1 -0
  63. package/dist/browser/ProductQuantization.js +337 -0
  64. package/dist/browser/ProductQuantization.js.map +1 -0
  65. package/dist/browser/browser/AdvancedFeatures.d.ts +144 -0
  66. package/dist/browser/browser/AdvancedFeatures.d.ts.map +1 -0
  67. package/dist/browser/browser/AdvancedFeatures.js +427 -0
  68. package/dist/browser/browser/HNSWIndex.d.ts +117 -0
  69. package/dist/browser/browser/HNSWIndex.d.ts.map +1 -0
  70. package/dist/browser/browser/HNSWIndex.js +402 -0
  71. package/dist/browser/browser/ProductQuantization.d.ts +107 -0
  72. package/dist/browser/browser/ProductQuantization.d.ts.map +1 -0
  73. package/dist/browser/browser/ProductQuantization.js +348 -0
  74. package/dist/browser/browser/index.d.ts +223 -0
  75. package/dist/browser/browser/index.d.ts.map +1 -0
  76. package/dist/browser/browser/index.js +233 -0
  77. package/dist/browser/index.d.ts +223 -0
  78. package/dist/browser/index.d.ts.map +1 -0
  79. package/dist/browser/index.js +225 -0
  80. package/dist/browser/index.js.map +1 -0
  81. package/dist/cli/agentdb-cli.d.ts.map +1 -1
  82. package/dist/cli/agentdb-cli.js +130 -8
  83. package/dist/cli/agentdb-cli.js.map +1 -1
  84. package/dist/cli/agentdb.db +0 -0
  85. package/dist/cli/commands/init.d.ts +12 -0
  86. package/dist/cli/commands/init.d.ts.map +1 -0
  87. package/dist/cli/commands/init.js +115 -0
  88. package/dist/cli/commands/init.js.map +1 -0
  89. package/dist/cli/commands/install-embeddings.d.ts +10 -0
  90. package/dist/cli/commands/install-embeddings.d.ts.map +1 -0
  91. package/dist/cli/commands/install-embeddings.js +68 -0
  92. package/dist/cli/commands/install-embeddings.js.map +1 -0
  93. package/dist/cli/commands/migrate.d.ts +15 -0
  94. package/dist/cli/commands/migrate.d.ts.map +1 -0
  95. package/dist/cli/commands/migrate.js +425 -0
  96. package/dist/cli/commands/migrate.js.map +1 -0
  97. package/dist/cli/commands/status.d.ts +10 -0
  98. package/dist/cli/commands/status.d.ts.map +1 -0
  99. package/dist/cli/commands/status.js +129 -0
  100. package/dist/cli/commands/status.js.map +1 -0
  101. package/dist/controllers/CausalRecall.d.ts +3 -1
  102. package/dist/controllers/CausalRecall.d.ts.map +1 -1
  103. package/dist/controllers/CausalRecall.js +35 -4
  104. package/dist/controllers/CausalRecall.js.map +1 -1
  105. package/dist/controllers/ExplainableRecall.d.ts +24 -0
  106. package/dist/controllers/ExplainableRecall.d.ts.map +1 -1
  107. package/dist/controllers/ExplainableRecall.js +102 -5
  108. package/dist/controllers/ExplainableRecall.js.map +1 -1
  109. package/dist/controllers/HNSWIndex.d.ts +128 -0
  110. package/dist/controllers/HNSWIndex.d.ts.map +1 -0
  111. package/dist/controllers/HNSWIndex.js +361 -0
  112. package/dist/controllers/HNSWIndex.js.map +1 -0
  113. package/dist/controllers/NightlyLearner.d.ts.map +1 -1
  114. package/dist/controllers/NightlyLearner.js +7 -4
  115. package/dist/controllers/NightlyLearner.js.map +1 -1
  116. package/dist/controllers/ReasoningBank.d.ts +101 -2
  117. package/dist/controllers/ReasoningBank.d.ts.map +1 -1
  118. package/dist/controllers/ReasoningBank.js +196 -4
  119. package/dist/controllers/ReasoningBank.js.map +1 -1
  120. package/dist/controllers/ReflexionMemory.d.ts +41 -1
  121. package/dist/controllers/ReflexionMemory.d.ts.map +1 -1
  122. package/dist/controllers/ReflexionMemory.js +282 -5
  123. package/dist/controllers/ReflexionMemory.js.map +1 -1
  124. package/dist/controllers/SkillLibrary.d.ts +27 -9
  125. package/dist/controllers/SkillLibrary.d.ts.map +1 -1
  126. package/dist/controllers/SkillLibrary.js +136 -47
  127. package/dist/controllers/SkillLibrary.js.map +1 -1
  128. package/dist/controllers/index.d.ts +2 -0
  129. package/dist/controllers/index.d.ts.map +1 -1
  130. package/dist/controllers/index.js +1 -0
  131. package/dist/controllers/index.js.map +1 -1
  132. package/dist/db-fallback.d.ts.map +1 -1
  133. package/dist/db-fallback.js +100 -29
  134. package/dist/db-fallback.js.map +1 -1
  135. package/dist/db-test.d.ts +13 -0
  136. package/dist/db-test.d.ts.map +1 -0
  137. package/dist/db-test.js +55 -0
  138. package/dist/db-test.js.map +1 -0
  139. package/dist/db-unified.d.ts +76 -0
  140. package/dist/db-unified.d.ts.map +1 -0
  141. package/dist/db-unified.js +278 -0
  142. package/dist/db-unified.js.map +1 -0
  143. package/dist/index.d.ts +1 -0
  144. package/dist/index.d.ts.map +1 -1
  145. package/dist/index.js +2 -1
  146. package/dist/index.js.map +1 -1
  147. package/dist/malp/core/ccc.d.ts +99 -0
  148. package/dist/malp/core/ccc.d.ts.map +1 -0
  149. package/dist/malp/core/ccc.js +181 -0
  150. package/dist/malp/core/ccc.js.map +1 -0
  151. package/dist/malp/core/index.d.ts +9 -0
  152. package/dist/malp/core/index.d.ts.map +1 -0
  153. package/dist/malp/core/index.js +9 -0
  154. package/dist/malp/core/index.js.map +1 -0
  155. package/dist/malp/core/linalg.d.ts +101 -0
  156. package/dist/malp/core/linalg.d.ts.map +1 -0
  157. package/dist/malp/core/linalg.js +278 -0
  158. package/dist/malp/core/linalg.js.map +1 -0
  159. package/dist/malp/core/optimizer.d.ts +68 -0
  160. package/dist/malp/core/optimizer.d.ts.map +1 -0
  161. package/dist/malp/core/optimizer.js +160 -0
  162. package/dist/malp/core/optimizer.js.map +1 -0
  163. package/dist/malp/index.d.ts +33 -0
  164. package/dist/malp/index.d.ts.map +1 -0
  165. package/dist/malp/index.js +37 -0
  166. package/dist/malp/index.js.map +1 -0
  167. package/dist/malp/metrics/agreement.d.ts +106 -0
  168. package/dist/malp/metrics/agreement.d.ts.map +1 -0
  169. package/dist/malp/metrics/agreement.js +199 -0
  170. package/dist/malp/metrics/agreement.js.map +1 -0
  171. package/dist/malp/metrics/comparison.d.ts +93 -0
  172. package/dist/malp/metrics/comparison.d.ts.map +1 -0
  173. package/dist/malp/metrics/comparison.js +256 -0
  174. package/dist/malp/metrics/comparison.js.map +1 -0
  175. package/dist/malp/metrics/index.d.ts +8 -0
  176. package/dist/malp/metrics/index.d.ts.map +1 -0
  177. package/dist/malp/metrics/index.js +8 -0
  178. package/dist/malp/metrics/index.js.map +1 -0
  179. package/dist/malp/metrics/performance.d.ts +61 -0
  180. package/dist/malp/metrics/performance.d.ts.map +1 -0
  181. package/dist/malp/metrics/performance.js +190 -0
  182. package/dist/malp/metrics/performance.js.map +1 -0
  183. package/dist/malp/models/index.d.ts +7 -0
  184. package/dist/malp/models/index.d.ts.map +1 -0
  185. package/dist/malp/models/index.js +7 -0
  186. package/dist/malp/models/index.js.map +1 -0
  187. package/dist/malp/models/malp.d.ts +116 -0
  188. package/dist/malp/models/malp.d.ts.map +1 -0
  189. package/dist/malp/models/malp.js +206 -0
  190. package/dist/malp/models/malp.js.map +1 -0
  191. package/dist/malp/models/regressor.d.ts +80 -0
  192. package/dist/malp/models/regressor.d.ts.map +1 -0
  193. package/dist/malp/models/regressor.js +229 -0
  194. package/dist/malp/models/regressor.js.map +1 -0
  195. package/dist/malp/reasoningbank_validator.d.ts +187 -0
  196. package/dist/malp/reasoningbank_validator.d.ts.map +1 -0
  197. package/dist/malp/reasoningbank_validator.js +246 -0
  198. package/dist/malp/reasoningbank_validator.js.map +1 -0
  199. package/dist/malp/wasm_bindings.d.ts +344 -0
  200. package/dist/malp/wasm_bindings.d.ts.map +1 -0
  201. package/dist/malp/wasm_bindings.js +9 -0
  202. package/dist/malp/wasm_bindings.js.map +1 -0
  203. package/dist/mcp/agentdb-mcp-server.js +512 -33
  204. package/dist/mcp/agentdb-mcp-server.js.map +1 -1
  205. package/dist/optimizations/BatchOperations.d.ts +42 -0
  206. package/dist/optimizations/BatchOperations.d.ts.map +1 -1
  207. package/dist/optimizations/BatchOperations.js +181 -0
  208. package/dist/optimizations/BatchOperations.js.map +1 -1
  209. package/dist/optimizations/ToolCache.d.ts +137 -0
  210. package/dist/optimizations/ToolCache.d.ts.map +1 -0
  211. package/dist/optimizations/ToolCache.js +281 -0
  212. package/dist/optimizations/ToolCache.js.map +1 -0
  213. package/dist/security/input-validation.d.ts +24 -0
  214. package/dist/security/input-validation.d.ts.map +1 -1
  215. package/dist/security/input-validation.js +106 -0
  216. package/dist/security/input-validation.js.map +1 -1
  217. package/dist/security/limits.d.ts +150 -0
  218. package/dist/security/limits.d.ts.map +1 -0
  219. package/dist/security/limits.js +288 -0
  220. package/dist/security/limits.js.map +1 -0
  221. package/dist/security/path-security.d.ts +100 -0
  222. package/dist/security/path-security.d.ts.map +1 -0
  223. package/dist/security/path-security.js +337 -0
  224. package/dist/security/path-security.js.map +1 -0
  225. package/dist/security/validation.d.ts +95 -0
  226. package/dist/security/validation.d.ts.map +1 -0
  227. package/dist/security/validation.js +315 -0
  228. package/dist/security/validation.js.map +1 -0
  229. package/dist/simulation/cli.d.ts +9 -0
  230. package/dist/simulation/cli.d.ts.map +1 -0
  231. package/dist/simulation/cli.js +68 -0
  232. package/dist/simulation/cli.js.map +1 -0
  233. package/dist/simulation/runner.d.ts +21 -0
  234. package/dist/simulation/runner.d.ts.map +1 -0
  235. package/dist/simulation/runner.js +241 -0
  236. package/dist/simulation/runner.js.map +1 -0
  237. package/dist/simulation/scenarios/aidefence-integration.d.ts +24 -0
  238. package/dist/simulation/scenarios/aidefence-integration.d.ts.map +1 -0
  239. package/dist/simulation/scenarios/aidefence-integration.js +124 -0
  240. package/dist/simulation/scenarios/aidefence-integration.js.map +1 -0
  241. package/dist/simulation/scenarios/bmssp-integration.d.ts +23 -0
  242. package/dist/simulation/scenarios/bmssp-integration.d.ts.map +1 -0
  243. package/dist/simulation/scenarios/bmssp-integration.js +104 -0
  244. package/dist/simulation/scenarios/bmssp-integration.js.map +1 -0
  245. package/dist/simulation/scenarios/causal-reasoning.d.ts +16 -0
  246. package/dist/simulation/scenarios/causal-reasoning.d.ts.map +1 -0
  247. package/dist/simulation/scenarios/causal-reasoning.js +108 -0
  248. package/dist/simulation/scenarios/causal-reasoning.js.map +1 -0
  249. package/dist/simulation/scenarios/consciousness-explorer.d.ts +25 -0
  250. package/dist/simulation/scenarios/consciousness-explorer.d.ts.map +1 -0
  251. package/dist/simulation/scenarios/consciousness-explorer.js +108 -0
  252. package/dist/simulation/scenarios/consciousness-explorer.js.map +1 -0
  253. package/dist/simulation/scenarios/domain-examples/e-commerce-recommendations.d.ts +135 -0
  254. package/dist/simulation/scenarios/domain-examples/e-commerce-recommendations.d.ts.map +1 -0
  255. package/dist/simulation/scenarios/domain-examples/e-commerce-recommendations.js +158 -0
  256. package/dist/simulation/scenarios/domain-examples/e-commerce-recommendations.js.map +1 -0
  257. package/dist/simulation/scenarios/domain-examples/index.d.ts +14 -0
  258. package/dist/simulation/scenarios/domain-examples/index.d.ts.map +1 -0
  259. package/dist/simulation/scenarios/domain-examples/index.js +14 -0
  260. package/dist/simulation/scenarios/domain-examples/index.js.map +1 -0
  261. package/dist/simulation/scenarios/domain-examples/iot-sensor-networks.d.ts +178 -0
  262. package/dist/simulation/scenarios/domain-examples/iot-sensor-networks.d.ts.map +1 -0
  263. package/dist/simulation/scenarios/domain-examples/iot-sensor-networks.js +218 -0
  264. package/dist/simulation/scenarios/domain-examples/iot-sensor-networks.js.map +1 -0
  265. package/dist/simulation/scenarios/domain-examples/medical-imaging.d.ts +122 -0
  266. package/dist/simulation/scenarios/domain-examples/medical-imaging.d.ts.map +1 -0
  267. package/dist/simulation/scenarios/domain-examples/medical-imaging.js +129 -0
  268. package/dist/simulation/scenarios/domain-examples/medical-imaging.js.map +1 -0
  269. package/dist/simulation/scenarios/domain-examples/robotics-navigation.d.ts +166 -0
  270. package/dist/simulation/scenarios/domain-examples/robotics-navigation.d.ts.map +1 -0
  271. package/dist/simulation/scenarios/domain-examples/robotics-navigation.js +161 -0
  272. package/dist/simulation/scenarios/domain-examples/robotics-navigation.js.map +1 -0
  273. package/dist/simulation/scenarios/domain-examples/scientific-research.d.ts +151 -0
  274. package/dist/simulation/scenarios/domain-examples/scientific-research.d.ts.map +1 -0
  275. package/dist/simulation/scenarios/domain-examples/scientific-research.js +187 -0
  276. package/dist/simulation/scenarios/domain-examples/scientific-research.js.map +1 -0
  277. package/dist/simulation/scenarios/domain-examples/trading-systems.d.ts +102 -0
  278. package/dist/simulation/scenarios/domain-examples/trading-systems.d.ts.map +1 -0
  279. package/dist/simulation/scenarios/domain-examples/trading-systems.js +100 -0
  280. package/dist/simulation/scenarios/domain-examples/trading-systems.js.map +1 -0
  281. package/dist/simulation/scenarios/goalie-integration.d.ts +24 -0
  282. package/dist/simulation/scenarios/goalie-integration.d.ts.map +1 -0
  283. package/dist/simulation/scenarios/goalie-integration.js +121 -0
  284. package/dist/simulation/scenarios/goalie-integration.js.map +1 -0
  285. package/dist/simulation/scenarios/graph-traversal.d.ts +17 -0
  286. package/dist/simulation/scenarios/graph-traversal.d.ts.map +1 -0
  287. package/dist/simulation/scenarios/graph-traversal.js +101 -0
  288. package/dist/simulation/scenarios/graph-traversal.js.map +1 -0
  289. package/dist/simulation/scenarios/latent-space/attention-analysis.d.ts +45 -0
  290. package/dist/simulation/scenarios/latent-space/attention-analysis.d.ts.map +1 -0
  291. package/dist/simulation/scenarios/latent-space/attention-analysis.js +435 -0
  292. package/dist/simulation/scenarios/latent-space/attention-analysis.js.map +1 -0
  293. package/dist/simulation/scenarios/latent-space/clustering-analysis.d.ts +55 -0
  294. package/dist/simulation/scenarios/latent-space/clustering-analysis.d.ts.map +1 -0
  295. package/dist/simulation/scenarios/latent-space/clustering-analysis.js +606 -0
  296. package/dist/simulation/scenarios/latent-space/clustering-analysis.js.map +1 -0
  297. package/dist/simulation/scenarios/latent-space/hnsw-exploration.d.ts +74 -0
  298. package/dist/simulation/scenarios/latent-space/hnsw-exploration.d.ts.map +1 -0
  299. package/dist/simulation/scenarios/latent-space/hnsw-exploration.js +391 -0
  300. package/dist/simulation/scenarios/latent-space/hnsw-exploration.js.map +1 -0
  301. package/dist/simulation/scenarios/latent-space/hypergraph-exploration.d.ts +51 -0
  302. package/dist/simulation/scenarios/latent-space/hypergraph-exploration.d.ts.map +1 -0
  303. package/dist/simulation/scenarios/latent-space/hypergraph-exploration.js +536 -0
  304. package/dist/simulation/scenarios/latent-space/hypergraph-exploration.js.map +1 -0
  305. package/dist/simulation/scenarios/latent-space/index.d.ts +35 -0
  306. package/dist/simulation/scenarios/latent-space/index.d.ts.map +1 -0
  307. package/dist/simulation/scenarios/latent-space/index.js +35 -0
  308. package/dist/simulation/scenarios/latent-space/index.js.map +1 -0
  309. package/dist/simulation/scenarios/latent-space/neural-augmentation.d.ts +52 -0
  310. package/dist/simulation/scenarios/latent-space/neural-augmentation.d.ts.map +1 -0
  311. package/dist/simulation/scenarios/latent-space/neural-augmentation.js +472 -0
  312. package/dist/simulation/scenarios/latent-space/neural-augmentation.js.map +1 -0
  313. package/dist/simulation/scenarios/latent-space/quantum-hybrid.d.ts +53 -0
  314. package/dist/simulation/scenarios/latent-space/quantum-hybrid.d.ts.map +1 -0
  315. package/dist/simulation/scenarios/latent-space/quantum-hybrid.js +391 -0
  316. package/dist/simulation/scenarios/latent-space/quantum-hybrid.js.map +1 -0
  317. package/dist/simulation/scenarios/latent-space/self-organizing-hnsw.d.ts +52 -0
  318. package/dist/simulation/scenarios/latent-space/self-organizing-hnsw.d.ts.map +1 -0
  319. package/dist/simulation/scenarios/latent-space/self-organizing-hnsw.js +514 -0
  320. package/dist/simulation/scenarios/latent-space/self-organizing-hnsw.js.map +1 -0
  321. package/dist/simulation/scenarios/latent-space/traversal-optimization.d.ts +53 -0
  322. package/dist/simulation/scenarios/latent-space/traversal-optimization.d.ts.map +1 -0
  323. package/dist/simulation/scenarios/latent-space/traversal-optimization.js +595 -0
  324. package/dist/simulation/scenarios/latent-space/traversal-optimization.js.map +1 -0
  325. package/dist/simulation/scenarios/lean-agentic-swarm.d.ts +18 -0
  326. package/dist/simulation/scenarios/lean-agentic-swarm.d.ts.map +1 -0
  327. package/dist/simulation/scenarios/lean-agentic-swarm.js +132 -0
  328. package/dist/simulation/scenarios/lean-agentic-swarm.js.map +1 -0
  329. package/dist/simulation/scenarios/multi-agent-swarm.d.ts +17 -0
  330. package/dist/simulation/scenarios/multi-agent-swarm.d.ts.map +1 -0
  331. package/dist/simulation/scenarios/multi-agent-swarm.js +111 -0
  332. package/dist/simulation/scenarios/multi-agent-swarm.js.map +1 -0
  333. package/dist/simulation/scenarios/psycho-symbolic-reasoner.d.ts +23 -0
  334. package/dist/simulation/scenarios/psycho-symbolic-reasoner.d.ts.map +1 -0
  335. package/dist/simulation/scenarios/psycho-symbolic-reasoner.js +98 -0
  336. package/dist/simulation/scenarios/psycho-symbolic-reasoner.js.map +1 -0
  337. package/dist/simulation/scenarios/reflexion-learning.d.ts +16 -0
  338. package/dist/simulation/scenarios/reflexion-learning.d.ts.map +1 -0
  339. package/dist/simulation/scenarios/reflexion-learning.js +98 -0
  340. package/dist/simulation/scenarios/reflexion-learning.js.map +1 -0
  341. package/dist/simulation/scenarios/research-swarm.d.ts +24 -0
  342. package/dist/simulation/scenarios/research-swarm.d.ts.map +1 -0
  343. package/dist/simulation/scenarios/research-swarm.js +146 -0
  344. package/dist/simulation/scenarios/research-swarm.js.map +1 -0
  345. package/dist/simulation/scenarios/skill-evolution.d.ts +16 -0
  346. package/dist/simulation/scenarios/skill-evolution.d.ts.map +1 -0
  347. package/dist/simulation/scenarios/skill-evolution.js +109 -0
  348. package/dist/simulation/scenarios/skill-evolution.js.map +1 -0
  349. package/dist/simulation/scenarios/stock-market-emergence.d.ts +33 -0
  350. package/dist/simulation/scenarios/stock-market-emergence.d.ts.map +1 -0
  351. package/dist/simulation/scenarios/stock-market-emergence.js +246 -0
  352. package/dist/simulation/scenarios/stock-market-emergence.js.map +1 -0
  353. package/dist/simulation/scenarios/strange-loops.d.ts +18 -0
  354. package/dist/simulation/scenarios/strange-loops.d.ts.map +1 -0
  355. package/dist/simulation/scenarios/strange-loops.js +133 -0
  356. package/dist/simulation/scenarios/strange-loops.js.map +1 -0
  357. package/dist/simulation/scenarios/sublinear-solver.d.ts +22 -0
  358. package/dist/simulation/scenarios/sublinear-solver.d.ts.map +1 -0
  359. package/dist/simulation/scenarios/sublinear-solver.js +82 -0
  360. package/dist/simulation/scenarios/sublinear-solver.js.map +1 -0
  361. package/dist/simulation/scenarios/temporal-lead-solver.d.ts +23 -0
  362. package/dist/simulation/scenarios/temporal-lead-solver.d.ts.map +1 -0
  363. package/dist/simulation/scenarios/temporal-lead-solver.js +90 -0
  364. package/dist/simulation/scenarios/temporal-lead-solver.js.map +1 -0
  365. package/dist/simulation/scenarios/voting-system-consensus.d.ts +27 -0
  366. package/dist/simulation/scenarios/voting-system-consensus.d.ts.map +1 -0
  367. package/dist/simulation/scenarios/voting-system-consensus.js +175 -0
  368. package/dist/simulation/scenarios/voting-system-consensus.js.map +1 -0
  369. package/dist/simulation/types.d.ts +162 -0
  370. package/dist/simulation/types.d.ts.map +1 -0
  371. package/dist/simulation/types.js +5 -0
  372. package/dist/simulation/types.js.map +1 -0
  373. package/dist/simulation/utils/PerformanceOptimizer.d.ts +115 -0
  374. package/dist/simulation/utils/PerformanceOptimizer.d.ts.map +1 -0
  375. package/dist/simulation/utils/PerformanceOptimizer.js +223 -0
  376. package/dist/simulation/utils/PerformanceOptimizer.js.map +1 -0
  377. package/dist/src/backends/GraphBackend.d.ts +196 -0
  378. package/dist/src/backends/GraphBackend.d.ts.map +1 -0
  379. package/dist/src/backends/GraphBackend.js +33 -0
  380. package/dist/src/backends/GraphBackend.js.map +1 -0
  381. package/dist/src/backends/LearningBackend.d.ts +148 -0
  382. package/dist/src/backends/LearningBackend.d.ts.map +1 -0
  383. package/dist/src/backends/LearningBackend.js +27 -0
  384. package/dist/src/backends/LearningBackend.js.map +1 -0
  385. package/dist/src/backends/VectorBackend.d.ts +119 -0
  386. package/dist/src/backends/VectorBackend.d.ts.map +1 -0
  387. package/dist/src/backends/VectorBackend.js +14 -0
  388. package/dist/src/backends/VectorBackend.js.map +1 -0
  389. package/dist/src/backends/detector.d.ts +81 -0
  390. package/dist/src/backends/detector.d.ts.map +1 -0
  391. package/dist/src/backends/detector.js +192 -0
  392. package/dist/src/backends/detector.js.map +1 -0
  393. package/dist/src/backends/factory.d.ts +50 -0
  394. package/dist/src/backends/factory.d.ts.map +1 -0
  395. package/dist/src/backends/factory.js +161 -0
  396. package/dist/src/backends/factory.js.map +1 -0
  397. package/dist/src/backends/graph/GraphDatabaseAdapter.d.ts +151 -0
  398. package/dist/src/backends/graph/GraphDatabaseAdapter.d.ts.map +1 -0
  399. package/dist/src/backends/graph/GraphDatabaseAdapter.js +224 -0
  400. package/dist/src/backends/graph/GraphDatabaseAdapter.js.map +1 -0
  401. package/dist/src/backends/hnswlib/HNSWLibBackend.d.ts +92 -0
  402. package/dist/src/backends/hnswlib/HNSWLibBackend.d.ts.map +1 -0
  403. package/dist/src/backends/hnswlib/HNSWLibBackend.js +316 -0
  404. package/dist/src/backends/hnswlib/HNSWLibBackend.js.map +1 -0
  405. package/dist/src/backends/hnswlib/index.d.ts +7 -0
  406. package/dist/src/backends/hnswlib/index.d.ts.map +1 -0
  407. package/dist/src/backends/hnswlib/index.js +7 -0
  408. package/dist/src/backends/hnswlib/index.js.map +1 -0
  409. package/dist/src/backends/index.d.ts +14 -0
  410. package/dist/src/backends/index.d.ts.map +1 -0
  411. package/dist/src/backends/index.js +13 -0
  412. package/dist/src/backends/index.js.map +1 -0
  413. package/dist/src/backends/ruvector/RuVectorBackend.d.ts +75 -0
  414. package/dist/src/backends/ruvector/RuVectorBackend.d.ts.map +1 -0
  415. package/dist/src/backends/ruvector/RuVectorBackend.js +198 -0
  416. package/dist/src/backends/ruvector/RuVectorBackend.js.map +1 -0
  417. package/dist/src/backends/ruvector/RuVectorLearning.d.ts +104 -0
  418. package/dist/src/backends/ruvector/RuVectorLearning.d.ts.map +1 -0
  419. package/dist/src/backends/ruvector/RuVectorLearning.js +177 -0
  420. package/dist/src/backends/ruvector/RuVectorLearning.js.map +1 -0
  421. package/dist/src/backends/ruvector/index.d.ts +9 -0
  422. package/dist/src/backends/ruvector/index.d.ts.map +1 -0
  423. package/dist/src/backends/ruvector/index.js +8 -0
  424. package/dist/src/backends/ruvector/index.js.map +1 -0
  425. package/dist/src/benchmarks/wasm-vector-benchmark.d.ts +10 -0
  426. package/dist/src/benchmarks/wasm-vector-benchmark.d.ts.map +1 -0
  427. package/dist/src/benchmarks/wasm-vector-benchmark.js +196 -0
  428. package/dist/src/benchmarks/wasm-vector-benchmark.js.map +1 -0
  429. package/dist/src/browser/AdvancedFeatures.d.ts +144 -0
  430. package/dist/src/browser/AdvancedFeatures.d.ts.map +1 -0
  431. package/dist/src/browser/AdvancedFeatures.js +430 -0
  432. package/dist/src/browser/AdvancedFeatures.js.map +1 -0
  433. package/dist/src/browser/HNSWIndex.d.ts +117 -0
  434. package/dist/src/browser/HNSWIndex.d.ts.map +1 -0
  435. package/dist/src/browser/HNSWIndex.js +402 -0
  436. package/dist/src/browser/HNSWIndex.js.map +1 -0
  437. package/dist/src/browser/ProductQuantization.d.ts +107 -0
  438. package/dist/src/browser/ProductQuantization.d.ts.map +1 -0
  439. package/dist/src/browser/ProductQuantization.js +337 -0
  440. package/dist/src/browser/ProductQuantization.js.map +1 -0
  441. package/dist/src/browser/index.d.ts +223 -0
  442. package/dist/src/browser/index.d.ts.map +1 -0
  443. package/dist/src/browser/index.js +225 -0
  444. package/dist/src/browser/index.js.map +1 -0
  445. package/dist/src/cli/agentdb-cli.d.ts +154 -0
  446. package/dist/src/cli/agentdb-cli.d.ts.map +1 -0
  447. package/dist/src/cli/agentdb-cli.js +2273 -0
  448. package/dist/src/cli/agentdb-cli.js.map +1 -0
  449. package/dist/src/cli/commands/init.d.ts +12 -0
  450. package/dist/src/cli/commands/init.d.ts.map +1 -0
  451. package/dist/src/cli/commands/init.js +115 -0
  452. package/dist/src/cli/commands/init.js.map +1 -0
  453. package/dist/src/cli/commands/install-embeddings.d.ts +10 -0
  454. package/dist/src/cli/commands/install-embeddings.d.ts.map +1 -0
  455. package/dist/src/cli/commands/install-embeddings.js +68 -0
  456. package/dist/src/cli/commands/install-embeddings.js.map +1 -0
  457. package/dist/src/cli/commands/migrate.d.ts +15 -0
  458. package/dist/src/cli/commands/migrate.d.ts.map +1 -0
  459. package/dist/src/cli/commands/migrate.js +425 -0
  460. package/dist/src/cli/commands/migrate.js.map +1 -0
  461. package/dist/src/cli/commands/simulate-custom.d.ts +26 -0
  462. package/dist/src/cli/commands/simulate-custom.d.ts.map +1 -0
  463. package/dist/src/cli/commands/simulate-custom.js +207 -0
  464. package/dist/src/cli/commands/simulate-custom.js.map +1 -0
  465. package/dist/src/cli/commands/simulate-report.d.ts +15 -0
  466. package/dist/src/cli/commands/simulate-report.d.ts.map +1 -0
  467. package/dist/src/cli/commands/simulate-report.js +136 -0
  468. package/dist/src/cli/commands/simulate-report.js.map +1 -0
  469. package/dist/src/cli/commands/simulate-wizard.d.ts +6 -0
  470. package/dist/src/cli/commands/simulate-wizard.d.ts.map +1 -0
  471. package/dist/src/cli/commands/simulate-wizard.js +352 -0
  472. package/dist/src/cli/commands/simulate-wizard.js.map +1 -0
  473. package/dist/src/cli/commands/simulate.d.ts +7 -0
  474. package/dist/src/cli/commands/simulate.d.ts.map +1 -0
  475. package/dist/src/cli/commands/simulate.js +100 -0
  476. package/dist/src/cli/commands/simulate.js.map +1 -0
  477. package/dist/src/cli/commands/status.d.ts +10 -0
  478. package/dist/src/cli/commands/status.d.ts.map +1 -0
  479. package/dist/src/cli/commands/status.js +129 -0
  480. package/dist/src/cli/commands/status.js.map +1 -0
  481. package/dist/src/cli/lib/config-manager.d.ts +110 -0
  482. package/dist/src/cli/lib/config-manager.d.ts.map +1 -0
  483. package/dist/src/cli/lib/config-manager.js +512 -0
  484. package/dist/src/cli/lib/config-manager.js.map +1 -0
  485. package/dist/src/cli/lib/config-validator.d.ts +43 -0
  486. package/dist/src/cli/lib/config-validator.d.ts.map +1 -0
  487. package/dist/src/cli/lib/config-validator.js +217 -0
  488. package/dist/src/cli/lib/config-validator.js.map +1 -0
  489. package/dist/src/cli/lib/health-monitor.d.ts +149 -0
  490. package/dist/src/cli/lib/health-monitor.d.ts.map +1 -0
  491. package/dist/src/cli/lib/health-monitor.js +380 -0
  492. package/dist/src/cli/lib/health-monitor.js.map +1 -0
  493. package/dist/src/cli/lib/help-formatter.d.ts +38 -0
  494. package/dist/src/cli/lib/help-formatter.d.ts.map +1 -0
  495. package/dist/src/cli/lib/help-formatter.js +357 -0
  496. package/dist/src/cli/lib/help-formatter.js.map +1 -0
  497. package/dist/src/cli/lib/history-tracker.d.ts +103 -0
  498. package/dist/src/cli/lib/history-tracker.d.ts.map +1 -0
  499. package/dist/src/cli/lib/history-tracker.js +346 -0
  500. package/dist/src/cli/lib/history-tracker.js.map +1 -0
  501. package/dist/src/cli/lib/report-generator.d.ts +24 -0
  502. package/dist/src/cli/lib/report-generator.d.ts.map +1 -0
  503. package/dist/src/cli/lib/report-generator.js +417 -0
  504. package/dist/src/cli/lib/report-generator.js.map +1 -0
  505. package/dist/src/cli/lib/report-store.d.ts +116 -0
  506. package/dist/src/cli/lib/report-store.d.ts.map +1 -0
  507. package/dist/src/cli/lib/report-store.js +464 -0
  508. package/dist/src/cli/lib/report-store.js.map +1 -0
  509. package/dist/src/cli/lib/simulation-registry.d.ts +165 -0
  510. package/dist/src/cli/lib/simulation-registry.d.ts.map +1 -0
  511. package/dist/src/cli/lib/simulation-registry.js +332 -0
  512. package/dist/src/cli/lib/simulation-registry.js.map +1 -0
  513. package/dist/src/cli/lib/simulation-runner.d.ts +90 -0
  514. package/dist/src/cli/lib/simulation-runner.d.ts.map +1 -0
  515. package/dist/src/cli/lib/simulation-runner.js +211 -0
  516. package/dist/src/cli/lib/simulation-runner.js.map +1 -0
  517. package/dist/src/controllers/CausalMemoryGraph.d.ts +127 -0
  518. package/dist/src/controllers/CausalMemoryGraph.d.ts.map +1 -0
  519. package/dist/src/controllers/CausalMemoryGraph.js +354 -0
  520. package/dist/src/controllers/CausalMemoryGraph.js.map +1 -0
  521. package/dist/src/controllers/CausalRecall.d.ts +139 -0
  522. package/dist/src/controllers/CausalRecall.d.ts.map +1 -0
  523. package/dist/src/controllers/CausalRecall.js +356 -0
  524. package/dist/src/controllers/CausalRecall.js.map +1 -0
  525. package/dist/src/controllers/ContextSynthesizer.d.ts +65 -0
  526. package/dist/src/controllers/ContextSynthesizer.d.ts.map +1 -0
  527. package/dist/src/controllers/ContextSynthesizer.js +208 -0
  528. package/dist/src/controllers/ContextSynthesizer.js.map +1 -0
  529. package/dist/src/controllers/EmbeddingService.d.ts +37 -0
  530. package/dist/src/controllers/EmbeddingService.d.ts.map +1 -0
  531. package/dist/src/controllers/EmbeddingService.js +136 -0
  532. package/dist/src/controllers/EmbeddingService.js.map +1 -0
  533. package/dist/src/controllers/EnhancedEmbeddingService.d.ts +50 -0
  534. package/dist/src/controllers/EnhancedEmbeddingService.d.ts.map +1 -0
  535. package/dist/src/controllers/EnhancedEmbeddingService.js +119 -0
  536. package/dist/src/controllers/EnhancedEmbeddingService.js.map +1 -0
  537. package/dist/src/controllers/ExplainableRecall.d.ts +163 -0
  538. package/dist/src/controllers/ExplainableRecall.d.ts.map +1 -0
  539. package/dist/src/controllers/ExplainableRecall.js +485 -0
  540. package/dist/src/controllers/ExplainableRecall.js.map +1 -0
  541. package/dist/src/controllers/HNSWIndex.d.ts +128 -0
  542. package/dist/src/controllers/HNSWIndex.d.ts.map +1 -0
  543. package/dist/src/controllers/HNSWIndex.js +361 -0
  544. package/dist/src/controllers/HNSWIndex.js.map +1 -0
  545. package/dist/src/controllers/LearningSystem.d.ts +195 -0
  546. package/dist/src/controllers/LearningSystem.d.ts.map +1 -0
  547. package/dist/src/controllers/LearningSystem.js +929 -0
  548. package/dist/src/controllers/LearningSystem.js.map +1 -0
  549. package/dist/src/controllers/MMRDiversityRanker.d.ts +50 -0
  550. package/dist/src/controllers/MMRDiversityRanker.d.ts.map +1 -0
  551. package/dist/src/controllers/MMRDiversityRanker.js +130 -0
  552. package/dist/src/controllers/MMRDiversityRanker.js.map +1 -0
  553. package/dist/src/controllers/MetadataFilter.d.ts +70 -0
  554. package/dist/src/controllers/MetadataFilter.d.ts.map +1 -0
  555. package/dist/src/controllers/MetadataFilter.js +243 -0
  556. package/dist/src/controllers/MetadataFilter.js.map +1 -0
  557. package/dist/src/controllers/NightlyLearner.d.ts +114 -0
  558. package/dist/src/controllers/NightlyLearner.d.ts.map +1 -0
  559. package/dist/src/controllers/NightlyLearner.js +394 -0
  560. package/dist/src/controllers/NightlyLearner.js.map +1 -0
  561. package/dist/src/controllers/QUICClient.d.ts +109 -0
  562. package/dist/src/controllers/QUICClient.d.ts.map +1 -0
  563. package/dist/src/controllers/QUICClient.js +299 -0
  564. package/dist/src/controllers/QUICClient.js.map +1 -0
  565. package/dist/src/controllers/QUICServer.d.ts +121 -0
  566. package/dist/src/controllers/QUICServer.d.ts.map +1 -0
  567. package/dist/src/controllers/QUICServer.js +383 -0
  568. package/dist/src/controllers/QUICServer.js.map +1 -0
  569. package/dist/src/controllers/ReasoningBank.d.ts +196 -0
  570. package/dist/src/controllers/ReasoningBank.d.ts.map +1 -0
  571. package/dist/src/controllers/ReasoningBank.js +494 -0
  572. package/dist/src/controllers/ReasoningBank.js.map +1 -0
  573. package/dist/src/controllers/ReflexionMemory.d.ts +125 -0
  574. package/dist/src/controllers/ReflexionMemory.d.ts.map +1 -0
  575. package/dist/src/controllers/ReflexionMemory.js +654 -0
  576. package/dist/src/controllers/ReflexionMemory.js.map +1 -0
  577. package/dist/src/controllers/SkillLibrary.d.ts +150 -0
  578. package/dist/src/controllers/SkillLibrary.d.ts.map +1 -0
  579. package/dist/src/controllers/SkillLibrary.js +608 -0
  580. package/dist/src/controllers/SkillLibrary.js.map +1 -0
  581. package/dist/src/controllers/SyncCoordinator.d.ts +120 -0
  582. package/dist/src/controllers/SyncCoordinator.d.ts.map +1 -0
  583. package/dist/src/controllers/SyncCoordinator.js +441 -0
  584. package/dist/src/controllers/SyncCoordinator.js.map +1 -0
  585. package/dist/src/controllers/WASMVectorSearch.d.ts +89 -0
  586. package/dist/src/controllers/WASMVectorSearch.d.ts.map +1 -0
  587. package/dist/src/controllers/WASMVectorSearch.js +234 -0
  588. package/dist/src/controllers/WASMVectorSearch.js.map +1 -0
  589. package/dist/src/controllers/frontier-index.d.ts +14 -0
  590. package/dist/src/controllers/frontier-index.d.ts.map +1 -0
  591. package/dist/src/controllers/frontier-index.js +10 -0
  592. package/dist/src/controllers/frontier-index.js.map +1 -0
  593. package/dist/src/controllers/index.d.ts +30 -0
  594. package/dist/src/controllers/index.d.ts.map +1 -0
  595. package/dist/src/controllers/index.js +18 -0
  596. package/dist/src/controllers/index.js.map +1 -0
  597. package/dist/src/db-fallback.d.ts +26 -0
  598. package/dist/src/db-fallback.d.ts.map +1 -0
  599. package/dist/src/db-fallback.js +264 -0
  600. package/dist/src/db-fallback.js.map +1 -0
  601. package/dist/src/db-test.d.ts +13 -0
  602. package/dist/src/db-test.d.ts.map +1 -0
  603. package/dist/src/db-test.js +55 -0
  604. package/dist/src/db-test.js.map +1 -0
  605. package/dist/src/db-unified.d.ts +76 -0
  606. package/dist/src/db-unified.d.ts.map +1 -0
  607. package/dist/src/db-unified.js +279 -0
  608. package/dist/src/db-unified.js.map +1 -0
  609. package/dist/src/examples/quic-sync-example.d.ts +9 -0
  610. package/dist/src/examples/quic-sync-example.d.ts.map +1 -0
  611. package/dist/src/examples/quic-sync-example.js +169 -0
  612. package/dist/src/examples/quic-sync-example.js.map +1 -0
  613. package/dist/src/examples/wasm-vector-usage.d.ts +12 -0
  614. package/dist/src/examples/wasm-vector-usage.d.ts.map +1 -0
  615. package/dist/src/examples/wasm-vector-usage.js +190 -0
  616. package/dist/src/examples/wasm-vector-usage.js.map +1 -0
  617. package/dist/src/index.d.ts +28 -0
  618. package/dist/src/index.d.ts.map +1 -0
  619. package/dist/src/index.js +35 -0
  620. package/dist/src/index.js.map +1 -0
  621. package/dist/src/mcp/agentdb-mcp-server.d.ts +8 -0
  622. package/dist/src/mcp/agentdb-mcp-server.d.ts.map +1 -0
  623. package/dist/src/mcp/agentdb-mcp-server.js +2116 -0
  624. package/dist/src/mcp/agentdb-mcp-server.js.map +1 -0
  625. package/dist/src/mcp/learning-tools-handlers.d.ts +16 -0
  626. package/dist/src/mcp/learning-tools-handlers.d.ts.map +1 -0
  627. package/dist/src/mcp/learning-tools-handlers.js +105 -0
  628. package/dist/src/mcp/learning-tools-handlers.js.map +1 -0
  629. package/dist/src/optimizations/BatchOperations.d.ts +109 -0
  630. package/dist/src/optimizations/BatchOperations.d.ts.map +1 -0
  631. package/dist/src/optimizations/BatchOperations.js +407 -0
  632. package/dist/src/optimizations/BatchOperations.js.map +1 -0
  633. package/dist/src/optimizations/QueryOptimizer.d.ts +83 -0
  634. package/dist/src/optimizations/QueryOptimizer.d.ts.map +1 -0
  635. package/dist/src/optimizations/QueryOptimizer.js +228 -0
  636. package/dist/src/optimizations/QueryOptimizer.js.map +1 -0
  637. package/dist/src/optimizations/ToolCache.d.ts +137 -0
  638. package/dist/src/optimizations/ToolCache.d.ts.map +1 -0
  639. package/dist/src/optimizations/ToolCache.js +281 -0
  640. package/dist/src/optimizations/ToolCache.js.map +1 -0
  641. package/dist/src/optimizations/index.d.ts +10 -0
  642. package/dist/src/optimizations/index.d.ts.map +1 -0
  643. package/dist/src/optimizations/index.js +8 -0
  644. package/dist/src/optimizations/index.js.map +1 -0
  645. package/dist/src/security/input-validation.d.ts +109 -0
  646. package/dist/src/security/input-validation.d.ts.map +1 -0
  647. package/dist/src/security/input-validation.js +398 -0
  648. package/dist/src/security/input-validation.js.map +1 -0
  649. package/dist/src/security/limits.d.ts +150 -0
  650. package/dist/src/security/limits.d.ts.map +1 -0
  651. package/dist/src/security/limits.js +288 -0
  652. package/dist/src/security/limits.js.map +1 -0
  653. package/dist/src/security/path-security.d.ts +100 -0
  654. package/dist/src/security/path-security.d.ts.map +1 -0
  655. package/dist/src/security/path-security.js +337 -0
  656. package/dist/src/security/path-security.js.map +1 -0
  657. package/dist/src/security/validation.d.ts +95 -0
  658. package/dist/src/security/validation.d.ts.map +1 -0
  659. package/dist/src/security/validation.js +315 -0
  660. package/dist/src/security/validation.js.map +1 -0
  661. package/dist/src/services/LLMRouter.d.ts +84 -0
  662. package/dist/src/services/LLMRouter.d.ts.map +1 -0
  663. package/dist/src/services/LLMRouter.js +329 -0
  664. package/dist/src/services/LLMRouter.js.map +1 -0
  665. package/dist/src/types/quic.d.ts +518 -0
  666. package/dist/src/types/quic.d.ts.map +1 -0
  667. package/dist/src/types/quic.js +272 -0
  668. package/dist/src/types/quic.js.map +1 -0
  669. package/dist/src/utils/NodeIdMapper.d.ts +38 -0
  670. package/dist/src/utils/NodeIdMapper.d.ts.map +1 -0
  671. package/dist/src/utils/NodeIdMapper.js +57 -0
  672. package/dist/src/utils/NodeIdMapper.js.map +1 -0
  673. package/package.json +15 -3
  674. package/scripts/README.md +314 -0
  675. package/src/backends/GraphBackend.ts +290 -0
  676. package/src/backends/LearningBackend.ts +210 -0
  677. package/src/backends/README.md +389 -0
  678. package/src/backends/VectorBackend.ts +145 -0
  679. package/src/backends/detector.ts +283 -0
  680. package/src/backends/factory.ts +193 -0
  681. package/src/backends/graph/GraphDatabaseAdapter.ts +334 -0
  682. package/src/backends/hnswlib/HNSWLibBackend.ts +413 -0
  683. package/src/backends/hnswlib/index.ts +7 -0
  684. package/src/backends/index.ts +32 -0
  685. package/src/backends/ruvector/RuVectorBackend.ts +232 -0
  686. package/src/backends/ruvector/RuVectorLearning.ts +242 -0
  687. package/src/backends/ruvector/index.ts +9 -0
  688. package/src/backends/ruvector/types.d.ts +64 -0
  689. package/src/browser/AdvancedFeatures.ts +565 -0
  690. package/src/browser/HNSWIndex.ts +494 -0
  691. package/src/browser/ProductQuantization.ts +419 -0
  692. package/src/browser/index.ts +301 -0
  693. package/src/cli/agentdb-cli.ts +131 -8
  694. package/src/cli/commands/init.ts +148 -0
  695. package/src/cli/commands/install-embeddings.ts +81 -0
  696. package/src/cli/commands/migrate.ts +545 -0
  697. package/src/cli/commands/simulate-custom.ts +232 -0
  698. package/src/cli/commands/simulate-report.ts +171 -0
  699. package/src/cli/commands/simulate-wizard.ts +379 -0
  700. package/src/cli/commands/simulate.ts +115 -0
  701. package/src/cli/commands/status.ts +156 -0
  702. package/src/cli/lib/config-manager.ts +627 -0
  703. package/src/cli/lib/config-validator.ts +261 -0
  704. package/src/cli/lib/health-monitor.ts +513 -0
  705. package/src/cli/lib/help-formatter.ts +406 -0
  706. package/src/cli/lib/history-tracker.ts +497 -0
  707. package/src/cli/lib/report-generator.ts +455 -0
  708. package/src/cli/lib/report-store.ts +582 -0
  709. package/src/cli/lib/simulation-registry.ts +502 -0
  710. package/src/cli/lib/simulation-runner.ts +291 -0
  711. package/src/cli/tests/agentdb-cli.test.ts +58 -0
  712. package/src/controllers/CausalMemoryGraph.ts +42 -2
  713. package/src/controllers/CausalRecall.ts +41 -4
  714. package/src/controllers/ExplainableRecall.ts +123 -5
  715. package/src/controllers/HNSWIndex.ts +495 -0
  716. package/src/controllers/NightlyLearner.ts +8 -4
  717. package/src/controllers/ReasoningBank.ts +268 -5
  718. package/src/controllers/ReflexionMemory.ts +531 -6
  719. package/src/controllers/SkillLibrary.ts +234 -60
  720. package/src/controllers/index.ts +2 -0
  721. package/src/db-fallback.ts +103 -35
  722. package/src/db-test.ts +59 -0
  723. package/src/db-unified.ts +327 -0
  724. package/src/index.ts +2 -1
  725. package/src/mcp/agentdb-mcp-server.ts +544 -38
  726. package/src/optimizations/BatchOperations.ts +270 -0
  727. package/src/optimizations/ToolCache.ts +355 -0
  728. package/src/security/input-validation.ts +166 -0
  729. package/src/security/limits.ts +375 -0
  730. package/src/security/path-security.ts +436 -0
  731. package/src/security/validation.ts +556 -0
  732. package/src/services/LLMRouter.ts +406 -0
  733. package/src/types/xenova-transformers.d.ts +26 -0
  734. package/src/utils/NodeIdMapper.ts +64 -0
@@ -0,0 +1,7 @@
1
+ /**
2
+ * HNSWLib Backend Exports
3
+ *
4
+ * Export HNSWLibBackend adapter for hnswlib-node integration
5
+ */
6
+ export { HNSWLibBackend } from './HNSWLibBackend.js';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/backends/hnswlib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * AgentDB Backends - Unified Vector Storage Interface
3
+ *
4
+ * Provides automatic backend selection between RuVector and HNSWLib
5
+ * with graceful fallback and clear error messages.
6
+ */
7
+ export type { VectorBackend, VectorConfig, SearchResult, SearchOptions, VectorStats } from './VectorBackend.js';
8
+ export { RuVectorBackend } from './ruvector/RuVectorBackend.js';
9
+ export { RuVectorLearning } from './ruvector/RuVectorLearning.js';
10
+ export { HNSWLibBackend } from './hnswlib/HNSWLibBackend.js';
11
+ export { createBackend, detectBackends, getRecommendedBackend, isBackendAvailable, getInstallCommand } from './factory.js';
12
+ export type { BackendType, BackendDetection } from './factory.js';
13
+ export type { LearningConfig, EnhancementOptions } from './ruvector/RuVectorLearning.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backends/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAG7D,OAAO,EACL,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * AgentDB Backends - Unified Vector Storage Interface
3
+ *
4
+ * Provides automatic backend selection between RuVector and HNSWLib
5
+ * with graceful fallback and clear error messages.
6
+ */
7
+ // Backend implementations
8
+ export { RuVectorBackend } from './ruvector/RuVectorBackend.js';
9
+ export { RuVectorLearning } from './ruvector/RuVectorLearning.js';
10
+ export { HNSWLibBackend } from './hnswlib/HNSWLibBackend.js';
11
+ // Factory and detection
12
+ export { createBackend, detectBackends, getRecommendedBackend, isBackendAvailable, getInstallCommand } from './factory.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/backends/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,0BAA0B;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,wBAAwB;AACxB,OAAO,EACL,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * RuVectorBackend - High-Performance Vector Storage
3
+ *
4
+ * Implements VectorBackend using @ruvector/core with optional GNN support.
5
+ * Provides <100µs search latency with native SIMD optimizations.
6
+ *
7
+ * Features:
8
+ * - Automatic fallback when @ruvector packages not installed
9
+ * - Separate metadata storage for rich queries
10
+ * - Distance-to-similarity conversion for all metrics
11
+ * - Batch operations for optimal throughput
12
+ * - Persistent storage with separate metadata files
13
+ */
14
+ import type { VectorBackend, VectorConfig, SearchResult, SearchOptions, VectorStats } from '../VectorBackend.js';
15
+ export declare class RuVectorBackend implements VectorBackend {
16
+ readonly name: "ruvector";
17
+ private db;
18
+ private config;
19
+ private metadata;
20
+ private initialized;
21
+ constructor(config: VectorConfig);
22
+ /**
23
+ * Initialize RuVector database with optional dependency handling
24
+ */
25
+ initialize(): Promise<void>;
26
+ /**
27
+ * Insert single vector with optional metadata
28
+ */
29
+ insert(id: string, embedding: Float32Array, metadata?: Record<string, any>): void;
30
+ /**
31
+ * Batch insert for optimal performance
32
+ */
33
+ insertBatch(items: Array<{
34
+ id: string;
35
+ embedding: Float32Array;
36
+ metadata?: Record<string, any>;
37
+ }>): void;
38
+ /**
39
+ * Search for k-nearest neighbors with optional filtering
40
+ */
41
+ search(query: Float32Array, k: number, options?: SearchOptions): SearchResult[];
42
+ /**
43
+ * Remove vector by ID
44
+ */
45
+ remove(id: string): boolean;
46
+ /**
47
+ * Get database statistics
48
+ */
49
+ getStats(): VectorStats;
50
+ /**
51
+ * Save index and metadata to disk
52
+ */
53
+ save(path: string): Promise<void>;
54
+ /**
55
+ * Load index and metadata from disk
56
+ */
57
+ load(path: string): Promise<void>;
58
+ /**
59
+ * Close and cleanup resources
60
+ */
61
+ close(): void;
62
+ /**
63
+ * Convert distance to similarity score based on metric
64
+ *
65
+ * Cosine: distance is already in [0, 2], where 0 = identical
66
+ * L2: exponential decay for unbounded distances
67
+ * IP: negative inner product, so negate for similarity
68
+ */
69
+ private distanceToSimilarity;
70
+ /**
71
+ * Ensure database is initialized before operations
72
+ */
73
+ private ensureInitialized;
74
+ }
75
+ //# sourceMappingURL=RuVectorBackend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RuVectorBackend.d.ts","sourceRoot":"","sources":["../../../../src/backends/ruvector/RuVectorBackend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEjH,qBAAa,eAAgB,YAAW,aAAa;IACnD,QAAQ,CAAC,IAAI,EAAG,UAAU,CAAU;IACpC,OAAO,CAAC,EAAE,CAAM;IAChB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,QAAQ,CAA+C;IAC/D,OAAO,CAAC,WAAW,CAAS;gBAEhB,MAAM,EAAE,YAAY;IAIhC;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAgCjC;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAWjF;;OAEG;IACH,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,YAAY,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KAAE,CAAC,GAAG,IAAI;IAQxG;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,YAAY,EAAE;IAoC/E;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAY3B;;OAEG;IACH,QAAQ,IAAI,WAAW;IAYvB;;OAEG;IACG,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAevC;;OAEG;IACG,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBvC;;OAEG;IACH,KAAK,IAAI,IAAI;IAKb;;;;;;OAMG;IACH,OAAO,CAAC,oBAAoB;IAa5B;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAK1B"}
@@ -0,0 +1,198 @@
1
+ /**
2
+ * RuVectorBackend - High-Performance Vector Storage
3
+ *
4
+ * Implements VectorBackend using @ruvector/core with optional GNN support.
5
+ * Provides <100µs search latency with native SIMD optimizations.
6
+ *
7
+ * Features:
8
+ * - Automatic fallback when @ruvector packages not installed
9
+ * - Separate metadata storage for rich queries
10
+ * - Distance-to-similarity conversion for all metrics
11
+ * - Batch operations for optimal throughput
12
+ * - Persistent storage with separate metadata files
13
+ */
14
+ export class RuVectorBackend {
15
+ name = 'ruvector';
16
+ db; // VectorDB from @ruvector/core
17
+ config;
18
+ metadata = new Map();
19
+ initialized = false;
20
+ constructor(config) {
21
+ this.config = config;
22
+ }
23
+ /**
24
+ * Initialize RuVector database with optional dependency handling
25
+ */
26
+ async initialize() {
27
+ if (this.initialized)
28
+ return;
29
+ try {
30
+ // Try main ruvector package first (includes core, gnn, graph)
31
+ let VectorDB;
32
+ try {
33
+ const ruvector = await import('ruvector');
34
+ VectorDB = ruvector.VectorDB || ruvector.default?.VectorDB;
35
+ }
36
+ catch {
37
+ // Fallback to @ruvector/core for backward compatibility
38
+ const core = await import('@ruvector/core');
39
+ VectorDB = core.VectorDB || core.default;
40
+ }
41
+ this.db = new VectorDB(this.config.dimension, {
42
+ metric: this.config.metric,
43
+ maxElements: this.config.maxElements || 100000,
44
+ efConstruction: this.config.efConstruction || 200,
45
+ M: this.config.M || 16
46
+ });
47
+ this.initialized = true;
48
+ }
49
+ catch (error) {
50
+ throw new Error(`RuVector initialization failed. Please install: npm install ruvector\n` +
51
+ `Or legacy packages: npm install @ruvector/core\n` +
52
+ `Error: ${error.message}`);
53
+ }
54
+ }
55
+ /**
56
+ * Insert single vector with optional metadata
57
+ */
58
+ insert(id, embedding, metadata) {
59
+ this.ensureInitialized();
60
+ // RuVector expects regular arrays
61
+ this.db.insert(id, Array.from(embedding));
62
+ if (metadata) {
63
+ this.metadata.set(id, metadata);
64
+ }
65
+ }
66
+ /**
67
+ * Batch insert for optimal performance
68
+ */
69
+ insertBatch(items) {
70
+ this.ensureInitialized();
71
+ for (const item of items) {
72
+ this.insert(item.id, item.embedding, item.metadata);
73
+ }
74
+ }
75
+ /**
76
+ * Search for k-nearest neighbors with optional filtering
77
+ */
78
+ search(query, k, options) {
79
+ this.ensureInitialized();
80
+ // Apply efSearch parameter if provided
81
+ if (options?.efSearch) {
82
+ this.db.setEfSearch(options.efSearch);
83
+ }
84
+ // Perform vector search
85
+ const results = this.db.search(Array.from(query), k);
86
+ // Convert results and apply filtering
87
+ return results
88
+ .map((r) => ({
89
+ id: r.id,
90
+ distance: r.distance,
91
+ similarity: this.distanceToSimilarity(r.distance),
92
+ metadata: this.metadata.get(r.id)
93
+ }))
94
+ .filter((r) => {
95
+ // Apply similarity threshold
96
+ if (options?.threshold && r.similarity < options.threshold) {
97
+ return false;
98
+ }
99
+ // Apply metadata filters
100
+ if (options?.filter && r.metadata) {
101
+ return Object.entries(options.filter).every(([key, value]) => r.metadata[key] === value);
102
+ }
103
+ return true;
104
+ });
105
+ }
106
+ /**
107
+ * Remove vector by ID
108
+ */
109
+ remove(id) {
110
+ this.ensureInitialized();
111
+ this.metadata.delete(id);
112
+ try {
113
+ return this.db.remove(id);
114
+ }
115
+ catch {
116
+ return false;
117
+ }
118
+ }
119
+ /**
120
+ * Get database statistics
121
+ */
122
+ getStats() {
123
+ this.ensureInitialized();
124
+ return {
125
+ count: this.db.count(),
126
+ dimension: this.config.dimension,
127
+ metric: this.config.metric,
128
+ backend: 'ruvector',
129
+ memoryUsage: this.db.memoryUsage?.() || 0
130
+ };
131
+ }
132
+ /**
133
+ * Save index and metadata to disk
134
+ */
135
+ async save(path) {
136
+ this.ensureInitialized();
137
+ // Save vector index
138
+ this.db.save(path);
139
+ // Save metadata separately as JSON
140
+ const metadataPath = path + '.meta.json';
141
+ const fs = await import('fs/promises');
142
+ await fs.writeFile(metadataPath, JSON.stringify(Object.fromEntries(this.metadata), null, 2));
143
+ }
144
+ /**
145
+ * Load index and metadata from disk
146
+ */
147
+ async load(path) {
148
+ this.ensureInitialized();
149
+ // Load vector index
150
+ this.db.load(path);
151
+ // Load metadata
152
+ const metadataPath = path + '.meta.json';
153
+ try {
154
+ const fs = await import('fs/promises');
155
+ const data = await fs.readFile(metadataPath, 'utf-8');
156
+ this.metadata = new Map(Object.entries(JSON.parse(data)));
157
+ }
158
+ catch {
159
+ // No metadata file - this is okay for backward compatibility
160
+ console.debug(`[RuVectorBackend] No metadata file found at ${metadataPath}`);
161
+ }
162
+ }
163
+ /**
164
+ * Close and cleanup resources
165
+ */
166
+ close() {
167
+ // RuVector cleanup if needed
168
+ this.metadata.clear();
169
+ }
170
+ /**
171
+ * Convert distance to similarity score based on metric
172
+ *
173
+ * Cosine: distance is already in [0, 2], where 0 = identical
174
+ * L2: exponential decay for unbounded distances
175
+ * IP: negative inner product, so negate for similarity
176
+ */
177
+ distanceToSimilarity(distance) {
178
+ switch (this.config.metric) {
179
+ case 'cosine':
180
+ return 1 - distance; // cosine distance is 1 - similarity
181
+ case 'l2':
182
+ return Math.exp(-distance); // exponential decay
183
+ case 'ip':
184
+ return -distance; // inner product: higher is better
185
+ default:
186
+ return 1 - distance;
187
+ }
188
+ }
189
+ /**
190
+ * Ensure database is initialized before operations
191
+ */
192
+ ensureInitialized() {
193
+ if (!this.initialized) {
194
+ throw new Error('RuVectorBackend not initialized. Call initialize() first.');
195
+ }
196
+ }
197
+ }
198
+ //# sourceMappingURL=RuVectorBackend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RuVectorBackend.js","sourceRoot":"","sources":["../../../../src/backends/ruvector/RuVectorBackend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,MAAM,OAAO,eAAe;IACjB,IAAI,GAAG,UAAmB,CAAC;IAC5B,EAAE,CAAM,CAAC,+BAA+B;IACxC,MAAM,CAAe;IACrB,QAAQ,GAAqC,IAAI,GAAG,EAAE,CAAC;IACvD,WAAW,GAAG,KAAK,CAAC;IAE5B,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU;QACd,IAAI,IAAI,CAAC,WAAW;YAAE,OAAO;QAE7B,IAAI,CAAC;YACH,8DAA8D;YAC9D,IAAI,QAAQ,CAAC;YACb,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;gBAC1C,QAAQ,GAAG,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;YAC7D,CAA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2D,CAAC,CAAC;QAC/E,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,104 @@
1
+ /**
2
+ * RuVectorLearning - GNN-Enhanced Vector Search
3
+ *
4
+ * Integrates Graph Neural Networks for query enhancement using @ruvector/gnn.
5
+ * Requires optional @ruvector/gnn package.
6
+ *
7
+ * Features:
8
+ * - Query enhancement using neighbor context with multi-head attention
9
+ * - Differentiable search with soft weights
10
+ * - Hierarchical forward pass through GNN layers
11
+ * - Graceful degradation when GNN not available
12
+ *
13
+ * Note: @ruvector/gnn provides stateless GNN layers (inference only).
14
+ * Training is handled separately by the consuming application.
15
+ */
16
+ export interface LearningConfig {
17
+ inputDim: number;
18
+ hiddenDim: number;
19
+ heads: number;
20
+ dropout?: number;
21
+ }
22
+ export interface EnhancementOptions {
23
+ temperature?: number;
24
+ k?: number;
25
+ }
26
+ export declare class RuVectorLearning {
27
+ private gnnLayer;
28
+ private config;
29
+ private initialized;
30
+ private differentiableSearch;
31
+ private hierarchicalForward;
32
+ constructor(config: LearningConfig);
33
+ /**
34
+ * Initialize GNN layer with optional dependency handling
35
+ */
36
+ initialize(): Promise<void>;
37
+ /**
38
+ * Enhance query embedding using neighbor context
39
+ *
40
+ * Uses Graph Attention Network to aggregate information from
41
+ * nearest neighbors, weighted by their relevance scores.
42
+ *
43
+ * @param query - Query embedding to enhance
44
+ * @param neighbors - Neighbor embeddings
45
+ * @param weights - Edge weights (relevance scores)
46
+ * @returns Enhanced query embedding
47
+ */
48
+ enhance(query: Float32Array, neighbors: Float32Array[], weights: number[]): Float32Array;
49
+ /**
50
+ * Differentiable search with soft attention
51
+ *
52
+ * Uses soft attention mechanism instead of hard top-k selection.
53
+ * Returns indices and weights that can be used for gradient-based optimization.
54
+ *
55
+ * @param query - Query embedding
56
+ * @param candidates - Candidate embeddings
57
+ * @param options - Search options
58
+ * @returns Search result with indices and soft weights
59
+ */
60
+ search(query: Float32Array, candidates: Float32Array[], options?: EnhancementOptions): {
61
+ indices: number[];
62
+ weights: number[];
63
+ };
64
+ /**
65
+ * Hierarchical forward pass through multiple GNN layers
66
+ *
67
+ * Used for HNSW-style hierarchical search where embeddings
68
+ * are organized by graph layers.
69
+ *
70
+ * @param query - Query embedding
71
+ * @param layerEmbeddings - Embeddings organized by layer
72
+ * @returns Final enhanced embedding
73
+ */
74
+ enhanceHierarchical(query: Float32Array, layerEmbeddings: Float32Array[][]): Float32Array;
75
+ /**
76
+ * Serialize GNN layer to JSON
77
+ *
78
+ * Allows saving/loading the GNN layer configuration.
79
+ *
80
+ * @returns JSON string representation
81
+ */
82
+ toJson(): string;
83
+ /**
84
+ * Create GNN layer from JSON
85
+ *
86
+ * @param json - JSON string from toJson()
87
+ * @returns New RuVectorLearning instance
88
+ */
89
+ static fromJson(json: string, config: LearningConfig): Promise<RuVectorLearning>;
90
+ /**
91
+ * Get current state
92
+ */
93
+ getState(): {
94
+ initialized: boolean;
95
+ config: LearningConfig;
96
+ hiddenDim: number;
97
+ heads: number;
98
+ };
99
+ /**
100
+ * Ensure GNN is initialized before operations
101
+ */
102
+ private ensureInitialized;
103
+ }
104
+ //# sourceMappingURL=RuVectorLearning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RuVectorLearning.d.ts","sourceRoot":"","sources":["../../../../src/backends/ruvector/RuVectorLearning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAM;IACtB,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,oBAAoB,CAAM;IAClC,OAAO,CAAC,mBAAmB,CAAM;gBAErB,MAAM,EAAE,cAAc;IAOlC;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IA0BjC;;;;;;;;;;OAUG;IACH,OAAO,CACL,KAAK,EAAE,YAAY,EACnB,SAAS,EAAE,YAAY,EAAE,EACzB,OAAO,EAAE,MAAM,EAAE,GAChB,YAAY;IAsBf;;;;;;;;;;OAUG;IACH,MAAM,CACJ,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,YAAY,EAAE,EAC1B,OAAO,GAAE,kBAAuB,GAC/B;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE;IAyB3C;;;;;;;;;OASG;IACH,mBAAmB,CACjB,KAAK,EAAE,YAAY,EACnB,eAAe,EAAE,YAAY,EAAE,EAAE,GAChC,YAAY;IAwBf;;;;;;OAMG;IACH,MAAM,IAAI,MAAM;IAKhB;;;;;OAKG;WACU,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAatF;;OAEG;IACH,QAAQ,IAAI;QACV,WAAW,EAAE,OAAO,CAAC;QACrB,MAAM,EAAE,cAAc,CAAC;QACvB,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;KACf;IASD;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAK1B"}
@@ -0,0 +1,177 @@
1
+ /**
2
+ * RuVectorLearning - GNN-Enhanced Vector Search
3
+ *
4
+ * Integrates Graph Neural Networks for query enhancement using @ruvector/gnn.
5
+ * Requires optional @ruvector/gnn package.
6
+ *
7
+ * Features:
8
+ * - Query enhancement using neighbor context with multi-head attention
9
+ * - Differentiable search with soft weights
10
+ * - Hierarchical forward pass through GNN layers
11
+ * - Graceful degradation when GNN not available
12
+ *
13
+ * Note: @ruvector/gnn provides stateless GNN layers (inference only).
14
+ * Training is handled separately by the consuming application.
15
+ */
16
+ export class RuVectorLearning {
17
+ gnnLayer; // RuvectorLayer from @ruvector/gnn
18
+ config;
19
+ initialized = false;
20
+ differentiableSearch;
21
+ hierarchicalForward;
22
+ constructor(config) {
23
+ this.config = {
24
+ ...config,
25
+ dropout: config.dropout ?? 0.1,
26
+ };
27
+ }
28
+ /**
29
+ * Initialize GNN layer with optional dependency handling
30
+ */
31
+ async initialize() {
32
+ if (this.initialized)
33
+ return;
34
+ try {
35
+ // Dynamic import with runtime property access
36
+ const gnnModule = await import('@ruvector/gnn');
37
+ this.gnnLayer = new gnnModule.RuvectorLayer(this.config.inputDim, this.config.hiddenDim, this.config.heads, this.config.dropout);
38
+ this.differentiableSearch = gnnModule.differentiableSearch;
39
+ this.hierarchicalForward = gnnModule.hierarchicalForward;
40
+ this.initialized = true;
41
+ }
42
+ catch (error) {
43
+ throw new Error(`GNN initialization failed. Please install: npm install @ruvector/gnn\n` +
44
+ `Error: ${error.message}`);
45
+ }
46
+ }
47
+ /**
48
+ * Enhance query embedding using neighbor context
49
+ *
50
+ * Uses Graph Attention Network to aggregate information from
51
+ * nearest neighbors, weighted by their relevance scores.
52
+ *
53
+ * @param query - Query embedding to enhance
54
+ * @param neighbors - Neighbor embeddings
55
+ * @param weights - Edge weights (relevance scores)
56
+ * @returns Enhanced query embedding
57
+ */
58
+ enhance(query, neighbors, weights) {
59
+ this.ensureInitialized();
60
+ if (neighbors.length === 0) {
61
+ return query;
62
+ }
63
+ try {
64
+ // Forward pass through GNN layer
65
+ const result = this.gnnLayer.forward(Array.from(query), neighbors.map(n => Array.from(n)), weights);
66
+ return new Float32Array(result);
67
+ }
68
+ catch (error) {
69
+ console.warn(`[RuVectorLearning] Enhancement failed: ${error.message}`);
70
+ return query;
71
+ }
72
+ }
73
+ /**
74
+ * Differentiable search with soft attention
75
+ *
76
+ * Uses soft attention mechanism instead of hard top-k selection.
77
+ * Returns indices and weights that can be used for gradient-based optimization.
78
+ *
79
+ * @param query - Query embedding
80
+ * @param candidates - Candidate embeddings
81
+ * @param options - Search options
82
+ * @returns Search result with indices and soft weights
83
+ */
84
+ search(query, candidates, options = {}) {
85
+ this.ensureInitialized();
86
+ const k = options.k ?? Math.min(5, candidates.length);
87
+ const temperature = options.temperature ?? 1.0;
88
+ try {
89
+ const result = this.differentiableSearch(Array.from(query), candidates.map(c => Array.from(c)), k, temperature);
90
+ return result;
91
+ }
92
+ catch (error) {
93
+ console.warn(`[RuVectorLearning] Differentiable search failed: ${error.message}`);
94
+ // Fallback: return top-k indices with uniform weights
95
+ return {
96
+ indices: Array.from({ length: k }, (_, i) => i),
97
+ weights: Array.from({ length: k }, () => 1.0 / k)
98
+ };
99
+ }
100
+ }
101
+ /**
102
+ * Hierarchical forward pass through multiple GNN layers
103
+ *
104
+ * Used for HNSW-style hierarchical search where embeddings
105
+ * are organized by graph layers.
106
+ *
107
+ * @param query - Query embedding
108
+ * @param layerEmbeddings - Embeddings organized by layer
109
+ * @returns Final enhanced embedding
110
+ */
111
+ enhanceHierarchical(query, layerEmbeddings) {
112
+ this.ensureInitialized();
113
+ if (layerEmbeddings.length === 0) {
114
+ return query;
115
+ }
116
+ try {
117
+ // Serialize GNN layer for hierarchical processing
118
+ const layerJson = this.gnnLayer.toJson();
119
+ const result = this.hierarchicalForward(Array.from(query), layerEmbeddings.map(layer => layer.map(e => Array.from(e))), [layerJson] // Single layer for now
120
+ );
121
+ return new Float32Array(result);
122
+ }
123
+ catch (error) {
124
+ console.warn(`[RuVectorLearning] Hierarchical enhancement failed: ${error.message}`);
125
+ return query;
126
+ }
127
+ }
128
+ /**
129
+ * Serialize GNN layer to JSON
130
+ *
131
+ * Allows saving/loading the GNN layer configuration.
132
+ *
133
+ * @returns JSON string representation
134
+ */
135
+ toJson() {
136
+ this.ensureInitialized();
137
+ return this.gnnLayer.toJson();
138
+ }
139
+ /**
140
+ * Create GNN layer from JSON
141
+ *
142
+ * @param json - JSON string from toJson()
143
+ * @returns New RuVectorLearning instance
144
+ */
145
+ static async fromJson(json, config) {
146
+ const learning = new RuVectorLearning(config);
147
+ await learning.initialize();
148
+ try {
149
+ const gnnModule = await import('@ruvector/gnn');
150
+ learning.gnnLayer = gnnModule.RuvectorLayer.fromJson(json);
151
+ return learning;
152
+ }
153
+ catch (error) {
154
+ throw new Error(`Failed to load GNN from JSON: ${error.message}`);
155
+ }
156
+ }
157
+ /**
158
+ * Get current state
159
+ */
160
+ getState() {
161
+ return {
162
+ initialized: this.initialized,
163
+ config: this.config,
164
+ hiddenDim: this.config.hiddenDim,
165
+ heads: this.config.heads,
166
+ };
167
+ }
168
+ /**
169
+ * Ensure GNN is initialized before operations
170
+ */
171
+ ensureInitialized() {
172
+ if (!this.initialized) {
173
+ throw new Error('RuVectorLearning not initialized. Call initialize() first.');
174
+ }
175
+ }
176
+ }
177
+ //# sourceMappingURL=RuVectorLearning.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RuVectorLearning.js","sourceRoot":"","sources":["../../../../src/backends/ruvector/RuVectorLearning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAcH,MAAM,OAAO,gBAAgB;IACnB,QAAQ,CAAM,CAAE,mCAAmC;IACnD,MAAM,CAAiB;IACvB,WAAW,GAAG,KAAK,CAAC;IACpB,oBAAoB,CAAM;IAC1B,mBAAmB,CAAM;IAEjC,YAAY,MAAsB;QAChC,IAAI,CAAC,MAAM,GAAG;YACZ,GAAG,MAAM;YACT,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,GAAG;SAC/B,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU;QACd,IAAI,IAAI,CAAC,WAAW;YAAE,OAAO;QAE7B,IAAI,CAAC;YACH,8CAA8C;YAC9C,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,eAAe,CAAQ,CAAC;YAEvD,IAAI,CAAC,QAAQ,GAAG,IAAI,SAAS,CAAC,aAAa,CACzC,IAA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,SAAS;YAChC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;SACzB,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,iBAAiB;QACvB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * RuVector Backend - Exports
3
+ *
4
+ * High-performance vector storage with optional GNN learning.
5
+ */
6
+ export { RuVectorBackend } from './RuVectorBackend.js';
7
+ export { RuVectorLearning } from './RuVectorLearning.js';
8
+ export type { LearningConfig, EnhancementOptions } from './RuVectorLearning.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/backends/ruvector/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * RuVector Backend - Exports
3
+ *
4
+ * High-performance vector storage with optional GNN learning.
5
+ */
6
+ export { RuVectorBackend } from './RuVectorBackend.js';
7
+ export { RuVectorLearning } from './RuVectorLearning.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/backends/ruvector/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * WASM Vector Operations Benchmark
3
+ *
4
+ * Measures actual performance improvements of WASM-accelerated vector operations
5
+ * compared to pure JavaScript implementations.
6
+ *
7
+ * Run with: npx tsx src/benchmarks/wasm-vector-benchmark.ts
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=wasm-vector-benchmark.d.ts.map