@codingame/monaco-vscode-mcp-service-override 21.5.1 → 22.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.
- package/package.json +16 -15
- package/vscode/src/vs/base/common/uriTransformer.d.ts +2 -0
- package/vscode/src/vs/base/common/uriTransformer.js +39 -0
- package/vscode/src/vs/platform/mcp/common/allowedMcpServersService.js +3 -6
- package/vscode/src/vs/platform/mcp/common/mcpGalleryManifestService.d.ts +1 -1
- package/vscode/src/vs/platform/mcp/common/mcpGalleryManifestService.js +43 -7
- package/vscode/src/vs/platform/mcp/common/mcpGalleryService.d.ts +11 -7
- package/vscode/src/vs/platform/mcp/common/mcpGalleryService.js +800 -109
- package/vscode/src/vs/platform/mcp/common/mcpManagementIpc.d.ts +2 -1
- package/vscode/src/vs/platform/mcp/common/mcpManagementIpc.js +5 -3
- package/vscode/src/vs/platform/mcp/common/mcpManagementService.d.ts +21 -18
- package/vscode/src/vs/platform/mcp/common/mcpManagementService.js +179 -122
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcp.contribution.js +6 -7
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpAddContextContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommands.d.ts +0 -4
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommands.js +64 -79
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js +31 -21
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpLanguageFeatures.js +19 -19
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpMigration.js +6 -6
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpResourceQuickAccess.js +12 -8
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerActions.js +30 -32
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.js +113 -68
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.js +6 -5
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.js +35 -7
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.js +115 -34
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.js +36 -31
- package/vscode/src/vs/workbench/contrib/mcp/browser/openPanelChatAndGetWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/extensionMcpDiscovery.d.ts +6 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/extensionMcpDiscovery.js +66 -25
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/installedMcpServersDiscovery.d.ts +1 -3
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/installedMcpServersDiscovery.js +4 -23
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAbstract.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpContextKeys.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpIcons.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpIcons.js +85 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpLanguageModelToolContribution.js +48 -32
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.js +38 -20
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpResourceFilesystem.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpResourceFilesystem.js +22 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingLog.js +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.js +15 -13
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServer.d.ts +28 -12
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServer.js +130 -66
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerConnection.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerConnection.js +8 -7
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpService.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpService.js +24 -7
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationMcpService.js +10 -10
- package/vscode/src/vs/workbench/services/mcp/browser/mcpWorkbenchManagementService.d.ts +2 -1
- package/vscode/src/vs/workbench/services/mcp/browser/mcpWorkbenchManagementService.js +11 -9
- package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.d.ts +2 -1
- package/vscode/src/vs/workbench/services/mcp/common/mcpWorkbenchManagementService.js +14 -11
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypesUtils.d.ts +0 -15
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpTypesUtils.js +0 -68
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-mcp-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - mcp service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,20 +15,21 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-2673c6e2-17c1-5710-b169-46f3d4a28696-common": "
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
23
|
-
"@codingame/monaco-vscode-
|
|
24
|
-
"@codingame/monaco-vscode-a654b07e-8806-5425-b124-18f03ba8e11a-common": "
|
|
25
|
-
"@codingame/monaco-vscode-api": "
|
|
26
|
-
"@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common": "
|
|
27
|
-
"@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common": "
|
|
28
|
-
"@codingame/monaco-vscode-ce7c734f-7712-563c-9335-d7acb43306af-common": "
|
|
29
|
-
"@codingame/monaco-vscode-cf77987b-b1b7-5359-aaf8-a259c63d9f03-common": "
|
|
30
|
-
"@codingame/monaco-vscode-
|
|
31
|
-
"@codingame/monaco-vscode-
|
|
18
|
+
"@codingame/monaco-vscode-2673c6e2-17c1-5710-b169-46f3d4a28696-common": "22.0.0",
|
|
19
|
+
"@codingame/monaco-vscode-37b3b402-09f5-5f69-89ef-ce30559f63cc-common": "22.0.0",
|
|
20
|
+
"@codingame/monaco-vscode-4a3ac544-9a61-534c-88df-756262793ef7-common": "22.0.0",
|
|
21
|
+
"@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common": "22.0.0",
|
|
22
|
+
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "22.0.0",
|
|
23
|
+
"@codingame/monaco-vscode-62190c26-af1c-5f7a-a364-e05a59cfb7c7-common": "22.0.0",
|
|
24
|
+
"@codingame/monaco-vscode-a654b07e-8806-5425-b124-18f03ba8e11a-common": "22.0.0",
|
|
25
|
+
"@codingame/monaco-vscode-api": "22.0.0",
|
|
26
|
+
"@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common": "22.0.0",
|
|
27
|
+
"@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common": "22.0.0",
|
|
28
|
+
"@codingame/monaco-vscode-ce7c734f-7712-563c-9335-d7acb43306af-common": "22.0.0",
|
|
29
|
+
"@codingame/monaco-vscode-cf77987b-b1b7-5359-aaf8-a259c63d9f03-common": "22.0.0",
|
|
30
|
+
"@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common": "22.0.0",
|
|
31
|
+
"@codingame/monaco-vscode-dc3fa21d-a483-5b99-a7ab-173235644a34-common": "22.0.0",
|
|
32
|
+
"@codingame/monaco-vscode-f24e325c-2ce0-5bba-8236-bfc4f53180ab-common": "22.0.0"
|
|
32
33
|
},
|
|
33
34
|
"main": "index.js",
|
|
34
35
|
"module": "index.js",
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
import { URITransformer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uriIpc';
|
|
3
|
+
|
|
4
|
+
function createRawURITransformer(remoteAuthority) {
|
|
5
|
+
return {
|
|
6
|
+
transformIncoming: (uri) => {
|
|
7
|
+
if (uri.scheme === 'vscode-remote') {
|
|
8
|
+
return { scheme: 'file', path: uri.path, query: uri.query, fragment: uri.fragment };
|
|
9
|
+
}
|
|
10
|
+
if (uri.scheme === 'file') {
|
|
11
|
+
return { scheme: 'vscode-local', path: uri.path, query: uri.query, fragment: uri.fragment };
|
|
12
|
+
}
|
|
13
|
+
return uri;
|
|
14
|
+
},
|
|
15
|
+
transformOutgoing: (uri) => {
|
|
16
|
+
if (uri.scheme === 'file') {
|
|
17
|
+
return { scheme: 'vscode-remote', authority: remoteAuthority, path: uri.path, query: uri.query, fragment: uri.fragment };
|
|
18
|
+
}
|
|
19
|
+
if (uri.scheme === 'vscode-local') {
|
|
20
|
+
return { scheme: 'file', path: uri.path, query: uri.query, fragment: uri.fragment };
|
|
21
|
+
}
|
|
22
|
+
return uri;
|
|
23
|
+
},
|
|
24
|
+
transformOutgoingScheme: (scheme) => {
|
|
25
|
+
if (scheme === 'file') {
|
|
26
|
+
return 'vscode-remote';
|
|
27
|
+
}
|
|
28
|
+
else if (scheme === 'vscode-local') {
|
|
29
|
+
return 'file';
|
|
30
|
+
}
|
|
31
|
+
return scheme;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function createURITransformer(remoteAuthority) {
|
|
36
|
+
return ( new URITransformer(createRawURITransformer(remoteAuthority)));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { createURITransformer };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
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
4
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
|
-
import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
5
|
+
import { createCommandUri, MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
|
|
7
6
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
8
7
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
9
8
|
import { mcpAccessConfig, McpAccessValue } from '@codingame/monaco-vscode-dc3fa21d-a483-5b99-a7ab-173235644a34-common/vscode/vs/platform/mcp/common/mcpManagement';
|
|
@@ -24,11 +23,9 @@ let AllowedMcpServersService = class AllowedMcpServersService extends Disposable
|
|
|
24
23
|
if (this.configurationService.getValue(mcpAccessConfig) !== McpAccessValue.None) {
|
|
25
24
|
return true;
|
|
26
25
|
}
|
|
27
|
-
const settingsCommandLink = ( (
|
|
28
|
-
`command:workbench.action.openSettings?${encodeURIComponent(JSON.stringify({ query: `@id:${mcpAccessConfig}` }))}`
|
|
29
|
-
)).toString());
|
|
26
|
+
const settingsCommandLink = ( createCommandUri('workbench.action.openSettings', { query: `@id:${mcpAccessConfig}` }).toString());
|
|
30
27
|
return (new MarkdownString(localize(
|
|
31
|
-
|
|
28
|
+
1972,
|
|
32
29
|
"Model Context Protocol servers are disabled in the Editor. Please check your [settings]({0}).",
|
|
33
30
|
settingsCommandLink
|
|
34
31
|
)));
|
|
@@ -4,7 +4,7 @@ import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform
|
|
|
4
4
|
import { IMcpGalleryManifest, McpGalleryManifestStatus } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest";
|
|
5
5
|
import { IMcpGalleryManifestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest.service";
|
|
6
6
|
export declare class McpGalleryManifestService extends Disposable implements IMcpGalleryManifestService {
|
|
7
|
-
|
|
7
|
+
private readonly productService;
|
|
8
8
|
readonly _serviceBrand: undefined;
|
|
9
9
|
readonly onDidChangeMcpGalleryManifest: Event<any>;
|
|
10
10
|
readonly onDidChangeMcpGalleryManifestStatus: Event<any>;
|
|
@@ -23,19 +23,55 @@ let McpGalleryManifestService = class McpGalleryManifestService extends Disposab
|
|
|
23
23
|
}
|
|
24
24
|
createMcpGalleryManifest(url) {
|
|
25
25
|
url = url.endsWith('/') ? url.slice(0, -1) : url;
|
|
26
|
-
const
|
|
27
|
-
const version =
|
|
28
|
-
const serversUrl =
|
|
26
|
+
const isProductGalleryUrl = this.productService.mcpGallery?.serviceUrl === url;
|
|
27
|
+
const version = 'v0';
|
|
28
|
+
const serversUrl = `${url}/${version}/servers`;
|
|
29
29
|
const resources = [
|
|
30
30
|
{
|
|
31
31
|
id: serversUrl,
|
|
32
|
-
type: McpGalleryResourceType.
|
|
32
|
+
type: McpGalleryResourceType.McpServersQueryService
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: `${serversUrl}/{id}`,
|
|
36
|
+
type: McpGalleryResourceType.McpServerResourceUri
|
|
33
37
|
}
|
|
34
38
|
];
|
|
35
|
-
if (
|
|
39
|
+
if (isProductGalleryUrl) {
|
|
36
40
|
resources.push({
|
|
37
|
-
id: `${serversUrl}/
|
|
38
|
-
type: McpGalleryResourceType.
|
|
41
|
+
id: `${serversUrl}/search`,
|
|
42
|
+
type: McpGalleryResourceType.McpServersSearchService
|
|
43
|
+
});
|
|
44
|
+
resources.push({
|
|
45
|
+
id: `${serversUrl}/by-name/{name}`,
|
|
46
|
+
type: McpGalleryResourceType.McpServerNamedResourceUri
|
|
47
|
+
});
|
|
48
|
+
resources.push({
|
|
49
|
+
id: this.productService.mcpGallery.itemWebUrl,
|
|
50
|
+
type: McpGalleryResourceType.McpServerWebUri
|
|
51
|
+
});
|
|
52
|
+
resources.push({
|
|
53
|
+
id: this.productService.mcpGallery.publisherUrl,
|
|
54
|
+
type: McpGalleryResourceType.PublisherUriTemplate
|
|
55
|
+
});
|
|
56
|
+
resources.push({
|
|
57
|
+
id: this.productService.mcpGallery.supportUrl,
|
|
58
|
+
type: McpGalleryResourceType.ContactSupportUri
|
|
59
|
+
});
|
|
60
|
+
resources.push({
|
|
61
|
+
id: this.productService.mcpGallery.supportUrl,
|
|
62
|
+
type: McpGalleryResourceType.ContactSupportUri
|
|
63
|
+
});
|
|
64
|
+
resources.push({
|
|
65
|
+
id: this.productService.mcpGallery.privacyPolicyUrl,
|
|
66
|
+
type: McpGalleryResourceType.PrivacyPolicyUri
|
|
67
|
+
});
|
|
68
|
+
resources.push({
|
|
69
|
+
id: this.productService.mcpGallery.termsOfServiceUrl,
|
|
70
|
+
type: McpGalleryResourceType.TermsOfServiceUri
|
|
71
|
+
});
|
|
72
|
+
resources.push({
|
|
73
|
+
id: this.productService.mcpGallery.reportUrl,
|
|
74
|
+
type: McpGalleryResourceType.ReportUri
|
|
39
75
|
});
|
|
40
76
|
}
|
|
41
77
|
return {
|
|
@@ -2,33 +2,37 @@ import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/c
|
|
|
2
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
3
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
4
4
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
5
|
-
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
6
5
|
import { IRequestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/request/common/request.service";
|
|
7
6
|
import { IGalleryMcpServer, IGalleryMcpServerConfiguration, IQueryOptions } from "@codingame/monaco-vscode-dc3fa21d-a483-5b99-a7ab-173235644a34-common/vscode/vs/platform/mcp/common/mcpManagement";
|
|
8
7
|
import { IMcpGalleryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpManagement.service";
|
|
8
|
+
import { IMcpGalleryManifest } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest";
|
|
9
9
|
import { IMcpGalleryManifestService } from "@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest.service";
|
|
10
10
|
import { IPager } from "@codingame/monaco-vscode-62190c26-af1c-5f7a-a364-e05a59cfb7c7-common/vscode/vs/base/common/paging";
|
|
11
11
|
export declare class McpGalleryService extends Disposable implements IMcpGalleryService {
|
|
12
12
|
private readonly requestService;
|
|
13
13
|
private readonly fileService;
|
|
14
|
-
private readonly productService;
|
|
15
14
|
private readonly logService;
|
|
16
15
|
private readonly mcpGalleryManifestService;
|
|
17
16
|
_serviceBrand: undefined;
|
|
18
|
-
|
|
17
|
+
private galleryMcpServerDataSerializers;
|
|
18
|
+
constructor(requestService: IRequestService, fileService: IFileService, logService: ILogService, mcpGalleryManifestService: IMcpGalleryManifestService);
|
|
19
19
|
isEnabled(): boolean;
|
|
20
20
|
query(options?: IQueryOptions, token?: CancellationToken): Promise<IPager<IGalleryMcpServer>>;
|
|
21
21
|
getMcpServersFromGallery(urls: string[]): Promise<IGalleryMcpServer[]>;
|
|
22
|
-
getMcpServersFromVSCodeGallery(names: string[]): Promise<IGalleryMcpServer[]>;
|
|
23
22
|
getMcpServerConfiguration(gallery: IGalleryMcpServer, token: CancellationToken): Promise<IGalleryMcpServerConfiguration>;
|
|
24
23
|
getReadme(gallery: IGalleryMcpServer, token: CancellationToken): Promise<string>;
|
|
25
24
|
private toGalleryMcpServer;
|
|
26
25
|
private toGalleryMcpServerConfiguration;
|
|
27
26
|
private queryGalleryMcpServers;
|
|
28
27
|
private queryRawGalleryMcpServers;
|
|
29
|
-
getMcpServer(mcpServerUrl: string): Promise<IGalleryMcpServer | undefined>;
|
|
30
|
-
|
|
31
|
-
private
|
|
28
|
+
getMcpServer(mcpServerUrl: string, mcpGalleryManifest?: IMcpGalleryManifest | null): Promise<IGalleryMcpServer | undefined>;
|
|
29
|
+
getMcpServerByName(name: string): Promise<IGalleryMcpServer | undefined>;
|
|
30
|
+
private serializeMcpServer;
|
|
31
|
+
private serializeMcpServersResult;
|
|
32
32
|
private getServerUrl;
|
|
33
|
+
private getNamedServerUrl;
|
|
34
|
+
private getSearchUrl;
|
|
35
|
+
private getWebUrl;
|
|
36
|
+
private getPublisherUrl;
|
|
33
37
|
private getMcpGalleryUrl;
|
|
34
38
|
}
|