import type { LspDiagnostic, LspDiagnosticResult, LspPublishDiagnosticsParams } from "./types.js"; /** * Diagnostics as read-only code intelligence, a transaction validation gate, * and post-edit evidence. LSP diagnostics SUPPLEMENT builds/tests; they never * replace them and never become an execution authority. */ export interface DiagnosticsComparison { before: DiagnosticSummary; after: DiagnosticSummary; errorsIntroduced: number; errorsResolved: number; warningsIntroduced: number; warningsResolved: number; } export interface DiagnosticSummary { total: number; errors: number; warnings: number; informations: number; hints: number; } export declare function summarizeDiagnostics(rows: LspDiagnosticResult[]): DiagnosticSummary; /** Converts published diagnostics into workspace-relative, deduped, capped rows. */ export declare function getDiagnosticRows(params: LspPublishDiagnosticsParams | null, workspaceRoot: string, _serverId: string, maxCount?: number): LspDiagnosticResult[]; export declare function toWorkspaceRelative(uri: string, workspaceRoot: string): string; export type WarningPolicy = "allow" | "block"; export interface DiagnosticGateConfig { failOnNewLspErrors: boolean; allowExistingBaselineErrors: boolean; warningPolicy: WarningPolicy; diagnosticScope?: "affected_files" | "workspace"; } export declare const DEFAULT_DIAGNOSTIC_GATE_CONFIG: DiagnosticGateConfig; export interface DiagnosticGateResult { passed: boolean; reason?: string; comparison: DiagnosticsComparison; } /** * Compare before/after diagnostics for a transaction. The safe default is "no * new errors in affected files". Baseline errors may be allowed; new errors * fail the gate when `failOnNewLspErrors`. */ export declare function evaluateDiagnosticGate(before: LspDiagnosticResult[], after: LspDiagnosticResult[], config?: Partial): DiagnosticGateResult; export type { LspDiagnostic }; //# sourceMappingURL=diagnostics.d.ts.map