import { Client } from '@modelcontextprotocol/sdk/client/index.js'; import type { Root } from '@modelcontextprotocol/sdk/types.js'; import type { ElicitRequest, ElicitResult, McpSamplingParams, McpSamplingResult } from '@nest-mcp/common'; import { McpRegistryService } from '@nest-mcp/server'; import { type OnModuleDestroy } from '@nestjs/common'; import type { UpstreamConfig, UpstreamStatus } from './upstream.interface'; interface ManagedUpstream { config: UpstreamConfig; client: Client; connected: boolean; healthy: boolean; lastHealthCheck?: Date; error?: string; } export declare class UpstreamManagerService implements OnModuleDestroy { private readonly registry?; private readonly logger; private readonly upstreams; private readonly samplingForwarders; private readonly elicitForwarders; constructor(registry?: McpRegistryService | undefined); connectAll(configs: UpstreamConfig[], roots?: Root[]): Promise; connect(config: UpstreamConfig, roots?: Root[]): Promise; private createTransport; getClient(name: string): Client | undefined; getManaged(name: string): ManagedUpstream | undefined; isConnected(name: string): boolean; isHealthy(name: string): boolean; setHealthy(name: string, healthy: boolean, error?: string): void; getAllNames(): string[]; getConfig(name: string): UpstreamConfig | undefined; getAllConfigs(): UpstreamConfig[]; getStatus(name: string): UpstreamStatus | undefined; getAllStatuses(): UpstreamStatus[]; disconnect(name: string): Promise; disconnectAll(): Promise; activateSampling(upstreamName: string, forwarder: (params: McpSamplingParams) => Promise): void; deactivateSampling(upstreamName: string): void; activateElicitation(upstreamName: string, forwarder: (params: ElicitRequest, options?: { signal?: AbortSignal; }) => Promise): void; deactivateElicitation(upstreamName: string): void; onModuleDestroy(): Promise; } export {}; //# sourceMappingURL=upstream-manager.service.d.ts.map