agentic-qe 1.0.0 → 1.0.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 (796) hide show
  1. package/.claude/aqe-fleet.json +3 -3
  2. package/CHANGELOG.md +239 -0
  3. package/README.md +14 -1
  4. package/dist/agents/ApiContractValidatorAgent.d.ts.map +1 -1
  5. package/dist/agents/ApiContractValidatorAgent.js +1 -1
  6. package/dist/agents/ApiContractValidatorAgent.js.map +1 -1
  7. package/dist/agents/BaseAgent.d.ts.map +1 -1
  8. package/dist/agents/BaseAgent.js +16 -0
  9. package/dist/agents/BaseAgent.js.map +1 -1
  10. package/dist/agents/CoverageAnalyzerAgent.d.ts.map +1 -1
  11. package/dist/agents/CoverageAnalyzerAgent.js +12 -8
  12. package/dist/agents/CoverageAnalyzerAgent.js.map +1 -1
  13. package/dist/agents/SecurityScannerAgent.d.ts +1 -0
  14. package/dist/agents/SecurityScannerAgent.d.ts.map +1 -1
  15. package/dist/agents/SecurityScannerAgent.js +46 -41
  16. package/dist/agents/SecurityScannerAgent.js.map +1 -1
  17. package/dist/agents/TestExecutorAgent.d.ts +1 -1
  18. package/dist/agents/TestExecutorAgent.d.ts.map +1 -1
  19. package/dist/agents/TestExecutorAgent.js +64 -13
  20. package/dist/agents/TestExecutorAgent.js.map +1 -1
  21. package/dist/cli/commands/agent/assign.d.ts +76 -0
  22. package/dist/cli/commands/agent/assign.d.ts.map +1 -0
  23. package/dist/cli/commands/agent/assign.js +280 -0
  24. package/dist/cli/commands/agent/assign.js.map +1 -0
  25. package/dist/cli/commands/agent/attach.d.ts +87 -0
  26. package/dist/cli/commands/agent/attach.d.ts.map +1 -0
  27. package/dist/cli/commands/agent/attach.js +268 -0
  28. package/dist/cli/commands/agent/attach.js.map +1 -0
  29. package/dist/cli/commands/agent/benchmark.d.ts +45 -0
  30. package/dist/cli/commands/agent/benchmark.d.ts.map +1 -0
  31. package/dist/cli/commands/agent/benchmark.js +103 -0
  32. package/dist/cli/commands/agent/benchmark.js.map +1 -0
  33. package/dist/cli/commands/agent/clone.d.ts +20 -0
  34. package/dist/cli/commands/agent/clone.d.ts.map +1 -0
  35. package/dist/cli/commands/agent/clone.js +59 -0
  36. package/dist/cli/commands/agent/clone.js.map +1 -0
  37. package/dist/cli/commands/agent/detach.d.ts +76 -0
  38. package/dist/cli/commands/agent/detach.d.ts.map +1 -0
  39. package/dist/cli/commands/agent/detach.js +250 -0
  40. package/dist/cli/commands/agent/detach.js.map +1 -0
  41. package/dist/cli/commands/agent/index.d.ts +31 -0
  42. package/dist/cli/commands/agent/index.d.ts.map +1 -0
  43. package/dist/cli/commands/agent/index.js +54 -0
  44. package/dist/cli/commands/agent/index.js.map +1 -0
  45. package/dist/cli/commands/agent/inspect.d.ts +110 -0
  46. package/dist/cli/commands/agent/inspect.d.ts.map +1 -0
  47. package/dist/cli/commands/agent/inspect.js +272 -0
  48. package/dist/cli/commands/agent/inspect.js.map +1 -0
  49. package/dist/cli/commands/agent/migrate.d.ts +24 -0
  50. package/dist/cli/commands/agent/migrate.d.ts.map +1 -0
  51. package/dist/cli/commands/agent/migrate.js +81 -0
  52. package/dist/cli/commands/agent/migrate.js.map +1 -0
  53. package/dist/cli/commands/agent/restart.d.ts +71 -0
  54. package/dist/cli/commands/agent/restart.d.ts.map +1 -0
  55. package/dist/cli/commands/agent/restart.js +227 -0
  56. package/dist/cli/commands/agent/restart.js.map +1 -0
  57. package/dist/cli/commands/config/export.d.ts +15 -0
  58. package/dist/cli/commands/config/export.d.ts.map +1 -0
  59. package/dist/cli/commands/config/export.js +94 -0
  60. package/dist/cli/commands/config/export.js.map +1 -0
  61. package/dist/cli/commands/config/get.d.ts +23 -0
  62. package/dist/cli/commands/config/get.d.ts.map +1 -0
  63. package/dist/cli/commands/config/get.js +119 -0
  64. package/dist/cli/commands/config/get.js.map +1 -0
  65. package/dist/cli/commands/config/import.d.ts +17 -0
  66. package/dist/cli/commands/config/import.d.ts.map +1 -0
  67. package/dist/cli/commands/config/import.js +138 -0
  68. package/dist/cli/commands/config/import.js.map +1 -0
  69. package/dist/cli/commands/config/index.d.ts +18 -0
  70. package/dist/cli/commands/config/index.d.ts.map +1 -0
  71. package/dist/cli/commands/config/index.js +35 -0
  72. package/dist/cli/commands/config/index.js.map +1 -0
  73. package/dist/cli/commands/config/init.d.ts +21 -0
  74. package/dist/cli/commands/config/init.d.ts.map +1 -0
  75. package/dist/cli/commands/config/init.js +171 -0
  76. package/dist/cli/commands/config/init.js.map +1 -0
  77. package/dist/cli/commands/config/list.d.ts +5 -0
  78. package/dist/cli/commands/config/list.d.ts.map +1 -0
  79. package/dist/cli/commands/config/list.js +40 -0
  80. package/dist/cli/commands/config/list.js.map +1 -0
  81. package/dist/cli/commands/config/reset.d.ts +5 -0
  82. package/dist/cli/commands/config/reset.d.ts.map +1 -0
  83. package/dist/cli/commands/config/reset.js +45 -0
  84. package/dist/cli/commands/config/reset.js.map +1 -0
  85. package/dist/cli/commands/config/schema.d.ts +115 -0
  86. package/dist/cli/commands/config/schema.d.ts.map +1 -0
  87. package/dist/cli/commands/config/schema.js +98 -0
  88. package/dist/cli/commands/config/schema.js.map +1 -0
  89. package/dist/cli/commands/config/set.d.ts +19 -0
  90. package/dist/cli/commands/config/set.d.ts.map +1 -0
  91. package/dist/cli/commands/config/set.js +133 -0
  92. package/dist/cli/commands/config/set.js.map +1 -0
  93. package/dist/cli/commands/config/validate.d.ts +23 -0
  94. package/dist/cli/commands/config/validate.d.ts.map +1 -0
  95. package/dist/cli/commands/config/validate.js +155 -0
  96. package/dist/cli/commands/config/validate.js.map +1 -0
  97. package/dist/cli/commands/debug/agent.d.ts +40 -0
  98. package/dist/cli/commands/debug/agent.d.ts.map +1 -0
  99. package/dist/cli/commands/debug/agent.js +175 -0
  100. package/dist/cli/commands/debug/agent.js.map +1 -0
  101. package/dist/cli/commands/debug/diagnostics.d.ts +27 -0
  102. package/dist/cli/commands/debug/diagnostics.d.ts.map +1 -0
  103. package/dist/cli/commands/debug/diagnostics.js +377 -0
  104. package/dist/cli/commands/debug/diagnostics.js.map +1 -0
  105. package/dist/cli/commands/debug/health-check.d.ts +38 -0
  106. package/dist/cli/commands/debug/health-check.d.ts.map +1 -0
  107. package/dist/cli/commands/debug/health-check.js +317 -0
  108. package/dist/cli/commands/debug/health-check.js.map +1 -0
  109. package/dist/cli/commands/debug/index.d.ts +17 -0
  110. package/dist/cli/commands/debug/index.d.ts.map +1 -0
  111. package/dist/cli/commands/debug/index.js +20 -0
  112. package/dist/cli/commands/debug/index.js.map +1 -0
  113. package/dist/cli/commands/debug/profile.d.ts +84 -0
  114. package/dist/cli/commands/debug/profile.d.ts.map +1 -0
  115. package/dist/cli/commands/debug/profile.js +366 -0
  116. package/dist/cli/commands/debug/profile.js.map +1 -0
  117. package/dist/cli/commands/debug/trace.d.ts +40 -0
  118. package/dist/cli/commands/debug/trace.d.ts.map +1 -0
  119. package/dist/cli/commands/debug/trace.js +243 -0
  120. package/dist/cli/commands/debug/trace.js.map +1 -0
  121. package/dist/cli/commands/debug/troubleshoot.d.ts +38 -0
  122. package/dist/cli/commands/debug/troubleshoot.d.ts.map +1 -0
  123. package/dist/cli/commands/debug/troubleshoot.js +315 -0
  124. package/dist/cli/commands/debug/troubleshoot.js.map +1 -0
  125. package/dist/cli/commands/fleet/backup.d.ts +49 -0
  126. package/dist/cli/commands/fleet/backup.d.ts.map +1 -0
  127. package/dist/cli/commands/fleet/backup.js +89 -0
  128. package/dist/cli/commands/fleet/backup.js.map +1 -0
  129. package/dist/cli/commands/fleet/health.d.ts +24 -0
  130. package/dist/cli/commands/fleet/health.d.ts.map +1 -0
  131. package/dist/cli/commands/fleet/health.js +407 -0
  132. package/dist/cli/commands/fleet/health.js.map +1 -0
  133. package/dist/cli/commands/fleet/init.d.ts +11 -0
  134. package/dist/cli/commands/fleet/init.d.ts.map +1 -0
  135. package/dist/cli/commands/fleet/init.js +81 -0
  136. package/dist/cli/commands/fleet/init.js.map +1 -0
  137. package/dist/cli/commands/fleet/logs.d.ts +21 -0
  138. package/dist/cli/commands/fleet/logs.d.ts.map +1 -0
  139. package/dist/cli/commands/fleet/logs.js +256 -0
  140. package/dist/cli/commands/fleet/logs.js.map +1 -0
  141. package/dist/cli/commands/fleet/metrics.d.ts +27 -0
  142. package/dist/cli/commands/fleet/metrics.d.ts.map +1 -0
  143. package/dist/cli/commands/fleet/metrics.js +358 -0
  144. package/dist/cli/commands/fleet/metrics.js.map +1 -0
  145. package/dist/cli/commands/fleet/monitor.d.ts +18 -0
  146. package/dist/cli/commands/fleet/monitor.d.ts.map +1 -0
  147. package/dist/cli/commands/fleet/monitor.js +224 -0
  148. package/dist/cli/commands/fleet/monitor.js.map +1 -0
  149. package/dist/cli/commands/fleet/optimize.d.ts +42 -0
  150. package/dist/cli/commands/fleet/optimize.d.ts.map +1 -0
  151. package/dist/cli/commands/fleet/optimize.js +136 -0
  152. package/dist/cli/commands/fleet/optimize.js.map +1 -0
  153. package/dist/cli/commands/fleet/recover.d.ts +22 -0
  154. package/dist/cli/commands/fleet/recover.d.ts.map +1 -0
  155. package/dist/cli/commands/fleet/recover.js +100 -0
  156. package/dist/cli/commands/fleet/recover.js.map +1 -0
  157. package/dist/cli/commands/fleet/restart.d.ts +18 -0
  158. package/dist/cli/commands/fleet/restart.d.ts.map +1 -0
  159. package/dist/cli/commands/fleet/restart.js +280 -0
  160. package/dist/cli/commands/fleet/restart.js.map +1 -0
  161. package/dist/cli/commands/fleet/scale.d.ts +9 -0
  162. package/dist/cli/commands/fleet/scale.d.ts.map +1 -0
  163. package/dist/cli/commands/fleet/scale.js +67 -0
  164. package/dist/cli/commands/fleet/scale.js.map +1 -0
  165. package/dist/cli/commands/fleet/shutdown.d.ts +19 -0
  166. package/dist/cli/commands/fleet/shutdown.d.ts.map +1 -0
  167. package/dist/cli/commands/fleet/shutdown.js +297 -0
  168. package/dist/cli/commands/fleet/shutdown.js.map +1 -0
  169. package/dist/cli/commands/fleet/status.d.ts +10 -0
  170. package/dist/cli/commands/fleet/status.d.ts.map +1 -0
  171. package/dist/cli/commands/fleet/status.js +87 -0
  172. package/dist/cli/commands/fleet/status.js.map +1 -0
  173. package/dist/cli/commands/fleet/topology.d.ts +23 -0
  174. package/dist/cli/commands/fleet/topology.d.ts.map +1 -0
  175. package/dist/cli/commands/fleet/topology.js +365 -0
  176. package/dist/cli/commands/fleet/topology.js.map +1 -0
  177. package/dist/cli/commands/memory/compact.d.ts +19 -0
  178. package/dist/cli/commands/memory/compact.d.ts.map +1 -0
  179. package/dist/cli/commands/memory/compact.js +70 -0
  180. package/dist/cli/commands/memory/compact.js.map +1 -0
  181. package/dist/cli/commands/memory/index.d.ts +9 -0
  182. package/dist/cli/commands/memory/index.d.ts.map +1 -0
  183. package/dist/cli/commands/memory/index.js +25 -0
  184. package/dist/cli/commands/memory/index.js.map +1 -0
  185. package/dist/cli/commands/memory/stats.d.ts +30 -0
  186. package/dist/cli/commands/memory/stats.d.ts.map +1 -0
  187. package/dist/cli/commands/memory/stats.js +74 -0
  188. package/dist/cli/commands/memory/stats.js.map +1 -0
  189. package/dist/cli/commands/memory/vacuum.d.ts +24 -0
  190. package/dist/cli/commands/memory/vacuum.d.ts.map +1 -0
  191. package/dist/cli/commands/memory/vacuum.js +105 -0
  192. package/dist/cli/commands/memory/vacuum.js.map +1 -0
  193. package/dist/cli/commands/monitor/alerts.d.ts +45 -0
  194. package/dist/cli/commands/monitor/alerts.d.ts.map +1 -0
  195. package/dist/cli/commands/monitor/alerts.js +157 -0
  196. package/dist/cli/commands/monitor/alerts.js.map +1 -0
  197. package/dist/cli/commands/monitor/analyze.d.ts +49 -0
  198. package/dist/cli/commands/monitor/analyze.d.ts.map +1 -0
  199. package/dist/cli/commands/monitor/analyze.js +199 -0
  200. package/dist/cli/commands/monitor/analyze.js.map +1 -0
  201. package/dist/cli/commands/monitor/compare.d.ts +38 -0
  202. package/dist/cli/commands/monitor/compare.d.ts.map +1 -0
  203. package/dist/cli/commands/monitor/compare.js +167 -0
  204. package/dist/cli/commands/monitor/compare.js.map +1 -0
  205. package/dist/cli/commands/monitor/dashboard.d.ts +34 -0
  206. package/dist/cli/commands/monitor/dashboard.d.ts.map +1 -0
  207. package/dist/cli/commands/monitor/dashboard.js +147 -0
  208. package/dist/cli/commands/monitor/dashboard.js.map +1 -0
  209. package/dist/cli/commands/monitor/export.d.ts +36 -0
  210. package/dist/cli/commands/monitor/export.d.ts.map +1 -0
  211. package/dist/cli/commands/monitor/export.js +147 -0
  212. package/dist/cli/commands/monitor/export.js.map +1 -0
  213. package/dist/cli/commands/monitor/index.d.ts +11 -0
  214. package/dist/cli/commands/monitor/index.d.ts.map +1 -0
  215. package/dist/cli/commands/monitor/index.js +14 -0
  216. package/dist/cli/commands/monitor/index.js.map +1 -0
  217. package/dist/cli/commands/quality/baseline.d.ts +27 -0
  218. package/dist/cli/commands/quality/baseline.d.ts.map +1 -0
  219. package/dist/cli/commands/quality/baseline.js +125 -0
  220. package/dist/cli/commands/quality/baseline.js.map +1 -0
  221. package/dist/cli/commands/quality/compare.d.ts +36 -0
  222. package/dist/cli/commands/quality/compare.d.ts.map +1 -0
  223. package/dist/cli/commands/quality/compare.js +137 -0
  224. package/dist/cli/commands/quality/compare.js.map +1 -0
  225. package/dist/cli/commands/quality/decision.d.ts +81 -0
  226. package/dist/cli/commands/quality/decision.d.ts.map +1 -0
  227. package/dist/cli/commands/quality/decision.js +317 -0
  228. package/dist/cli/commands/quality/decision.js.map +1 -0
  229. package/dist/cli/commands/quality/gate.d.ts +47 -0
  230. package/dist/cli/commands/quality/gate.d.ts.map +1 -0
  231. package/dist/cli/commands/quality/gate.js +203 -0
  232. package/dist/cli/commands/quality/gate.js.map +1 -0
  233. package/dist/cli/commands/quality/index.d.ts +17 -0
  234. package/dist/cli/commands/quality/index.d.ts.map +1 -0
  235. package/dist/cli/commands/quality/index.js +41 -0
  236. package/dist/cli/commands/quality/index.js.map +1 -0
  237. package/dist/cli/commands/quality/policy.d.ts +57 -0
  238. package/dist/cli/commands/quality/policy.d.ts.map +1 -0
  239. package/dist/cli/commands/quality/policy.js +347 -0
  240. package/dist/cli/commands/quality/policy.js.map +1 -0
  241. package/dist/cli/commands/quality/risk.d.ts +41 -0
  242. package/dist/cli/commands/quality/risk.d.ts.map +1 -0
  243. package/dist/cli/commands/quality/risk.js +253 -0
  244. package/dist/cli/commands/quality/risk.js.map +1 -0
  245. package/dist/cli/commands/quality/trends.d.ts +40 -0
  246. package/dist/cli/commands/quality/trends.d.ts.map +1 -0
  247. package/dist/cli/commands/quality/trends.js +123 -0
  248. package/dist/cli/commands/quality/trends.js.map +1 -0
  249. package/dist/cli/commands/quality/validate.d.ts +44 -0
  250. package/dist/cli/commands/quality/validate.d.ts.map +1 -0
  251. package/dist/cli/commands/quality/validate.js +222 -0
  252. package/dist/cli/commands/quality/validate.js.map +1 -0
  253. package/dist/cli/commands/test/analyze-failures.d.ts +39 -0
  254. package/dist/cli/commands/test/analyze-failures.d.ts.map +1 -0
  255. package/dist/cli/commands/test/analyze-failures.js +114 -0
  256. package/dist/cli/commands/test/analyze-failures.js.map +1 -0
  257. package/dist/cli/commands/test/clean.d.ts +3 -0
  258. package/dist/cli/commands/test/clean.d.ts.map +1 -0
  259. package/dist/cli/commands/test/clean.js +122 -0
  260. package/dist/cli/commands/test/clean.js.map +1 -0
  261. package/dist/cli/commands/test/debug.d.ts +3 -0
  262. package/dist/cli/commands/test/debug.d.ts.map +1 -0
  263. package/dist/cli/commands/test/debug.js +158 -0
  264. package/dist/cli/commands/test/debug.js.map +1 -0
  265. package/dist/cli/commands/test/diff.d.ts +3 -0
  266. package/dist/cli/commands/test/diff.d.ts.map +1 -0
  267. package/dist/cli/commands/test/diff.js +219 -0
  268. package/dist/cli/commands/test/diff.js.map +1 -0
  269. package/dist/cli/commands/test/flakiness.d.ts +32 -0
  270. package/dist/cli/commands/test/flakiness.d.ts.map +1 -0
  271. package/dist/cli/commands/test/flakiness.js +122 -0
  272. package/dist/cli/commands/test/flakiness.js.map +1 -0
  273. package/dist/cli/commands/test/index.d.ts +17 -0
  274. package/dist/cli/commands/test/index.d.ts.map +1 -0
  275. package/dist/cli/commands/test/index.js +45 -0
  276. package/dist/cli/commands/test/index.js.map +1 -0
  277. package/dist/cli/commands/test/mutate.d.ts +29 -0
  278. package/dist/cli/commands/test/mutate.d.ts.map +1 -0
  279. package/dist/cli/commands/test/mutate.js +163 -0
  280. package/dist/cli/commands/test/mutate.js.map +1 -0
  281. package/dist/cli/commands/test/parallel.d.ts +3 -0
  282. package/dist/cli/commands/test/parallel.d.ts.map +1 -0
  283. package/dist/cli/commands/test/parallel.js +116 -0
  284. package/dist/cli/commands/test/parallel.js.map +1 -0
  285. package/dist/cli/commands/test/profile.d.ts +3 -0
  286. package/dist/cli/commands/test/profile.d.ts.map +1 -0
  287. package/dist/cli/commands/test/profile.js +179 -0
  288. package/dist/cli/commands/test/profile.js.map +1 -0
  289. package/dist/cli/commands/test/queue.d.ts +3 -0
  290. package/dist/cli/commands/test/queue.d.ts.map +1 -0
  291. package/dist/cli/commands/test/queue.js +140 -0
  292. package/dist/cli/commands/test/queue.js.map +1 -0
  293. package/dist/cli/commands/test/retry.d.ts +3 -0
  294. package/dist/cli/commands/test/retry.d.ts.map +1 -0
  295. package/dist/cli/commands/test/retry.js +104 -0
  296. package/dist/cli/commands/test/retry.js.map +1 -0
  297. package/dist/cli/commands/test/snapshot.d.ts +3 -0
  298. package/dist/cli/commands/test/snapshot.d.ts.map +1 -0
  299. package/dist/cli/commands/test/snapshot.js +177 -0
  300. package/dist/cli/commands/test/snapshot.js.map +1 -0
  301. package/dist/cli/commands/test/trace.d.ts +3 -0
  302. package/dist/cli/commands/test/trace.d.ts.map +1 -0
  303. package/dist/cli/commands/test/trace.js +160 -0
  304. package/dist/cli/commands/test/trace.js.map +1 -0
  305. package/dist/cli/commands/test/watch.d.ts +3 -0
  306. package/dist/cli/commands/test/watch.d.ts.map +1 -0
  307. package/dist/cli/commands/test/watch.js +130 -0
  308. package/dist/cli/commands/test/watch.js.map +1 -0
  309. package/dist/cli/commands/workflow/cancel.d.ts +55 -0
  310. package/dist/cli/commands/workflow/cancel.d.ts.map +1 -0
  311. package/dist/cli/commands/workflow/cancel.js +331 -0
  312. package/dist/cli/commands/workflow/cancel.js.map +1 -0
  313. package/dist/cli/commands/workflow/index.d.ts +11 -0
  314. package/dist/cli/commands/workflow/index.d.ts.map +1 -0
  315. package/dist/cli/commands/workflow/index.js +20 -0
  316. package/dist/cli/commands/workflow/index.js.map +1 -0
  317. package/dist/cli/commands/workflow/list.d.ts +43 -0
  318. package/dist/cli/commands/workflow/list.d.ts.map +1 -0
  319. package/dist/cli/commands/workflow/list.js +257 -0
  320. package/dist/cli/commands/workflow/list.js.map +1 -0
  321. package/dist/cli/commands/workflow/pause.d.ts +44 -0
  322. package/dist/cli/commands/workflow/pause.d.ts.map +1 -0
  323. package/dist/cli/commands/workflow/pause.js +222 -0
  324. package/dist/cli/commands/workflow/pause.js.map +1 -0
  325. package/dist/cli/index.js +311 -0
  326. package/dist/cli/index.js.map +1 -1
  327. package/dist/core/Agent.d.ts.map +1 -1
  328. package/dist/core/Agent.js +18 -8
  329. package/dist/core/Agent.js.map +1 -1
  330. package/dist/core/ArtifactWorkflow.d.ts +149 -0
  331. package/dist/core/ArtifactWorkflow.d.ts.map +1 -0
  332. package/dist/core/ArtifactWorkflow.js +347 -0
  333. package/dist/core/ArtifactWorkflow.js.map +1 -0
  334. package/dist/core/EventBus.d.ts.map +1 -1
  335. package/dist/core/EventBus.js +18 -12
  336. package/dist/core/EventBus.js.map +1 -1
  337. package/dist/core/coordination/BlackboardCoordination.d.ts +44 -0
  338. package/dist/core/coordination/BlackboardCoordination.d.ts.map +1 -0
  339. package/dist/core/coordination/BlackboardCoordination.js +95 -0
  340. package/dist/core/coordination/BlackboardCoordination.js.map +1 -0
  341. package/dist/core/coordination/ConsensusGating.d.ts +53 -0
  342. package/dist/core/coordination/ConsensusGating.d.ts.map +1 -0
  343. package/dist/core/coordination/ConsensusGating.js +137 -0
  344. package/dist/core/coordination/ConsensusGating.js.map +1 -0
  345. package/dist/core/coordination/GOAPCoordination.d.ts +79 -0
  346. package/dist/core/coordination/GOAPCoordination.d.ts.map +1 -0
  347. package/dist/core/coordination/GOAPCoordination.js +178 -0
  348. package/dist/core/coordination/GOAPCoordination.js.map +1 -0
  349. package/dist/core/coordination/OODACoordination.d.ts +99 -0
  350. package/dist/core/coordination/OODACoordination.d.ts.map +1 -0
  351. package/dist/core/coordination/OODACoordination.js +207 -0
  352. package/dist/core/coordination/OODACoordination.js.map +1 -0
  353. package/dist/core/coordination/index.d.ts +19 -0
  354. package/dist/core/coordination/index.d.ts.map +1 -0
  355. package/dist/core/coordination/index.js +22 -0
  356. package/dist/core/coordination/index.js.map +1 -0
  357. package/dist/core/events/QEEventBus.d.ts +62 -0
  358. package/dist/core/events/QEEventBus.d.ts.map +1 -0
  359. package/dist/core/events/QEEventBus.js +109 -0
  360. package/dist/core/events/QEEventBus.js.map +1 -0
  361. package/dist/core/events/index.d.ts +7 -0
  362. package/dist/core/events/index.d.ts.map +1 -0
  363. package/dist/core/events/index.js +25 -0
  364. package/dist/core/events/index.js.map +1 -0
  365. package/dist/core/events/types.d.ts +72 -0
  366. package/dist/core/events/types.d.ts.map +1 -0
  367. package/dist/core/events/types.js +6 -0
  368. package/dist/core/events/types.js.map +1 -0
  369. package/dist/core/hooks/RollbackManager.d.ts +90 -0
  370. package/dist/core/hooks/RollbackManager.d.ts.map +1 -0
  371. package/dist/core/hooks/RollbackManager.js +214 -0
  372. package/dist/core/hooks/RollbackManager.js.map +1 -0
  373. package/dist/core/hooks/VerificationHookManager.d.ts +134 -0
  374. package/dist/core/hooks/VerificationHookManager.d.ts.map +1 -0
  375. package/dist/core/hooks/VerificationHookManager.js +293 -0
  376. package/dist/core/hooks/VerificationHookManager.js.map +1 -0
  377. package/dist/core/hooks/checkers/ConfigurationChecker.d.ts +31 -0
  378. package/dist/core/hooks/checkers/ConfigurationChecker.d.ts.map +1 -0
  379. package/dist/core/hooks/checkers/ConfigurationChecker.js +98 -0
  380. package/dist/core/hooks/checkers/ConfigurationChecker.js.map +1 -0
  381. package/dist/core/hooks/checkers/EnvironmentChecker.d.ts +23 -0
  382. package/dist/core/hooks/checkers/EnvironmentChecker.d.ts.map +1 -0
  383. package/dist/core/hooks/checkers/EnvironmentChecker.js +93 -0
  384. package/dist/core/hooks/checkers/EnvironmentChecker.js.map +1 -0
  385. package/dist/core/hooks/checkers/PermissionChecker.d.ts +26 -0
  386. package/dist/core/hooks/checkers/PermissionChecker.d.ts.map +1 -0
  387. package/dist/core/hooks/checkers/PermissionChecker.js +136 -0
  388. package/dist/core/hooks/checkers/PermissionChecker.js.map +1 -0
  389. package/dist/core/hooks/checkers/ResourceChecker.d.ts +24 -0
  390. package/dist/core/hooks/checkers/ResourceChecker.d.ts.map +1 -0
  391. package/dist/core/hooks/checkers/ResourceChecker.js +97 -0
  392. package/dist/core/hooks/checkers/ResourceChecker.js.map +1 -0
  393. package/dist/core/hooks/checkers/index.d.ts +12 -0
  394. package/dist/core/hooks/checkers/index.d.ts.map +1 -0
  395. package/dist/core/hooks/checkers/index.js +15 -0
  396. package/dist/core/hooks/checkers/index.js.map +1 -0
  397. package/dist/core/hooks/index.d.ts +16 -0
  398. package/dist/core/hooks/index.d.ts.map +1 -0
  399. package/dist/core/hooks/index.js +34 -0
  400. package/dist/core/hooks/index.js.map +1 -0
  401. package/dist/core/hooks/validators/CoverageValidator.d.ts +38 -0
  402. package/dist/core/hooks/validators/CoverageValidator.d.ts.map +1 -0
  403. package/dist/core/hooks/validators/CoverageValidator.js +68 -0
  404. package/dist/core/hooks/validators/CoverageValidator.js.map +1 -0
  405. package/dist/core/hooks/validators/OutputValidator.d.ts +19 -0
  406. package/dist/core/hooks/validators/OutputValidator.d.ts.map +1 -0
  407. package/dist/core/hooks/validators/OutputValidator.js +57 -0
  408. package/dist/core/hooks/validators/OutputValidator.js.map +1 -0
  409. package/dist/core/hooks/validators/PerformanceValidator.d.ts +39 -0
  410. package/dist/core/hooks/validators/PerformanceValidator.d.ts.map +1 -0
  411. package/dist/core/hooks/validators/PerformanceValidator.js +97 -0
  412. package/dist/core/hooks/validators/PerformanceValidator.js.map +1 -0
  413. package/dist/core/hooks/validators/QualityValidator.d.ts +32 -0
  414. package/dist/core/hooks/validators/QualityValidator.d.ts.map +1 -0
  415. package/dist/core/hooks/validators/QualityValidator.js +71 -0
  416. package/dist/core/hooks/validators/QualityValidator.js.map +1 -0
  417. package/dist/core/hooks/validators/index.d.ts +12 -0
  418. package/dist/core/hooks/validators/index.d.ts.map +1 -0
  419. package/dist/core/hooks/validators/index.js +15 -0
  420. package/dist/core/hooks/validators/index.js.map +1 -0
  421. package/dist/core/index.d.ts +2 -0
  422. package/dist/core/index.d.ts.map +1 -1
  423. package/dist/core/index.js +3 -1
  424. package/dist/core/index.js.map +1 -1
  425. package/dist/core/memory/AccessControl.d.ts +139 -0
  426. package/dist/core/memory/AccessControl.d.ts.map +1 -0
  427. package/dist/core/memory/AccessControl.js +269 -0
  428. package/dist/core/memory/AccessControl.js.map +1 -0
  429. package/dist/core/memory/CompressionManager.d.ts +85 -0
  430. package/dist/core/memory/CompressionManager.d.ts.map +1 -0
  431. package/dist/core/memory/CompressionManager.js +227 -0
  432. package/dist/core/memory/CompressionManager.js.map +1 -0
  433. package/dist/core/memory/EncryptionManager.d.ts +86 -0
  434. package/dist/core/memory/EncryptionManager.d.ts.map +1 -0
  435. package/dist/core/memory/EncryptionManager.js +213 -0
  436. package/dist/core/memory/EncryptionManager.js.map +1 -0
  437. package/dist/core/memory/EnhancedSwarmMemoryManager.d.ts +91 -0
  438. package/dist/core/memory/EnhancedSwarmMemoryManager.d.ts.map +1 -0
  439. package/dist/core/memory/EnhancedSwarmMemoryManager.js +216 -0
  440. package/dist/core/memory/EnhancedSwarmMemoryManager.js.map +1 -0
  441. package/dist/core/memory/SwarmMemoryManager.d.ts +295 -0
  442. package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -0
  443. package/dist/core/memory/SwarmMemoryManager.js +1407 -0
  444. package/dist/core/memory/SwarmMemoryManager.js.map +1 -0
  445. package/dist/core/memory/VersionHistory.d.ts +88 -0
  446. package/dist/core/memory/VersionHistory.d.ts.map +1 -0
  447. package/dist/core/memory/VersionHistory.js +239 -0
  448. package/dist/core/memory/VersionHistory.js.map +1 -0
  449. package/dist/core/memory/index.d.ts +11 -0
  450. package/dist/core/memory/index.d.ts.map +1 -0
  451. package/dist/core/memory/index.js +18 -0
  452. package/dist/core/memory/index.js.map +1 -0
  453. package/dist/coverage/coverage-collector.d.ts +63 -8
  454. package/dist/coverage/coverage-collector.d.ts.map +1 -1
  455. package/dist/coverage/coverage-collector.js +354 -14
  456. package/dist/coverage/coverage-collector.js.map +1 -1
  457. package/dist/coverage/coverage-reporter.d.ts +48 -11
  458. package/dist/coverage/coverage-reporter.d.ts.map +1 -1
  459. package/dist/coverage/coverage-reporter.js +424 -14
  460. package/dist/coverage/coverage-reporter.js.map +1 -1
  461. package/dist/mcp/handlers/advanced/api-breaking-changes.d.ts +7 -0
  462. package/dist/mcp/handlers/advanced/api-breaking-changes.d.ts.map +1 -0
  463. package/dist/mcp/handlers/advanced/api-breaking-changes.js +217 -0
  464. package/dist/mcp/handlers/advanced/api-breaking-changes.js.map +1 -0
  465. package/dist/mcp/handlers/advanced/index.d.ts +10 -0
  466. package/dist/mcp/handlers/advanced/index.d.ts.map +1 -0
  467. package/dist/mcp/handlers/advanced/index.js +19 -0
  468. package/dist/mcp/handlers/advanced/index.js.map +1 -0
  469. package/dist/mcp/handlers/advanced/mutation-test-execute.d.ts +7 -0
  470. package/dist/mcp/handlers/advanced/mutation-test-execute.d.ts.map +1 -0
  471. package/dist/mcp/handlers/advanced/mutation-test-execute.js +230 -0
  472. package/dist/mcp/handlers/advanced/mutation-test-execute.js.map +1 -0
  473. package/dist/mcp/handlers/advanced/production-incident-replay.d.ts +7 -0
  474. package/dist/mcp/handlers/advanced/production-incident-replay.d.ts.map +1 -0
  475. package/dist/mcp/handlers/advanced/production-incident-replay.js +228 -0
  476. package/dist/mcp/handlers/advanced/production-incident-replay.js.map +1 -0
  477. package/dist/mcp/handlers/advanced/production-rum-analyze.d.ts +7 -0
  478. package/dist/mcp/handlers/advanced/production-rum-analyze.d.ts.map +1 -0
  479. package/dist/mcp/handlers/advanced/production-rum-analyze.js +289 -0
  480. package/dist/mcp/handlers/advanced/production-rum-analyze.js.map +1 -0
  481. package/dist/mcp/handlers/advanced/requirements-generate-bdd.d.ts +7 -0
  482. package/dist/mcp/handlers/advanced/requirements-generate-bdd.d.ts.map +1 -0
  483. package/dist/mcp/handlers/advanced/requirements-generate-bdd.js +268 -0
  484. package/dist/mcp/handlers/advanced/requirements-generate-bdd.js.map +1 -0
  485. package/dist/mcp/handlers/advanced/requirements-validate.d.ts +7 -0
  486. package/dist/mcp/handlers/advanced/requirements-validate.d.ts.map +1 -0
  487. package/dist/mcp/handlers/advanced/requirements-validate.js +176 -0
  488. package/dist/mcp/handlers/advanced/requirements-validate.js.map +1 -0
  489. package/dist/mcp/handlers/analysis/coverage-analyze-sublinear-handler.d.ts +10 -0
  490. package/dist/mcp/handlers/analysis/coverage-analyze-sublinear-handler.d.ts.map +1 -0
  491. package/dist/mcp/handlers/analysis/coverage-analyze-sublinear-handler.js +31 -0
  492. package/dist/mcp/handlers/analysis/coverage-analyze-sublinear-handler.js.map +1 -0
  493. package/dist/mcp/handlers/analysis/coverage-gaps-detect-handler.d.ts +14 -0
  494. package/dist/mcp/handlers/analysis/coverage-gaps-detect-handler.d.ts.map +1 -0
  495. package/dist/mcp/handlers/analysis/coverage-gaps-detect-handler.js +55 -0
  496. package/dist/mcp/handlers/analysis/coverage-gaps-detect-handler.js.map +1 -0
  497. package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.d.ts +35 -0
  498. package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.d.ts.map +1 -0
  499. package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js +163 -0
  500. package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js.map +1 -0
  501. package/dist/mcp/handlers/analysis/coverageGapsDetect.d.ts +56 -0
  502. package/dist/mcp/handlers/analysis/coverageGapsDetect.d.ts.map +1 -0
  503. package/dist/mcp/handlers/analysis/coverageGapsDetect.js +204 -0
  504. package/dist/mcp/handlers/analysis/coverageGapsDetect.js.map +1 -0
  505. package/dist/mcp/handlers/analysis/index.d.ts +15 -0
  506. package/dist/mcp/handlers/analysis/index.d.ts.map +1 -0
  507. package/dist/mcp/handlers/analysis/index.js +18 -0
  508. package/dist/mcp/handlers/analysis/index.js.map +1 -0
  509. package/dist/mcp/handlers/analysis/performance-benchmark-run-handler.d.ts +15 -0
  510. package/dist/mcp/handlers/analysis/performance-benchmark-run-handler.d.ts.map +1 -0
  511. package/dist/mcp/handlers/analysis/performance-benchmark-run-handler.js +47 -0
  512. package/dist/mcp/handlers/analysis/performance-benchmark-run-handler.js.map +1 -0
  513. package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.d.ts +15 -0
  514. package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.d.ts.map +1 -0
  515. package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.js +55 -0
  516. package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.js.map +1 -0
  517. package/dist/mcp/handlers/analysis/performanceBenchmarkRun.d.ts +58 -0
  518. package/dist/mcp/handlers/analysis/performanceBenchmarkRun.d.ts.map +1 -0
  519. package/dist/mcp/handlers/analysis/performanceBenchmarkRun.js +188 -0
  520. package/dist/mcp/handlers/analysis/performanceBenchmarkRun.js.map +1 -0
  521. package/dist/mcp/handlers/analysis/performanceMonitorRealtime.d.ts +58 -0
  522. package/dist/mcp/handlers/analysis/performanceMonitorRealtime.d.ts.map +1 -0
  523. package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js +185 -0
  524. package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js.map +1 -0
  525. package/dist/mcp/handlers/analysis/security-scan-comprehensive-handler.d.ts +15 -0
  526. package/dist/mcp/handlers/analysis/security-scan-comprehensive-handler.d.ts.map +1 -0
  527. package/dist/mcp/handlers/analysis/security-scan-comprehensive-handler.js +70 -0
  528. package/dist/mcp/handlers/analysis/security-scan-comprehensive-handler.js.map +1 -0
  529. package/dist/mcp/handlers/analysis/securityScanComprehensive.d.ts +66 -0
  530. package/dist/mcp/handlers/analysis/securityScanComprehensive.d.ts.map +1 -0
  531. package/dist/mcp/handlers/analysis/securityScanComprehensive.js +300 -0
  532. package/dist/mcp/handlers/analysis/securityScanComprehensive.js.map +1 -0
  533. package/dist/mcp/handlers/chaos/chaos-inject-failure.d.ts +18 -0
  534. package/dist/mcp/handlers/chaos/chaos-inject-failure.d.ts.map +1 -0
  535. package/dist/mcp/handlers/chaos/chaos-inject-failure.js +278 -0
  536. package/dist/mcp/handlers/chaos/chaos-inject-failure.js.map +1 -0
  537. package/dist/mcp/handlers/chaos/chaos-inject-latency.d.ts +18 -0
  538. package/dist/mcp/handlers/chaos/chaos-inject-latency.d.ts.map +1 -0
  539. package/dist/mcp/handlers/chaos/chaos-inject-latency.js +215 -0
  540. package/dist/mcp/handlers/chaos/chaos-inject-latency.js.map +1 -0
  541. package/dist/mcp/handlers/chaos/chaos-resilience-test.d.ts +18 -0
  542. package/dist/mcp/handlers/chaos/chaos-resilience-test.d.ts.map +1 -0
  543. package/dist/mcp/handlers/chaos/chaos-resilience-test.js +430 -0
  544. package/dist/mcp/handlers/chaos/chaos-resilience-test.js.map +1 -0
  545. package/dist/mcp/handlers/chaos/index.d.ts +8 -0
  546. package/dist/mcp/handlers/chaos/index.d.ts.map +1 -0
  547. package/dist/mcp/handlers/chaos/index.js +19 -0
  548. package/dist/mcp/handlers/chaos/index.js.map +1 -0
  549. package/dist/mcp/handlers/coordination/event-emit.d.ts +47 -0
  550. package/dist/mcp/handlers/coordination/event-emit.d.ts.map +1 -0
  551. package/dist/mcp/handlers/coordination/event-emit.js +96 -0
  552. package/dist/mcp/handlers/coordination/event-emit.js.map +1 -0
  553. package/dist/mcp/handlers/coordination/event-subscribe.d.ts +49 -0
  554. package/dist/mcp/handlers/coordination/event-subscribe.d.ts.map +1 -0
  555. package/dist/mcp/handlers/coordination/event-subscribe.js +210 -0
  556. package/dist/mcp/handlers/coordination/event-subscribe.js.map +1 -0
  557. package/dist/mcp/handlers/coordination/index.d.ts +22 -0
  558. package/dist/mcp/handlers/coordination/index.d.ts.map +1 -0
  559. package/dist/mcp/handlers/coordination/index.js +25 -0
  560. package/dist/mcp/handlers/coordination/index.js.map +1 -0
  561. package/dist/mcp/handlers/coordination/task-status.d.ts +75 -0
  562. package/dist/mcp/handlers/coordination/task-status.d.ts.map +1 -0
  563. package/dist/mcp/handlers/coordination/task-status.js +134 -0
  564. package/dist/mcp/handlers/coordination/task-status.js.map +1 -0
  565. package/dist/mcp/handlers/coordination/workflow-checkpoint.d.ts +45 -0
  566. package/dist/mcp/handlers/coordination/workflow-checkpoint.d.ts.map +1 -0
  567. package/dist/mcp/handlers/coordination/workflow-checkpoint.js +114 -0
  568. package/dist/mcp/handlers/coordination/workflow-checkpoint.js.map +1 -0
  569. package/dist/mcp/handlers/coordination/workflow-create.d.ts +71 -0
  570. package/dist/mcp/handlers/coordination/workflow-create.d.ts.map +1 -0
  571. package/dist/mcp/handlers/coordination/workflow-create.js +163 -0
  572. package/dist/mcp/handlers/coordination/workflow-create.js.map +1 -0
  573. package/dist/mcp/handlers/coordination/workflow-execute.d.ts +61 -0
  574. package/dist/mcp/handlers/coordination/workflow-execute.d.ts.map +1 -0
  575. package/dist/mcp/handlers/coordination/workflow-execute.js +160 -0
  576. package/dist/mcp/handlers/coordination/workflow-execute.js.map +1 -0
  577. package/dist/mcp/handlers/coordination/workflow-resume.d.ts +49 -0
  578. package/dist/mcp/handlers/coordination/workflow-resume.d.ts.map +1 -0
  579. package/dist/mcp/handlers/coordination/workflow-resume.js +124 -0
  580. package/dist/mcp/handlers/coordination/workflow-resume.js.map +1 -0
  581. package/dist/mcp/handlers/integration/contract-validate.d.ts +10 -0
  582. package/dist/mcp/handlers/integration/contract-validate.d.ts.map +1 -0
  583. package/dist/mcp/handlers/integration/contract-validate.js +349 -0
  584. package/dist/mcp/handlers/integration/contract-validate.js.map +1 -0
  585. package/dist/mcp/handlers/integration/dependency-check.d.ts +10 -0
  586. package/dist/mcp/handlers/integration/dependency-check.d.ts.map +1 -0
  587. package/dist/mcp/handlers/integration/dependency-check.js +253 -0
  588. package/dist/mcp/handlers/integration/dependency-check.js.map +1 -0
  589. package/dist/mcp/handlers/integration/index.d.ts +9 -0
  590. package/dist/mcp/handlers/integration/index.d.ts.map +1 -0
  591. package/dist/mcp/handlers/integration/index.js +14 -0
  592. package/dist/mcp/handlers/integration/index.js.map +1 -0
  593. package/dist/mcp/handlers/integration/integration-test-orchestrate.d.ts +10 -0
  594. package/dist/mcp/handlers/integration/integration-test-orchestrate.d.ts.map +1 -0
  595. package/dist/mcp/handlers/integration/integration-test-orchestrate.js +242 -0
  596. package/dist/mcp/handlers/integration/integration-test-orchestrate.js.map +1 -0
  597. package/dist/mcp/handlers/memory/artifact-manifest.d.ts +57 -0
  598. package/dist/mcp/handlers/memory/artifact-manifest.d.ts.map +1 -0
  599. package/dist/mcp/handlers/memory/artifact-manifest.js +176 -0
  600. package/dist/mcp/handlers/memory/artifact-manifest.js.map +1 -0
  601. package/dist/mcp/handlers/memory/blackboard-post.d.ts +50 -0
  602. package/dist/mcp/handlers/memory/blackboard-post.d.ts.map +1 -0
  603. package/dist/mcp/handlers/memory/blackboard-post.js +88 -0
  604. package/dist/mcp/handlers/memory/blackboard-post.js.map +1 -0
  605. package/dist/mcp/handlers/memory/blackboard-read.d.ts +33 -0
  606. package/dist/mcp/handlers/memory/blackboard-read.d.ts.map +1 -0
  607. package/dist/mcp/handlers/memory/blackboard-read.js +81 -0
  608. package/dist/mcp/handlers/memory/blackboard-read.js.map +1 -0
  609. package/dist/mcp/handlers/memory/consensus-propose.d.ts +57 -0
  610. package/dist/mcp/handlers/memory/consensus-propose.d.ts.map +1 -0
  611. package/dist/mcp/handlers/memory/consensus-propose.js +99 -0
  612. package/dist/mcp/handlers/memory/consensus-propose.js.map +1 -0
  613. package/dist/mcp/handlers/memory/consensus-vote.d.ts +37 -0
  614. package/dist/mcp/handlers/memory/consensus-vote.d.ts.map +1 -0
  615. package/dist/mcp/handlers/memory/consensus-vote.js +131 -0
  616. package/dist/mcp/handlers/memory/consensus-vote.js.map +1 -0
  617. package/dist/mcp/handlers/memory/memory-backup.d.ts +49 -0
  618. package/dist/mcp/handlers/memory/memory-backup.d.ts.map +1 -0
  619. package/dist/mcp/handlers/memory/memory-backup.js +154 -0
  620. package/dist/mcp/handlers/memory/memory-backup.js.map +1 -0
  621. package/dist/mcp/handlers/memory/memory-query.d.ts +35 -0
  622. package/dist/mcp/handlers/memory/memory-query.d.ts.map +1 -0
  623. package/dist/mcp/handlers/memory/memory-query.js +96 -0
  624. package/dist/mcp/handlers/memory/memory-query.js.map +1 -0
  625. package/dist/mcp/handlers/memory/memory-retrieve.d.ts +32 -0
  626. package/dist/mcp/handlers/memory/memory-retrieve.d.ts.map +1 -0
  627. package/dist/mcp/handlers/memory/memory-retrieve.js +91 -0
  628. package/dist/mcp/handlers/memory/memory-retrieve.js.map +1 -0
  629. package/dist/mcp/handlers/memory/memory-share.d.ts +39 -0
  630. package/dist/mcp/handlers/memory/memory-share.d.ts.map +1 -0
  631. package/dist/mcp/handlers/memory/memory-share.js +96 -0
  632. package/dist/mcp/handlers/memory/memory-share.js.map +1 -0
  633. package/dist/mcp/handlers/memory/memory-store.d.ts +47 -0
  634. package/dist/mcp/handlers/memory/memory-store.d.ts.map +1 -0
  635. package/dist/mcp/handlers/memory/memory-store.js +107 -0
  636. package/dist/mcp/handlers/memory/memory-store.js.map +1 -0
  637. package/dist/mcp/handlers/prediction/deployment-readiness-check.d.ts +157 -0
  638. package/dist/mcp/handlers/prediction/deployment-readiness-check.d.ts.map +1 -0
  639. package/dist/mcp/handlers/prediction/deployment-readiness-check.js +483 -0
  640. package/dist/mcp/handlers/prediction/deployment-readiness-check.js.map +1 -0
  641. package/dist/mcp/handlers/prediction/flaky-test-detect.d.ts +178 -0
  642. package/dist/mcp/handlers/prediction/flaky-test-detect.d.ts.map +1 -0
  643. package/dist/mcp/handlers/prediction/flaky-test-detect.js +438 -0
  644. package/dist/mcp/handlers/prediction/flaky-test-detect.js.map +1 -0
  645. package/dist/mcp/handlers/prediction/index.d.ts +19 -0
  646. package/dist/mcp/handlers/prediction/index.d.ts.map +1 -0
  647. package/dist/mcp/handlers/prediction/index.js +22 -0
  648. package/dist/mcp/handlers/prediction/index.js.map +1 -0
  649. package/dist/mcp/handlers/prediction/predict-defects-ai.d.ts +133 -0
  650. package/dist/mcp/handlers/prediction/predict-defects-ai.d.ts.map +1 -0
  651. package/dist/mcp/handlers/prediction/predict-defects-ai.js +278 -0
  652. package/dist/mcp/handlers/prediction/predict-defects-ai.js.map +1 -0
  653. package/dist/mcp/handlers/prediction/regression-risk-analyze.d.ts +189 -0
  654. package/dist/mcp/handlers/prediction/regression-risk-analyze.d.ts.map +1 -0
  655. package/dist/mcp/handlers/prediction/regression-risk-analyze.js +419 -0
  656. package/dist/mcp/handlers/prediction/regression-risk-analyze.js.map +1 -0
  657. package/dist/mcp/handlers/prediction/visual-test-regression.d.ts +138 -0
  658. package/dist/mcp/handlers/prediction/visual-test-regression.d.ts.map +1 -0
  659. package/dist/mcp/handlers/prediction/visual-test-regression.js +274 -0
  660. package/dist/mcp/handlers/prediction/visual-test-regression.js.map +1 -0
  661. package/dist/mcp/handlers/quality/quality-decision-make.d.ts +104 -0
  662. package/dist/mcp/handlers/quality/quality-decision-make.d.ts.map +1 -0
  663. package/dist/mcp/handlers/quality/quality-decision-make.js +418 -0
  664. package/dist/mcp/handlers/quality/quality-decision-make.js.map +1 -0
  665. package/dist/mcp/handlers/quality/quality-gate-execute.d.ts +160 -0
  666. package/dist/mcp/handlers/quality/quality-gate-execute.d.ts.map +1 -0
  667. package/dist/mcp/handlers/quality/quality-gate-execute.js +424 -0
  668. package/dist/mcp/handlers/quality/quality-gate-execute.js.map +1 -0
  669. package/dist/mcp/handlers/quality/quality-policy-check.d.ts +163 -0
  670. package/dist/mcp/handlers/quality/quality-policy-check.d.ts.map +1 -0
  671. package/dist/mcp/handlers/quality/quality-policy-check.js +465 -0
  672. package/dist/mcp/handlers/quality/quality-policy-check.js.map +1 -0
  673. package/dist/mcp/handlers/quality/quality-risk-assess.d.ts +123 -0
  674. package/dist/mcp/handlers/quality/quality-risk-assess.d.ts.map +1 -0
  675. package/dist/mcp/handlers/quality/quality-risk-assess.js +532 -0
  676. package/dist/mcp/handlers/quality/quality-risk-assess.js.map +1 -0
  677. package/dist/mcp/handlers/quality/quality-validate-metrics.d.ts +117 -0
  678. package/dist/mcp/handlers/quality/quality-validate-metrics.d.ts.map +1 -0
  679. package/dist/mcp/handlers/quality/quality-validate-metrics.js +298 -0
  680. package/dist/mcp/handlers/quality/quality-validate-metrics.js.map +1 -0
  681. package/dist/mcp/handlers/test/index.d.ts +9 -0
  682. package/dist/mcp/handlers/test/index.d.ts.map +1 -0
  683. package/dist/mcp/handlers/test/index.js +25 -0
  684. package/dist/mcp/handlers/test/index.js.map +1 -0
  685. package/dist/mcp/handlers/test/test-coverage-detailed.d.ts +65 -0
  686. package/dist/mcp/handlers/test/test-coverage-detailed.d.ts.map +1 -0
  687. package/dist/mcp/handlers/test/test-coverage-detailed.js +305 -0
  688. package/dist/mcp/handlers/test/test-coverage-detailed.js.map +1 -0
  689. package/dist/mcp/handlers/test/test-execute-parallel.d.ts +39 -0
  690. package/dist/mcp/handlers/test/test-execute-parallel.d.ts.map +1 -0
  691. package/dist/mcp/handlers/test/test-execute-parallel.js +189 -0
  692. package/dist/mcp/handlers/test/test-execute-parallel.js.map +1 -0
  693. package/dist/mcp/handlers/test/test-generate-enhanced.d.ts +40 -0
  694. package/dist/mcp/handlers/test/test-generate-enhanced.d.ts.map +1 -0
  695. package/dist/mcp/handlers/test/test-generate-enhanced.js +240 -0
  696. package/dist/mcp/handlers/test/test-generate-enhanced.js.map +1 -0
  697. package/dist/mcp/handlers/test/test-optimize-sublinear.d.ts +40 -0
  698. package/dist/mcp/handlers/test/test-optimize-sublinear.d.ts.map +1 -0
  699. package/dist/mcp/handlers/test/test-optimize-sublinear.js +223 -0
  700. package/dist/mcp/handlers/test/test-optimize-sublinear.js.map +1 -0
  701. package/dist/mcp/handlers/test/test-report-comprehensive.d.ts +50 -0
  702. package/dist/mcp/handlers/test/test-report-comprehensive.d.ts.map +1 -0
  703. package/dist/mcp/handlers/test/test-report-comprehensive.js +239 -0
  704. package/dist/mcp/handlers/test/test-report-comprehensive.js.map +1 -0
  705. package/dist/mcp/handlers/test-execute.d.ts +0 -2
  706. package/dist/mcp/handlers/test-execute.d.ts.map +1 -1
  707. package/dist/mcp/handlers/test-execute.js +82 -45
  708. package/dist/mcp/handlers/test-execute.js.map +1 -1
  709. package/dist/mcp/server.d.ts +4 -0
  710. package/dist/mcp/server.d.ts.map +1 -1
  711. package/dist/mcp/server.js +89 -0
  712. package/dist/mcp/server.js.map +1 -1
  713. package/dist/mcp/services/HookExecutor.d.ts +4 -1
  714. package/dist/mcp/services/HookExecutor.d.ts.map +1 -1
  715. package/dist/mcp/services/HookExecutor.js.map +1 -1
  716. package/dist/mcp/tools.d.ts +43 -0
  717. package/dist/mcp/tools.d.ts.map +1 -1
  718. package/dist/mcp/tools.js +1256 -1
  719. package/dist/mcp/tools.js.map +1 -1
  720. package/dist/mcp/types/advanced.d.ts +193 -0
  721. package/dist/mcp/types/advanced.d.ts.map +1 -0
  722. package/dist/mcp/types/advanced.js +7 -0
  723. package/dist/mcp/types/advanced.js.map +1 -0
  724. package/dist/mcp/types/analysis.d.ts +46 -0
  725. package/dist/mcp/types/analysis.d.ts.map +1 -0
  726. package/dist/mcp/types/analysis.js +6 -0
  727. package/dist/mcp/types/analysis.js.map +1 -0
  728. package/dist/mcp/types/chaos.d.ts +343 -0
  729. package/dist/mcp/types/chaos.d.ts.map +1 -0
  730. package/dist/mcp/types/chaos.js +7 -0
  731. package/dist/mcp/types/chaos.js.map +1 -0
  732. package/dist/mcp/types/integration.d.ts +418 -0
  733. package/dist/mcp/types/integration.d.ts.map +1 -0
  734. package/dist/mcp/types/integration.js +7 -0
  735. package/dist/mcp/types/integration.js.map +1 -0
  736. package/dist/utils/Config.d.ts +4 -0
  737. package/dist/utils/Config.d.ts.map +1 -1
  738. package/dist/utils/Config.js +31 -0
  739. package/dist/utils/Config.js.map +1 -1
  740. package/dist/utils/FakerDataGenerator.d.ts +203 -0
  741. package/dist/utils/FakerDataGenerator.d.ts.map +1 -0
  742. package/dist/utils/FakerDataGenerator.js +379 -0
  743. package/dist/utils/FakerDataGenerator.js.map +1 -0
  744. package/dist/utils/SecurityScanner.d.ts +72 -0
  745. package/dist/utils/SecurityScanner.d.ts.map +1 -0
  746. package/dist/utils/SecurityScanner.js +378 -0
  747. package/dist/utils/SecurityScanner.js.map +1 -0
  748. package/dist/utils/TestFrameworkExecutor.d.ts +146 -0
  749. package/dist/utils/TestFrameworkExecutor.d.ts.map +1 -0
  750. package/dist/utils/TestFrameworkExecutor.js +566 -0
  751. package/dist/utils/TestFrameworkExecutor.js.map +1 -0
  752. package/dist/utils/index.d.ts +2 -0
  753. package/dist/utils/index.d.ts.map +1 -1
  754. package/dist/utils/index.js +3 -1
  755. package/dist/utils/index.js.map +1 -1
  756. package/dist/utils/validation.d.ts +28 -0
  757. package/dist/utils/validation.d.ts.map +1 -0
  758. package/dist/utils/validation.js +57 -0
  759. package/dist/utils/validation.js.map +1 -0
  760. package/package.json +15 -5
  761. package/dist/core/coverage-analyzer.d.ts +0 -50
  762. package/dist/core/coverage-analyzer.d.ts.map +0 -1
  763. package/dist/core/coverage-analyzer.js +0 -146
  764. package/dist/core/coverage-analyzer.js.map +0 -1
  765. package/dist/core/quality-gate.d.ts +0 -81
  766. package/dist/core/quality-gate.d.ts.map +0 -1
  767. package/dist/core/quality-gate.js +0 -254
  768. package/dist/core/quality-gate.js.map +0 -1
  769. package/dist/optimization/sublinear-solver.d.ts +0 -72
  770. package/dist/optimization/sublinear-solver.d.ts.map +0 -1
  771. package/dist/optimization/sublinear-solver.js +0 -263
  772. package/dist/optimization/sublinear-solver.js.map +0 -1
  773. package/dist/scripts/verifyComplexity.d.ts +0 -8
  774. package/dist/scripts/verifyComplexity.d.ts.map +0 -1
  775. package/dist/scripts/verifyComplexity.js +0 -56
  776. package/dist/scripts/verifyComplexity.js.map +0 -1
  777. package/dist/utils/sublinear/coverageOptimizer.d.ts +0 -84
  778. package/dist/utils/sublinear/coverageOptimizer.d.ts.map +0 -1
  779. package/dist/utils/sublinear/coverageOptimizer.js +0 -415
  780. package/dist/utils/sublinear/coverageOptimizer.js.map +0 -1
  781. package/dist/utils/sublinear/index.d.ts +0 -50
  782. package/dist/utils/sublinear/index.d.ts.map +0 -1
  783. package/dist/utils/sublinear/index.js +0 -390
  784. package/dist/utils/sublinear/index.js.map +0 -1
  785. package/dist/utils/sublinear/matrixSolver.d.ts +0 -132
  786. package/dist/utils/sublinear/matrixSolver.d.ts.map +0 -1
  787. package/dist/utils/sublinear/matrixSolver.js +0 -642
  788. package/dist/utils/sublinear/matrixSolver.js.map +0 -1
  789. package/dist/utils/sublinear/temporalPredictor.d.ts +0 -195
  790. package/dist/utils/sublinear/temporalPredictor.d.ts.map +0 -1
  791. package/dist/utils/sublinear/temporalPredictor.js +0 -474
  792. package/dist/utils/sublinear/temporalPredictor.js.map +0 -1
  793. package/dist/utils/sublinear/testSelector.d.ts +0 -81
  794. package/dist/utils/sublinear/testSelector.d.ts.map +0 -1
  795. package/dist/utils/sublinear/testSelector.js +0 -303
  796. package/dist/utils/sublinear/testSelector.js.map +0 -1
@@ -0,0 +1,1407 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.SwarmMemoryManager = void 0;
30
+ const sqlite3_1 = __importDefault(require("sqlite3"));
31
+ const path = __importStar(require("path"));
32
+ const fs = __importStar(require("fs-extra"));
33
+ const AccessControl_1 = require("./AccessControl");
34
+ /**
35
+ * SwarmMemoryManager - Manages persistent memory for agent swarm coordination
36
+ *
37
+ * Features:
38
+ * - SQLite-based persistent storage with 12-table schema
39
+ * - Partitioned key-value store
40
+ * - TTL-based expiration with different policies per table
41
+ * - Hint/blackboard pattern support
42
+ * - Pattern-based retrieval
43
+ * - 5-level access control (private, team, swarm, public, system)
44
+ * - Agent-based permissions (read, write, delete, share)
45
+ * - Event stream tracking (30-day TTL)
46
+ * - Workflow checkpointing (never expires)
47
+ * - Consensus gating (7-day TTL)
48
+ * - Artifact manifests (never expires)
49
+ * - GOAP planning support
50
+ * - OODA loop tracking
51
+ * - Session resumability
52
+ * - Agent lifecycle management
53
+ */
54
+ class SwarmMemoryManager {
55
+ constructor(dbPath = ':memory:') {
56
+ this.db = null;
57
+ this.initialized = false;
58
+ // TTL policy constants (in seconds)
59
+ this.TTL_POLICY = {
60
+ artifacts: 0, // Never expire
61
+ shared: 1800, // 30 minutes
62
+ patterns: 604800, // 7 days
63
+ events: 2592000, // 30 days
64
+ workflow_state: 0, // Never expire
65
+ consensus: 604800 // 7 days
66
+ };
67
+ this.dbPath = dbPath;
68
+ this.accessControl = new AccessControl_1.AccessControl();
69
+ this.aclCache = new Map();
70
+ }
71
+ run(sql, params = []) {
72
+ return new Promise((resolve, reject) => {
73
+ this.db.run(sql, params, (err) => {
74
+ if (err)
75
+ reject(err);
76
+ else
77
+ resolve();
78
+ });
79
+ });
80
+ }
81
+ get(sql, params = []) {
82
+ return new Promise((resolve, reject) => {
83
+ this.db.get(sql, params, (err, row) => {
84
+ if (err)
85
+ reject(err);
86
+ else
87
+ resolve(row);
88
+ });
89
+ });
90
+ }
91
+ all(sql, params = []) {
92
+ return new Promise((resolve, reject) => {
93
+ this.db.all(sql, params, (err, rows) => {
94
+ if (err)
95
+ reject(err);
96
+ else
97
+ resolve((rows || []));
98
+ });
99
+ });
100
+ }
101
+ async initialize() {
102
+ if (this.initialized) {
103
+ return;
104
+ }
105
+ // Ensure directory exists for file-based DB
106
+ if (this.dbPath !== ':memory:') {
107
+ await fs.ensureDir(path.dirname(this.dbPath));
108
+ }
109
+ this.db = new sqlite3_1.default.Database(this.dbPath);
110
+ // Create memory entries table with access control fields
111
+ await this.run(`
112
+ CREATE TABLE IF NOT EXISTS memory_entries (
113
+ key TEXT NOT NULL,
114
+ partition TEXT NOT NULL DEFAULT 'default',
115
+ value TEXT NOT NULL,
116
+ metadata TEXT,
117
+ created_at INTEGER NOT NULL,
118
+ expires_at INTEGER,
119
+ owner TEXT,
120
+ access_level TEXT DEFAULT 'private',
121
+ team_id TEXT,
122
+ swarm_id TEXT,
123
+ PRIMARY KEY (key, partition)
124
+ )
125
+ `);
126
+ // Create ACL table for advanced permissions
127
+ await this.run(`
128
+ CREATE TABLE IF NOT EXISTS memory_acl (
129
+ resource_id TEXT PRIMARY KEY,
130
+ owner TEXT NOT NULL,
131
+ access_level TEXT NOT NULL,
132
+ team_id TEXT,
133
+ swarm_id TEXT,
134
+ granted_permissions TEXT,
135
+ blocked_agents TEXT,
136
+ created_at INTEGER NOT NULL,
137
+ updated_at INTEGER NOT NULL
138
+ )
139
+ `);
140
+ // Create hints table for blackboard pattern
141
+ await this.run(`
142
+ CREATE TABLE IF NOT EXISTS hints (
143
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
144
+ key TEXT NOT NULL,
145
+ value TEXT NOT NULL,
146
+ created_at INTEGER NOT NULL,
147
+ expires_at INTEGER
148
+ )
149
+ `);
150
+ // Table 3: Events (TTL: 30 days)
151
+ await this.run(`
152
+ CREATE TABLE IF NOT EXISTS events (
153
+ id TEXT PRIMARY KEY,
154
+ type TEXT NOT NULL,
155
+ payload TEXT NOT NULL,
156
+ timestamp INTEGER NOT NULL,
157
+ source TEXT NOT NULL,
158
+ ttl INTEGER NOT NULL DEFAULT ${this.TTL_POLICY.events},
159
+ expires_at INTEGER
160
+ )
161
+ `);
162
+ // Table 4: Workflow State (TTL: never expires)
163
+ await this.run(`
164
+ CREATE TABLE IF NOT EXISTS workflow_state (
165
+ id TEXT PRIMARY KEY,
166
+ step TEXT NOT NULL,
167
+ status TEXT NOT NULL,
168
+ checkpoint TEXT NOT NULL,
169
+ sha TEXT NOT NULL,
170
+ ttl INTEGER NOT NULL DEFAULT ${this.TTL_POLICY.workflow_state},
171
+ created_at INTEGER NOT NULL,
172
+ updated_at INTEGER NOT NULL
173
+ )
174
+ `);
175
+ // Table 5: Patterns (TTL: 7 days)
176
+ await this.run(`
177
+ CREATE TABLE IF NOT EXISTS patterns (
178
+ id TEXT PRIMARY KEY,
179
+ pattern TEXT NOT NULL UNIQUE,
180
+ confidence REAL NOT NULL,
181
+ usage_count INTEGER NOT NULL DEFAULT 0,
182
+ metadata TEXT,
183
+ ttl INTEGER NOT NULL DEFAULT ${this.TTL_POLICY.patterns},
184
+ expires_at INTEGER,
185
+ created_at INTEGER NOT NULL
186
+ )
187
+ `);
188
+ // Table 6: Consensus State (TTL: 7 days)
189
+ await this.run(`
190
+ CREATE TABLE IF NOT EXISTS consensus_state (
191
+ id TEXT PRIMARY KEY,
192
+ decision TEXT NOT NULL,
193
+ proposer TEXT NOT NULL,
194
+ votes TEXT NOT NULL,
195
+ quorum INTEGER NOT NULL,
196
+ status TEXT NOT NULL,
197
+ version INTEGER NOT NULL DEFAULT 1,
198
+ ttl INTEGER NOT NULL DEFAULT ${this.TTL_POLICY.consensus},
199
+ expires_at INTEGER,
200
+ created_at INTEGER NOT NULL
201
+ )
202
+ `);
203
+ // Table 7: Performance Metrics
204
+ await this.run(`
205
+ CREATE TABLE IF NOT EXISTS performance_metrics (
206
+ id TEXT PRIMARY KEY,
207
+ metric TEXT NOT NULL,
208
+ value REAL NOT NULL,
209
+ unit TEXT NOT NULL,
210
+ timestamp INTEGER NOT NULL,
211
+ agent_id TEXT
212
+ )
213
+ `);
214
+ // Table 8: Artifacts (TTL: never expires)
215
+ await this.run(`
216
+ CREATE TABLE IF NOT EXISTS artifacts (
217
+ id TEXT PRIMARY KEY,
218
+ kind TEXT NOT NULL,
219
+ path TEXT NOT NULL,
220
+ sha256 TEXT NOT NULL,
221
+ tags TEXT NOT NULL,
222
+ metadata TEXT,
223
+ ttl INTEGER NOT NULL DEFAULT ${this.TTL_POLICY.artifacts},
224
+ created_at INTEGER NOT NULL
225
+ )
226
+ `);
227
+ // Table 9: Sessions (for resumability)
228
+ await this.run(`
229
+ CREATE TABLE IF NOT EXISTS sessions (
230
+ id TEXT PRIMARY KEY,
231
+ mode TEXT NOT NULL,
232
+ state TEXT NOT NULL,
233
+ checkpoints TEXT NOT NULL,
234
+ created_at INTEGER NOT NULL,
235
+ last_resumed INTEGER
236
+ )
237
+ `);
238
+ // Table 10: Agent Registry
239
+ await this.run(`
240
+ CREATE TABLE IF NOT EXISTS agent_registry (
241
+ id TEXT PRIMARY KEY,
242
+ type TEXT NOT NULL,
243
+ capabilities TEXT NOT NULL,
244
+ status TEXT NOT NULL,
245
+ performance TEXT NOT NULL,
246
+ created_at INTEGER NOT NULL,
247
+ updated_at INTEGER NOT NULL
248
+ )
249
+ `);
250
+ // Table 11: GOAP State
251
+ await this.run(`
252
+ CREATE TABLE IF NOT EXISTS goap_goals (
253
+ id TEXT PRIMARY KEY,
254
+ conditions TEXT NOT NULL,
255
+ cost INTEGER NOT NULL,
256
+ priority TEXT,
257
+ created_at INTEGER NOT NULL
258
+ )
259
+ `);
260
+ await this.run(`
261
+ CREATE TABLE IF NOT EXISTS goap_actions (
262
+ id TEXT PRIMARY KEY,
263
+ preconditions TEXT NOT NULL,
264
+ effects TEXT NOT NULL,
265
+ cost INTEGER NOT NULL,
266
+ agent_type TEXT,
267
+ created_at INTEGER NOT NULL
268
+ )
269
+ `);
270
+ await this.run(`
271
+ CREATE TABLE IF NOT EXISTS goap_plans (
272
+ id TEXT PRIMARY KEY,
273
+ goal_id TEXT NOT NULL,
274
+ sequence TEXT NOT NULL,
275
+ total_cost INTEGER NOT NULL,
276
+ created_at INTEGER NOT NULL
277
+ )
278
+ `);
279
+ // Table 12: OODA Cycles
280
+ await this.run(`
281
+ CREATE TABLE IF NOT EXISTS ooda_cycles (
282
+ id TEXT PRIMARY KEY,
283
+ phase TEXT NOT NULL,
284
+ observations TEXT,
285
+ orientation TEXT,
286
+ decision TEXT,
287
+ action TEXT,
288
+ timestamp INTEGER NOT NULL,
289
+ completed INTEGER DEFAULT 0,
290
+ result TEXT
291
+ )
292
+ `);
293
+ // Create indexes for performance
294
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_memory_partition ON memory_entries(partition)`);
295
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_memory_expires ON memory_entries(expires_at)`);
296
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_memory_owner ON memory_entries(owner)`);
297
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_memory_access ON memory_entries(access_level)`);
298
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_hints_key ON hints(key)`);
299
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_hints_expires ON hints(expires_at)`);
300
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_acl_owner ON memory_acl(owner)`);
301
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_events_type ON events(type)`);
302
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_events_source ON events(source)`);
303
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_events_expires ON events(expires_at)`);
304
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_workflow_status ON workflow_state(status)`);
305
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_patterns_confidence ON patterns(confidence)`);
306
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_patterns_expires ON patterns(expires_at)`);
307
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_consensus_status ON consensus_state(status)`);
308
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_consensus_expires ON consensus_state(expires_at)`);
309
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_metrics_metric ON performance_metrics(metric)`);
310
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_metrics_agent ON performance_metrics(agent_id)`);
311
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_artifacts_kind ON artifacts(kind)`);
312
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_agent_status ON agent_registry(status)`);
313
+ await this.run(`CREATE INDEX IF NOT EXISTS idx_ooda_phase ON ooda_cycles(phase)`);
314
+ this.initialized = true;
315
+ }
316
+ async store(key, value, options = {}) {
317
+ if (!this.db) {
318
+ throw new Error('Memory manager not initialized');
319
+ }
320
+ const partition = options.partition || 'default';
321
+ const owner = options.owner || 'system';
322
+ const accessLevel = options.accessLevel || AccessControl_1.AccessLevel.PRIVATE;
323
+ const createdAt = Date.now();
324
+ const expiresAt = options.ttl ? createdAt + (options.ttl * 1000) : null;
325
+ const metadata = options.metadata ? JSON.stringify(options.metadata) : null;
326
+ // Check write permission if updating existing entry
327
+ const existing = await this.get(`SELECT owner, access_level, team_id, swarm_id FROM memory_entries WHERE key = ? AND partition = ?`, [key, partition]);
328
+ if (existing && options.owner) {
329
+ // Verify write permission
330
+ const permCheck = this.accessControl.checkPermission({
331
+ agentId: options.owner,
332
+ resourceOwner: existing.owner,
333
+ accessLevel: existing.access_level,
334
+ permission: AccessControl_1.Permission.WRITE,
335
+ teamId: options.teamId,
336
+ resourceTeamId: existing.team_id,
337
+ swarmId: options.swarmId,
338
+ resourceSwarmId: existing.swarm_id
339
+ });
340
+ if (!permCheck.allowed) {
341
+ throw new AccessControl_1.AccessControlError(`Write denied: ${permCheck.reason}`);
342
+ }
343
+ }
344
+ await this.run(`INSERT OR REPLACE INTO memory_entries
345
+ (key, partition, value, metadata, created_at, expires_at, owner, access_level, team_id, swarm_id)
346
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, [
347
+ key,
348
+ partition,
349
+ JSON.stringify(value),
350
+ metadata,
351
+ createdAt,
352
+ expiresAt,
353
+ owner,
354
+ accessLevel,
355
+ options.teamId || null,
356
+ options.swarmId || null
357
+ ]);
358
+ }
359
+ async retrieve(key, options = {}) {
360
+ if (!this.db) {
361
+ throw new Error('Memory manager not initialized');
362
+ }
363
+ const partition = options.partition || 'default';
364
+ const now = Date.now();
365
+ let query = `SELECT value, owner, access_level, team_id, swarm_id
366
+ FROM memory_entries WHERE key = ? AND partition = ?`;
367
+ const params = [key, partition];
368
+ if (!options.includeExpired) {
369
+ query += ` AND (expires_at IS NULL OR expires_at > ?)`;
370
+ params.push(now);
371
+ }
372
+ const row = await this.get(query, params);
373
+ if (!row) {
374
+ return null;
375
+ }
376
+ // Check read permission if agentId provided
377
+ if (options.agentId) {
378
+ const permCheck = this.accessControl.checkPermission({
379
+ agentId: options.agentId,
380
+ resourceOwner: row.owner,
381
+ accessLevel: row.access_level,
382
+ permission: AccessControl_1.Permission.READ,
383
+ teamId: options.teamId,
384
+ resourceTeamId: row.team_id,
385
+ swarmId: options.swarmId,
386
+ resourceSwarmId: row.swarm_id,
387
+ isSystemAgent: options.isSystemAgent
388
+ });
389
+ if (!permCheck.allowed) {
390
+ throw new AccessControl_1.AccessControlError(`Read denied: ${permCheck.reason}`);
391
+ }
392
+ }
393
+ return JSON.parse(row.value);
394
+ }
395
+ async query(pattern, options = {}) {
396
+ if (!this.db) {
397
+ throw new Error('Memory manager not initialized');
398
+ }
399
+ const partition = options.partition || 'default';
400
+ const now = Date.now();
401
+ let query = `SELECT key, value, partition, created_at, expires_at, owner, access_level, team_id, swarm_id
402
+ FROM memory_entries
403
+ WHERE partition = ? AND key LIKE ?`;
404
+ const params = [partition, pattern];
405
+ if (!options.includeExpired) {
406
+ query += ` AND (expires_at IS NULL OR expires_at > ?)`;
407
+ params.push(now);
408
+ }
409
+ const rows = await this.all(query, params);
410
+ // Filter by access control if agentId provided
411
+ const filteredRows = options.agentId
412
+ ? rows.filter((row) => {
413
+ const permCheck = this.accessControl.checkPermission({
414
+ agentId: options.agentId,
415
+ resourceOwner: row.owner,
416
+ accessLevel: row.access_level,
417
+ permission: AccessControl_1.Permission.READ,
418
+ teamId: options.teamId,
419
+ resourceTeamId: row.team_id,
420
+ swarmId: options.swarmId,
421
+ resourceSwarmId: row.swarm_id,
422
+ isSystemAgent: options.isSystemAgent
423
+ });
424
+ return permCheck.allowed;
425
+ })
426
+ : rows;
427
+ return filteredRows.map((row) => ({
428
+ key: row.key,
429
+ value: JSON.parse(row.value),
430
+ partition: row.partition,
431
+ createdAt: row.created_at,
432
+ expiresAt: row.expires_at,
433
+ owner: row.owner,
434
+ accessLevel: row.access_level,
435
+ teamId: row.team_id,
436
+ swarmId: row.swarm_id
437
+ }));
438
+ }
439
+ async delete(key, partition = 'default', options = {}) {
440
+ if (!this.db) {
441
+ throw new Error('Memory manager not initialized');
442
+ }
443
+ // Check delete permission if agentId provided
444
+ if (options.agentId) {
445
+ const row = await this.get(`SELECT owner, access_level, team_id, swarm_id FROM memory_entries WHERE key = ? AND partition = ?`, [key, partition]);
446
+ if (row) {
447
+ const permCheck = this.accessControl.checkPermission({
448
+ agentId: options.agentId,
449
+ resourceOwner: row.owner,
450
+ accessLevel: row.access_level,
451
+ permission: AccessControl_1.Permission.DELETE,
452
+ teamId: options.teamId,
453
+ resourceTeamId: row.team_id,
454
+ swarmId: options.swarmId,
455
+ resourceSwarmId: row.swarm_id,
456
+ isSystemAgent: options.isSystemAgent
457
+ });
458
+ if (!permCheck.allowed) {
459
+ throw new AccessControl_1.AccessControlError(`Delete denied: ${permCheck.reason}`);
460
+ }
461
+ }
462
+ }
463
+ await this.run(`DELETE FROM memory_entries WHERE key = ? AND partition = ?`, [key, partition]);
464
+ // Clean up ACL if exists
465
+ const resourceId = `${partition}:${key}`;
466
+ await this.run(`DELETE FROM memory_acl WHERE resource_id = ?`, [resourceId]);
467
+ this.aclCache.delete(resourceId);
468
+ }
469
+ async clear(partition = 'default') {
470
+ if (!this.db) {
471
+ throw new Error('Memory manager not initialized');
472
+ }
473
+ await this.run(`DELETE FROM memory_entries WHERE partition = ?`, [partition]);
474
+ }
475
+ async postHint(hint) {
476
+ if (!this.db) {
477
+ throw new Error('Memory manager not initialized');
478
+ }
479
+ const createdAt = Date.now();
480
+ const expiresAt = hint.ttl ? createdAt + (hint.ttl * 1000) : null;
481
+ await this.run(`INSERT INTO hints (key, value, created_at, expires_at) VALUES (?, ?, ?, ?)`, [hint.key, JSON.stringify(hint.value), createdAt, expiresAt]);
482
+ }
483
+ async readHints(pattern) {
484
+ if (!this.db) {
485
+ throw new Error('Memory manager not initialized');
486
+ }
487
+ const now = Date.now();
488
+ const rows = await this.all(`SELECT key, value, created_at, expires_at
489
+ FROM hints
490
+ WHERE key LIKE ? AND (expires_at IS NULL OR expires_at > ?)
491
+ ORDER BY created_at DESC`, [pattern, now]);
492
+ return rows.map((row) => ({
493
+ key: row.key,
494
+ value: JSON.parse(row.value),
495
+ createdAt: row.created_at,
496
+ expiresAt: row.expires_at
497
+ }));
498
+ }
499
+ async cleanExpired() {
500
+ if (!this.db) {
501
+ throw new Error('Memory manager not initialized');
502
+ }
503
+ const now = Date.now();
504
+ // Clean memory entries
505
+ await this.run(`DELETE FROM memory_entries WHERE expires_at IS NOT NULL AND expires_at <= ?`, [now]);
506
+ // Clean hints
507
+ await this.run(`DELETE FROM hints WHERE expires_at IS NOT NULL AND expires_at <= ?`, [now]);
508
+ // Clean events
509
+ await this.run(`DELETE FROM events WHERE expires_at IS NOT NULL AND expires_at <= ?`, [now]);
510
+ // Clean patterns
511
+ await this.run(`DELETE FROM patterns WHERE expires_at IS NOT NULL AND expires_at <= ?`, [now]);
512
+ // Clean consensus
513
+ await this.run(`DELETE FROM consensus_state WHERE expires_at IS NOT NULL AND expires_at <= ?`, [now]);
514
+ return 0;
515
+ }
516
+ async close() {
517
+ if (this.db) {
518
+ return new Promise((resolve, reject) => {
519
+ this.db.close((err) => {
520
+ if (err)
521
+ reject(err);
522
+ else {
523
+ this.db = null;
524
+ this.initialized = false;
525
+ resolve();
526
+ }
527
+ });
528
+ });
529
+ }
530
+ }
531
+ async stats() {
532
+ if (!this.db) {
533
+ throw new Error('Memory manager not initialized');
534
+ }
535
+ const entriesCount = await this.get(`SELECT COUNT(*) as count FROM memory_entries`);
536
+ const hintsCount = await this.get(`SELECT COUNT(*) as count FROM hints`);
537
+ const eventsCount = await this.get(`SELECT COUNT(*) as count FROM events`);
538
+ const workflowsCount = await this.get(`SELECT COUNT(*) as count FROM workflow_state`);
539
+ const patternsCount = await this.get(`SELECT COUNT(*) as count FROM patterns`);
540
+ const consensusCount = await this.get(`SELECT COUNT(*) as count FROM consensus_state`);
541
+ const metricsCount = await this.get(`SELECT COUNT(*) as count FROM performance_metrics`);
542
+ const artifactsCount = await this.get(`SELECT COUNT(*) as count FROM artifacts`);
543
+ const sessionsCount = await this.get(`SELECT COUNT(*) as count FROM sessions`);
544
+ const agentsCount = await this.get(`SELECT COUNT(*) as count FROM agent_registry`);
545
+ const goapGoalsCount = await this.get(`SELECT COUNT(*) as count FROM goap_goals`);
546
+ const goapActionsCount = await this.get(`SELECT COUNT(*) as count FROM goap_actions`);
547
+ const goapPlansCount = await this.get(`SELECT COUNT(*) as count FROM goap_plans`);
548
+ const oodaCyclesCount = await this.get(`SELECT COUNT(*) as count FROM ooda_cycles`);
549
+ const partitionsResult = await this.all(`SELECT DISTINCT partition FROM memory_entries`);
550
+ const accessLevelsResult = await this.all(`SELECT access_level, COUNT(*) as count FROM memory_entries GROUP BY access_level`);
551
+ const accessLevels = {};
552
+ accessLevelsResult.forEach(row => {
553
+ accessLevels[row.access_level] = row.count;
554
+ });
555
+ return {
556
+ totalEntries: entriesCount?.count || 0,
557
+ totalHints: hintsCount?.count || 0,
558
+ totalEvents: eventsCount?.count || 0,
559
+ totalWorkflows: workflowsCount?.count || 0,
560
+ totalPatterns: patternsCount?.count || 0,
561
+ totalConsensus: consensusCount?.count || 0,
562
+ totalMetrics: metricsCount?.count || 0,
563
+ totalArtifacts: artifactsCount?.count || 0,
564
+ totalSessions: sessionsCount?.count || 0,
565
+ totalAgents: agentsCount?.count || 0,
566
+ totalGOAPGoals: goapGoalsCount?.count || 0,
567
+ totalGOAPActions: goapActionsCount?.count || 0,
568
+ totalGOAPPlans: goapPlansCount?.count || 0,
569
+ totalOODACycles: oodaCyclesCount?.count || 0,
570
+ partitions: partitionsResult.map((row) => row.partition),
571
+ accessLevels
572
+ };
573
+ }
574
+ // ============================================================================
575
+ // Table 3: Events (TTL: 30 days)
576
+ // ============================================================================
577
+ async storeEvent(event) {
578
+ if (!this.db) {
579
+ throw new Error('Memory manager not initialized');
580
+ }
581
+ const id = event.id || `event-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
582
+ const timestamp = event.timestamp || Date.now();
583
+ const ttl = event.ttl !== undefined ? event.ttl : this.TTL_POLICY.events;
584
+ const expiresAt = ttl > 0 ? timestamp + (ttl * 1000) : null;
585
+ await this.run(`INSERT INTO events (id, type, payload, timestamp, source, ttl, expires_at)
586
+ VALUES (?, ?, ?, ?, ?, ?, ?)`, [id, event.type, JSON.stringify(event.payload), timestamp, event.source, ttl, expiresAt]);
587
+ return id;
588
+ }
589
+ async queryEvents(type) {
590
+ if (!this.db) {
591
+ throw new Error('Memory manager not initialized');
592
+ }
593
+ const now = Date.now();
594
+ const rows = await this.all(`SELECT id, type, payload, timestamp, source, ttl
595
+ FROM events
596
+ WHERE type = ? AND (expires_at IS NULL OR expires_at > ?)
597
+ ORDER BY timestamp DESC`, [type, now]);
598
+ return rows.map((row) => ({
599
+ id: row.id,
600
+ type: row.type,
601
+ payload: JSON.parse(row.payload),
602
+ timestamp: row.timestamp,
603
+ source: row.source,
604
+ ttl: row.ttl
605
+ }));
606
+ }
607
+ async getEventsBySource(source) {
608
+ if (!this.db) {
609
+ throw new Error('Memory manager not initialized');
610
+ }
611
+ const now = Date.now();
612
+ const rows = await this.all(`SELECT id, type, payload, timestamp, source, ttl
613
+ FROM events
614
+ WHERE source = ? AND (expires_at IS NULL OR expires_at > ?)
615
+ ORDER BY timestamp DESC`, [source, now]);
616
+ return rows.map((row) => ({
617
+ id: row.id,
618
+ type: row.type,
619
+ payload: JSON.parse(row.payload),
620
+ timestamp: row.timestamp,
621
+ source: row.source,
622
+ ttl: row.ttl
623
+ }));
624
+ }
625
+ // ============================================================================
626
+ // Table 4: Workflow State (TTL: never expires)
627
+ // ============================================================================
628
+ async storeWorkflowState(workflow) {
629
+ if (!this.db) {
630
+ throw new Error('Memory manager not initialized');
631
+ }
632
+ const now = Date.now();
633
+ const ttl = workflow.ttl !== undefined ? workflow.ttl : this.TTL_POLICY.workflow_state;
634
+ await this.run(`INSERT OR REPLACE INTO workflow_state (id, step, status, checkpoint, sha, ttl, created_at, updated_at)
635
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?)`, [workflow.id, workflow.step, workflow.status, JSON.stringify(workflow.checkpoint), workflow.sha, ttl, now, now]);
636
+ }
637
+ async getWorkflowState(id) {
638
+ if (!this.db) {
639
+ throw new Error('Memory manager not initialized');
640
+ }
641
+ const row = await this.get(`SELECT id, step, status, checkpoint, sha, ttl, created_at, updated_at
642
+ FROM workflow_state
643
+ WHERE id = ?`, [id]);
644
+ if (!row) {
645
+ throw new Error(`Workflow state not found: ${id}`);
646
+ }
647
+ return {
648
+ id: row.id,
649
+ step: row.step,
650
+ status: row.status,
651
+ checkpoint: JSON.parse(row.checkpoint),
652
+ sha: row.sha,
653
+ ttl: row.ttl,
654
+ createdAt: row.created_at,
655
+ updatedAt: row.updated_at
656
+ };
657
+ }
658
+ async updateWorkflowState(id, updates) {
659
+ if (!this.db) {
660
+ throw new Error('Memory manager not initialized');
661
+ }
662
+ const current = await this.getWorkflowState(id);
663
+ const now = Date.now();
664
+ await this.run(`UPDATE workflow_state
665
+ SET step = ?, status = ?, checkpoint = ?, sha = ?, updated_at = ?
666
+ WHERE id = ?`, [
667
+ updates.step || current.step,
668
+ updates.status || current.status,
669
+ JSON.stringify(updates.checkpoint || current.checkpoint),
670
+ updates.sha || current.sha,
671
+ now,
672
+ id
673
+ ]);
674
+ }
675
+ async queryWorkflowsByStatus(status) {
676
+ if (!this.db) {
677
+ throw new Error('Memory manager not initialized');
678
+ }
679
+ const rows = await this.all(`SELECT id, step, status, checkpoint, sha, ttl, created_at, updated_at
680
+ FROM workflow_state
681
+ WHERE status = ?`, [status]);
682
+ return rows.map((row) => ({
683
+ id: row.id,
684
+ step: row.step,
685
+ status: row.status,
686
+ checkpoint: JSON.parse(row.checkpoint),
687
+ sha: row.sha,
688
+ ttl: row.ttl,
689
+ createdAt: row.created_at,
690
+ updatedAt: row.updated_at
691
+ }));
692
+ }
693
+ // ============================================================================
694
+ // Table 5: Patterns (TTL: 7 days)
695
+ // ============================================================================
696
+ async storePattern(pattern) {
697
+ if (!this.db) {
698
+ throw new Error('Memory manager not initialized');
699
+ }
700
+ const id = pattern.id || `pattern-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
701
+ const now = Date.now();
702
+ const ttl = pattern.ttl !== undefined ? pattern.ttl : this.TTL_POLICY.patterns;
703
+ const expiresAt = ttl > 0 ? now + (ttl * 1000) : null;
704
+ await this.run(`INSERT OR REPLACE INTO patterns (id, pattern, confidence, usage_count, metadata, ttl, expires_at, created_at)
705
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?)`, [
706
+ id,
707
+ pattern.pattern,
708
+ pattern.confidence,
709
+ pattern.usageCount,
710
+ pattern.metadata ? JSON.stringify(pattern.metadata) : null,
711
+ ttl,
712
+ expiresAt,
713
+ now
714
+ ]);
715
+ return id;
716
+ }
717
+ async getPattern(patternName) {
718
+ if (!this.db) {
719
+ throw new Error('Memory manager not initialized');
720
+ }
721
+ const now = Date.now();
722
+ const row = await this.get(`SELECT id, pattern, confidence, usage_count, metadata, ttl, created_at
723
+ FROM patterns
724
+ WHERE pattern = ? AND (expires_at IS NULL OR expires_at > ?)`, [patternName, now]);
725
+ if (!row) {
726
+ throw new Error(`Pattern not found: ${patternName}`);
727
+ }
728
+ return {
729
+ id: row.id,
730
+ pattern: row.pattern,
731
+ confidence: row.confidence,
732
+ usageCount: row.usage_count,
733
+ metadata: row.metadata ? JSON.parse(row.metadata) : undefined,
734
+ ttl: row.ttl,
735
+ createdAt: row.created_at
736
+ };
737
+ }
738
+ async incrementPatternUsage(patternName) {
739
+ if (!this.db) {
740
+ throw new Error('Memory manager not initialized');
741
+ }
742
+ await this.run(`UPDATE patterns
743
+ SET usage_count = usage_count + 1
744
+ WHERE pattern = ?`, [patternName]);
745
+ }
746
+ async queryPatternsByConfidence(threshold) {
747
+ if (!this.db) {
748
+ throw new Error('Memory manager not initialized');
749
+ }
750
+ const now = Date.now();
751
+ const rows = await this.all(`SELECT id, pattern, confidence, usage_count, metadata, ttl, created_at
752
+ FROM patterns
753
+ WHERE confidence >= ? AND (expires_at IS NULL OR expires_at > ?)
754
+ ORDER BY confidence DESC`, [threshold, now]);
755
+ return rows.map((row) => ({
756
+ id: row.id,
757
+ pattern: row.pattern,
758
+ confidence: row.confidence,
759
+ usageCount: row.usage_count,
760
+ metadata: row.metadata ? JSON.parse(row.metadata) : undefined,
761
+ ttl: row.ttl,
762
+ createdAt: row.created_at
763
+ }));
764
+ }
765
+ // ============================================================================
766
+ // Table 6: Consensus State (TTL: 7 days)
767
+ // ============================================================================
768
+ async createConsensusProposal(proposal) {
769
+ if (!this.db) {
770
+ throw new Error('Memory manager not initialized');
771
+ }
772
+ const now = Date.now();
773
+ const ttl = proposal.ttl !== undefined ? proposal.ttl : this.TTL_POLICY.consensus;
774
+ const expiresAt = ttl > 0 ? now + (ttl * 1000) : null;
775
+ await this.run(`INSERT INTO consensus_state (id, decision, proposer, votes, quorum, status, version, ttl, expires_at, created_at)
776
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, [
777
+ proposal.id,
778
+ proposal.decision,
779
+ proposal.proposer,
780
+ JSON.stringify(proposal.votes),
781
+ proposal.quorum,
782
+ proposal.status,
783
+ proposal.version || 1,
784
+ ttl,
785
+ expiresAt,
786
+ now
787
+ ]);
788
+ }
789
+ async getConsensusProposal(id) {
790
+ if (!this.db) {
791
+ throw new Error('Memory manager not initialized');
792
+ }
793
+ const now = Date.now();
794
+ const row = await this.get(`SELECT id, decision, proposer, votes, quorum, status, version, ttl, created_at
795
+ FROM consensus_state
796
+ WHERE id = ? AND (expires_at IS NULL OR expires_at > ?)`, [id, now]);
797
+ if (!row) {
798
+ throw new Error(`Consensus proposal not found: ${id}`);
799
+ }
800
+ return {
801
+ id: row.id,
802
+ decision: row.decision,
803
+ proposer: row.proposer,
804
+ votes: JSON.parse(row.votes),
805
+ quorum: row.quorum,
806
+ status: row.status,
807
+ version: row.version,
808
+ ttl: row.ttl,
809
+ createdAt: row.created_at
810
+ };
811
+ }
812
+ async voteOnConsensus(proposalId, agentId) {
813
+ if (!this.db) {
814
+ throw new Error('Memory manager not initialized');
815
+ }
816
+ const proposal = await this.getConsensusProposal(proposalId);
817
+ if (!proposal.votes.includes(agentId)) {
818
+ proposal.votes.push(agentId);
819
+ }
820
+ const approved = proposal.votes.length >= proposal.quorum;
821
+ if (approved) {
822
+ proposal.status = 'approved';
823
+ }
824
+ await this.run(`UPDATE consensus_state
825
+ SET votes = ?, status = ?
826
+ WHERE id = ?`, [JSON.stringify(proposal.votes), proposal.status, proposalId]);
827
+ return approved;
828
+ }
829
+ async queryConsensusProposals(status) {
830
+ if (!this.db) {
831
+ throw new Error('Memory manager not initialized');
832
+ }
833
+ const now = Date.now();
834
+ const rows = await this.all(`SELECT id, decision, proposer, votes, quorum, status, version, ttl, created_at
835
+ FROM consensus_state
836
+ WHERE status = ? AND (expires_at IS NULL OR expires_at > ?)`, [status, now]);
837
+ return rows.map((row) => ({
838
+ id: row.id,
839
+ decision: row.decision,
840
+ proposer: row.proposer,
841
+ votes: JSON.parse(row.votes),
842
+ quorum: row.quorum,
843
+ status: row.status,
844
+ version: row.version,
845
+ ttl: row.ttl,
846
+ createdAt: row.created_at
847
+ }));
848
+ }
849
+ // ============================================================================
850
+ // Table 7: Performance Metrics
851
+ // ============================================================================
852
+ async storePerformanceMetric(metric) {
853
+ if (!this.db) {
854
+ throw new Error('Memory manager not initialized');
855
+ }
856
+ const id = metric.id || `metric-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
857
+ const timestamp = metric.timestamp || Date.now();
858
+ await this.run(`INSERT INTO performance_metrics (id, metric, value, unit, timestamp, agent_id)
859
+ VALUES (?, ?, ?, ?, ?, ?)`, [id, metric.metric, metric.value, metric.unit, timestamp, metric.agentId || null]);
860
+ return id;
861
+ }
862
+ async queryPerformanceMetrics(metricName) {
863
+ if (!this.db) {
864
+ throw new Error('Memory manager not initialized');
865
+ }
866
+ const rows = await this.all(`SELECT id, metric, value, unit, timestamp, agent_id
867
+ FROM performance_metrics
868
+ WHERE metric = ?
869
+ ORDER BY timestamp DESC`, [metricName]);
870
+ return rows.map((row) => ({
871
+ id: row.id,
872
+ metric: row.metric,
873
+ value: row.value,
874
+ unit: row.unit,
875
+ timestamp: row.timestamp,
876
+ agentId: row.agent_id
877
+ }));
878
+ }
879
+ async getMetricsByAgent(agentId) {
880
+ if (!this.db) {
881
+ throw new Error('Memory manager not initialized');
882
+ }
883
+ const rows = await this.all(`SELECT id, metric, value, unit, timestamp, agent_id
884
+ FROM performance_metrics
885
+ WHERE agent_id = ?
886
+ ORDER BY timestamp DESC`, [agentId]);
887
+ return rows.map((row) => ({
888
+ id: row.id,
889
+ metric: row.metric,
890
+ value: row.value,
891
+ unit: row.unit,
892
+ timestamp: row.timestamp,
893
+ agentId: row.agent_id
894
+ }));
895
+ }
896
+ async getAverageMetric(metricName) {
897
+ if (!this.db) {
898
+ throw new Error('Memory manager not initialized');
899
+ }
900
+ const row = await this.get(`SELECT AVG(value) as avg FROM performance_metrics WHERE metric = ?`, [metricName]);
901
+ return row?.avg || 0;
902
+ }
903
+ // ============================================================================
904
+ // Table 8: Artifacts (TTL: never expires)
905
+ // ============================================================================
906
+ async createArtifact(artifact) {
907
+ if (!this.db) {
908
+ throw new Error('Memory manager not initialized');
909
+ }
910
+ const now = Date.now();
911
+ const ttl = artifact.ttl !== undefined ? artifact.ttl : this.TTL_POLICY.artifacts;
912
+ await this.run(`INSERT INTO artifacts (id, kind, path, sha256, tags, metadata, ttl, created_at)
913
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?)`, [
914
+ artifact.id,
915
+ artifact.kind,
916
+ artifact.path,
917
+ artifact.sha256,
918
+ JSON.stringify(artifact.tags),
919
+ artifact.metadata ? JSON.stringify(artifact.metadata) : null,
920
+ ttl,
921
+ now
922
+ ]);
923
+ }
924
+ async getArtifact(id) {
925
+ if (!this.db) {
926
+ throw new Error('Memory manager not initialized');
927
+ }
928
+ const row = await this.get(`SELECT id, kind, path, sha256, tags, metadata, ttl, created_at
929
+ FROM artifacts
930
+ WHERE id = ?`, [id]);
931
+ if (!row) {
932
+ throw new Error(`Artifact not found: ${id}`);
933
+ }
934
+ return {
935
+ id: row.id,
936
+ kind: row.kind,
937
+ path: row.path,
938
+ sha256: row.sha256,
939
+ tags: JSON.parse(row.tags),
940
+ metadata: row.metadata ? JSON.parse(row.metadata) : undefined,
941
+ ttl: row.ttl,
942
+ createdAt: row.created_at
943
+ };
944
+ }
945
+ async queryArtifactsByKind(kind) {
946
+ if (!this.db) {
947
+ throw new Error('Memory manager not initialized');
948
+ }
949
+ const rows = await this.all(`SELECT id, kind, path, sha256, tags, metadata, ttl, created_at
950
+ FROM artifacts
951
+ WHERE kind = ?`, [kind]);
952
+ return rows.map((row) => ({
953
+ id: row.id,
954
+ kind: row.kind,
955
+ path: row.path,
956
+ sha256: row.sha256,
957
+ tags: JSON.parse(row.tags),
958
+ metadata: row.metadata ? JSON.parse(row.metadata) : undefined,
959
+ ttl: row.ttl,
960
+ createdAt: row.created_at
961
+ }));
962
+ }
963
+ async queryArtifactsByTag(tag) {
964
+ if (!this.db) {
965
+ throw new Error('Memory manager not initialized');
966
+ }
967
+ const rows = await this.all(`SELECT id, kind, path, sha256, tags, metadata, ttl, created_at
968
+ FROM artifacts
969
+ WHERE tags LIKE ?`, [`%"${tag}"%`]);
970
+ return rows.map((row) => ({
971
+ id: row.id,
972
+ kind: row.kind,
973
+ path: row.path,
974
+ sha256: row.sha256,
975
+ tags: JSON.parse(row.tags),
976
+ metadata: row.metadata ? JSON.parse(row.metadata) : undefined,
977
+ ttl: row.ttl,
978
+ createdAt: row.created_at
979
+ }));
980
+ }
981
+ // ============================================================================
982
+ // Table 9: Sessions (resumability)
983
+ // ============================================================================
984
+ async createSession(session) {
985
+ if (!this.db) {
986
+ throw new Error('Memory manager not initialized');
987
+ }
988
+ const now = Date.now();
989
+ await this.run(`INSERT INTO sessions (id, mode, state, checkpoints, created_at, last_resumed)
990
+ VALUES (?, ?, ?, ?, ?, ?)`, [
991
+ session.id,
992
+ session.mode,
993
+ JSON.stringify(session.state),
994
+ JSON.stringify(session.checkpoints),
995
+ now,
996
+ null
997
+ ]);
998
+ }
999
+ async getSession(id) {
1000
+ if (!this.db) {
1001
+ throw new Error('Memory manager not initialized');
1002
+ }
1003
+ const row = await this.get(`SELECT id, mode, state, checkpoints, created_at, last_resumed
1004
+ FROM sessions
1005
+ WHERE id = ?`, [id]);
1006
+ if (!row) {
1007
+ throw new Error(`Session not found: ${id}`);
1008
+ }
1009
+ return {
1010
+ id: row.id,
1011
+ mode: row.mode,
1012
+ state: JSON.parse(row.state),
1013
+ checkpoints: JSON.parse(row.checkpoints),
1014
+ createdAt: row.created_at,
1015
+ lastResumed: row.last_resumed
1016
+ };
1017
+ }
1018
+ async addSessionCheckpoint(sessionId, checkpoint) {
1019
+ if (!this.db) {
1020
+ throw new Error('Memory manager not initialized');
1021
+ }
1022
+ const session = await this.getSession(sessionId);
1023
+ session.checkpoints.push(checkpoint);
1024
+ await this.run(`UPDATE sessions
1025
+ SET checkpoints = ?
1026
+ WHERE id = ?`, [JSON.stringify(session.checkpoints), sessionId]);
1027
+ }
1028
+ async getLatestCheckpoint(sessionId) {
1029
+ const session = await this.getSession(sessionId);
1030
+ return session.checkpoints.length > 0
1031
+ ? session.checkpoints[session.checkpoints.length - 1]
1032
+ : undefined;
1033
+ }
1034
+ async markSessionResumed(sessionId) {
1035
+ if (!this.db) {
1036
+ throw new Error('Memory manager not initialized');
1037
+ }
1038
+ const now = Date.now();
1039
+ await this.run(`UPDATE sessions
1040
+ SET last_resumed = ?
1041
+ WHERE id = ?`, [now, sessionId]);
1042
+ }
1043
+ // ============================================================================
1044
+ // Table 10: Agent Registry
1045
+ // ============================================================================
1046
+ async registerAgent(agent) {
1047
+ if (!this.db) {
1048
+ throw new Error('Memory manager not initialized');
1049
+ }
1050
+ const now = Date.now();
1051
+ await this.run(`INSERT INTO agent_registry (id, type, capabilities, status, performance, created_at, updated_at)
1052
+ VALUES (?, ?, ?, ?, ?, ?, ?)`, [
1053
+ agent.id,
1054
+ agent.type,
1055
+ JSON.stringify(agent.capabilities),
1056
+ agent.status,
1057
+ JSON.stringify(agent.performance),
1058
+ now,
1059
+ now
1060
+ ]);
1061
+ }
1062
+ async getAgent(id) {
1063
+ if (!this.db) {
1064
+ throw new Error('Memory manager not initialized');
1065
+ }
1066
+ const row = await this.get(`SELECT id, type, capabilities, status, performance, created_at, updated_at
1067
+ FROM agent_registry
1068
+ WHERE id = ?`, [id]);
1069
+ if (!row) {
1070
+ throw new Error(`Agent not found: ${id}`);
1071
+ }
1072
+ return {
1073
+ id: row.id,
1074
+ type: row.type,
1075
+ capabilities: JSON.parse(row.capabilities),
1076
+ status: row.status,
1077
+ performance: JSON.parse(row.performance),
1078
+ createdAt: row.created_at,
1079
+ updatedAt: row.updated_at
1080
+ };
1081
+ }
1082
+ async updateAgentStatus(agentId, status) {
1083
+ if (!this.db) {
1084
+ throw new Error('Memory manager not initialized');
1085
+ }
1086
+ const now = Date.now();
1087
+ await this.run(`UPDATE agent_registry
1088
+ SET status = ?, updated_at = ?
1089
+ WHERE id = ?`, [status, now, agentId]);
1090
+ }
1091
+ async queryAgentsByStatus(status) {
1092
+ if (!this.db) {
1093
+ throw new Error('Memory manager not initialized');
1094
+ }
1095
+ const rows = await this.all(`SELECT id, type, capabilities, status, performance, created_at, updated_at
1096
+ FROM agent_registry
1097
+ WHERE status = ?`, [status]);
1098
+ return rows.map((row) => ({
1099
+ id: row.id,
1100
+ type: row.type,
1101
+ capabilities: JSON.parse(row.capabilities),
1102
+ status: row.status,
1103
+ performance: JSON.parse(row.performance),
1104
+ createdAt: row.created_at,
1105
+ updatedAt: row.updated_at
1106
+ }));
1107
+ }
1108
+ async updateAgentPerformance(agentId, performance) {
1109
+ if (!this.db) {
1110
+ throw new Error('Memory manager not initialized');
1111
+ }
1112
+ const now = Date.now();
1113
+ await this.run(`UPDATE agent_registry
1114
+ SET performance = ?, updated_at = ?
1115
+ WHERE id = ?`, [JSON.stringify(performance), now, agentId]);
1116
+ }
1117
+ // ============================================================================
1118
+ // Table 11: GOAP State
1119
+ // ============================================================================
1120
+ async storeGOAPGoal(goal) {
1121
+ if (!this.db) {
1122
+ throw new Error('Memory manager not initialized');
1123
+ }
1124
+ const now = Date.now();
1125
+ await this.run(`INSERT INTO goap_goals (id, conditions, cost, priority, created_at)
1126
+ VALUES (?, ?, ?, ?, ?)`, [goal.id, JSON.stringify(goal.conditions), goal.cost, goal.priority || null, now]);
1127
+ }
1128
+ async getGOAPGoal(id) {
1129
+ if (!this.db) {
1130
+ throw new Error('Memory manager not initialized');
1131
+ }
1132
+ const row = await this.get(`SELECT id, conditions, cost, priority, created_at
1133
+ FROM goap_goals
1134
+ WHERE id = ?`, [id]);
1135
+ if (!row) {
1136
+ throw new Error(`GOAP goal not found: ${id}`);
1137
+ }
1138
+ return {
1139
+ id: row.id,
1140
+ conditions: JSON.parse(row.conditions),
1141
+ cost: row.cost,
1142
+ priority: row.priority,
1143
+ createdAt: row.created_at
1144
+ };
1145
+ }
1146
+ async storeGOAPAction(action) {
1147
+ if (!this.db) {
1148
+ throw new Error('Memory manager not initialized');
1149
+ }
1150
+ const now = Date.now();
1151
+ await this.run(`INSERT INTO goap_actions (id, preconditions, effects, cost, agent_type, created_at)
1152
+ VALUES (?, ?, ?, ?, ?, ?)`, [
1153
+ action.id,
1154
+ JSON.stringify(action.preconditions),
1155
+ JSON.stringify(action.effects),
1156
+ action.cost,
1157
+ action.agentType || null,
1158
+ now
1159
+ ]);
1160
+ }
1161
+ async getGOAPAction(id) {
1162
+ if (!this.db) {
1163
+ throw new Error('Memory manager not initialized');
1164
+ }
1165
+ const row = await this.get(`SELECT id, preconditions, effects, cost, agent_type, created_at
1166
+ FROM goap_actions
1167
+ WHERE id = ?`, [id]);
1168
+ if (!row) {
1169
+ throw new Error(`GOAP action not found: ${id}`);
1170
+ }
1171
+ return {
1172
+ id: row.id,
1173
+ preconditions: JSON.parse(row.preconditions),
1174
+ effects: JSON.parse(row.effects),
1175
+ cost: row.cost,
1176
+ agentType: row.agent_type,
1177
+ createdAt: row.created_at
1178
+ };
1179
+ }
1180
+ async storeGOAPPlan(plan) {
1181
+ if (!this.db) {
1182
+ throw new Error('Memory manager not initialized');
1183
+ }
1184
+ const now = Date.now();
1185
+ await this.run(`INSERT INTO goap_plans (id, goal_id, sequence, total_cost, created_at)
1186
+ VALUES (?, ?, ?, ?, ?)`, [plan.id, plan.goalId, JSON.stringify(plan.sequence), plan.totalCost, now]);
1187
+ }
1188
+ async getGOAPPlan(id) {
1189
+ if (!this.db) {
1190
+ throw new Error('Memory manager not initialized');
1191
+ }
1192
+ const row = await this.get(`SELECT id, goal_id, sequence, total_cost, created_at
1193
+ FROM goap_plans
1194
+ WHERE id = ?`, [id]);
1195
+ if (!row) {
1196
+ throw new Error(`GOAP plan not found: ${id}`);
1197
+ }
1198
+ return {
1199
+ id: row.id,
1200
+ goalId: row.goal_id,
1201
+ sequence: JSON.parse(row.sequence),
1202
+ totalCost: row.total_cost,
1203
+ createdAt: row.created_at
1204
+ };
1205
+ }
1206
+ // ============================================================================
1207
+ // Table 12: OODA Cycles
1208
+ // ============================================================================
1209
+ async storeOODACycle(cycle) {
1210
+ if (!this.db) {
1211
+ throw new Error('Memory manager not initialized');
1212
+ }
1213
+ await this.run(`INSERT INTO ooda_cycles (id, phase, observations, orientation, decision, action, timestamp, completed, result)
1214
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`, [
1215
+ cycle.id,
1216
+ cycle.phase,
1217
+ cycle.observations ? JSON.stringify(cycle.observations) : null,
1218
+ cycle.orientation ? JSON.stringify(cycle.orientation) : null,
1219
+ cycle.decision ? JSON.stringify(cycle.decision) : null,
1220
+ cycle.action ? JSON.stringify(cycle.action) : null,
1221
+ cycle.timestamp,
1222
+ cycle.completed ? 1 : 0,
1223
+ cycle.result ? JSON.stringify(cycle.result) : null
1224
+ ]);
1225
+ }
1226
+ async getOODACycle(id) {
1227
+ if (!this.db) {
1228
+ throw new Error('Memory manager not initialized');
1229
+ }
1230
+ const row = await this.get(`SELECT id, phase, observations, orientation, decision, action, timestamp, completed, result
1231
+ FROM ooda_cycles
1232
+ WHERE id = ?`, [id]);
1233
+ if (!row) {
1234
+ throw new Error(`OODA cycle not found: ${id}`);
1235
+ }
1236
+ return {
1237
+ id: row.id,
1238
+ phase: row.phase,
1239
+ observations: row.observations ? JSON.parse(row.observations) : undefined,
1240
+ orientation: row.orientation ? JSON.parse(row.orientation) : undefined,
1241
+ decision: row.decision ? JSON.parse(row.decision) : undefined,
1242
+ action: row.action ? JSON.parse(row.action) : undefined,
1243
+ timestamp: row.timestamp,
1244
+ completed: row.completed === 1,
1245
+ result: row.result ? JSON.parse(row.result) : undefined
1246
+ };
1247
+ }
1248
+ async updateOODAPhase(cycleId, phase, data) {
1249
+ if (!this.db) {
1250
+ throw new Error('Memory manager not initialized');
1251
+ }
1252
+ const fieldMap = {
1253
+ observe: 'observations',
1254
+ orient: 'orientation',
1255
+ decide: 'decision',
1256
+ act: 'action'
1257
+ };
1258
+ const field = fieldMap[phase];
1259
+ await this.run(`UPDATE ooda_cycles
1260
+ SET phase = ?, ${field} = ?
1261
+ WHERE id = ?`, [phase, JSON.stringify(data), cycleId]);
1262
+ }
1263
+ async completeOODACycle(cycleId, result) {
1264
+ if (!this.db) {
1265
+ throw new Error('Memory manager not initialized');
1266
+ }
1267
+ await this.run(`UPDATE ooda_cycles
1268
+ SET completed = 1, result = ?
1269
+ WHERE id = ?`, [JSON.stringify(result), cycleId]);
1270
+ }
1271
+ async queryOODACyclesByPhase(phase) {
1272
+ if (!this.db) {
1273
+ throw new Error('Memory manager not initialized');
1274
+ }
1275
+ const rows = await this.all(`SELECT id, phase, observations, orientation, decision, action, timestamp, completed, result
1276
+ FROM ooda_cycles
1277
+ WHERE phase = ?`, [phase]);
1278
+ return rows.map((row) => ({
1279
+ id: row.id,
1280
+ phase: row.phase,
1281
+ observations: row.observations ? JSON.parse(row.observations) : undefined,
1282
+ orientation: row.orientation ? JSON.parse(row.orientation) : undefined,
1283
+ decision: row.decision ? JSON.parse(row.decision) : undefined,
1284
+ action: row.action ? JSON.parse(row.action) : undefined,
1285
+ timestamp: row.timestamp,
1286
+ completed: row.completed === 1,
1287
+ result: row.result ? JSON.parse(row.result) : undefined
1288
+ }));
1289
+ }
1290
+ // ACL Management Methods
1291
+ /**
1292
+ * Store ACL for a memory entry
1293
+ */
1294
+ async storeACL(acl) {
1295
+ if (!this.db) {
1296
+ throw new Error('Memory manager not initialized');
1297
+ }
1298
+ const grantedPerms = acl.grantedPermissions ? JSON.stringify(acl.grantedPermissions) : null;
1299
+ const blockedAgents = acl.blockedAgents ? JSON.stringify(acl.blockedAgents) : null;
1300
+ await this.run(`INSERT OR REPLACE INTO memory_acl
1301
+ (resource_id, owner, access_level, team_id, swarm_id, granted_permissions, blocked_agents, created_at, updated_at)
1302
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`, [
1303
+ acl.resourceId,
1304
+ acl.owner,
1305
+ acl.accessLevel,
1306
+ acl.teamId || null,
1307
+ acl.swarmId || null,
1308
+ grantedPerms,
1309
+ blockedAgents,
1310
+ acl.createdAt.getTime(),
1311
+ acl.updatedAt.getTime()
1312
+ ]);
1313
+ this.aclCache.set(acl.resourceId, acl);
1314
+ }
1315
+ /**
1316
+ * Retrieve ACL for a memory entry
1317
+ */
1318
+ async getACL(resourceId) {
1319
+ if (!this.db) {
1320
+ throw new Error('Memory manager not initialized');
1321
+ }
1322
+ // Check cache first
1323
+ if (this.aclCache.has(resourceId)) {
1324
+ return this.aclCache.get(resourceId);
1325
+ }
1326
+ const row = await this.get(`SELECT * FROM memory_acl WHERE resource_id = ?`, [resourceId]);
1327
+ if (!row) {
1328
+ return null;
1329
+ }
1330
+ const acl = {
1331
+ resourceId: row.resource_id,
1332
+ owner: row.owner,
1333
+ accessLevel: row.access_level,
1334
+ teamId: row.team_id,
1335
+ swarmId: row.swarm_id,
1336
+ grantedPermissions: row.granted_permissions ? JSON.parse(row.granted_permissions) : undefined,
1337
+ blockedAgents: row.blocked_agents ? JSON.parse(row.blocked_agents) : undefined,
1338
+ createdAt: new Date(row.created_at),
1339
+ updatedAt: new Date(row.updated_at)
1340
+ };
1341
+ this.aclCache.set(resourceId, acl);
1342
+ return acl;
1343
+ }
1344
+ /**
1345
+ * Update ACL for a memory entry
1346
+ */
1347
+ async updateACL(resourceId, updates) {
1348
+ const existing = await this.getACL(resourceId);
1349
+ if (!existing) {
1350
+ throw new Error(`ACL not found for resource: ${resourceId}`);
1351
+ }
1352
+ const updated = this.accessControl.updateACL(existing, updates);
1353
+ await this.storeACL(updated);
1354
+ }
1355
+ /**
1356
+ * Grant permission to an agent
1357
+ */
1358
+ async grantPermission(resourceId, agentId, permissions) {
1359
+ const existing = await this.getACL(resourceId);
1360
+ if (!existing) {
1361
+ throw new Error(`ACL not found for resource: ${resourceId}`);
1362
+ }
1363
+ const updated = this.accessControl.grantPermission(existing, agentId, permissions);
1364
+ await this.storeACL(updated);
1365
+ }
1366
+ /**
1367
+ * Revoke permission from an agent
1368
+ */
1369
+ async revokePermission(resourceId, agentId, permissions) {
1370
+ const existing = await this.getACL(resourceId);
1371
+ if (!existing) {
1372
+ throw new Error(`ACL not found for resource: ${resourceId}`);
1373
+ }
1374
+ const updated = this.accessControl.revokePermission(existing, agentId, permissions);
1375
+ await this.storeACL(updated);
1376
+ }
1377
+ /**
1378
+ * Block an agent from accessing a resource
1379
+ */
1380
+ async blockAgent(resourceId, agentId) {
1381
+ const existing = await this.getACL(resourceId);
1382
+ if (!existing) {
1383
+ throw new Error(`ACL not found for resource: ${resourceId}`);
1384
+ }
1385
+ const updated = this.accessControl.blockAgent(existing, agentId);
1386
+ await this.storeACL(updated);
1387
+ }
1388
+ /**
1389
+ * Unblock an agent
1390
+ */
1391
+ async unblockAgent(resourceId, agentId) {
1392
+ const existing = await this.getACL(resourceId);
1393
+ if (!existing) {
1394
+ throw new Error(`ACL not found for resource: ${resourceId}`);
1395
+ }
1396
+ const updated = this.accessControl.unblockAgent(existing, agentId);
1397
+ await this.storeACL(updated);
1398
+ }
1399
+ /**
1400
+ * Get access control instance for direct usage
1401
+ */
1402
+ getAccessControl() {
1403
+ return this.accessControl;
1404
+ }
1405
+ }
1406
+ exports.SwarmMemoryManager = SwarmMemoryManager;
1407
+ //# sourceMappingURL=SwarmMemoryManager.js.map