agentic-qe 2.7.3 → 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 (620) hide show
  1. package/CHANGELOG.md +130 -0
  2. package/README.md +67 -2
  3. package/dist/agents/AccessibilityAllyAgent.d.ts +0 -7
  4. package/dist/agents/AccessibilityAllyAgent.d.ts.map +1 -1
  5. package/dist/agents/AccessibilityAllyAgent.js +0 -15
  6. package/dist/agents/AccessibilityAllyAgent.js.map +1 -1
  7. package/dist/agents/ApiContractValidatorAgent.js +4 -4
  8. package/dist/agents/ApiContractValidatorAgent.js.map +1 -1
  9. package/dist/agents/BaseAgent.d.ts +2 -0
  10. package/dist/agents/BaseAgent.d.ts.map +1 -1
  11. package/dist/agents/BaseAgent.js +43 -41
  12. package/dist/agents/BaseAgent.js.map +1 -1
  13. package/dist/agents/CodeComplexityAnalyzerAgent.d.ts +0 -8
  14. package/dist/agents/CodeComplexityAnalyzerAgent.d.ts.map +1 -1
  15. package/dist/agents/CodeComplexityAnalyzerAgent.js +0 -15
  16. package/dist/agents/CodeComplexityAnalyzerAgent.js.map +1 -1
  17. package/dist/agents/CodeIntelligenceAgent.d.ts +0 -1
  18. package/dist/agents/CodeIntelligenceAgent.d.ts.map +1 -1
  19. package/dist/agents/CodeIntelligenceAgent.js +0 -2
  20. package/dist/agents/CodeIntelligenceAgent.js.map +1 -1
  21. package/dist/agents/DeploymentReadinessAgent.d.ts.map +1 -1
  22. package/dist/agents/DeploymentReadinessAgent.js +30 -30
  23. package/dist/agents/DeploymentReadinessAgent.js.map +1 -1
  24. package/dist/agents/FlakyTestHunterAgent.d.ts +0 -10
  25. package/dist/agents/FlakyTestHunterAgent.d.ts.map +1 -1
  26. package/dist/agents/FlakyTestHunterAgent.js +10 -20
  27. package/dist/agents/FlakyTestHunterAgent.js.map +1 -1
  28. package/dist/agents/FleetCommanderAgent.d.ts.map +1 -1
  29. package/dist/agents/FleetCommanderAgent.js +28 -28
  30. package/dist/agents/FleetCommanderAgent.js.map +1 -1
  31. package/dist/agents/LearningAgent.js +1 -1
  32. package/dist/agents/LearningAgent.js.map +1 -1
  33. package/dist/agents/PerformanceTesterAgent.d.ts.map +1 -1
  34. package/dist/agents/PerformanceTesterAgent.js +25 -25
  35. package/dist/agents/PerformanceTesterAgent.js.map +1 -1
  36. package/dist/agents/ProductionIntelligenceAgent.d.ts.map +1 -1
  37. package/dist/agents/ProductionIntelligenceAgent.js +20 -20
  38. package/dist/agents/ProductionIntelligenceAgent.js.map +1 -1
  39. package/dist/agents/QXPartnerAgent.d.ts +0 -8
  40. package/dist/agents/QXPartnerAgent.d.ts.map +1 -1
  41. package/dist/agents/QXPartnerAgent.js +0 -15
  42. package/dist/agents/QXPartnerAgent.js.map +1 -1
  43. package/dist/agents/QualityAnalyzerAgent.d.ts +0 -7
  44. package/dist/agents/QualityAnalyzerAgent.d.ts.map +1 -1
  45. package/dist/agents/QualityAnalyzerAgent.js +0 -16
  46. package/dist/agents/QualityAnalyzerAgent.js.map +1 -1
  47. package/dist/agents/RegressionRiskAnalyzerAgent.d.ts.map +1 -1
  48. package/dist/agents/RegressionRiskAnalyzerAgent.js +18 -18
  49. package/dist/agents/RegressionRiskAnalyzerAgent.js.map +1 -1
  50. package/dist/agents/RequirementsValidatorAgent.d.ts.map +1 -1
  51. package/dist/agents/RequirementsValidatorAgent.js +21 -21
  52. package/dist/agents/RequirementsValidatorAgent.js.map +1 -1
  53. package/dist/agents/SecurityScannerAgent.d.ts.map +1 -1
  54. package/dist/agents/SecurityScannerAgent.js +38 -38
  55. package/dist/agents/SecurityScannerAgent.js.map +1 -1
  56. package/dist/agents/TestDataArchitectAgent.d.ts.map +1 -1
  57. package/dist/agents/TestDataArchitectAgent.js +29 -29
  58. package/dist/agents/TestDataArchitectAgent.js.map +1 -1
  59. package/dist/agents/TestExecutorAgent.d.ts +0 -7
  60. package/dist/agents/TestExecutorAgent.d.ts.map +1 -1
  61. package/dist/agents/TestExecutorAgent.js +35 -51
  62. package/dist/agents/TestExecutorAgent.js.map +1 -1
  63. package/dist/agents/TestGeneratorAgent.d.ts +0 -7
  64. package/dist/agents/TestGeneratorAgent.d.ts.map +1 -1
  65. package/dist/agents/TestGeneratorAgent.js +0 -16
  66. package/dist/agents/TestGeneratorAgent.js.map +1 -1
  67. package/dist/agents/adapters/AgentLLMAdapter.d.ts.map +1 -1
  68. package/dist/agents/adapters/AgentLLMAdapter.js +5 -4
  69. package/dist/agents/adapters/AgentLLMAdapter.js.map +1 -1
  70. package/dist/agents/adapters/CoordinatorAdapter.d.ts.map +1 -1
  71. package/dist/agents/adapters/CoordinatorAdapter.js +2 -1
  72. package/dist/agents/adapters/CoordinatorAdapter.js.map +1 -1
  73. package/dist/agents/n8n/N8nAPIClient.d.ts.map +1 -1
  74. package/dist/agents/n8n/N8nAPIClient.js +3 -2
  75. package/dist/agents/n8n/N8nAPIClient.js.map +1 -1
  76. package/dist/agents/n8n/N8nAuditPersistence.d.ts.map +1 -1
  77. package/dist/agents/n8n/N8nAuditPersistence.js +2 -1
  78. package/dist/agents/n8n/N8nAuditPersistence.js.map +1 -1
  79. package/dist/agents/n8n/N8nBaseAgent.js +1 -1
  80. package/dist/agents/n8n/N8nBaseAgent.js.map +1 -1
  81. package/dist/agents/n8n/N8nComplianceValidatorAgent.js +1 -1
  82. package/dist/agents/n8n/N8nComplianceValidatorAgent.js.map +1 -1
  83. package/dist/agents/n8n/N8nMonitoringValidatorAgent.js +1 -1
  84. package/dist/agents/n8n/N8nMonitoringValidatorAgent.js.map +1 -1
  85. package/dist/agents/n8n/N8nReplayabilityTesterAgent.js +1 -1
  86. package/dist/agents/n8n/N8nReplayabilityTesterAgent.js.map +1 -1
  87. package/dist/agents/n8n/N8nSecurityAuditorAgent.js +1 -1
  88. package/dist/agents/n8n/N8nSecurityAuditorAgent.js.map +1 -1
  89. package/dist/agents/pool/AgentPool.d.ts.map +1 -1
  90. package/dist/agents/pool/AgentPool.js +2 -1
  91. package/dist/agents/pool/AgentPool.js.map +1 -1
  92. package/dist/agents/pool/QEAgentPoolFactory.d.ts.map +1 -1
  93. package/dist/agents/pool/QEAgentPoolFactory.js +2 -1
  94. package/dist/agents/pool/QEAgentPoolFactory.js.map +1 -1
  95. package/dist/cli/commands/agent/spawn.d.ts +12 -1
  96. package/dist/cli/commands/agent/spawn.d.ts.map +1 -1
  97. package/dist/cli/commands/agent/spawn.js +95 -8
  98. package/dist/cli/commands/agent/spawn.js.map +1 -1
  99. package/dist/cli/index.js +91 -0
  100. package/dist/cli/index.js.map +1 -1
  101. package/dist/core/memory/HNSWVectorMemory.js +1 -1
  102. package/dist/edge/adapters/BrowserHNSWAdapter.d.ts +134 -0
  103. package/dist/edge/adapters/BrowserHNSWAdapter.d.ts.map +1 -0
  104. package/dist/edge/adapters/BrowserHNSWAdapter.js +484 -0
  105. package/dist/edge/adapters/BrowserHNSWAdapter.js.map +1 -0
  106. package/dist/edge/adapters/IndexedDBStorage.d.ts +114 -0
  107. package/dist/edge/adapters/IndexedDBStorage.d.ts.map +1 -0
  108. package/dist/edge/adapters/IndexedDBStorage.js +478 -0
  109. package/dist/edge/adapters/IndexedDBStorage.js.map +1 -0
  110. package/dist/edge/adapters/index.d.ts +12 -0
  111. package/dist/edge/adapters/index.d.ts.map +1 -0
  112. package/dist/edge/adapters/index.js +22 -0
  113. package/dist/edge/adapters/index.js.map +1 -0
  114. package/dist/edge/browser/BrowserAgent.d.ts +241 -0
  115. package/dist/edge/browser/BrowserAgent.d.ts.map +1 -0
  116. package/dist/edge/browser/BrowserAgent.js +743 -0
  117. package/dist/edge/browser/BrowserAgent.js.map +1 -0
  118. package/dist/edge/index.d.ts +34 -0
  119. package/dist/edge/index.d.ts.map +1 -0
  120. package/dist/edge/index.js +114 -0
  121. package/dist/edge/index.js.map +1 -0
  122. package/dist/edge/p2p/coordination/CoordinationManager.d.ts +181 -0
  123. package/dist/edge/p2p/coordination/CoordinationManager.d.ts.map +1 -0
  124. package/dist/edge/p2p/coordination/CoordinationManager.js +851 -0
  125. package/dist/edge/p2p/coordination/CoordinationManager.js.map +1 -0
  126. package/dist/edge/p2p/coordination/HealthMonitor.d.ts +143 -0
  127. package/dist/edge/p2p/coordination/HealthMonitor.d.ts.map +1 -0
  128. package/dist/edge/p2p/coordination/HealthMonitor.js +432 -0
  129. package/dist/edge/p2p/coordination/HealthMonitor.js.map +1 -0
  130. package/dist/edge/p2p/coordination/SyncOrchestrator.d.ts +146 -0
  131. package/dist/edge/p2p/coordination/SyncOrchestrator.d.ts.map +1 -0
  132. package/dist/edge/p2p/coordination/SyncOrchestrator.js +783 -0
  133. package/dist/edge/p2p/coordination/SyncOrchestrator.js.map +1 -0
  134. package/dist/edge/p2p/coordination/index.d.ts +70 -0
  135. package/dist/edge/p2p/coordination/index.d.ts.map +1 -0
  136. package/dist/edge/p2p/coordination/index.js +107 -0
  137. package/dist/edge/p2p/coordination/index.js.map +1 -0
  138. package/dist/edge/p2p/coordination/types.d.ts +572 -0
  139. package/dist/edge/p2p/coordination/types.d.ts.map +1 -0
  140. package/dist/edge/p2p/coordination/types.js +366 -0
  141. package/dist/edge/p2p/coordination/types.js.map +1 -0
  142. package/dist/edge/p2p/crdt/CRDTStore.d.ts +324 -0
  143. package/dist/edge/p2p/crdt/CRDTStore.d.ts.map +1 -0
  144. package/dist/edge/p2p/crdt/CRDTStore.js +839 -0
  145. package/dist/edge/p2p/crdt/CRDTStore.js.map +1 -0
  146. package/dist/edge/p2p/crdt/GCounter.d.ts +173 -0
  147. package/dist/edge/p2p/crdt/GCounter.d.ts.map +1 -0
  148. package/dist/edge/p2p/crdt/GCounter.js +394 -0
  149. package/dist/edge/p2p/crdt/GCounter.js.map +1 -0
  150. package/dist/edge/p2p/crdt/LWWRegister.d.ts +200 -0
  151. package/dist/edge/p2p/crdt/LWWRegister.d.ts.map +1 -0
  152. package/dist/edge/p2p/crdt/LWWRegister.js +456 -0
  153. package/dist/edge/p2p/crdt/LWWRegister.js.map +1 -0
  154. package/dist/edge/p2p/crdt/ORSet.d.ts +232 -0
  155. package/dist/edge/p2p/crdt/ORSet.d.ts.map +1 -0
  156. package/dist/edge/p2p/crdt/ORSet.js +723 -0
  157. package/dist/edge/p2p/crdt/ORSet.js.map +1 -0
  158. package/dist/edge/p2p/crdt/PatternCRDT.d.ts +366 -0
  159. package/dist/edge/p2p/crdt/PatternCRDT.d.ts.map +1 -0
  160. package/dist/edge/p2p/crdt/PatternCRDT.js +838 -0
  161. package/dist/edge/p2p/crdt/PatternCRDT.js.map +1 -0
  162. package/dist/edge/p2p/crdt/VectorClock.d.ts +274 -0
  163. package/dist/edge/p2p/crdt/VectorClock.d.ts.map +1 -0
  164. package/dist/edge/p2p/crdt/VectorClock.js +499 -0
  165. package/dist/edge/p2p/crdt/VectorClock.js.map +1 -0
  166. package/dist/edge/p2p/crdt/index.d.ts +87 -0
  167. package/dist/edge/p2p/crdt/index.d.ts.map +1 -0
  168. package/dist/edge/p2p/crdt/index.js +120 -0
  169. package/dist/edge/p2p/crdt/index.js.map +1 -0
  170. package/dist/edge/p2p/crdt/types.d.ts +667 -0
  171. package/dist/edge/p2p/crdt/types.d.ts.map +1 -0
  172. package/dist/edge/p2p/crdt/types.js +208 -0
  173. package/dist/edge/p2p/crdt/types.js.map +1 -0
  174. package/dist/edge/p2p/crypto/Identity.d.ts +139 -0
  175. package/dist/edge/p2p/crypto/Identity.d.ts.map +1 -0
  176. package/dist/edge/p2p/crypto/Identity.js +449 -0
  177. package/dist/edge/p2p/crypto/Identity.js.map +1 -0
  178. package/dist/edge/p2p/crypto/KeyManager.d.ts +196 -0
  179. package/dist/edge/p2p/crypto/KeyManager.d.ts.map +1 -0
  180. package/dist/edge/p2p/crypto/KeyManager.js +576 -0
  181. package/dist/edge/p2p/crypto/KeyManager.js.map +1 -0
  182. package/dist/edge/p2p/crypto/Signer.d.ts +164 -0
  183. package/dist/edge/p2p/crypto/Signer.d.ts.map +1 -0
  184. package/dist/edge/p2p/crypto/Signer.js +357 -0
  185. package/dist/edge/p2p/crypto/Signer.js.map +1 -0
  186. package/dist/edge/p2p/crypto/index.d.ts +90 -0
  187. package/dist/edge/p2p/crypto/index.d.ts.map +1 -0
  188. package/dist/edge/p2p/crypto/index.js +158 -0
  189. package/dist/edge/p2p/crypto/index.js.map +1 -0
  190. package/dist/edge/p2p/crypto/types.d.ts +217 -0
  191. package/dist/edge/p2p/crypto/types.d.ts.map +1 -0
  192. package/dist/edge/p2p/crypto/types.js +42 -0
  193. package/dist/edge/p2p/crypto/types.js.map +1 -0
  194. package/dist/edge/p2p/federated/FederatedCoordinator.d.ts +270 -0
  195. package/dist/edge/p2p/federated/FederatedCoordinator.d.ts.map +1 -0
  196. package/dist/edge/p2p/federated/FederatedCoordinator.js +824 -0
  197. package/dist/edge/p2p/federated/FederatedCoordinator.js.map +1 -0
  198. package/dist/edge/p2p/federated/FederatedRound.d.ts +295 -0
  199. package/dist/edge/p2p/federated/FederatedRound.d.ts.map +1 -0
  200. package/dist/edge/p2p/federated/FederatedRound.js +819 -0
  201. package/dist/edge/p2p/federated/FederatedRound.js.map +1 -0
  202. package/dist/edge/p2p/federated/GradientAggregator.d.ts +226 -0
  203. package/dist/edge/p2p/federated/GradientAggregator.d.ts.map +1 -0
  204. package/dist/edge/p2p/federated/GradientAggregator.js +826 -0
  205. package/dist/edge/p2p/federated/GradientAggregator.js.map +1 -0
  206. package/dist/edge/p2p/federated/ModelManager.d.ts +248 -0
  207. package/dist/edge/p2p/federated/ModelManager.d.ts.map +1 -0
  208. package/dist/edge/p2p/federated/ModelManager.js +724 -0
  209. package/dist/edge/p2p/federated/ModelManager.js.map +1 -0
  210. package/dist/edge/p2p/federated/index.d.ts +65 -0
  211. package/dist/edge/p2p/federated/index.d.ts.map +1 -0
  212. package/dist/edge/p2p/federated/index.js +110 -0
  213. package/dist/edge/p2p/federated/index.js.map +1 -0
  214. package/dist/edge/p2p/federated/types.d.ts +905 -0
  215. package/dist/edge/p2p/federated/types.d.ts.map +1 -0
  216. package/dist/edge/p2p/federated/types.js +339 -0
  217. package/dist/edge/p2p/federated/types.js.map +1 -0
  218. package/dist/edge/p2p/index.d.ts +156 -0
  219. package/dist/edge/p2p/index.d.ts.map +1 -0
  220. package/dist/edge/p2p/index.js +242 -0
  221. package/dist/edge/p2p/index.js.map +1 -0
  222. package/dist/edge/p2p/nat/ConnectivityTester.d.ts +128 -0
  223. package/dist/edge/p2p/nat/ConnectivityTester.d.ts.map +1 -0
  224. package/dist/edge/p2p/nat/ConnectivityTester.js +560 -0
  225. package/dist/edge/p2p/nat/ConnectivityTester.js.map +1 -0
  226. package/dist/edge/p2p/nat/HolePuncher.d.ts +159 -0
  227. package/dist/edge/p2p/nat/HolePuncher.d.ts.map +1 -0
  228. package/dist/edge/p2p/nat/HolePuncher.js +569 -0
  229. package/dist/edge/p2p/nat/HolePuncher.js.map +1 -0
  230. package/dist/edge/p2p/nat/NATDetector.d.ts +109 -0
  231. package/dist/edge/p2p/nat/NATDetector.d.ts.map +1 -0
  232. package/dist/edge/p2p/nat/NATDetector.js +472 -0
  233. package/dist/edge/p2p/nat/NATDetector.js.map +1 -0
  234. package/dist/edge/p2p/nat/TURNManager.d.ts +158 -0
  235. package/dist/edge/p2p/nat/TURNManager.d.ts.map +1 -0
  236. package/dist/edge/p2p/nat/TURNManager.js +547 -0
  237. package/dist/edge/p2p/nat/TURNManager.js.map +1 -0
  238. package/dist/edge/p2p/nat/index.d.ts +74 -0
  239. package/dist/edge/p2p/nat/index.d.ts.map +1 -0
  240. package/dist/edge/p2p/nat/index.js +104 -0
  241. package/dist/edge/p2p/nat/index.js.map +1 -0
  242. package/dist/edge/p2p/nat/types.d.ts +583 -0
  243. package/dist/edge/p2p/nat/types.d.ts.map +1 -0
  244. package/dist/edge/p2p/nat/types.js +267 -0
  245. package/dist/edge/p2p/nat/types.js.map +1 -0
  246. package/dist/edge/p2p/protocol/AgentChannel.d.ts +333 -0
  247. package/dist/edge/p2p/protocol/AgentChannel.d.ts.map +1 -0
  248. package/dist/edge/p2p/protocol/AgentChannel.js +914 -0
  249. package/dist/edge/p2p/protocol/AgentChannel.js.map +1 -0
  250. package/dist/edge/p2p/protocol/MessageEncoder.d.ts +147 -0
  251. package/dist/edge/p2p/protocol/MessageEncoder.d.ts.map +1 -0
  252. package/dist/edge/p2p/protocol/MessageEncoder.js +738 -0
  253. package/dist/edge/p2p/protocol/MessageEncoder.js.map +1 -0
  254. package/dist/edge/p2p/protocol/MessageRouter.d.ts +266 -0
  255. package/dist/edge/p2p/protocol/MessageRouter.d.ts.map +1 -0
  256. package/dist/edge/p2p/protocol/MessageRouter.js +808 -0
  257. package/dist/edge/p2p/protocol/MessageRouter.js.map +1 -0
  258. package/dist/edge/p2p/protocol/ProtocolHandler.d.ts +309 -0
  259. package/dist/edge/p2p/protocol/ProtocolHandler.d.ts.map +1 -0
  260. package/dist/edge/p2p/protocol/ProtocolHandler.js +930 -0
  261. package/dist/edge/p2p/protocol/ProtocolHandler.js.map +1 -0
  262. package/dist/edge/p2p/protocol/index.d.ts +114 -0
  263. package/dist/edge/p2p/protocol/index.d.ts.map +1 -0
  264. package/dist/edge/p2p/protocol/index.js +206 -0
  265. package/dist/edge/p2p/protocol/index.js.map +1 -0
  266. package/dist/edge/p2p/protocol/types.d.ts +737 -0
  267. package/dist/edge/p2p/protocol/types.d.ts.map +1 -0
  268. package/dist/edge/p2p/protocol/types.js +490 -0
  269. package/dist/edge/p2p/protocol/types.js.map +1 -0
  270. package/dist/edge/p2p/sharing/PatternBroadcaster.d.ts +284 -0
  271. package/dist/edge/p2p/sharing/PatternBroadcaster.d.ts.map +1 -0
  272. package/dist/edge/p2p/sharing/PatternBroadcaster.js +644 -0
  273. package/dist/edge/p2p/sharing/PatternBroadcaster.js.map +1 -0
  274. package/dist/edge/p2p/sharing/PatternIndex.d.ts +168 -0
  275. package/dist/edge/p2p/sharing/PatternIndex.d.ts.map +1 -0
  276. package/dist/edge/p2p/sharing/PatternIndex.js +781 -0
  277. package/dist/edge/p2p/sharing/PatternIndex.js.map +1 -0
  278. package/dist/edge/p2p/sharing/PatternSerializer.d.ts +163 -0
  279. package/dist/edge/p2p/sharing/PatternSerializer.d.ts.map +1 -0
  280. package/dist/edge/p2p/sharing/PatternSerializer.js +696 -0
  281. package/dist/edge/p2p/sharing/PatternSerializer.js.map +1 -0
  282. package/dist/edge/p2p/sharing/PatternSyncManager.d.ts +242 -0
  283. package/dist/edge/p2p/sharing/PatternSyncManager.d.ts.map +1 -0
  284. package/dist/edge/p2p/sharing/PatternSyncManager.js +859 -0
  285. package/dist/edge/p2p/sharing/PatternSyncManager.js.map +1 -0
  286. package/dist/edge/p2p/sharing/index.d.ts +90 -0
  287. package/dist/edge/p2p/sharing/index.d.ts.map +1 -0
  288. package/dist/edge/p2p/sharing/index.js +152 -0
  289. package/dist/edge/p2p/sharing/index.js.map +1 -0
  290. package/dist/edge/p2p/sharing/types.d.ts +796 -0
  291. package/dist/edge/p2p/sharing/types.d.ts.map +1 -0
  292. package/dist/edge/p2p/sharing/types.js +264 -0
  293. package/dist/edge/p2p/sharing/types.js.map +1 -0
  294. package/dist/edge/p2p/webrtc/ConnectionPool.d.ts +218 -0
  295. package/dist/edge/p2p/webrtc/ConnectionPool.d.ts.map +1 -0
  296. package/dist/edge/p2p/webrtc/ConnectionPool.js +562 -0
  297. package/dist/edge/p2p/webrtc/ConnectionPool.js.map +1 -0
  298. package/dist/edge/p2p/webrtc/ICEManager.d.ts +171 -0
  299. package/dist/edge/p2p/webrtc/ICEManager.d.ts.map +1 -0
  300. package/dist/edge/p2p/webrtc/ICEManager.js +490 -0
  301. package/dist/edge/p2p/webrtc/ICEManager.js.map +1 -0
  302. package/dist/edge/p2p/webrtc/PeerConnectionManager.d.ts +159 -0
  303. package/dist/edge/p2p/webrtc/PeerConnectionManager.d.ts.map +1 -0
  304. package/dist/edge/p2p/webrtc/PeerConnectionManager.js +735 -0
  305. package/dist/edge/p2p/webrtc/PeerConnectionManager.js.map +1 -0
  306. package/dist/edge/p2p/webrtc/SignalingClient.d.ts +191 -0
  307. package/dist/edge/p2p/webrtc/SignalingClient.d.ts.map +1 -0
  308. package/dist/edge/p2p/webrtc/SignalingClient.js +608 -0
  309. package/dist/edge/p2p/webrtc/SignalingClient.js.map +1 -0
  310. package/dist/edge/p2p/webrtc/index.d.ts +158 -0
  311. package/dist/edge/p2p/webrtc/index.d.ts.map +1 -0
  312. package/dist/edge/p2p/webrtc/index.js +164 -0
  313. package/dist/edge/p2p/webrtc/index.js.map +1 -0
  314. package/dist/edge/p2p/webrtc/types.d.ts +665 -0
  315. package/dist/edge/p2p/webrtc/types.d.ts.map +1 -0
  316. package/dist/edge/p2p/webrtc/types.js +245 -0
  317. package/dist/edge/p2p/webrtc/types.js.map +1 -0
  318. package/dist/edge/server/AgentSpawnAPI.d.ts +98 -0
  319. package/dist/edge/server/AgentSpawnAPI.d.ts.map +1 -0
  320. package/dist/edge/server/AgentSpawnAPI.js +264 -0
  321. package/dist/edge/server/AgentSpawnAPI.js.map +1 -0
  322. package/dist/edge/server/SignalingServer.d.ts +71 -0
  323. package/dist/edge/server/SignalingServer.d.ts.map +1 -0
  324. package/dist/edge/server/SignalingServer.js +429 -0
  325. package/dist/edge/server/SignalingServer.js.map +1 -0
  326. package/dist/edge/server/index.d.ts +64 -0
  327. package/dist/edge/server/index.d.ts.map +1 -0
  328. package/dist/edge/server/index.js +318 -0
  329. package/dist/edge/server/index.js.map +1 -0
  330. package/dist/edge/types/browser-agent.types.d.ts +455 -0
  331. package/dist/edge/types/browser-agent.types.d.ts.map +1 -0
  332. package/dist/edge/types/browser-agent.types.js +116 -0
  333. package/dist/edge/types/browser-agent.types.js.map +1 -0
  334. package/dist/edge/types/index.d.ts +11 -0
  335. package/dist/edge/types/index.d.ts.map +1 -0
  336. package/dist/edge/types/index.js +17 -0
  337. package/dist/edge/types/index.js.map +1 -0
  338. package/dist/edge/types/storage.types.d.ts +207 -0
  339. package/dist/edge/types/storage.types.d.ts.map +1 -0
  340. package/dist/edge/types/storage.types.js +47 -0
  341. package/dist/edge/types/storage.types.js.map +1 -0
  342. package/dist/edge/wasm/shims.d.ts +224 -0
  343. package/dist/edge/wasm/shims.d.ts.map +1 -0
  344. package/dist/edge/wasm/shims.js +667 -0
  345. package/dist/edge/wasm/shims.js.map +1 -0
  346. package/dist/mcp/handlers/NewDomainToolsHandler.d.ts +33 -0
  347. package/dist/mcp/handlers/NewDomainToolsHandler.d.ts.map +1 -0
  348. package/dist/mcp/handlers/NewDomainToolsHandler.js +305 -0
  349. package/dist/mcp/handlers/NewDomainToolsHandler.js.map +1 -0
  350. package/dist/mcp/handlers/filtered/index.d.ts +15 -19
  351. package/dist/mcp/handlers/filtered/index.d.ts.map +1 -1
  352. package/dist/mcp/handlers/filtered/index.js +16 -27
  353. package/dist/mcp/handlers/filtered/index.js.map +1 -1
  354. package/dist/mcp/handlers/integration/index.d.ts +5 -4
  355. package/dist/mcp/handlers/integration/index.d.ts.map +1 -1
  356. package/dist/mcp/handlers/integration/index.js +7 -7
  357. package/dist/mcp/handlers/integration/index.js.map +1 -1
  358. package/dist/mcp/server-instructions.d.ts +1 -1
  359. package/dist/mcp/server-instructions.js +1 -1
  360. package/dist/mcp/server.d.ts.map +1 -1
  361. package/dist/mcp/server.js +14 -0
  362. package/dist/mcp/server.js.map +1 -1
  363. package/dist/mcp/tools.d.ts +8 -0
  364. package/dist/mcp/tools.d.ts.map +1 -1
  365. package/dist/mcp/tools.js +412 -1
  366. package/dist/mcp/tools.js.map +1 -1
  367. package/dist/persistence/migrations/all-migrations.d.ts.map +1 -1
  368. package/dist/persistence/migrations/all-migrations.js +44 -1
  369. package/dist/persistence/migrations/all-migrations.js.map +1 -1
  370. package/dist/planning/GOAPPlanner.d.ts +1 -0
  371. package/dist/planning/GOAPPlanner.d.ts.map +1 -1
  372. package/dist/planning/GOAPPlanner.js +15 -2
  373. package/dist/planning/GOAPPlanner.js.map +1 -1
  374. package/dist/planning/PlanLearning.d.ts.map +1 -1
  375. package/dist/planning/PlanLearning.js +2 -1
  376. package/dist/planning/PlanLearning.js.map +1 -1
  377. package/dist/planning/PlanSimilarity.d.ts.map +1 -1
  378. package/dist/planning/PlanSimilarity.js +2 -1
  379. package/dist/planning/PlanSimilarity.js.map +1 -1
  380. package/package.json +29 -8
  381. package/dist/alerting/AlertManager.d.ts +0 -120
  382. package/dist/alerting/AlertManager.d.ts.map +0 -1
  383. package/dist/alerting/AlertManager.js +0 -345
  384. package/dist/alerting/AlertManager.js.map +0 -1
  385. package/dist/alerting/FeedbackRouter.d.ts +0 -98
  386. package/dist/alerting/FeedbackRouter.d.ts.map +0 -1
  387. package/dist/alerting/FeedbackRouter.js +0 -331
  388. package/dist/alerting/FeedbackRouter.js.map +0 -1
  389. package/dist/alerting/StrategyApplicator.d.ts +0 -120
  390. package/dist/alerting/StrategyApplicator.d.ts.map +0 -1
  391. package/dist/alerting/StrategyApplicator.js +0 -299
  392. package/dist/alerting/StrategyApplicator.js.map +0 -1
  393. package/dist/alerting/index.d.ts +0 -68
  394. package/dist/alerting/index.d.ts.map +0 -1
  395. package/dist/alerting/index.js +0 -112
  396. package/dist/alerting/index.js.map +0 -1
  397. package/dist/alerting/types.d.ts +0 -118
  398. package/dist/alerting/types.d.ts.map +0 -1
  399. package/dist/alerting/types.js +0 -11
  400. package/dist/alerting/types.js.map +0 -1
  401. package/dist/cli/commands/fleet/backup.d.ts +0 -49
  402. package/dist/cli/commands/fleet/backup.d.ts.map +0 -1
  403. package/dist/cli/commands/fleet/backup.js +0 -88
  404. package/dist/cli/commands/fleet/backup.js.map +0 -1
  405. package/dist/cli/commands/fleet/health.d.ts +0 -154
  406. package/dist/cli/commands/fleet/health.d.ts.map +0 -1
  407. package/dist/cli/commands/fleet/health.js +0 -483
  408. package/dist/cli/commands/fleet/health.js.map +0 -1
  409. package/dist/cli/commands/fleet/init.d.ts +0 -11
  410. package/dist/cli/commands/fleet/init.d.ts.map +0 -1
  411. package/dist/cli/commands/fleet/init.js +0 -91
  412. package/dist/cli/commands/fleet/init.js.map +0 -1
  413. package/dist/cli/commands/fleet/logs.d.ts +0 -21
  414. package/dist/cli/commands/fleet/logs.d.ts.map +0 -1
  415. package/dist/cli/commands/fleet/logs.js +0 -267
  416. package/dist/cli/commands/fleet/logs.js.map +0 -1
  417. package/dist/cli/commands/fleet/metrics.d.ts +0 -27
  418. package/dist/cli/commands/fleet/metrics.d.ts.map +0 -1
  419. package/dist/cli/commands/fleet/metrics.js +0 -369
  420. package/dist/cli/commands/fleet/metrics.js.map +0 -1
  421. package/dist/cli/commands/fleet/monitor.d.ts +0 -18
  422. package/dist/cli/commands/fleet/monitor.d.ts.map +0 -1
  423. package/dist/cli/commands/fleet/monitor.js +0 -237
  424. package/dist/cli/commands/fleet/monitor.js.map +0 -1
  425. package/dist/cli/commands/fleet/optimize.d.ts +0 -42
  426. package/dist/cli/commands/fleet/optimize.d.ts.map +0 -1
  427. package/dist/cli/commands/fleet/optimize.js +0 -135
  428. package/dist/cli/commands/fleet/optimize.js.map +0 -1
  429. package/dist/cli/commands/fleet/recover.d.ts +0 -22
  430. package/dist/cli/commands/fleet/recover.d.ts.map +0 -1
  431. package/dist/cli/commands/fleet/recover.js +0 -99
  432. package/dist/cli/commands/fleet/recover.js.map +0 -1
  433. package/dist/cli/commands/fleet/restart.d.ts +0 -18
  434. package/dist/cli/commands/fleet/restart.d.ts.map +0 -1
  435. package/dist/cli/commands/fleet/restart.js +0 -290
  436. package/dist/cli/commands/fleet/restart.js.map +0 -1
  437. package/dist/cli/commands/fleet/scale.d.ts +0 -9
  438. package/dist/cli/commands/fleet/scale.d.ts.map +0 -1
  439. package/dist/cli/commands/fleet/scale.js +0 -77
  440. package/dist/cli/commands/fleet/scale.js.map +0 -1
  441. package/dist/cli/commands/fleet/shutdown.d.ts +0 -19
  442. package/dist/cli/commands/fleet/shutdown.d.ts.map +0 -1
  443. package/dist/cli/commands/fleet/shutdown.js +0 -307
  444. package/dist/cli/commands/fleet/shutdown.js.map +0 -1
  445. package/dist/cli/commands/fleet/status.d.ts +0 -10
  446. package/dist/cli/commands/fleet/status.d.ts.map +0 -1
  447. package/dist/cli/commands/fleet/status.js +0 -97
  448. package/dist/cli/commands/fleet/status.js.map +0 -1
  449. package/dist/cli/commands/fleet/topology.d.ts +0 -23
  450. package/dist/cli/commands/fleet/topology.d.ts.map +0 -1
  451. package/dist/cli/commands/fleet/topology.js +0 -376
  452. package/dist/cli/commands/fleet/topology.js.map +0 -1
  453. package/dist/cli/commands/monitor/alerts.d.ts +0 -45
  454. package/dist/cli/commands/monitor/alerts.d.ts.map +0 -1
  455. package/dist/cli/commands/monitor/alerts.js +0 -168
  456. package/dist/cli/commands/monitor/alerts.js.map +0 -1
  457. package/dist/cli/commands/monitor/analyze.d.ts +0 -49
  458. package/dist/cli/commands/monitor/analyze.d.ts.map +0 -1
  459. package/dist/cli/commands/monitor/analyze.js +0 -209
  460. package/dist/cli/commands/monitor/analyze.js.map +0 -1
  461. package/dist/cli/commands/monitor/compare.d.ts +0 -38
  462. package/dist/cli/commands/monitor/compare.d.ts.map +0 -1
  463. package/dist/cli/commands/monitor/compare.js +0 -177
  464. package/dist/cli/commands/monitor/compare.js.map +0 -1
  465. package/dist/cli/commands/monitor/dashboard.d.ts +0 -34
  466. package/dist/cli/commands/monitor/dashboard.d.ts.map +0 -1
  467. package/dist/cli/commands/monitor/dashboard.js +0 -157
  468. package/dist/cli/commands/monitor/dashboard.js.map +0 -1
  469. package/dist/cli/commands/monitor/export.d.ts +0 -36
  470. package/dist/cli/commands/monitor/export.d.ts.map +0 -1
  471. package/dist/cli/commands/monitor/export.js +0 -157
  472. package/dist/cli/commands/monitor/export.js.map +0 -1
  473. package/dist/cli/commands/monitor/index.d.ts +0 -11
  474. package/dist/cli/commands/monitor/index.d.ts.map +0 -1
  475. package/dist/cli/commands/monitor/index.js +0 -14
  476. package/dist/cli/commands/monitor/index.js.map +0 -1
  477. package/dist/cli/commands/quality/baseline.d.ts +0 -27
  478. package/dist/cli/commands/quality/baseline.d.ts.map +0 -1
  479. package/dist/cli/commands/quality/baseline.js +0 -124
  480. package/dist/cli/commands/quality/baseline.js.map +0 -1
  481. package/dist/cli/commands/quality/compare.d.ts +0 -36
  482. package/dist/cli/commands/quality/compare.d.ts.map +0 -1
  483. package/dist/cli/commands/quality/compare.js +0 -136
  484. package/dist/cli/commands/quality/compare.js.map +0 -1
  485. package/dist/cli/commands/quality/decision.d.ts +0 -81
  486. package/dist/cli/commands/quality/decision.d.ts.map +0 -1
  487. package/dist/cli/commands/quality/decision.js +0 -319
  488. package/dist/cli/commands/quality/decision.js.map +0 -1
  489. package/dist/cli/commands/quality/gate.d.ts +0 -47
  490. package/dist/cli/commands/quality/gate.d.ts.map +0 -1
  491. package/dist/cli/commands/quality/gate.js +0 -205
  492. package/dist/cli/commands/quality/gate.js.map +0 -1
  493. package/dist/cli/commands/quality/index.d.ts +0 -17
  494. package/dist/cli/commands/quality/index.d.ts.map +0 -1
  495. package/dist/cli/commands/quality/index.js +0 -41
  496. package/dist/cli/commands/quality/index.js.map +0 -1
  497. package/dist/cli/commands/quality/policy.d.ts +0 -57
  498. package/dist/cli/commands/quality/policy.d.ts.map +0 -1
  499. package/dist/cli/commands/quality/policy.js +0 -359
  500. package/dist/cli/commands/quality/policy.js.map +0 -1
  501. package/dist/cli/commands/quality/risk.d.ts +0 -41
  502. package/dist/cli/commands/quality/risk.d.ts.map +0 -1
  503. package/dist/cli/commands/quality/risk.js +0 -255
  504. package/dist/cli/commands/quality/risk.js.map +0 -1
  505. package/dist/cli/commands/quality/trends.d.ts +0 -40
  506. package/dist/cli/commands/quality/trends.d.ts.map +0 -1
  507. package/dist/cli/commands/quality/trends.js +0 -122
  508. package/dist/cli/commands/quality/trends.js.map +0 -1
  509. package/dist/cli/commands/quality/validate.d.ts +0 -44
  510. package/dist/cli/commands/quality/validate.d.ts.map +0 -1
  511. package/dist/cli/commands/quality/validate.js +0 -234
  512. package/dist/cli/commands/quality/validate.js.map +0 -1
  513. package/dist/cli/commands/test/analyze-failures.d.ts +0 -39
  514. package/dist/cli/commands/test/analyze-failures.d.ts.map +0 -1
  515. package/dist/cli/commands/test/analyze-failures.js +0 -113
  516. package/dist/cli/commands/test/analyze-failures.js.map +0 -1
  517. package/dist/cli/commands/test/clean.d.ts +0 -3
  518. package/dist/cli/commands/test/clean.d.ts.map +0 -1
  519. package/dist/cli/commands/test/clean.js +0 -148
  520. package/dist/cli/commands/test/clean.js.map +0 -1
  521. package/dist/cli/commands/test/debug.d.ts +0 -3
  522. package/dist/cli/commands/test/debug.d.ts.map +0 -1
  523. package/dist/cli/commands/test/debug.js +0 -167
  524. package/dist/cli/commands/test/debug.js.map +0 -1
  525. package/dist/cli/commands/test/diff.d.ts +0 -3
  526. package/dist/cli/commands/test/diff.d.ts.map +0 -1
  527. package/dist/cli/commands/test/diff.js +0 -195
  528. package/dist/cli/commands/test/diff.js.map +0 -1
  529. package/dist/cli/commands/test/flakiness.d.ts +0 -32
  530. package/dist/cli/commands/test/flakiness.d.ts.map +0 -1
  531. package/dist/cli/commands/test/flakiness.js +0 -121
  532. package/dist/cli/commands/test/flakiness.js.map +0 -1
  533. package/dist/cli/commands/test/index.d.ts +0 -17
  534. package/dist/cli/commands/test/index.d.ts.map +0 -1
  535. package/dist/cli/commands/test/index.js +0 -45
  536. package/dist/cli/commands/test/index.js.map +0 -1
  537. package/dist/cli/commands/test/mutate.d.ts +0 -29
  538. package/dist/cli/commands/test/mutate.d.ts.map +0 -1
  539. package/dist/cli/commands/test/mutate.js +0 -163
  540. package/dist/cli/commands/test/mutate.js.map +0 -1
  541. package/dist/cli/commands/test/parallel.d.ts +0 -3
  542. package/dist/cli/commands/test/parallel.d.ts.map +0 -1
  543. package/dist/cli/commands/test/parallel.js +0 -117
  544. package/dist/cli/commands/test/parallel.js.map +0 -1
  545. package/dist/cli/commands/test/profile.d.ts +0 -3
  546. package/dist/cli/commands/test/profile.d.ts.map +0 -1
  547. package/dist/cli/commands/test/profile.js +0 -156
  548. package/dist/cli/commands/test/profile.js.map +0 -1
  549. package/dist/cli/commands/test/queue.d.ts +0 -3
  550. package/dist/cli/commands/test/queue.d.ts.map +0 -1
  551. package/dist/cli/commands/test/queue.js +0 -140
  552. package/dist/cli/commands/test/queue.js.map +0 -1
  553. package/dist/cli/commands/test/retry.d.ts +0 -3
  554. package/dist/cli/commands/test/retry.d.ts.map +0 -1
  555. package/dist/cli/commands/test/retry.js +0 -105
  556. package/dist/cli/commands/test/retry.js.map +0 -1
  557. package/dist/cli/commands/test/snapshot.d.ts +0 -3
  558. package/dist/cli/commands/test/snapshot.d.ts.map +0 -1
  559. package/dist/cli/commands/test/snapshot.js +0 -176
  560. package/dist/cli/commands/test/snapshot.js.map +0 -1
  561. package/dist/cli/commands/test/trace.d.ts +0 -3
  562. package/dist/cli/commands/test/trace.d.ts.map +0 -1
  563. package/dist/cli/commands/test/trace.js +0 -137
  564. package/dist/cli/commands/test/trace.js.map +0 -1
  565. package/dist/cli/commands/test/watch.d.ts +0 -3
  566. package/dist/cli/commands/test/watch.d.ts.map +0 -1
  567. package/dist/cli/commands/test/watch.js +0 -130
  568. package/dist/cli/commands/test/watch.js.map +0 -1
  569. package/dist/cli/index-spec.d.ts +0 -3
  570. package/dist/cli/index-spec.d.ts.map +0 -1
  571. package/dist/cli/index-spec.js +0 -154
  572. package/dist/cli/index-spec.js.map +0 -1
  573. package/dist/cli/index-working.d.ts +0 -7
  574. package/dist/cli/index-working.d.ts.map +0 -1
  575. package/dist/cli/index-working.js +0 -617
  576. package/dist/cli/index-working.js.map +0 -1
  577. package/dist/mcp/handlers/filtered/coverage-analyzer-filtered.d.ts +0 -83
  578. package/dist/mcp/handlers/filtered/coverage-analyzer-filtered.d.ts.map +0 -1
  579. package/dist/mcp/handlers/filtered/coverage-analyzer-filtered.js +0 -130
  580. package/dist/mcp/handlers/filtered/coverage-analyzer-filtered.js.map +0 -1
  581. package/dist/mcp/handlers/filtered/flaky-detector-filtered.d.ts +0 -58
  582. package/dist/mcp/handlers/filtered/flaky-detector-filtered.d.ts.map +0 -1
  583. package/dist/mcp/handlers/filtered/flaky-detector-filtered.js +0 -84
  584. package/dist/mcp/handlers/filtered/flaky-detector-filtered.js.map +0 -1
  585. package/dist/mcp/handlers/filtered/security-scanner-filtered.d.ts +0 -54
  586. package/dist/mcp/handlers/filtered/security-scanner-filtered.d.ts.map +0 -1
  587. package/dist/mcp/handlers/filtered/security-scanner-filtered.js +0 -73
  588. package/dist/mcp/handlers/filtered/security-scanner-filtered.js.map +0 -1
  589. package/dist/mcp/handlers/integration/contract-validate.d.ts +0 -10
  590. package/dist/mcp/handlers/integration/contract-validate.d.ts.map +0 -1
  591. package/dist/mcp/handlers/integration/contract-validate.js +0 -348
  592. package/dist/mcp/handlers/integration/contract-validate.js.map +0 -1
  593. package/dist/reporting/ResultAggregator.d.ts +0 -107
  594. package/dist/reporting/ResultAggregator.d.ts.map +0 -1
  595. package/dist/reporting/ResultAggregator.js +0 -435
  596. package/dist/reporting/ResultAggregator.js.map +0 -1
  597. package/dist/reporting/index.d.ts +0 -48
  598. package/dist/reporting/index.d.ts.map +0 -1
  599. package/dist/reporting/index.js +0 -154
  600. package/dist/reporting/index.js.map +0 -1
  601. package/dist/reporting/reporters/ControlLoopReporter.d.ts +0 -128
  602. package/dist/reporting/reporters/ControlLoopReporter.d.ts.map +0 -1
  603. package/dist/reporting/reporters/ControlLoopReporter.js +0 -417
  604. package/dist/reporting/reporters/ControlLoopReporter.js.map +0 -1
  605. package/dist/reporting/reporters/HumanReadableReporter.d.ts +0 -140
  606. package/dist/reporting/reporters/HumanReadableReporter.d.ts.map +0 -1
  607. package/dist/reporting/reporters/HumanReadableReporter.js +0 -524
  608. package/dist/reporting/reporters/HumanReadableReporter.js.map +0 -1
  609. package/dist/reporting/reporters/JSONReporter.d.ts +0 -251
  610. package/dist/reporting/reporters/JSONReporter.d.ts.map +0 -1
  611. package/dist/reporting/reporters/JSONReporter.js +0 -325
  612. package/dist/reporting/reporters/JSONReporter.js.map +0 -1
  613. package/dist/reporting/reporters/index.d.ts +0 -14
  614. package/dist/reporting/reporters/index.d.ts.map +0 -1
  615. package/dist/reporting/reporters/index.js +0 -19
  616. package/dist/reporting/reporters/index.js.map +0 -1
  617. package/dist/reporting/types.d.ts +0 -427
  618. package/dist/reporting/types.d.ts.map +0 -1
  619. package/dist/reporting/types.js +0 -12
  620. package/dist/reporting/types.js.map +0 -1
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Ed25519 Signature Operations
3
+ *
4
+ * Provides signing and verification operations for P2P agent messages.
5
+ * Uses SHA-256 based HMAC for browser compatibility (production should use proper Ed25519).
6
+ *
7
+ * Features:
8
+ * - Sign messages with private key
9
+ * - Verify signatures with public key
10
+ * - JSON canonicalization for structured data
11
+ * - Batch signature verification
12
+ * - Identity proof generation
13
+ *
14
+ * @module edge/p2p/crypto/Signer
15
+ * @version 1.0.0
16
+ */
17
+ import type { KeyPair, SignedMessage, VerificationResult, BatchVerificationResult, IdentityProof, AgentIdentity } from './types';
18
+ /**
19
+ * Signer - Ed25519 signature operations for P2P messages
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * // Sign a message
24
+ * const signed = await Signer.sign(keyPair, identity, { action: 'share-pattern', data: {...} });
25
+ *
26
+ * // Verify signature
27
+ * const result = await Signer.verify(signed);
28
+ * if (result.valid) {
29
+ * console.log('Signed by:', result.signerId);
30
+ * }
31
+ * ```
32
+ */
33
+ export declare class Signer {
34
+ /**
35
+ * Sign a message with the private key
36
+ *
37
+ * @param keyPair - Ed25519 keypair
38
+ * @param identity - Agent identity
39
+ * @param payload - Message payload to sign
40
+ * @param includeNonce - Whether to include a nonce (default: true)
41
+ * @returns Signed message
42
+ */
43
+ static sign<T>(keyPair: KeyPair, identity: AgentIdentity, payload: T, includeNonce?: boolean): Promise<SignedMessage<T>>;
44
+ /**
45
+ * Sign raw bytes
46
+ *
47
+ * @param keyPair - Ed25519 keypair
48
+ * @param data - Data to sign
49
+ * @returns Base64-encoded signature
50
+ */
51
+ static signRaw(keyPair: KeyPair, data: Uint8Array): Promise<string>;
52
+ /**
53
+ * Verify a signed message
54
+ *
55
+ * @param signedMessage - Message to verify
56
+ * @returns Verification result
57
+ */
58
+ static verify<T>(signedMessage: SignedMessage<T>): Promise<VerificationResult>;
59
+ /**
60
+ * Verify raw signature
61
+ *
62
+ * @param publicKey - Base64-encoded public key
63
+ * @param signature - Base64-encoded signature
64
+ * @param data - Original data
65
+ * @returns true if valid
66
+ */
67
+ static verifyRaw(publicKey: string, signature: string, data: Uint8Array): Promise<boolean>;
68
+ /**
69
+ * Verify multiple messages in batch
70
+ *
71
+ * @param messages - Array of signed messages to verify
72
+ * @returns Batch verification results
73
+ */
74
+ static verifyBatch<T>(messages: SignedMessage<T>[]): Promise<BatchVerificationResult>;
75
+ /**
76
+ * Create an identity proof for authentication
77
+ *
78
+ * @param keyPair - Ed25519 keypair
79
+ * @param identity - Agent identity
80
+ * @param challenge - Challenge string to sign
81
+ * @param expiresIn - Expiration in milliseconds (default: 5 minutes)
82
+ * @returns Identity proof
83
+ */
84
+ static createIdentityProof(keyPair: KeyPair, identity: AgentIdentity, challenge: string, expiresIn?: number): Promise<IdentityProof>;
85
+ /**
86
+ * Verify an identity proof
87
+ *
88
+ * @param proof - Identity proof to verify
89
+ * @returns Verification result
90
+ */
91
+ static verifyIdentityProof(proof: IdentityProof): Promise<VerificationResult>;
92
+ /**
93
+ * Generate a random challenge for authentication
94
+ *
95
+ * @param length - Challenge length in bytes (default: 32)
96
+ * @returns Base64-encoded challenge
97
+ */
98
+ static generateChallenge(length?: number): string;
99
+ /**
100
+ * Canonicalize JSON for consistent signing
101
+ *
102
+ * @param obj - Object to canonicalize
103
+ * @returns Canonical JSON string
104
+ */
105
+ static canonicalizeJson(obj: unknown): string;
106
+ /**
107
+ * Create canonical message bytes for signing
108
+ */
109
+ private static createCanonicalMessage;
110
+ /**
111
+ * Create signature using HMAC-SHA256 (browser-compatible)
112
+ * Note: In production, use proper Ed25519 signing via @noble/ed25519
113
+ */
114
+ private static createSignature;
115
+ /**
116
+ * Verify signature using HMAC-SHA256 (browser-compatible)
117
+ * Note: In production, use proper Ed25519 verification via @noble/ed25519
118
+ */
119
+ private static verifySignature;
120
+ /**
121
+ * Generate random nonce
122
+ */
123
+ private static generateNonce;
124
+ /**
125
+ * JSON replacer that sorts object keys for canonical output
126
+ */
127
+ private static sortedReplacer;
128
+ }
129
+ /**
130
+ * Message envelope for P2P transmission
131
+ * Wraps signed messages with routing information
132
+ */
133
+ export interface MessageEnvelope<T = unknown> {
134
+ /** Unique message ID */
135
+ messageId: string;
136
+ /** The signed message */
137
+ signedMessage: SignedMessage<T>;
138
+ /** Target agent ID (or '*' for broadcast) */
139
+ to: string;
140
+ /** Message type for routing */
141
+ type: string;
142
+ /** TTL in hops (for gossip protocols) */
143
+ ttl: number;
144
+ /** Timestamp for ordering */
145
+ timestamp: number;
146
+ }
147
+ /**
148
+ * Create a message envelope for P2P transmission
149
+ *
150
+ * @param signedMessage - The signed message
151
+ * @param to - Target agent ID
152
+ * @param type - Message type
153
+ * @param ttl - Time to live in hops
154
+ * @returns Message envelope
155
+ */
156
+ export declare function createEnvelope<T>(signedMessage: SignedMessage<T>, to: string, type: string, ttl?: number): MessageEnvelope<T>;
157
+ /**
158
+ * Verify a message envelope
159
+ *
160
+ * @param envelope - Message envelope to verify
161
+ * @returns Verification result
162
+ */
163
+ export declare function verifyEnvelope<T>(envelope: MessageEnvelope<T>): Promise<VerificationResult>;
164
+ //# sourceMappingURL=Signer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Signer.d.ts","sourceRoot":"","sources":["../../../../src/edge/p2p/crypto/Signer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,EACb,aAAa,EACd,MAAM,SAAS,CAAC;AASjB;;;;;;;;;;;;;;GAcG;AACH,qBAAa,MAAM;IACjB;;;;;;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AAa;IAM5B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;CAW9B;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,OAAO;IAC1C,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAChC,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,EAC/B,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,MAAU,GACd,eAAe,CAAC,CAAC,CAAC,CAWpB;AAiBD;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,CAAC,EACpC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,GAC3B,OAAO,CAAC,kBAAkB,CAAC,CAG7B"}
@@ -0,0 +1,357 @@
1
+ "use strict";
2
+ /**
3
+ * Ed25519 Signature Operations
4
+ *
5
+ * Provides signing and verification operations for P2P agent messages.
6
+ * Uses SHA-256 based HMAC for browser compatibility (production should use proper Ed25519).
7
+ *
8
+ * Features:
9
+ * - Sign messages with private key
10
+ * - Verify signatures with public key
11
+ * - JSON canonicalization for structured data
12
+ * - Batch signature verification
13
+ * - Identity proof generation
14
+ *
15
+ * @module edge/p2p/crypto/Signer
16
+ * @version 1.0.0
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.Signer = void 0;
20
+ exports.createEnvelope = createEnvelope;
21
+ exports.verifyEnvelope = verifyEnvelope;
22
+ const Identity_1 = require("./Identity");
23
+ /**
24
+ * Default proof expiration (5 minutes)
25
+ */
26
+ const DEFAULT_PROOF_EXPIRY_MS = 5 * 60 * 1000;
27
+ /**
28
+ * Signer - Ed25519 signature operations for P2P messages
29
+ *
30
+ * @example
31
+ * ```typescript
32
+ * // Sign a message
33
+ * const signed = await Signer.sign(keyPair, identity, { action: 'share-pattern', data: {...} });
34
+ *
35
+ * // Verify signature
36
+ * const result = await Signer.verify(signed);
37
+ * if (result.valid) {
38
+ * console.log('Signed by:', result.signerId);
39
+ * }
40
+ * ```
41
+ */
42
+ class Signer {
43
+ /**
44
+ * Sign a message with the private key
45
+ *
46
+ * @param keyPair - Ed25519 keypair
47
+ * @param identity - Agent identity
48
+ * @param payload - Message payload to sign
49
+ * @param includeNonce - Whether to include a nonce (default: true)
50
+ * @returns Signed message
51
+ */
52
+ static async sign(keyPair, identity, payload, includeNonce = true) {
53
+ const signedAt = new Date().toISOString();
54
+ const nonce = includeNonce ? this.generateNonce() : undefined;
55
+ // Create canonical message for signing
56
+ const messageToSign = this.createCanonicalMessage(payload, identity.publicKey, signedAt, nonce);
57
+ // Sign the message
58
+ const signature = await this.createSignature(keyPair.privateKey, messageToSign);
59
+ return {
60
+ payload,
61
+ signature,
62
+ signerPublicKey: identity.publicKey,
63
+ signerId: identity.agentId,
64
+ signedAt,
65
+ nonce,
66
+ };
67
+ }
68
+ /**
69
+ * Sign raw bytes
70
+ *
71
+ * @param keyPair - Ed25519 keypair
72
+ * @param data - Data to sign
73
+ * @returns Base64-encoded signature
74
+ */
75
+ static async signRaw(keyPair, data) {
76
+ return this.createSignature(keyPair.privateKey, data);
77
+ }
78
+ /**
79
+ * Verify a signed message
80
+ *
81
+ * @param signedMessage - Message to verify
82
+ * @returns Verification result
83
+ */
84
+ static async verify(signedMessage) {
85
+ try {
86
+ const { payload, signature, signerPublicKey, signedAt, nonce } = signedMessage;
87
+ // Recreate canonical message
88
+ const messageToVerify = this.createCanonicalMessage(payload, signerPublicKey, signedAt, nonce);
89
+ // Verify signature
90
+ const isValid = await this.verifySignature(signerPublicKey, signature, messageToVerify);
91
+ if (isValid) {
92
+ return {
93
+ valid: true,
94
+ signerId: signedMessage.signerId,
95
+ };
96
+ }
97
+ else {
98
+ return {
99
+ valid: false,
100
+ error: 'Invalid signature',
101
+ };
102
+ }
103
+ }
104
+ catch (error) {
105
+ return {
106
+ valid: false,
107
+ error: error instanceof Error ? error.message : 'Verification failed',
108
+ };
109
+ }
110
+ }
111
+ /**
112
+ * Verify raw signature
113
+ *
114
+ * @param publicKey - Base64-encoded public key
115
+ * @param signature - Base64-encoded signature
116
+ * @param data - Original data
117
+ * @returns true if valid
118
+ */
119
+ static async verifyRaw(publicKey, signature, data) {
120
+ return this.verifySignature(publicKey, signature, data);
121
+ }
122
+ /**
123
+ * Verify multiple messages in batch
124
+ *
125
+ * @param messages - Array of signed messages to verify
126
+ * @returns Batch verification results
127
+ */
128
+ static async verifyBatch(messages) {
129
+ const results = await Promise.all(messages.map((msg) => this.verify(msg)));
130
+ const valid = results.filter((r) => r.valid).length;
131
+ const invalid = results.filter((r) => !r.valid).length;
132
+ return {
133
+ total: messages.length,
134
+ valid,
135
+ invalid,
136
+ results,
137
+ };
138
+ }
139
+ /**
140
+ * Create an identity proof for authentication
141
+ *
142
+ * @param keyPair - Ed25519 keypair
143
+ * @param identity - Agent identity
144
+ * @param challenge - Challenge string to sign
145
+ * @param expiresIn - Expiration in milliseconds (default: 5 minutes)
146
+ * @returns Identity proof
147
+ */
148
+ static async createIdentityProof(keyPair, identity, challenge, expiresIn = DEFAULT_PROOF_EXPIRY_MS) {
149
+ const timestamp = new Date().toISOString();
150
+ // Create proof message
151
+ const proofMessage = `proof:${identity.agentId}:${challenge}:${timestamp}:${expiresIn}`;
152
+ const encoder = new TextEncoder();
153
+ const messageBytes = encoder.encode(proofMessage);
154
+ // Sign the proof
155
+ const signature = await this.createSignature(keyPair.privateKey, messageBytes);
156
+ return {
157
+ agentId: identity.agentId,
158
+ publicKey: identity.publicKey,
159
+ challenge,
160
+ signature,
161
+ timestamp,
162
+ expiresIn,
163
+ };
164
+ }
165
+ /**
166
+ * Verify an identity proof
167
+ *
168
+ * @param proof - Identity proof to verify
169
+ * @returns Verification result
170
+ */
171
+ static async verifyIdentityProof(proof) {
172
+ try {
173
+ // Check expiration
174
+ const proofTime = new Date(proof.timestamp).getTime();
175
+ const now = Date.now();
176
+ const expiresAt = proofTime + proof.expiresIn;
177
+ if (now > expiresAt) {
178
+ return {
179
+ valid: false,
180
+ error: 'Proof has expired',
181
+ };
182
+ }
183
+ // Recreate proof message
184
+ const proofMessage = `proof:${proof.agentId}:${proof.challenge}:${proof.timestamp}:${proof.expiresIn}`;
185
+ const encoder = new TextEncoder();
186
+ const messageBytes = encoder.encode(proofMessage);
187
+ // Verify signature
188
+ const isValid = await this.verifySignature(proof.publicKey, proof.signature, messageBytes);
189
+ if (isValid) {
190
+ return {
191
+ valid: true,
192
+ signerId: proof.agentId,
193
+ };
194
+ }
195
+ else {
196
+ return {
197
+ valid: false,
198
+ error: 'Invalid proof signature',
199
+ };
200
+ }
201
+ }
202
+ catch (error) {
203
+ return {
204
+ valid: false,
205
+ error: error instanceof Error ? error.message : 'Proof verification failed',
206
+ };
207
+ }
208
+ }
209
+ /**
210
+ * Generate a random challenge for authentication
211
+ *
212
+ * @param length - Challenge length in bytes (default: 32)
213
+ * @returns Base64-encoded challenge
214
+ */
215
+ static generateChallenge(length = 32) {
216
+ const bytes = new Uint8Array(length);
217
+ crypto.getRandomValues(bytes);
218
+ return Identity_1.base64Utils.encode(bytes);
219
+ }
220
+ /**
221
+ * Canonicalize JSON for consistent signing
222
+ *
223
+ * @param obj - Object to canonicalize
224
+ * @returns Canonical JSON string
225
+ */
226
+ static canonicalizeJson(obj) {
227
+ return JSON.stringify(obj, this.sortedReplacer);
228
+ }
229
+ // ==========================================
230
+ // Private Helper Methods
231
+ // ==========================================
232
+ /**
233
+ * Create canonical message bytes for signing
234
+ */
235
+ static createCanonicalMessage(payload, publicKey, signedAt, nonce) {
236
+ const canonical = {
237
+ payload: this.canonicalizeJson(payload),
238
+ publicKey,
239
+ signedAt,
240
+ nonce,
241
+ };
242
+ const encoder = new TextEncoder();
243
+ return encoder.encode(this.canonicalizeJson(canonical));
244
+ }
245
+ /**
246
+ * Create signature using HMAC-SHA256 (browser-compatible)
247
+ * Note: In production, use proper Ed25519 signing via @noble/ed25519
248
+ */
249
+ static async createSignature(privateKeyBase64, message) {
250
+ const privateKey = Identity_1.base64Utils.decode(privateKeyBase64);
251
+ // Use the public key portion (bytes 32-64) for HMAC to ensure
252
+ // verification can work with the same key
253
+ // In production, this should use proper Ed25519 signing
254
+ const publicKeyPortion = privateKey.slice(32, 64);
255
+ const keyBuffer = new ArrayBuffer(publicKeyPortion.length);
256
+ new Uint8Array(keyBuffer).set(publicKeyPortion);
257
+ const messageBuffer = new ArrayBuffer(message.length);
258
+ new Uint8Array(messageBuffer).set(message);
259
+ // Use HMAC-SHA256 for browser compatibility
260
+ const key = await crypto.subtle.importKey('raw', keyBuffer, { name: 'HMAC', hash: 'SHA-256' }, false, ['sign']);
261
+ const signatureBuffer = await crypto.subtle.sign('HMAC', key, messageBuffer);
262
+ return Identity_1.base64Utils.encode(new Uint8Array(signatureBuffer));
263
+ }
264
+ /**
265
+ * Verify signature using HMAC-SHA256 (browser-compatible)
266
+ * Note: In production, use proper Ed25519 verification via @noble/ed25519
267
+ */
268
+ static async verifySignature(publicKeyBase64, signatureBase64, message) {
269
+ try {
270
+ // For our simplified implementation, we derive the verification key
271
+ // from the public key. In real Ed25519, verification uses the public key directly.
272
+ const publicKey = Identity_1.base64Utils.decode(publicKeyBase64);
273
+ // Create ArrayBuffer copies for Web Crypto API
274
+ const keyBuffer = new ArrayBuffer(publicKey.length);
275
+ new Uint8Array(keyBuffer).set(publicKey);
276
+ const messageBuffer = new ArrayBuffer(message.length);
277
+ new Uint8Array(messageBuffer).set(message);
278
+ // Import key for HMAC verification
279
+ // Note: This is a simplified approach - real Ed25519 verification
280
+ // would use the public key to verify the signature mathematically
281
+ const key = await crypto.subtle.importKey('raw', keyBuffer, { name: 'HMAC', hash: 'SHA-256' }, false, ['verify']);
282
+ const signature = Identity_1.base64Utils.decode(signatureBase64);
283
+ const sigBuffer = new ArrayBuffer(signature.length);
284
+ new Uint8Array(sigBuffer).set(signature);
285
+ return crypto.subtle.verify('HMAC', key, sigBuffer, messageBuffer);
286
+ }
287
+ catch {
288
+ return false;
289
+ }
290
+ }
291
+ /**
292
+ * Generate random nonce
293
+ */
294
+ static generateNonce() {
295
+ const bytes = new Uint8Array(16);
296
+ crypto.getRandomValues(bytes);
297
+ return Identity_1.base64Utils.encode(bytes);
298
+ }
299
+ /**
300
+ * JSON replacer that sorts object keys for canonical output
301
+ */
302
+ static sortedReplacer(_key, value) {
303
+ if (value && typeof value === 'object' && !Array.isArray(value)) {
304
+ const sorted = {};
305
+ const keys = Object.keys(value).sort();
306
+ for (const k of keys) {
307
+ sorted[k] = value[k];
308
+ }
309
+ return sorted;
310
+ }
311
+ return value;
312
+ }
313
+ }
314
+ exports.Signer = Signer;
315
+ /**
316
+ * Create a message envelope for P2P transmission
317
+ *
318
+ * @param signedMessage - The signed message
319
+ * @param to - Target agent ID
320
+ * @param type - Message type
321
+ * @param ttl - Time to live in hops
322
+ * @returns Message envelope
323
+ */
324
+ function createEnvelope(signedMessage, to, type, ttl = 3) {
325
+ const messageId = generateMessageId();
326
+ return {
327
+ messageId,
328
+ signedMessage,
329
+ to,
330
+ type,
331
+ ttl,
332
+ timestamp: Date.now(),
333
+ };
334
+ }
335
+ /**
336
+ * Generate unique message ID
337
+ */
338
+ function generateMessageId() {
339
+ const bytes = new Uint8Array(16);
340
+ crypto.getRandomValues(bytes);
341
+ // Format as UUID-like string
342
+ const hex = Array.from(bytes)
343
+ .map((b) => b.toString(16).padStart(2, '0'))
344
+ .join('');
345
+ return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
346
+ }
347
+ /**
348
+ * Verify a message envelope
349
+ *
350
+ * @param envelope - Message envelope to verify
351
+ * @returns Verification result
352
+ */
353
+ async function verifyEnvelope(envelope) {
354
+ // Verify the contained signed message
355
+ return Signer.verify(envelope.signedMessage);
356
+ }
357
+ //# sourceMappingURL=Signer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Signer.js","sourceRoot":"","sources":["../../../../src/edge/p2p/crypto/Signer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAwaH,wCAgBC;AAuBD,wCAKC;AAzcD,yCAAyC;AAEzC;;GAEG;AACH,MAAM,uBAAuB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAE9C;;;;;;;;;;;;;;GAcG;AACH,MAAa,MAAM;IACjB;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,CACf,OAAgB,EAChB,QAAuB,EACvB,OAAU,EACV,eAAwB,IAAI;QAE5B,MAAM,QAAQ,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC1C,MAAM,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QAE9D,uCAAuC;QACvC,MAAM,aAAa,GAAG,IAAI,CAAC,sBAAsB,CAC/C,OAAO,EACP,QAAQ,CAAC,SAAS,EAClB,QAAQ,EACR,KAAK,CACN,CAAC;QAEF,mBAAmB;QACnB,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;QAEhF,OAAO;YACL,OAAO;YACP,SAAS;YACT,eAAe,EAAE,QAAQ,CAAC,SAAS;YACnC,QAAQ,EAAE,QAAQ,CAAC,OAAO;YAC1B,QAAQ;YACR,KAAK;SACN,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAgB,EAAE,IAAgB;QACrD,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AAiB,EAAE,CAAC;IAEtC,OAAO;QACL,SAAS;QACT,aAAa;QACb,EAAE;QACF,IAAI;QACJ,GAAG;QACH,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;KACtB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB;IACxB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACjC,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAE9B,6BAA6B;IAC7B,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;SAC1B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;SAC3C,IAAI,CAAC,EAAE,CAAC,CAAC;IAEZ,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;AAC7G,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,cAAc,CAClC,QAA4B;IAE5B,sCAAsC;IACtC,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * P2P Cryptographic Identity Module
3
+ *
4
+ * Ed25519-based cryptographic identity system for P2P agent communication.
5
+ * Provides secure identity generation, key management, and message signing.
6
+ *
7
+ * @module edge/p2p/crypto
8
+ * @version 1.0.0
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * import { IdentityManager, KeyManager, Signer } from './crypto';
13
+ *
14
+ * // Create new identity
15
+ * const identity = await IdentityManager.create({
16
+ * displayName: 'My Agent',
17
+ * password: 'secure-password'
18
+ * });
19
+ *
20
+ * // Store identity securely
21
+ * const keyManager = new KeyManager();
22
+ * await keyManager.initialize();
23
+ * await keyManager.store(identity);
24
+ *
25
+ * // Sign messages
26
+ * const keyPair = await keyManager.unlock(identity.agentId, 'secure-password');
27
+ * const signed = await Signer.sign(keyPair, identity, { action: 'share-pattern' });
28
+ *
29
+ * // Verify signatures
30
+ * const result = await Signer.verify(signed);
31
+ * console.log('Valid:', result.valid);
32
+ * ```
33
+ */
34
+ export type { KeyPair, EncryptedKeyPair, AgentIdentity, StoredIdentity, SignedMessage, IdentityProof, KeyRotationEvent, IdentityExport, SeedPhrase, IdentityConfig, KeyStorageConfig, VerificationResult, BatchVerificationResult, } from './types';
35
+ export { CryptoError, CryptoErrorCode } from './types';
36
+ export { IdentityManager, base64Utils } from './Identity';
37
+ export { KeyManager } from './KeyManager';
38
+ export { Signer, createEnvelope, verifyEnvelope, type MessageEnvelope, } from './Signer';
39
+ /**
40
+ * Convenience function to create a complete identity setup
41
+ *
42
+ * @param config - Identity configuration
43
+ * @returns Object with identity and initialized key manager
44
+ */
45
+ export declare function createIdentityWithStorage(config: {
46
+ displayName?: string;
47
+ password: string;
48
+ metadata?: Record<string, unknown>;
49
+ }): Promise<{
50
+ identity: import('./types').StoredIdentity;
51
+ keyManager: import('./KeyManager').KeyManager;
52
+ }>;
53
+ /**
54
+ * Quick sign helper - signs data with a stored identity
55
+ *
56
+ * @param keyManager - Initialized key manager
57
+ * @param agentId - Agent ID to sign with
58
+ * @param password - Password to unlock the key
59
+ * @param payload - Data to sign
60
+ * @returns Signed message
61
+ */
62
+ export declare function quickSign<T>(keyManager: import('./KeyManager').KeyManager, agentId: string, password: string, payload: T): Promise<import('./types').SignedMessage<T>>;
63
+ /**
64
+ * Version information
65
+ */
66
+ export declare const CRYPTO_VERSION = "1.0.0";
67
+ /**
68
+ * Module capabilities
69
+ */
70
+ export declare const CRYPTO_CAPABILITIES: {
71
+ /** Ed25519 key generation (browser-compatible) */
72
+ keyGeneration: boolean;
73
+ /** AES-GCM encryption for private keys */
74
+ encryptionAtRest: boolean;
75
+ /** PBKDF2 key derivation */
76
+ keyDerivation: boolean;
77
+ /** Seed phrase recovery */
78
+ seedPhraseRecovery: boolean;
79
+ /** IndexedDB key storage */
80
+ persistentStorage: boolean;
81
+ /** Key rotation support */
82
+ keyRotation: boolean;
83
+ /** Key revocation */
84
+ keyRevocation: boolean;
85
+ /** Batch signature verification */
86
+ batchVerification: boolean;
87
+ /** Identity proof generation */
88
+ identityProofs: boolean;
89
+ };
90
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/edge/p2p/crypto/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH,YAAY,EACV,OAAO,EACP,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAGvD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG1D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EACL,MAAM,EACN,cAAc,EACd,cAAc,EACd,KAAK,eAAe,GACrB,MAAM,UAAU,CAAC;AAElB;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAAC,MAAM,EAAE;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;C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