agentic-qe 2.7.4 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (519) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/README.md +67 -2
  3. package/dist/cli/commands/agent/spawn.d.ts +12 -1
  4. package/dist/cli/commands/agent/spawn.d.ts.map +1 -1
  5. package/dist/cli/commands/agent/spawn.js +95 -8
  6. package/dist/cli/commands/agent/spawn.js.map +1 -1
  7. package/dist/cli/index.js +91 -0
  8. package/dist/cli/index.js.map +1 -1
  9. package/dist/core/memory/HNSWVectorMemory.js +1 -1
  10. package/dist/edge/adapters/BrowserHNSWAdapter.d.ts +134 -0
  11. package/dist/edge/adapters/BrowserHNSWAdapter.d.ts.map +1 -0
  12. package/dist/edge/adapters/BrowserHNSWAdapter.js +484 -0
  13. package/dist/edge/adapters/BrowserHNSWAdapter.js.map +1 -0
  14. package/dist/edge/adapters/IndexedDBStorage.d.ts +114 -0
  15. package/dist/edge/adapters/IndexedDBStorage.d.ts.map +1 -0
  16. package/dist/edge/adapters/IndexedDBStorage.js +478 -0
  17. package/dist/edge/adapters/IndexedDBStorage.js.map +1 -0
  18. package/dist/edge/adapters/index.d.ts +12 -0
  19. package/dist/edge/adapters/index.d.ts.map +1 -0
  20. package/dist/edge/adapters/index.js +22 -0
  21. package/dist/edge/adapters/index.js.map +1 -0
  22. package/dist/edge/browser/BrowserAgent.d.ts +241 -0
  23. package/dist/edge/browser/BrowserAgent.d.ts.map +1 -0
  24. package/dist/edge/browser/BrowserAgent.js +743 -0
  25. package/dist/edge/browser/BrowserAgent.js.map +1 -0
  26. package/dist/edge/index.d.ts +34 -0
  27. package/dist/edge/index.d.ts.map +1 -0
  28. package/dist/edge/index.js +114 -0
  29. package/dist/edge/index.js.map +1 -0
  30. package/dist/edge/p2p/coordination/CoordinationManager.d.ts +181 -0
  31. package/dist/edge/p2p/coordination/CoordinationManager.d.ts.map +1 -0
  32. package/dist/edge/p2p/coordination/CoordinationManager.js +851 -0
  33. package/dist/edge/p2p/coordination/CoordinationManager.js.map +1 -0
  34. package/dist/edge/p2p/coordination/HealthMonitor.d.ts +143 -0
  35. package/dist/edge/p2p/coordination/HealthMonitor.d.ts.map +1 -0
  36. package/dist/edge/p2p/coordination/HealthMonitor.js +432 -0
  37. package/dist/edge/p2p/coordination/HealthMonitor.js.map +1 -0
  38. package/dist/edge/p2p/coordination/SyncOrchestrator.d.ts +146 -0
  39. package/dist/edge/p2p/coordination/SyncOrchestrator.d.ts.map +1 -0
  40. package/dist/edge/p2p/coordination/SyncOrchestrator.js +783 -0
  41. package/dist/edge/p2p/coordination/SyncOrchestrator.js.map +1 -0
  42. package/dist/edge/p2p/coordination/index.d.ts +70 -0
  43. package/dist/edge/p2p/coordination/index.d.ts.map +1 -0
  44. package/dist/edge/p2p/coordination/index.js +107 -0
  45. package/dist/edge/p2p/coordination/index.js.map +1 -0
  46. package/dist/edge/p2p/coordination/types.d.ts +572 -0
  47. package/dist/edge/p2p/coordination/types.d.ts.map +1 -0
  48. package/dist/edge/p2p/coordination/types.js +366 -0
  49. package/dist/edge/p2p/coordination/types.js.map +1 -0
  50. package/dist/edge/p2p/crdt/CRDTStore.d.ts +324 -0
  51. package/dist/edge/p2p/crdt/CRDTStore.d.ts.map +1 -0
  52. package/dist/edge/p2p/crdt/CRDTStore.js +839 -0
  53. package/dist/edge/p2p/crdt/CRDTStore.js.map +1 -0
  54. package/dist/edge/p2p/crdt/GCounter.d.ts +173 -0
  55. package/dist/edge/p2p/crdt/GCounter.d.ts.map +1 -0
  56. package/dist/edge/p2p/crdt/GCounter.js +394 -0
  57. package/dist/edge/p2p/crdt/GCounter.js.map +1 -0
  58. package/dist/edge/p2p/crdt/LWWRegister.d.ts +200 -0
  59. package/dist/edge/p2p/crdt/LWWRegister.d.ts.map +1 -0
  60. package/dist/edge/p2p/crdt/LWWRegister.js +456 -0
  61. package/dist/edge/p2p/crdt/LWWRegister.js.map +1 -0
  62. package/dist/edge/p2p/crdt/ORSet.d.ts +232 -0
  63. package/dist/edge/p2p/crdt/ORSet.d.ts.map +1 -0
  64. package/dist/edge/p2p/crdt/ORSet.js +723 -0
  65. package/dist/edge/p2p/crdt/ORSet.js.map +1 -0
  66. package/dist/edge/p2p/crdt/PatternCRDT.d.ts +366 -0
  67. package/dist/edge/p2p/crdt/PatternCRDT.d.ts.map +1 -0
  68. package/dist/edge/p2p/crdt/PatternCRDT.js +838 -0
  69. package/dist/edge/p2p/crdt/PatternCRDT.js.map +1 -0
  70. package/dist/edge/p2p/crdt/VectorClock.d.ts +274 -0
  71. package/dist/edge/p2p/crdt/VectorClock.d.ts.map +1 -0
  72. package/dist/edge/p2p/crdt/VectorClock.js +499 -0
  73. package/dist/edge/p2p/crdt/VectorClock.js.map +1 -0
  74. package/dist/edge/p2p/crdt/index.d.ts +87 -0
  75. package/dist/edge/p2p/crdt/index.d.ts.map +1 -0
  76. package/dist/edge/p2p/crdt/index.js +120 -0
  77. package/dist/edge/p2p/crdt/index.js.map +1 -0
  78. package/dist/edge/p2p/crdt/types.d.ts +667 -0
  79. package/dist/edge/p2p/crdt/types.d.ts.map +1 -0
  80. package/dist/edge/p2p/crdt/types.js +208 -0
  81. package/dist/edge/p2p/crdt/types.js.map +1 -0
  82. package/dist/edge/p2p/crypto/Identity.d.ts +139 -0
  83. package/dist/edge/p2p/crypto/Identity.d.ts.map +1 -0
  84. package/dist/edge/p2p/crypto/Identity.js +449 -0
  85. package/dist/edge/p2p/crypto/Identity.js.map +1 -0
  86. package/dist/edge/p2p/crypto/KeyManager.d.ts +196 -0
  87. package/dist/edge/p2p/crypto/KeyManager.d.ts.map +1 -0
  88. package/dist/edge/p2p/crypto/KeyManager.js +576 -0
  89. package/dist/edge/p2p/crypto/KeyManager.js.map +1 -0
  90. package/dist/edge/p2p/crypto/Signer.d.ts +164 -0
  91. package/dist/edge/p2p/crypto/Signer.d.ts.map +1 -0
  92. package/dist/edge/p2p/crypto/Signer.js +357 -0
  93. package/dist/edge/p2p/crypto/Signer.js.map +1 -0
  94. package/dist/edge/p2p/crypto/index.d.ts +90 -0
  95. package/dist/edge/p2p/crypto/index.d.ts.map +1 -0
  96. package/dist/edge/p2p/crypto/index.js +158 -0
  97. package/dist/edge/p2p/crypto/index.js.map +1 -0
  98. package/dist/edge/p2p/crypto/types.d.ts +217 -0
  99. package/dist/edge/p2p/crypto/types.d.ts.map +1 -0
  100. package/dist/edge/p2p/crypto/types.js +42 -0
  101. package/dist/edge/p2p/crypto/types.js.map +1 -0
  102. package/dist/edge/p2p/federated/FederatedCoordinator.d.ts +270 -0
  103. package/dist/edge/p2p/federated/FederatedCoordinator.d.ts.map +1 -0
  104. package/dist/edge/p2p/federated/FederatedCoordinator.js +824 -0
  105. package/dist/edge/p2p/federated/FederatedCoordinator.js.map +1 -0
  106. package/dist/edge/p2p/federated/FederatedRound.d.ts +295 -0
  107. package/dist/edge/p2p/federated/FederatedRound.d.ts.map +1 -0
  108. package/dist/edge/p2p/federated/FederatedRound.js +819 -0
  109. package/dist/edge/p2p/federated/FederatedRound.js.map +1 -0
  110. package/dist/edge/p2p/federated/GradientAggregator.d.ts +226 -0
  111. package/dist/edge/p2p/federated/GradientAggregator.d.ts.map +1 -0
  112. package/dist/edge/p2p/federated/GradientAggregator.js +826 -0
  113. package/dist/edge/p2p/federated/GradientAggregator.js.map +1 -0
  114. package/dist/edge/p2p/federated/ModelManager.d.ts +248 -0
  115. package/dist/edge/p2p/federated/ModelManager.d.ts.map +1 -0
  116. package/dist/edge/p2p/federated/ModelManager.js +724 -0
  117. package/dist/edge/p2p/federated/ModelManager.js.map +1 -0
  118. package/dist/edge/p2p/federated/index.d.ts +65 -0
  119. package/dist/edge/p2p/federated/index.d.ts.map +1 -0
  120. package/dist/edge/p2p/federated/index.js +110 -0
  121. package/dist/edge/p2p/federated/index.js.map +1 -0
  122. package/dist/edge/p2p/federated/types.d.ts +905 -0
  123. package/dist/edge/p2p/federated/types.d.ts.map +1 -0
  124. package/dist/edge/p2p/federated/types.js +339 -0
  125. package/dist/edge/p2p/federated/types.js.map +1 -0
  126. package/dist/edge/p2p/index.d.ts +156 -0
  127. package/dist/edge/p2p/index.d.ts.map +1 -0
  128. package/dist/edge/p2p/index.js +242 -0
  129. package/dist/edge/p2p/index.js.map +1 -0
  130. package/dist/edge/p2p/nat/ConnectivityTester.d.ts +128 -0
  131. package/dist/edge/p2p/nat/ConnectivityTester.d.ts.map +1 -0
  132. package/dist/edge/p2p/nat/ConnectivityTester.js +560 -0
  133. package/dist/edge/p2p/nat/ConnectivityTester.js.map +1 -0
  134. package/dist/edge/p2p/nat/HolePuncher.d.ts +159 -0
  135. package/dist/edge/p2p/nat/HolePuncher.d.ts.map +1 -0
  136. package/dist/edge/p2p/nat/HolePuncher.js +569 -0
  137. package/dist/edge/p2p/nat/HolePuncher.js.map +1 -0
  138. package/dist/edge/p2p/nat/NATDetector.d.ts +109 -0
  139. package/dist/edge/p2p/nat/NATDetector.d.ts.map +1 -0
  140. package/dist/edge/p2p/nat/NATDetector.js +472 -0
  141. package/dist/edge/p2p/nat/NATDetector.js.map +1 -0
  142. package/dist/edge/p2p/nat/TURNManager.d.ts +158 -0
  143. package/dist/edge/p2p/nat/TURNManager.d.ts.map +1 -0
  144. package/dist/edge/p2p/nat/TURNManager.js +547 -0
  145. package/dist/edge/p2p/nat/TURNManager.js.map +1 -0
  146. package/dist/edge/p2p/nat/index.d.ts +74 -0
  147. package/dist/edge/p2p/nat/index.d.ts.map +1 -0
  148. package/dist/edge/p2p/nat/index.js +104 -0
  149. package/dist/edge/p2p/nat/index.js.map +1 -0
  150. package/dist/edge/p2p/nat/types.d.ts +583 -0
  151. package/dist/edge/p2p/nat/types.d.ts.map +1 -0
  152. package/dist/edge/p2p/nat/types.js +267 -0
  153. package/dist/edge/p2p/nat/types.js.map +1 -0
  154. package/dist/edge/p2p/protocol/AgentChannel.d.ts +333 -0
  155. package/dist/edge/p2p/protocol/AgentChannel.d.ts.map +1 -0
  156. package/dist/edge/p2p/protocol/AgentChannel.js +914 -0
  157. package/dist/edge/p2p/protocol/AgentChannel.js.map +1 -0
  158. package/dist/edge/p2p/protocol/MessageEncoder.d.ts +147 -0
  159. package/dist/edge/p2p/protocol/MessageEncoder.d.ts.map +1 -0
  160. package/dist/edge/p2p/protocol/MessageEncoder.js +738 -0
  161. package/dist/edge/p2p/protocol/MessageEncoder.js.map +1 -0
  162. package/dist/edge/p2p/protocol/MessageRouter.d.ts +266 -0
  163. package/dist/edge/p2p/protocol/MessageRouter.d.ts.map +1 -0
  164. package/dist/edge/p2p/protocol/MessageRouter.js +808 -0
  165. package/dist/edge/p2p/protocol/MessageRouter.js.map +1 -0
  166. package/dist/edge/p2p/protocol/ProtocolHandler.d.ts +309 -0
  167. package/dist/edge/p2p/protocol/ProtocolHandler.d.ts.map +1 -0
  168. package/dist/edge/p2p/protocol/ProtocolHandler.js +930 -0
  169. package/dist/edge/p2p/protocol/ProtocolHandler.js.map +1 -0
  170. package/dist/edge/p2p/protocol/index.d.ts +114 -0
  171. package/dist/edge/p2p/protocol/index.d.ts.map +1 -0
  172. package/dist/edge/p2p/protocol/index.js +206 -0
  173. package/dist/edge/p2p/protocol/index.js.map +1 -0
  174. package/dist/edge/p2p/protocol/types.d.ts +737 -0
  175. package/dist/edge/p2p/protocol/types.d.ts.map +1 -0
  176. package/dist/edge/p2p/protocol/types.js +490 -0
  177. package/dist/edge/p2p/protocol/types.js.map +1 -0
  178. package/dist/edge/p2p/sharing/PatternBroadcaster.d.ts +284 -0
  179. package/dist/edge/p2p/sharing/PatternBroadcaster.d.ts.map +1 -0
  180. package/dist/edge/p2p/sharing/PatternBroadcaster.js +644 -0
  181. package/dist/edge/p2p/sharing/PatternBroadcaster.js.map +1 -0
  182. package/dist/edge/p2p/sharing/PatternIndex.d.ts +168 -0
  183. package/dist/edge/p2p/sharing/PatternIndex.d.ts.map +1 -0
  184. package/dist/edge/p2p/sharing/PatternIndex.js +781 -0
  185. package/dist/edge/p2p/sharing/PatternIndex.js.map +1 -0
  186. package/dist/edge/p2p/sharing/PatternSerializer.d.ts +163 -0
  187. package/dist/edge/p2p/sharing/PatternSerializer.d.ts.map +1 -0
  188. package/dist/edge/p2p/sharing/PatternSerializer.js +696 -0
  189. package/dist/edge/p2p/sharing/PatternSerializer.js.map +1 -0
  190. package/dist/edge/p2p/sharing/PatternSyncManager.d.ts +242 -0
  191. package/dist/edge/p2p/sharing/PatternSyncManager.d.ts.map +1 -0
  192. package/dist/edge/p2p/sharing/PatternSyncManager.js +859 -0
  193. package/dist/edge/p2p/sharing/PatternSyncManager.js.map +1 -0
  194. package/dist/edge/p2p/sharing/index.d.ts +90 -0
  195. package/dist/edge/p2p/sharing/index.d.ts.map +1 -0
  196. package/dist/edge/p2p/sharing/index.js +152 -0
  197. package/dist/edge/p2p/sharing/index.js.map +1 -0
  198. package/dist/edge/p2p/sharing/types.d.ts +796 -0
  199. package/dist/edge/p2p/sharing/types.d.ts.map +1 -0
  200. package/dist/edge/p2p/sharing/types.js +264 -0
  201. package/dist/edge/p2p/sharing/types.js.map +1 -0
  202. package/dist/edge/p2p/webrtc/ConnectionPool.d.ts +218 -0
  203. package/dist/edge/p2p/webrtc/ConnectionPool.d.ts.map +1 -0
  204. package/dist/edge/p2p/webrtc/ConnectionPool.js +562 -0
  205. package/dist/edge/p2p/webrtc/ConnectionPool.js.map +1 -0
  206. package/dist/edge/p2p/webrtc/ICEManager.d.ts +171 -0
  207. package/dist/edge/p2p/webrtc/ICEManager.d.ts.map +1 -0
  208. package/dist/edge/p2p/webrtc/ICEManager.js +490 -0
  209. package/dist/edge/p2p/webrtc/ICEManager.js.map +1 -0
  210. package/dist/edge/p2p/webrtc/PeerConnectionManager.d.ts +159 -0
  211. package/dist/edge/p2p/webrtc/PeerConnectionManager.d.ts.map +1 -0
  212. package/dist/edge/p2p/webrtc/PeerConnectionManager.js +735 -0
  213. package/dist/edge/p2p/webrtc/PeerConnectionManager.js.map +1 -0
  214. package/dist/edge/p2p/webrtc/SignalingClient.d.ts +191 -0
  215. package/dist/edge/p2p/webrtc/SignalingClient.d.ts.map +1 -0
  216. package/dist/edge/p2p/webrtc/SignalingClient.js +608 -0
  217. package/dist/edge/p2p/webrtc/SignalingClient.js.map +1 -0
  218. package/dist/edge/p2p/webrtc/index.d.ts +158 -0
  219. package/dist/edge/p2p/webrtc/index.d.ts.map +1 -0
  220. package/dist/edge/p2p/webrtc/index.js +164 -0
  221. package/dist/edge/p2p/webrtc/index.js.map +1 -0
  222. package/dist/edge/p2p/webrtc/types.d.ts +665 -0
  223. package/dist/edge/p2p/webrtc/types.d.ts.map +1 -0
  224. package/dist/edge/p2p/webrtc/types.js +245 -0
  225. package/dist/edge/p2p/webrtc/types.js.map +1 -0
  226. package/dist/edge/server/AgentSpawnAPI.d.ts +98 -0
  227. package/dist/edge/server/AgentSpawnAPI.d.ts.map +1 -0
  228. package/dist/edge/server/AgentSpawnAPI.js +264 -0
  229. package/dist/edge/server/AgentSpawnAPI.js.map +1 -0
  230. package/dist/edge/server/SignalingServer.d.ts +71 -0
  231. package/dist/edge/server/SignalingServer.d.ts.map +1 -0
  232. package/dist/edge/server/SignalingServer.js +429 -0
  233. package/dist/edge/server/SignalingServer.js.map +1 -0
  234. package/dist/edge/server/index.d.ts +64 -0
  235. package/dist/edge/server/index.d.ts.map +1 -0
  236. package/dist/edge/server/index.js +318 -0
  237. package/dist/edge/server/index.js.map +1 -0
  238. package/dist/edge/types/browser-agent.types.d.ts +455 -0
  239. package/dist/edge/types/browser-agent.types.d.ts.map +1 -0
  240. package/dist/edge/types/browser-agent.types.js +116 -0
  241. package/dist/edge/types/browser-agent.types.js.map +1 -0
  242. package/dist/edge/types/index.d.ts +11 -0
  243. package/dist/edge/types/index.d.ts.map +1 -0
  244. package/dist/edge/types/index.js +17 -0
  245. package/dist/edge/types/index.js.map +1 -0
  246. package/dist/edge/types/storage.types.d.ts +207 -0
  247. package/dist/edge/types/storage.types.d.ts.map +1 -0
  248. package/dist/edge/types/storage.types.js +47 -0
  249. package/dist/edge/types/storage.types.js.map +1 -0
  250. package/dist/edge/wasm/shims.d.ts +224 -0
  251. package/dist/edge/wasm/shims.d.ts.map +1 -0
  252. package/dist/edge/wasm/shims.js +667 -0
  253. package/dist/edge/wasm/shims.js.map +1 -0
  254. package/dist/mcp/handlers/NewDomainToolsHandler.d.ts +33 -0
  255. package/dist/mcp/handlers/NewDomainToolsHandler.d.ts.map +1 -0
  256. package/dist/mcp/handlers/NewDomainToolsHandler.js +305 -0
  257. package/dist/mcp/handlers/NewDomainToolsHandler.js.map +1 -0
  258. package/dist/mcp/handlers/filtered/index.d.ts +15 -19
  259. package/dist/mcp/handlers/filtered/index.d.ts.map +1 -1
  260. package/dist/mcp/handlers/filtered/index.js +16 -27
  261. package/dist/mcp/handlers/filtered/index.js.map +1 -1
  262. package/dist/mcp/handlers/integration/index.d.ts +5 -4
  263. package/dist/mcp/handlers/integration/index.d.ts.map +1 -1
  264. package/dist/mcp/handlers/integration/index.js +7 -7
  265. package/dist/mcp/handlers/integration/index.js.map +1 -1
  266. package/dist/mcp/server-instructions.d.ts +1 -1
  267. package/dist/mcp/server-instructions.js +1 -1
  268. package/dist/mcp/server.d.ts.map +1 -1
  269. package/dist/mcp/server.js +14 -0
  270. package/dist/mcp/server.js.map +1 -1
  271. package/dist/mcp/tools.d.ts +8 -0
  272. package/dist/mcp/tools.d.ts.map +1 -1
  273. package/dist/mcp/tools.js +412 -1
  274. package/dist/mcp/tools.js.map +1 -1
  275. package/dist/planning/GOAPPlanner.d.ts +1 -0
  276. package/dist/planning/GOAPPlanner.d.ts.map +1 -1
  277. package/dist/planning/GOAPPlanner.js +12 -0
  278. package/dist/planning/GOAPPlanner.js.map +1 -1
  279. package/package.json +29 -8
  280. package/dist/alerting/AlertManager.d.ts +0 -120
  281. package/dist/alerting/AlertManager.d.ts.map +0 -1
  282. package/dist/alerting/AlertManager.js +0 -345
  283. package/dist/alerting/AlertManager.js.map +0 -1
  284. package/dist/alerting/FeedbackRouter.d.ts +0 -98
  285. package/dist/alerting/FeedbackRouter.d.ts.map +0 -1
  286. package/dist/alerting/FeedbackRouter.js +0 -331
  287. package/dist/alerting/FeedbackRouter.js.map +0 -1
  288. package/dist/alerting/StrategyApplicator.d.ts +0 -120
  289. package/dist/alerting/StrategyApplicator.d.ts.map +0 -1
  290. package/dist/alerting/StrategyApplicator.js +0 -299
  291. package/dist/alerting/StrategyApplicator.js.map +0 -1
  292. package/dist/alerting/index.d.ts +0 -68
  293. package/dist/alerting/index.d.ts.map +0 -1
  294. package/dist/alerting/index.js +0 -112
  295. package/dist/alerting/index.js.map +0 -1
  296. package/dist/alerting/types.d.ts +0 -118
  297. package/dist/alerting/types.d.ts.map +0 -1
  298. package/dist/alerting/types.js +0 -11
  299. package/dist/alerting/types.js.map +0 -1
  300. package/dist/cli/commands/fleet/backup.d.ts +0 -49
  301. package/dist/cli/commands/fleet/backup.d.ts.map +0 -1
  302. package/dist/cli/commands/fleet/backup.js +0 -88
  303. package/dist/cli/commands/fleet/backup.js.map +0 -1
  304. package/dist/cli/commands/fleet/health.d.ts +0 -154
  305. package/dist/cli/commands/fleet/health.d.ts.map +0 -1
  306. package/dist/cli/commands/fleet/health.js +0 -483
  307. package/dist/cli/commands/fleet/health.js.map +0 -1
  308. package/dist/cli/commands/fleet/init.d.ts +0 -11
  309. package/dist/cli/commands/fleet/init.d.ts.map +0 -1
  310. package/dist/cli/commands/fleet/init.js +0 -91
  311. package/dist/cli/commands/fleet/init.js.map +0 -1
  312. package/dist/cli/commands/fleet/logs.d.ts +0 -21
  313. package/dist/cli/commands/fleet/logs.d.ts.map +0 -1
  314. package/dist/cli/commands/fleet/logs.js +0 -267
  315. package/dist/cli/commands/fleet/logs.js.map +0 -1
  316. package/dist/cli/commands/fleet/metrics.d.ts +0 -27
  317. package/dist/cli/commands/fleet/metrics.d.ts.map +0 -1
  318. package/dist/cli/commands/fleet/metrics.js +0 -369
  319. package/dist/cli/commands/fleet/metrics.js.map +0 -1
  320. package/dist/cli/commands/fleet/monitor.d.ts +0 -18
  321. package/dist/cli/commands/fleet/monitor.d.ts.map +0 -1
  322. package/dist/cli/commands/fleet/monitor.js +0 -237
  323. package/dist/cli/commands/fleet/monitor.js.map +0 -1
  324. package/dist/cli/commands/fleet/optimize.d.ts +0 -42
  325. package/dist/cli/commands/fleet/optimize.d.ts.map +0 -1
  326. package/dist/cli/commands/fleet/optimize.js +0 -135
  327. package/dist/cli/commands/fleet/optimize.js.map +0 -1
  328. package/dist/cli/commands/fleet/recover.d.ts +0 -22
  329. package/dist/cli/commands/fleet/recover.d.ts.map +0 -1
  330. package/dist/cli/commands/fleet/recover.js +0 -99
  331. package/dist/cli/commands/fleet/recover.js.map +0 -1
  332. package/dist/cli/commands/fleet/restart.d.ts +0 -18
  333. package/dist/cli/commands/fleet/restart.d.ts.map +0 -1
  334. package/dist/cli/commands/fleet/restart.js +0 -290
  335. package/dist/cli/commands/fleet/restart.js.map +0 -1
  336. package/dist/cli/commands/fleet/scale.d.ts +0 -9
  337. package/dist/cli/commands/fleet/scale.d.ts.map +0 -1
  338. package/dist/cli/commands/fleet/scale.js +0 -77
  339. package/dist/cli/commands/fleet/scale.js.map +0 -1
  340. package/dist/cli/commands/fleet/shutdown.d.ts +0 -19
  341. package/dist/cli/commands/fleet/shutdown.d.ts.map +0 -1
  342. package/dist/cli/commands/fleet/shutdown.js +0 -307
  343. package/dist/cli/commands/fleet/shutdown.js.map +0 -1
  344. package/dist/cli/commands/fleet/status.d.ts +0 -10
  345. package/dist/cli/commands/fleet/status.d.ts.map +0 -1
  346. package/dist/cli/commands/fleet/status.js +0 -97
  347. package/dist/cli/commands/fleet/status.js.map +0 -1
  348. package/dist/cli/commands/fleet/topology.d.ts +0 -23
  349. package/dist/cli/commands/fleet/topology.d.ts.map +0 -1
  350. package/dist/cli/commands/fleet/topology.js +0 -376
  351. package/dist/cli/commands/fleet/topology.js.map +0 -1
  352. package/dist/cli/commands/monitor/alerts.d.ts +0 -45
  353. package/dist/cli/commands/monitor/alerts.d.ts.map +0 -1
  354. package/dist/cli/commands/monitor/alerts.js +0 -168
  355. package/dist/cli/commands/monitor/alerts.js.map +0 -1
  356. package/dist/cli/commands/monitor/analyze.d.ts +0 -49
  357. package/dist/cli/commands/monitor/analyze.d.ts.map +0 -1
  358. package/dist/cli/commands/monitor/analyze.js +0 -209
  359. package/dist/cli/commands/monitor/analyze.js.map +0 -1
  360. package/dist/cli/commands/monitor/compare.d.ts +0 -38
  361. package/dist/cli/commands/monitor/compare.d.ts.map +0 -1
  362. package/dist/cli/commands/monitor/compare.js +0 -177
  363. package/dist/cli/commands/monitor/compare.js.map +0 -1
  364. package/dist/cli/commands/monitor/dashboard.d.ts +0 -34
  365. package/dist/cli/commands/monitor/dashboard.d.ts.map +0 -1
  366. package/dist/cli/commands/monitor/dashboard.js +0 -157
  367. package/dist/cli/commands/monitor/dashboard.js.map +0 -1
  368. package/dist/cli/commands/monitor/export.d.ts +0 -36
  369. package/dist/cli/commands/monitor/export.d.ts.map +0 -1
  370. package/dist/cli/commands/monitor/export.js +0 -157
  371. package/dist/cli/commands/monitor/export.js.map +0 -1
  372. package/dist/cli/commands/monitor/index.d.ts +0 -11
  373. package/dist/cli/commands/monitor/index.d.ts.map +0 -1
  374. package/dist/cli/commands/monitor/index.js +0 -14
  375. package/dist/cli/commands/monitor/index.js.map +0 -1
  376. package/dist/cli/commands/quality/baseline.d.ts +0 -27
  377. package/dist/cli/commands/quality/baseline.d.ts.map +0 -1
  378. package/dist/cli/commands/quality/baseline.js +0 -124
  379. package/dist/cli/commands/quality/baseline.js.map +0 -1
  380. package/dist/cli/commands/quality/compare.d.ts +0 -36
  381. package/dist/cli/commands/quality/compare.d.ts.map +0 -1
  382. package/dist/cli/commands/quality/compare.js +0 -136
  383. package/dist/cli/commands/quality/compare.js.map +0 -1
  384. package/dist/cli/commands/quality/decision.d.ts +0 -81
  385. package/dist/cli/commands/quality/decision.d.ts.map +0 -1
  386. package/dist/cli/commands/quality/decision.js +0 -319
  387. package/dist/cli/commands/quality/decision.js.map +0 -1
  388. package/dist/cli/commands/quality/gate.d.ts +0 -47
  389. package/dist/cli/commands/quality/gate.d.ts.map +0 -1
  390. package/dist/cli/commands/quality/gate.js +0 -205
  391. package/dist/cli/commands/quality/gate.js.map +0 -1
  392. package/dist/cli/commands/quality/index.d.ts +0 -17
  393. package/dist/cli/commands/quality/index.d.ts.map +0 -1
  394. package/dist/cli/commands/quality/index.js +0 -41
  395. package/dist/cli/commands/quality/index.js.map +0 -1
  396. package/dist/cli/commands/quality/policy.d.ts +0 -57
  397. package/dist/cli/commands/quality/policy.d.ts.map +0 -1
  398. package/dist/cli/commands/quality/policy.js +0 -359
  399. package/dist/cli/commands/quality/policy.js.map +0 -1
  400. package/dist/cli/commands/quality/risk.d.ts +0 -41
  401. package/dist/cli/commands/quality/risk.d.ts.map +0 -1
  402. package/dist/cli/commands/quality/risk.js +0 -255
  403. package/dist/cli/commands/quality/risk.js.map +0 -1
  404. package/dist/cli/commands/quality/trends.d.ts +0 -40
  405. package/dist/cli/commands/quality/trends.d.ts.map +0 -1
  406. package/dist/cli/commands/quality/trends.js +0 -122
  407. package/dist/cli/commands/quality/trends.js.map +0 -1
  408. package/dist/cli/commands/quality/validate.d.ts +0 -44
  409. package/dist/cli/commands/quality/validate.d.ts.map +0 -1
  410. package/dist/cli/commands/quality/validate.js +0 -234
  411. package/dist/cli/commands/quality/validate.js.map +0 -1
  412. package/dist/cli/commands/test/analyze-failures.d.ts +0 -39
  413. package/dist/cli/commands/test/analyze-failures.d.ts.map +0 -1
  414. package/dist/cli/commands/test/analyze-failures.js +0 -113
  415. package/dist/cli/commands/test/analyze-failures.js.map +0 -1
  416. package/dist/cli/commands/test/clean.d.ts +0 -3
  417. package/dist/cli/commands/test/clean.d.ts.map +0 -1
  418. package/dist/cli/commands/test/clean.js +0 -148
  419. package/dist/cli/commands/test/clean.js.map +0 -1
  420. package/dist/cli/commands/test/debug.d.ts +0 -3
  421. package/dist/cli/commands/test/debug.d.ts.map +0 -1
  422. package/dist/cli/commands/test/debug.js +0 -167
  423. package/dist/cli/commands/test/debug.js.map +0 -1
  424. package/dist/cli/commands/test/diff.d.ts +0 -3
  425. package/dist/cli/commands/test/diff.d.ts.map +0 -1
  426. package/dist/cli/commands/test/diff.js +0 -195
  427. package/dist/cli/commands/test/diff.js.map +0 -1
  428. package/dist/cli/commands/test/flakiness.d.ts +0 -32
  429. package/dist/cli/commands/test/flakiness.d.ts.map +0 -1
  430. package/dist/cli/commands/test/flakiness.js +0 -121
  431. package/dist/cli/commands/test/flakiness.js.map +0 -1
  432. package/dist/cli/commands/test/index.d.ts +0 -17
  433. package/dist/cli/commands/test/index.d.ts.map +0 -1
  434. package/dist/cli/commands/test/index.js +0 -45
  435. package/dist/cli/commands/test/index.js.map +0 -1
  436. package/dist/cli/commands/test/mutate.d.ts +0 -29
  437. package/dist/cli/commands/test/mutate.d.ts.map +0 -1
  438. package/dist/cli/commands/test/mutate.js +0 -163
  439. package/dist/cli/commands/test/mutate.js.map +0 -1
  440. package/dist/cli/commands/test/parallel.d.ts +0 -3
  441. package/dist/cli/commands/test/parallel.d.ts.map +0 -1
  442. package/dist/cli/commands/test/parallel.js +0 -117
  443. package/dist/cli/commands/test/parallel.js.map +0 -1
  444. package/dist/cli/commands/test/profile.d.ts +0 -3
  445. package/dist/cli/commands/test/profile.d.ts.map +0 -1
  446. package/dist/cli/commands/test/profile.js +0 -156
  447. package/dist/cli/commands/test/profile.js.map +0 -1
  448. package/dist/cli/commands/test/queue.d.ts +0 -3
  449. package/dist/cli/commands/test/queue.d.ts.map +0 -1
  450. package/dist/cli/commands/test/queue.js +0 -140
  451. package/dist/cli/commands/test/queue.js.map +0 -1
  452. package/dist/cli/commands/test/retry.d.ts +0 -3
  453. package/dist/cli/commands/test/retry.d.ts.map +0 -1
  454. package/dist/cli/commands/test/retry.js +0 -105
  455. package/dist/cli/commands/test/retry.js.map +0 -1
  456. package/dist/cli/commands/test/snapshot.d.ts +0 -3
  457. package/dist/cli/commands/test/snapshot.d.ts.map +0 -1
  458. package/dist/cli/commands/test/snapshot.js +0 -176
  459. package/dist/cli/commands/test/snapshot.js.map +0 -1
  460. package/dist/cli/commands/test/trace.d.ts +0 -3
  461. package/dist/cli/commands/test/trace.d.ts.map +0 -1
  462. package/dist/cli/commands/test/trace.js +0 -137
  463. package/dist/cli/commands/test/trace.js.map +0 -1
  464. package/dist/cli/commands/test/watch.d.ts +0 -3
  465. package/dist/cli/commands/test/watch.d.ts.map +0 -1
  466. package/dist/cli/commands/test/watch.js +0 -130
  467. package/dist/cli/commands/test/watch.js.map +0 -1
  468. package/dist/cli/index-spec.d.ts +0 -3
  469. package/dist/cli/index-spec.d.ts.map +0 -1
  470. package/dist/cli/index-spec.js +0 -154
  471. package/dist/cli/index-spec.js.map +0 -1
  472. package/dist/cli/index-working.d.ts +0 -7
  473. package/dist/cli/index-working.d.ts.map +0 -1
  474. package/dist/cli/index-working.js +0 -617
  475. package/dist/cli/index-working.js.map +0 -1
  476. package/dist/mcp/handlers/filtered/coverage-analyzer-filtered.d.ts +0 -83
  477. package/dist/mcp/handlers/filtered/coverage-analyzer-filtered.d.ts.map +0 -1
  478. package/dist/mcp/handlers/filtered/coverage-analyzer-filtered.js +0 -130
  479. package/dist/mcp/handlers/filtered/coverage-analyzer-filtered.js.map +0 -1
  480. package/dist/mcp/handlers/filtered/flaky-detector-filtered.d.ts +0 -58
  481. package/dist/mcp/handlers/filtered/flaky-detector-filtered.d.ts.map +0 -1
  482. package/dist/mcp/handlers/filtered/flaky-detector-filtered.js +0 -84
  483. package/dist/mcp/handlers/filtered/flaky-detector-filtered.js.map +0 -1
  484. package/dist/mcp/handlers/filtered/security-scanner-filtered.d.ts +0 -54
  485. package/dist/mcp/handlers/filtered/security-scanner-filtered.d.ts.map +0 -1
  486. package/dist/mcp/handlers/filtered/security-scanner-filtered.js +0 -73
  487. package/dist/mcp/handlers/filtered/security-scanner-filtered.js.map +0 -1
  488. package/dist/mcp/handlers/integration/contract-validate.d.ts +0 -10
  489. package/dist/mcp/handlers/integration/contract-validate.d.ts.map +0 -1
  490. package/dist/mcp/handlers/integration/contract-validate.js +0 -348
  491. package/dist/mcp/handlers/integration/contract-validate.js.map +0 -1
  492. package/dist/reporting/ResultAggregator.d.ts +0 -107
  493. package/dist/reporting/ResultAggregator.d.ts.map +0 -1
  494. package/dist/reporting/ResultAggregator.js +0 -435
  495. package/dist/reporting/ResultAggregator.js.map +0 -1
  496. package/dist/reporting/index.d.ts +0 -48
  497. package/dist/reporting/index.d.ts.map +0 -1
  498. package/dist/reporting/index.js +0 -154
  499. package/dist/reporting/index.js.map +0 -1
  500. package/dist/reporting/reporters/ControlLoopReporter.d.ts +0 -128
  501. package/dist/reporting/reporters/ControlLoopReporter.d.ts.map +0 -1
  502. package/dist/reporting/reporters/ControlLoopReporter.js +0 -417
  503. package/dist/reporting/reporters/ControlLoopReporter.js.map +0 -1
  504. package/dist/reporting/reporters/HumanReadableReporter.d.ts +0 -140
  505. package/dist/reporting/reporters/HumanReadableReporter.d.ts.map +0 -1
  506. package/dist/reporting/reporters/HumanReadableReporter.js +0 -524
  507. package/dist/reporting/reporters/HumanReadableReporter.js.map +0 -1
  508. package/dist/reporting/reporters/JSONReporter.d.ts +0 -251
  509. package/dist/reporting/reporters/JSONReporter.d.ts.map +0 -1
  510. package/dist/reporting/reporters/JSONReporter.js +0 -325
  511. package/dist/reporting/reporters/JSONReporter.js.map +0 -1
  512. package/dist/reporting/reporters/index.d.ts +0 -14
  513. package/dist/reporting/reporters/index.d.ts.map +0 -1
  514. package/dist/reporting/reporters/index.js +0 -19
  515. package/dist/reporting/reporters/index.js.map +0 -1
  516. package/dist/reporting/types.d.ts +0 -427
  517. package/dist/reporting/types.d.ts.map +0 -1
  518. package/dist/reporting/types.js +0 -12
  519. package/dist/reporting/types.js.map +0 -1
@@ -0,0 +1,905 @@
1
+ /**
2
+ * Federated Learning Infrastructure Types
3
+ *
4
+ * Type definitions for privacy-preserving distributed learning across QE agents.
5
+ * Enables collaborative model training without sharing raw data, using
6
+ * techniques like FedAvg, FedProx, secure aggregation, and differential privacy.
7
+ *
8
+ * @module edge/p2p/federated/types
9
+ * @version 1.0.0
10
+ */
11
+ /**
12
+ * Federated learning protocol version
13
+ */
14
+ export declare const FEDERATED_PROTOCOL_VERSION = "1.0.0";
15
+ /**
16
+ * Default number of local training epochs
17
+ */
18
+ export declare const DEFAULT_LOCAL_EPOCHS = 5;
19
+ /**
20
+ * Default batch size for local training
21
+ */
22
+ export declare const DEFAULT_BATCH_SIZE = 32;
23
+ /**
24
+ * Default learning rate
25
+ */
26
+ export declare const DEFAULT_LEARNING_RATE = 0.01;
27
+ /**
28
+ * Default minimum participation ratio for a round
29
+ */
30
+ export declare const DEFAULT_MIN_PARTICIPATION = 0.3;
31
+ /**
32
+ * Default round timeout in milliseconds (5 minutes)
33
+ */
34
+ export declare const DEFAULT_ROUND_TIMEOUT: number;
35
+ /**
36
+ * Default model checkpoint interval (every 10 rounds)
37
+ */
38
+ export declare const DEFAULT_CHECKPOINT_INTERVAL = 10;
39
+ /**
40
+ * Maximum gradient norm for clipping
41
+ */
42
+ export declare const DEFAULT_GRADIENT_CLIP_NORM = 1;
43
+ /**
44
+ * Default differential privacy epsilon for federated learning
45
+ */
46
+ export declare const FL_DEFAULT_DP_EPSILON = 1;
47
+ /**
48
+ * Default differential privacy delta for federated learning
49
+ */
50
+ export declare const FL_DEFAULT_DP_DELTA = 0.00001;
51
+ /**
52
+ * Maximum model size in bytes (50MB)
53
+ */
54
+ export declare const MAX_MODEL_SIZE: number;
55
+ /**
56
+ * Maximum number of participants per round
57
+ */
58
+ export declare const MAX_PARTICIPANTS_PER_ROUND = 100;
59
+ /**
60
+ * Aggregation strategies for combining model updates
61
+ */
62
+ export declare enum AggregationStrategy {
63
+ /**
64
+ * Federated Averaging: Weighted average based on sample counts
65
+ * McMahan et al., 2017
66
+ */
67
+ FED_AVG = "fed_avg",
68
+ /**
69
+ * Federated Proximal: Adds proximal term for heterogeneous data
70
+ * Li et al., 2020
71
+ */
72
+ FED_PROX = "fed_prox",
73
+ /**
74
+ * Federated Matched Averaging: Layer-wise matching
75
+ * Wang et al., 2020
76
+ */
77
+ FED_MA = "fed_ma",
78
+ /**
79
+ * Weighted median aggregation (Byzantine-resilient)
80
+ */
81
+ WEIGHTED_MEDIAN = "weighted_median",
82
+ /**
83
+ * Trimmed mean (outlier-resistant)
84
+ */
85
+ TRIMMED_MEAN = "trimmed_mean",
86
+ /**
87
+ * Krum aggregation (Byzantine-resilient)
88
+ */
89
+ KRUM = "krum",
90
+ /**
91
+ * Coordinate-wise median
92
+ */
93
+ COORDINATE_MEDIAN = "coordinate_median"
94
+ }
95
+ /**
96
+ * Participant selection strategies
97
+ */
98
+ export declare enum SelectionStrategy {
99
+ /** Random selection */
100
+ RANDOM = "random",
101
+ /** Importance sampling based on data size */
102
+ IMPORTANCE = "importance",
103
+ /** Priority to participants with more diverse data */
104
+ DIVERSITY = "diversity",
105
+ /** Round-robin selection */
106
+ ROUND_ROBIN = "round_robin",
107
+ /** Active learning-based selection */
108
+ ACTIVE = "active",
109
+ /** Power-of-choice selection */
110
+ POWER_OF_CHOICE = "power_of_choice"
111
+ }
112
+ /**
113
+ * Round lifecycle states
114
+ */
115
+ export declare enum RoundStatus {
116
+ /** Round is being prepared */
117
+ PREPARING = "preparing",
118
+ /** Waiting for participants to join */
119
+ AWAITING_PARTICIPANTS = "awaiting_participants",
120
+ /** Round announced, collecting updates */
121
+ ANNOUNCED = "announced",
122
+ /** Collecting model updates */
123
+ COLLECTING = "collecting",
124
+ /** Aggregating updates */
125
+ AGGREGATING = "aggregating",
126
+ /** Distributing aggregated model */
127
+ DISTRIBUTING = "distributing",
128
+ /** Round completed successfully */
129
+ COMPLETED = "completed",
130
+ /** Round failed */
131
+ FAILED = "failed",
132
+ /** Round cancelled */
133
+ CANCELLED = "cancelled",
134
+ /** Round timed out */
135
+ TIMED_OUT = "timed_out"
136
+ }
137
+ /**
138
+ * Model update types
139
+ */
140
+ export declare enum UpdateType {
141
+ /** Full model weights */
142
+ FULL_WEIGHTS = "full_weights",
143
+ /** Gradient deltas only */
144
+ GRADIENTS = "gradients",
145
+ /** Compressed gradients */
146
+ COMPRESSED_GRADIENTS = "compressed_gradients",
147
+ /** Sparse updates (top-k) */
148
+ SPARSE = "sparse",
149
+ /** Quantized updates */
150
+ QUANTIZED = "quantized"
151
+ }
152
+ /**
153
+ * Convergence status
154
+ */
155
+ export declare enum ConvergenceStatus {
156
+ /** Not started */
157
+ NOT_STARTED = "not_started",
158
+ /** Training in progress */
159
+ TRAINING = "training",
160
+ /** Converging */
161
+ CONVERGING = "converging",
162
+ /** Converged */
163
+ CONVERGED = "converged",
164
+ /** Diverging */
165
+ DIVERGING = "diverging",
166
+ /** Plateaued */
167
+ PLATEAUED = "plateaued"
168
+ }
169
+ /**
170
+ * Main federated learning configuration
171
+ */
172
+ export interface FederatedConfig {
173
+ /** Unique identifier for this federated learning session */
174
+ sessionId: string;
175
+ /** Model identifier being trained */
176
+ modelId: string;
177
+ /** Aggregation strategy to use */
178
+ aggregationStrategy: AggregationStrategy;
179
+ /** Participant selection strategy */
180
+ selectionStrategy: SelectionStrategy;
181
+ /** Number of local training epochs */
182
+ localEpochs: number;
183
+ /** Local batch size */
184
+ batchSize: number;
185
+ /** Learning rate */
186
+ learningRate: number;
187
+ /** Minimum participation ratio (0-1) */
188
+ minParticipation: number;
189
+ /** Maximum participants per round */
190
+ maxParticipants: number;
191
+ /** Round timeout in milliseconds */
192
+ roundTimeout: number;
193
+ /** Total number of training rounds */
194
+ totalRounds: number;
195
+ /** Checkpoint interval (save every N rounds) */
196
+ checkpointInterval: number;
197
+ /** Enable gradient clipping */
198
+ enableGradientClipping: boolean;
199
+ /** Gradient clip norm */
200
+ gradientClipNorm: number;
201
+ /** Differential privacy configuration */
202
+ differentialPrivacy?: FLDifferentialPrivacyConfig;
203
+ /** Secure aggregation configuration */
204
+ secureAggregation?: SecureAggregationConfig;
205
+ /** FedProx proximal term (mu) */
206
+ proximalMu?: number;
207
+ /** Model compression configuration */
208
+ compression?: CompressionConfig;
209
+ /** Convergence criteria */
210
+ convergence?: ConvergenceCriteria;
211
+ /** Custom metadata */
212
+ metadata?: Record<string, unknown>;
213
+ }
214
+ /**
215
+ * Differential privacy configuration for federated learning
216
+ */
217
+ export interface FLDifferentialPrivacyConfig {
218
+ /** Enable differential privacy */
219
+ enabled: boolean;
220
+ /** Privacy budget (epsilon) */
221
+ epsilon: number;
222
+ /** Delta parameter */
223
+ delta: number;
224
+ /** Mechanism to use for noise addition */
225
+ mechanism: 'laplace' | 'gaussian';
226
+ /** Sensitivity bound for gradients */
227
+ sensitivity: number;
228
+ /** Clip gradients to this L2 norm */
229
+ clipNorm: number;
230
+ /** Per-round privacy budget */
231
+ perRoundBudget?: number;
232
+ /** Total privacy budget */
233
+ totalBudget?: number;
234
+ /** Track privacy budget usage */
235
+ trackBudget: boolean;
236
+ }
237
+ /**
238
+ * Secure aggregation configuration
239
+ */
240
+ export interface SecureAggregationConfig {
241
+ /** Enable secure aggregation */
242
+ enabled: boolean;
243
+ /** Threshold for secret reconstruction */
244
+ threshold: number;
245
+ /** Total number of shares */
246
+ totalShares: number;
247
+ /** Enable pairwise masking */
248
+ pairwiseMasking: boolean;
249
+ /** Key agreement protocol */
250
+ keyAgreement: 'diffie_hellman' | 'ecdh';
251
+ /** Enable dropout resilience */
252
+ dropoutResilience: boolean;
253
+ /** Maximum dropout rate supported */
254
+ maxDropoutRate: number;
255
+ }
256
+ /**
257
+ * Model compression configuration
258
+ */
259
+ export interface CompressionConfig {
260
+ /** Enable compression */
261
+ enabled: boolean;
262
+ /** Compression type */
263
+ type: 'quantization' | 'sparsification' | 'low_rank' | 'none';
264
+ /** Quantization bits (for quantization type) */
265
+ quantizationBits?: number;
266
+ /** Sparsification ratio (for sparsification type) */
267
+ sparsificationRatio?: number;
268
+ /** Low rank factor (for low_rank type) */
269
+ lowRankFactor?: number;
270
+ /** Error feedback for compression errors */
271
+ errorFeedback: boolean;
272
+ }
273
+ /**
274
+ * Convergence criteria
275
+ */
276
+ export interface ConvergenceCriteria {
277
+ /** Minimum loss improvement threshold */
278
+ minLossImprovement: number;
279
+ /** Patience (rounds without improvement) */
280
+ patience: number;
281
+ /** Target accuracy (if known) */
282
+ targetAccuracy?: number;
283
+ /** Maximum rounds without improvement */
284
+ maxRoundsWithoutImprovement: number;
285
+ /** Early stopping enabled */
286
+ earlyStoppingEnabled: boolean;
287
+ }
288
+ /**
289
+ * Model layer definition
290
+ */
291
+ export interface ModelLayer {
292
+ /** Layer name/identifier */
293
+ name: string;
294
+ /** Layer type (dense, conv, etc.) */
295
+ type: string;
296
+ /** Weight shape */
297
+ shape: number[];
298
+ /** Total number of parameters */
299
+ parameterCount: number;
300
+ /** Data type */
301
+ dtype: 'float32' | 'float16' | 'int8';
302
+ /** Whether layer is trainable */
303
+ trainable: boolean;
304
+ }
305
+ /**
306
+ * Model architecture definition
307
+ */
308
+ export interface ModelArchitecture {
309
+ /** Model identifier */
310
+ modelId: string;
311
+ /** Model name */
312
+ name: string;
313
+ /** Model version */
314
+ version: string;
315
+ /** Layer definitions */
316
+ layers: ModelLayer[];
317
+ /** Total parameter count */
318
+ totalParameters: number;
319
+ /** Trainable parameter count */
320
+ trainableParameters: number;
321
+ /** Input shape */
322
+ inputShape: number[];
323
+ /** Output shape */
324
+ outputShape: number[];
325
+ /** Optimizer configuration */
326
+ optimizer?: OptimizerConfig;
327
+ }
328
+ /**
329
+ * Optimizer configuration
330
+ */
331
+ export interface OptimizerConfig {
332
+ /** Optimizer type */
333
+ type: 'sgd' | 'adam' | 'adamw' | 'rmsprop';
334
+ /** Learning rate */
335
+ learningRate: number;
336
+ /** Momentum (for SGD) */
337
+ momentum?: number;
338
+ /** Beta1 (for Adam) */
339
+ beta1?: number;
340
+ /** Beta2 (for Adam) */
341
+ beta2?: number;
342
+ /** Weight decay */
343
+ weightDecay?: number;
344
+ }
345
+ /**
346
+ * Model weights container
347
+ */
348
+ export interface ModelWeights {
349
+ /** Model identifier */
350
+ modelId: string;
351
+ /** Model version */
352
+ version: string;
353
+ /** Weights by layer name */
354
+ weights: Map<string, Float32Array>;
355
+ /** Biases by layer name (if separate) */
356
+ biases?: Map<string, Float32Array>;
357
+ /** Weight shapes by layer */
358
+ shapes: Map<string, number[]>;
359
+ /** Total size in bytes */
360
+ totalBytes: number;
361
+ /** Checksum for integrity */
362
+ checksum: string;
363
+ /** Timestamp of creation */
364
+ timestamp: number;
365
+ }
366
+ /**
367
+ * Model update from a participant
368
+ */
369
+ export interface ModelUpdate {
370
+ /** Unique update identifier */
371
+ updateId: string;
372
+ /** Participant who generated this update */
373
+ participantId: string;
374
+ /** Round this update belongs to */
375
+ roundId: string;
376
+ /** Type of update */
377
+ updateType: UpdateType;
378
+ /** Gradient vectors or weight deltas by layer */
379
+ deltas: Map<string, Float32Array>;
380
+ /** Number of local samples used */
381
+ sampleCount: number;
382
+ /** Local loss value */
383
+ localLoss: number;
384
+ /** Local accuracy (if applicable) */
385
+ localAccuracy?: number;
386
+ /** Number of local epochs completed */
387
+ localEpochs: number;
388
+ /** Metrics from local training */
389
+ metrics: LocalTrainingMetrics;
390
+ /** Differential privacy noise added */
391
+ dpNoiseAdded?: boolean;
392
+ /** Update signature */
393
+ signature?: string;
394
+ /** Timestamp of creation */
395
+ timestamp: number;
396
+ /** Compressed format (if applicable) */
397
+ compressed?: boolean;
398
+ /** Compression metadata */
399
+ compressionInfo?: CompressionInfo;
400
+ }
401
+ /**
402
+ * Compression metadata
403
+ */
404
+ export interface CompressionInfo {
405
+ /** Original size in bytes */
406
+ originalSize: number;
407
+ /** Compressed size in bytes */
408
+ compressedSize: number;
409
+ /** Compression ratio */
410
+ compressionRatio: number;
411
+ /** Compression type used */
412
+ compressionType: string;
413
+ /** Indices for sparse updates */
414
+ sparseIndices?: Map<string, Uint32Array>;
415
+ }
416
+ /**
417
+ * Local training metrics
418
+ */
419
+ export interface LocalTrainingMetrics {
420
+ /** Training loss history */
421
+ lossHistory: number[];
422
+ /** Final training loss */
423
+ finalLoss: number;
424
+ /** Training accuracy (if applicable) */
425
+ accuracy?: number;
426
+ /** Training time in milliseconds */
427
+ trainingTime: number;
428
+ /** Number of gradient steps */
429
+ gradientSteps: number;
430
+ /** Gradient norms history */
431
+ gradientNorms?: number[];
432
+ /** Memory usage peak */
433
+ peakMemoryUsage?: number;
434
+ }
435
+ /**
436
+ * Participant information
437
+ */
438
+ export interface Participant {
439
+ /** Unique participant identifier */
440
+ participantId: string;
441
+ /** Agent channel for communication */
442
+ channelId?: string;
443
+ /** Number of local samples */
444
+ sampleCount: number;
445
+ /** Participation weight */
446
+ weight: number;
447
+ /** Whether participant has submitted update */
448
+ hasSubmitted: boolean;
449
+ /** When participant joined */
450
+ joinedAt: number;
451
+ /** When participant submitted (if applicable) */
452
+ submittedAt?: number;
453
+ /** Participant's public key for secure aggregation */
454
+ publicKey?: string;
455
+ /** Participant capabilities */
456
+ capabilities: ParticipantCapabilities;
457
+ /** Historical performance */
458
+ history?: ParticipantHistory;
459
+ }
460
+ /**
461
+ * Participant capabilities
462
+ */
463
+ export interface ParticipantCapabilities {
464
+ /** Supports secure aggregation */
465
+ secureAggregation: boolean;
466
+ /** Supports differential privacy */
467
+ differentialPrivacy: boolean;
468
+ /** Supports compression */
469
+ compression: boolean;
470
+ /** Maximum model size supported */
471
+ maxModelSize: number;
472
+ /** Compute capability score */
473
+ computeScore: number;
474
+ }
475
+ /**
476
+ * Participant historical performance
477
+ */
478
+ export interface ParticipantHistory {
479
+ /** Total rounds participated */
480
+ totalRounds: number;
481
+ /** Successful submissions */
482
+ successfulSubmissions: number;
483
+ /** Average submission time */
484
+ avgSubmissionTime: number;
485
+ /** Average loss improvement contribution */
486
+ avgLossContribution: number;
487
+ /** Dropout rate */
488
+ dropoutRate: number;
489
+ /** Trust score */
490
+ trustScore: number;
491
+ }
492
+ /**
493
+ * Round state tracking
494
+ */
495
+ export interface RoundState {
496
+ /** Unique round identifier */
497
+ roundId: string;
498
+ /** Round number (0-indexed) */
499
+ roundNumber: number;
500
+ /** Current round status */
501
+ status: RoundStatus;
502
+ /** Participants in this round */
503
+ participants: Map<string, Participant>;
504
+ /** Received model updates */
505
+ updates: Map<string, ModelUpdate>;
506
+ /** Global model at start of round */
507
+ startingModel: ModelWeights;
508
+ /** Aggregated model (after aggregation) */
509
+ aggregatedModel?: ModelWeights;
510
+ /** Round start timestamp */
511
+ startedAt: number;
512
+ /** Round end timestamp */
513
+ endedAt?: number;
514
+ /** Target number of participants */
515
+ targetParticipants: number;
516
+ /** Minimum required participants */
517
+ minParticipants: number;
518
+ /** Round timeout deadline */
519
+ timeoutAt: number;
520
+ /** Round metrics */
521
+ metrics: RoundMetrics;
522
+ /** Errors encountered */
523
+ errors: RoundError[];
524
+ }
525
+ /**
526
+ * Round metrics
527
+ */
528
+ export interface RoundMetrics {
529
+ /** Number of participants who joined */
530
+ participantsJoined: number;
531
+ /** Number of participants who submitted */
532
+ participantsSubmitted: number;
533
+ /** Participation rate */
534
+ participationRate: number;
535
+ /** Total samples across all participants */
536
+ totalSamples: number;
537
+ /** Aggregated loss */
538
+ aggregatedLoss: number;
539
+ /** Aggregated accuracy (if applicable) */
540
+ aggregatedAccuracy?: number;
541
+ /** Loss improvement from previous round */
542
+ lossImprovement: number;
543
+ /** Round duration in milliseconds */
544
+ duration: number;
545
+ /** Aggregation time in milliseconds */
546
+ aggregationTime?: number;
547
+ /** Communication overhead in bytes */
548
+ communicationBytes: number;
549
+ /** Privacy budget consumed this round */
550
+ privacyBudgetConsumed?: number;
551
+ }
552
+ /**
553
+ * Round error information
554
+ */
555
+ export interface RoundError {
556
+ /** Error type */
557
+ type: string;
558
+ /** Error message */
559
+ message: string;
560
+ /** Participant involved (if applicable) */
561
+ participantId?: string;
562
+ /** Error timestamp */
563
+ timestamp: number;
564
+ /** Stack trace (if available) */
565
+ stack?: string;
566
+ /** Whether error is recoverable */
567
+ recoverable: boolean;
568
+ }
569
+ /**
570
+ * Aggregation result
571
+ */
572
+ export interface AggregationResult {
573
+ /** Aggregated model weights */
574
+ aggregatedWeights: ModelWeights;
575
+ /** Number of updates aggregated */
576
+ updateCount: number;
577
+ /** Total samples represented */
578
+ totalSamples: number;
579
+ /** Aggregation metrics */
580
+ metrics: AggregationMetrics;
581
+ /** Updates that were excluded (outliers, etc.) */
582
+ excludedUpdates: string[];
583
+ /** Aggregation timestamp */
584
+ timestamp: number;
585
+ }
586
+ /**
587
+ * Aggregation metrics
588
+ */
589
+ export interface AggregationMetrics {
590
+ /** Time taken for aggregation (ms) */
591
+ aggregationTime: number;
592
+ /** Weight norm of aggregated model */
593
+ weightNorm: number;
594
+ /** Update variance */
595
+ updateVariance: number;
596
+ /** Outlier score (for Byzantine detection) */
597
+ outlierScore?: number;
598
+ /** Secure aggregation overhead (if used) */
599
+ secureAggregationOverhead?: number;
600
+ }
601
+ /**
602
+ * Privacy budget tracking
603
+ */
604
+ export interface PrivacyBudget {
605
+ /** Total epsilon budget */
606
+ totalEpsilon: number;
607
+ /** Total delta budget */
608
+ totalDelta: number;
609
+ /** Epsilon consumed so far */
610
+ consumedEpsilon: number;
611
+ /** Delta consumed so far */
612
+ consumedDelta: number;
613
+ /** Remaining epsilon */
614
+ remainingEpsilon: number;
615
+ /** Remaining delta */
616
+ remainingDelta: number;
617
+ /** Per-round epsilon consumption history */
618
+ epsilonHistory: number[];
619
+ /** Whether budget is exhausted */
620
+ exhausted: boolean;
621
+ /** Estimated rounds remaining */
622
+ estimatedRoundsRemaining: number;
623
+ }
624
+ /**
625
+ * Federated learning event types
626
+ */
627
+ export declare enum FederatedEventType {
628
+ /** Session started */
629
+ SESSION_STARTED = "session_started",
630
+ /** Session ended */
631
+ SESSION_ENDED = "session_ended",
632
+ /** Round started */
633
+ ROUND_STARTED = "round_started",
634
+ /** Participant joined round */
635
+ PARTICIPANT_JOINED = "participant_joined",
636
+ /** Update received */
637
+ UPDATE_RECEIVED = "update_received",
638
+ /** Aggregation started */
639
+ AGGREGATION_STARTED = "aggregation_started",
640
+ /** Aggregation completed */
641
+ AGGREGATION_COMPLETED = "aggregation_completed",
642
+ /** Model distributed */
643
+ MODEL_DISTRIBUTED = "model_distributed",
644
+ /** Round completed */
645
+ ROUND_COMPLETED = "round_completed",
646
+ /** Round failed */
647
+ ROUND_FAILED = "round_failed",
648
+ /** Round timed out */
649
+ ROUND_TIMED_OUT = "round_timed_out",
650
+ /** Convergence detected */
651
+ CONVERGENCE_DETECTED = "convergence_detected",
652
+ /** Checkpoint saved */
653
+ CHECKPOINT_SAVED = "checkpoint_saved",
654
+ /** Privacy budget warning */
655
+ PRIVACY_BUDGET_WARNING = "privacy_budget_warning",
656
+ /** Privacy budget exhausted */
657
+ PRIVACY_BUDGET_EXHAUSTED = "privacy_budget_exhausted",
658
+ /** Participant dropped */
659
+ PARTICIPANT_DROPPED = "participant_dropped",
660
+ /** Byzantine behavior detected */
661
+ BYZANTINE_DETECTED = "byzantine_detected"
662
+ }
663
+ /**
664
+ * Federated learning event
665
+ */
666
+ export interface FederatedEvent {
667
+ /** Event type */
668
+ type: FederatedEventType;
669
+ /** Event timestamp */
670
+ timestamp: number;
671
+ /** Session identifier */
672
+ sessionId: string;
673
+ /** Round identifier (if applicable) */
674
+ roundId?: string;
675
+ /** Event details */
676
+ details: unknown;
677
+ }
678
+ /**
679
+ * Federated event handler
680
+ */
681
+ export type FederatedEventHandler = (event: FederatedEvent) => void;
682
+ /**
683
+ * Federated learning error codes
684
+ */
685
+ export declare enum FederatedErrorCode {
686
+ /** Invalid configuration */
687
+ INVALID_CONFIG = "INVALID_CONFIG",
688
+ /** Session not found */
689
+ SESSION_NOT_FOUND = "SESSION_NOT_FOUND",
690
+ /** Round not found */
691
+ ROUND_NOT_FOUND = "ROUND_NOT_FOUND",
692
+ /** Participant not found */
693
+ PARTICIPANT_NOT_FOUND = "PARTICIPANT_NOT_FOUND",
694
+ /** Invalid model update */
695
+ INVALID_UPDATE = "INVALID_UPDATE",
696
+ /** Aggregation failed */
697
+ AGGREGATION_FAILED = "AGGREGATION_FAILED",
698
+ /** Round timeout */
699
+ ROUND_TIMEOUT = "ROUND_TIMEOUT",
700
+ /** Insufficient participants */
701
+ INSUFFICIENT_PARTICIPANTS = "INSUFFICIENT_PARTICIPANTS",
702
+ /** Privacy budget exhausted */
703
+ PRIVACY_BUDGET_EXHAUSTED = "PRIVACY_BUDGET_EXHAUSTED",
704
+ /** Model size exceeded */
705
+ MODEL_TOO_LARGE = "MODEL_TOO_LARGE",
706
+ /** Communication error */
707
+ COMMUNICATION_ERROR = "COMMUNICATION_ERROR",
708
+ /** Secure aggregation error */
709
+ SECURE_AGGREGATION_ERROR = "SECURE_AGGREGATION_ERROR",
710
+ /** Byzantine behavior detected */
711
+ BYZANTINE_DETECTED = "BYZANTINE_DETECTED",
712
+ /** Checkpoint error */
713
+ CHECKPOINT_ERROR = "CHECKPOINT_ERROR",
714
+ /** Convergence not reached */
715
+ CONVERGENCE_FAILED = "CONVERGENCE_FAILED",
716
+ /** Model version mismatch */
717
+ VERSION_MISMATCH = "VERSION_MISMATCH"
718
+ }
719
+ /**
720
+ * Federated learning error
721
+ */
722
+ export declare class FederatedError extends Error {
723
+ readonly code: FederatedErrorCode;
724
+ readonly details?: unknown | undefined;
725
+ constructor(message: string, code: FederatedErrorCode, details?: unknown | undefined);
726
+ }
727
+ /**
728
+ * Model checkpoint
729
+ */
730
+ export interface ModelCheckpoint {
731
+ /** Checkpoint identifier */
732
+ checkpointId: string;
733
+ /** Session identifier */
734
+ sessionId: string;
735
+ /** Round number */
736
+ roundNumber: number;
737
+ /** Model weights */
738
+ weights: ModelWeights;
739
+ /** Optimizer state (if needed for resume) */
740
+ optimizerState?: Record<string, Float32Array>;
741
+ /** Training metrics at checkpoint */
742
+ metrics: TrainingMetrics;
743
+ /** Privacy budget at checkpoint */
744
+ privacyBudget?: PrivacyBudget;
745
+ /** Checkpoint timestamp */
746
+ timestamp: number;
747
+ /** Checkpoint size in bytes */
748
+ size: number;
749
+ }
750
+ /**
751
+ * Training metrics summary
752
+ */
753
+ export interface TrainingMetrics {
754
+ /** Current round number */
755
+ currentRound: number;
756
+ /** Total rounds planned */
757
+ totalRounds: number;
758
+ /** Best loss achieved */
759
+ bestLoss: number;
760
+ /** Best round (for best loss) */
761
+ bestRound: number;
762
+ /** Loss history */
763
+ lossHistory: number[];
764
+ /** Accuracy history (if applicable) */
765
+ accuracyHistory?: number[];
766
+ /** Convergence status */
767
+ convergenceStatus: ConvergenceStatus;
768
+ /** Training start time */
769
+ startTime: number;
770
+ /** Total training time */
771
+ totalTrainingTime: number;
772
+ /** Total communication bytes */
773
+ totalCommunicationBytes: number;
774
+ /** Average participation rate */
775
+ avgParticipationRate: number;
776
+ }
777
+ /**
778
+ * Round announcement message
779
+ */
780
+ export interface RoundAnnouncement {
781
+ /** Message type */
782
+ type: 'round_announcement';
783
+ /** Session identifier */
784
+ sessionId: string;
785
+ /** Round identifier */
786
+ roundId: string;
787
+ /** Round number */
788
+ roundNumber: number;
789
+ /** Current global model version */
790
+ modelVersion: string;
791
+ /** Model checksum */
792
+ modelChecksum: string;
793
+ /** Configuration for local training */
794
+ trainingConfig: LocalTrainingConfig;
795
+ /** Deadline for submission */
796
+ deadline: number;
797
+ /** Minimum participants required */
798
+ minParticipants: number;
799
+ }
800
+ /**
801
+ * Local training configuration sent to participants
802
+ */
803
+ export interface LocalTrainingConfig {
804
+ /** Number of local epochs */
805
+ epochs: number;
806
+ /** Batch size */
807
+ batchSize: number;
808
+ /** Learning rate */
809
+ learningRate: number;
810
+ /** Update type expected */
811
+ updateType: UpdateType;
812
+ /** Whether to apply differential privacy locally */
813
+ applyDifferentialPrivacy: boolean;
814
+ /** DP configuration (if applicable) */
815
+ dpConfig?: FLDifferentialPrivacyConfig;
816
+ /** Compression configuration (if applicable) */
817
+ compressionConfig?: CompressionConfig;
818
+ }
819
+ /**
820
+ * Join request from participant
821
+ */
822
+ export interface JoinRequest {
823
+ /** Message type */
824
+ type: 'join_request';
825
+ /** Session identifier */
826
+ sessionId: string;
827
+ /** Round identifier */
828
+ roundId: string;
829
+ /** Participant identifier */
830
+ participantId: string;
831
+ /** Number of local samples */
832
+ sampleCount: number;
833
+ /** Participant capabilities */
834
+ capabilities: ParticipantCapabilities;
835
+ /** Public key for secure aggregation (if applicable) */
836
+ publicKey?: string;
837
+ }
838
+ /**
839
+ * Join response to participant
840
+ */
841
+ export interface JoinResponse {
842
+ /** Message type */
843
+ type: 'join_response';
844
+ /** Whether join was accepted */
845
+ accepted: boolean;
846
+ /** Rejection reason (if not accepted) */
847
+ rejectionReason?: string;
848
+ /** Assigned participant weight */
849
+ weight?: number;
850
+ /** Current global model (or URL to download) */
851
+ model?: ModelWeights | string;
852
+ /** Secret shares for secure aggregation (if applicable) */
853
+ secretShares?: Map<string, Uint8Array>;
854
+ }
855
+ /**
856
+ * Update submission from participant
857
+ */
858
+ export interface UpdateSubmission {
859
+ /** Message type */
860
+ type: 'update_submission';
861
+ /** Session identifier */
862
+ sessionId: string;
863
+ /** Round identifier */
864
+ roundId: string;
865
+ /** The model update */
866
+ update: ModelUpdate;
867
+ }
868
+ /**
869
+ * Aggregation result broadcast
870
+ */
871
+ export interface AggregationBroadcast {
872
+ /** Message type */
873
+ type: 'aggregation_result';
874
+ /** Session identifier */
875
+ sessionId: string;
876
+ /** Round identifier */
877
+ roundId: string;
878
+ /** Aggregated model (or URL to download) */
879
+ model: ModelWeights | string;
880
+ /** Round metrics */
881
+ metrics: RoundMetrics;
882
+ /** Next round info (if continuing) */
883
+ nextRound?: RoundAnnouncement;
884
+ }
885
+ /**
886
+ * Default federated learning configuration
887
+ */
888
+ export declare const DEFAULT_FEDERATED_CONFIG: Partial<FederatedConfig>;
889
+ /**
890
+ * Default differential privacy configuration for federated learning
891
+ */
892
+ export declare const FL_DEFAULT_DP_CONFIG: FLDifferentialPrivacyConfig;
893
+ /**
894
+ * Default secure aggregation configuration
895
+ */
896
+ export declare const DEFAULT_SECURE_AGGREGATION_CONFIG: SecureAggregationConfig;
897
+ /**
898
+ * Default compression configuration
899
+ */
900
+ export declare const DEFAULT_COMPRESSION_CONFIG: CompressionConfig;
901
+ /**
902
+ * Default convergence criteria
903
+ */
904
+ export declare const DEFAULT_CONVERGENCE_CRITERIA: ConvergenceCriteria;
905
+ //# sourceMappingURL=types.d.ts.map