/**
 * Diagnostic extraction helpers for evidence-gate failure analysis.
 *
 * Extracts structured failure information from command stdout/stderr,
 * classifies the failure kind, and builds a human-readable diagnosis.
 */
export type EvidenceFailureKind = "build_error" | "type_error" | "test_failure" | "lint_failure" | "missing_file" | "no_diff" | "wrong_output" | "policy_violation" | "ambiguous";
export interface DiagnosticExtraction {
    primaryError: string;
    location: string;
    likelyCause: string;
    requiredFix: string;
}
export declare function tailLines(text: string, n?: number): string;
export declare function redactDiagnosticText(text: string): string;
export declare function classifyFailure(command: string | undefined, exitCode: number | undefined, stderr: string): EvidenceFailureKind;
export declare function extractTsError(stderr: string): DiagnosticExtraction | null;
export declare function extractTestError(stderr: string, stdout: string): DiagnosticExtraction | null;
export declare function extractLintError(stderr: string): DiagnosticExtraction | null;
export declare function extractGenericError(stderr: string): DiagnosticExtraction;
export declare function inferTsCause(code: string, msg: string): string;
export declare function suggestTsFix(code: string, msg: string): string;
export declare function buildDiagnosis(kind: EvidenceFailureKind, extraction: DiagnosticExtraction): string;
export declare function compressDiagnostic(command: string | undefined, exitCode: number | undefined, stdout: string, stderr: string): {
    failureKind: EvidenceFailureKind;
    diagnosis: string;
};
