import { DocxDocument, type AiRevisionDiagnostic, type AiRevisionValidationTouchedContext, type RevisionContext } from '@usejunior/docx-core'; import { type DocxSession } from '../session/manager.js'; import { type ToolResponse } from './types.js'; export declare function cloneRevisionContext(ctx: RevisionContext | undefined): RevisionContext | undefined; export declare function aiRevisionValidationFailure(diagnostics: { errors: AiRevisionDiagnostic[]; warnings: AiRevisionDiagnostic[]; }): ToolResponse; /** * Stable fingerprint for one diagnostic, used to recognize the same finding * across two validation passes of the same session document. */ export declare function aiRevisionDiagnosticKey(d: AiRevisionDiagnostic): string; /** * Multiset of diagnostic fingerprints. Counts matter: structural diagnostics * (field-structure, package invariants) carry no per-instance location, so a * plain Set would let N newly-introduced instances hide behind one * pre-existing instance of the same finding. */ export declare function diagnosticCountMap(diagnostics: AiRevisionDiagnostic[]): Map; /** * Splits errors into those exceeding the pre-existing count for their * fingerprint (introduced — must fail) and those covered by it (demoted to * warnings). Consumes counts so duplicates beyond the baseline count fail. */ export declare function splitIntroducedDiagnostics(errors: AiRevisionDiagnostic[], preExisting: Map): { introduced: AiRevisionDiagnostic[]; demoted: AiRevisionDiagnostic[]; }; /** * Error-fingerprint counts already present in the originally-loaded file. * Documents arrive from the wild with anomalies (unbalanced fields, odd * foreign markup) that no AI operation introduced; those must never * hard-fail a write or save. */ export declare function getAiRevisionBaseline(session: DocxSession): Promise>; export declare function preflightAiRevisionMutation(session: DocxSession, ctx: RevisionContext | undefined, mutatePreview: (doc: DocxDocument, ctx: RevisionContext | undefined) => Promise | void, touched?: AiRevisionValidationTouchedContext): Promise; //# sourceMappingURL=ai_revision_guard.d.ts.map