/** * ForensicsClassifier, auto-classifies failures from event context. * * Maps combinations of stop reasons, error messages, event sequences, * and cascade presence to a FailureClass without requiring manual log * spelunking. Classification is heuristic and exposes the matched class. */ import type { FailureClass } from './types.js'; /** Inputs available to the classifier at report generation time. */ interface ClassifierInput { /** Stop reason from the LLM provider (if any). */ readonly stopReason?: string | undefined; /** Error message from the terminal event. */ readonly errorMessage?: string | undefined; /** Whether this entity was explicitly cancelled by the operator. */ readonly wasCancelled?: boolean | undefined; /** Whether any cascade events were present in the causal context. */ readonly hasCascadeEvents?: boolean | undefined; /** Whether any tool calls failed in this turn/task. */ readonly hasToolFailure?: boolean | undefined; /** Whether any permission check was denied. */ readonly hasPermissionDenial?: boolean | undefined; /** Whether a compaction error was recorded. */ readonly hasCompactionError?: boolean | undefined; } /** * Classify a failure based on available event context. * Rules are evaluated in priority order, first match wins. * * @returns The classified FailureClass. */ export declare function classifyFailure(input: ClassifierInput): FailureClass; /** * Human-readable summary string for a classified failure. * Used as the FailureReport.summary. */ export declare function summariseFailure(classification: FailureClass, errorMessage?: string, stopReason?: string): string; export {}; //# sourceMappingURL=classifier.d.ts.map