/**
 * Failure taxonomy — canonical classes + a default classifier.
 *
 * Every failed run should end up in a named class. The classifier here
 * is rule-based (fast, deterministic); an LLM fallback can be added by
 * the consumer for novel cases and trained into the rule base over time.
 *
 * Consumers call `classifyFailure(run, spans, events)` and persist the
 * returned class as `Run.outcome.failureClass`.
 */
import type { FailureClass, Run, Span, TraceEvent } from './trace/schema';
import { FAILURE_CLASSES } from './trace/schema';
export { FAILURE_CLASSES, type FailureClass };
export interface FailureContext {
    run: Run;
    spans: Span[];
    events: TraceEvent[];
}
export interface FailureClassification {
    failureClass: FailureClass;
    reason: string;
    triggerSpanId?: string;
    triggerEventId?: string;
}
/** Ordered rules — first match wins. */
export interface FailureRule {
    id: string;
    match: (ctx: FailureContext) => {
        failureClass: FailureClass;
        reason: string;
        triggerSpanId?: string;
        triggerEventId?: string;
    } | null;
}
export declare const DEFAULT_RULES: FailureRule[];
/** Classify the failure mode of a run using an ordered rule list. */
export declare function classifyFailure(ctx: FailureContext, rules?: FailureRule[]): FailureClassification;
//# sourceMappingURL=failure-taxonomy.d.ts.map