/**
 * @fileoverview MCP Engine for caching MCP server, connection, and tool data
 *
 * Provides centralized caching for MCP (Model Context Protocol) entities.
 * Execution logs are NOT cached here - they should be loaded on-demand via RunView.
 *
 * @module @memberjunction/core-entities/MCPEngine
 */
import { BaseEngine, IMetadataProvider, UserInfo } from "@memberjunction/core";
import { MJMCPServerEntity, MJMCPServerConnectionEntity, MJMCPServerToolEntity, MJMCPToolFavoriteEntity } from "../generated/entity_subclasses.js";
/**
 * MCPEngine provides centralized caching for MCP-related entities.
 *
 * Cached entities:
 * - MCP Servers: Server definitions with transport, auth, and rate limit config
 * - MCP Server Connections: Connection instances for each server
 * - MCP Server Tools: Tools discovered from MCP servers
 *
 * NOT cached (load on-demand):
 * - MCP Tool Execution Logs: Historical data that should be queried as needed
 *
 * @example
 * ```typescript
 * // Initialize the engine
 * await MCPEngine.Instance.Config(false, contextUser);
 *
 * // Access cached data
 * const servers = MCPEngine.Instance.Servers;
 * const connections = MCPEngine.Instance.Connections;
 * const tools = MCPEngine.Instance.Tools;
 *
 * // Get tools for a specific server
 * const serverTools = MCPEngine.Instance.GetToolsByServer(serverId);
 *
 * // Force refresh
 * await MCPEngine.Instance.Config(true, contextUser);
 * ```
 */
export declare class MCPEngine extends BaseEngine<MCPEngine> {
    /**
     * Configures and loads the MCP engine data.
     *
     * @param forceRefresh - If true, forces a refresh of cached data
     * @param contextUser - User context for data loading (required for server-side)
     * @param provider - Optional metadata provider
     */
    Config(forceRefresh?: boolean, contextUser?: UserInfo, provider?: IMetadataProvider): Promise<void>;
    /**
     * Gets the singleton instance of MCPEngine
     */
    static get Instance(): MCPEngine;
    private _Servers;
    private _Connections;
    private _Tools;
    private _Favorites;
    /**
     * Gets all cached MCP servers
     */
    get Servers(): MJMCPServerEntity[];
    /**
     * Gets all cached MCP server connections
     */
    get Connections(): MJMCPServerConnectionEntity[];
    /**
     * Gets all cached MCP server tools
     */
    get Tools(): MJMCPServerToolEntity[];
    /**
     * Gets all cached MCP tool favorites (across all users).
     * For current-user-only access, use {@link GetFavoritesByUser}.
     */
    get Favorites(): MJMCPToolFavoriteEntity[];
    /**
     * Gets all MCP tool favorites for a specific user.
     *
     * @param userId - The user ID
     */
    GetFavoritesByUser(userId: string): MJMCPToolFavoriteEntity[];
    /**
     * Gets a single MCP tool favorite for a user/tool pair.
     *
     * @param userId - The user ID
     * @param toolId - The MCP server tool ID
     */
    GetFavoriteByUserAndTool(userId: string, toolId: string): MJMCPToolFavoriteEntity | undefined;
    /**
     * Gets a server by ID
     *
     * @param serverId - The server ID
     * @returns The server entity or undefined if not found
     */
    GetServerById(serverId: string): MJMCPServerEntity | undefined;
    /**
     * Gets a connection by ID
     *
     * @param connectionId - The connection ID
     * @returns The connection entity or undefined if not found
     */
    GetConnectionById(connectionId: string): MJMCPServerConnectionEntity | undefined;
    /**
     * Gets a tool by ID
     *
     * @param toolId - The tool ID
     * @returns The tool entity or undefined if not found
     */
    GetToolById(toolId: string): MJMCPServerToolEntity | undefined;
    /**
     * Gets all connections for a specific server
     *
     * @param serverId - The server ID
     * @returns Array of connections for the server
     */
    GetConnectionsByServer(serverId: string): MJMCPServerConnectionEntity[];
    /**
     * Gets all tools for a specific server
     *
     * @param serverId - The server ID
     * @returns Array of tools for the server
     */
    GetToolsByServer(serverId: string): MJMCPServerToolEntity[];
    /**
     * Gets active servers only
     *
     * @returns Array of servers with Status = 'Active'
     */
    get ActiveServers(): MJMCPServerEntity[];
    /**
     * Gets active connections only
     *
     * @returns Array of connections with Status = 'Active'
     */
    get ActiveConnections(): MJMCPServerConnectionEntity[];
    /**
     * Gets active tools only
     *
     * @returns Array of tools with Status = 'Active'
     */
    get ActiveTools(): MJMCPServerToolEntity[];
    /**
     * Gets active connections for a specific server
     *
     * @param serverId - The server ID
     * @returns Array of active connections for the server
     */
    GetActiveConnectionsByServer(serverId: string): MJMCPServerConnectionEntity[];
    /**
     * Gets active tools for a specific server
     *
     * @param serverId - The server ID
     * @returns Array of active tools for the server
     */
    GetActiveToolsByServer(serverId: string): MJMCPServerToolEntity[];
    /**
     * Gets the server name for a given server ID
     *
     * @param serverId - The server ID
     * @returns The server name or 'Unknown' if not found
     */
    GetServerName(serverId: string): string;
    /**
     * Gets the connection name for a given connection ID
     *
     * @param connectionId - The connection ID
     * @returns The connection name or 'Unknown' if not found
     */
    GetConnectionName(connectionId: string): string;
}
//# sourceMappingURL=MCPEngine.d.ts.map