import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation"; import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { IObservable, IReader, ITransaction } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service"; import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service"; import { ContributionEnablementState, EnablementModel, IEnablementModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/enablement"; import { McpCollisionBehavior } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpConfiguration"; import { IMcpRegistry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpRegistryTypes.service"; import { McpServerMetadataCache } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpServer"; import { IAutostartResult, IMcpServer, McpCollectionDefinition } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes"; import { IMcpService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service"; export declare class McpService extends Disposable implements IMcpService { private readonly _instantiationService; private readonly _mcpRegistry; private readonly _logService; private readonly configurationService; _serviceBrand: undefined; private readonly _currentAutoStarts; private readonly _servers; readonly servers: IObservable; get lazyCollectionState(): IObservable<{ state: import("@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes").LazyCollectionState; collections: McpCollectionDefinition[]; }>; readonly enablementModel: McpCollisionEnablementModel; protected readonly userCache: McpServerMetadataCache; protected readonly workspaceCache: McpServerMetadataCache; constructor(_instantiationService: IInstantiationService, _mcpRegistry: IMcpRegistry, _logService: ILogService, configurationService: IConfigurationService, storageService: IStorageService); cancelAutostart(): void; autostart(_token?: CancellationToken): IObservable; private _autostart; resetCaches(): void; resetTrust(): void; activateCollections(): Promise; private _activateCollections; updateCollectedServers(): void; dispose(): void; } /** * Wraps an {@link EnablementModel} with collision-aware defaults and * mutual-exclusion logic for MCP servers with the same label. * * When collision behavior is `disable`: * - Servers whose label collides with a higher-priority server are disabled * by default (unless the user has explicitly toggled them). * - Enabling a colliding server disables all other servers with the same label. * * When collision behavior is `suffix`, delegates everything unchanged. */ export declare class McpCollisionEnablementModel implements IEnablementModel { private readonly _base; /** * For each server definition ID, the list of all definition IDs that share * the same (case-insensitive) label, in priority order (lowest collection * order first). Empty when collision behavior is `suffix`. */ private readonly _collisionGroups; constructor(_base: EnablementModel, registry: IMcpRegistry, collisionBehavior: IObservable); readEnabled(key: string, reader?: IReader): ContributionEnablementState; setEnabled(key: string, state: ContributionEnablementState, tx?: ITransaction): void; remove(key: string): void; }