/** * Internal MCP Manager * * Manages MCPs that are implemented internally by NCP. * These appear in tool discovery like external MCPs but are handled internally. * * NAMING CONVENTION FOR INTERNAL MCPS: * - MCP Management tools (add, remove, list MCPs) → namespace: 'mcp' * Example: mcp:add, mcp:remove, mcp:list * * - Photon tools (custom user-defined MCPs) → namespace: photon_name * Example: extract:run, get-library-docs:search * * - NCP internal features (analytics, code execution, scheduling, skills) → namespace: 'ncp' * Example: ncp:overview, ncp:run, ncp:create (for scheduled tasks) * Note: Currently individual MCPs use domain-specific names (analytics:, schedule:, skills:) * This is a legacy structure that can be unified under 'ncp' namespace in future refactoring. */ import { InternalMCP, InternalToolResult, ElicitationCapable } from './types.js'; import { type OrchestratorInterface } from './mcp-client-factory.js'; import ProfileManager from '../profiles/profile-manager.js'; export declare class InternalMCPManager { private internalMCPs; private disabledInternalMCPs; private ragEngine; private photonLoader; private codeMCP; /** * Notification subscription registry: event type → list of subscribed MCPs * Built from notificationSubscriptions metadata during loadPhotons() */ private notificationSubscribers; constructor(); /** * Load Photon classes from standard directories */ loadPhotons(): Promise; /** * Subscribe to external daemon events for registered event types * Only subscribes when daemon is running; when daemon not running, subscription is a no-op */ private subscribeToExternalEvents; /** * Register an internal MCP */ private registerInternalMCP; /** * Register notification subscriptions for a loaded MCP * Builds the subscription registry: event type → list of subscriber MCPs */ private registerNotificationSubscriptions; /** * Get all MCPs subscribed to a specific event type * @param eventType The event type (e.g., "deadlines", "mentions") * @returns Array of MCPs that have subscribed to this event */ getSubscribersFor(eventType: string): InternalMCP[]; /** * Dispatch a notification to all subscribed MCPs * @param eventType The event type * @param payload Event data to pass to subscribers */ dispatchNotification(eventType: string, payload: any): Promise; /** * Get all registered event types and their subscriber counts */ getNotificationRegistryStatus(): Record; /** * Initialize internal MCPs with ProfileManager */ initialize(profileManager: ProfileManager): void; /** * Set elicitation server for internal MCPs that support user interaction */ setElicitationServer(server: ElicitationCapable): void; /** * Get all internal MCPs for tool discovery */ getAllInternalMCPs(): InternalMCP[]; /** * Execute a tool from an internal MCP * @param mcpName The internal MCP name (e.g., "ncp") * @param toolName The tool name (e.g., "add") * @param parameters Tool parameters */ executeInternalTool(mcpName: string, toolName: string, parameters: any): Promise; /** * Check if an MCP is internal */ isInternalMCP(mcpName: string): boolean; /** * Get tool names for a specific internal MCP */ getInternalMCPTools(mcpName: string): string[]; /** * Get capabilities for a specific internal MCP */ getInternalMCPCapabilities(mcpName: string): import("./types.js").InternalMCPCapabilities; /** * Check if an internal MCP has a specific capability * @param mcpName The MCP name (e.g., "scheduler") * @param capabilityPath Dot-notation path (e.g., "experimental.toolValidation.supported") */ hasCapability(mcpName: string, capabilityPath: string): boolean; /** * Set the RAG engine instance for managing disabled MCPs */ setRAGEngine(ragEngine: any): void; /** * Set orchestrator on code execution MCP * Called after orchestrator is initialized */ setOrchestratorOnCodeMCP(orchestrator: any): void; /** * Set MCP client factory for Photons * Enables this.mcp() calls within Photon classes * Called after orchestrator is initialized */ setMCPClientFactory(orchestrator: OrchestratorInterface): void; /** * Get an internal MCP by name */ getInternalMCP(mcpName: string): InternalMCP | undefined; /** * Disable an internal MCP (removes from discovery, triggers re-indexing) */ disableInternalMCP(mcpName: string): Promise; /** * Enable an internal MCP (adds to discovery, triggers re-indexing) */ enableInternalMCP(mcpName: string): Promise; /** * Check if an internal MCP is disabled */ isInternalMCPDisabled(mcpName: string): boolean; /** * Get list of disabled internal MCPs */ getDisabledInternalMCPs(): string[]; /** * Get all internal MCPs for tool discovery (excludes disabled MCPs) */ getAllEnabledInternalMCPs(): InternalMCP[]; } //# sourceMappingURL=internal-mcp-manager.d.ts.map