/**
 * TaskGraphBuilder — converts task definitions into a TaskGraph IR.
 *
 * The builder is the first stage of the compilation pipeline:
 *   GeneralizedTaskDefinitions → TaskGraphBuilder → TaskGraph → PromptfooCompiler → YAML
 *
 * Responsibilities:
 * - Accept tasks from any source (TS, YAML, Content Lake)
 * - Apply area/tag/mode filtering
 * - Resolve inter-task dependencies into edges
 * - Validate the graph is a DAG (reject cycles)
 * - Assign execution priority via topological sort
 *
 * @see packages/core/src/types/task-graph.ts — TaskGraph types
 * @see docs/archive/exec-plans/architecture-overhaul/phase-2-config-compiler.md
 */
import type { DependencyEdge, FilterOptions, GeneralizedTaskDefinition, TaskGraph, TaskNode } from "../../_vendor/ailf-core/index.d.ts";
/** Options for building a task graph */
export interface TaskGraphBuildOptions {
    /** Task definitions from any source */
    tasks: GeneralizedTaskDefinition[];
    /** Optional filter to narrow task set */
    filter?: FilterOptions;
    /** Compilation target backend */
    compilationTarget?: "custom" | "promptfoo";
}
/** Result of building a task graph */
export interface TaskGraphBuildResult {
    /** The built graph (null if no tasks survived filtering) */
    graph: TaskGraph | null;
    /** Warnings emitted during build (non-fatal) */
    warnings: string[];
    /** Tasks that were filtered out */
    filteredOut: string[];
}
/**
 * Build a TaskGraph from task definitions.
 *
 * 1. Filters tasks by area, tags, task IDs, and status
 * 2. Creates TaskNodes with resolved variables
 * 3. Discovers dependency edges from task metadata
 * 4. Validates the graph is acyclic
 * 5. Assigns topological priority
 */
export declare function buildTaskGraph(options: TaskGraphBuildOptions): TaskGraphBuildResult;
/**
 * Detect cycles in the task graph using Kahn's algorithm.
 *
 * @returns null if acyclic, or the cycle path as a string array
 */
export declare function detectCycle(nodes: Map<string, TaskNode>, edges: DependencyEdge[]): string[] | null;
