/** * Thin deterministic drift check: compare a fresh export from IR to an on-disk tree * or to an in-memory file map (Cloud API). No semantic IR↔code analysis — regen vs reality. */ import { type DeterministicExportResult } from './exportPipeline.js'; import type { ValidateIrLintOptions } from './ir-lint.js'; export type DriftCode = 'DRIFT-MISSING' | 'DRIFT-MODIFIED' | 'DRIFT-EXTRA' | 'DRIFT-NO-EXPORT'; export type DriftFinding = { code: DriftCode; path: string; message: string; }; export declare function normalizeExportFileContent(content: string): string; /** * Compare expected export map to an actual map (e.g. from client or built from disk reads). */ export declare function diffExpectedExportAgainstFiles(expected: Record, actual: Record, options?: { strictExtra?: boolean; }): DriftFinding[]; /** * Read all files under rootDir into a flat map (relative POSIX paths). */ export declare function readDirectoryAsExportMap(rootDir: string): Promise>; export declare function diffExpectedExportAgainstDirectory(expected: Record, rootDir: string, options?: { strictExtra?: boolean; }): Promise; export type ValidateDriftResult = { ok: boolean; driftFindings: DriftFinding[]; /** True when --strict-extra and any DRIFT-EXTRA was found */ extraBlocking: boolean; exportResult: DeterministicExportResult; }; export declare function runValidateDrift(actualIR: any, target: string, outDir: string, opts?: { hostPort?: string | number; skipIrStructuralValidation?: boolean; skipIrLint?: boolean; strictExtra?: boolean; lintProfile?: ValidateIrLintOptions['lintProfile']; policyRuleVisitors?: ValidateIrLintOptions['policyRuleVisitors']; }): Promise; export type DriftCheckFilesResult = { ok: boolean; driftFindings: DriftFinding[]; extraBlocking: boolean; exportResult: DeterministicExportResult; }; /** * Cloud / API: compare a fresh deterministic export to a client-supplied file map (e.g. last export or repo snapshot). */ export declare function runDriftCheckAgainstFiles(actualIR: any, target: string, actualFiles: Record, opts?: { hostPort?: string | number; skipIrStructuralValidation?: boolean; skipIrLint?: boolean; strictExtra?: boolean; lintProfile?: ValidateIrLintOptions['lintProfile']; policyRuleVisitors?: ValidateIrLintOptions['policyRuleVisitors']; }): Promise; //# sourceMappingURL=validate-drift.d.ts.map