/**
 * Duplicate Detection Service (R5)
 *
 * Read-only, on-demand detector that surfaces candidate duplicate pairs for
 * operator or agent review. Never auto-merges. Hands off to
 * {@link ../services/entity_merge.ts#mergeEntities} when the reviewer
 * confirms a pair.
 *
 * Per schema_agnostic_design_rules: schemas drive behavior via
 * {@link SchemaDefinition.duplicate_detection_fields} and
 * {@link SchemaDefinition.duplicate_detection_threshold}. When a schema
 * omits these, the detector falls back to comparing canonical_name with a
 * default threshold of 0.85, which is the weakest acceptable signal.
 *
 * Doctrine preserved: identity resolution stays deterministic via the
 * `entity_type + canonical_name` hash; fuzzy matching lives here, post-hoc.
 */
export interface DuplicateCandidatePair {
    entity_a: {
        id: string;
        canonical_name: string;
        snapshot_fields?: Record<string, unknown>;
    };
    entity_b: {
        id: string;
        canonical_name: string;
        snapshot_fields?: Record<string, unknown>;
    };
    score: number;
    matched_fields: string[];
    entity_type: string;
}
export interface FindDuplicateCandidatesParams {
    entityType: string;
    userId: string;
    threshold?: number;
    limit?: number;
}
/**
 * Normalized string similarity in [0, 1] derived from Levenshtein distance.
 * Returns 1.0 for identical inputs and 0 for fully dissimilar inputs of
 * equivalent length.
 */
export declare function stringSimilarity(a: string, b: string): number;
/**
 * Find candidate duplicate entity pairs for a given entity_type within one
 * user's scope. Read-only.
 */
export declare function findDuplicateCandidates(params: FindDuplicateCandidatesParams): Promise<DuplicateCandidatePair[]>;
//# sourceMappingURL=duplicate_detection.d.ts.map