/**
 * Unified judge accessor — single source of truth for "what the LLM judge
 * said" on an EvaluationReport.
 *
 * Background: historically the judge verdict + reasoning lived in two
 * parallel surfaces:
 *
 *   1. report.llmJudgeReasoning (string) — written by the legacy
 *      auto-judge path (services/evaluation/index.ts and the various
 *      runners that call callBedrockJudge against expectedOutcomes).
 *      One per report, last writer wins.
 *
 *   2. report.matcherResults[*] with method: 'llm-judge' — written by
 *      the SDK `judge(result, claim)` matcher. Many per report.
 *
 * Both ultimately come from the same Bedrock Judge endpoint. Storing
 * them in two places caused real bugs (notably issue #230, where the
 * trace-mode placeholder leaked into the legacy field and bled through
 * to the UI for deterministic SDK runs).
 *
 * The fix: `matcherResults[]` is the canonical surface. The legacy
 * `llmJudgeReasoning` field is kept populated as a derived
 * convenience for backward-compat readers, but new code MUST use
 * {@link getJudgeMatcherResults} on the read side and
 * {@link recordJudgeMatcherResult} on the write side.
 */
import type { MatcherResult } from './types.js';
/** A minimal duck-typed report shape — accepts any object with the two fields. */
export interface JudgeAccessReport {
    matcherResults?: MatcherResult[];
    llmJudgeReasoning?: string;
}
/**
 * Returns every llm-judge MatcherResult on the report, including a
 * synthetic entry derived from the legacy `llmJudgeReasoning` field
 * when the report pre-dates the unified surface.
 *
 * Read-only: nothing is written back to the report.
 *
 * Behaviour matrix:
 *
 * | matcherResults has [llm-judge] | llmJudgeReasoning      | Returns                    |
 * |--------------------------------|------------------------|----------------------------|
 * | yes                            | anything               | the existing entries       |
 * | no                             | empty / placeholder    | []                         |
 * | no                             | real reasoning         | [<synthetic entry>]        |
 *
 * The placeholder string `Waiting for traces to become available...`
 * is treated as "no judge ran yet" \u2014 see issue #230.
 */
export declare function getJudgeMatcherResults(report: JudgeAccessReport): MatcherResult[];
/**
 * Convenience: the single most recent llm-judge reasoning string, or
 * empty when no judge ran. Used by surfaces that historically read
 * `llmJudgeReasoning` directly (HTML report, skills grader, compare
 * view) and only need a flat string.
 */
export declare function getJudgeReasoningText(report: JudgeAccessReport): string;
/**
 * Convert a `JudgeResult` from `callBedrockJudge` into a `MatcherResult`.
 * Pure: doesn't touch any report. Used by inline-return code paths in
 * services/evaluation/index.ts where building a fresh report object is
 * cleaner than the mutate-then-return pattern.
 */
export declare function buildJudgeMatcherEntry(judgeResult: JudgeResultLike, options?: {
    claim?: string;
    model?: string;
}): MatcherResult;
/**
 * Format an arbitrary `expectedOutcomes` value into a single description
 * fragment suitable for the matcher entry's `description` field. Accepts
 * the SDK's flat `string[]` *and* the legacy `{ rootCauses, requiredFacts,
 * conclusions }` object — both shapes appear on persisted test cases.
 */
export declare function formatExpectedOutcomesAsClaim(outcomes?: unknown): string;
/**
 * Convert a `JudgeResult` from `callBedrockJudge` into a `MatcherResult`
 * and append it to `report.matcherResults`. Also keeps the legacy
 * `report.llmJudgeReasoning` field populated as a derived
 * backward-compat shim (it equals the reasoning of the just-pushed
 * entry, so direct readers continue to work).
 *
 * Mutates the passed report and returns the matcher entry.
 *
 * The `claim` argument is what the auto-judge was evaluating against
 * (the test case's expected outcomes). The matcher description ends
 * up as `judge: <claim>` matching the SDK convention.
 */
export declare function recordJudgeMatcherResult(report: JudgeAccessReport & {
    matcherResults?: MatcherResult[];
    llmJudgeReasoning?: string;
}, judgeResult: JudgeResultLike, options?: {
    claim?: string;
    model?: string;
}): MatcherResult;
/** Subset of `JudgeResult` we depend on \u2014 keeps this module type-import-light. */
export interface JudgeResultLike {
    passFailStatus: 'passed' | 'failed';
    metrics: {
        accuracy?: number;
        [k: string]: number | undefined;
    };
    llmJudgeReasoning: string;
    judgeDurationMs?: number;
    improvementStrategies?: Array<{
        category: string;
        issue: string;
        recommendation: string;
        priority: 'high' | 'medium' | 'low';
    }>;
}
export type { JudgeResult } from '../../types/index.js';
//# sourceMappingURL=judgeAccessor.d.ts.map