import type { OneShotLLMInput, OneShotLLMResult, OneShotOrchestratorOptions } from '../types/one-shot-llm.js'; /** * OneShotOrchestrator — a stateless, reusable utility for making single * LLM calls with provider resolution, fallback chains, and structured results. * * Usage: * ```ts * const oneShot = new OneShotOrchestrator({ buildProvider, getConfig }); * const result = await oneShot.call({ * system: 'You are a helpful assistant.', * userPrompt: 'Summarize this conversation.', * model: 'deepseek-chat', * fallbackModels: ['anthropic/claude-haiku'], * }); * console.log(result.text); * ``` * * Every method is stateless — a single instance can be shared across * the entire process lifetime. */ export declare class OneShotOrchestrator { private readonly opts; constructor(opts: OneShotOrchestratorOptions); /** * Make a one-shot LLM call. Resolves provider+model, applies fallback * chain on transient errors, and returns a structured result. * * Never throws — all errors are captured in `OneShotLLMResult.error`. */ call(input: OneShotLLMInput): Promise; /** * Resolve the target provider + model from input + config. * Priority: role-based routing > explicit providerId+model > defaults. */ private resolveTarget; /** * Build a Provider Request from the input. */ private buildRequest; /** * Resolve the abort signal. Provider calls always receive the per-call * timeout, composed with external cancellation when the caller supplies it. */ private resolveSignal; /** * Build the fallback model chain from input + config + current target. * The injected {@link OneShotOrchestratorOptions.fallbackProfileManager} * is the only allowed manager — OneShot never owns a private snapshot * so a live `ConfigStore` change reaches every call without rebuilding * the manager. */ private resolveFallbackChain; /** Attempt a provider call while preserving the actual failure for callers. */ private tryCall; /** Build a success result from a provider Response. */ private buildResult; /** Build a total-failure error result. */ private buildErrorResult; } //# sourceMappingURL=one-shot-llm.d.ts.map