Path: blob/main/src/vs/workbench/contrib/mcp/common/discovery/mcpDiscovery.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { IDisposable } from '../../../../../base/common/lifecycle.js';6import { SyncDescriptor0 } from '../../../../../platform/instantiation/common/descriptors.js';789export interface IMcpDiscovery extends IDisposable {10readonly fromGallery: boolean;11start(): void;12}1314class McpDiscoveryRegistry {15private readonly _discovery: SyncDescriptor0<IMcpDiscovery>[] = [];1617register(discovery: SyncDescriptor0<IMcpDiscovery>): void {18this._discovery.push(discovery);19}2021getAll(): readonly SyncDescriptor0<IMcpDiscovery>[] {22return this._discovery;23}24}2526export const mcpDiscoveryRegistry = new McpDiscoveryRegistry();272829303132