/**
 * GoldenMatcher — fuzzy matcher for "did the agent produce the expected things?".
 *
 * Universal primitive across agent-eval consumers. Use it for:
 *   - Test suites: did the run hit the expected assertions?
 *   - Tool agents: did the agent emit the expected tool call sequence?
 *   - Judges: did the verdict include the expected concepts?
 *   - Design audits: did the auditor surface the planted defects?
 *
 * Match rule (per golden):
 *   - Any phrase in `golden.any` (case-insensitive substring) appears in the
 *     candidate's text fields, OR
 *   - Any pattern in `golden.anyRegex` (case-insensitive) matches.
 *
 * Recall is severity-weighted by default: critical=3, major=2, minor=1.
 * Missing one critical hurts more than missing three minors.
 */
export type GoldenSeverity = 'critical' | 'major' | 'minor';
export interface GoldenSpec {
    /** Stable identifier — survives across runs so consumers can grep by id. */
    id: string;
    /** Severity drives recall weighting. */
    severity: GoldenSeverity;
    /**
     * Substring phrases (case-insensitive). A hit on ANY phrase counts as a
     * match. Keep these SHORT (3-6 words) and SPECIFIC.
     */
    any: string[];
    /** Optional regex patterns. ORed with `any`. */
    anyRegex?: string[];
    /** Free-form note — surfaces in reports for humans. */
    hint?: string;
    /** Optional category for grouping/filtering. */
    category?: string;
}
export interface MatchResult {
    /** Same length as goldens; `true` when matched. */
    matches: boolean[];
    /** Convenience: count of hits. */
    hits: number;
    /** Convenience: total goldens. */
    total: number;
}
/**
 * Match each golden against `candidates`, where each candidate exposes one or
 * more text fields the matcher should search. Defaults to searching all
 * string-typed fields concatenated.
 */
export declare function matchGoldens<T>(goldens: GoldenSpec[], candidates: T[], options?: {
    /**
     * Extract the searchable text for a candidate. Default: concatenate every
     * top-level string field with a space.
     */
    text?: (candidate: T) => string;
}): MatchResult;
/** Severity weights — exposed so consumers can override (rare). */
export declare const DEFAULT_SEVERITY_WEIGHTS: Record<GoldenSeverity, number>;
/** Severity-weighted recall over a MatchResult + the goldens that produced it. */
export declare function weightedRecall(goldens: GoldenSpec[], result: MatchResult, weights?: Record<GoldenSeverity, number>): number;
/**
 * Precision proxy: fraction of emitted candidates that match SOME golden.
 *
 * No human-labelled negatives means unmatched candidates are SOFT false
 * positives — punishes verbose agents that pad with filler. Doesn't punish
 * unknown-but-real findings; the way to tighten this is to grow the golden
 * set, not to invent a stricter score.
 */
export declare function precision<T>(goldens: GoldenSpec[], candidates: T[], options?: {
    text?: (candidate: T) => string;
}): number;
//# sourceMappingURL=golden-matcher.d.ts.map