import type { NoteMetadata } from '../storage/NoteRepository.js'; export declare const DUPLICATE_SIMHASH_THRESHOLD = 3; export declare const DUPLICATE_EVIDENCE_LIMIT = 10; export interface DuplicateSnapshotNote { readonly note: NoteMetadata; readonly hash: string; readonly hashSource: 'stored' | 'ephemeral'; } export interface SimHashGroup { readonly seedId: string; readonly notes: readonly NoteMetadata[]; readonly evidence: readonly { noteId: string; distanceFromSeed: number; }[]; } export interface DuplicateIncompletenessEvidence { readonly omissionReasons: Readonly>; /** Inventory conditions that make completeness unknowable without identifying an omitted candidate. */ readonly uncertaintyReasons?: Readonly>; /** Indexed rows may no longer represent their canonical Markdown. */ readonly indexedSnapshotUnsafe?: boolean; } export interface DuplicateEvaluation { readonly coverage: { readonly eligible: number; readonly hashedAtStart: number; readonly computedEphemerally: number; readonly evaluated: number; readonly omitted: number; readonly omissionReasons: Readonly>; readonly uncertaintyReasons: Readonly>; readonly complete: boolean; }; readonly titleGroups: readonly { normalizedTitle: string; notes: readonly NoteMetadata[]; }[]; /** Complete count of qualifying pairs; simhashGroups retains bounded advisory evidence. */ readonly simhashGroupTotal: number; readonly simhashGroups: readonly SimHashGroup[]; readonly threshold: number; } /** * Canonical comparison key for duplicate-title grouping, shared with the * repository's title-collision detection. Applies kind-prefix and `.md` * stripping and lowercasing to the full title, and collapses runs of * non-alphanumeric characters to a single space instead of * deleting them, so distinct word sequences (`note book` vs `notebook`) stay * distinct keys. Returns `''` for a title with no alphanumeric content; * callers skip empty keys rather than grouping unrelated notes together. */ export declare function normalizeComparableTitle(title: string): string; export declare function evaluateDuplicates(input: readonly (NoteMetadata & { content_hash?: string | null; })[], threshold?: number, incompleteness?: DuplicateIncompletenessEvidence): DuplicateEvaluation; //# sourceMappingURL=duplicates.d.ts.map