/**
 * Entity-type equivalence check.
 *
 * Before auto-registering a new schema for an unseen `entity_type`, the
 * storage pipeline asks this service "is there already a registered type
 * that is semantically the same as this one?" If yes, the caller should
 * redirect the store to the existing canonical type instead of creating
 * a near-duplicate schema.
 *
 * This is the schema-agnostic replacement for pair-wise hardcoded
 * collapses like "if place then use places". The algorithm is:
 *
 *   1. Normalize the candidate name (lowercase, trimmed).
 *   2. Compute its singular form via `suggestSingular` (entity_type_guard).
 *   3. For each registered schema (global + user-specific):
 *      a. If schema.aliases includes the candidate, it's a match.
 *      b. If normalized(schema.entity_type) === normalized(candidate), match.
 *      c. If singular(schema.entity_type) === singular(candidate), match.
 *   4. First match wins; callers decide whether to collapse or pass through.
 *
 * The check is bounded: we only look at schemas already stored in the
 * registry, so we never invent new types to compare against.
 */
export interface EquivalenceMatch {
    candidate: string;
    canonical_entity_type: string;
    reason: "alias" | "normalized" | "singular_form";
    schema_scope: "global" | "user";
    schema_id?: string;
}
export interface FindEquivalentOptions {
    userId?: string;
    /**
     * When true (default), suggestions apply to both global and user scopes.
     * When false, only user-scope schemas are considered.
     */
    includeGlobal?: boolean;
}
export declare function findEquivalentEntityType(candidate: string, options?: FindEquivalentOptions): Promise<EquivalenceMatch | null>;
//# sourceMappingURL=entity_type_equivalence.d.ts.map