@clinebot/core 0.0.20 → 0.0.21
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/dist/account/cline-account-service.d.ts +3 -2
- package/dist/account/cline-account-service.d.ts.map +1 -0
- package/dist/account/index.d.ts +1 -0
- package/dist/account/index.d.ts.map +1 -0
- package/dist/account/rpc.d.ts +1 -0
- package/dist/account/rpc.d.ts.map +1 -0
- package/dist/account/types.d.ts +1 -0
- package/dist/account/types.d.ts.map +1 -0
- package/dist/agents/agent-config-loader.d.ts +1 -0
- package/dist/agents/agent-config-loader.d.ts.map +1 -0
- package/dist/agents/agent-config-parser.d.ts +1 -0
- package/dist/agents/agent-config-parser.d.ts.map +1 -0
- package/dist/agents/hooks-config-loader.d.ts +1 -0
- package/dist/agents/hooks-config-loader.d.ts.map +1 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/plugin-config-loader.d.ts +1 -0
- package/dist/agents/plugin-config-loader.d.ts.map +1 -0
- package/dist/agents/plugin-loader.d.ts +1 -0
- package/dist/agents/plugin-loader.d.ts.map +1 -0
- package/dist/agents/plugin-sandbox.d.ts +1 -0
- package/dist/agents/plugin-sandbox.d.ts.map +1 -0
- package/dist/agents/unified-config-file-watcher.d.ts +1 -0
- package/dist/agents/unified-config-file-watcher.d.ts.map +1 -0
- package/dist/agents/user-instruction-config-loader.d.ts +1 -0
- package/dist/agents/user-instruction-config-loader.d.ts.map +1 -0
- package/dist/auth/client.d.ts +1 -0
- package/dist/auth/client.d.ts.map +1 -0
- package/dist/auth/cline.d.ts +1 -0
- package/dist/auth/cline.d.ts.map +1 -0
- package/dist/auth/codex.d.ts +1 -0
- package/dist/auth/codex.d.ts.map +1 -0
- package/dist/auth/oca.d.ts +1 -0
- package/dist/auth/oca.d.ts.map +1 -0
- package/dist/auth/server.d.ts +1 -0
- package/dist/auth/server.d.ts.map +1 -0
- package/dist/auth/types.d.ts +1 -0
- package/dist/auth/types.d.ts.map +1 -0
- package/dist/auth/utils.d.ts +1 -0
- package/dist/auth/utils.d.ts.map +1 -0
- package/dist/chat/chat-schema.d.ts +13 -12
- package/dist/chat/chat-schema.d.ts.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.node.d.ts +2 -0
- package/dist/index.node.d.ts.map +1 -0
- package/dist/index.node.js +303 -302
- package/dist/input/file-indexer.d.ts +1 -0
- package/dist/input/file-indexer.d.ts.map +1 -0
- package/dist/input/index.d.ts +1 -0
- package/dist/input/index.d.ts.map +1 -0
- package/dist/input/mention-enricher.d.ts +1 -0
- package/dist/input/mention-enricher.d.ts.map +1 -0
- package/dist/mcp/config-loader.d.ts +1 -0
- package/dist/mcp/config-loader.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/manager.d.ts +1 -0
- package/dist/mcp/manager.d.ts.map +1 -0
- package/dist/mcp/types.d.ts +1 -0
- package/dist/mcp/types.d.ts.map +1 -0
- package/dist/providers/local-provider-registry.d.ts +36 -0
- package/dist/providers/local-provider-registry.d.ts.map +1 -0
- package/dist/providers/local-provider-service.d.ts +2 -1
- package/dist/providers/local-provider-service.d.ts.map +1 -0
- package/dist/runtime/commands.d.ts +1 -0
- package/dist/runtime/commands.d.ts.map +1 -0
- package/dist/runtime/hook-file-hooks.d.ts +1 -0
- package/dist/runtime/hook-file-hooks.d.ts.map +1 -0
- package/dist/runtime/rules.d.ts +1 -0
- package/dist/runtime/rules.d.ts.map +1 -0
- package/dist/runtime/runtime-builder.d.ts +1 -0
- package/dist/runtime/runtime-builder.d.ts.map +1 -0
- package/dist/runtime/sandbox/subprocess-sandbox.d.ts +1 -0
- package/dist/runtime/sandbox/subprocess-sandbox.d.ts.map +1 -0
- package/dist/runtime/session-runtime.d.ts +2 -0
- package/dist/runtime/session-runtime.d.ts.map +1 -0
- package/dist/runtime/skills.d.ts +1 -0
- package/dist/runtime/skills.d.ts.map +1 -0
- package/dist/runtime/tool-approval.d.ts +1 -0
- package/dist/runtime/tool-approval.d.ts.map +1 -0
- package/dist/runtime/workflows.d.ts +1 -0
- package/dist/runtime/workflows.d.ts.map +1 -0
- package/dist/session/default-session-manager.d.ts +4 -0
- package/dist/session/default-session-manager.d.ts.map +1 -0
- package/dist/session/file-session-service.d.ts +1 -0
- package/dist/session/file-session-service.d.ts.map +1 -0
- package/dist/session/rpc-session-service.d.ts +1 -0
- package/dist/session/rpc-session-service.d.ts.map +1 -0
- package/dist/session/rpc-spawn-lease.d.ts +1 -0
- package/dist/session/rpc-spawn-lease.d.ts.map +1 -0
- package/dist/session/runtime-oauth-token-manager.d.ts +1 -0
- package/dist/session/runtime-oauth-token-manager.d.ts.map +1 -0
- package/dist/session/session-agent-events.d.ts +20 -1
- package/dist/session/session-agent-events.d.ts.map +1 -0
- package/dist/session/session-artifacts.d.ts +1 -0
- package/dist/session/session-artifacts.d.ts.map +1 -0
- package/dist/session/session-config-builder.d.ts +1 -0
- package/dist/session/session-config-builder.d.ts.map +1 -0
- package/dist/session/session-graph.d.ts +1 -0
- package/dist/session/session-graph.d.ts.map +1 -0
- package/dist/session/session-host.d.ts +1 -0
- package/dist/session/session-host.d.ts.map +1 -0
- package/dist/session/session-manager.d.ts +1 -0
- package/dist/session/session-manager.d.ts.map +1 -0
- package/dist/session/session-manifest.d.ts +2 -1
- package/dist/session/session-manifest.d.ts.map +1 -0
- package/dist/session/session-service.d.ts +1 -0
- package/dist/session/session-service.d.ts.map +1 -0
- package/dist/session/session-team-coordination.d.ts +1 -0
- package/dist/session/session-team-coordination.d.ts.map +1 -0
- package/dist/session/session-telemetry.d.ts +3 -1
- package/dist/session/session-telemetry.d.ts.map +1 -0
- package/dist/session/sqlite-rpc-session-backend.d.ts +1 -0
- package/dist/session/sqlite-rpc-session-backend.d.ts.map +1 -0
- package/dist/session/unified-session-persistence-service.d.ts +1 -0
- package/dist/session/unified-session-persistence-service.d.ts.map +1 -0
- package/dist/session/utils/helpers.d.ts +1 -0
- package/dist/session/utils/helpers.d.ts.map +1 -0
- package/dist/session/utils/types.d.ts +1 -0
- package/dist/session/utils/types.d.ts.map +1 -0
- package/dist/session/utils/usage.d.ts +1 -0
- package/dist/session/utils/usage.d.ts.map +1 -0
- package/dist/session/workspace-manager.d.ts +1 -0
- package/dist/session/workspace-manager.d.ts.map +1 -0
- package/dist/session/workspace-manifest.d.ts +1 -0
- package/dist/session/workspace-manifest.d.ts.map +1 -0
- package/dist/storage/file-team-store.d.ts +1 -0
- package/dist/storage/file-team-store.d.ts.map +1 -0
- package/dist/storage/provider-settings-legacy-migration.d.ts +1 -0
- package/dist/storage/provider-settings-legacy-migration.d.ts.map +1 -0
- package/dist/storage/provider-settings-manager.d.ts +1 -0
- package/dist/storage/provider-settings-manager.d.ts.map +1 -0
- package/dist/storage/sqlite-session-store.d.ts +1 -0
- package/dist/storage/sqlite-session-store.d.ts.map +1 -0
- package/dist/storage/sqlite-team-store.d.ts +1 -0
- package/dist/storage/sqlite-team-store.d.ts.map +1 -0
- package/dist/storage/team-store.d.ts +1 -0
- package/dist/storage/team-store.d.ts.map +1 -0
- package/dist/team/index.d.ts +1 -0
- package/dist/team/index.d.ts.map +1 -0
- package/dist/team/projections.d.ts +1 -0
- package/dist/team/projections.d.ts.map +1 -0
- package/dist/telemetry/ITelemetryAdapter.d.ts +1 -0
- package/dist/telemetry/ITelemetryAdapter.d.ts.map +1 -0
- package/dist/telemetry/LoggerTelemetryAdapter.d.ts +1 -0
- package/dist/telemetry/LoggerTelemetryAdapter.d.ts.map +1 -0
- package/dist/telemetry/OpenTelemetryAdapter.d.ts +1 -0
- package/dist/telemetry/OpenTelemetryAdapter.d.ts.map +1 -0
- package/dist/telemetry/OpenTelemetryProvider.d.ts +1 -0
- package/dist/telemetry/OpenTelemetryProvider.d.ts.map +1 -0
- package/dist/telemetry/TelemetryService.d.ts +1 -0
- package/dist/telemetry/TelemetryService.d.ts.map +1 -0
- package/dist/telemetry/core-events.d.ts +55 -22
- package/dist/telemetry/core-events.d.ts.map +1 -0
- package/dist/telemetry/opentelemetry.d.ts +1 -0
- package/dist/telemetry/opentelemetry.d.ts.map +1 -0
- package/dist/tools/constants.d.ts +1 -0
- package/dist/tools/constants.d.ts.map +1 -0
- package/dist/tools/definitions.d.ts +8 -1
- package/dist/tools/definitions.d.ts.map +1 -0
- package/dist/tools/executors/apply-patch-parser.d.ts +1 -0
- package/dist/tools/executors/apply-patch-parser.d.ts.map +1 -0
- package/dist/tools/executors/apply-patch.d.ts +1 -0
- package/dist/tools/executors/apply-patch.d.ts.map +1 -0
- package/dist/tools/executors/bash.d.ts +2 -1
- package/dist/tools/executors/bash.d.ts.map +1 -0
- package/dist/tools/executors/editor.d.ts +1 -0
- package/dist/tools/executors/editor.d.ts.map +1 -0
- package/dist/tools/executors/file-read.d.ts +1 -0
- package/dist/tools/executors/file-read.d.ts.map +1 -0
- package/dist/tools/executors/index.d.ts +14 -7
- package/dist/tools/executors/index.d.ts.map +1 -0
- package/dist/tools/executors/search.d.ts +1 -0
- package/dist/tools/executors/search.d.ts.map +1 -0
- package/dist/tools/executors/web-fetch.d.ts +1 -0
- package/dist/tools/executors/web-fetch.d.ts.map +1 -0
- package/dist/tools/helpers.d.ts +15 -0
- package/dist/tools/helpers.d.ts.map +1 -0
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/model-tool-routing.d.ts +1 -0
- package/dist/tools/model-tool-routing.d.ts.map +1 -0
- package/dist/tools/presets.d.ts +1 -0
- package/dist/tools/presets.d.ts.map +1 -0
- package/dist/tools/schemas.d.ts +41 -0
- package/dist/tools/schemas.d.ts.map +1 -0
- package/dist/tools/types.d.ts +3 -2
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/types/common.d.ts +1 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/events.d.ts +1 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/provider-settings.d.ts +1 -0
- package/dist/types/provider-settings.d.ts.map +1 -0
- package/dist/types/sessions.d.ts +1 -0
- package/dist/types/sessions.d.ts.map +1 -0
- package/dist/types/storage.d.ts +1 -0
- package/dist/types/storage.d.ts.map +1 -0
- package/dist/types/workspace.d.ts +1 -0
- package/dist/types/workspace.d.ts.map +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +6 -4
- package/src/account/cline-account-service.test.ts +0 -101
- package/src/account/cline-account-service.ts +0 -287
- package/src/account/index.ts +0 -22
- package/src/account/rpc.test.ts +0 -62
- package/src/account/rpc.ts +0 -172
- package/src/account/types.ts +0 -98
- package/src/agents/agent-config-loader.test.ts +0 -236
- package/src/agents/agent-config-loader.ts +0 -108
- package/src/agents/agent-config-parser.ts +0 -198
- package/src/agents/hooks-config-loader.test.ts +0 -20
- package/src/agents/hooks-config-loader.ts +0 -118
- package/src/agents/index.ts +0 -85
- package/src/agents/plugin-config-loader.test.ts +0 -140
- package/src/agents/plugin-config-loader.ts +0 -97
- package/src/agents/plugin-loader.test.ts +0 -228
- package/src/agents/plugin-loader.ts +0 -172
- package/src/agents/plugin-sandbox-bootstrap.ts +0 -445
- package/src/agents/plugin-sandbox.test.ts +0 -317
- package/src/agents/plugin-sandbox.ts +0 -341
- package/src/agents/unified-config-file-watcher.test.ts +0 -196
- package/src/agents/unified-config-file-watcher.ts +0 -483
- package/src/agents/user-instruction-config-loader.test.ts +0 -158
- package/src/agents/user-instruction-config-loader.ts +0 -438
- package/src/auth/client.test.ts +0 -40
- package/src/auth/client.ts +0 -25
- package/src/auth/cline.test.ts +0 -130
- package/src/auth/cline.ts +0 -420
- package/src/auth/codex.test.ts +0 -170
- package/src/auth/codex.ts +0 -491
- package/src/auth/oca.test.ts +0 -215
- package/src/auth/oca.ts +0 -573
- package/src/auth/server.ts +0 -216
- package/src/auth/types.ts +0 -81
- package/src/auth/utils.test.ts +0 -128
- package/src/auth/utils.ts +0 -247
- package/src/chat/chat-schema.ts +0 -82
- package/src/index.node.ts +0 -285
- package/src/index.ts +0 -211
- package/src/input/file-indexer.d.ts +0 -11
- package/src/input/file-indexer.test.ts +0 -127
- package/src/input/file-indexer.ts +0 -327
- package/src/input/index.ts +0 -7
- package/src/input/mention-enricher.test.ts +0 -85
- package/src/input/mention-enricher.ts +0 -122
- package/src/mcp/config-loader.test.ts +0 -238
- package/src/mcp/config-loader.ts +0 -219
- package/src/mcp/index.ts +0 -26
- package/src/mcp/manager.test.ts +0 -106
- package/src/mcp/manager.ts +0 -262
- package/src/mcp/types.ts +0 -88
- package/src/providers/local-provider-service.ts +0 -608
- package/src/runtime/commands.test.ts +0 -98
- package/src/runtime/commands.ts +0 -83
- package/src/runtime/hook-file-hooks.test.ts +0 -237
- package/src/runtime/hook-file-hooks.ts +0 -859
- package/src/runtime/index.ts +0 -37
- package/src/runtime/rules.ts +0 -34
- package/src/runtime/runtime-builder.team-persistence.test.ts +0 -202
- package/src/runtime/runtime-builder.test.ts +0 -371
- package/src/runtime/runtime-builder.ts +0 -589
- package/src/runtime/runtime-parity.test.ts +0 -143
- package/src/runtime/sandbox/subprocess-sandbox.ts +0 -231
- package/src/runtime/session-runtime.ts +0 -46
- package/src/runtime/skills.ts +0 -44
- package/src/runtime/tool-approval.ts +0 -104
- package/src/runtime/workflows.test.ts +0 -119
- package/src/runtime/workflows.ts +0 -45
- package/src/session/default-session-manager.e2e.test.ts +0 -384
- package/src/session/default-session-manager.test.ts +0 -1741
- package/src/session/default-session-manager.ts +0 -1233
- package/src/session/file-session-service.ts +0 -280
- package/src/session/index.ts +0 -42
- package/src/session/rpc-session-service.ts +0 -107
- package/src/session/rpc-spawn-lease.test.ts +0 -49
- package/src/session/rpc-spawn-lease.ts +0 -122
- package/src/session/runtime-oauth-token-manager.test.ts +0 -137
- package/src/session/runtime-oauth-token-manager.ts +0 -272
- package/src/session/session-agent-events.ts +0 -159
- package/src/session/session-artifacts.ts +0 -106
- package/src/session/session-config-builder.ts +0 -113
- package/src/session/session-graph.ts +0 -92
- package/src/session/session-host.test.ts +0 -29
- package/src/session/session-host.ts +0 -242
- package/src/session/session-manager.ts +0 -69
- package/src/session/session-manifest.ts +0 -29
- package/src/session/session-service.team-persistence.test.ts +0 -48
- package/src/session/session-service.ts +0 -673
- package/src/session/session-team-coordination.ts +0 -229
- package/src/session/session-telemetry.ts +0 -95
- package/src/session/sqlite-rpc-session-backend.ts +0 -303
- package/src/session/unified-session-persistence-service.test.ts +0 -85
- package/src/session/unified-session-persistence-service.ts +0 -996
- package/src/session/utils/helpers.ts +0 -139
- package/src/session/utils/types.ts +0 -57
- package/src/session/utils/usage.ts +0 -32
- package/src/session/workspace-manager.ts +0 -98
- package/src/session/workspace-manifest.ts +0 -100
- package/src/storage/artifact-store.ts +0 -1
- package/src/storage/file-team-store.ts +0 -257
- package/src/storage/index.ts +0 -11
- package/src/storage/provider-settings-legacy-migration.test.ts +0 -307
- package/src/storage/provider-settings-legacy-migration.ts +0 -689
- package/src/storage/provider-settings-manager.test.ts +0 -145
- package/src/storage/provider-settings-manager.ts +0 -150
- package/src/storage/session-store.ts +0 -1
- package/src/storage/sqlite-session-store.ts +0 -275
- package/src/storage/sqlite-team-store.ts +0 -454
- package/src/storage/team-store.ts +0 -40
- package/src/team/index.ts +0 -4
- package/src/team/projections.ts +0 -285
- package/src/telemetry/ITelemetryAdapter.ts +0 -94
- package/src/telemetry/LoggerTelemetryAdapter.test.ts +0 -42
- package/src/telemetry/LoggerTelemetryAdapter.ts +0 -114
- package/src/telemetry/OpenTelemetryAdapter.test.ts +0 -157
- package/src/telemetry/OpenTelemetryAdapter.ts +0 -348
- package/src/telemetry/OpenTelemetryProvider.test.ts +0 -113
- package/src/telemetry/OpenTelemetryProvider.ts +0 -322
- package/src/telemetry/TelemetryService.test.ts +0 -134
- package/src/telemetry/TelemetryService.ts +0 -141
- package/src/telemetry/core-events.ts +0 -344
- package/src/telemetry/opentelemetry.ts +0 -20
- package/src/tools/constants.ts +0 -35
- package/src/tools/definitions.test.ts +0 -658
- package/src/tools/definitions.ts +0 -726
- package/src/tools/executors/apply-patch-parser.ts +0 -520
- package/src/tools/executors/apply-patch.ts +0 -359
- package/src/tools/executors/bash.ts +0 -205
- package/src/tools/executors/editor.test.ts +0 -35
- package/src/tools/executors/editor.ts +0 -219
- package/src/tools/executors/file-read.test.ts +0 -49
- package/src/tools/executors/file-read.ts +0 -110
- package/src/tools/executors/index.ts +0 -75
- package/src/tools/executors/search.ts +0 -278
- package/src/tools/executors/web-fetch.ts +0 -259
- package/src/tools/index.ts +0 -168
- package/src/tools/model-tool-routing.test.ts +0 -86
- package/src/tools/model-tool-routing.ts +0 -132
- package/src/tools/presets.test.ts +0 -62
- package/src/tools/presets.ts +0 -168
- package/src/tools/schemas.ts +0 -284
- package/src/tools/types.ts +0 -328
- package/src/types/common.ts +0 -14
- package/src/types/config.ts +0 -84
- package/src/types/events.ts +0 -74
- package/src/types/index.ts +0 -24
- package/src/types/provider-settings.ts +0 -43
- package/src/types/sessions.ts +0 -16
- package/src/types/storage.ts +0 -64
- package/src/types/workspace.ts +0 -7
- package/src/types.ts +0 -128
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
2
|
-
import { tmpdir } from "node:os";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
5
|
-
import {
|
|
6
|
-
hasMcpSettingsFile,
|
|
7
|
-
loadMcpSettingsFile,
|
|
8
|
-
registerMcpServersFromSettingsFile,
|
|
9
|
-
resolveMcpServerRegistrations,
|
|
10
|
-
} from "./config-loader";
|
|
11
|
-
|
|
12
|
-
describe("mcp config loader", () => {
|
|
13
|
-
const tempRoots: string[] = [];
|
|
14
|
-
|
|
15
|
-
afterEach(async () => {
|
|
16
|
-
await Promise.all(
|
|
17
|
-
tempRoots.map((directory) =>
|
|
18
|
-
rm(directory, { recursive: true, force: true }),
|
|
19
|
-
),
|
|
20
|
-
);
|
|
21
|
-
tempRoots.length = 0;
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("loads and validates mcp server registrations from JSON", async () => {
|
|
25
|
-
const tempRoot = await mkdtemp(join(tmpdir(), "core-mcp-config-loader-"));
|
|
26
|
-
tempRoots.push(tempRoot);
|
|
27
|
-
const filePath = join(tempRoot, "cline_mcp_settings.json");
|
|
28
|
-
await writeFile(
|
|
29
|
-
filePath,
|
|
30
|
-
JSON.stringify(
|
|
31
|
-
{
|
|
32
|
-
mcpServers: {
|
|
33
|
-
docs: {
|
|
34
|
-
transport: {
|
|
35
|
-
type: "stdio",
|
|
36
|
-
command: "npx",
|
|
37
|
-
args: ["-y", "@modelcontextprotocol/server-filesystem"],
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
search: {
|
|
41
|
-
transport: {
|
|
42
|
-
type: "streamableHttp",
|
|
43
|
-
url: "https://mcp.example.com",
|
|
44
|
-
},
|
|
45
|
-
disabled: true,
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
null,
|
|
50
|
-
2,
|
|
51
|
-
),
|
|
52
|
-
"utf8",
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
expect(hasMcpSettingsFile({ filePath })).toBe(true);
|
|
56
|
-
expect(
|
|
57
|
-
loadMcpSettingsFile({ filePath }).mcpServers.docs.transport.type,
|
|
58
|
-
).toBe("stdio");
|
|
59
|
-
|
|
60
|
-
const registrations = resolveMcpServerRegistrations({ filePath });
|
|
61
|
-
expect(registrations).toEqual([
|
|
62
|
-
{
|
|
63
|
-
name: "docs",
|
|
64
|
-
transport: {
|
|
65
|
-
type: "stdio",
|
|
66
|
-
command: "npx",
|
|
67
|
-
args: ["-y", "@modelcontextprotocol/server-filesystem"],
|
|
68
|
-
},
|
|
69
|
-
disabled: undefined,
|
|
70
|
-
metadata: undefined,
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
name: "search",
|
|
74
|
-
transport: {
|
|
75
|
-
type: "streamableHttp",
|
|
76
|
-
url: "https://mcp.example.com",
|
|
77
|
-
},
|
|
78
|
-
disabled: true,
|
|
79
|
-
metadata: undefined,
|
|
80
|
-
},
|
|
81
|
-
]);
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
it("registers loaded servers with an mcp manager", async () => {
|
|
85
|
-
const tempRoot = await mkdtemp(join(tmpdir(), "core-mcp-config-loader-"));
|
|
86
|
-
tempRoots.push(tempRoot);
|
|
87
|
-
const filePath = join(tempRoot, "cline_mcp_settings.json");
|
|
88
|
-
await writeFile(
|
|
89
|
-
filePath,
|
|
90
|
-
JSON.stringify(
|
|
91
|
-
{
|
|
92
|
-
mcpServers: {
|
|
93
|
-
docs: {
|
|
94
|
-
transport: {
|
|
95
|
-
type: "stdio",
|
|
96
|
-
command: "node",
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
null,
|
|
102
|
-
2,
|
|
103
|
-
),
|
|
104
|
-
"utf8",
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
const registered: Array<{ name: string }> = [];
|
|
108
|
-
const manager = {
|
|
109
|
-
registerServer: async (registration: { name: string }) => {
|
|
110
|
-
registered.push(registration);
|
|
111
|
-
},
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
await registerMcpServersFromSettingsFile(manager, { filePath });
|
|
115
|
-
expect(registered).toEqual([
|
|
116
|
-
{
|
|
117
|
-
name: "docs",
|
|
118
|
-
transport: {
|
|
119
|
-
type: "stdio",
|
|
120
|
-
command: "node",
|
|
121
|
-
},
|
|
122
|
-
disabled: undefined,
|
|
123
|
-
metadata: undefined,
|
|
124
|
-
},
|
|
125
|
-
]);
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
it("throws a clear error for invalid config", async () => {
|
|
129
|
-
const tempRoot = await mkdtemp(join(tmpdir(), "core-mcp-config-loader-"));
|
|
130
|
-
tempRoots.push(tempRoot);
|
|
131
|
-
const filePath = join(tempRoot, "cline_mcp_settings.json");
|
|
132
|
-
await writeFile(
|
|
133
|
-
filePath,
|
|
134
|
-
JSON.stringify(
|
|
135
|
-
{
|
|
136
|
-
mcpServers: {
|
|
137
|
-
broken: {
|
|
138
|
-
transport: {
|
|
139
|
-
type: "stdio",
|
|
140
|
-
command: "",
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
null,
|
|
146
|
-
2,
|
|
147
|
-
),
|
|
148
|
-
"utf8",
|
|
149
|
-
);
|
|
150
|
-
|
|
151
|
-
expect(() => resolveMcpServerRegistrations({ filePath })).toThrow(
|
|
152
|
-
"Invalid MCP settings",
|
|
153
|
-
);
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
it("accepts legacy flat stdio format", async () => {
|
|
157
|
-
const tempRoot = await mkdtemp(join(tmpdir(), "core-mcp-config-loader-"));
|
|
158
|
-
tempRoots.push(tempRoot);
|
|
159
|
-
const filePath = join(tempRoot, "cline_mcp_settings.json");
|
|
160
|
-
await writeFile(
|
|
161
|
-
filePath,
|
|
162
|
-
JSON.stringify(
|
|
163
|
-
{
|
|
164
|
-
mcpServers: {
|
|
165
|
-
docs: {
|
|
166
|
-
command: "node",
|
|
167
|
-
args: ["server.js"],
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
null,
|
|
172
|
-
2,
|
|
173
|
-
),
|
|
174
|
-
"utf8",
|
|
175
|
-
);
|
|
176
|
-
|
|
177
|
-
const registrations = resolveMcpServerRegistrations({ filePath });
|
|
178
|
-
expect(registrations).toEqual([
|
|
179
|
-
{
|
|
180
|
-
name: "docs",
|
|
181
|
-
transport: {
|
|
182
|
-
type: "stdio",
|
|
183
|
-
command: "node",
|
|
184
|
-
args: ["server.js"],
|
|
185
|
-
},
|
|
186
|
-
disabled: undefined,
|
|
187
|
-
metadata: undefined,
|
|
188
|
-
},
|
|
189
|
-
]);
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
it("accepts legacy flat url format and preserves explicit transportType", async () => {
|
|
193
|
-
const tempRoot = await mkdtemp(join(tmpdir(), "core-mcp-config-loader-"));
|
|
194
|
-
tempRoots.push(tempRoot);
|
|
195
|
-
const filePath = join(tempRoot, "cline_mcp_settings.json");
|
|
196
|
-
await writeFile(
|
|
197
|
-
filePath,
|
|
198
|
-
JSON.stringify(
|
|
199
|
-
{
|
|
200
|
-
mcpServers: {
|
|
201
|
-
legacySse: {
|
|
202
|
-
url: "https://sse.example.com",
|
|
203
|
-
},
|
|
204
|
-
legacyHttp: {
|
|
205
|
-
url: "https://http.example.com",
|
|
206
|
-
transportType: "http",
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
null,
|
|
211
|
-
2,
|
|
212
|
-
),
|
|
213
|
-
"utf8",
|
|
214
|
-
);
|
|
215
|
-
|
|
216
|
-
const registrations = resolveMcpServerRegistrations({ filePath });
|
|
217
|
-
expect(registrations).toEqual([
|
|
218
|
-
{
|
|
219
|
-
name: "legacySse",
|
|
220
|
-
transport: {
|
|
221
|
-
type: "sse",
|
|
222
|
-
url: "https://sse.example.com",
|
|
223
|
-
},
|
|
224
|
-
disabled: undefined,
|
|
225
|
-
metadata: undefined,
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
name: "legacyHttp",
|
|
229
|
-
transport: {
|
|
230
|
-
type: "streamableHttp",
|
|
231
|
-
url: "https://http.example.com",
|
|
232
|
-
},
|
|
233
|
-
disabled: undefined,
|
|
234
|
-
metadata: undefined,
|
|
235
|
-
},
|
|
236
|
-
]);
|
|
237
|
-
});
|
|
238
|
-
});
|
package/src/mcp/config-loader.ts
DELETED
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
-
import { resolveMcpSettingsPath } from "@clinebot/shared/storage";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
import type { McpManager, McpServerRegistration } from "./types";
|
|
5
|
-
|
|
6
|
-
const stringRecordSchema = z.record(z.string(), z.string());
|
|
7
|
-
const metadataSchema = z.record(z.string(), z.unknown());
|
|
8
|
-
|
|
9
|
-
const stdioTransportSchema = z.object({
|
|
10
|
-
type: z.literal("stdio"),
|
|
11
|
-
command: z.string().min(1),
|
|
12
|
-
args: z.array(z.string()).optional(),
|
|
13
|
-
cwd: z.string().min(1).optional(),
|
|
14
|
-
env: stringRecordSchema.optional(),
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const sseTransportSchema = z.object({
|
|
18
|
-
type: z.literal("sse"),
|
|
19
|
-
url: z.string().url(),
|
|
20
|
-
headers: stringRecordSchema.optional(),
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const streamableHttpTransportSchema = z.object({
|
|
24
|
-
type: z.literal("streamableHttp"),
|
|
25
|
-
url: z.string().url(),
|
|
26
|
-
headers: stringRecordSchema.optional(),
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
const mcpTransportSchema = z.discriminatedUnion("type", [
|
|
30
|
-
stdioTransportSchema,
|
|
31
|
-
sseTransportSchema,
|
|
32
|
-
streamableHttpTransportSchema,
|
|
33
|
-
]);
|
|
34
|
-
|
|
35
|
-
const nestedRegistrationBodySchema = z.object({
|
|
36
|
-
transport: mcpTransportSchema,
|
|
37
|
-
disabled: z.boolean().optional(),
|
|
38
|
-
metadata: metadataSchema.optional(),
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
const legacyTransportTypeSchema = z
|
|
42
|
-
.enum(["stdio", "sse", "http", "streamableHttp"])
|
|
43
|
-
.optional();
|
|
44
|
-
|
|
45
|
-
const legacyRegistrationBaseSchema = z.object({
|
|
46
|
-
type: z.enum(["stdio", "sse", "streamableHttp"]).optional(),
|
|
47
|
-
transportType: legacyTransportTypeSchema,
|
|
48
|
-
disabled: z.boolean().optional(),
|
|
49
|
-
metadata: metadataSchema.optional(),
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
function mapLegacyTransportType(
|
|
53
|
-
transportType: z.infer<typeof legacyTransportTypeSchema>,
|
|
54
|
-
): "stdio" | "sse" | "streamableHttp" | undefined {
|
|
55
|
-
if (!transportType) {
|
|
56
|
-
return undefined;
|
|
57
|
-
}
|
|
58
|
-
if (transportType === "http") {
|
|
59
|
-
return "streamableHttp";
|
|
60
|
-
}
|
|
61
|
-
return transportType;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const legacyStdioRegistrationSchema = legacyRegistrationBaseSchema
|
|
65
|
-
.extend({
|
|
66
|
-
command: z.string().min(1),
|
|
67
|
-
args: z.array(z.string()).optional(),
|
|
68
|
-
cwd: z.string().min(1).optional(),
|
|
69
|
-
env: stringRecordSchema.optional(),
|
|
70
|
-
})
|
|
71
|
-
.superRefine((value, ctx) => {
|
|
72
|
-
const resolvedType =
|
|
73
|
-
value.type ?? mapLegacyTransportType(value.transportType);
|
|
74
|
-
if (resolvedType && resolvedType !== "stdio") {
|
|
75
|
-
ctx.addIssue({
|
|
76
|
-
code: z.ZodIssueCode.custom,
|
|
77
|
-
message: 'Expected type "stdio" for command-based MCP server',
|
|
78
|
-
path: ["type"],
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
})
|
|
82
|
-
.transform((value) => ({
|
|
83
|
-
transport: {
|
|
84
|
-
type: "stdio" as const,
|
|
85
|
-
command: value.command,
|
|
86
|
-
args: value.args,
|
|
87
|
-
cwd: value.cwd,
|
|
88
|
-
env: value.env,
|
|
89
|
-
},
|
|
90
|
-
disabled: value.disabled,
|
|
91
|
-
metadata: value.metadata,
|
|
92
|
-
}));
|
|
93
|
-
|
|
94
|
-
const legacyUrlRegistrationSchema = legacyRegistrationBaseSchema
|
|
95
|
-
.extend({
|
|
96
|
-
url: z.string().url(),
|
|
97
|
-
headers: stringRecordSchema.optional(),
|
|
98
|
-
})
|
|
99
|
-
.superRefine((value, ctx) => {
|
|
100
|
-
const resolvedType =
|
|
101
|
-
value.type ?? mapLegacyTransportType(value.transportType) ?? "sse";
|
|
102
|
-
if (resolvedType !== "sse" && resolvedType !== "streamableHttp") {
|
|
103
|
-
ctx.addIssue({
|
|
104
|
-
code: z.ZodIssueCode.custom,
|
|
105
|
-
message:
|
|
106
|
-
'Expected type "sse" or "streamableHttp" for URL-based MCP server',
|
|
107
|
-
path: ["type"],
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
})
|
|
111
|
-
.transform((value) => {
|
|
112
|
-
const resolvedType =
|
|
113
|
-
value.type ?? mapLegacyTransportType(value.transportType) ?? "sse";
|
|
114
|
-
if (resolvedType === "streamableHttp") {
|
|
115
|
-
return {
|
|
116
|
-
transport: {
|
|
117
|
-
type: "streamableHttp" as const,
|
|
118
|
-
url: value.url,
|
|
119
|
-
headers: value.headers,
|
|
120
|
-
},
|
|
121
|
-
disabled: value.disabled,
|
|
122
|
-
metadata: value.metadata,
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
return {
|
|
126
|
-
transport: {
|
|
127
|
-
type: "sse" as const,
|
|
128
|
-
url: value.url,
|
|
129
|
-
headers: value.headers,
|
|
130
|
-
},
|
|
131
|
-
disabled: value.disabled,
|
|
132
|
-
metadata: value.metadata,
|
|
133
|
-
};
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
const mcpRegistrationBodySchema = z.union([
|
|
137
|
-
nestedRegistrationBodySchema,
|
|
138
|
-
legacyStdioRegistrationSchema,
|
|
139
|
-
legacyUrlRegistrationSchema,
|
|
140
|
-
]);
|
|
141
|
-
|
|
142
|
-
const mcpSettingsSchema = z
|
|
143
|
-
.object({
|
|
144
|
-
mcpServers: z.record(z.string(), mcpRegistrationBodySchema),
|
|
145
|
-
})
|
|
146
|
-
.strict();
|
|
147
|
-
|
|
148
|
-
export interface McpSettingsFile {
|
|
149
|
-
mcpServers: Record<string, Omit<McpServerRegistration, "name">>;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export interface LoadMcpSettingsOptions {
|
|
153
|
-
filePath?: string;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export interface RegisterMcpServersFromSettingsOptions {
|
|
157
|
-
filePath?: string;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export function resolveDefaultMcpSettingsPath(): string {
|
|
161
|
-
return resolveMcpSettingsPath();
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export function loadMcpSettingsFile(
|
|
165
|
-
options: LoadMcpSettingsOptions = {},
|
|
166
|
-
): McpSettingsFile {
|
|
167
|
-
const filePath = options.filePath ?? resolveDefaultMcpSettingsPath();
|
|
168
|
-
const raw = readFileSync(filePath, "utf8");
|
|
169
|
-
let parsed: unknown;
|
|
170
|
-
try {
|
|
171
|
-
parsed = JSON.parse(raw);
|
|
172
|
-
} catch (error) {
|
|
173
|
-
const details = error instanceof Error ? error.message : String(error);
|
|
174
|
-
throw new Error(
|
|
175
|
-
`Failed to parse MCP settings JSON at "${filePath}": ${details}`,
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
const result = mcpSettingsSchema.safeParse(parsed);
|
|
179
|
-
if (!result.success) {
|
|
180
|
-
const details = result.error.issues
|
|
181
|
-
.map((issue) => {
|
|
182
|
-
const path = issue.path.join(".");
|
|
183
|
-
return path ? `${path}: ${issue.message}` : issue.message;
|
|
184
|
-
})
|
|
185
|
-
.join("; ");
|
|
186
|
-
throw new Error(`Invalid MCP settings at "${filePath}": ${details}`);
|
|
187
|
-
}
|
|
188
|
-
return result.data;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export function hasMcpSettingsFile(
|
|
192
|
-
options: LoadMcpSettingsOptions = {},
|
|
193
|
-
): boolean {
|
|
194
|
-
const filePath = options.filePath ?? resolveDefaultMcpSettingsPath();
|
|
195
|
-
return existsSync(filePath);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
export function resolveMcpServerRegistrations(
|
|
199
|
-
options: LoadMcpSettingsOptions = {},
|
|
200
|
-
): McpServerRegistration[] {
|
|
201
|
-
const config = loadMcpSettingsFile(options);
|
|
202
|
-
return Object.entries(config.mcpServers).map(([name, value]) => ({
|
|
203
|
-
name,
|
|
204
|
-
transport: value.transport,
|
|
205
|
-
disabled: value.disabled,
|
|
206
|
-
metadata: value.metadata,
|
|
207
|
-
}));
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
export async function registerMcpServersFromSettingsFile(
|
|
211
|
-
manager: Pick<McpManager, "registerServer">,
|
|
212
|
-
options: RegisterMcpServersFromSettingsOptions = {},
|
|
213
|
-
): Promise<McpServerRegistration[]> {
|
|
214
|
-
const registrations = resolveMcpServerRegistrations(options);
|
|
215
|
-
for (const registration of registrations) {
|
|
216
|
-
await manager.registerServer(registration);
|
|
217
|
-
}
|
|
218
|
-
return registrations;
|
|
219
|
-
}
|
package/src/mcp/index.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
LoadMcpSettingsOptions,
|
|
3
|
-
McpSettingsFile,
|
|
4
|
-
RegisterMcpServersFromSettingsOptions,
|
|
5
|
-
} from "./config-loader";
|
|
6
|
-
export {
|
|
7
|
-
hasMcpSettingsFile,
|
|
8
|
-
loadMcpSettingsFile,
|
|
9
|
-
registerMcpServersFromSettingsFile,
|
|
10
|
-
resolveDefaultMcpSettingsPath,
|
|
11
|
-
resolveMcpServerRegistrations,
|
|
12
|
-
} from "./config-loader";
|
|
13
|
-
export { InMemoryMcpManager } from "./manager";
|
|
14
|
-
export type {
|
|
15
|
-
McpConnectionStatus,
|
|
16
|
-
McpManager,
|
|
17
|
-
McpManagerOptions,
|
|
18
|
-
McpServerClient,
|
|
19
|
-
McpServerClientFactory,
|
|
20
|
-
McpServerRegistration,
|
|
21
|
-
McpServerSnapshot,
|
|
22
|
-
McpServerTransportConfig,
|
|
23
|
-
McpSseTransportConfig,
|
|
24
|
-
McpStdioTransportConfig,
|
|
25
|
-
McpStreamableHttpTransportConfig,
|
|
26
|
-
} from "./types";
|
package/src/mcp/manager.test.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import type { McpToolDescriptor } from "@clinebot/agents";
|
|
2
|
-
import { describe, expect, it, vi } from "vitest";
|
|
3
|
-
import { InMemoryMcpManager } from "./manager";
|
|
4
|
-
import type { McpServerClient } from "./types";
|
|
5
|
-
|
|
6
|
-
function createClient(overrides?: Partial<McpServerClient>): McpServerClient {
|
|
7
|
-
return {
|
|
8
|
-
connect: vi.fn(async () => {}),
|
|
9
|
-
disconnect: vi.fn(async () => {}),
|
|
10
|
-
listTools: vi.fn(async () => []),
|
|
11
|
-
callTool: vi.fn(async () => ({ ok: true })),
|
|
12
|
-
...overrides,
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
describe("InMemoryMcpManager", () => {
|
|
17
|
-
it("registers servers, connects on demand, and calls tools", async () => {
|
|
18
|
-
const toolDescriptors: readonly McpToolDescriptor[] = [
|
|
19
|
-
{
|
|
20
|
-
name: "search",
|
|
21
|
-
inputSchema: {
|
|
22
|
-
type: "object",
|
|
23
|
-
properties: { q: { type: "string" } },
|
|
24
|
-
required: ["q"],
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
];
|
|
28
|
-
const client = createClient({
|
|
29
|
-
listTools: vi.fn(async () => toolDescriptors),
|
|
30
|
-
});
|
|
31
|
-
const manager = new InMemoryMcpManager({
|
|
32
|
-
clientFactory: vi.fn(async () => client),
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
await manager.registerServer({
|
|
36
|
-
name: "docs",
|
|
37
|
-
transport: {
|
|
38
|
-
type: "streamableHttp",
|
|
39
|
-
url: "https://mcp.example.test",
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
const tools = await manager.listTools("docs");
|
|
44
|
-
expect(tools).toHaveLength(1);
|
|
45
|
-
|
|
46
|
-
await manager.callTool({
|
|
47
|
-
serverName: "docs",
|
|
48
|
-
toolName: "search",
|
|
49
|
-
arguments: { q: "oauth flow" },
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
expect(client.connect).toHaveBeenCalledTimes(1);
|
|
53
|
-
expect(client.callTool).toHaveBeenCalledWith({
|
|
54
|
-
name: "search",
|
|
55
|
-
arguments: { q: "oauth flow" },
|
|
56
|
-
context: undefined,
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
it("uses tool list cache to avoid repeated listTools round trips", async () => {
|
|
61
|
-
const toolDescriptors: readonly McpToolDescriptor[] = [
|
|
62
|
-
{
|
|
63
|
-
name: "echo",
|
|
64
|
-
inputSchema: { type: "object", properties: {} },
|
|
65
|
-
},
|
|
66
|
-
];
|
|
67
|
-
const client = createClient({
|
|
68
|
-
listTools: vi.fn(async () => toolDescriptors),
|
|
69
|
-
});
|
|
70
|
-
const manager = new InMemoryMcpManager({
|
|
71
|
-
clientFactory: async () => client,
|
|
72
|
-
toolsCacheTtlMs: 60_000,
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
await manager.registerServer({
|
|
76
|
-
name: "cache-test",
|
|
77
|
-
transport: {
|
|
78
|
-
type: "stdio",
|
|
79
|
-
command: "node",
|
|
80
|
-
args: ["./mcp.js"],
|
|
81
|
-
},
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
await manager.listTools("cache-test");
|
|
85
|
-
await manager.listTools("cache-test");
|
|
86
|
-
expect(client.listTools).toHaveBeenCalledTimes(1);
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
it("prevents tool calls on disabled servers", async () => {
|
|
90
|
-
const manager = new InMemoryMcpManager({
|
|
91
|
-
clientFactory: async () => createClient(),
|
|
92
|
-
});
|
|
93
|
-
await manager.registerServer({
|
|
94
|
-
name: "disabled",
|
|
95
|
-
transport: { type: "sse", url: "https://example.test/sse" },
|
|
96
|
-
disabled: true,
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
await expect(
|
|
100
|
-
manager.callTool({
|
|
101
|
-
serverName: "disabled",
|
|
102
|
-
toolName: "anything",
|
|
103
|
-
}),
|
|
104
|
-
).rejects.toThrow(/disabled/i);
|
|
105
|
-
});
|
|
106
|
-
});
|