/**
 * Unified config file loader — resolves TS/JS/YAML/JSON with format priority.
 *
 * Provides a single `loadConfigFile()` function that replaces the scattered
 * `readFileSync + load(raw)` pattern throughout the pipeline. Checks for
 * TypeScript/JavaScript config files first (via jiti), falling back to YAML
 * and JSON — matching the resolution order established in Phase 1.
 *
 * Priority: `.ts` > `.js` > `.yaml` > `.yml` > `.json`
 *
 * Usage:
 * ```ts
 * // Before (scattered pattern):
 * const raw = readFileSync(resolve(rootDir, "config", "models config"), "utf-8")
 * const config = load(raw) as ModelsConfig
 *
 * // After:
 * const config = loadConfigFile<ModelsConfig>("models", rootDir)
 * ```
 *
 * @see packages/eval/src/adapters/config-sources/ts-config-loader.ts — jiti loader
 * @see docs/design-docs/architecture-overhaul/typescript-configuration.md
 */
export interface ConfigLoadResult<T> {
    /** The parsed configuration data */
    data: T;
    /** The file that was loaded */
    filePath: string;
    /** The format that was used */
    format: "ts" | "js" | "yaml" | "json";
}
/**
 * Load a config file by name, searching for TS/JS/YAML/JSON variants.
 *
 * @param name - Config name without extension (e.g., "models", "rubrics")
 * @param rootDir - Package root directory containing `config/`
 * @param options - Optional: subdirectory (default "config"), required flag
 * @returns The parsed config data
 * @throws If the file is not found (when required) or fails to parse
 */
export declare function loadConfigFile<T>(name: string, rootDir: string, options?: {
    subdir?: string;
}): ConfigLoadResult<T>;
/**
 * Try to load a config file, returning null if not found.
 * Equivalent to loadConfigFile with required: false but with a cleaner API.
 */
export declare function tryLoadConfigFile<T>(name: string, rootDir: string, options?: {
    subdir?: string;
}): ConfigLoadResult<T> | null;
/** Sentinel error for config-not-found (distinct from parse errors) */
export declare class ConfigNotFoundError extends Error {
    readonly configName: string;
    readonly searchDir: string;
    constructor(configName: string, searchDir: string);
}
/**
 * Resolve a package subdirectory, preferring the vendored copy in dist/
 * when @sanity/ailf-core isn't directly resolvable (i.e., installed outside
 * the monorepo via npx or npm).
 *
 * The build step (bundle-workspace-deps.ts) copies config/ and tasks/ into
 * dist/ with @sanity/ailf-core imports rewritten to the _vendor/ path.
 * This function detects that situation and returns the dist/ path instead.
 *
 * @param rootDir - Package root directory (packages/eval)
 * @param subdir - Subdirectory to resolve (e.g., "config", "tasks/literacy")
 * @returns The resolved subdirectory path — either source or dist/ vendored
 */
export declare function resolveVendoredSubdir(rootDir: string, subdir: string): string;
