import { Emitter, Event } from "../../../base/common/event.js"; import { IMarkdownString } from "../../../base/common/htmlContent.js"; import { Disposable } from "../../../base/common/lifecycle.js"; import { URI } from "../../../base/common/uri.js"; import { IEnvironmentService } from "../../environment/common/environment.service.js"; import { IFileService } from "../../files/common/files.service.js"; import { IInstantiationService } from "../../instantiation/common/instantiation.js"; import { ILogService } from "../../log/common/log.service.js"; import { IUriIdentityService } from "../../uriIdentity/common/uriIdentity.service.js"; import { IUserDataProfilesService } from "../../userDataProfile/common/userDataProfile.service.js"; import { DidUninstallMcpServerEvent, IGalleryMcpServer, ILocalMcpServer, IMcpServerInput, IGalleryMcpServerConfiguration, InstallMcpServerEvent, InstallMcpServerResult, RegistryType, UninstallMcpServerEvent, InstallOptions, UninstallOptions, IInstallableMcpServer, McpServerConfigurationParseResult } from "./mcpManagement.js"; import { IAllowedMcpServersService } from "./mcpManagement.service.js"; import { IMcpManagementService } from "./mcpManagement.service.js"; import { IMcpGalleryService } from "./mcpManagement.service.js"; import { IMcpSandboxConfiguration, IMcpServerVariable, IMcpServerConfiguration } from "./mcpPlatformTypes.js"; import { McpResourceTarget } from "@codingame/monaco-vscode-mcp-service-override/vscode/vs/platform/mcp/common/mcpResourceScannerService"; import { IMcpResourceScannerService } from "./mcpResourceScannerService.service.js"; export interface ILocalMcpServerInfo { name: string; version?: string; displayName?: string; galleryId?: string; galleryUrl?: string; description?: string; repositoryUrl?: string; publisher?: string; publisherDisplayName?: string; icon?: { dark: string; light: string; }; codicon?: string; manifest?: IGalleryMcpServerConfiguration; readmeUrl?: URI; location?: URI; licenseUrl?: string; } export declare abstract class AbstractCommonMcpManagementService extends Disposable implements IMcpManagementService { protected readonly logService: ILogService; _serviceBrand: undefined; abstract onInstallMcpServer: Event; abstract onDidInstallMcpServers: Event; abstract onDidUpdateMcpServers: Event; abstract onUninstallMcpServer: Event; abstract onDidUninstallMcpServer: Event; abstract getInstalled(mcpResource?: URI): Promise; abstract install(server: IInstallableMcpServer, options?: InstallOptions): Promise; abstract installFromGallery(server: IGalleryMcpServer, options?: InstallOptions): Promise; abstract updateMetadata(local: ILocalMcpServer, server: IGalleryMcpServer, profileLocation?: URI): Promise; abstract uninstall(server: ILocalMcpServer, options?: UninstallOptions): Promise; abstract canInstall(server: IGalleryMcpServer | IInstallableMcpServer): true | IMarkdownString; constructor(logService: ILogService); getMcpServerConfigurationFromManifest(manifest: IGalleryMcpServerConfiguration, packageType: RegistryType): McpServerConfigurationParseResult; protected getCommandName(packageType: RegistryType): string; protected getVariables(variableInputs: Record): IMcpServerVariable[]; private processKeyValueInputs; private processArguments; } export declare abstract class AbstractMcpResourceManagementService extends AbstractCommonMcpManagementService { protected readonly mcpResource: URI; protected readonly target: McpResourceTarget; protected readonly mcpGalleryService: IMcpGalleryService; protected readonly fileService: IFileService; protected readonly uriIdentityService: IUriIdentityService; protected readonly mcpResourceScannerService: IMcpResourceScannerService; private initializePromise; private readonly reloadConfigurationScheduler; private local; protected readonly _onInstallMcpServer: Emitter; readonly onInstallMcpServer: Event; protected readonly _onDidInstallMcpServers: Emitter; get onDidInstallMcpServers(): Event; protected readonly _onDidUpdateMcpServers: Emitter; get onDidUpdateMcpServers(): Event; protected readonly _onUninstallMcpServer: Emitter; get onUninstallMcpServer(): Event; protected _onDidUninstallMcpServer: Emitter; get onDidUninstallMcpServer(): Event; constructor(mcpResource: URI, target: McpResourceTarget, mcpGalleryService: IMcpGalleryService, fileService: IFileService, uriIdentityService: IUriIdentityService, logService: ILogService, mcpResourceScannerService: IMcpResourceScannerService); private initialize; private populateLocalServers; private startWatching; protected updateLocal(): Promise; getInstalled(): Promise; protected scanLocalServer(name: string, config: IMcpServerConfiguration, rootSandbox?: IMcpSandboxConfiguration): Promise; install(server: IInstallableMcpServer, options?: Omit): Promise; uninstall(server: ILocalMcpServer, options?: Omit): Promise; protected abstract getLocalServerInfo(name: string, mcpServerConfig: IMcpServerConfiguration): Promise; protected abstract installFromUri(uri: URI, options?: Omit): Promise; } export declare class McpUserResourceManagementService extends AbstractMcpResourceManagementService { protected readonly mcpLocation: URI; constructor(mcpResource: URI, mcpGalleryService: IMcpGalleryService, fileService: IFileService, uriIdentityService: IUriIdentityService, logService: ILogService, mcpResourceScannerService: IMcpResourceScannerService, environmentService: IEnvironmentService); installFromGallery(server: IGalleryMcpServer, options?: InstallOptions): Promise; updateMetadata(local: ILocalMcpServer, gallery: IGalleryMcpServer): Promise; protected updateMetadataFromGallery(gallery: IGalleryMcpServer): Promise; protected getLocalServerInfo(name: string, mcpServerConfig: IMcpServerConfiguration): Promise; protected getLocation(name: string, version?: string): URI; protected installFromUri(uri: URI, options?: Omit): Promise; canInstall(): true | IMarkdownString; } export declare abstract class AbstractMcpManagementService extends AbstractCommonMcpManagementService implements IMcpManagementService { protected readonly allowedMcpServersService: IAllowedMcpServersService; constructor(allowedMcpServersService: IAllowedMcpServersService, logService: ILogService); canInstall(server: IGalleryMcpServer | IInstallableMcpServer): true | IMarkdownString; } export declare class McpManagementService extends AbstractMcpManagementService implements IMcpManagementService { private readonly userDataProfilesService; protected readonly instantiationService: IInstantiationService; private readonly _onInstallMcpServer; readonly onInstallMcpServer: Event; private readonly _onDidInstallMcpServers; readonly onDidInstallMcpServers: Event; private readonly _onDidUpdateMcpServers; readonly onDidUpdateMcpServers: Event; private readonly _onUninstallMcpServer; readonly onUninstallMcpServer: Event; private readonly _onDidUninstallMcpServer; readonly onDidUninstallMcpServer: Event; private readonly mcpResourceManagementServices; constructor(allowedMcpServersService: IAllowedMcpServersService, logService: ILogService, userDataProfilesService: IUserDataProfilesService, instantiationService: IInstantiationService); private getMcpResourceManagementService; getInstalled(mcpResource?: URI): Promise; install(server: IInstallableMcpServer, options?: InstallOptions): Promise; uninstall(server: ILocalMcpServer, options?: UninstallOptions): Promise; installFromGallery(server: IGalleryMcpServer, options?: InstallOptions): Promise; updateMetadata(local: ILocalMcpServer, gallery: IGalleryMcpServer, mcpResource?: URI): Promise; dispose(): void; protected createMcpResourceManagementService(mcpResource: URI): McpUserResourceManagementService; }