export type OpenAiOrchestratorParams = { momento?: { apiKey: string; cacheName: string; }; openai: { apiKey: string; model?: string; }; config?: { agentLoadingConcurrency?: number; maxTokens?: number; debug?: boolean; tokenWarningThreshold?: number; preserveThinkingTags?: boolean; }; agentLoadingConcurrency?: number; }; export type SendMessageParams = { message: string; contextId?: string; }; /** * A chunk of text from the streaming orchestrator. * - 'chunk': Partial output received during streaming * - 'final': Full final message after stream ends */ export type StreamChunk = { type: 'chunk'; text: string; } | { type: 'final'; text: string; }; /** * Orchestrates conversations between the user and distributed A2A agents using OpenAI. */ export declare class OpenAIOrchestrator { private client; private model; private agentUrls; private concurrencyLimit; private maxTokens; private tokenWarningThreshold; private logger; private _agentCards; private _loadingPromise; private preserveThinkingTags; constructor(params: OpenAiOrchestratorParams); /** * Registers additional agent URLs that can be used for orchestration. * @param agentUrls - List of agent endpoint URLs. */ registerAgents(agentUrls: string[]): void; /** * Returns true if agent cards have already been loaded. */ isReady(): boolean; /** * Sends a message to the orchestrator and returns the final response text. * @param params - Message and optional context ID. */ sendMessage(params: SendMessageParams): Promise; /** * Sends a message and returns an async generator that yields response chunks. * Recommended for streaming user experiences. * * @param params - Message and optional context ID. * @returns Async generator yielding text chunks from the orchestrator. */ sendMessageStream(params: SendMessageParams): AsyncGenerator; /** * Sends a message and invokes the callback with each streamed response chunk. * Useful for minimal setups or environments without async iterators. * * @param params - Message and optional context ID. * @param onText - Callback to receive streamed output chunks. */ sendMessageStreamWithCallback(params: SendMessageParams, onText: (text: StreamChunk) => void): Promise; /** * Safely retrieves agent cards, waiting for loading to finish if needed. */ private getAgentCards; private loadAgents; private loadAgentCard; private buildAgent; } //# sourceMappingURL=openai.d.ts.map