/** * `find_clones` MCP handler (change: add-clone-query-tool). * * `get_duplicate_report` answers the whole-repo audit question — "here is every * clone group" — by reading the precomputed `duplicates.json`. This answers the * edit-time question an agent actually has: "I am about to write (or just wrote) * THIS — does a near-duplicate already exist that I should reuse instead?" * * Two query forms, exactly one required: * - `symbol` : a function already in the index (name, or name::path). Its body * is extracted from the persisted byte range and compared against * every other indexed function. * - `snippet` : raw code not necessarily in the index — answers the pre-write * question the whole-repo report structurally cannot. * * Computed live (no new persisted artifact) from the cached call graph plus a * re-read of the source it spans, then run through the one-vs-all `findClones` * query in `duplicate-detector.ts` — same normalization / shingling / Jaccard / * thresholds as the whole-repo detector. Conclusion-shaped: a ranked match list, * never a graph. */ export interface FindClonesInput { directory: string; /** A function in the index: its name, or `name::path` to disambiguate. */ symbol?: string; /** Raw code to compare (need not be in the index). */ snippet?: string; /** Near-clone Jaccard floor (default CLONE_NEAR_THRESHOLD, clamped to [0.1, 1]). */ minSimilarity?: number; /** Cap on returned matches (default 25, capped 200). */ maxResults?: number; } /** * Find existing clones of a single symbol or snippet. Read-only, deterministic, * offline. Returns `unknown` (additive-by-cast), conclusion-shaped — a ranked * match list with the similarity floor and honesty signals, never a graph. */ export declare function handleFindClones(input: FindClonesInput): Promise; //# sourceMappingURL=clone-query.d.ts.map