import { CancellationToken } from "../../../base/common/cancellation.js"; import { IMarkdownString } from "../../../base/common/htmlContent.js"; import { IIterativePager } from "../../../base/common/paging.js"; import { Event, URI } from "../../../sessions/sessions.web.main.internal.js"; import { IMcpServerIdentity } from "@codingame/monaco-vscode-mcp-service-override/vscode/vs/platform/mcp/common/allowedMcpServers"; import { IMcpGalleryManifest } from "./mcpGalleryManifest.js"; import { IQueryOptions, IGalleryMcpServer, IMcpGalleryQueryPageOptions, IMcpGalleryQueryPage, IMcpGalleryServerResolveResult, type DidUninstallMcpServerEvent, type IGalleryMcpServerConfiguration, type IInstallableMcpServer, type ILocalMcpServer, type InstallMcpServerEvent, type InstallMcpServerResult, type InstallOptions, type McpServerConfigurationParseResult, type RegistryType, type UninstallMcpServerEvent, type UninstallOptions } from "./mcpManagement.js"; export declare const IMcpGalleryService: import("../../instantiation/common/instantiation.js").ServiceIdentifier; export interface IMcpGalleryService { readonly _serviceBrand: undefined; isEnabled(): boolean; query(options?: IQueryOptions, token?: CancellationToken, manifest?: IMcpGalleryManifest): Promise>; queryPage(options: IMcpGalleryQueryPageOptions, token: CancellationToken, manifest?: IMcpGalleryManifest): Promise; getMcpServersFromGallery(infos: { name: string; id?: string; }[], manifest?: IMcpGalleryManifest): Promise; /** * Resolves the given servers against the active registry, distinguishing a * definitive "not found" from a transient failure so callers can make policy * decisions without treating an unreachable registry as absence. The returned * map is keyed by the requested server name. */ resolveMcpServersFromGallery(infos: { name: string; id?: string; }[], manifest?: IMcpGalleryManifest): Promise>; getMcpServer(url: string, manifest?: IMcpGalleryManifest | null, token?: CancellationToken): Promise; getReadme(extension: IGalleryMcpServer, token: CancellationToken): Promise; } export declare const IMcpManagementService: import("../../instantiation/common/instantiation.js").ServiceIdentifier; export interface IMcpManagementService { readonly _serviceBrand: undefined; readonly onInstallMcpServer: Event; readonly onDidInstallMcpServers: Event; readonly onDidUpdateMcpServers: Event; readonly onUninstallMcpServer: Event; readonly onDidUninstallMcpServer: Event; getInstalled(mcpResource?: URI): Promise; canInstall(server: IGalleryMcpServer | IInstallableMcpServer): true | IMarkdownString; install(server: IInstallableMcpServer, options?: InstallOptions): Promise; installFromGallery(server: IGalleryMcpServer, options?: InstallOptions): Promise; updateMetadata(local: ILocalMcpServer, server: IGalleryMcpServer, profileLocation?: URI): Promise; uninstall(server: ILocalMcpServer, options?: UninstallOptions): Promise; getMcpServerConfigurationFromManifest(manifest: IGalleryMcpServerConfiguration, packageType: RegistryType): McpServerConfigurationParseResult; } export declare const IAllowedMcpServersService: import("../../instantiation/common/instantiation.js").ServiceIdentifier; export interface IAllowedMcpServersService { readonly _serviceBrand: undefined; readonly onDidChangeAllowedMcpServers: Event; /** Whether enterprise policy supplies an allowlist (including an empty list) instead of legacy registry authorization. */ readonly hasManagedAllowlist: boolean; /** Original allow/deny URL and command strings containing environment references, to be resolved into {@link IMcpServerIdentity.policyValues} by the executing host. */ getServerPolicyVariableValues(): readonly string[]; /** Checks gallery candidates or a server definition before resolution, rejecting invalid command/URL shapes and deferring variable-dependent rules. */ isAllowed(mcpServer: IGalleryMcpServer | ILocalMcpServer | IInstallableMcpServer): true | IMarkdownString; /** Checks a definition identity before resolution; access and name restrictions are never deferred. */ isServerAllowedBeforeResolution(identity: IMcpServerIdentity): true | IMarkdownString; /** * Checks the resolved command or destination against access and allow/deny rules, substituting `identity.policyValues` into the policy matchers. * Call before execution and for every request destination; missing host expansions fail closed, while preliminary checks only defer the decision. */ isServerAllowed(identity: IMcpServerIdentity): true | IMarkdownString; }