import type { ModelInfo, ModelRef, RegistryLike, TokenUsage, VoiceResult } from "./types.js"; import { type QualityMetrics, type StructuredSynthesis } from "./synthesis/quality.js"; export interface SynthesisArgs { conductor: ModelRef; prompt: string; optimizedPrompt?: string; voices: VoiceResult[]; totalVoices: number; registry: ModelInfo[]; modelRegistry?: RegistryLike; signal: AbortSignal; fetchImpl?: typeof fetch; callModel?: (args: { model: ModelRef; prompt: string; systemPrompt: string; signal: AbortSignal; onDelta?: (text: string) => void; structuredOutput?: boolean; }) => Promise<{ output: string; usage?: TokenUsage; costUsd: number | null; }>; onDelta?: (text: string) => void; } export interface SynthesisResult { synthesis: string; usage?: TokenUsage; costUsd: number | null; structured?: StructuredSynthesis; qualityMetrics?: QualityMetrics; rawOutput?: string; } export declare function synthesize(args: SynthesisArgs): Promise; export declare function buildSynthesisPrompt(args: { prompt: string; optimizedPrompt?: string; voices: VoiceResult[]; totalVoices: number; registry?: ModelInfo[]; conductor?: ModelRef; }): string;