/** * @fileoverview Semantic Canonicalization (SPEC Section 11) * * Canonicalize for similarity search - removes ValueTerm.raw and ext. * Same meaning -> same bytes (regardless of surface form). */ import type { IntentIR } from "../schema/index.js"; /** * Semantically canonicalize IntentIR. * * Used for: simKey generation, similarity search, clustering. * * Rules applied: * 1. Uppercase lemma * 2. Normalize terms (remove raw + ext) * 3. Sort args keys lexicographically (RFC 8785) * 4. Sort cond predicates * 5. Remove empty optional fields * * Invariants: * - Idempotent: canonicalize(canonicalize(ir)) === canonicalize(ir) * - Order-invariant: cond order doesn't affect result */ export declare function canonicalizeSemantic(ir: IntentIR): IntentIR; /** * Serialize semantically canonicalized IntentIR to JCS string. */ export declare function toSemanticCanonicalString(ir: IntentIR): string; //# sourceMappingURL=semantic.d.ts.map