import type { ConversionUnit, GeneratedConversionUnit } from "../../workflows/types.ts"; export declare class DirectCandidateValidationError extends Error { constructor(message: string); } /** * Validate a complete source candidate without importing or executing it. * Python uses its real AST so indentation, grammar, same-name nested * definitions, and trivially unreachable statements are covered; other * supported text languages retain the conservative delimiter parser. */ export declare function validateCandidateFileSyntax(sourcePath: string, candidate: string, baseline?: string): Promise; /** Remove exact surrounding-code repetition without guessing at new behavior. */ export declare function normalizeGeneratedUnitCode(unit: ConversionUnit, code: string): string; /** * Compiler mode may safely peel a full function wrapper from a fragment-only * answer because discovery has already proven the exact grammar slot. This is * not used by agent mode and never invents behavior: it only removes syntax * that belongs to the surrounding source. */ export declare function normalizeCompilerGeneratedUnitCode(unit: ConversionUnit, code: string): string; export declare function candidateTextForUnit(unit: ConversionUnit, code: string): Promise; /** Build complete candidate text per target, combining every marker in a file. */ export declare function candidateTextsForGenerated(generated: readonly GeneratedConversionUnit[]): Promise>; /** Validate the complete candidate file before any direct-agent write occurs. */ export declare function validateGeneratedUnit(unit: ConversionUnit, code: string): Promise; //# sourceMappingURL=candidate-validation.d.ts.map