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.
- package/.claude/helpers/statusline.cjs +7 -7
- package/README.md +3 -1
- package/package.json +5 -3
- package/v3/@swarmdo/cli/dist/src/commands/hooks.js +26 -24
- package/v3/@swarmdo/cli/dist/src/commands/index.js +4 -0
- 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 +224 -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/config-lint/lint.js +11 -1
- 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,206 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @swarmdo/testing - Mock MCP Client
|
|
3
|
-
*
|
|
4
|
-
* Comprehensive mock MCP client for testing CLI and server interactions.
|
|
5
|
-
* Simulates full MCP protocol behavior with request/response tracking.
|
|
6
|
-
*/
|
|
7
|
-
import { type Mock } from 'vitest';
|
|
8
|
-
import type { MCPTool, MCPToolResult, MCPResource, MCPPrompt, MCPServerConfig, MCPSessionContext, MCPError, MCPContent } from '../fixtures/mcp-fixtures.js';
|
|
9
|
-
/**
|
|
10
|
-
* Mock MCP Client with full protocol simulation
|
|
11
|
-
*/
|
|
12
|
-
export declare class MockMCPClient {
|
|
13
|
-
private _connected;
|
|
14
|
-
private _session;
|
|
15
|
-
private _tools;
|
|
16
|
-
private _resources;
|
|
17
|
-
private _prompts;
|
|
18
|
-
private _requestHistory;
|
|
19
|
-
private _responseHistory;
|
|
20
|
-
private _toolHandlers;
|
|
21
|
-
private _errorSimulation;
|
|
22
|
-
private _latencySimulation;
|
|
23
|
-
connect: Mock<() => Promise<void>>;
|
|
24
|
-
disconnect: Mock<() => Promise<void>>;
|
|
25
|
-
callTool: Mock<(name: string, params: Record<string, unknown>) => Promise<MCPToolResult>>;
|
|
26
|
-
listTools: Mock<() => Promise<MCPTool[]>>;
|
|
27
|
-
readResource: Mock<(uri: string) => Promise<MCPResourceContent>>;
|
|
28
|
-
listResources: Mock<() => Promise<MCPResource[]>>;
|
|
29
|
-
getPrompt: Mock<(name: string, args: Record<string, string>) => Promise<MCPPromptResult>>;
|
|
30
|
-
listPrompts: Mock<() => Promise<MCPPrompt[]>>;
|
|
31
|
-
isConnected: Mock<() => boolean>;
|
|
32
|
-
getSession: Mock<() => MCPSessionContext | null>;
|
|
33
|
-
/**
|
|
34
|
-
* Register a tool
|
|
35
|
-
*/
|
|
36
|
-
registerTool(tool: MCPTool): void;
|
|
37
|
-
/**
|
|
38
|
-
* Register multiple tools
|
|
39
|
-
*/
|
|
40
|
-
registerTools(tools: MCPTool[]): void;
|
|
41
|
-
/**
|
|
42
|
-
* Register a custom tool handler
|
|
43
|
-
*/
|
|
44
|
-
setToolHandler(name: string, handler: ToolHandler): void;
|
|
45
|
-
/**
|
|
46
|
-
* Register a resource
|
|
47
|
-
*/
|
|
48
|
-
registerResource(resource: MCPResource): void;
|
|
49
|
-
/**
|
|
50
|
-
* Register multiple resources
|
|
51
|
-
*/
|
|
52
|
-
registerResources(resources: MCPResource[]): void;
|
|
53
|
-
/**
|
|
54
|
-
* Register a prompt
|
|
55
|
-
*/
|
|
56
|
-
registerPrompt(prompt: MCPPrompt): void;
|
|
57
|
-
/**
|
|
58
|
-
* Register multiple prompts
|
|
59
|
-
*/
|
|
60
|
-
registerPrompts(prompts: MCPPrompt[]): void;
|
|
61
|
-
/**
|
|
62
|
-
* Configure error simulation
|
|
63
|
-
*/
|
|
64
|
-
simulateErrors(config: ErrorSimulation): void;
|
|
65
|
-
/**
|
|
66
|
-
* Configure latency simulation
|
|
67
|
-
*/
|
|
68
|
-
setLatency(ms: number): void;
|
|
69
|
-
/**
|
|
70
|
-
* Get request history
|
|
71
|
-
*/
|
|
72
|
-
getRequestHistory(): MCPRequest[];
|
|
73
|
-
/**
|
|
74
|
-
* Get response history
|
|
75
|
-
*/
|
|
76
|
-
getResponseHistory(): MCPResponse[];
|
|
77
|
-
/**
|
|
78
|
-
* Get last request
|
|
79
|
-
*/
|
|
80
|
-
getLastRequest(): MCPRequest | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* Get last response
|
|
83
|
-
*/
|
|
84
|
-
getLastResponse(): MCPResponse | undefined;
|
|
85
|
-
/**
|
|
86
|
-
* Clear history
|
|
87
|
-
*/
|
|
88
|
-
clearHistory(): void;
|
|
89
|
-
/**
|
|
90
|
-
* Reset client to initial state
|
|
91
|
-
*/
|
|
92
|
-
reset(): void;
|
|
93
|
-
private ensureConnected;
|
|
94
|
-
private simulateLatency;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Mock MCP Server for testing server-side behavior
|
|
98
|
-
*/
|
|
99
|
-
export declare class MockMCPServer {
|
|
100
|
-
private _running;
|
|
101
|
-
private _config;
|
|
102
|
-
private _tools;
|
|
103
|
-
private _resources;
|
|
104
|
-
private _prompts;
|
|
105
|
-
private _connections;
|
|
106
|
-
private _requestLog;
|
|
107
|
-
private _errorCount;
|
|
108
|
-
start: Mock<(config: MCPServerConfig) => Promise<void>>;
|
|
109
|
-
stop: Mock<() => Promise<void>>;
|
|
110
|
-
handleRequest: Mock<(request: MCPRequest) => Promise<MCPResponse>>;
|
|
111
|
-
registerTool: Mock<(tool: MCPTool) => void>;
|
|
112
|
-
registerResource: Mock<(resource: MCPResource) => void>;
|
|
113
|
-
registerPrompt: Mock<(prompt: MCPPrompt) => void>;
|
|
114
|
-
getStatus: Mock<() => MCPServerStatus>;
|
|
115
|
-
/**
|
|
116
|
-
* Simulate a client connection
|
|
117
|
-
*/
|
|
118
|
-
acceptConnection(): MockMCPConnection;
|
|
119
|
-
/**
|
|
120
|
-
* Get request log
|
|
121
|
-
*/
|
|
122
|
-
getRequestLog(): MCPRequest[];
|
|
123
|
-
/**
|
|
124
|
-
* Reset server
|
|
125
|
-
*/
|
|
126
|
-
reset(): void;
|
|
127
|
-
private handleToolCall;
|
|
128
|
-
private handleResourceRead;
|
|
129
|
-
private handlePromptGet;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Mock MCP Connection
|
|
133
|
-
*/
|
|
134
|
-
export declare class MockMCPConnection {
|
|
135
|
-
private _open;
|
|
136
|
-
private _server;
|
|
137
|
-
constructor(server: MockMCPServer);
|
|
138
|
-
send: Mock<(request: MCPRequest) => Promise<MCPResponse>>;
|
|
139
|
-
close: Mock<() => Promise<void>>;
|
|
140
|
-
isOpen(): boolean;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* MCP Client Error
|
|
144
|
-
*/
|
|
145
|
-
export declare class MCPClientError extends Error {
|
|
146
|
-
code: number;
|
|
147
|
-
constructor(message: string, code: number);
|
|
148
|
-
}
|
|
149
|
-
interface MCPRequest {
|
|
150
|
-
id: string;
|
|
151
|
-
method: string;
|
|
152
|
-
params?: Record<string, unknown>;
|
|
153
|
-
timestamp: Date;
|
|
154
|
-
}
|
|
155
|
-
interface MCPResponse {
|
|
156
|
-
id: string;
|
|
157
|
-
result?: unknown;
|
|
158
|
-
error?: MCPError;
|
|
159
|
-
timestamp: Date;
|
|
160
|
-
}
|
|
161
|
-
interface MCPResourceContent {
|
|
162
|
-
type: 'resource';
|
|
163
|
-
resource: {
|
|
164
|
-
uri: string;
|
|
165
|
-
mimeType?: string;
|
|
166
|
-
text?: string;
|
|
167
|
-
blob?: string;
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
interface MCPPromptResult {
|
|
171
|
-
messages: Array<{
|
|
172
|
-
role: 'user' | 'assistant';
|
|
173
|
-
content: MCPContent;
|
|
174
|
-
}>;
|
|
175
|
-
}
|
|
176
|
-
interface MCPServerStatus {
|
|
177
|
-
running: boolean;
|
|
178
|
-
transport: string;
|
|
179
|
-
connectedClients: number;
|
|
180
|
-
toolsRegistered: number;
|
|
181
|
-
resourcesRegistered: number;
|
|
182
|
-
promptsRegistered: number;
|
|
183
|
-
requestsHandled: number;
|
|
184
|
-
errorsCount: number;
|
|
185
|
-
uptime: number;
|
|
186
|
-
}
|
|
187
|
-
type ToolHandler = (params: Record<string, unknown>) => Promise<MCPToolResult>;
|
|
188
|
-
interface ErrorSimulation {
|
|
189
|
-
onConnect?: string;
|
|
190
|
-
onDisconnect?: string;
|
|
191
|
-
onToolCall?: Record<string, string | MCPError>;
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Create a pre-configured mock MCP client with standard tools
|
|
195
|
-
*/
|
|
196
|
-
export declare function createStandardMockMCPClient(): MockMCPClient;
|
|
197
|
-
/**
|
|
198
|
-
* Create a mock MCP client that simulates failures
|
|
199
|
-
*/
|
|
200
|
-
export declare function createFailingMockMCPClient(errorConfig: ErrorSimulation): MockMCPClient;
|
|
201
|
-
/**
|
|
202
|
-
* Create a mock MCP client with latency
|
|
203
|
-
*/
|
|
204
|
-
export declare function createSlowMockMCPClient(latencyMs: number): MockMCPClient;
|
|
205
|
-
export {};
|
|
206
|
-
//# sourceMappingURL=mock-mcp-client.d.ts.map
|