/**
 * EvalModeConfig — Rich discriminated union for evaluation mode configuration.
 *
 * This is the NEW type system for evaluation modes, introduced in the
 * architecture overhaul (Phase 0). It carries per-mode configuration
 * payloads that the compiler and new evaluation modes use.
 *
 * The existing `EvalMode` string union in @sanity/ailf-shared remains
 * unchanged — it is the lightweight identifier used throughout the
 * existing pipeline. `EvalModeConfig` is the rich type that new code
 * authors against.
 *
 * @see docs/design-docs/architecture-overhaul/domain-model.md (canonical)
 */
import type { EvalMode } from "../../ailf-shared/index.d.ts";
/** Configuration for documentation source resolution in literacy mode */
export interface DocSourceConfig {
    /** Source name from config/sources.yaml */
    name: string;
    /** Override the base URL for doc fetching */
    baseUrl?: string;
    /** Sanity dataset to fetch from */
    dataset?: string;
    /** Sanity project ID */
    projectId?: string;
    /** Content release perspective */
    perspective?: string;
}
/** Configuration for an MCP server under test */
export interface MCPServerConfig {
    /** Transport protocol */
    transport: "stdio" | "sse" | "streamable-http";
    /** Command to start the server (for stdio transport) */
    command?: string;
    /** Server URL (for sse/streamable-http transport) */
    url?: string;
    /** Environment variables to pass to the server process */
    env?: Record<string, string>;
    /** Startup timeout in milliseconds */
    startupTimeoutMs?: number;
}
/** Configuration for an agent harness under test */
export interface AgentHarnessConfig {
    /** Runtime environment identifier */
    runtime: string;
    /** Entry point for the agent (file path or module specifier) */
    entrypoint: string;
    /** Maximum execution time per test case */
    timeoutMs?: number;
    /** Sandbox configuration */
    sandbox?: SandboxConfig;
}
/** Sandbox configuration for isolated agent execution */
export interface SandboxConfig {
    /** Sandbox type */
    type: "docker" | "git-worktree" | "none" | "nsjail" | "tempdir";
    /** Docker image (when type is "docker") */
    image?: string;
    /** Resource limits */
    limits?: {
        /** CPU cores */
        cpus?: number;
        /** Memory in bytes */
        memoryBytes?: number;
        /** Disk space in bytes */
        diskBytes?: number;
        /** Network access allowed */
        networkAccess?: boolean;
    };
}
/** Tool definition for agent harness mode */
export interface ToolDef {
    /** Tool name */
    name: string;
    /** Tool description (for the agent's tool manifest) */
    description: string;
    /** JSON Schema for the tool's input parameters */
    inputSchema?: Record<string, unknown>;
}
/** Reference to a knowledge base for knowledge-probe mode */
export interface KnowledgeBaseRef {
    /** Knowledge base type */
    type: "sanity-dataset" | "embeddings-index" | "file-corpus";
    /** Dataset or index name */
    name: string;
    /** Additional configuration */
    config?: Record<string, unknown>;
}
/** Probing strategy for knowledge-probe mode */
export type ProbeStrategy = "breadth-first" | "depth-first" | "random-sample" | "coverage-guided";
/** Literacy mode — documentation quality evaluation (the original AILF mode) */
export interface LiteracyModeConfig {
    type: "literacy";
    /** Documentation sources to evaluate against */
    docSources: DocSourceConfig[];
    /** Whether to compute retrieval metrics (precision/recall/F1) */
    retrievalMetrics: boolean;
}
/** MCP server mode — evaluates an MCP server's tool/resource capabilities */
export interface MCPServerModeConfig {
    type: "mcp-server";
    /** The MCP server under test */
    serverConfig: MCPServerConfig;
    /** Expected capabilities to verify (e.g., "tools/list", "resources/read") */
    capabilities: string[];
}
/** Agent harness mode — evaluates an autonomous agent in a sandboxed environment */
export interface AgentHarnessModeConfig {
    type: "agent-harness";
    /** Agent configuration */
    agentConfig: AgentHarnessConfig;
    /** Tools available to the agent */
    toolManifest: ToolDef[];
}
/** Knowledge probe mode — measures knowledge coverage across a corpus */
export interface KnowledgeProbeModeConfig {
    type: "knowledge-probe";
    /** The knowledge base to probe */
    knowledgeBase: KnowledgeBaseRef;
    /** How to traverse the knowledge space */
    probeStrategy: ProbeStrategy;
}
/** Custom mode — user-provided evaluation handler */
export interface CustomModeConfig {
    type: "custom";
    /** Module path to the custom handler implementing EvalModeHandler */
    handler: string;
    /** Freeform schema for mode-specific configuration */
    schema: Record<string, unknown>;
}
/**
 * Rich discriminated union for evaluation mode configuration.
 *
 * Discriminant: `type` field.
 *
 * New code should use `EvalModeConfig` for structured mode configuration.
 * The string-level `EvalMode` type remains for pipeline options, report
 * provenance, GROQ filters, and Studio UI.
 */
export type EvalModeConfig = LiteracyModeConfig | MCPServerModeConfig | AgentHarnessModeConfig | KnowledgeProbeModeConfig | CustomModeConfig;
/** All valid mode type strings from EvalModeConfig */
export type EvalModeType = EvalModeConfig["type"];
/**
 * Extract the string-level EvalMode from a rich EvalModeConfig.
 *
 * This bridges the new discriminated union with the existing string
 * union used throughout the pipeline. The returned value is always
 * a valid `EvalMode` string.
 */
export declare function evalModeType(config: EvalModeConfig): EvalMode;
