import type { NormalizedWorkflowSpec } from '../spec-intake/types.js';
import type { GenerationValidationResult, RefinementMetadata, RenderedArtifact } from './types.js';
export interface RefinementEdit {
    region: 'task_descriptions' | 'acceptance_gates';
    find: string;
    replace: string;
}
export interface RefinementClientResult {
    text: string;
    elapsedMs?: number;
    inputTokens?: number;
    outputTokens?: number;
}
export interface RefinementClient {
    refine(input: {
        model: string;
        spec: string;
        artifact: string;
    }): RefinementClientResult;
}
export interface RefineWithLlmOptions {
    model?: string;
    timeoutMs?: number;
    maxInputTokens?: number;
    maxOutputTokens?: number;
    client?: RefinementClient;
    validate?: (artifact: RenderedArtifact) => GenerationValidationResult;
}
export declare function refineWithLlm(spec: NormalizedWorkflowSpec, artifact: RenderedArtifact, options?: RefineWithLlmOptions): {
    artifact: RenderedArtifact;
    metadata: RefinementMetadata;
};
