import { type TCoreArgument, type TCorePropositionalExpression, type TCorePropositionalVariable } from "../schemata/index.js"; import type { TCoreValidationResult } from "../types/evaluation.js"; import type { TInvariantValidationResult } from "../types/validation.js"; /** * Read-only interface providing the data validation needs from an * argument engine. This is intentionally narrow — validation should * not mutate anything beyond flushing checksums. */ export interface TArgumentValidationContext { argumentId: string; argumentVersion: number; conclusionPremiseId: string | undefined; getArgument(): TCoreArgument; getVariables(): TCorePropositionalVariable[]; listPremises(): TValidatablePremise[]; hasPremise(premiseId: string): boolean; lookupClaim(claimId: string, claimVersion: number): unknown; flushAndGetChecksumDeltas(): { savedMeta: string | undefined; savedDescendant: string | null | undefined; savedCombined: string | undefined; currentMeta: string | undefined; currentDescendant: string | null | undefined; currentCombined: string | undefined; }; validateVariables(): TInvariantValidationResult; wouldCreateCycle(variableId: string, premiseId: string, visited: Set): boolean; } /** * Narrow view of a PremiseEngine needed for validation. */ export interface TValidatablePremise { getId(): string; validate(): TInvariantValidationResult; validateEvaluability(): TCoreValidationResult; getExpressions(): TCorePropositionalExpression[]; getVariables(): TCorePropositionalVariable[]; } /** * Indexes variables referenced across all premises by ID and by symbol. */ export declare function collectArgumentReferencedVariables(ctx: TArgumentValidationContext): { variableIds: string[]; byId: Record; bySymbol: Record; }; /** * Lightweight validation triggered after a PremiseEngine mutation. * Skips per-premise deep validation (which is O(n) over all premises) * and argument-level checksum stability checks (checksums are known to * be dirty). Only checks argument-level cross-references that a * PremiseEngine mutation could affect. */ export declare function validateArgumentAfterPremiseMutation(ctx: TArgumentValidationContext): TInvariantValidationResult; /** * Comprehensive invariant validation for an argument. Performs 9 checks: * schema conformance, variable manager validation, per-premise validation, * variable ownership, claim-bound references, premise-bound references, * circularity detection, conclusion reference, and checksum stability. */ export declare function validateArgument(ctx: TArgumentValidationContext): TInvariantValidationResult; /** * Pre-evaluation structural validation. Checks conclusion presence, * variable-to-symbol consistency, symbol-to-variable uniqueness, * and delegates to per-premise evaluability checks. */ export declare function validateArgumentEvaluability(ctx: TArgumentValidationContext): TCoreValidationResult; //# sourceMappingURL=argument-validation.d.ts.map