//#region src/mapping-score.d.ts export type Tier = "High" | "Medium" | "Low"; export interface Scored { /** Human-readable chips, e.g. `type text`, `name matches "contacts"`. */ reasons: string[]; /** Internal — used for ranking and the apply threshold. Never rendered. */ score: number; tier: Tier; value: T; } /** Tier cut-offs: score >= high → High; >= medium → Medium; else Low. */ export interface Thresholds { high: number; medium: number; } export declare const CONCEPT_TIERS: Thresholds; export declare const FIELD_TIERS: Thresholds; export declare const RELATIONSHIP_TIERS: Thresholds; /** Two concept candidates closer than this are treated as ambiguous. */ export declare const AMBIGUITY_MARGIN = 15; /** Signal weights. Tuned against fixtures; adjust here, not at call sites. */ export declare const W: { readonly nameExact: 50; readonly nameSubstring: 25; readonly definingColumn: 20; readonly hasPrimaryKey: 10; readonly hasRows: 10; readonly emptyTable: -20; readonly fieldNameMatch: 50; readonly typeCompatible: 30; readonly typeMismatch: -30; readonly requiredNotNull: 10; readonly fkResolved: 60; readonly fkNameHint: 30; readonly joinTable: 20; }; export declare function tierFor(score: number, t: Thresholds): Tier; export declare function isTextLike(type: string | undefined): boolean; export declare function isNumericLike(type: string | undefined): boolean; export declare function isTimestampLike(type: string | undefined): boolean; /** * True when the top two candidates are too close to call. Callers must never * one-click apply an ambiguous result — the user picks. */ export declare function isAmbiguous(ranked: Array<{ score: number; }>): boolean; //#endregion