import type { PolypotSecrets } from "../config/secrets.js"; import { type ExistingPoMergeSource } from "./merge-policy.js"; import type { PotDocument } from "./pot.js"; import { type LocaleFormat, type TranslatePreviewWorkload } from "./workload.js"; export interface TranslateUiPreviewOptions { readonly batchSize: number; readonly dryRun: boolean; readonly jobs: number; readonly languages: readonly string[]; readonly localeFormat: LocaleFormat; readonly maxStringsPerJob?: number; readonly maxTotalStrings?: number; readonly outputDir: string; readonly outputFormat: string; readonly poFilePrefix?: string; readonly sourceLanguage: string; readonly verboseLevel: number; } export interface TranslateConfigSnapshot { readonly forceTranslate: boolean; readonly model: string; readonly potFilePath?: string; readonly provider: string; } export interface TranslateSettingsSnapshot { readonly behavior: { readonly dictionaryPath: string; readonly forceTranslate: boolean; readonly promptFilePath?: string; readonly useDictionary: boolean; }; readonly debug: { readonly debugOutputFile?: string; readonly dryRun: boolean; readonly saveDebugInfo: boolean; readonly verboseLevel: number; }; readonly limits: { readonly maxStringsPerJob?: number; readonly maxTotalStrings?: number; }; readonly output: { readonly localeFormat: LocaleFormat; readonly outputDir: string; readonly outputFile?: string; readonly outputFormat: string; readonly poFilePrefix?: string; }; readonly performance: { readonly batchSize: number; readonly jobs: number; readonly timeout: number; }; readonly provider: { readonly maxTokens?: number; readonly model: string; readonly provider: string; readonly temperature: number | string; }; readonly retries: { readonly abortOnFailure: boolean; readonly maxRetries: number; readonly retryDelay: number; readonly skipLanguageOnFailure: boolean; }; readonly source: { readonly inputPoPath?: string; readonly potFilePath?: string; readonly sourceLanguage: string; readonly targetLanguages: readonly string[]; }; } export interface TranslateInputPlan { readonly config: TranslateConfigSnapshot; readonly preview: TranslateUiPreviewOptions; readonly secrets: PolypotSecrets; readonly settings: TranslateSettingsSnapshot; } export type TranslatePlanBlockerCode = "duplicate_output_file" | "input_po_path_ambiguous" | "missing_pot_file_path" | "missing_target_languages" | "output_path_collision" | "pot_analysis_failed" | "unsupported_provider"; export interface TranslatePlanBlocker { readonly code: TranslatePlanBlockerCode; readonly collisions?: readonly TranslatePathCollision[]; readonly message: string; readonly potFilePath?: string; readonly suppressOutputFile?: boolean; } export interface TranslatePathCollision { readonly path: string; readonly reservations: readonly string[]; } export interface TranslateExecutionPlan extends TranslateInputPlan { readonly document: PotDocument; readonly mergeSources: ReadonlyMap; readonly outputFiles: ReadonlyMap; readonly workload: TranslatePreviewWorkload; } export type TranslateExecutionPlanResult = { readonly ok: true; readonly plan: TranslateExecutionPlan; } | { readonly blocker: TranslatePlanBlocker; readonly input: TranslateInputPlan; readonly ok: false; }; export declare function buildTranslateExecutionPlan(input: TranslateInputPlan): Promise;