/** * Normalize a surface name for SURFACE-FORM dedup only (case, whitespace, * punctuation, diacritics). This does NOT solve semantic identity — "Tom Lane" * vs "tgl" is resolved by the harvester via searchGraphNodes + mergeGraphNodes, * which records an alias. Keep this conservative so we never collapse distinct * people. */ export declare function normalizeName(raw: string): string; /** Canonical dedup key: `:`. */ export declare function nodeKeyOf(kind: string, name: string): string; /** Merge alias lists, de-duplicated by surface form, preserving first-seen order. */ export declare function mergeAliases(existing: string[], incoming: string[]): string[]; /** * Normalize a free-text predicate into a grouping key. The original predicate * is kept verbatim on the edge; this is only for matching/analytics so the open * vocabulary stays queryable without being frozen. */ export declare function predicateKey(predicate: string): string; /** * Combine an existing edge confidence with a new independent observation. * Monotonic, saturating, order-independent: c' = 1 - (1-c_old)(1-c_obs). */ export declare function reinforceConfidence(existing: number, observation: number): number; export declare function clamp01(x: number): number; export interface ExistingEdge { confidence: number; observations: number; evidence: string[]; } export interface EdgeUpsertDecision { /** create: no edge existed. reinforce: bump observations + noisy-OR. * noop: re-assert carried only already-known evidence — idempotent. */ action: "create" | "reinforce" | "noop"; confidence: number; observations: number; evidence: string[]; } /** * Evidence is OPTIONAL (the graph stays permissive). Reinforcement counts only * NOVEL observations: an assertion reinforces iff it carries ≥1 evidence * scopeKey not already on the edge, or carries no evidence at all. Re-asserting * with only already-known evidence is an idempotent no-op — a duplicate/replayed * harvest of the same fact cannot inflate observations or confidence. */ export declare function decideEdgeUpsert(input: { confidence?: number; evidence?: string[]; }, existing: ExistingEdge | null): EdgeUpsertDecision; //# sourceMappingURL=graph-model.d.ts.map