@codingame/monaco-vscode-mcp-service-override 26.2.2 → 27.0.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.
Files changed (63) hide show
  1. package/index.js +8 -2
  2. package/package.json +2 -2
  3. package/vscode/src/vs/base/common/jsonRpcProtocol.d.ts +66 -0
  4. package/vscode/src/vs/base/common/jsonRpcProtocol.js +216 -0
  5. package/vscode/src/vs/platform/mcp/common/allowedMcpServersService.js +1 -1
  6. package/vscode/src/vs/platform/mcp/common/mcpGalleryService.js +2 -2
  7. package/vscode/src/vs/platform/mcp/common/mcpGateway.d.ts +39 -0
  8. package/vscode/src/vs/platform/mcp/common/mcpGateway.js +6 -0
  9. package/vscode/src/vs/platform/mcp/common/mcpResourceScannerService.d.ts +2 -1
  10. package/vscode/src/vs/platform/mcp/common/mcpResourceScannerService.js +12 -6
  11. package/vscode/src/vs/workbench/contrib/mcp/browser/mcp.contribution.js +15 -5
  12. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpAddContextContribution.js +2 -2
  13. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommands.js +58 -58
  14. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js +27 -28
  15. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpGatewayService.d.ts +18 -0
  16. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpGatewayService.js +34 -0
  17. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpGatewayToolBrokerContribution.d.ts +6 -0
  18. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpGatewayToolBrokerContribution.js +15 -0
  19. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpLanguageFeatures.js +18 -18
  20. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpMigration.js +4 -4
  21. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpResourceQuickAccess.js +8 -8
  22. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.d.ts +4 -1
  23. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.js +42 -24
  24. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.d.ts +1 -1
  25. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.js +13 -12
  26. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/extensionMcpDiscovery.js +4 -4
  27. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/installedMcpServersDiscovery.js +2 -0
  28. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAbstract.js +1 -1
  29. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/pluginMcpDiscovery.d.ts +15 -0
  30. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/pluginMcpDiscovery.js +106 -0
  31. package/vscode/src/vs/workbench/contrib/mcp/common/mcpContextKeys.js +4 -4
  32. package/vscode/src/vs/workbench/contrib/mcp/common/mcpGatewayToolBrokerChannel.d.ts +23 -0
  33. package/vscode/src/vs/workbench/contrib/mcp/common/mcpGatewayToolBrokerChannel.js +202 -0
  34. package/vscode/src/vs/workbench/contrib/mcp/common/mcpLanguageModelToolContribution.js +25 -17
  35. package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.d.ts +3 -5
  36. package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.js +27 -32
  37. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingLog.js +1 -1
  38. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.js +11 -11
  39. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSandboxService.d.ts +34 -0
  40. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSandboxService.js +233 -0
  41. package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerConnection.js +3 -3
  42. package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerRequestHandler.d.ts +1 -18
  43. package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerRequestHandler.js +88 -142
  44. package/vscode/src/vs/workbench/services/authentication/browser/authenticationMcpService.js +9 -9
  45. package/vscode/src/vs/workbench/services/mcp/browser/mcpWorkbenchManagementService.d.ts +1 -1
  46. package/vscode/src/vs/workbench/services/mcp/browser/mcpWorkbenchManagementService.js +2 -2
  47. package/vscode/src/vs/platform/mcp/common/mcpManagementIpc.d.ts +0 -42
  48. package/vscode/src/vs/platform/mcp/common/mcpManagementIpc.js +0 -105
  49. package/vscode/src/vs/platform/mcp/common/mcpManagementService.d.ts +0 -130
  50. package/vscode/src/vs/platform/mcp/common/mcpManagementService.js +0 -665
  51. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.d.ts +0 -259
  52. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.js +0 -1225
  53. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.d.ts +0 -72
  54. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.js +0 -996
  55. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.d.ts +0 -17
  56. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.js +0 -49
  57. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.d.ts +0 -5
  58. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.js +0 -12
  59. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.d.ts +0 -88
  60. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.js +0 -464
  61. package/vscode/src/vs/workbench/contrib/mcp/browser/media/mcpServerEditor.css +0 -94
  62. package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.d.ts +0 -87
  63. package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.js +0 -702
@@ -1,130 +0,0 @@
1
- import { Emitter, Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
- import { IMarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
3
- import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
4
- import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
5
- import { IEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service";
6
- import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
7
- import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
8
- import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
9
- import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
10
- import { IUserDataProfilesService } from "@codingame/monaco-vscode-api/vscode/vs/platform/userDataProfile/common/userDataProfile.service";
11
- import { DidUninstallMcpServerEvent, IGalleryMcpServer, ILocalMcpServer, IMcpServerInput, IGalleryMcpServerConfiguration, InstallMcpServerEvent, InstallMcpServerResult, RegistryType, UninstallMcpServerEvent, InstallOptions, UninstallOptions, IInstallableMcpServer, McpServerConfigurationParseResult } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement";
12
- import { IAllowedMcpServersService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement.service";
13
- import { IMcpManagementService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement.service";
14
- import { IMcpGalleryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement.service";
15
- import { IMcpServerVariable, IMcpServerConfiguration } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpPlatformTypes";
16
- import { McpResourceTarget } from "./mcpResourceScannerService.js";
17
- import { IMcpResourceScannerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpResourceScannerService.service";
18
- export interface ILocalMcpServerInfo {
19
- name: string;
20
- version?: string;
21
- displayName?: string;
22
- galleryId?: string;
23
- galleryUrl?: string;
24
- description?: string;
25
- repositoryUrl?: string;
26
- publisher?: string;
27
- publisherDisplayName?: string;
28
- icon?: {
29
- dark: string;
30
- light: string;
31
- };
32
- codicon?: string;
33
- manifest?: IGalleryMcpServerConfiguration;
34
- readmeUrl?: URI;
35
- location?: URI;
36
- licenseUrl?: string;
37
- }
38
- export declare abstract class AbstractCommonMcpManagementService extends Disposable implements IMcpManagementService {
39
- protected readonly logService: ILogService;
40
- _serviceBrand: undefined;
41
- abstract onInstallMcpServer: Event<InstallMcpServerEvent>;
42
- abstract onDidInstallMcpServers: Event<readonly InstallMcpServerResult[]>;
43
- abstract onDidUpdateMcpServers: Event<readonly InstallMcpServerResult[]>;
44
- abstract onUninstallMcpServer: Event<UninstallMcpServerEvent>;
45
- abstract onDidUninstallMcpServer: Event<DidUninstallMcpServerEvent>;
46
- abstract getInstalled(mcpResource?: URI): Promise<ILocalMcpServer[]>;
47
- abstract install(server: IInstallableMcpServer, options?: InstallOptions): Promise<ILocalMcpServer>;
48
- abstract installFromGallery(server: IGalleryMcpServer, options?: InstallOptions): Promise<ILocalMcpServer>;
49
- abstract updateMetadata(local: ILocalMcpServer, server: IGalleryMcpServer, profileLocation?: URI): Promise<ILocalMcpServer>;
50
- abstract uninstall(server: ILocalMcpServer, options?: UninstallOptions): Promise<void>;
51
- abstract canInstall(server: IGalleryMcpServer | IInstallableMcpServer): true | IMarkdownString;
52
- constructor(logService: ILogService);
53
- getMcpServerConfigurationFromManifest(manifest: IGalleryMcpServerConfiguration, packageType: RegistryType): McpServerConfigurationParseResult;
54
- protected getCommandName(packageType: RegistryType): string;
55
- protected getVariables(variableInputs: Record<string, IMcpServerInput>): IMcpServerVariable[];
56
- private processKeyValueInputs;
57
- private processArguments;
58
- }
59
- export declare abstract class AbstractMcpResourceManagementService extends AbstractCommonMcpManagementService {
60
- protected readonly mcpResource: URI;
61
- protected readonly target: McpResourceTarget;
62
- protected readonly mcpGalleryService: IMcpGalleryService;
63
- protected readonly fileService: IFileService;
64
- protected readonly uriIdentityService: IUriIdentityService;
65
- protected readonly mcpResourceScannerService: IMcpResourceScannerService;
66
- private initializePromise;
67
- private readonly reloadConfigurationScheduler;
68
- private local;
69
- protected readonly _onInstallMcpServer: Emitter<InstallMcpServerEvent>;
70
- readonly onInstallMcpServer: Event<InstallMcpServerEvent>;
71
- protected readonly _onDidInstallMcpServers: Emitter<InstallMcpServerResult[]>;
72
- get onDidInstallMcpServers(): Event<InstallMcpServerResult[]>;
73
- protected readonly _onDidUpdateMcpServers: Emitter<InstallMcpServerResult[]>;
74
- get onDidUpdateMcpServers(): Event<InstallMcpServerResult[]>;
75
- protected readonly _onUninstallMcpServer: Emitter<UninstallMcpServerEvent>;
76
- get onUninstallMcpServer(): Event<UninstallMcpServerEvent>;
77
- protected _onDidUninstallMcpServer: Emitter<DidUninstallMcpServerEvent>;
78
- get onDidUninstallMcpServer(): Event<DidUninstallMcpServerEvent>;
79
- constructor(mcpResource: URI, target: McpResourceTarget, mcpGalleryService: IMcpGalleryService, fileService: IFileService, uriIdentityService: IUriIdentityService, logService: ILogService, mcpResourceScannerService: IMcpResourceScannerService);
80
- private initialize;
81
- private populateLocalServers;
82
- private startWatching;
83
- protected updateLocal(): Promise<void>;
84
- getInstalled(): Promise<ILocalMcpServer[]>;
85
- protected scanLocalServer(name: string, config: IMcpServerConfiguration): Promise<ILocalMcpServer>;
86
- install(server: IInstallableMcpServer, options?: Omit<InstallOptions, "mcpResource">): Promise<ILocalMcpServer>;
87
- uninstall(server: ILocalMcpServer, options?: Omit<UninstallOptions, "mcpResource">): Promise<void>;
88
- protected abstract getLocalServerInfo(name: string, mcpServerConfig: IMcpServerConfiguration): Promise<ILocalMcpServerInfo | undefined>;
89
- protected abstract installFromUri(uri: URI, options?: Omit<InstallOptions, "mcpResource">): Promise<ILocalMcpServer>;
90
- }
91
- export declare class McpUserResourceManagementService extends AbstractMcpResourceManagementService {
92
- protected readonly mcpLocation: URI;
93
- constructor(mcpResource: URI, mcpGalleryService: IMcpGalleryService, fileService: IFileService, uriIdentityService: IUriIdentityService, logService: ILogService, mcpResourceScannerService: IMcpResourceScannerService, environmentService: IEnvironmentService);
94
- installFromGallery(server: IGalleryMcpServer, options?: InstallOptions): Promise<ILocalMcpServer>;
95
- updateMetadata(local: ILocalMcpServer, gallery: IGalleryMcpServer): Promise<ILocalMcpServer>;
96
- protected updateMetadataFromGallery(gallery: IGalleryMcpServer): Promise<IGalleryMcpServerConfiguration>;
97
- protected getLocalServerInfo(name: string, mcpServerConfig: IMcpServerConfiguration): Promise<ILocalMcpServerInfo | undefined>;
98
- protected getLocation(name: string, version?: string): URI;
99
- protected installFromUri(uri: URI, options?: Omit<InstallOptions, "mcpResource">): Promise<ILocalMcpServer>;
100
- canInstall(): true | IMarkdownString;
101
- }
102
- export declare abstract class AbstractMcpManagementService extends AbstractCommonMcpManagementService implements IMcpManagementService {
103
- protected readonly allowedMcpServersService: IAllowedMcpServersService;
104
- constructor(allowedMcpServersService: IAllowedMcpServersService, logService: ILogService);
105
- canInstall(server: IGalleryMcpServer | IInstallableMcpServer): true | IMarkdownString;
106
- }
107
- export declare class McpManagementService extends AbstractMcpManagementService implements IMcpManagementService {
108
- private readonly userDataProfilesService;
109
- protected readonly instantiationService: IInstantiationService;
110
- private readonly _onInstallMcpServer;
111
- readonly onInstallMcpServer: Event<InstallMcpServerEvent>;
112
- private readonly _onDidInstallMcpServers;
113
- readonly onDidInstallMcpServers: Event<readonly InstallMcpServerResult[]>;
114
- private readonly _onDidUpdateMcpServers;
115
- readonly onDidUpdateMcpServers: Event<readonly InstallMcpServerResult[]>;
116
- private readonly _onUninstallMcpServer;
117
- readonly onUninstallMcpServer: Event<UninstallMcpServerEvent>;
118
- private readonly _onDidUninstallMcpServer;
119
- readonly onDidUninstallMcpServer: Event<DidUninstallMcpServerEvent>;
120
- private readonly mcpResourceManagementServices;
121
- constructor(allowedMcpServersService: IAllowedMcpServersService, logService: ILogService, userDataProfilesService: IUserDataProfilesService, instantiationService: IInstantiationService);
122
- private getMcpResourceManagementService;
123
- getInstalled(mcpResource?: URI): Promise<ILocalMcpServer[]>;
124
- install(server: IInstallableMcpServer, options?: InstallOptions): Promise<ILocalMcpServer>;
125
- uninstall(server: ILocalMcpServer, options?: UninstallOptions): Promise<void>;
126
- installFromGallery(server: IGalleryMcpServer, options?: InstallOptions): Promise<ILocalMcpServer>;
127
- updateMetadata(local: ILocalMcpServer, gallery: IGalleryMcpServer, mcpResource?: URI): Promise<ILocalMcpServer>;
128
- dispose(): void;
129
- protected createMcpResourceManagementService(mcpResource: URI): McpUserResourceManagementService;
130
- }