import { IStringDictionary } from "../../../base/common/collections.js"; import { Disposable } from "../../../base/common/lifecycle.js"; import { Mutable } from "../../../base/common/types.js"; import { URI } from "../../../base/common/uri.js"; import { ConfigurationTarget } from "../../configuration/common/configuration.js"; import { IFileService } from "../../files/common/files.service.js"; import { IUriIdentityService } from "../../uriIdentity/common/uriIdentity.service.js"; import { IInstallableMcpServer } from "./mcpManagement.js"; import { IMcpSandboxConfiguration, IMcpServerConfiguration, IMcpServerVariable } from "./mcpPlatformTypes.js"; import { McpResourceFormat } from "./mcpWorkspaceConfiguration.js"; import { IMcpResourceScannerService } from "./mcpResourceScannerService.service.js"; export interface IScannedMcpServers { servers?: IStringDictionary>; inputs?: IMcpServerVariable[]; sandbox?: IMcpSandboxConfiguration; } export type McpResourceTarget = ConfigurationTarget.USER | ConfigurationTarget.WORKSPACE | ConfigurationTarget.WORKSPACE_FOLDER; export declare class McpResourceScannerService extends Disposable implements IMcpResourceScannerService { private readonly fileService; protected readonly uriIdentityService: IUriIdentityService; readonly _serviceBrand: undefined; private readonly resourcesAccessQueueMap; constructor(fileService: IFileService, uriIdentityService: IUriIdentityService); scanMcpServers(mcpResource: URI, target?: McpResourceTarget, format?: McpResourceFormat): Promise; addMcpServers(servers: IInstallableMcpServer[], mcpResource: URI, target?: McpResourceTarget, format?: McpResourceFormat): Promise; updateMcpServer(name: string, previous: IMcpServerConfiguration, config: IMcpServerConfiguration, mcpResource: URI, target?: McpResourceTarget, format?: McpResourceFormat): Promise; updateSandboxConfig(updateFn: (data: IScannedMcpServers) => IScannedMcpServers, mcpResource: URI, target?: McpResourceTarget, format?: McpResourceFormat): Promise; removeMcpServers(serverNames: string[], mcpResource: URI, target?: McpResourceTarget, format?: McpResourceFormat, preserveInputIds?: readonly string[]): Promise; private withWorkspaceRootMcpServers; private withCopilotGlobalMcpServers; private withSharedMcpServersFile; private editWorkspaceRootMcpServer; private editJsonProperty; private withProfileMcpServers; private writeScannedMcpServers; private writeScannedMcpServersToWorkspaceFolder; private writeScannedMcpServersToWorkspace; private fromUserMcpServers; private fromWorkspaceFolderMcpServers; private sanitizeServer; private getResourceAccessQueue; } export declare function collectMcpInputIds(value: unknown, result: Set): void; /** * The part of {@link config} that an update to {@link previous} has to validate: the changed * properties plus `type`, `command` and `url`, which define the server. Unchanged properties, and * unchanged entries of changed `env`, `headers` and `args` values, stay as they are in the file, so * values that a shared format does not support, such as `cwd` in `.mcp.json`, do not block edits * to other properties. */ export declare function getEditedMcpServerConfiguration(previous: IMcpServerConfiguration, config: IMcpServerConfiguration): IMcpServerConfiguration;