/** * Copyright (c) Microsoft Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import type { Tool } from '../tools/tool.js'; import type { FullConfig } from '../config.js'; import type { Prompt } from '@modelcontextprotocol/sdk/types.js'; import { PluginLoader } from './loader.js'; /** * Plugin manager that handles loading, enabling/disabling, and integrating plugins * with the MCP server functionality. */ export declare class PluginManager { private readonly _config; private readonly _loader; private _initialized; constructor(config: FullConfig); /** * Get the plugin loader instance. */ get loader(): PluginLoader; /** * Initialize the plugin manager and load all plugins. */ initialize(): Promise; /** * Cleanup the plugin manager and all loaded plugins. */ cleanup(): Promise; /** * Get all tools from core system and enabled plugins, with shadowing applied. */ getAvailableTools(coreTools: Tool[]): Tool[]; /** * Get all prompts from enabled plugins, with shadowing applied. */ getAvailablePrompts(corePrompts?: Prompt[]): Prompt[]; /** * Get all resources from enabled plugins. */ getAvailableResources(): any[]; /** * Get all properties from enabled plugins. */ getAvailableProperties(): any[]; /** * Get plugin information for debugging/status purposes. */ getPluginInfo(): { initialized: boolean; pluginsPath: string; totalPlugins: number; enabledPlugins: number; plugins: { name: string; version: string; description: string | undefined; enabled: boolean; error: string | undefined; path: string; toolsCount: number; promptsCount: number; resourcesCount: number; propertiesCount: number; shadowedTools: string[]; shadowedPrompts: string[]; shadowedResources: string[]; }[]; }; /** * Reload a specific plugin by name. */ reloadPlugin(pluginName: string): Promise; /** * Get detailed shadow information for debugging. */ getShadowInfo(): { shadowedTools: string[]; shadowedPrompts: string[]; shadowedResources: string[]; }; }