swarmdo 1.4.8 → 1.6.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 (215) hide show
  1. package/.claude/helpers/statusline.cjs +7 -7
  2. package/README.md +9 -6
  3. package/package.json +5 -3
  4. package/v3/@swarmdo/cli/dist/src/commands/compact.d.ts +16 -0
  5. package/v3/@swarmdo/cli/dist/src/commands/compact.js +106 -0
  6. package/v3/@swarmdo/cli/dist/src/commands/hooks.js +26 -24
  7. package/v3/@swarmdo/cli/dist/src/commands/index.js +10 -3
  8. package/v3/@swarmdo/cli/dist/src/commands/integrations.d.ts +14 -0
  9. package/v3/@swarmdo/cli/dist/src/commands/integrations.js +158 -0
  10. package/v3/@swarmdo/cli/dist/src/commands/memory.js +50 -1
  11. package/v3/@swarmdo/cli/dist/src/commands/providers.js +3 -0
  12. package/v3/@swarmdo/cli/dist/src/commands/release.d.ts +15 -0
  13. package/v3/@swarmdo/cli/dist/src/commands/release.js +241 -0
  14. package/v3/@swarmdo/cli/dist/src/commands/security.js +14 -0
  15. package/v3/@swarmdo/cli/dist/src/commands/transcript.js +82 -1
  16. package/v3/@swarmdo/cli/dist/src/commands/usage.js +80 -1
  17. package/v3/@swarmdo/cli/dist/src/compact/compact.d.ts +60 -0
  18. package/v3/@swarmdo/cli/dist/src/compact/compact.js +170 -0
  19. package/v3/@swarmdo/cli/dist/src/config-lint/lint.js +11 -1
  20. package/v3/@swarmdo/cli/dist/src/index.js +4 -2
  21. package/v3/@swarmdo/cli/dist/src/init/statusline-generator.js +6 -6
  22. package/v3/@swarmdo/cli/dist/src/integrations/integrations.d.ts +54 -0
  23. package/v3/@swarmdo/cli/dist/src/integrations/integrations.js +162 -0
  24. package/v3/@swarmdo/cli/dist/src/mcp-tools/agent-execute-core.js +25 -3
  25. package/v3/@swarmdo/cli/dist/src/mcp-tools/agentdb-tools.js +8 -8
  26. package/v3/@swarmdo/cli/dist/src/memory/graph-edge-writer.d.ts +12 -0
  27. package/v3/@swarmdo/cli/dist/src/memory/graph-edge-writer.js +32 -1
  28. package/v3/@swarmdo/cli/dist/src/memory-vault/watch.d.ts +32 -0
  29. package/v3/@swarmdo/cli/dist/src/memory-vault/watch.js +66 -0
  30. package/v3/@swarmdo/cli/dist/src/providers/openrouter-config.d.ts +91 -0
  31. package/v3/@swarmdo/cli/dist/src/providers/openrouter-config.js +186 -0
  32. package/v3/@swarmdo/cli/dist/src/release/release.d.ts +72 -0
  33. package/v3/@swarmdo/cli/dist/src/release/release.js +86 -0
  34. package/v3/@swarmdo/cli/dist/src/resilience/backoff.d.ts +23 -0
  35. package/v3/@swarmdo/cli/dist/src/resilience/backoff.js +30 -0
  36. package/v3/@swarmdo/cli/dist/src/swarmvector/model-router.js +14 -0
  37. package/v3/@swarmdo/cli/dist/src/transcript/search.d.ts +39 -0
  38. package/v3/@swarmdo/cli/dist/src/transcript/search.js +67 -0
  39. package/v3/@swarmdo/cli/dist/src/usage/diff.d.ts +69 -0
  40. package/v3/@swarmdo/cli/dist/src/usage/diff.js +112 -0
  41. package/v3/@swarmdo/cli/package.json +4 -4
  42. package/v3/@swarmdo/cli-core/dist/src/index.js +1 -1
  43. package/v3/@swarmdo/codex/dist/cli.js +0 -0
  44. package/v3/@swarmdo/hooks/dist/cli/guidance-cli.js +0 -0
  45. package/v3/@swarmdo/hooks/dist/statusline/index.d.ts +3 -3
  46. package/v3/@swarmdo/hooks/dist/statusline/index.js +3 -3
  47. package/v3/@swarmdo/integration/dist/__tests__/agentic-flow-agent.test.js +4 -1
  48. package/v3/@swarmdo/neural/dist/flash-attention.d.ts +1 -1
  49. package/v3/@swarmdo/neural/dist/flash-attention.js +1 -1
  50. package/v3/@swarmdo/plugin-agent-federation/dist/plugin.js +1 -1
  51. package/v3/@swarmdo/plugin-agent-federation/dist/transport/midstream-aware-loader.js +2 -2
  52. package/v3/@swarmdo/providers/dist/swarmvector-provider.d.ts +1 -1
  53. package/v3/@swarmdo/providers/dist/swarmvector-provider.js +1 -1
  54. package/v3/@swarmdo/security/dist/input-validator.d.ts +6 -6
  55. package/v3/@swarmdo/shared/dist/hooks/safety/git-commit.js +1 -1
  56. package/v3/@swarmdo/shared/dist/mcp/transport/http.js +8 -1
  57. package/v3/vendor/agentdb/package.json +0 -1
  58. package/v3/vendor/agentic-flow/package.json +0 -1
  59. package/.claude/scheduled_tasks.lock +0 -1
  60. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/__init__.cpython-314.pyc +0 -0
  61. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/__main__.cpython-314.pyc +0 -0
  62. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/cli.cpython-314.pyc +0 -0
  63. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/compress.cpython-314.pyc +0 -0
  64. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/detect.cpython-314.pyc +0 -0
  65. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/validate.cpython-314.pyc +0 -0
  66. package/v3/@swarmdo/plugin-iot-cognitum/dist/application/index.d.ts +0 -2
  67. package/v3/@swarmdo/plugin-iot-cognitum/dist/application/index.js +0 -2
  68. package/v3/@swarmdo/plugin-iot-cognitum/dist/application/iot-coordinator.d.ts +0 -138
  69. package/v3/@swarmdo/plugin-iot-cognitum/dist/application/iot-coordinator.js +0 -418
  70. package/v3/@swarmdo/plugin-iot-cognitum/dist/bin.d.ts +0 -15
  71. package/v3/@swarmdo/plugin-iot-cognitum/dist/bin.js +0 -240
  72. package/v3/@swarmdo/plugin-iot-cognitum/dist/cli-commands.d.ts +0 -7
  73. package/v3/@swarmdo/plugin-iot-cognitum/dist/cli-commands.js +0 -508
  74. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-agent.d.ts +0 -54
  75. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-agent.js +0 -2
  76. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-fleet.d.ts +0 -46
  77. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-fleet.js +0 -2
  78. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-trust-level.d.ts +0 -18
  79. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-trust-level.js +0 -28
  80. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/index.d.ts +0 -5
  81. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/index.js +0 -2
  82. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/telemetry.d.ts +0 -35
  83. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/telemetry.js +0 -2
  84. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/device-repository.d.ts +0 -11
  85. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/device-repository.js +0 -2
  86. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/fleet-repository.d.ts +0 -9
  87. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/fleet-repository.js +0 -2
  88. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/index.d.ts +0 -5
  89. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/index.js +0 -2
  90. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/telemetry-repository.d.ts +0 -12
  91. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/telemetry-repository.js +0 -2
  92. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/trust-history-repository.d.ts +0 -19
  93. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/trust-history-repository.js +0 -2
  94. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/anomaly-detection-service.d.ts +0 -44
  95. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/anomaly-detection-service.js +0 -117
  96. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/device-lifecycle-service.d.ts +0 -70
  97. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/device-lifecycle-service.js +0 -194
  98. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/firmware-orchestration-service.d.ts +0 -69
  99. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/firmware-orchestration-service.js +0 -139
  100. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/fleet-topology-service.d.ts +0 -34
  101. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/fleet-topology-service.js +0 -101
  102. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/index.d.ts +0 -10
  103. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/index.js +0 -10
  104. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/mesh-service.d.ts +0 -64
  105. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/mesh-service.js +0 -70
  106. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/sona-integration-service.d.ts +0 -44
  107. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/sona-integration-service.js +0 -79
  108. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-ingestion-service.d.ts +0 -37
  109. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-ingestion-service.js +0 -39
  110. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-service.d.ts +0 -67
  111. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-service.js +0 -58
  112. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/witness-verification-service.d.ts +0 -45
  113. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/witness-verification-service.js +0 -63
  114. package/v3/@swarmdo/plugin-iot-cognitum/dist/index.d.ts +0 -26
  115. package/v3/@swarmdo/plugin-iot-cognitum/dist/index.js +0 -17
  116. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/agentdb-telemetry-repository.d.ts +0 -51
  117. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/agentdb-telemetry-repository.js +0 -110
  118. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-device-repository.d.ts +0 -13
  119. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-device-repository.js +0 -25
  120. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-fleet-repository.d.ts +0 -11
  121. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-fleet-repository.js +0 -19
  122. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-trust-history-repository.d.ts +0 -11
  123. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-trust-history-repository.js +0 -27
  124. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/index.d.ts +0 -6
  125. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/index.js +0 -6
  126. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/seed-client-factory.d.ts +0 -41
  127. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/seed-client-factory.js +0 -64
  128. package/v3/@swarmdo/plugin-iot-cognitum/dist/mcp-tools.d.ts +0 -8
  129. package/v3/@swarmdo/plugin-iot-cognitum/dist/mcp-tools.js +0 -703
  130. package/v3/@swarmdo/plugin-iot-cognitum/dist/plugin.d.ts +0 -23
  131. package/v3/@swarmdo/plugin-iot-cognitum/dist/plugin.js +0 -239
  132. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/anomaly-scan-worker.d.ts +0 -17
  133. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/anomaly-scan-worker.js +0 -42
  134. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/firmware-watch-worker.d.ts +0 -18
  135. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/firmware-watch-worker.js +0 -45
  136. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/health-probe-worker.d.ts +0 -19
  137. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/health-probe-worker.js +0 -50
  138. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/mesh-sync-worker.d.ts +0 -19
  139. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/mesh-sync-worker.js +0 -47
  140. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/telemetry-ingest-worker.d.ts +0 -17
  141. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/telemetry-ingest-worker.js +0 -40
  142. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/witness-audit-worker.d.ts +0 -18
  143. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/witness-audit-worker.js +0 -51
  144. package/v3/@swarmdo/testing/dist/fixtures/agent-fixtures.d.ts +0 -214
  145. package/v3/@swarmdo/testing/dist/fixtures/agent-fixtures.js +0 -595
  146. package/v3/@swarmdo/testing/dist/fixtures/agents.d.ts +0 -76
  147. package/v3/@swarmdo/testing/dist/fixtures/agents.js +0 -158
  148. package/v3/@swarmdo/testing/dist/fixtures/configurations.d.ts +0 -157
  149. package/v3/@swarmdo/testing/dist/fixtures/configurations.js +0 -337
  150. package/v3/@swarmdo/testing/dist/fixtures/index.d.ts +0 -10
  151. package/v3/@swarmdo/testing/dist/fixtures/index.js +0 -17
  152. package/v3/@swarmdo/testing/dist/fixtures/mcp-fixtures.d.ts +0 -329
  153. package/v3/@swarmdo/testing/dist/fixtures/mcp-fixtures.js +0 -714
  154. package/v3/@swarmdo/testing/dist/fixtures/memory-entries.d.ts +0 -159
  155. package/v3/@swarmdo/testing/dist/fixtures/memory-entries.js +0 -262
  156. package/v3/@swarmdo/testing/dist/fixtures/memory-fixtures.d.ts +0 -290
  157. package/v3/@swarmdo/testing/dist/fixtures/memory-fixtures.js +0 -547
  158. package/v3/@swarmdo/testing/dist/fixtures/swarm-fixtures.d.ts +0 -289
  159. package/v3/@swarmdo/testing/dist/fixtures/swarm-fixtures.js +0 -534
  160. package/v3/@swarmdo/testing/dist/fixtures/tasks.d.ts +0 -106
  161. package/v3/@swarmdo/testing/dist/fixtures/tasks.js +0 -229
  162. package/v3/@swarmdo/testing/dist/helpers/assertion-helpers.d.ts +0 -213
  163. package/v3/@swarmdo/testing/dist/helpers/assertion-helpers.js +0 -435
  164. package/v3/@swarmdo/testing/dist/helpers/assertions.d.ts +0 -135
  165. package/v3/@swarmdo/testing/dist/helpers/assertions.js +0 -217
  166. package/v3/@swarmdo/testing/dist/helpers/create-mock.d.ts +0 -96
  167. package/v3/@swarmdo/testing/dist/helpers/create-mock.js +0 -164
  168. package/v3/@swarmdo/testing/dist/helpers/index.d.ts +0 -14
  169. package/v3/@swarmdo/testing/dist/helpers/index.js +0 -22
  170. package/v3/@swarmdo/testing/dist/helpers/mock-factory.d.ts +0 -323
  171. package/v3/@swarmdo/testing/dist/helpers/mock-factory.js +0 -350
  172. package/v3/@swarmdo/testing/dist/helpers/setup-teardown.d.ts +0 -271
  173. package/v3/@swarmdo/testing/dist/helpers/setup-teardown.js +0 -446
  174. package/v3/@swarmdo/testing/dist/helpers/swarm-instance.d.ts +0 -142
  175. package/v3/@swarmdo/testing/dist/helpers/swarm-instance.js +0 -205
  176. package/v3/@swarmdo/testing/dist/helpers/test-application.d.ts +0 -190
  177. package/v3/@swarmdo/testing/dist/helpers/test-application.js +0 -138
  178. package/v3/@swarmdo/testing/dist/helpers/test-utils.d.ts +0 -274
  179. package/v3/@swarmdo/testing/dist/helpers/test-utils.js +0 -456
  180. package/v3/@swarmdo/testing/dist/index.d.ts +0 -42
  181. package/v3/@swarmdo/testing/dist/index.js +0 -66
  182. package/v3/@swarmdo/testing/dist/mocks/index.d.ts +0 -8
  183. package/v3/@swarmdo/testing/dist/mocks/index.js +0 -10
  184. package/v3/@swarmdo/testing/dist/mocks/mock-mcp-client.d.ts +0 -206
  185. package/v3/@swarmdo/testing/dist/mocks/mock-mcp-client.js +0 -575
  186. package/v3/@swarmdo/testing/dist/mocks/mock-services.d.ts +0 -287
  187. package/v3/@swarmdo/testing/dist/mocks/mock-services.js +0 -563
  188. package/v3/@swarmdo/testing/dist/regression/api-contract.d.ts +0 -109
  189. package/v3/@swarmdo/testing/dist/regression/api-contract.js +0 -374
  190. package/v3/@swarmdo/testing/dist/regression/index.d.ts +0 -18
  191. package/v3/@swarmdo/testing/dist/regression/index.js +0 -18
  192. package/v3/@swarmdo/testing/dist/regression/integration-regression.d.ts +0 -67
  193. package/v3/@swarmdo/testing/dist/regression/integration-regression.js +0 -334
  194. package/v3/@swarmdo/testing/dist/regression/performance-baseline.d.ts +0 -106
  195. package/v3/@swarmdo/testing/dist/regression/performance-baseline.js +0 -268
  196. package/v3/@swarmdo/testing/dist/regression/regression-runner.d.ts +0 -124
  197. package/v3/@swarmdo/testing/dist/regression/regression-runner.js +0 -227
  198. package/v3/@swarmdo/testing/dist/regression/security-regression.d.ts +0 -73
  199. package/v3/@swarmdo/testing/dist/regression/security-regression.js +0 -258
  200. package/v3/@swarmdo/testing/dist/setup.d.ts +0 -43
  201. package/v3/@swarmdo/testing/dist/setup.js +0 -91
  202. package/v3/@swarmdo/testing/dist/v2-compat/api-compat.test.d.ts +0 -10
  203. package/v3/@swarmdo/testing/dist/v2-compat/api-compat.test.js +0 -433
  204. package/v3/@swarmdo/testing/dist/v2-compat/cli-compat.test.d.ts +0 -10
  205. package/v3/@swarmdo/testing/dist/v2-compat/cli-compat.test.js +0 -352
  206. package/v3/@swarmdo/testing/dist/v2-compat/compatibility-validator.d.ts +0 -206
  207. package/v3/@swarmdo/testing/dist/v2-compat/compatibility-validator.js +0 -839
  208. package/v3/@swarmdo/testing/dist/v2-compat/hooks-compat.test.d.ts +0 -10
  209. package/v3/@swarmdo/testing/dist/v2-compat/hooks-compat.test.js +0 -428
  210. package/v3/@swarmdo/testing/dist/v2-compat/index.d.ts +0 -38
  211. package/v3/@swarmdo/testing/dist/v2-compat/index.js +0 -41
  212. package/v3/@swarmdo/testing/dist/v2-compat/mcp-compat.test.d.ts +0 -10
  213. package/v3/@swarmdo/testing/dist/v2-compat/mcp-compat.test.js +0 -419
  214. package/v3/@swarmdo/testing/dist/v2-compat/report-generator.d.ts +0 -34
  215. package/v3/@swarmdo/testing/dist/v2-compat/report-generator.js +0 -372
@@ -1,289 +0,0 @@
1
- /**
2
- * @swarmdo/testing - Swarm Fixtures
3
- *
4
- * Comprehensive mock swarm configurations, topologies, and coordination fixtures.
5
- * Supports hierarchical-mesh, adaptive, and all consensus protocols.
6
- *
7
- * Based on ADR-003 (Single Coordination Engine) and V3 swarm specifications.
8
- */
9
- import { type Mock } from 'vitest';
10
- /**
11
- * Swarm topology types
12
- */
13
- export type SwarmTopology = 'hierarchical' | 'mesh' | 'ring' | 'star' | 'adaptive' | 'hierarchical-mesh';
14
- /**
15
- * Consensus protocol types
16
- */
17
- export type ConsensusProtocol = 'raft' | 'pbft' | 'gossip' | 'crdt' | 'byzantine';
18
- /**
19
- * Coordination status types
20
- */
21
- export type CoordinationStatus = 'initializing' | 'active' | 'coordinating' | 'consensus' | 'error' | 'shutdown';
22
- /**
23
- * Swarm configuration interface
24
- */
25
- export interface SwarmConfig {
26
- topology: SwarmTopology;
27
- maxAgents: number;
28
- name?: string;
29
- description?: string;
30
- coordination: CoordinationConfig;
31
- communication: CommunicationConfig;
32
- autoScale?: AutoScaleConfig;
33
- healthCheck?: HealthCheckConfig;
34
- }
35
- /**
36
- * Coordination configuration
37
- */
38
- export interface CoordinationConfig {
39
- consensusProtocol: ConsensusProtocol;
40
- heartbeatInterval: number;
41
- electionTimeout: number;
42
- consensusRequired?: boolean;
43
- timeoutMs?: number;
44
- retryPolicy?: {
45
- maxRetries: number;
46
- backoffMs: number;
47
- };
48
- }
49
- /**
50
- * Communication configuration
51
- */
52
- export interface CommunicationConfig {
53
- protocol: 'quic' | 'tcp' | 'websocket' | 'ipc';
54
- maxMessageSize: number;
55
- retryAttempts: number;
56
- compressionEnabled?: boolean;
57
- encryptionEnabled?: boolean;
58
- }
59
- /**
60
- * Auto-scale configuration
61
- */
62
- export interface AutoScaleConfig {
63
- enabled: boolean;
64
- minAgents: number;
65
- maxAgents: number;
66
- scaleUpThreshold: number;
67
- scaleDownThreshold: number;
68
- cooldownMs?: number;
69
- }
70
- /**
71
- * Health check configuration
72
- */
73
- export interface HealthCheckConfig {
74
- enabled: boolean;
75
- interval: number;
76
- timeout: number;
77
- unhealthyThreshold: number;
78
- healthyThreshold: number;
79
- }
80
- /**
81
- * Swarm state interface
82
- */
83
- export interface SwarmState {
84
- id: string;
85
- topology: SwarmTopology;
86
- status: CoordinationStatus;
87
- agentCount: number;
88
- activeAgentCount: number;
89
- leaderId?: string;
90
- createdAt: Date;
91
- lastHeartbeat?: Date;
92
- }
93
- /**
94
- * Swarm message interface
95
- */
96
- export interface SwarmMessage<T = unknown> {
97
- id: string;
98
- from: string;
99
- to: string | 'broadcast';
100
- type: 'task' | 'result' | 'status' | 'coordination' | 'heartbeat' | 'election';
101
- payload: T;
102
- timestamp: Date;
103
- correlationId?: string;
104
- replyTo?: string;
105
- ttl?: number;
106
- priority?: number;
107
- }
108
- /**
109
- * Swarm task interface
110
- */
111
- export interface SwarmTask {
112
- id: string;
113
- name: string;
114
- type: string;
115
- payload: unknown;
116
- priority: number;
117
- assignedTo?: string;
118
- status: 'pending' | 'assigned' | 'running' | 'completed' | 'failed' | 'cancelled';
119
- dependencies?: string[];
120
- deadline?: Date;
121
- createdAt: Date;
122
- startedAt?: Date;
123
- completedAt?: Date;
124
- }
125
- /**
126
- * Swarm task result interface
127
- */
128
- export interface SwarmTaskResult {
129
- taskId: string;
130
- agentId: string;
131
- success: boolean;
132
- output?: unknown;
133
- error?: Error;
134
- duration: number;
135
- metrics?: TaskMetrics;
136
- }
137
- /**
138
- * Task metrics interface
139
- */
140
- export interface TaskMetrics {
141
- cpuTime: number;
142
- memoryUsage: number;
143
- ioOperations: number;
144
- networkCalls: number;
145
- }
146
- /**
147
- * Coordination result interface
148
- */
149
- export interface CoordinationResult {
150
- success: boolean;
151
- completedTasks: number;
152
- failedTasks: number;
153
- totalDuration: number;
154
- agentMetrics: Map<string, AgentCoordinationMetrics>;
155
- consensusRounds?: number;
156
- }
157
- /**
158
- * Agent coordination metrics
159
- */
160
- export interface AgentCoordinationMetrics {
161
- tasksCompleted: number;
162
- tasksFailed: number;
163
- averageTaskDuration: number;
164
- messagesProcessed: number;
165
- totalDuration: number;
166
- }
167
- /**
168
- * Consensus request interface
169
- */
170
- export interface ConsensusRequest<T = unknown> {
171
- topic: string;
172
- options: T[];
173
- requiredVotes: number | 'majority' | 'all';
174
- timeout: number;
175
- voters?: string[];
176
- }
177
- /**
178
- * Consensus response interface
179
- */
180
- export interface ConsensusResponse<T = unknown> {
181
- topic: string;
182
- decision: T | null;
183
- votes: Map<string, T>;
184
- consensus: boolean;
185
- votingDuration: number;
186
- participatingAgents: string[];
187
- }
188
- /**
189
- * Pre-defined swarm configurations for testing
190
- */
191
- export declare const swarmConfigs: Record<string, SwarmConfig>;
192
- /**
193
- * Pre-defined swarm states for testing
194
- */
195
- export declare const swarmStates: Record<string, SwarmState>;
196
- /**
197
- * Pre-defined swarm tasks for testing
198
- */
199
- export declare const swarmTasks: Record<string, SwarmTask>;
200
- /**
201
- * Pre-defined swarm messages for testing
202
- */
203
- export declare const swarmMessages: Record<string, SwarmMessage>;
204
- /**
205
- * Pre-defined coordination results for testing
206
- */
207
- export declare const coordinationResults: Record<string, CoordinationResult>;
208
- /**
209
- * Factory function to create swarm config with overrides
210
- */
211
- export declare function createSwarmConfig(base?: keyof typeof swarmConfigs, overrides?: Partial<SwarmConfig>): SwarmConfig;
212
- /**
213
- * Factory function to create swarm state with overrides
214
- */
215
- export declare function createSwarmState(base?: keyof typeof swarmStates, overrides?: Partial<SwarmState>): SwarmState;
216
- /**
217
- * Factory function to create swarm task with overrides
218
- */
219
- export declare function createSwarmTask(base?: keyof typeof swarmTasks, overrides?: Partial<SwarmTask>): SwarmTask;
220
- /**
221
- * Factory function to create swarm message with overrides
222
- */
223
- export declare function createSwarmMessage<T = unknown>(type: SwarmMessage['type'], payload: T, overrides?: Partial<SwarmMessage<T>>): SwarmMessage<T>;
224
- /**
225
- * Factory function to create consensus request
226
- */
227
- export declare function createConsensusRequest<T>(topic: string, options: T[], overrides?: Partial<ConsensusRequest<T>>): ConsensusRequest<T>;
228
- /**
229
- * Factory function to create coordination result
230
- */
231
- export declare function createCoordinationResult(base?: keyof typeof coordinationResults, overrides?: Partial<CoordinationResult>): CoordinationResult;
232
- /**
233
- * Create a batch of swarm tasks for testing
234
- */
235
- export declare function createSwarmTaskBatch(count: number, type?: string): SwarmTask[];
236
- /**
237
- * Invalid swarm configurations for error testing
238
- */
239
- export declare const invalidSwarmConfigs: {
240
- zeroAgents: SwarmConfig;
241
- negativeHeartbeat: SwarmConfig;
242
- invalidTopology: {
243
- topology: SwarmTopology;
244
- maxAgents: number;
245
- name?: string;
246
- description?: string;
247
- coordination: CoordinationConfig;
248
- communication: CommunicationConfig;
249
- autoScale?: AutoScaleConfig;
250
- healthCheck?: HealthCheckConfig;
251
- };
252
- invalidProtocol: SwarmConfig;
253
- zeroMessageSize: SwarmConfig;
254
- };
255
- /**
256
- * Mock swarm coordinator interface
257
- */
258
- export interface MockSwarmCoordinator {
259
- initialize: Mock<(config: SwarmConfig) => Promise<SwarmState>>;
260
- coordinate: Mock<(agents: string[], task: SwarmTask) => Promise<CoordinationResult>>;
261
- shutdown: Mock<(graceful?: boolean) => Promise<void>>;
262
- addAgent: Mock<(agentId: string) => Promise<void>>;
263
- removeAgent: Mock<(agentId: string) => Promise<void>>;
264
- getState: Mock<() => SwarmState>;
265
- broadcast: Mock<(message: SwarmMessage) => Promise<void>>;
266
- requestConsensus: Mock<(<T>(request: ConsensusRequest<T>) => Promise<ConsensusResponse<T>>)>;
267
- }
268
- /**
269
- * Create a mock swarm coordinator
270
- */
271
- export declare function createMockSwarmCoordinator(): MockSwarmCoordinator;
272
- /**
273
- * Mock message bus interface
274
- */
275
- export interface MockMessageBus {
276
- publish: Mock<(message: SwarmMessage) => Promise<void>>;
277
- subscribe: Mock<(pattern: string, handler: (message: SwarmMessage) => void) => () => void>;
278
- unsubscribe: Mock<(pattern: string) => void>;
279
- request: Mock<(message: SwarmMessage, timeout?: number) => Promise<SwarmMessage>>;
280
- getStats: Mock<() => {
281
- messagesSent: number;
282
- messagesReceived: number;
283
- }>;
284
- }
285
- /**
286
- * Create a mock message bus
287
- */
288
- export declare function createMockMessageBus(): MockMessageBus;
289
- //# sourceMappingURL=swarm-fixtures.d.ts.map