swarmdo 1.4.8 → 1.5.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 (210) hide show
  1. package/.claude/helpers/statusline.cjs +7 -7
  2. package/README.md +3 -1
  3. package/package.json +5 -3
  4. package/v3/@swarmdo/cli/dist/src/commands/hooks.js +26 -24
  5. package/v3/@swarmdo/cli/dist/src/commands/index.js +4 -0
  6. package/v3/@swarmdo/cli/dist/src/commands/integrations.d.ts +14 -0
  7. package/v3/@swarmdo/cli/dist/src/commands/integrations.js +158 -0
  8. package/v3/@swarmdo/cli/dist/src/commands/memory.js +50 -1
  9. package/v3/@swarmdo/cli/dist/src/commands/providers.js +3 -0
  10. package/v3/@swarmdo/cli/dist/src/commands/release.d.ts +15 -0
  11. package/v3/@swarmdo/cli/dist/src/commands/release.js +224 -0
  12. package/v3/@swarmdo/cli/dist/src/commands/security.js +14 -0
  13. package/v3/@swarmdo/cli/dist/src/commands/transcript.js +82 -1
  14. package/v3/@swarmdo/cli/dist/src/commands/usage.js +80 -1
  15. package/v3/@swarmdo/cli/dist/src/config-lint/lint.js +11 -1
  16. package/v3/@swarmdo/cli/dist/src/init/statusline-generator.js +6 -6
  17. package/v3/@swarmdo/cli/dist/src/integrations/integrations.d.ts +54 -0
  18. package/v3/@swarmdo/cli/dist/src/integrations/integrations.js +162 -0
  19. package/v3/@swarmdo/cli/dist/src/mcp-tools/agent-execute-core.js +25 -3
  20. package/v3/@swarmdo/cli/dist/src/mcp-tools/agentdb-tools.js +8 -8
  21. package/v3/@swarmdo/cli/dist/src/memory/graph-edge-writer.d.ts +12 -0
  22. package/v3/@swarmdo/cli/dist/src/memory/graph-edge-writer.js +32 -1
  23. package/v3/@swarmdo/cli/dist/src/memory-vault/watch.d.ts +32 -0
  24. package/v3/@swarmdo/cli/dist/src/memory-vault/watch.js +66 -0
  25. package/v3/@swarmdo/cli/dist/src/providers/openrouter-config.d.ts +91 -0
  26. package/v3/@swarmdo/cli/dist/src/providers/openrouter-config.js +186 -0
  27. package/v3/@swarmdo/cli/dist/src/release/release.d.ts +72 -0
  28. package/v3/@swarmdo/cli/dist/src/release/release.js +86 -0
  29. package/v3/@swarmdo/cli/dist/src/resilience/backoff.d.ts +23 -0
  30. package/v3/@swarmdo/cli/dist/src/resilience/backoff.js +30 -0
  31. package/v3/@swarmdo/cli/dist/src/swarmvector/model-router.js +14 -0
  32. package/v3/@swarmdo/cli/dist/src/transcript/search.d.ts +39 -0
  33. package/v3/@swarmdo/cli/dist/src/transcript/search.js +67 -0
  34. package/v3/@swarmdo/cli/dist/src/usage/diff.d.ts +69 -0
  35. package/v3/@swarmdo/cli/dist/src/usage/diff.js +112 -0
  36. package/v3/@swarmdo/cli/package.json +4 -4
  37. package/v3/@swarmdo/cli-core/dist/src/index.js +1 -1
  38. package/v3/@swarmdo/codex/dist/cli.js +0 -0
  39. package/v3/@swarmdo/hooks/dist/cli/guidance-cli.js +0 -0
  40. package/v3/@swarmdo/hooks/dist/statusline/index.d.ts +3 -3
  41. package/v3/@swarmdo/hooks/dist/statusline/index.js +3 -3
  42. package/v3/@swarmdo/integration/dist/__tests__/agentic-flow-agent.test.js +4 -1
  43. package/v3/@swarmdo/neural/dist/flash-attention.d.ts +1 -1
  44. package/v3/@swarmdo/neural/dist/flash-attention.js +1 -1
  45. package/v3/@swarmdo/plugin-agent-federation/dist/plugin.js +1 -1
  46. package/v3/@swarmdo/plugin-agent-federation/dist/transport/midstream-aware-loader.js +2 -2
  47. package/v3/@swarmdo/providers/dist/swarmvector-provider.d.ts +1 -1
  48. package/v3/@swarmdo/providers/dist/swarmvector-provider.js +1 -1
  49. package/v3/@swarmdo/security/dist/input-validator.d.ts +6 -6
  50. package/v3/@swarmdo/shared/dist/hooks/safety/git-commit.js +1 -1
  51. package/v3/@swarmdo/shared/dist/mcp/transport/http.js +8 -1
  52. package/v3/vendor/agentdb/package.json +0 -1
  53. package/v3/vendor/agentic-flow/package.json +0 -1
  54. package/.claude/scheduled_tasks.lock +0 -1
  55. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/__init__.cpython-314.pyc +0 -0
  56. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/__main__.cpython-314.pyc +0 -0
  57. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/cli.cpython-314.pyc +0 -0
  58. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/compress.cpython-314.pyc +0 -0
  59. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/detect.cpython-314.pyc +0 -0
  60. package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/validate.cpython-314.pyc +0 -0
  61. package/v3/@swarmdo/plugin-iot-cognitum/dist/application/index.d.ts +0 -2
  62. package/v3/@swarmdo/plugin-iot-cognitum/dist/application/index.js +0 -2
  63. package/v3/@swarmdo/plugin-iot-cognitum/dist/application/iot-coordinator.d.ts +0 -138
  64. package/v3/@swarmdo/plugin-iot-cognitum/dist/application/iot-coordinator.js +0 -418
  65. package/v3/@swarmdo/plugin-iot-cognitum/dist/bin.d.ts +0 -15
  66. package/v3/@swarmdo/plugin-iot-cognitum/dist/bin.js +0 -240
  67. package/v3/@swarmdo/plugin-iot-cognitum/dist/cli-commands.d.ts +0 -7
  68. package/v3/@swarmdo/plugin-iot-cognitum/dist/cli-commands.js +0 -508
  69. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-agent.d.ts +0 -54
  70. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-agent.js +0 -2
  71. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-fleet.d.ts +0 -46
  72. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-fleet.js +0 -2
  73. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-trust-level.d.ts +0 -18
  74. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-trust-level.js +0 -28
  75. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/index.d.ts +0 -5
  76. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/index.js +0 -2
  77. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/telemetry.d.ts +0 -35
  78. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/telemetry.js +0 -2
  79. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/device-repository.d.ts +0 -11
  80. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/device-repository.js +0 -2
  81. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/fleet-repository.d.ts +0 -9
  82. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/fleet-repository.js +0 -2
  83. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/index.d.ts +0 -5
  84. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/index.js +0 -2
  85. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/telemetry-repository.d.ts +0 -12
  86. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/telemetry-repository.js +0 -2
  87. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/trust-history-repository.d.ts +0 -19
  88. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/trust-history-repository.js +0 -2
  89. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/anomaly-detection-service.d.ts +0 -44
  90. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/anomaly-detection-service.js +0 -117
  91. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/device-lifecycle-service.d.ts +0 -70
  92. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/device-lifecycle-service.js +0 -194
  93. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/firmware-orchestration-service.d.ts +0 -69
  94. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/firmware-orchestration-service.js +0 -139
  95. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/fleet-topology-service.d.ts +0 -34
  96. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/fleet-topology-service.js +0 -101
  97. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/index.d.ts +0 -10
  98. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/index.js +0 -10
  99. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/mesh-service.d.ts +0 -64
  100. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/mesh-service.js +0 -70
  101. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/sona-integration-service.d.ts +0 -44
  102. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/sona-integration-service.js +0 -79
  103. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-ingestion-service.d.ts +0 -37
  104. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-ingestion-service.js +0 -39
  105. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-service.d.ts +0 -67
  106. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-service.js +0 -58
  107. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/witness-verification-service.d.ts +0 -45
  108. package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/witness-verification-service.js +0 -63
  109. package/v3/@swarmdo/plugin-iot-cognitum/dist/index.d.ts +0 -26
  110. package/v3/@swarmdo/plugin-iot-cognitum/dist/index.js +0 -17
  111. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/agentdb-telemetry-repository.d.ts +0 -51
  112. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/agentdb-telemetry-repository.js +0 -110
  113. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-device-repository.d.ts +0 -13
  114. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-device-repository.js +0 -25
  115. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-fleet-repository.d.ts +0 -11
  116. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-fleet-repository.js +0 -19
  117. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-trust-history-repository.d.ts +0 -11
  118. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-trust-history-repository.js +0 -27
  119. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/index.d.ts +0 -6
  120. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/index.js +0 -6
  121. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/seed-client-factory.d.ts +0 -41
  122. package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/seed-client-factory.js +0 -64
  123. package/v3/@swarmdo/plugin-iot-cognitum/dist/mcp-tools.d.ts +0 -8
  124. package/v3/@swarmdo/plugin-iot-cognitum/dist/mcp-tools.js +0 -703
  125. package/v3/@swarmdo/plugin-iot-cognitum/dist/plugin.d.ts +0 -23
  126. package/v3/@swarmdo/plugin-iot-cognitum/dist/plugin.js +0 -239
  127. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/anomaly-scan-worker.d.ts +0 -17
  128. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/anomaly-scan-worker.js +0 -42
  129. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/firmware-watch-worker.d.ts +0 -18
  130. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/firmware-watch-worker.js +0 -45
  131. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/health-probe-worker.d.ts +0 -19
  132. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/health-probe-worker.js +0 -50
  133. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/mesh-sync-worker.d.ts +0 -19
  134. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/mesh-sync-worker.js +0 -47
  135. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/telemetry-ingest-worker.d.ts +0 -17
  136. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/telemetry-ingest-worker.js +0 -40
  137. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/witness-audit-worker.d.ts +0 -18
  138. package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/witness-audit-worker.js +0 -51
  139. package/v3/@swarmdo/testing/dist/fixtures/agent-fixtures.d.ts +0 -214
  140. package/v3/@swarmdo/testing/dist/fixtures/agent-fixtures.js +0 -595
  141. package/v3/@swarmdo/testing/dist/fixtures/agents.d.ts +0 -76
  142. package/v3/@swarmdo/testing/dist/fixtures/agents.js +0 -158
  143. package/v3/@swarmdo/testing/dist/fixtures/configurations.d.ts +0 -157
  144. package/v3/@swarmdo/testing/dist/fixtures/configurations.js +0 -337
  145. package/v3/@swarmdo/testing/dist/fixtures/index.d.ts +0 -10
  146. package/v3/@swarmdo/testing/dist/fixtures/index.js +0 -17
  147. package/v3/@swarmdo/testing/dist/fixtures/mcp-fixtures.d.ts +0 -329
  148. package/v3/@swarmdo/testing/dist/fixtures/mcp-fixtures.js +0 -714
  149. package/v3/@swarmdo/testing/dist/fixtures/memory-entries.d.ts +0 -159
  150. package/v3/@swarmdo/testing/dist/fixtures/memory-entries.js +0 -262
  151. package/v3/@swarmdo/testing/dist/fixtures/memory-fixtures.d.ts +0 -290
  152. package/v3/@swarmdo/testing/dist/fixtures/memory-fixtures.js +0 -547
  153. package/v3/@swarmdo/testing/dist/fixtures/swarm-fixtures.d.ts +0 -289
  154. package/v3/@swarmdo/testing/dist/fixtures/swarm-fixtures.js +0 -534
  155. package/v3/@swarmdo/testing/dist/fixtures/tasks.d.ts +0 -106
  156. package/v3/@swarmdo/testing/dist/fixtures/tasks.js +0 -229
  157. package/v3/@swarmdo/testing/dist/helpers/assertion-helpers.d.ts +0 -213
  158. package/v3/@swarmdo/testing/dist/helpers/assertion-helpers.js +0 -435
  159. package/v3/@swarmdo/testing/dist/helpers/assertions.d.ts +0 -135
  160. package/v3/@swarmdo/testing/dist/helpers/assertions.js +0 -217
  161. package/v3/@swarmdo/testing/dist/helpers/create-mock.d.ts +0 -96
  162. package/v3/@swarmdo/testing/dist/helpers/create-mock.js +0 -164
  163. package/v3/@swarmdo/testing/dist/helpers/index.d.ts +0 -14
  164. package/v3/@swarmdo/testing/dist/helpers/index.js +0 -22
  165. package/v3/@swarmdo/testing/dist/helpers/mock-factory.d.ts +0 -323
  166. package/v3/@swarmdo/testing/dist/helpers/mock-factory.js +0 -350
  167. package/v3/@swarmdo/testing/dist/helpers/setup-teardown.d.ts +0 -271
  168. package/v3/@swarmdo/testing/dist/helpers/setup-teardown.js +0 -446
  169. package/v3/@swarmdo/testing/dist/helpers/swarm-instance.d.ts +0 -142
  170. package/v3/@swarmdo/testing/dist/helpers/swarm-instance.js +0 -205
  171. package/v3/@swarmdo/testing/dist/helpers/test-application.d.ts +0 -190
  172. package/v3/@swarmdo/testing/dist/helpers/test-application.js +0 -138
  173. package/v3/@swarmdo/testing/dist/helpers/test-utils.d.ts +0 -274
  174. package/v3/@swarmdo/testing/dist/helpers/test-utils.js +0 -456
  175. package/v3/@swarmdo/testing/dist/index.d.ts +0 -42
  176. package/v3/@swarmdo/testing/dist/index.js +0 -66
  177. package/v3/@swarmdo/testing/dist/mocks/index.d.ts +0 -8
  178. package/v3/@swarmdo/testing/dist/mocks/index.js +0 -10
  179. package/v3/@swarmdo/testing/dist/mocks/mock-mcp-client.d.ts +0 -206
  180. package/v3/@swarmdo/testing/dist/mocks/mock-mcp-client.js +0 -575
  181. package/v3/@swarmdo/testing/dist/mocks/mock-services.d.ts +0 -287
  182. package/v3/@swarmdo/testing/dist/mocks/mock-services.js +0 -563
  183. package/v3/@swarmdo/testing/dist/regression/api-contract.d.ts +0 -109
  184. package/v3/@swarmdo/testing/dist/regression/api-contract.js +0 -374
  185. package/v3/@swarmdo/testing/dist/regression/index.d.ts +0 -18
  186. package/v3/@swarmdo/testing/dist/regression/index.js +0 -18
  187. package/v3/@swarmdo/testing/dist/regression/integration-regression.d.ts +0 -67
  188. package/v3/@swarmdo/testing/dist/regression/integration-regression.js +0 -334
  189. package/v3/@swarmdo/testing/dist/regression/performance-baseline.d.ts +0 -106
  190. package/v3/@swarmdo/testing/dist/regression/performance-baseline.js +0 -268
  191. package/v3/@swarmdo/testing/dist/regression/regression-runner.d.ts +0 -124
  192. package/v3/@swarmdo/testing/dist/regression/regression-runner.js +0 -227
  193. package/v3/@swarmdo/testing/dist/regression/security-regression.d.ts +0 -73
  194. package/v3/@swarmdo/testing/dist/regression/security-regression.js +0 -258
  195. package/v3/@swarmdo/testing/dist/setup.d.ts +0 -43
  196. package/v3/@swarmdo/testing/dist/setup.js +0 -91
  197. package/v3/@swarmdo/testing/dist/v2-compat/api-compat.test.d.ts +0 -10
  198. package/v3/@swarmdo/testing/dist/v2-compat/api-compat.test.js +0 -433
  199. package/v3/@swarmdo/testing/dist/v2-compat/cli-compat.test.d.ts +0 -10
  200. package/v3/@swarmdo/testing/dist/v2-compat/cli-compat.test.js +0 -352
  201. package/v3/@swarmdo/testing/dist/v2-compat/compatibility-validator.d.ts +0 -206
  202. package/v3/@swarmdo/testing/dist/v2-compat/compatibility-validator.js +0 -839
  203. package/v3/@swarmdo/testing/dist/v2-compat/hooks-compat.test.d.ts +0 -10
  204. package/v3/@swarmdo/testing/dist/v2-compat/hooks-compat.test.js +0 -428
  205. package/v3/@swarmdo/testing/dist/v2-compat/index.d.ts +0 -38
  206. package/v3/@swarmdo/testing/dist/v2-compat/index.js +0 -41
  207. package/v3/@swarmdo/testing/dist/v2-compat/mcp-compat.test.d.ts +0 -10
  208. package/v3/@swarmdo/testing/dist/v2-compat/mcp-compat.test.js +0 -419
  209. package/v3/@swarmdo/testing/dist/v2-compat/report-generator.d.ts +0 -34
  210. package/v3/@swarmdo/testing/dist/v2-compat/report-generator.js +0 -372
@@ -1,374 +0,0 @@
1
- /**
2
- * API Contract Validator
3
- *
4
- * Validates MCP tool interfaces to detect breaking changes.
5
- *
6
- * @module v3/testing/regression/api-contract
7
- */
8
- import { readFile, writeFile, mkdir } from 'fs/promises';
9
- import { join, dirname } from 'path';
10
- /**
11
- * MCP tool definitions to validate
12
- */
13
- const MCP_TOOLS = [
14
- {
15
- name: 'agent/spawn',
16
- version: '1.0.0',
17
- description: 'Spawn a new agent',
18
- input: {
19
- type: 'object',
20
- properties: {
21
- agentType: { type: 'string', description: 'Type of agent to spawn' },
22
- id: { type: 'string', description: 'Optional agent ID' },
23
- config: { type: 'object', description: 'Agent configuration' },
24
- priority: { type: 'string', enum: ['low', 'normal', 'high', 'critical'] },
25
- metadata: { type: 'object', description: 'Additional metadata' },
26
- },
27
- required: ['agentType'],
28
- },
29
- output: {
30
- type: 'object',
31
- properties: {
32
- agentId: { type: 'string' },
33
- status: { type: 'string' },
34
- createdAt: { type: 'string' },
35
- },
36
- },
37
- required: ['agentType'],
38
- optional: ['id', 'config', 'priority', 'metadata'],
39
- errors: [
40
- { code: -32602, message: 'Invalid agent type', description: 'The specified agent type is not valid' },
41
- { code: -32000, message: 'Agent spawn failed', description: 'Failed to spawn agent' },
42
- ],
43
- },
44
- {
45
- name: 'agent/list',
46
- version: '1.0.0',
47
- description: 'List all agents',
48
- input: {
49
- type: 'object',
50
- properties: {
51
- status: { type: 'string', enum: ['active', 'idle', 'terminated', 'all'] },
52
- agentType: { type: 'string' },
53
- },
54
- },
55
- output: {
56
- type: 'object',
57
- properties: {
58
- agents: { type: 'array', items: { type: 'object' } },
59
- totalCount: { type: 'number' },
60
- },
61
- },
62
- required: [],
63
- optional: ['status', 'agentType'],
64
- errors: [],
65
- },
66
- {
67
- name: 'memory/store',
68
- version: '1.0.0',
69
- description: 'Store a memory entry',
70
- input: {
71
- type: 'object',
72
- properties: {
73
- content: { type: 'string', description: 'Memory content' },
74
- category: { type: 'string', description: 'Memory category' },
75
- metadata: { type: 'object', description: 'Additional metadata' },
76
- tags: { type: 'array', items: { type: 'string' } },
77
- ttl: { type: 'number', description: 'Time-to-live in seconds' },
78
- },
79
- required: ['content'],
80
- },
81
- output: {
82
- type: 'object',
83
- properties: {
84
- id: { type: 'string' },
85
- storedAt: { type: 'string' },
86
- expiresAt: { type: 'string' },
87
- },
88
- },
89
- required: ['content'],
90
- optional: ['category', 'metadata', 'tags', 'ttl'],
91
- errors: [
92
- { code: -32000, message: 'Storage failed', description: 'Failed to store memory' },
93
- ],
94
- },
95
- {
96
- name: 'memory/search',
97
- version: '1.0.0',
98
- description: 'Search memory entries',
99
- input: {
100
- type: 'object',
101
- properties: {
102
- query: { type: 'string', description: 'Search query' },
103
- category: { type: 'string' },
104
- limit: { type: 'number', default: 10 },
105
- threshold: { type: 'number', default: 0.7 },
106
- semantic: { type: 'boolean', default: true },
107
- },
108
- required: ['query'],
109
- },
110
- output: {
111
- type: 'object',
112
- properties: {
113
- results: { type: 'array', items: { type: 'object' } },
114
- totalMatches: { type: 'number' },
115
- searchTime: { type: 'number' },
116
- },
117
- },
118
- required: ['query'],
119
- optional: ['category', 'limit', 'threshold', 'semantic'],
120
- errors: [],
121
- },
122
- {
123
- name: 'swarm/init',
124
- version: '1.0.0',
125
- description: 'Initialize a swarm',
126
- input: {
127
- type: 'object',
128
- properties: {
129
- topology: { type: 'string', enum: ['hierarchical', 'mesh', 'star', 'ring', 'adaptive'] },
130
- maxAgents: { type: 'number' },
131
- config: { type: 'object' },
132
- },
133
- required: ['topology'],
134
- },
135
- output: {
136
- type: 'object',
137
- properties: {
138
- swarmId: { type: 'string' },
139
- status: { type: 'string' },
140
- topology: { type: 'string' },
141
- },
142
- },
143
- required: ['topology'],
144
- optional: ['maxAgents', 'config'],
145
- errors: [
146
- { code: -32602, message: 'Invalid topology', description: 'The specified topology is not valid' },
147
- ],
148
- },
149
- {
150
- name: 'task/orchestrate',
151
- version: '1.0.0',
152
- description: 'Orchestrate a complex task',
153
- input: {
154
- type: 'object',
155
- properties: {
156
- description: { type: 'string' },
157
- strategy: { type: 'string', enum: ['sequential', 'parallel', 'adaptive'] },
158
- maxAgents: { type: 'number' },
159
- timeout: { type: 'number' },
160
- },
161
- required: ['description'],
162
- },
163
- output: {
164
- type: 'object',
165
- properties: {
166
- taskId: { type: 'string' },
167
- phases: { type: 'array' },
168
- estimatedDuration: { type: 'number' },
169
- },
170
- },
171
- required: ['description'],
172
- optional: ['strategy', 'maxAgents', 'timeout'],
173
- errors: [],
174
- },
175
- ];
176
- /**
177
- * API Contract Validator
178
- *
179
- * Validates MCP tool contracts for breaking changes.
180
- */
181
- export class APIContractValidator {
182
- contractPath;
183
- cachedContracts = null;
184
- constructor(basePath = '.regression-baselines') {
185
- this.contractPath = join(basePath, 'contracts.json');
186
- }
187
- /**
188
- * Capture current contracts as baseline
189
- */
190
- async captureContracts() {
191
- const contracts = {
192
- version: '1.0.0',
193
- capturedAt: Date.now(),
194
- contracts: MCP_TOOLS,
195
- };
196
- await this.saveContracts(contracts);
197
- this.cachedContracts = contracts;
198
- return contracts;
199
- }
200
- /**
201
- * Validate all contracts against baseline
202
- */
203
- async validateAll() {
204
- const baseline = await this.loadContracts();
205
- if (!baseline) {
206
- console.warn('No contract baseline found. Capturing initial contracts...');
207
- await this.captureContracts();
208
- return [];
209
- }
210
- const validations = [];
211
- for (const current of MCP_TOOLS) {
212
- const baselineContract = baseline.contracts.find((c) => c.name === current.name);
213
- if (!baselineContract) {
214
- // New endpoint added
215
- validations.push({
216
- endpoint: current.name,
217
- valid: true,
218
- breaking: false,
219
- message: 'New endpoint added',
220
- diffs: [{
221
- type: 'added',
222
- path: current.name,
223
- description: `New endpoint: ${current.description}`,
224
- breaking: false,
225
- }],
226
- });
227
- continue;
228
- }
229
- const diffs = this.compareContracts(baselineContract, current);
230
- const hasBreakingChanges = diffs.some((d) => d.breaking);
231
- validations.push({
232
- endpoint: current.name,
233
- valid: !hasBreakingChanges,
234
- breaking: hasBreakingChanges,
235
- message: hasBreakingChanges
236
- ? `Breaking changes detected: ${diffs.filter((d) => d.breaking).map((d) => d.description).join(', ')}`
237
- : diffs.length > 0
238
- ? `Non-breaking changes: ${diffs.map((d) => d.description).join(', ')}`
239
- : 'No changes',
240
- diffs,
241
- });
242
- }
243
- // Check for removed endpoints
244
- for (const baselineContract of baseline.contracts) {
245
- const stillExists = MCP_TOOLS.find((c) => c.name === baselineContract.name);
246
- if (!stillExists) {
247
- validations.push({
248
- endpoint: baselineContract.name,
249
- valid: false,
250
- breaking: true,
251
- message: 'Endpoint removed',
252
- diffs: [{
253
- type: 'removed',
254
- path: baselineContract.name,
255
- description: `Endpoint removed: ${baselineContract.name}`,
256
- breaking: true,
257
- }],
258
- });
259
- }
260
- }
261
- return validations;
262
- }
263
- /**
264
- * Compare two contracts for differences
265
- */
266
- compareContracts(baseline, current) {
267
- const diffs = [];
268
- // Check required parameters
269
- for (const param of baseline.required) {
270
- if (!current.required.includes(param)) {
271
- if (current.optional.includes(param)) {
272
- // Parameter became optional - not breaking
273
- diffs.push({
274
- type: 'changed',
275
- path: `${baseline.name}.input.${param}`,
276
- description: `Parameter '${param}' changed from required to optional`,
277
- breaking: false,
278
- oldValue: 'required',
279
- newValue: 'optional',
280
- });
281
- }
282
- else {
283
- // Parameter removed - breaking
284
- diffs.push({
285
- type: 'removed',
286
- path: `${baseline.name}.input.${param}`,
287
- description: `Required parameter '${param}' removed`,
288
- breaking: true,
289
- });
290
- }
291
- }
292
- }
293
- // Check for new required parameters (breaking)
294
- for (const param of current.required) {
295
- if (!baseline.required.includes(param) && !baseline.optional.includes(param)) {
296
- diffs.push({
297
- type: 'added',
298
- path: `${baseline.name}.input.${param}`,
299
- description: `New required parameter '${param}' added`,
300
- breaking: true,
301
- });
302
- }
303
- }
304
- // Check for new optional parameters (not breaking)
305
- for (const param of current.optional) {
306
- if (!baseline.required.includes(param) && !baseline.optional.includes(param)) {
307
- diffs.push({
308
- type: 'added',
309
- path: `${baseline.name}.input.${param}`,
310
- description: `New optional parameter '${param}' added`,
311
- breaking: false,
312
- });
313
- }
314
- }
315
- // Check input schema changes
316
- if (baseline.input.properties && current.input.properties) {
317
- for (const [name, prop] of Object.entries(baseline.input.properties)) {
318
- const currentProp = current.input.properties[name];
319
- if (currentProp) {
320
- // Check type changes
321
- if (prop.type !== currentProp.type) {
322
- diffs.push({
323
- type: 'changed',
324
- path: `${baseline.name}.input.${name}.type`,
325
- description: `Type of '${name}' changed from '${prop.type}' to '${currentProp.type}'`,
326
- breaking: true,
327
- oldValue: prop.type,
328
- newValue: currentProp.type,
329
- });
330
- }
331
- // Check enum changes
332
- if (prop.enum && currentProp.enum) {
333
- const removedValues = prop.enum.filter((v) => !currentProp.enum.includes(v));
334
- if (removedValues.length > 0) {
335
- diffs.push({
336
- type: 'changed',
337
- path: `${baseline.name}.input.${name}.enum`,
338
- description: `Enum values removed from '${name}': ${removedValues.join(', ')}`,
339
- breaking: true,
340
- oldValue: prop.enum,
341
- newValue: currentProp.enum,
342
- });
343
- }
344
- }
345
- }
346
- }
347
- }
348
- return diffs;
349
- }
350
- /**
351
- * Load contracts from file
352
- */
353
- async loadContracts() {
354
- if (this.cachedContracts) {
355
- return this.cachedContracts;
356
- }
357
- try {
358
- const content = await readFile(this.contractPath, 'utf-8');
359
- this.cachedContracts = JSON.parse(content);
360
- return this.cachedContracts;
361
- }
362
- catch {
363
- return null;
364
- }
365
- }
366
- /**
367
- * Save contracts to file
368
- */
369
- async saveContracts(contracts) {
370
- await mkdir(dirname(this.contractPath), { recursive: true });
371
- await writeFile(this.contractPath, JSON.stringify(contracts, null, 2));
372
- }
373
- }
374
- //# sourceMappingURL=api-contract.js.map
@@ -1,18 +0,0 @@
1
- /**
2
- * Regression Testing System
3
- *
4
- * Comprehensive regression detection to prevent capability degradation
5
- * as new features are added. Includes:
6
- * - Performance baselines
7
- * - Security vulnerability checks
8
- * - API contract validation
9
- * - Integration verification
10
- *
11
- * @module v3/testing/regression
12
- */
13
- export { RegressionTestRunner, type RegressionConfig, type RegressionResult, type RegressionReport, } from './regression-runner.js';
14
- export { PerformanceBaseline, type BaselineMetric, type BaselineComparison, type BaselineConfig, } from './performance-baseline.js';
15
- export { SecurityRegressionChecker, type SecurityCheck, type SecurityVulnerability, type SecurityReport, } from './security-regression.js';
16
- export { APIContractValidator, type ContractDefinition, type ContractValidation, type ContractDiff, } from './api-contract.js';
17
- export { IntegrationRegressionSuite, type IntegrationTest, type IntegrationResult, } from './integration-regression.js';
18
- //# sourceMappingURL=index.d.ts.map
@@ -1,18 +0,0 @@
1
- /**
2
- * Regression Testing System
3
- *
4
- * Comprehensive regression detection to prevent capability degradation
5
- * as new features are added. Includes:
6
- * - Performance baselines
7
- * - Security vulnerability checks
8
- * - API contract validation
9
- * - Integration verification
10
- *
11
- * @module v3/testing/regression
12
- */
13
- export { RegressionTestRunner, } from './regression-runner.js';
14
- export { PerformanceBaseline, } from './performance-baseline.js';
15
- export { SecurityRegressionChecker, } from './security-regression.js';
16
- export { APIContractValidator, } from './api-contract.js';
17
- export { IntegrationRegressionSuite, } from './integration-regression.js';
18
- //# sourceMappingURL=index.js.map
@@ -1,67 +0,0 @@
1
- /**
2
- * Integration Regression Suite
3
- *
4
- * Validates critical integration paths work correctly.
5
- *
6
- * @module v3/testing/regression/integration-regression
7
- */
8
- /**
9
- * Integration test definition
10
- */
11
- export interface IntegrationTest {
12
- name: string;
13
- description: string;
14
- category: 'memory' | 'swarm' | 'mcp' | 'hooks' | 'events';
15
- critical: boolean;
16
- timeout: number;
17
- run: () => Promise<boolean>;
18
- }
19
- /**
20
- * Integration test result
21
- */
22
- export interface IntegrationResult {
23
- name: string;
24
- category: string;
25
- passed: boolean;
26
- duration: number;
27
- error?: string;
28
- details?: Record<string, unknown>;
29
- }
30
- /**
31
- * Integration Regression Suite
32
- *
33
- * Runs critical integration tests to catch regressions.
34
- */
35
- export declare class IntegrationRegressionSuite {
36
- private readonly tests;
37
- constructor();
38
- /**
39
- * Run all integration tests
40
- */
41
- runAll(): Promise<IntegrationResult[]>;
42
- /**
43
- * Run tests by category
44
- */
45
- runCategory(category: IntegrationTest['category']): Promise<IntegrationResult[]>;
46
- /**
47
- * Run critical tests only
48
- */
49
- runCritical(): Promise<IntegrationResult[]>;
50
- /**
51
- * Run a single test
52
- */
53
- private runTest;
54
- /**
55
- * Register default integration tests
56
- */
57
- private registerDefaultTests;
58
- /**
59
- * Add a custom test
60
- */
61
- addTest(test: IntegrationTest): void;
62
- /**
63
- * Get all registered tests
64
- */
65
- getTests(): IntegrationTest[];
66
- }
67
- //# sourceMappingURL=integration-regression.d.ts.map