/**
 * Symbol Lookup — the single "what did the user mean by this name?" path.
 *
 * Every verb that takes a symbol NAME from a human (or an agent) has to turn
 * that string into node(s). `codegraph_node` and `codegraph_explore` went
 * through the matcher below; the `callers` / `callees` / `impact` CLI verbs
 * carried their own ad-hoc filter instead:
 *
 *     node.name === symbol || node.name.endsWith('.' + symbol)
 *
 * which compares the query against the BARE name only. That produced two
 * opposite failures in the same repository:
 *
 *   - a bare name over-reported: `callers group` silently merged the callers of
 *     every distinct symbol named `group` — in any language — into one list
 *     headed "Callers of group", with nothing saying they were different
 *     symbols;
 *   - a qualified name under-reported: `Foo.Bar.baz` can never equal a bare
 *     `baz`, so every candidate failed the filter and the code fell through to
 *     an arbitrary top-of-FTS hit — or reported "not found" for a symbol that
 *     plainly exists.
 *
 * Both are fixed by routing all of them through one resolver, which this module
 * owns so the CLI and the MCP tools cannot drift apart again.
 */
import type { Node } from '../types';
/** Rust path prefixes that name no directory (`crate::x`, `super::y`). */
export declare const RUST_PATH_PREFIXES: Set<string>;
/** Does this query carry any scope qualifier at all? */
export declare function isQualifiedSymbol(symbol: string): boolean;
/** The bare identifier at the end of a qualified query (arity spelling stripped). */
export declare function lastQualifierPart(symbol: string): string;
/**
 * Does `node` satisfy the user's symbol query?
 *
 * Bare queries match the name. Qualified queries are checked against the
 * qualifiedName under both separator conventions, then — for languages whose
 * hierarchy lives in the file path rather than the name (Rust modules, Python
 * packages) — against the path.
 */
export declare function matchesSymbol(node: Node, symbol: string): boolean;
/** The slice of CodeGraph a symbol lookup needs — keeps this module testable. */
export interface SymbolLookupHost {
    getNodesByName(name: string): Node[];
    searchNodes(query: string, options?: {
        limit?: number;
    }): Array<{
        node: Node;
    }>;
    generatedFilePredicate(paths: string[]): (path: string) => boolean;
}
export interface SymbolLookupResult {
    /** Every definition the query names, keepers before generated stubs. */
    nodes: Node[];
    /**
     * The query named more than one distinct definition. Callers that aggregate
     * across all of them MUST surface this — an aggregate presented as one
     * symbol's answer is the over-reporting failure described at the top.
     */
    ambiguous: boolean;
}
/**
 * One group per (filePath, qualifiedName): same-file overloads stay together,
 * while unrelated definitions keep their own edges. Shared by CLI and MCP.
 * A non-matching file hint keeps all definitions and must be disclosed.
 */
export declare function groupDefinitions(nodes: Node[], fileFilter?: string): {
    groups: Node[][];
    filteredOut: boolean;
};
/**
 * Resolve a user-supplied symbol name to the definitions it names.
 *
 * The exact-name index is consulted FIRST and is authoritative: it is complete
 * and uncapped, whereas FTS ranks and truncates, and tokenises away `::` — so
 * a qualified query could miss a symbol that exists, or land on whatever
 * happened to rank first. FTS candidates still have to satisfy the matcher;
 * partial or mistyped names must never select the top fuzzy hit (#1473).
 */
export declare function lookupSymbolNodes(cg: SymbolLookupHost, symbol: string): SymbolLookupResult;
/** One-line "kind at path:line" label used when disclosing an ambiguous query. */
export declare function describeSymbolNode(node: Node): string;
//# sourceMappingURL=symbol-lookup.d.ts.map