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,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