/**
 * PromptfooCompiler — compiles a TaskGraph into Promptfoo YAML configuration.
 *
 * The compiler is the core of the new architecture. It takes a validated
 * TaskGraph and produces a Promptfoo config that can be executed via
 * `promptfoo eval`.
 *
 * Compilation pipeline:
 *   TaskGraph → resolve fixtures → resolve variables → map assertions
 *             → assemble prompts → assemble providers → emit YAML
 *
 * @see docs/archive/exec-plans/architecture-overhaul/phase-2-config-compiler.md
 */
import type { ModeHandler, ModelsConfig, TaskGraph } from "../../_vendor/ailf-core/index.d.ts";
import type { EvalMode } from "../../_vendor/ailf-shared/index.d.ts";
import { type PromptfooAssertion } from "./assertion-mapper.js";
/** A single Promptfoo test case */
export interface PromptfooTestCase {
    assert?: PromptfooAssertion[];
    description: string;
    vars: Record<string, unknown>;
    /** Prompt filter — which prompts this test case runs against */
    prompts?: string[];
}
/** A compiled Promptfoo configuration */
export interface CompiledPromptfooConfig {
    /** Description header */
    description: string;
    /** Prompt entries (id, label, raw template) */
    prompts: PromptfooPrompt[];
    /** Provider entries */
    providers: PromptfooProvider[];
    /** Test cases */
    tests: PromptfooTestCase[];
    /** Default test configuration */
    defaultTest?: {
        options?: Record<string, unknown>;
    };
    /** Output path for results */
    outputPath?: string;
}
/** A Promptfoo prompt entry */
export interface PromptfooPrompt {
    id: string;
    label: string;
    raw: string;
}
/** A Promptfoo provider entry */
export interface PromptfooProvider {
    id: string;
    label?: string;
    config?: Record<string, unknown>;
}
/** Options for the Promptfoo compiler */
export interface PromptfooCompilerOptions {
    /** The evaluation mode */
    mode: EvalMode;
    /** Model registry */
    models: ModelsConfig;
    /** Root directory for fixture resolution */
    rootDir: string;
    /** Output path for the generated config */
    outputPath?: string;
    /** Grader model provider ID */
    graderProvider?: string;
    /** Prompt templates to use (explicit override) */
    prompts?: PromptfooPrompt[];
    /**
     * Mode handler — when provided, the compiler calls handler.getPrompts()
     * and uses those templates before falling back to explicit prompts or
     * built-in defaults.
     */
    handler?: ModeHandler;
}
/** Result of compilation */
export interface CompilationResult {
    /** The compiled Promptfoo config */
    config: CompiledPromptfooConfig;
    /** Warnings generated during compilation */
    warnings: string[];
    /** Number of tasks compiled */
    taskCount: number;
    /** Number of test cases generated */
    testCaseCount: number;
}
/**
 * Compile a TaskGraph into a Promptfoo configuration.
 *
 * Traverses the graph in topological order, resolves fixtures and
 * variables for each node, maps assertions, and assembles the final
 * Promptfoo config.
 */
export declare function compileToPromptfoo(graph: TaskGraph, options: PromptfooCompilerOptions): CompilationResult;
