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.
- package/.claude/helpers/statusline.cjs +7 -7
- package/README.md +9 -6
- package/package.json +5 -3
- package/v3/@swarmdo/cli/dist/src/commands/compact.d.ts +16 -0
- package/v3/@swarmdo/cli/dist/src/commands/compact.js +106 -0
- package/v3/@swarmdo/cli/dist/src/commands/hooks.js +26 -24
- package/v3/@swarmdo/cli/dist/src/commands/index.js +10 -3
- package/v3/@swarmdo/cli/dist/src/commands/integrations.d.ts +14 -0
- package/v3/@swarmdo/cli/dist/src/commands/integrations.js +158 -0
- package/v3/@swarmdo/cli/dist/src/commands/memory.js +50 -1
- package/v3/@swarmdo/cli/dist/src/commands/providers.js +3 -0
- package/v3/@swarmdo/cli/dist/src/commands/release.d.ts +15 -0
- package/v3/@swarmdo/cli/dist/src/commands/release.js +241 -0
- package/v3/@swarmdo/cli/dist/src/commands/security.js +14 -0
- package/v3/@swarmdo/cli/dist/src/commands/transcript.js +82 -1
- package/v3/@swarmdo/cli/dist/src/commands/usage.js +80 -1
- package/v3/@swarmdo/cli/dist/src/compact/compact.d.ts +60 -0
- package/v3/@swarmdo/cli/dist/src/compact/compact.js +170 -0
- package/v3/@swarmdo/cli/dist/src/config-lint/lint.js +11 -1
- package/v3/@swarmdo/cli/dist/src/index.js +4 -2
- package/v3/@swarmdo/cli/dist/src/init/statusline-generator.js +6 -6
- package/v3/@swarmdo/cli/dist/src/integrations/integrations.d.ts +54 -0
- package/v3/@swarmdo/cli/dist/src/integrations/integrations.js +162 -0
- package/v3/@swarmdo/cli/dist/src/mcp-tools/agent-execute-core.js +25 -3
- package/v3/@swarmdo/cli/dist/src/mcp-tools/agentdb-tools.js +8 -8
- package/v3/@swarmdo/cli/dist/src/memory/graph-edge-writer.d.ts +12 -0
- package/v3/@swarmdo/cli/dist/src/memory/graph-edge-writer.js +32 -1
- package/v3/@swarmdo/cli/dist/src/memory-vault/watch.d.ts +32 -0
- package/v3/@swarmdo/cli/dist/src/memory-vault/watch.js +66 -0
- package/v3/@swarmdo/cli/dist/src/providers/openrouter-config.d.ts +91 -0
- package/v3/@swarmdo/cli/dist/src/providers/openrouter-config.js +186 -0
- package/v3/@swarmdo/cli/dist/src/release/release.d.ts +72 -0
- package/v3/@swarmdo/cli/dist/src/release/release.js +86 -0
- package/v3/@swarmdo/cli/dist/src/resilience/backoff.d.ts +23 -0
- package/v3/@swarmdo/cli/dist/src/resilience/backoff.js +30 -0
- package/v3/@swarmdo/cli/dist/src/swarmvector/model-router.js +14 -0
- package/v3/@swarmdo/cli/dist/src/transcript/search.d.ts +39 -0
- package/v3/@swarmdo/cli/dist/src/transcript/search.js +67 -0
- package/v3/@swarmdo/cli/dist/src/usage/diff.d.ts +69 -0
- package/v3/@swarmdo/cli/dist/src/usage/diff.js +112 -0
- package/v3/@swarmdo/cli/package.json +4 -4
- package/v3/@swarmdo/cli-core/dist/src/index.js +1 -1
- package/v3/@swarmdo/codex/dist/cli.js +0 -0
- package/v3/@swarmdo/hooks/dist/cli/guidance-cli.js +0 -0
- package/v3/@swarmdo/hooks/dist/statusline/index.d.ts +3 -3
- package/v3/@swarmdo/hooks/dist/statusline/index.js +3 -3
- package/v3/@swarmdo/integration/dist/__tests__/agentic-flow-agent.test.js +4 -1
- package/v3/@swarmdo/neural/dist/flash-attention.d.ts +1 -1
- package/v3/@swarmdo/neural/dist/flash-attention.js +1 -1
- package/v3/@swarmdo/plugin-agent-federation/dist/plugin.js +1 -1
- package/v3/@swarmdo/plugin-agent-federation/dist/transport/midstream-aware-loader.js +2 -2
- package/v3/@swarmdo/providers/dist/swarmvector-provider.d.ts +1 -1
- package/v3/@swarmdo/providers/dist/swarmvector-provider.js +1 -1
- package/v3/@swarmdo/security/dist/input-validator.d.ts +6 -6
- package/v3/@swarmdo/shared/dist/hooks/safety/git-commit.js +1 -1
- package/v3/@swarmdo/shared/dist/mcp/transport/http.js +8 -1
- package/v3/vendor/agentdb/package.json +0 -1
- package/v3/vendor/agentic-flow/package.json +0 -1
- package/.claude/scheduled_tasks.lock +0 -1
- package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/__init__.cpython-314.pyc +0 -0
- package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/__main__.cpython-314.pyc +0 -0
- package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/cli.cpython-314.pyc +0 -0
- package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/compress.cpython-314.pyc +0 -0
- package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/detect.cpython-314.pyc +0 -0
- package/.claude/skills/sdo-caveman-compress/scripts/__pycache__/validate.cpython-314.pyc +0 -0
- package/v3/@swarmdo/plugin-iot-cognitum/dist/application/index.d.ts +0 -2
- package/v3/@swarmdo/plugin-iot-cognitum/dist/application/index.js +0 -2
- package/v3/@swarmdo/plugin-iot-cognitum/dist/application/iot-coordinator.d.ts +0 -138
- package/v3/@swarmdo/plugin-iot-cognitum/dist/application/iot-coordinator.js +0 -418
- package/v3/@swarmdo/plugin-iot-cognitum/dist/bin.d.ts +0 -15
- package/v3/@swarmdo/plugin-iot-cognitum/dist/bin.js +0 -240
- package/v3/@swarmdo/plugin-iot-cognitum/dist/cli-commands.d.ts +0 -7
- package/v3/@swarmdo/plugin-iot-cognitum/dist/cli-commands.js +0 -508
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-agent.d.ts +0 -54
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-agent.js +0 -2
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-fleet.d.ts +0 -46
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-fleet.js +0 -2
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-trust-level.d.ts +0 -18
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/device-trust-level.js +0 -28
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/index.d.ts +0 -5
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/index.js +0 -2
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/telemetry.d.ts +0 -35
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/entities/telemetry.js +0 -2
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/device-repository.d.ts +0 -11
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/device-repository.js +0 -2
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/fleet-repository.d.ts +0 -9
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/fleet-repository.js +0 -2
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/index.d.ts +0 -5
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/index.js +0 -2
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/telemetry-repository.d.ts +0 -12
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/telemetry-repository.js +0 -2
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/trust-history-repository.d.ts +0 -19
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/repositories/trust-history-repository.js +0 -2
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/anomaly-detection-service.d.ts +0 -44
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/anomaly-detection-service.js +0 -117
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/device-lifecycle-service.d.ts +0 -70
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/device-lifecycle-service.js +0 -194
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/firmware-orchestration-service.d.ts +0 -69
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/firmware-orchestration-service.js +0 -139
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/fleet-topology-service.d.ts +0 -34
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/fleet-topology-service.js +0 -101
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/index.d.ts +0 -10
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/index.js +0 -10
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/mesh-service.d.ts +0 -64
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/mesh-service.js +0 -70
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/sona-integration-service.d.ts +0 -44
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/sona-integration-service.js +0 -79
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-ingestion-service.d.ts +0 -37
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-ingestion-service.js +0 -39
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-service.d.ts +0 -67
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/telemetry-service.js +0 -58
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/witness-verification-service.d.ts +0 -45
- package/v3/@swarmdo/plugin-iot-cognitum/dist/domain/services/witness-verification-service.js +0 -63
- package/v3/@swarmdo/plugin-iot-cognitum/dist/index.d.ts +0 -26
- package/v3/@swarmdo/plugin-iot-cognitum/dist/index.js +0 -17
- package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/agentdb-telemetry-repository.d.ts +0 -51
- package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/agentdb-telemetry-repository.js +0 -110
- package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-device-repository.d.ts +0 -13
- package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-device-repository.js +0 -25
- package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-fleet-repository.d.ts +0 -11
- package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-fleet-repository.js +0 -19
- package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-trust-history-repository.d.ts +0 -11
- package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/in-memory-trust-history-repository.js +0 -27
- package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/index.d.ts +0 -6
- package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/index.js +0 -6
- package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/seed-client-factory.d.ts +0 -41
- package/v3/@swarmdo/plugin-iot-cognitum/dist/infrastructure/seed-client-factory.js +0 -64
- package/v3/@swarmdo/plugin-iot-cognitum/dist/mcp-tools.d.ts +0 -8
- package/v3/@swarmdo/plugin-iot-cognitum/dist/mcp-tools.js +0 -703
- package/v3/@swarmdo/plugin-iot-cognitum/dist/plugin.d.ts +0 -23
- package/v3/@swarmdo/plugin-iot-cognitum/dist/plugin.js +0 -239
- package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/anomaly-scan-worker.d.ts +0 -17
- package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/anomaly-scan-worker.js +0 -42
- package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/firmware-watch-worker.d.ts +0 -18
- package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/firmware-watch-worker.js +0 -45
- package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/health-probe-worker.d.ts +0 -19
- package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/health-probe-worker.js +0 -50
- package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/mesh-sync-worker.d.ts +0 -19
- package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/mesh-sync-worker.js +0 -47
- package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/telemetry-ingest-worker.d.ts +0 -17
- package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/telemetry-ingest-worker.js +0 -40
- package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/witness-audit-worker.d.ts +0 -18
- package/v3/@swarmdo/plugin-iot-cognitum/dist/workers/witness-audit-worker.js +0 -51
- package/v3/@swarmdo/testing/dist/fixtures/agent-fixtures.d.ts +0 -214
- package/v3/@swarmdo/testing/dist/fixtures/agent-fixtures.js +0 -595
- package/v3/@swarmdo/testing/dist/fixtures/agents.d.ts +0 -76
- package/v3/@swarmdo/testing/dist/fixtures/agents.js +0 -158
- package/v3/@swarmdo/testing/dist/fixtures/configurations.d.ts +0 -157
- package/v3/@swarmdo/testing/dist/fixtures/configurations.js +0 -337
- package/v3/@swarmdo/testing/dist/fixtures/index.d.ts +0 -10
- package/v3/@swarmdo/testing/dist/fixtures/index.js +0 -17
- package/v3/@swarmdo/testing/dist/fixtures/mcp-fixtures.d.ts +0 -329
- package/v3/@swarmdo/testing/dist/fixtures/mcp-fixtures.js +0 -714
- package/v3/@swarmdo/testing/dist/fixtures/memory-entries.d.ts +0 -159
- package/v3/@swarmdo/testing/dist/fixtures/memory-entries.js +0 -262
- package/v3/@swarmdo/testing/dist/fixtures/memory-fixtures.d.ts +0 -290
- package/v3/@swarmdo/testing/dist/fixtures/memory-fixtures.js +0 -547
- package/v3/@swarmdo/testing/dist/fixtures/swarm-fixtures.d.ts +0 -289
- package/v3/@swarmdo/testing/dist/fixtures/swarm-fixtures.js +0 -534
- package/v3/@swarmdo/testing/dist/fixtures/tasks.d.ts +0 -106
- package/v3/@swarmdo/testing/dist/fixtures/tasks.js +0 -229
- package/v3/@swarmdo/testing/dist/helpers/assertion-helpers.d.ts +0 -213
- package/v3/@swarmdo/testing/dist/helpers/assertion-helpers.js +0 -435
- package/v3/@swarmdo/testing/dist/helpers/assertions.d.ts +0 -135
- package/v3/@swarmdo/testing/dist/helpers/assertions.js +0 -217
- package/v3/@swarmdo/testing/dist/helpers/create-mock.d.ts +0 -96
- package/v3/@swarmdo/testing/dist/helpers/create-mock.js +0 -164
- package/v3/@swarmdo/testing/dist/helpers/index.d.ts +0 -14
- package/v3/@swarmdo/testing/dist/helpers/index.js +0 -22
- package/v3/@swarmdo/testing/dist/helpers/mock-factory.d.ts +0 -323
- package/v3/@swarmdo/testing/dist/helpers/mock-factory.js +0 -350
- package/v3/@swarmdo/testing/dist/helpers/setup-teardown.d.ts +0 -271
- package/v3/@swarmdo/testing/dist/helpers/setup-teardown.js +0 -446
- package/v3/@swarmdo/testing/dist/helpers/swarm-instance.d.ts +0 -142
- package/v3/@swarmdo/testing/dist/helpers/swarm-instance.js +0 -205
- package/v3/@swarmdo/testing/dist/helpers/test-application.d.ts +0 -190
- package/v3/@swarmdo/testing/dist/helpers/test-application.js +0 -138
- package/v3/@swarmdo/testing/dist/helpers/test-utils.d.ts +0 -274
- package/v3/@swarmdo/testing/dist/helpers/test-utils.js +0 -456
- package/v3/@swarmdo/testing/dist/index.d.ts +0 -42
- package/v3/@swarmdo/testing/dist/index.js +0 -66
- package/v3/@swarmdo/testing/dist/mocks/index.d.ts +0 -8
- package/v3/@swarmdo/testing/dist/mocks/index.js +0 -10
- package/v3/@swarmdo/testing/dist/mocks/mock-mcp-client.d.ts +0 -206
- package/v3/@swarmdo/testing/dist/mocks/mock-mcp-client.js +0 -575
- package/v3/@swarmdo/testing/dist/mocks/mock-services.d.ts +0 -287
- package/v3/@swarmdo/testing/dist/mocks/mock-services.js +0 -563
- package/v3/@swarmdo/testing/dist/regression/api-contract.d.ts +0 -109
- package/v3/@swarmdo/testing/dist/regression/api-contract.js +0 -374
- package/v3/@swarmdo/testing/dist/regression/index.d.ts +0 -18
- package/v3/@swarmdo/testing/dist/regression/index.js +0 -18
- package/v3/@swarmdo/testing/dist/regression/integration-regression.d.ts +0 -67
- package/v3/@swarmdo/testing/dist/regression/integration-regression.js +0 -334
- package/v3/@swarmdo/testing/dist/regression/performance-baseline.d.ts +0 -106
- package/v3/@swarmdo/testing/dist/regression/performance-baseline.js +0 -268
- package/v3/@swarmdo/testing/dist/regression/regression-runner.d.ts +0 -124
- package/v3/@swarmdo/testing/dist/regression/regression-runner.js +0 -227
- package/v3/@swarmdo/testing/dist/regression/security-regression.d.ts +0 -73
- package/v3/@swarmdo/testing/dist/regression/security-regression.js +0 -258
- package/v3/@swarmdo/testing/dist/setup.d.ts +0 -43
- package/v3/@swarmdo/testing/dist/setup.js +0 -91
- package/v3/@swarmdo/testing/dist/v2-compat/api-compat.test.d.ts +0 -10
- package/v3/@swarmdo/testing/dist/v2-compat/api-compat.test.js +0 -433
- package/v3/@swarmdo/testing/dist/v2-compat/cli-compat.test.d.ts +0 -10
- package/v3/@swarmdo/testing/dist/v2-compat/cli-compat.test.js +0 -352
- package/v3/@swarmdo/testing/dist/v2-compat/compatibility-validator.d.ts +0 -206
- package/v3/@swarmdo/testing/dist/v2-compat/compatibility-validator.js +0 -839
- package/v3/@swarmdo/testing/dist/v2-compat/hooks-compat.test.d.ts +0 -10
- package/v3/@swarmdo/testing/dist/v2-compat/hooks-compat.test.js +0 -428
- package/v3/@swarmdo/testing/dist/v2-compat/index.d.ts +0 -38
- package/v3/@swarmdo/testing/dist/v2-compat/index.js +0 -41
- package/v3/@swarmdo/testing/dist/v2-compat/mcp-compat.test.d.ts +0 -10
- package/v3/@swarmdo/testing/dist/v2-compat/mcp-compat.test.js +0 -419
- package/v3/@swarmdo/testing/dist/v2-compat/report-generator.d.ts +0 -34
- package/v3/@swarmdo/testing/dist/v2-compat/report-generator.js +0 -372
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @swarmdo/testing - MCP Fixtures
|
|
3
|
-
*
|
|
4
|
-
* Comprehensive mock MCP tools, contexts, and server configurations for testing.
|
|
5
|
-
* Supports all MCP protocol operations and Swarmdo tool integrations.
|
|
6
|
-
*
|
|
7
|
-
* Based on ADR-005 (MCP-first API design) and V3 specifications.
|
|
8
|
-
*/
|
|
9
|
-
import { type Mock } from 'vitest';
|
|
10
|
-
/**
|
|
11
|
-
* MCP transport types
|
|
12
|
-
*/
|
|
13
|
-
export type MCPTransportType = 'stdio' | 'http' | 'websocket';
|
|
14
|
-
/**
|
|
15
|
-
* MCP content types
|
|
16
|
-
*/
|
|
17
|
-
export type MCPContentType = 'text' | 'image' | 'resource';
|
|
18
|
-
/**
|
|
19
|
-
* MCP input schema type (JSON Schema subset)
|
|
20
|
-
*/
|
|
21
|
-
export interface MCPInputSchema {
|
|
22
|
-
type: 'object';
|
|
23
|
-
properties: Record<string, MCPPropertySchema>;
|
|
24
|
-
required?: string[];
|
|
25
|
-
additionalProperties?: boolean;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* MCP property schema
|
|
29
|
-
*/
|
|
30
|
-
export interface MCPPropertySchema {
|
|
31
|
-
type: 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
32
|
-
description?: string;
|
|
33
|
-
enum?: unknown[];
|
|
34
|
-
default?: unknown;
|
|
35
|
-
items?: MCPPropertySchema;
|
|
36
|
-
properties?: Record<string, MCPPropertySchema>;
|
|
37
|
-
required?: string[];
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* MCP tool definition
|
|
41
|
-
*/
|
|
42
|
-
export interface MCPTool {
|
|
43
|
-
name: string;
|
|
44
|
-
description: string;
|
|
45
|
-
inputSchema: MCPInputSchema;
|
|
46
|
-
handler?: (params: Record<string, unknown>) => Promise<MCPToolResult>;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* MCP tool result
|
|
50
|
-
*/
|
|
51
|
-
export interface MCPToolResult {
|
|
52
|
-
content: MCPContent[];
|
|
53
|
-
isError?: boolean;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* MCP content (text, image, or resource)
|
|
57
|
-
*/
|
|
58
|
-
export type MCPContent = MCPTextContent | MCPImageContent | MCPResourceContent;
|
|
59
|
-
/**
|
|
60
|
-
* MCP text content
|
|
61
|
-
*/
|
|
62
|
-
export interface MCPTextContent {
|
|
63
|
-
type: 'text';
|
|
64
|
-
text: string;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* MCP image content
|
|
68
|
-
*/
|
|
69
|
-
export interface MCPImageContent {
|
|
70
|
-
type: 'image';
|
|
71
|
-
data: string;
|
|
72
|
-
mimeType: string;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* MCP resource content
|
|
76
|
-
*/
|
|
77
|
-
export interface MCPResourceContent {
|
|
78
|
-
type: 'resource';
|
|
79
|
-
resource: {
|
|
80
|
-
uri: string;
|
|
81
|
-
mimeType?: string;
|
|
82
|
-
text?: string;
|
|
83
|
-
blob?: string;
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* MCP server configuration
|
|
88
|
-
*/
|
|
89
|
-
export interface MCPServerConfig {
|
|
90
|
-
name: string;
|
|
91
|
-
version: string;
|
|
92
|
-
transport: MCPTransportConfig;
|
|
93
|
-
tools?: MCPTool[];
|
|
94
|
-
resources?: MCPResource[];
|
|
95
|
-
prompts?: MCPPrompt[];
|
|
96
|
-
capabilities?: MCPCapabilities;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* MCP transport configuration
|
|
100
|
-
*/
|
|
101
|
-
export interface MCPTransportConfig {
|
|
102
|
-
type: MCPTransportType;
|
|
103
|
-
port?: number;
|
|
104
|
-
host?: string;
|
|
105
|
-
path?: string;
|
|
106
|
-
timeout?: number;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* MCP resource definition
|
|
110
|
-
*/
|
|
111
|
-
export interface MCPResource {
|
|
112
|
-
uri: string;
|
|
113
|
-
name: string;
|
|
114
|
-
description?: string;
|
|
115
|
-
mimeType?: string;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* MCP prompt definition
|
|
119
|
-
*/
|
|
120
|
-
export interface MCPPrompt {
|
|
121
|
-
name: string;
|
|
122
|
-
description?: string;
|
|
123
|
-
arguments?: MCPPromptArgument[];
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* MCP prompt argument
|
|
127
|
-
*/
|
|
128
|
-
export interface MCPPromptArgument {
|
|
129
|
-
name: string;
|
|
130
|
-
description?: string;
|
|
131
|
-
required?: boolean;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* MCP capabilities
|
|
135
|
-
*/
|
|
136
|
-
export interface MCPCapabilities {
|
|
137
|
-
tools?: boolean;
|
|
138
|
-
resources?: boolean;
|
|
139
|
-
prompts?: boolean;
|
|
140
|
-
logging?: boolean;
|
|
141
|
-
experimental?: Record<string, boolean>;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* MCP request base
|
|
145
|
-
*/
|
|
146
|
-
export interface MCPRequestBase {
|
|
147
|
-
jsonrpc: '2.0';
|
|
148
|
-
id: string | number;
|
|
149
|
-
method: string;
|
|
150
|
-
params?: Record<string, unknown>;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* MCP response base
|
|
154
|
-
*/
|
|
155
|
-
export interface MCPResponseBase<T = unknown> {
|
|
156
|
-
jsonrpc: '2.0';
|
|
157
|
-
id: string | number;
|
|
158
|
-
result?: T;
|
|
159
|
-
error?: MCPError;
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* MCP error
|
|
163
|
-
*/
|
|
164
|
-
export interface MCPError {
|
|
165
|
-
code: number;
|
|
166
|
-
message: string;
|
|
167
|
-
data?: unknown;
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* MCP server status
|
|
171
|
-
*/
|
|
172
|
-
export interface MCPServerStatus {
|
|
173
|
-
running: boolean;
|
|
174
|
-
transport: MCPTransportType;
|
|
175
|
-
connectedClients: number;
|
|
176
|
-
toolsRegistered: number;
|
|
177
|
-
resourcesRegistered: number;
|
|
178
|
-
promptsRegistered: number;
|
|
179
|
-
requestsHandled: number;
|
|
180
|
-
errorsCount: number;
|
|
181
|
-
uptime: number;
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* MCP session context
|
|
185
|
-
*/
|
|
186
|
-
export interface MCPSessionContext {
|
|
187
|
-
sessionId: string;
|
|
188
|
-
clientInfo: {
|
|
189
|
-
name: string;
|
|
190
|
-
version: string;
|
|
191
|
-
};
|
|
192
|
-
capabilities: MCPCapabilities;
|
|
193
|
-
startedAt: Date;
|
|
194
|
-
lastActivity: Date;
|
|
195
|
-
requestCount: number;
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Pre-defined MCP tools for Swarmdo
|
|
199
|
-
*/
|
|
200
|
-
export declare const mcpTools: Record<string, MCPTool>;
|
|
201
|
-
/**
|
|
202
|
-
* Pre-defined MCP resources
|
|
203
|
-
*/
|
|
204
|
-
export declare const mcpResources: Record<string, MCPResource>;
|
|
205
|
-
/**
|
|
206
|
-
* Pre-defined MCP prompts
|
|
207
|
-
*/
|
|
208
|
-
export declare const mcpPrompts: Record<string, MCPPrompt>;
|
|
209
|
-
/**
|
|
210
|
-
* Pre-defined MCP server configurations
|
|
211
|
-
*/
|
|
212
|
-
export declare const mcpServerConfigs: Record<string, MCPServerConfig>;
|
|
213
|
-
/**
|
|
214
|
-
* Pre-defined MCP tool results
|
|
215
|
-
*/
|
|
216
|
-
export declare const mcpToolResults: Record<string, MCPToolResult>;
|
|
217
|
-
/**
|
|
218
|
-
* Pre-defined MCP errors
|
|
219
|
-
*/
|
|
220
|
-
export declare const mcpErrors: Record<string, MCPError>;
|
|
221
|
-
/**
|
|
222
|
-
* Pre-defined session contexts
|
|
223
|
-
*/
|
|
224
|
-
export declare const mcpSessionContexts: Record<string, MCPSessionContext>;
|
|
225
|
-
/**
|
|
226
|
-
* Factory function to create MCP tool
|
|
227
|
-
*/
|
|
228
|
-
export declare function createMCPTool(base: keyof typeof mcpTools, overrides?: Partial<MCPTool>): MCPTool;
|
|
229
|
-
/**
|
|
230
|
-
* Factory function to create MCP server config
|
|
231
|
-
*/
|
|
232
|
-
export declare function createMCPServerConfig(base?: keyof typeof mcpServerConfigs, overrides?: Partial<MCPServerConfig>): MCPServerConfig;
|
|
233
|
-
/**
|
|
234
|
-
* Factory function to create MCP request
|
|
235
|
-
*/
|
|
236
|
-
export declare function createMCPRequest(method: string, params?: Record<string, unknown>, overrides?: Partial<MCPRequestBase>): MCPRequestBase;
|
|
237
|
-
/**
|
|
238
|
-
* Factory function to create MCP response
|
|
239
|
-
*/
|
|
240
|
-
export declare function createMCPResponse<T>(id: string | number, result?: T, error?: MCPError): MCPResponseBase<T>;
|
|
241
|
-
/**
|
|
242
|
-
* Factory function to create MCP tool result
|
|
243
|
-
*/
|
|
244
|
-
export declare function createMCPToolResult(text: string, isError?: boolean): MCPToolResult;
|
|
245
|
-
/**
|
|
246
|
-
* Factory function to create session context
|
|
247
|
-
*/
|
|
248
|
-
export declare function createMCPSessionContext(base?: keyof typeof mcpSessionContexts, overrides?: Partial<MCPSessionContext>): MCPSessionContext;
|
|
249
|
-
/**
|
|
250
|
-
* Invalid MCP configurations for error testing
|
|
251
|
-
*/
|
|
252
|
-
export declare const invalidMCPConfigs: {
|
|
253
|
-
emptyName: {
|
|
254
|
-
name: string;
|
|
255
|
-
version: string;
|
|
256
|
-
transport: MCPTransportConfig;
|
|
257
|
-
tools?: MCPTool[];
|
|
258
|
-
resources?: MCPResource[];
|
|
259
|
-
prompts?: MCPPrompt[];
|
|
260
|
-
capabilities?: MCPCapabilities;
|
|
261
|
-
};
|
|
262
|
-
invalidPort: {
|
|
263
|
-
transport: {
|
|
264
|
-
type: MCPTransportType;
|
|
265
|
-
port: number;
|
|
266
|
-
host: string;
|
|
267
|
-
};
|
|
268
|
-
name: string;
|
|
269
|
-
version: string;
|
|
270
|
-
tools?: MCPTool[];
|
|
271
|
-
resources?: MCPResource[];
|
|
272
|
-
prompts?: MCPPrompt[];
|
|
273
|
-
capabilities?: MCPCapabilities;
|
|
274
|
-
};
|
|
275
|
-
missingTransport: {
|
|
276
|
-
name: string;
|
|
277
|
-
version: string;
|
|
278
|
-
transport: MCPTransportConfig;
|
|
279
|
-
};
|
|
280
|
-
};
|
|
281
|
-
/**
|
|
282
|
-
* Mock MCP client interface
|
|
283
|
-
*/
|
|
284
|
-
export interface MockMCPClient {
|
|
285
|
-
connect: Mock<() => Promise<void>>;
|
|
286
|
-
disconnect: Mock<() => Promise<void>>;
|
|
287
|
-
callTool: Mock<(name: string, params: Record<string, unknown>) => Promise<MCPToolResult>>;
|
|
288
|
-
listTools: Mock<() => Promise<MCPTool[]>>;
|
|
289
|
-
readResource: Mock<(uri: string) => Promise<MCPResourceContent>>;
|
|
290
|
-
listResources: Mock<() => Promise<MCPResource[]>>;
|
|
291
|
-
getPrompt: Mock<(name: string, args: Record<string, string>) => Promise<string>>;
|
|
292
|
-
listPrompts: Mock<() => Promise<MCPPrompt[]>>;
|
|
293
|
-
isConnected: Mock<() => boolean>;
|
|
294
|
-
getSessionContext: Mock<() => MCPSessionContext | null>;
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* Create a mock MCP client
|
|
298
|
-
*/
|
|
299
|
-
export declare function createMockMCPClient(): MockMCPClient;
|
|
300
|
-
/**
|
|
301
|
-
* Mock MCP server interface
|
|
302
|
-
*/
|
|
303
|
-
export interface MockMCPServer {
|
|
304
|
-
start: Mock<() => Promise<void>>;
|
|
305
|
-
stop: Mock<() => Promise<void>>;
|
|
306
|
-
registerTool: Mock<(tool: MCPTool) => void>;
|
|
307
|
-
registerResource: Mock<(resource: MCPResource) => void>;
|
|
308
|
-
registerPrompt: Mock<(prompt: MCPPrompt) => void>;
|
|
309
|
-
handleRequest: Mock<(request: MCPRequestBase) => Promise<MCPResponseBase>>;
|
|
310
|
-
getStatus: Mock<() => MCPServerStatus>;
|
|
311
|
-
}
|
|
312
|
-
/**
|
|
313
|
-
* Create a mock MCP server
|
|
314
|
-
*/
|
|
315
|
-
export declare function createMockMCPServer(): MockMCPServer;
|
|
316
|
-
/**
|
|
317
|
-
* Mock transport interface
|
|
318
|
-
*/
|
|
319
|
-
export interface MockMCPTransport {
|
|
320
|
-
send: Mock<(message: string) => Promise<void>>;
|
|
321
|
-
receive: Mock<() => Promise<string>>;
|
|
322
|
-
close: Mock<() => Promise<void>>;
|
|
323
|
-
isOpen: Mock<() => boolean>;
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Create a mock MCP transport
|
|
327
|
-
*/
|
|
328
|
-
export declare function createMockMCPTransport(): MockMCPTransport;
|
|
329
|
-
//# sourceMappingURL=mcp-fixtures.d.ts.map
|