/**
 * Scoring input types — normalized evaluation result shapes consumed by
 * pure scoring functions in core/services/scoring.ts.
 *
 * These represent the domain model for evaluation results after
 * Promptfoo-specific normalization. The raw Promptfoo shapes
 * (RawTestResult, RawPromptfooFile) remain in packages/eval.
 */
/** A single grading component result from the evaluation harness */
export interface ComponentResult {
    assertion?: {
        type: string;
        value?: string;
        /** Structured metadata propagated from rubric templates (Approach 5). */
        metadata?: Record<string, unknown>;
    };
    pass: boolean;
    reason?: string;
    score?: number;
}
/** Normalized test result used by scoring functions */
export interface TestResult {
    cost: number;
    description: string;
    gradingResult: {
        componentResults: ComponentResult[];
        pass: boolean;
    };
    /** Per-test latency in ms (propagated from Promptfoo when available) */
    latencyMs?: number;
    metadata?: Record<string, unknown>;
    /** Provider identifier (e.g., "openai:gpt-4o") */
    providerId?: string;
    /** Provider label (e.g., "GPT-4o") */
    providerLabel?: string;
    response: {
        output: string;
        tokenUsage?: {
            cached?: number;
            completion?: number;
            prompt?: number;
            total?: number;
        };
    };
    vars: Record<string, string>;
}
/** Extracted URL metadata from evaluation results */
export interface UrlMetadata {
    otherUrls: string[];
    sanityUrlCount: number;
    sanityUrls: string[];
    totalUrlCount: number;
}
/** Agentic scoring entry — per-area actual scores from tool-based retrieval */
export interface ActualScoreEntry {
    actualScore: number;
    codeCorrectness: number;
    docCoverage: number;
    taskCompletion: number;
    testCount: number;
    totalCost: number;
}
