agentic-qe 2.7.4 → 2.8.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 (647) hide show
  1. package/CHANGELOG.md +209 -0
  2. package/README.md +67 -2
  3. package/dist/agents/BaseAgent.d.ts +128 -0
  4. package/dist/agents/BaseAgent.d.ts.map +1 -1
  5. package/dist/agents/BaseAgent.js +256 -0
  6. package/dist/agents/BaseAgent.js.map +1 -1
  7. package/dist/cli/commands/agent/spawn.d.ts +12 -1
  8. package/dist/cli/commands/agent/spawn.d.ts.map +1 -1
  9. package/dist/cli/commands/agent/spawn.js +95 -8
  10. package/dist/cli/commands/agent/spawn.js.map +1 -1
  11. package/dist/cli/commands/supabase/index.d.ts +20 -0
  12. package/dist/cli/commands/supabase/index.d.ts.map +1 -0
  13. package/dist/cli/commands/supabase/index.js +632 -0
  14. package/dist/cli/commands/supabase/index.js.map +1 -0
  15. package/dist/cli/index.js +94 -0
  16. package/dist/cli/index.js.map +1 -1
  17. package/dist/core/memory/HNSWVectorMemory.js +1 -1
  18. package/dist/edge/adapters/BrowserHNSWAdapter.d.ts +134 -0
  19. package/dist/edge/adapters/BrowserHNSWAdapter.d.ts.map +1 -0
  20. package/dist/edge/adapters/BrowserHNSWAdapter.js +484 -0
  21. package/dist/edge/adapters/BrowserHNSWAdapter.js.map +1 -0
  22. package/dist/edge/adapters/IndexedDBStorage.d.ts +114 -0
  23. package/dist/edge/adapters/IndexedDBStorage.d.ts.map +1 -0
  24. package/dist/edge/adapters/IndexedDBStorage.js +478 -0
  25. package/dist/edge/adapters/IndexedDBStorage.js.map +1 -0
  26. package/dist/edge/adapters/index.d.ts +12 -0
  27. package/dist/edge/adapters/index.d.ts.map +1 -0
  28. package/dist/edge/adapters/index.js +22 -0
  29. package/dist/edge/adapters/index.js.map +1 -0
  30. package/dist/edge/browser/BrowserAgent.d.ts +241 -0
  31. package/dist/edge/browser/BrowserAgent.d.ts.map +1 -0
  32. package/dist/edge/browser/BrowserAgent.js +743 -0
  33. package/dist/edge/browser/BrowserAgent.js.map +1 -0
  34. package/dist/edge/index.d.ts +34 -0
  35. package/dist/edge/index.d.ts.map +1 -0
  36. package/dist/edge/index.js +114 -0
  37. package/dist/edge/index.js.map +1 -0
  38. package/dist/edge/p2p/coordination/CoordinationManager.d.ts +181 -0
  39. package/dist/edge/p2p/coordination/CoordinationManager.d.ts.map +1 -0
  40. package/dist/edge/p2p/coordination/CoordinationManager.js +851 -0
  41. package/dist/edge/p2p/coordination/CoordinationManager.js.map +1 -0
  42. package/dist/edge/p2p/coordination/HealthMonitor.d.ts +143 -0
  43. package/dist/edge/p2p/coordination/HealthMonitor.d.ts.map +1 -0
  44. package/dist/edge/p2p/coordination/HealthMonitor.js +432 -0
  45. package/dist/edge/p2p/coordination/HealthMonitor.js.map +1 -0
  46. package/dist/edge/p2p/coordination/SyncOrchestrator.d.ts +146 -0
  47. package/dist/edge/p2p/coordination/SyncOrchestrator.d.ts.map +1 -0
  48. package/dist/edge/p2p/coordination/SyncOrchestrator.js +783 -0
  49. package/dist/edge/p2p/coordination/SyncOrchestrator.js.map +1 -0
  50. package/dist/edge/p2p/coordination/index.d.ts +70 -0
  51. package/dist/edge/p2p/coordination/index.d.ts.map +1 -0
  52. package/dist/edge/p2p/coordination/index.js +107 -0
  53. package/dist/edge/p2p/coordination/index.js.map +1 -0
  54. package/dist/edge/p2p/coordination/types.d.ts +572 -0
  55. package/dist/edge/p2p/coordination/types.d.ts.map +1 -0
  56. package/dist/edge/p2p/coordination/types.js +366 -0
  57. package/dist/edge/p2p/coordination/types.js.map +1 -0
  58. package/dist/edge/p2p/crdt/CRDTStore.d.ts +324 -0
  59. package/dist/edge/p2p/crdt/CRDTStore.d.ts.map +1 -0
  60. package/dist/edge/p2p/crdt/CRDTStore.js +839 -0
  61. package/dist/edge/p2p/crdt/CRDTStore.js.map +1 -0
  62. package/dist/edge/p2p/crdt/GCounter.d.ts +173 -0
  63. package/dist/edge/p2p/crdt/GCounter.d.ts.map +1 -0
  64. package/dist/edge/p2p/crdt/GCounter.js +394 -0
  65. package/dist/edge/p2p/crdt/GCounter.js.map +1 -0
  66. package/dist/edge/p2p/crdt/LWWRegister.d.ts +200 -0
  67. package/dist/edge/p2p/crdt/LWWRegister.d.ts.map +1 -0
  68. package/dist/edge/p2p/crdt/LWWRegister.js +456 -0
  69. package/dist/edge/p2p/crdt/LWWRegister.js.map +1 -0
  70. package/dist/edge/p2p/crdt/ORSet.d.ts +232 -0
  71. package/dist/edge/p2p/crdt/ORSet.d.ts.map +1 -0
  72. package/dist/edge/p2p/crdt/ORSet.js +723 -0
  73. package/dist/edge/p2p/crdt/ORSet.js.map +1 -0
  74. package/dist/edge/p2p/crdt/PatternCRDT.d.ts +366 -0
  75. package/dist/edge/p2p/crdt/PatternCRDT.d.ts.map +1 -0
  76. package/dist/edge/p2p/crdt/PatternCRDT.js +838 -0
  77. package/dist/edge/p2p/crdt/PatternCRDT.js.map +1 -0
  78. package/dist/edge/p2p/crdt/VectorClock.d.ts +274 -0
  79. package/dist/edge/p2p/crdt/VectorClock.d.ts.map +1 -0
  80. package/dist/edge/p2p/crdt/VectorClock.js +499 -0
  81. package/dist/edge/p2p/crdt/VectorClock.js.map +1 -0
  82. package/dist/edge/p2p/crdt/index.d.ts +87 -0
  83. package/dist/edge/p2p/crdt/index.d.ts.map +1 -0
  84. package/dist/edge/p2p/crdt/index.js +120 -0
  85. package/dist/edge/p2p/crdt/index.js.map +1 -0
  86. package/dist/edge/p2p/crdt/types.d.ts +667 -0
  87. package/dist/edge/p2p/crdt/types.d.ts.map +1 -0
  88. package/dist/edge/p2p/crdt/types.js +208 -0
  89. package/dist/edge/p2p/crdt/types.js.map +1 -0
  90. package/dist/edge/p2p/crypto/Identity.d.ts +139 -0
  91. package/dist/edge/p2p/crypto/Identity.d.ts.map +1 -0
  92. package/dist/edge/p2p/crypto/Identity.js +449 -0
  93. package/dist/edge/p2p/crypto/Identity.js.map +1 -0
  94. package/dist/edge/p2p/crypto/KeyManager.d.ts +196 -0
  95. package/dist/edge/p2p/crypto/KeyManager.d.ts.map +1 -0
  96. package/dist/edge/p2p/crypto/KeyManager.js +576 -0
  97. package/dist/edge/p2p/crypto/KeyManager.js.map +1 -0
  98. package/dist/edge/p2p/crypto/Signer.d.ts +164 -0
  99. package/dist/edge/p2p/crypto/Signer.d.ts.map +1 -0
  100. package/dist/edge/p2p/crypto/Signer.js +357 -0
  101. package/dist/edge/p2p/crypto/Signer.js.map +1 -0
  102. package/dist/edge/p2p/crypto/index.d.ts +90 -0
  103. package/dist/edge/p2p/crypto/index.d.ts.map +1 -0
  104. package/dist/edge/p2p/crypto/index.js +158 -0
  105. package/dist/edge/p2p/crypto/index.js.map +1 -0
  106. package/dist/edge/p2p/crypto/types.d.ts +217 -0
  107. package/dist/edge/p2p/crypto/types.d.ts.map +1 -0
  108. package/dist/edge/p2p/crypto/types.js +42 -0
  109. package/dist/edge/p2p/crypto/types.js.map +1 -0
  110. package/dist/edge/p2p/federated/FederatedCoordinator.d.ts +270 -0
  111. package/dist/edge/p2p/federated/FederatedCoordinator.d.ts.map +1 -0
  112. package/dist/edge/p2p/federated/FederatedCoordinator.js +824 -0
  113. package/dist/edge/p2p/federated/FederatedCoordinator.js.map +1 -0
  114. package/dist/edge/p2p/federated/FederatedRound.d.ts +295 -0
  115. package/dist/edge/p2p/federated/FederatedRound.d.ts.map +1 -0
  116. package/dist/edge/p2p/federated/FederatedRound.js +819 -0
  117. package/dist/edge/p2p/federated/FederatedRound.js.map +1 -0
  118. package/dist/edge/p2p/federated/GradientAggregator.d.ts +226 -0
  119. package/dist/edge/p2p/federated/GradientAggregator.d.ts.map +1 -0
  120. package/dist/edge/p2p/federated/GradientAggregator.js +826 -0
  121. package/dist/edge/p2p/federated/GradientAggregator.js.map +1 -0
  122. package/dist/edge/p2p/federated/ModelManager.d.ts +248 -0
  123. package/dist/edge/p2p/federated/ModelManager.d.ts.map +1 -0
  124. package/dist/edge/p2p/federated/ModelManager.js +724 -0
  125. package/dist/edge/p2p/federated/ModelManager.js.map +1 -0
  126. package/dist/edge/p2p/federated/index.d.ts +65 -0
  127. package/dist/edge/p2p/federated/index.d.ts.map +1 -0
  128. package/dist/edge/p2p/federated/index.js +110 -0
  129. package/dist/edge/p2p/federated/index.js.map +1 -0
  130. package/dist/edge/p2p/federated/types.d.ts +905 -0
  131. package/dist/edge/p2p/federated/types.d.ts.map +1 -0
  132. package/dist/edge/p2p/federated/types.js +339 -0
  133. package/dist/edge/p2p/federated/types.js.map +1 -0
  134. package/dist/edge/p2p/index.d.ts +156 -0
  135. package/dist/edge/p2p/index.d.ts.map +1 -0
  136. package/dist/edge/p2p/index.js +242 -0
  137. package/dist/edge/p2p/index.js.map +1 -0
  138. package/dist/edge/p2p/nat/ConnectivityTester.d.ts +128 -0
  139. package/dist/edge/p2p/nat/ConnectivityTester.d.ts.map +1 -0
  140. package/dist/edge/p2p/nat/ConnectivityTester.js +560 -0
  141. package/dist/edge/p2p/nat/ConnectivityTester.js.map +1 -0
  142. package/dist/edge/p2p/nat/HolePuncher.d.ts +159 -0
  143. package/dist/edge/p2p/nat/HolePuncher.d.ts.map +1 -0
  144. package/dist/edge/p2p/nat/HolePuncher.js +569 -0
  145. package/dist/edge/p2p/nat/HolePuncher.js.map +1 -0
  146. package/dist/edge/p2p/nat/NATDetector.d.ts +109 -0
  147. package/dist/edge/p2p/nat/NATDetector.d.ts.map +1 -0
  148. package/dist/edge/p2p/nat/NATDetector.js +472 -0
  149. package/dist/edge/p2p/nat/NATDetector.js.map +1 -0
  150. package/dist/edge/p2p/nat/TURNManager.d.ts +158 -0
  151. package/dist/edge/p2p/nat/TURNManager.d.ts.map +1 -0
  152. package/dist/edge/p2p/nat/TURNManager.js +547 -0
  153. package/dist/edge/p2p/nat/TURNManager.js.map +1 -0
  154. package/dist/edge/p2p/nat/index.d.ts +74 -0
  155. package/dist/edge/p2p/nat/index.d.ts.map +1 -0
  156. package/dist/edge/p2p/nat/index.js +104 -0
  157. package/dist/edge/p2p/nat/index.js.map +1 -0
  158. package/dist/edge/p2p/nat/types.d.ts +583 -0
  159. package/dist/edge/p2p/nat/types.d.ts.map +1 -0
  160. package/dist/edge/p2p/nat/types.js +267 -0
  161. package/dist/edge/p2p/nat/types.js.map +1 -0
  162. package/dist/edge/p2p/protocol/AgentChannel.d.ts +333 -0
  163. package/dist/edge/p2p/protocol/AgentChannel.d.ts.map +1 -0
  164. package/dist/edge/p2p/protocol/AgentChannel.js +914 -0
  165. package/dist/edge/p2p/protocol/AgentChannel.js.map +1 -0
  166. package/dist/edge/p2p/protocol/MessageEncoder.d.ts +147 -0
  167. package/dist/edge/p2p/protocol/MessageEncoder.d.ts.map +1 -0
  168. package/dist/edge/p2p/protocol/MessageEncoder.js +738 -0
  169. package/dist/edge/p2p/protocol/MessageEncoder.js.map +1 -0
  170. package/dist/edge/p2p/protocol/MessageRouter.d.ts +266 -0
  171. package/dist/edge/p2p/protocol/MessageRouter.d.ts.map +1 -0
  172. package/dist/edge/p2p/protocol/MessageRouter.js +808 -0
  173. package/dist/edge/p2p/protocol/MessageRouter.js.map +1 -0
  174. package/dist/edge/p2p/protocol/ProtocolHandler.d.ts +309 -0
  175. package/dist/edge/p2p/protocol/ProtocolHandler.d.ts.map +1 -0
  176. package/dist/edge/p2p/protocol/ProtocolHandler.js +930 -0
  177. package/dist/edge/p2p/protocol/ProtocolHandler.js.map +1 -0
  178. package/dist/edge/p2p/protocol/index.d.ts +114 -0
  179. package/dist/edge/p2p/protocol/index.d.ts.map +1 -0
  180. package/dist/edge/p2p/protocol/index.js +206 -0
  181. package/dist/edge/p2p/protocol/index.js.map +1 -0
  182. package/dist/edge/p2p/protocol/types.d.ts +737 -0
  183. package/dist/edge/p2p/protocol/types.d.ts.map +1 -0
  184. package/dist/edge/p2p/protocol/types.js +490 -0
  185. package/dist/edge/p2p/protocol/types.js.map +1 -0
  186. package/dist/edge/p2p/sharing/PatternBroadcaster.d.ts +284 -0
  187. package/dist/edge/p2p/sharing/PatternBroadcaster.d.ts.map +1 -0
  188. package/dist/edge/p2p/sharing/PatternBroadcaster.js +644 -0
  189. package/dist/edge/p2p/sharing/PatternBroadcaster.js.map +1 -0
  190. package/dist/edge/p2p/sharing/PatternIndex.d.ts +168 -0
  191. package/dist/edge/p2p/sharing/PatternIndex.d.ts.map +1 -0
  192. package/dist/edge/p2p/sharing/PatternIndex.js +781 -0
  193. package/dist/edge/p2p/sharing/PatternIndex.js.map +1 -0
  194. package/dist/edge/p2p/sharing/PatternSerializer.d.ts +163 -0
  195. package/dist/edge/p2p/sharing/PatternSerializer.d.ts.map +1 -0
  196. package/dist/edge/p2p/sharing/PatternSerializer.js +696 -0
  197. package/dist/edge/p2p/sharing/PatternSerializer.js.map +1 -0
  198. package/dist/edge/p2p/sharing/PatternSyncManager.d.ts +242 -0
  199. package/dist/edge/p2p/sharing/PatternSyncManager.d.ts.map +1 -0
  200. package/dist/edge/p2p/sharing/PatternSyncManager.js +859 -0
  201. package/dist/edge/p2p/sharing/PatternSyncManager.js.map +1 -0
  202. package/dist/edge/p2p/sharing/index.d.ts +90 -0
  203. package/dist/edge/p2p/sharing/index.d.ts.map +1 -0
  204. package/dist/edge/p2p/sharing/index.js +152 -0
  205. package/dist/edge/p2p/sharing/index.js.map +1 -0
  206. package/dist/edge/p2p/sharing/types.d.ts +796 -0
  207. package/dist/edge/p2p/sharing/types.d.ts.map +1 -0
  208. package/dist/edge/p2p/sharing/types.js +264 -0
  209. package/dist/edge/p2p/sharing/types.js.map +1 -0
  210. package/dist/edge/p2p/webrtc/ConnectionPool.d.ts +218 -0
  211. package/dist/edge/p2p/webrtc/ConnectionPool.d.ts.map +1 -0
  212. package/dist/edge/p2p/webrtc/ConnectionPool.js +562 -0
  213. package/dist/edge/p2p/webrtc/ConnectionPool.js.map +1 -0
  214. package/dist/edge/p2p/webrtc/ICEManager.d.ts +171 -0
  215. package/dist/edge/p2p/webrtc/ICEManager.d.ts.map +1 -0
  216. package/dist/edge/p2p/webrtc/ICEManager.js +490 -0
  217. package/dist/edge/p2p/webrtc/ICEManager.js.map +1 -0
  218. package/dist/edge/p2p/webrtc/PeerConnectionManager.d.ts +159 -0
  219. package/dist/edge/p2p/webrtc/PeerConnectionManager.d.ts.map +1 -0
  220. package/dist/edge/p2p/webrtc/PeerConnectionManager.js +735 -0
  221. package/dist/edge/p2p/webrtc/PeerConnectionManager.js.map +1 -0
  222. package/dist/edge/p2p/webrtc/SignalingClient.d.ts +191 -0
  223. package/dist/edge/p2p/webrtc/SignalingClient.d.ts.map +1 -0
  224. package/dist/edge/p2p/webrtc/SignalingClient.js +608 -0
  225. package/dist/edge/p2p/webrtc/SignalingClient.js.map +1 -0
  226. package/dist/edge/p2p/webrtc/index.d.ts +158 -0
  227. package/dist/edge/p2p/webrtc/index.d.ts.map +1 -0
  228. package/dist/edge/p2p/webrtc/index.js +164 -0
  229. package/dist/edge/p2p/webrtc/index.js.map +1 -0
  230. package/dist/edge/p2p/webrtc/types.d.ts +665 -0
  231. package/dist/edge/p2p/webrtc/types.d.ts.map +1 -0
  232. package/dist/edge/p2p/webrtc/types.js +245 -0
  233. package/dist/edge/p2p/webrtc/types.js.map +1 -0
  234. package/dist/edge/server/AgentSpawnAPI.d.ts +98 -0
  235. package/dist/edge/server/AgentSpawnAPI.d.ts.map +1 -0
  236. package/dist/edge/server/AgentSpawnAPI.js +264 -0
  237. package/dist/edge/server/AgentSpawnAPI.js.map +1 -0
  238. package/dist/edge/server/SignalingServer.d.ts +71 -0
  239. package/dist/edge/server/SignalingServer.d.ts.map +1 -0
  240. package/dist/edge/server/SignalingServer.js +429 -0
  241. package/dist/edge/server/SignalingServer.js.map +1 -0
  242. package/dist/edge/server/index.d.ts +64 -0
  243. package/dist/edge/server/index.d.ts.map +1 -0
  244. package/dist/edge/server/index.js +318 -0
  245. package/dist/edge/server/index.js.map +1 -0
  246. package/dist/edge/types/browser-agent.types.d.ts +455 -0
  247. package/dist/edge/types/browser-agent.types.d.ts.map +1 -0
  248. package/dist/edge/types/browser-agent.types.js +116 -0
  249. package/dist/edge/types/browser-agent.types.js.map +1 -0
  250. package/dist/edge/types/index.d.ts +11 -0
  251. package/dist/edge/types/index.d.ts.map +1 -0
  252. package/dist/edge/types/index.js +17 -0
  253. package/dist/edge/types/index.js.map +1 -0
  254. package/dist/edge/types/storage.types.d.ts +207 -0
  255. package/dist/edge/types/storage.types.d.ts.map +1 -0
  256. package/dist/edge/types/storage.types.js +47 -0
  257. package/dist/edge/types/storage.types.js.map +1 -0
  258. package/dist/edge/wasm/shims.d.ts +224 -0
  259. package/dist/edge/wasm/shims.d.ts.map +1 -0
  260. package/dist/edge/wasm/shims.js +667 -0
  261. package/dist/edge/wasm/shims.js.map +1 -0
  262. package/dist/mcp/handlers/NewDomainToolsHandler.d.ts +33 -0
  263. package/dist/mcp/handlers/NewDomainToolsHandler.d.ts.map +1 -0
  264. package/dist/mcp/handlers/NewDomainToolsHandler.js +305 -0
  265. package/dist/mcp/handlers/NewDomainToolsHandler.js.map +1 -0
  266. package/dist/mcp/handlers/filtered/index.d.ts +15 -19
  267. package/dist/mcp/handlers/filtered/index.d.ts.map +1 -1
  268. package/dist/mcp/handlers/filtered/index.js +16 -27
  269. package/dist/mcp/handlers/filtered/index.js.map +1 -1
  270. package/dist/mcp/handlers/integration/index.d.ts +5 -4
  271. package/dist/mcp/handlers/integration/index.d.ts.map +1 -1
  272. package/dist/mcp/handlers/integration/index.js +7 -7
  273. package/dist/mcp/handlers/integration/index.js.map +1 -1
  274. package/dist/mcp/handlers/ruvector/RuVectorHandler.d.ts +54 -0
  275. package/dist/mcp/handlers/ruvector/RuVectorHandler.d.ts.map +1 -0
  276. package/dist/mcp/handlers/ruvector/RuVectorHandler.js +325 -0
  277. package/dist/mcp/handlers/ruvector/RuVectorHandler.js.map +1 -0
  278. package/dist/mcp/handlers/ruvector/index.d.ts +5 -0
  279. package/dist/mcp/handlers/ruvector/index.d.ts.map +1 -0
  280. package/dist/mcp/handlers/ruvector/index.js +9 -0
  281. package/dist/mcp/handlers/ruvector/index.js.map +1 -0
  282. package/dist/mcp/server-instructions.d.ts +1 -1
  283. package/dist/mcp/server-instructions.js +1 -1
  284. package/dist/mcp/server.d.ts.map +1 -1
  285. package/dist/mcp/server.js +114 -22
  286. package/dist/mcp/server.js.map +1 -1
  287. package/dist/mcp/tools.d.ts +8 -0
  288. package/dist/mcp/tools.d.ts.map +1 -1
  289. package/dist/mcp/tools.js +412 -1
  290. package/dist/mcp/tools.js.map +1 -1
  291. package/dist/nervous-system/adapters/BTSPAdapter.d.ts +342 -0
  292. package/dist/nervous-system/adapters/BTSPAdapter.d.ts.map +1 -0
  293. package/dist/nervous-system/adapters/BTSPAdapter.js +494 -0
  294. package/dist/nervous-system/adapters/BTSPAdapter.js.map +1 -0
  295. package/dist/nervous-system/adapters/CircadianController.d.ts +560 -0
  296. package/dist/nervous-system/adapters/CircadianController.d.ts.map +1 -0
  297. package/dist/nervous-system/adapters/CircadianController.js +882 -0
  298. package/dist/nervous-system/adapters/CircadianController.js.map +1 -0
  299. package/dist/nervous-system/adapters/GlobalWorkspaceAdapter.d.ts +337 -0
  300. package/dist/nervous-system/adapters/GlobalWorkspaceAdapter.d.ts.map +1 -0
  301. package/dist/nervous-system/adapters/GlobalWorkspaceAdapter.js +532 -0
  302. package/dist/nervous-system/adapters/GlobalWorkspaceAdapter.js.map +1 -0
  303. package/dist/nervous-system/adapters/HdcMemoryAdapter.d.ts +444 -0
  304. package/dist/nervous-system/adapters/HdcMemoryAdapter.d.ts.map +1 -0
  305. package/dist/nervous-system/adapters/HdcMemoryAdapter.js +715 -0
  306. package/dist/nervous-system/adapters/HdcMemoryAdapter.js.map +1 -0
  307. package/dist/nervous-system/adapters/ReflexLayer.d.ts +231 -0
  308. package/dist/nervous-system/adapters/ReflexLayer.d.ts.map +1 -0
  309. package/dist/nervous-system/adapters/ReflexLayer.js +309 -0
  310. package/dist/nervous-system/adapters/ReflexLayer.js.map +1 -0
  311. package/dist/nervous-system/index.d.ts +25 -0
  312. package/dist/nervous-system/index.d.ts.map +1 -0
  313. package/dist/nervous-system/index.js +80 -0
  314. package/dist/nervous-system/index.js.map +1 -0
  315. package/dist/nervous-system/integration/BTSPLearningEngine.d.ts +266 -0
  316. package/dist/nervous-system/integration/BTSPLearningEngine.d.ts.map +1 -0
  317. package/dist/nervous-system/integration/BTSPLearningEngine.js +587 -0
  318. package/dist/nervous-system/integration/BTSPLearningEngine.js.map +1 -0
  319. package/dist/nervous-system/integration/CircadianAgent.d.ts +389 -0
  320. package/dist/nervous-system/integration/CircadianAgent.d.ts.map +1 -0
  321. package/dist/nervous-system/integration/CircadianAgent.js +696 -0
  322. package/dist/nervous-system/integration/CircadianAgent.js.map +1 -0
  323. package/dist/nervous-system/integration/HybridPatternStore.d.ts +244 -0
  324. package/dist/nervous-system/integration/HybridPatternStore.d.ts.map +1 -0
  325. package/dist/nervous-system/integration/HybridPatternStore.js +622 -0
  326. package/dist/nervous-system/integration/HybridPatternStore.js.map +1 -0
  327. package/dist/nervous-system/integration/NervousSystemEnhancement.d.ts +459 -0
  328. package/dist/nervous-system/integration/NervousSystemEnhancement.d.ts.map +1 -0
  329. package/dist/nervous-system/integration/NervousSystemEnhancement.js +921 -0
  330. package/dist/nervous-system/integration/NervousSystemEnhancement.js.map +1 -0
  331. package/dist/nervous-system/integration/WorkspaceAgent.d.ts +398 -0
  332. package/dist/nervous-system/integration/WorkspaceAgent.d.ts.map +1 -0
  333. package/dist/nervous-system/integration/WorkspaceAgent.js +722 -0
  334. package/dist/nervous-system/integration/WorkspaceAgent.js.map +1 -0
  335. package/dist/nervous-system/integration/index.d.ts +22 -0
  336. package/dist/nervous-system/integration/index.d.ts.map +1 -0
  337. package/dist/nervous-system/integration/index.js +44 -0
  338. package/dist/nervous-system/integration/index.js.map +1 -0
  339. package/dist/nervous-system/persistence/BTSPSerializer.d.ts +96 -0
  340. package/dist/nervous-system/persistence/BTSPSerializer.d.ts.map +1 -0
  341. package/dist/nervous-system/persistence/BTSPSerializer.js +223 -0
  342. package/dist/nervous-system/persistence/BTSPSerializer.js.map +1 -0
  343. package/dist/nervous-system/persistence/CircadianSerializer.d.ts +90 -0
  344. package/dist/nervous-system/persistence/CircadianSerializer.d.ts.map +1 -0
  345. package/dist/nervous-system/persistence/CircadianSerializer.js +239 -0
  346. package/dist/nervous-system/persistence/CircadianSerializer.js.map +1 -0
  347. package/dist/nervous-system/persistence/HdcSerializer.d.ts +100 -0
  348. package/dist/nervous-system/persistence/HdcSerializer.d.ts.map +1 -0
  349. package/dist/nervous-system/persistence/HdcSerializer.js +259 -0
  350. package/dist/nervous-system/persistence/HdcSerializer.js.map +1 -0
  351. package/dist/nervous-system/persistence/INervousSystemStore.d.ts +208 -0
  352. package/dist/nervous-system/persistence/INervousSystemStore.d.ts.map +1 -0
  353. package/dist/nervous-system/persistence/INervousSystemStore.js +11 -0
  354. package/dist/nervous-system/persistence/INervousSystemStore.js.map +1 -0
  355. package/dist/nervous-system/persistence/NervousSystemPersistenceManager.d.ts +187 -0
  356. package/dist/nervous-system/persistence/NervousSystemPersistenceManager.d.ts.map +1 -0
  357. package/dist/nervous-system/persistence/NervousSystemPersistenceManager.js +411 -0
  358. package/dist/nervous-system/persistence/NervousSystemPersistenceManager.js.map +1 -0
  359. package/dist/nervous-system/persistence/SQLiteNervousSystemStore.d.ts +98 -0
  360. package/dist/nervous-system/persistence/SQLiteNervousSystemStore.d.ts.map +1 -0
  361. package/dist/nervous-system/persistence/SQLiteNervousSystemStore.js +510 -0
  362. package/dist/nervous-system/persistence/SQLiteNervousSystemStore.js.map +1 -0
  363. package/dist/nervous-system/persistence/index.d.ts +22 -0
  364. package/dist/nervous-system/persistence/index.d.ts.map +1 -0
  365. package/dist/nervous-system/persistence/index.js +45 -0
  366. package/dist/nervous-system/persistence/index.js.map +1 -0
  367. package/dist/nervous-system/wasm-loader.d.ts +52 -0
  368. package/dist/nervous-system/wasm-loader.d.ts.map +1 -0
  369. package/dist/nervous-system/wasm-loader.js +188 -0
  370. package/dist/nervous-system/wasm-loader.js.map +1 -0
  371. package/dist/persistence/HybridPersistenceProvider.d.ts +184 -0
  372. package/dist/persistence/HybridPersistenceProvider.d.ts.map +1 -0
  373. package/dist/persistence/HybridPersistenceProvider.js +1086 -0
  374. package/dist/persistence/HybridPersistenceProvider.js.map +1 -0
  375. package/dist/persistence/IPersistenceProvider.d.ts +657 -0
  376. package/dist/persistence/IPersistenceProvider.d.ts.map +1 -0
  377. package/dist/persistence/IPersistenceProvider.js +11 -0
  378. package/dist/persistence/IPersistenceProvider.js.map +1 -0
  379. package/dist/persistence/SupabaseConfig.d.ts +176 -0
  380. package/dist/persistence/SupabaseConfig.d.ts.map +1 -0
  381. package/dist/persistence/SupabaseConfig.js +277 -0
  382. package/dist/persistence/SupabaseConfig.js.map +1 -0
  383. package/dist/persistence/SupabasePersistenceProvider.d.ts +143 -0
  384. package/dist/persistence/SupabasePersistenceProvider.d.ts.map +1 -0
  385. package/dist/persistence/SupabasePersistenceProvider.js +955 -0
  386. package/dist/persistence/SupabasePersistenceProvider.js.map +1 -0
  387. package/dist/persistence/adapters/CodeIntelligenceSyncAdapter.d.ts +213 -0
  388. package/dist/persistence/adapters/CodeIntelligenceSyncAdapter.d.ts.map +1 -0
  389. package/dist/persistence/adapters/CodeIntelligenceSyncAdapter.js +468 -0
  390. package/dist/persistence/adapters/CodeIntelligenceSyncAdapter.js.map +1 -0
  391. package/dist/persistence/adapters/MemorySyncAdapter.d.ts +115 -0
  392. package/dist/persistence/adapters/MemorySyncAdapter.d.ts.map +1 -0
  393. package/dist/persistence/adapters/MemorySyncAdapter.js +291 -0
  394. package/dist/persistence/adapters/MemorySyncAdapter.js.map +1 -0
  395. package/dist/persistence/adapters/index.d.ts +11 -0
  396. package/dist/persistence/adapters/index.d.ts.map +1 -0
  397. package/dist/persistence/adapters/index.js +20 -0
  398. package/dist/persistence/adapters/index.js.map +1 -0
  399. package/dist/persistence/index.d.ts +14 -0
  400. package/dist/persistence/index.d.ts.map +1 -1
  401. package/dist/persistence/index.js +36 -1
  402. package/dist/persistence/index.js.map +1 -1
  403. package/dist/planning/GOAPPlanner.d.ts +1 -0
  404. package/dist/planning/GOAPPlanner.d.ts.map +1 -1
  405. package/dist/planning/GOAPPlanner.js +12 -0
  406. package/dist/planning/GOAPPlanner.js.map +1 -1
  407. package/package.json +31 -8
  408. package/dist/alerting/AlertManager.d.ts +0 -120
  409. package/dist/alerting/AlertManager.d.ts.map +0 -1
  410. package/dist/alerting/AlertManager.js +0 -345
  411. package/dist/alerting/AlertManager.js.map +0 -1
  412. package/dist/alerting/FeedbackRouter.d.ts +0 -98
  413. package/dist/alerting/FeedbackRouter.d.ts.map +0 -1
  414. package/dist/alerting/FeedbackRouter.js +0 -331
  415. package/dist/alerting/FeedbackRouter.js.map +0 -1
  416. package/dist/alerting/StrategyApplicator.d.ts +0 -120
  417. package/dist/alerting/StrategyApplicator.d.ts.map +0 -1
  418. package/dist/alerting/StrategyApplicator.js +0 -299
  419. package/dist/alerting/StrategyApplicator.js.map +0 -1
  420. package/dist/alerting/index.d.ts +0 -68
  421. package/dist/alerting/index.d.ts.map +0 -1
  422. package/dist/alerting/index.js +0 -112
  423. package/dist/alerting/index.js.map +0 -1
  424. package/dist/alerting/types.d.ts +0 -118
  425. package/dist/alerting/types.d.ts.map +0 -1
  426. package/dist/alerting/types.js +0 -11
  427. package/dist/alerting/types.js.map +0 -1
  428. package/dist/cli/commands/fleet/backup.d.ts +0 -49
  429. package/dist/cli/commands/fleet/backup.d.ts.map +0 -1
  430. package/dist/cli/commands/fleet/backup.js +0 -88
  431. package/dist/cli/commands/fleet/backup.js.map +0 -1
  432. package/dist/cli/commands/fleet/health.d.ts +0 -154
  433. package/dist/cli/commands/fleet/health.d.ts.map +0 -1
  434. package/dist/cli/commands/fleet/health.js +0 -483
  435. package/dist/cli/commands/fleet/health.js.map +0 -1
  436. package/dist/cli/commands/fleet/init.d.ts +0 -11
  437. package/dist/cli/commands/fleet/init.d.ts.map +0 -1
  438. package/dist/cli/commands/fleet/init.js +0 -91
  439. package/dist/cli/commands/fleet/init.js.map +0 -1
  440. package/dist/cli/commands/fleet/logs.d.ts +0 -21
  441. package/dist/cli/commands/fleet/logs.d.ts.map +0 -1
  442. package/dist/cli/commands/fleet/logs.js +0 -267
  443. package/dist/cli/commands/fleet/logs.js.map +0 -1
  444. package/dist/cli/commands/fleet/metrics.d.ts +0 -27
  445. package/dist/cli/commands/fleet/metrics.d.ts.map +0 -1
  446. package/dist/cli/commands/fleet/metrics.js +0 -369
  447. package/dist/cli/commands/fleet/metrics.js.map +0 -1
  448. package/dist/cli/commands/fleet/monitor.d.ts +0 -18
  449. package/dist/cli/commands/fleet/monitor.d.ts.map +0 -1
  450. package/dist/cli/commands/fleet/monitor.js +0 -237
  451. package/dist/cli/commands/fleet/monitor.js.map +0 -1
  452. package/dist/cli/commands/fleet/optimize.d.ts +0 -42
  453. package/dist/cli/commands/fleet/optimize.d.ts.map +0 -1
  454. package/dist/cli/commands/fleet/optimize.js +0 -135
  455. package/dist/cli/commands/fleet/optimize.js.map +0 -1
  456. package/dist/cli/commands/fleet/recover.d.ts +0 -22
  457. package/dist/cli/commands/fleet/recover.d.ts.map +0 -1
  458. package/dist/cli/commands/fleet/recover.js +0 -99
  459. package/dist/cli/commands/fleet/recover.js.map +0 -1
  460. package/dist/cli/commands/fleet/restart.d.ts +0 -18
  461. package/dist/cli/commands/fleet/restart.d.ts.map +0 -1
  462. package/dist/cli/commands/fleet/restart.js +0 -290
  463. package/dist/cli/commands/fleet/restart.js.map +0 -1
  464. package/dist/cli/commands/fleet/scale.d.ts +0 -9
  465. package/dist/cli/commands/fleet/scale.d.ts.map +0 -1
  466. package/dist/cli/commands/fleet/scale.js +0 -77
  467. package/dist/cli/commands/fleet/scale.js.map +0 -1
  468. package/dist/cli/commands/fleet/shutdown.d.ts +0 -19
  469. package/dist/cli/commands/fleet/shutdown.d.ts.map +0 -1
  470. package/dist/cli/commands/fleet/shutdown.js +0 -307
  471. package/dist/cli/commands/fleet/shutdown.js.map +0 -1
  472. package/dist/cli/commands/fleet/status.d.ts +0 -10
  473. package/dist/cli/commands/fleet/status.d.ts.map +0 -1
  474. package/dist/cli/commands/fleet/status.js +0 -97
  475. package/dist/cli/commands/fleet/status.js.map +0 -1
  476. package/dist/cli/commands/fleet/topology.d.ts +0 -23
  477. package/dist/cli/commands/fleet/topology.d.ts.map +0 -1
  478. package/dist/cli/commands/fleet/topology.js +0 -376
  479. package/dist/cli/commands/fleet/topology.js.map +0 -1
  480. package/dist/cli/commands/monitor/alerts.d.ts +0 -45
  481. package/dist/cli/commands/monitor/alerts.d.ts.map +0 -1
  482. package/dist/cli/commands/monitor/alerts.js +0 -168
  483. package/dist/cli/commands/monitor/alerts.js.map +0 -1
  484. package/dist/cli/commands/monitor/analyze.d.ts +0 -49
  485. package/dist/cli/commands/monitor/analyze.d.ts.map +0 -1
  486. package/dist/cli/commands/monitor/analyze.js +0 -209
  487. package/dist/cli/commands/monitor/analyze.js.map +0 -1
  488. package/dist/cli/commands/monitor/compare.d.ts +0 -38
  489. package/dist/cli/commands/monitor/compare.d.ts.map +0 -1
  490. package/dist/cli/commands/monitor/compare.js +0 -177
  491. package/dist/cli/commands/monitor/compare.js.map +0 -1
  492. package/dist/cli/commands/monitor/dashboard.d.ts +0 -34
  493. package/dist/cli/commands/monitor/dashboard.d.ts.map +0 -1
  494. package/dist/cli/commands/monitor/dashboard.js +0 -157
  495. package/dist/cli/commands/monitor/dashboard.js.map +0 -1
  496. package/dist/cli/commands/monitor/export.d.ts +0 -36
  497. package/dist/cli/commands/monitor/export.d.ts.map +0 -1
  498. package/dist/cli/commands/monitor/export.js +0 -157
  499. package/dist/cli/commands/monitor/export.js.map +0 -1
  500. package/dist/cli/commands/monitor/index.d.ts +0 -11
  501. package/dist/cli/commands/monitor/index.d.ts.map +0 -1
  502. package/dist/cli/commands/monitor/index.js +0 -14
  503. package/dist/cli/commands/monitor/index.js.map +0 -1
  504. package/dist/cli/commands/quality/baseline.d.ts +0 -27
  505. package/dist/cli/commands/quality/baseline.d.ts.map +0 -1
  506. package/dist/cli/commands/quality/baseline.js +0 -124
  507. package/dist/cli/commands/quality/baseline.js.map +0 -1
  508. package/dist/cli/commands/quality/compare.d.ts +0 -36
  509. package/dist/cli/commands/quality/compare.d.ts.map +0 -1
  510. package/dist/cli/commands/quality/compare.js +0 -136
  511. package/dist/cli/commands/quality/compare.js.map +0 -1
  512. package/dist/cli/commands/quality/decision.d.ts +0 -81
  513. package/dist/cli/commands/quality/decision.d.ts.map +0 -1
  514. package/dist/cli/commands/quality/decision.js +0 -319
  515. package/dist/cli/commands/quality/decision.js.map +0 -1
  516. package/dist/cli/commands/quality/gate.d.ts +0 -47
  517. package/dist/cli/commands/quality/gate.d.ts.map +0 -1
  518. package/dist/cli/commands/quality/gate.js +0 -205
  519. package/dist/cli/commands/quality/gate.js.map +0 -1
  520. package/dist/cli/commands/quality/index.d.ts +0 -17
  521. package/dist/cli/commands/quality/index.d.ts.map +0 -1
  522. package/dist/cli/commands/quality/index.js +0 -41
  523. package/dist/cli/commands/quality/index.js.map +0 -1
  524. package/dist/cli/commands/quality/policy.d.ts +0 -57
  525. package/dist/cli/commands/quality/policy.d.ts.map +0 -1
  526. package/dist/cli/commands/quality/policy.js +0 -359
  527. package/dist/cli/commands/quality/policy.js.map +0 -1
  528. package/dist/cli/commands/quality/risk.d.ts +0 -41
  529. package/dist/cli/commands/quality/risk.d.ts.map +0 -1
  530. package/dist/cli/commands/quality/risk.js +0 -255
  531. package/dist/cli/commands/quality/risk.js.map +0 -1
  532. package/dist/cli/commands/quality/trends.d.ts +0 -40
  533. package/dist/cli/commands/quality/trends.d.ts.map +0 -1
  534. package/dist/cli/commands/quality/trends.js +0 -122
  535. package/dist/cli/commands/quality/trends.js.map +0 -1
  536. package/dist/cli/commands/quality/validate.d.ts +0 -44
  537. package/dist/cli/commands/quality/validate.d.ts.map +0 -1
  538. package/dist/cli/commands/quality/validate.js +0 -234
  539. package/dist/cli/commands/quality/validate.js.map +0 -1
  540. package/dist/cli/commands/test/analyze-failures.d.ts +0 -39
  541. package/dist/cli/commands/test/analyze-failures.d.ts.map +0 -1
  542. package/dist/cli/commands/test/analyze-failures.js +0 -113
  543. package/dist/cli/commands/test/analyze-failures.js.map +0 -1
  544. package/dist/cli/commands/test/clean.d.ts +0 -3
  545. package/dist/cli/commands/test/clean.d.ts.map +0 -1
  546. package/dist/cli/commands/test/clean.js +0 -148
  547. package/dist/cli/commands/test/clean.js.map +0 -1
  548. package/dist/cli/commands/test/debug.d.ts +0 -3
  549. package/dist/cli/commands/test/debug.d.ts.map +0 -1
  550. package/dist/cli/commands/test/debug.js +0 -167
  551. package/dist/cli/commands/test/debug.js.map +0 -1
  552. package/dist/cli/commands/test/diff.d.ts +0 -3
  553. package/dist/cli/commands/test/diff.d.ts.map +0 -1
  554. package/dist/cli/commands/test/diff.js +0 -195
  555. package/dist/cli/commands/test/diff.js.map +0 -1
  556. package/dist/cli/commands/test/flakiness.d.ts +0 -32
  557. package/dist/cli/commands/test/flakiness.d.ts.map +0 -1
  558. package/dist/cli/commands/test/flakiness.js +0 -121
  559. package/dist/cli/commands/test/flakiness.js.map +0 -1
  560. package/dist/cli/commands/test/index.d.ts +0 -17
  561. package/dist/cli/commands/test/index.d.ts.map +0 -1
  562. package/dist/cli/commands/test/index.js +0 -45
  563. package/dist/cli/commands/test/index.js.map +0 -1
  564. package/dist/cli/commands/test/mutate.d.ts +0 -29
  565. package/dist/cli/commands/test/mutate.d.ts.map +0 -1
  566. package/dist/cli/commands/test/mutate.js +0 -163
  567. package/dist/cli/commands/test/mutate.js.map +0 -1
  568. package/dist/cli/commands/test/parallel.d.ts +0 -3
  569. package/dist/cli/commands/test/parallel.d.ts.map +0 -1
  570. package/dist/cli/commands/test/parallel.js +0 -117
  571. package/dist/cli/commands/test/parallel.js.map +0 -1
  572. package/dist/cli/commands/test/profile.d.ts +0 -3
  573. package/dist/cli/commands/test/profile.d.ts.map +0 -1
  574. package/dist/cli/commands/test/profile.js +0 -156
  575. package/dist/cli/commands/test/profile.js.map +0 -1
  576. package/dist/cli/commands/test/queue.d.ts +0 -3
  577. package/dist/cli/commands/test/queue.d.ts.map +0 -1
  578. package/dist/cli/commands/test/queue.js +0 -140
  579. package/dist/cli/commands/test/queue.js.map +0 -1
  580. package/dist/cli/commands/test/retry.d.ts +0 -3
  581. package/dist/cli/commands/test/retry.d.ts.map +0 -1
  582. package/dist/cli/commands/test/retry.js +0 -105
  583. package/dist/cli/commands/test/retry.js.map +0 -1
  584. package/dist/cli/commands/test/snapshot.d.ts +0 -3
  585. package/dist/cli/commands/test/snapshot.d.ts.map +0 -1
  586. package/dist/cli/commands/test/snapshot.js +0 -176
  587. package/dist/cli/commands/test/snapshot.js.map +0 -1
  588. package/dist/cli/commands/test/trace.d.ts +0 -3
  589. package/dist/cli/commands/test/trace.d.ts.map +0 -1
  590. package/dist/cli/commands/test/trace.js +0 -137
  591. package/dist/cli/commands/test/trace.js.map +0 -1
  592. package/dist/cli/commands/test/watch.d.ts +0 -3
  593. package/dist/cli/commands/test/watch.d.ts.map +0 -1
  594. package/dist/cli/commands/test/watch.js +0 -130
  595. package/dist/cli/commands/test/watch.js.map +0 -1
  596. package/dist/cli/index-spec.d.ts +0 -3
  597. package/dist/cli/index-spec.d.ts.map +0 -1
  598. package/dist/cli/index-spec.js +0 -154
  599. package/dist/cli/index-spec.js.map +0 -1
  600. package/dist/cli/index-working.d.ts +0 -7
  601. package/dist/cli/index-working.d.ts.map +0 -1
  602. package/dist/cli/index-working.js +0 -617
  603. package/dist/cli/index-working.js.map +0 -1
  604. package/dist/mcp/handlers/filtered/coverage-analyzer-filtered.d.ts +0 -83
  605. package/dist/mcp/handlers/filtered/coverage-analyzer-filtered.d.ts.map +0 -1
  606. package/dist/mcp/handlers/filtered/coverage-analyzer-filtered.js +0 -130
  607. package/dist/mcp/handlers/filtered/coverage-analyzer-filtered.js.map +0 -1
  608. package/dist/mcp/handlers/filtered/flaky-detector-filtered.d.ts +0 -58
  609. package/dist/mcp/handlers/filtered/flaky-detector-filtered.d.ts.map +0 -1
  610. package/dist/mcp/handlers/filtered/flaky-detector-filtered.js +0 -84
  611. package/dist/mcp/handlers/filtered/flaky-detector-filtered.js.map +0 -1
  612. package/dist/mcp/handlers/filtered/security-scanner-filtered.d.ts +0 -54
  613. package/dist/mcp/handlers/filtered/security-scanner-filtered.d.ts.map +0 -1
  614. package/dist/mcp/handlers/filtered/security-scanner-filtered.js +0 -73
  615. package/dist/mcp/handlers/filtered/security-scanner-filtered.js.map +0 -1
  616. package/dist/mcp/handlers/integration/contract-validate.d.ts +0 -10
  617. package/dist/mcp/handlers/integration/contract-validate.d.ts.map +0 -1
  618. package/dist/mcp/handlers/integration/contract-validate.js +0 -348
  619. package/dist/mcp/handlers/integration/contract-validate.js.map +0 -1
  620. package/dist/reporting/ResultAggregator.d.ts +0 -107
  621. package/dist/reporting/ResultAggregator.d.ts.map +0 -1
  622. package/dist/reporting/ResultAggregator.js +0 -435
  623. package/dist/reporting/ResultAggregator.js.map +0 -1
  624. package/dist/reporting/index.d.ts +0 -48
  625. package/dist/reporting/index.d.ts.map +0 -1
  626. package/dist/reporting/index.js +0 -154
  627. package/dist/reporting/index.js.map +0 -1
  628. package/dist/reporting/reporters/ControlLoopReporter.d.ts +0 -128
  629. package/dist/reporting/reporters/ControlLoopReporter.d.ts.map +0 -1
  630. package/dist/reporting/reporters/ControlLoopReporter.js +0 -417
  631. package/dist/reporting/reporters/ControlLoopReporter.js.map +0 -1
  632. package/dist/reporting/reporters/HumanReadableReporter.d.ts +0 -140
  633. package/dist/reporting/reporters/HumanReadableReporter.d.ts.map +0 -1
  634. package/dist/reporting/reporters/HumanReadableReporter.js +0 -524
  635. package/dist/reporting/reporters/HumanReadableReporter.js.map +0 -1
  636. package/dist/reporting/reporters/JSONReporter.d.ts +0 -251
  637. package/dist/reporting/reporters/JSONReporter.d.ts.map +0 -1
  638. package/dist/reporting/reporters/JSONReporter.js +0 -325
  639. package/dist/reporting/reporters/JSONReporter.js.map +0 -1
  640. package/dist/reporting/reporters/index.d.ts +0 -14
  641. package/dist/reporting/reporters/index.d.ts.map +0 -1
  642. package/dist/reporting/reporters/index.js +0 -19
  643. package/dist/reporting/reporters/index.js.map +0 -1
  644. package/dist/reporting/types.d.ts +0 -427
  645. package/dist/reporting/types.d.ts.map +0 -1
  646. package/dist/reporting/types.js +0 -12
  647. package/dist/reporting/types.js.map +0 -1
@@ -0,0 +1,722 @@
1
+ "use strict";
2
+ /**
3
+ * WorkspaceAgentCoordinator - Attention-Based Agent Coordination
4
+ *
5
+ * Integrates GlobalWorkspaceAdapter with QE agent coordination for
6
+ * attention-based agent management following Global Workspace Theory.
7
+ *
8
+ * Key Features:
9
+ * - Attention bottleneck for agent coordination (Miller's Law: 7+/-2 items)
10
+ * - Broadcasting important items to all registered agents
11
+ * - Competition for workspace access based on relevance/salience
12
+ * - Conscious vs unconscious processing management
13
+ *
14
+ * @see Baars, B.J. (1988) A Cognitive Theory of Consciousness
15
+ * @module nervous-system/integration/WorkspaceAgent
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.WorkspaceAgentCoordinator = void 0;
19
+ exports.createWorkspaceCoordinator = createWorkspaceCoordinator;
20
+ exports.createFocusedCoordinator = createFocusedCoordinator;
21
+ exports.createExpandedCoordinator = createExpandedCoordinator;
22
+ const events_1 = require("events");
23
+ const GlobalWorkspaceAdapter_js_1 = require("../adapters/GlobalWorkspaceAdapter.js");
24
+ // ============================================================================
25
+ // Implementation
26
+ // ============================================================================
27
+ /**
28
+ * WorkspaceAgentCoordinator
29
+ *
30
+ * Coordinates QE agents through a global workspace based on Global Workspace Theory.
31
+ * Implements attention bottleneck (Miller's Law: 7+/-2 items) to prevent information
32
+ * overload while ensuring high-priority items receive processing.
33
+ *
34
+ * @example
35
+ * ```typescript
36
+ * // Create coordinator
37
+ * const coordinator = await WorkspaceAgentCoordinator.create();
38
+ *
39
+ * // Register agents
40
+ * await coordinator.registerAgent(testGeneratorAgent);
41
+ * await coordinator.registerAgent(coverageAnalyzerAgent);
42
+ *
43
+ * // Agent broadcasts to workspace
44
+ * const accepted = await coordinator.agentBroadcast('test-gen-1', {
45
+ * id: 'item-1',
46
+ * agentId: 'test-gen-1',
47
+ * agentType: 'test-generator',
48
+ * content: { tests: [...] },
49
+ * priority: 0.8,
50
+ * relevance: 0.9,
51
+ * timestamp: Date.now()
52
+ * });
53
+ *
54
+ * // Check if agent has attention
55
+ * if (await coordinator.hasAttention('test-gen-1')) {
56
+ * // Agent can proceed with full processing
57
+ * }
58
+ *
59
+ * // Coordinate task across multiple agents
60
+ * const result = await coordinator.coordinateTask({
61
+ * taskId: 'task-1',
62
+ * type: 'comprehensive-testing',
63
+ * payload: { sourceFile: 'app.ts' },
64
+ * requiredAgents: [QEAgentType.TEST_GENERATOR, QEAgentType.COVERAGE_ANALYZER],
65
+ * priority: 0.9
66
+ * });
67
+ * ```
68
+ */
69
+ class WorkspaceAgentCoordinator extends events_1.EventEmitter {
70
+ /**
71
+ * Private constructor - use create() factory method
72
+ */
73
+ constructor(config = {}) {
74
+ super();
75
+ this.initialized = false;
76
+ this.registeredAgents = new Map();
77
+ this.itemToAgentMap = new Map();
78
+ this.config = {
79
+ workspaceConfig: config.workspaceConfig ?? {},
80
+ autoCompete: config.autoCompete ?? true,
81
+ competitionInterval: config.competitionInterval ?? 0,
82
+ defaultTtl: config.defaultTtl ?? 30000,
83
+ debug: config.debug ?? false,
84
+ };
85
+ }
86
+ /**
87
+ * Factory method to create an initialized WorkspaceAgentCoordinator
88
+ *
89
+ * @param config - Configuration options
90
+ * @returns Initialized coordinator instance
91
+ */
92
+ static async create(config = {}) {
93
+ const coordinator = new WorkspaceAgentCoordinator(config);
94
+ await coordinator.initialize();
95
+ return coordinator;
96
+ }
97
+ /**
98
+ * Initialize the coordinator and underlying workspace
99
+ */
100
+ async initialize() {
101
+ if (this.initialized) {
102
+ return;
103
+ }
104
+ // Create global workspace adapter
105
+ this.workspace = await GlobalWorkspaceAdapter_js_1.GlobalWorkspaceAdapter.create(this.config.workspaceConfig);
106
+ // Start periodic competition if configured
107
+ if (this.config.competitionInterval > 0) {
108
+ this.competitionTimer = setInterval(() => {
109
+ this.runCompetition();
110
+ }, this.config.competitionInterval);
111
+ }
112
+ this.initialized = true;
113
+ this.log('WorkspaceAgentCoordinator initialized');
114
+ }
115
+ /**
116
+ * Register an agent for workspace participation
117
+ *
118
+ * @param agent - The BaseAgent instance to register
119
+ * @param subscriptions - Optional subscription filters
120
+ */
121
+ async registerAgent(agent, subscriptions) {
122
+ const agentId = agent.getAgentId();
123
+ if (this.registeredAgents.has(agentId.id)) {
124
+ this.log(`Agent ${agentId.id} already registered, updating registration`);
125
+ }
126
+ const info = {
127
+ agent,
128
+ currentSalience: 0,
129
+ hasAttention: false,
130
+ lastBroadcast: 0,
131
+ subscriptions: subscriptions ?? {},
132
+ };
133
+ this.registeredAgents.set(agentId.id, info);
134
+ this.emit('agent:registered', {
135
+ agentId: agentId.id,
136
+ agentType: agentId.type,
137
+ });
138
+ this.log(`Agent registered: ${agentId.id} (${agentId.type})`);
139
+ }
140
+ /**
141
+ * Unregister an agent from workspace participation
142
+ *
143
+ * @param agentId - ID of agent to unregister
144
+ */
145
+ async unregisterAgent(agentId) {
146
+ if (!this.registeredAgents.has(agentId)) {
147
+ return;
148
+ }
149
+ this.registeredAgents.delete(agentId);
150
+ // Clear any workspace items from this agent
151
+ for (const [itemId, ownerAgentId] of this.itemToAgentMap.entries()) {
152
+ if (ownerAgentId === agentId) {
153
+ this.itemToAgentMap.delete(itemId);
154
+ }
155
+ }
156
+ this.emit('agent:unregistered', { agentId });
157
+ this.log(`Agent unregistered: ${agentId}`);
158
+ }
159
+ /**
160
+ * Agent broadcasts an item to the global workspace
161
+ *
162
+ * The item competes for one of the limited attention slots (7+/-2).
163
+ * High-priority/relevance items are more likely to win attention.
164
+ *
165
+ * @param agentId - ID of the broadcasting agent
166
+ * @param item - The workspace item to broadcast
167
+ * @returns True if item was accepted into workspace
168
+ */
169
+ async agentBroadcast(agentId, item) {
170
+ const agentInfo = this.registeredAgents.get(agentId);
171
+ if (!agentInfo) {
172
+ this.log(`Broadcast rejected: agent ${agentId} not registered`);
173
+ this.emit('broadcast:rejected', { item, reason: 'Agent not registered' });
174
+ return false;
175
+ }
176
+ // Create agent representation for workspace
177
+ // Convert content to embedding vector (simplified: use priority and relevance)
178
+ const contentVector = this.createContentVector(item);
179
+ // Calculate salience from priority and relevance
180
+ const salience = this.calculateSalience(item);
181
+ const representation = {
182
+ agentId: agentId,
183
+ content: contentVector,
184
+ salience,
185
+ timestamp: item.timestamp,
186
+ };
187
+ // Broadcast to workspace
188
+ const accepted = this.workspace.broadcast(representation);
189
+ if (accepted) {
190
+ // Track item-to-agent mapping
191
+ this.itemToAgentMap.set(item.id, agentId);
192
+ // Update agent info
193
+ agentInfo.currentSalience = salience;
194
+ agentInfo.lastBroadcast = item.timestamp;
195
+ this.emit('broadcast:accepted', { item });
196
+ this.log(`Broadcast accepted: ${item.id} from ${agentId} (salience: ${salience.toFixed(3)})`);
197
+ // Notify relevant agents about the broadcast
198
+ await this.notifyRelevantAgents(item);
199
+ // Auto-compete if enabled
200
+ if (this.config.autoCompete) {
201
+ await this.runCompetition();
202
+ }
203
+ }
204
+ else {
205
+ this.emit('broadcast:rejected', { item, reason: 'Workspace full or low salience' });
206
+ this.log(`Broadcast rejected: ${item.id} from ${agentId} (salience: ${salience.toFixed(3)})`);
207
+ }
208
+ return accepted;
209
+ }
210
+ /**
211
+ * Get items relevant to a specific agent type
212
+ *
213
+ * Filters workspace items based on agent type subscriptions and metadata.
214
+ *
215
+ * @param agentType - The agent type to filter for
216
+ * @returns Array of relevant workspace items
217
+ */
218
+ async getRelevantItems(agentType) {
219
+ // Get all current attention winners
220
+ const occupancy = this.workspace.getOccupancy();
221
+ const winners = this.workspace.retrieveTopK(occupancy.current);
222
+ const relevantItems = [];
223
+ for (const winner of winners) {
224
+ const itemAgentId = winner.agentId;
225
+ const agentInfo = this.registeredAgents.get(itemAgentId);
226
+ if (!agentInfo) {
227
+ continue;
228
+ }
229
+ // Reconstruct workspace item from winner
230
+ // In a full implementation, we would store items separately
231
+ const item = {
232
+ id: `${itemAgentId}-${winner.rank}`,
233
+ agentId: itemAgentId,
234
+ agentType: agentInfo.agent.getAgentId().type,
235
+ content: winner.content,
236
+ priority: winner.salience,
237
+ relevance: winner.salience,
238
+ timestamp: Date.now(), // Would be stored with item
239
+ };
240
+ // Check if item is relevant to requesting agent type
241
+ if (this.isItemRelevantToType(item, agentType)) {
242
+ relevantItems.push(item);
243
+ }
244
+ }
245
+ return relevantItems;
246
+ }
247
+ /**
248
+ * Coordinate a task across multiple agents using the workspace
249
+ *
250
+ * Allocates attention to involved agents and manages their collaboration.
251
+ *
252
+ * @param task - Task coordination request
253
+ * @returns Coordination result with agent outcomes
254
+ */
255
+ async coordinateTask(task) {
256
+ const startTime = Date.now();
257
+ const participatingAgents = [];
258
+ const agentResults = new Map();
259
+ const errors = [];
260
+ // Find agents that match required types
261
+ const matchingAgents = [];
262
+ for (const [agentId, info] of this.registeredAgents.entries()) {
263
+ const agentType = info.agent.getAgentId().type;
264
+ if (task.requiredAgents.includes(agentType)) {
265
+ matchingAgents.push({ id: agentId, info });
266
+ }
267
+ }
268
+ // Also include specific agent IDs if provided
269
+ if (task.involvedAgentIds) {
270
+ for (const agentId of task.involvedAgentIds) {
271
+ if (this.registeredAgents.has(agentId) && !matchingAgents.find(a => a.id === agentId)) {
272
+ matchingAgents.push({
273
+ id: agentId,
274
+ info: this.registeredAgents.get(agentId),
275
+ });
276
+ }
277
+ }
278
+ }
279
+ if (matchingAgents.length === 0) {
280
+ return {
281
+ taskId: task.taskId,
282
+ success: false,
283
+ participatingAgents: [],
284
+ agentResults,
285
+ duration: Date.now() - startTime,
286
+ errors: [{ agentId: 'coordinator', error: 'No matching agents found' }],
287
+ };
288
+ }
289
+ this.emit('coordination:started', {
290
+ taskId: task.taskId,
291
+ agents: matchingAgents.map(a => a.id),
292
+ });
293
+ // Broadcast task to workspace with high priority
294
+ for (const { id: agentId, info } of matchingAgents) {
295
+ const taskItem = {
296
+ id: `${task.taskId}-${agentId}`,
297
+ agentId,
298
+ agentType: info.agent.getAgentId().type,
299
+ content: {
300
+ taskId: task.taskId,
301
+ type: task.type,
302
+ payload: task.payload,
303
+ coordination: true,
304
+ },
305
+ priority: task.priority,
306
+ relevance: task.priority,
307
+ timestamp: Date.now(),
308
+ metadata: {
309
+ taskId: task.taskId,
310
+ category: 'coordination',
311
+ targetTypes: task.requiredAgents,
312
+ },
313
+ };
314
+ const accepted = await this.agentBroadcast(agentId, taskItem);
315
+ if (accepted) {
316
+ participatingAgents.push(agentId);
317
+ }
318
+ else {
319
+ errors.push({ agentId, error: 'Failed to broadcast task item' });
320
+ }
321
+ }
322
+ // Run competition to allocate attention
323
+ await this.runCompetition();
324
+ // Execute based on strategy
325
+ switch (task.strategy) {
326
+ case 'sequential':
327
+ await this.executeSequential(participatingAgents, task, agentResults, errors);
328
+ break;
329
+ case 'consensus':
330
+ await this.executeConsensus(participatingAgents, task, agentResults, errors);
331
+ break;
332
+ case 'parallel':
333
+ default:
334
+ await this.executeParallel(participatingAgents, task, agentResults, errors);
335
+ break;
336
+ }
337
+ const result = {
338
+ taskId: task.taskId,
339
+ success: errors.length === 0,
340
+ participatingAgents,
341
+ agentResults,
342
+ duration: Date.now() - startTime,
343
+ errors: errors.length > 0 ? errors : undefined,
344
+ };
345
+ this.emit('coordination:completed', { result });
346
+ return result;
347
+ }
348
+ /**
349
+ * Check if an agent currently has attention
350
+ *
351
+ * Agents should check this before performing expensive operations.
352
+ * If they don't have attention, they should defer to higher-priority agents.
353
+ *
354
+ * @param agentId - Agent ID to check
355
+ * @returns True if agent has attention slot
356
+ */
357
+ async hasAttention(agentId) {
358
+ const agentInfo = this.registeredAgents.get(agentId);
359
+ if (!agentInfo) {
360
+ return false;
361
+ }
362
+ const hasWorkspaceAttention = this.workspace.hasAttention(agentId);
363
+ // Update cached state
364
+ const previousState = agentInfo.hasAttention;
365
+ agentInfo.hasAttention = hasWorkspaceAttention;
366
+ // Emit events on state change
367
+ if (hasWorkspaceAttention && !previousState) {
368
+ this.emit('attention:granted', {
369
+ agentId,
370
+ item: {
371
+ id: `${agentId}-attention`,
372
+ agentId,
373
+ agentType: agentInfo.agent.getAgentId().type,
374
+ content: null,
375
+ priority: agentInfo.currentSalience,
376
+ relevance: agentInfo.currentSalience,
377
+ timestamp: Date.now(),
378
+ },
379
+ });
380
+ }
381
+ else if (!hasWorkspaceAttention && previousState) {
382
+ this.emit('attention:lost', { agentId });
383
+ }
384
+ return hasWorkspaceAttention;
385
+ }
386
+ /**
387
+ * Run competition for attention slots
388
+ *
389
+ * Triggers salience decay and reorders attention hierarchy.
390
+ */
391
+ async runCompetition() {
392
+ this.workspace.compete();
393
+ const occupancy = this.workspace.getOccupancy();
394
+ const winners = this.workspace.retrieveTopK(occupancy.current);
395
+ // Update agent attention states
396
+ for (const [agentId, info] of this.registeredAgents.entries()) {
397
+ const isWinner = winners.some(w => w.agentId === agentId);
398
+ const previousState = info.hasAttention;
399
+ if (isWinner) {
400
+ const winnerInfo = winners.find(w => w.agentId === agentId);
401
+ info.currentSalience = winnerInfo?.salience ?? 0;
402
+ info.hasAttention = true;
403
+ if (!previousState) {
404
+ this.emit('attention:granted', {
405
+ agentId,
406
+ item: {
407
+ id: `${agentId}-competition`,
408
+ agentId,
409
+ agentType: info.agent.getAgentId().type,
410
+ content: null,
411
+ priority: info.currentSalience,
412
+ relevance: info.currentSalience,
413
+ timestamp: Date.now(),
414
+ },
415
+ });
416
+ }
417
+ }
418
+ else {
419
+ info.hasAttention = false;
420
+ if (previousState) {
421
+ this.emit('attention:lost', { agentId });
422
+ }
423
+ }
424
+ }
425
+ this.emit('competition:complete', { winners });
426
+ this.log(`Competition complete: ${winners.length} attention slots filled`);
427
+ return winners;
428
+ }
429
+ /**
430
+ * Get current workspace occupancy
431
+ */
432
+ getOccupancy() {
433
+ return this.workspace.getOccupancy();
434
+ }
435
+ /**
436
+ * Get synchronization metrics
437
+ */
438
+ getSynchronization() {
439
+ return this.workspace.getSynchronization();
440
+ }
441
+ /**
442
+ * Get attention winners (agents with attention)
443
+ *
444
+ * @param k - Number of top agents to return (default: all)
445
+ */
446
+ getAttentionWinners(k) {
447
+ const occupancy = this.workspace.getOccupancy();
448
+ return this.workspace.retrieveTopK(k ?? occupancy.current);
449
+ }
450
+ /**
451
+ * Get registered agent count
452
+ */
453
+ getAgentCount() {
454
+ return this.registeredAgents.size;
455
+ }
456
+ /**
457
+ * Get agent info for debugging
458
+ */
459
+ getAgentInfo(agentId) {
460
+ const info = this.registeredAgents.get(agentId);
461
+ if (!info) {
462
+ return null;
463
+ }
464
+ return {
465
+ agentType: info.agent.getAgentId().type,
466
+ currentSalience: info.currentSalience,
467
+ hasAttention: info.hasAttention,
468
+ lastBroadcast: info.lastBroadcast,
469
+ };
470
+ }
471
+ /**
472
+ * Clear workspace and reset all agent states
473
+ */
474
+ clear() {
475
+ this.workspace.clear();
476
+ this.itemToAgentMap.clear();
477
+ for (const info of this.registeredAgents.values()) {
478
+ info.currentSalience = 0;
479
+ info.hasAttention = false;
480
+ }
481
+ this.log('Workspace cleared');
482
+ }
483
+ /**
484
+ * Dispose of coordinator resources
485
+ */
486
+ dispose() {
487
+ if (this.competitionTimer) {
488
+ clearInterval(this.competitionTimer);
489
+ this.competitionTimer = undefined;
490
+ }
491
+ this.workspace.dispose();
492
+ this.registeredAgents.clear();
493
+ this.itemToAgentMap.clear();
494
+ this.removeAllListeners();
495
+ this.initialized = false;
496
+ this.log('WorkspaceAgentCoordinator disposed');
497
+ }
498
+ /**
499
+ * Get coordinator statistics
500
+ */
501
+ getStats() {
502
+ const agentStates = Array.from(this.registeredAgents.entries()).map(([id, info]) => ({
503
+ agentId: id,
504
+ agentType: info.agent.getAgentId().type,
505
+ hasAttention: info.hasAttention,
506
+ salience: info.currentSalience,
507
+ }));
508
+ return {
509
+ initialized: this.initialized,
510
+ registeredAgents: this.registeredAgents.size,
511
+ workspaceOccupancy: this.workspace.getOccupancy(),
512
+ synchronization: this.workspace.getSynchronization(),
513
+ agentStates,
514
+ };
515
+ }
516
+ // ============================================================================
517
+ // Private Helper Methods
518
+ // ============================================================================
519
+ /**
520
+ * Create a content vector from workspace item
521
+ */
522
+ createContentVector(item) {
523
+ // Create a simple feature vector from item properties
524
+ // In a production system, this would use embeddings
525
+ const features = [
526
+ item.priority,
527
+ item.relevance,
528
+ // Normalize timestamp to 0-1 range (last 24 hours)
529
+ Math.min(1, (Date.now() - item.timestamp) / (24 * 60 * 60 * 1000)),
530
+ // Category encoding
531
+ this.encodeCategoryFeature(item.metadata?.category),
532
+ // Agent type hash (simplified)
533
+ this.hashString(item.agentType) % 1000 / 1000,
534
+ ];
535
+ return new Float32Array(features);
536
+ }
537
+ /**
538
+ * Calculate salience from item properties
539
+ */
540
+ calculateSalience(item) {
541
+ // Combine priority and relevance with weights
542
+ const baseSalience = item.priority * 0.6 + item.relevance * 0.4;
543
+ // Apply time decay (items lose salience over time)
544
+ const age = Date.now() - item.timestamp;
545
+ const ttl = item.metadata?.ttl ?? this.config.defaultTtl;
546
+ const timeDecay = Math.max(0, 1 - age / ttl);
547
+ // Final salience
548
+ return Math.max(0, Math.min(1, baseSalience * timeDecay));
549
+ }
550
+ /**
551
+ * Encode category to numeric feature
552
+ */
553
+ encodeCategoryFeature(category) {
554
+ const categoryMap = {
555
+ task: 0.9,
556
+ result: 0.8,
557
+ request: 0.7,
558
+ notification: 0.5,
559
+ coordination: 1.0,
560
+ };
561
+ return categoryMap[category ?? 'notification'] ?? 0.5;
562
+ }
563
+ /**
564
+ * Simple string hash for feature encoding
565
+ */
566
+ hashString(str) {
567
+ let hash = 0;
568
+ for (let i = 0; i < str.length; i++) {
569
+ const char = str.charCodeAt(i);
570
+ hash = (hash << 5) - hash + char;
571
+ hash = hash & hash;
572
+ }
573
+ return Math.abs(hash);
574
+ }
575
+ /**
576
+ * Check if item is relevant to a specific agent type
577
+ */
578
+ isItemRelevantToType(item, targetType) {
579
+ // If item specifies target types, check if target is included
580
+ if (item.metadata?.targetTypes && item.metadata.targetTypes.length > 0) {
581
+ return item.metadata.targetTypes.includes(targetType);
582
+ }
583
+ // If no target types specified, item is relevant to all
584
+ return true;
585
+ }
586
+ /**
587
+ * Notify agents that have subscriptions matching the broadcast item
588
+ */
589
+ async notifyRelevantAgents(item) {
590
+ for (const [agentId, info] of this.registeredAgents.entries()) {
591
+ // Skip the broadcasting agent
592
+ if (agentId === item.agentId) {
593
+ continue;
594
+ }
595
+ // Check subscriptions
596
+ const subscriptions = info.subscriptions;
597
+ let matches = true;
598
+ // Check category filter
599
+ if (subscriptions.categories && subscriptions.categories.length > 0) {
600
+ if (!item.metadata?.category || !subscriptions.categories.includes(item.metadata.category)) {
601
+ matches = false;
602
+ }
603
+ }
604
+ // Check task ID filter
605
+ if (matches && subscriptions.taskIds && subscriptions.taskIds.length > 0) {
606
+ if (!item.metadata?.taskId || !subscriptions.taskIds.includes(item.metadata.taskId)) {
607
+ matches = false;
608
+ }
609
+ }
610
+ // Check source type filter
611
+ if (matches && subscriptions.sourceTypes && subscriptions.sourceTypes.length > 0) {
612
+ if (!subscriptions.sourceTypes.includes(item.agentType)) {
613
+ matches = false;
614
+ }
615
+ }
616
+ if (matches) {
617
+ // Emit notification to agent (they can listen on their event bus)
618
+ info.agent.emit('workspace:item', item);
619
+ }
620
+ }
621
+ }
622
+ /**
623
+ * Execute task coordination in parallel
624
+ */
625
+ async executeParallel(agents, _task, results, errors) {
626
+ const promises = agents.map(async (agentId) => {
627
+ try {
628
+ const hasAtt = await this.hasAttention(agentId);
629
+ results.set(agentId, { hasAttention: hasAtt, processed: true });
630
+ }
631
+ catch (error) {
632
+ errors.push({ agentId, error: error.message });
633
+ }
634
+ });
635
+ await Promise.all(promises);
636
+ }
637
+ /**
638
+ * Execute task coordination sequentially
639
+ */
640
+ async executeSequential(agents, _task, results, errors) {
641
+ for (const agentId of agents) {
642
+ try {
643
+ const hasAtt = await this.hasAttention(agentId);
644
+ results.set(agentId, { hasAttention: hasAtt, processed: true });
645
+ }
646
+ catch (error) {
647
+ errors.push({ agentId, error: error.message });
648
+ }
649
+ }
650
+ }
651
+ /**
652
+ * Execute task coordination with consensus
653
+ */
654
+ async executeConsensus(agents, _task, results, errors) {
655
+ // Run all agents in parallel
656
+ await this.executeParallel(agents, _task, results, errors);
657
+ // Calculate consensus (simplified: majority with attention wins)
658
+ let withAttention = 0;
659
+ for (const result of results.values()) {
660
+ if (result.hasAttention) {
661
+ withAttention++;
662
+ }
663
+ }
664
+ const consensusReached = withAttention >= Math.ceil(agents.length / 2);
665
+ results.set('__consensus__', {
666
+ reached: consensusReached,
667
+ agentsWithAttention: withAttention,
668
+ totalAgents: agents.length,
669
+ });
670
+ }
671
+ /**
672
+ * Debug logging
673
+ */
674
+ log(message) {
675
+ if (this.config.debug) {
676
+ console.log(`[WorkspaceAgentCoordinator] ${message}`);
677
+ }
678
+ }
679
+ }
680
+ exports.WorkspaceAgentCoordinator = WorkspaceAgentCoordinator;
681
+ // ============================================================================
682
+ // Utility Functions
683
+ // ============================================================================
684
+ /**
685
+ * Create a default WorkspaceAgentCoordinator with standard settings
686
+ */
687
+ async function createWorkspaceCoordinator() {
688
+ return WorkspaceAgentCoordinator.create({
689
+ workspaceConfig: { capacity: 7 }, // Miller's Law
690
+ autoCompete: true,
691
+ defaultTtl: 30000,
692
+ });
693
+ }
694
+ /**
695
+ * Create a focused WorkspaceAgentCoordinator (4 attention slots)
696
+ */
697
+ async function createFocusedCoordinator() {
698
+ return WorkspaceAgentCoordinator.create({
699
+ workspaceConfig: {
700
+ capacity: 4,
701
+ threshold: 0.2,
702
+ decayRate: 0.08,
703
+ },
704
+ autoCompete: true,
705
+ defaultTtl: 15000,
706
+ });
707
+ }
708
+ /**
709
+ * Create an expanded WorkspaceAgentCoordinator (9 attention slots)
710
+ */
711
+ async function createExpandedCoordinator() {
712
+ return WorkspaceAgentCoordinator.create({
713
+ workspaceConfig: {
714
+ capacity: 9,
715
+ threshold: 0.05,
716
+ decayRate: 0.03,
717
+ },
718
+ autoCompete: true,
719
+ defaultTtl: 60000,
720
+ });
721
+ }
722
+ //# sourceMappingURL=WorkspaceAgent.js.map