/** * Marker format version. Bump ONLY if the normalization rules or the marker grammar * change — i.e. if the same body would hash differently. The algorithm is tagged * separately (`sha256:`), so swapping algorithms does not need a version bump. */ export declare const FINGERPRINT_FORMAT_VERSION = 1; /** * Canonicalize a view body for hashing. * * Collapses whitespace (so reindenting the emitter does not re-stamp every deployed * view) and strips an optional CREATE VIEW wrapper and trailing semicolon — and * NOTHING else. * * Deliberately does NOT lowercase, unlike `normalizeViewSql`. That lowercasing exists * only to chase Postgres's deparser, and it masks drift inside case-sensitive string * literals — which `origin.aggregate @filter` predicates now carry (`status = 'Active'` * and `status = 'active'` are different views). We never chase the deparser here, so * there is nothing to buy and real drift to lose. */ export declare function normalizeForFingerprint(body: string): string; /** sha256 of the normalized body, lowercase hex. */ export declare function viewFingerprint(body: string): string; /** The marker line stamped into `COMMENT ON VIEW`. */ export declare function renderFingerprintMarker(fingerprint: string): string; /** * Read a fingerprint marker out of a view's comment. * * Returns null when there is no marker — meaning the view carries no MetaObjects * stamp and is therefore either hand-written or older than fingerprinting. Callers * MUST fail closed on null: on Postgres those two cases are indistinguishable, and * overwriting the first destroys hand-written SQL nothing can restore. * * An unknown VERSION still parses (the view is ours, stamped by a different * toolchain) — the caller re-stamps it, which makes format migration self-healing. */ export declare function parseFingerprintMarker(comment: string | null | undefined): { version: number; fingerprint: string; } | null; //# sourceMappingURL=view-fingerprint.d.ts.map