1
  c   	ˆl–Ãa¾”ªi?u8 ¸Ûw
˜´o�þJäYÇÌq¶Ìr²Ø¿ŸÆ„mÖ™wÅ_“I|¥ŽõHºl=$¤�zTÖ™	a–Ðz¾”d
i?u8 …pMÜªbÑ¿Ä ?÷     	/**
 * MCP Tool Definitions
 *
 * Defines the tools exposed by the CodeGraph MCP server.
 */
import type CodeGraph from '../index';
import type { QueryPool } from './query-pool';
import { WslSharedIndexError } from '../db/wsl-shared-index';
export declare function __setLoadCodeGraphForTests(cls: typeof import('../index').default | null): void;
import type { PendingFile } from '../sync';
import { type AnswerFile } from './answer-freshness';
import { ExploreSessionState, type ExploreEmission, type ExploreLineRange } from './explore-session-state';
/**
 * An expected, recoverable "codegraph can't serve this" condition â€” most
 * importantly a project with no index. The dispatch catch converts these to
 * SUCCESS-shaped responses (guidance text, NO isError): an `isError: true`
 * early in a session teaches the agent the toolset is broken and it stops
 * calling codegraph entirely (observed repeatedly), which is exactly wrong
 * for conditions the agent can simply work around (use built-in tools for
 * that codebase / pass projectPath). isError is reserved for "stop trying"
 * cases: security refusals ({@link PathRefusalError}) and genuine
 * malfunctions.
 */
export declare class NotIndexedError extends Error {
}
/**
 * A security refusal (sensitive system path). Stays `isError: true` WITHOUT
 * retry guidance â€” abandoning this path is the desired agent reaction.
 *
 * Defined in `../errors` so non-MCP read sinks (the `codegraph ui` server) can
 * enforce the same refusal without importing this module; re-exported here
 * because this is where every existing caller imports it from.
 */
export { PathRefusalError } from '../errors';
/**
 * Normalize Erlang-native symbol spellings in an explore query into the shapes
 * the rest of the pipeline already understands. Agents working Erlang code
 * name symbols the way the language spells them â€” `mod:fn/3`, `init/2` â€” and
 * those tokens previously died in both consumers: the flow-builder's token
 * filter rejects `:` and `/arity` outright, and the search-side field parser
 * eats `mod:fn` as an unknown `field:value`. Measured on cowboy: the agent
 * named `cowboy_stream_h:request_process/3` in two queries, got no body back
 * either time, and fell back to Read.
 *
 *   - `fn/3` â†’ `fn` (arity tail after an identifier; a path segment like
 *     `src/2fa` doesn't match because the tail must be all digits)
 *   - `mod:fn` â†’ `mod.fn` (exactly one colon between identifiers, so it rides
 *     the existing Class.method qualified handling; `::`, URLs, drive letters,
 *     and times don't match, and the query language's own field prefixes â€”
 *     kind:/lang:/language:/path:/name: â€” are left alone)
 *
 * Safe cross-language: Lua's `t:m` spelling maps to the same `t.m` its
 * qualified names use, and no other supported spelling contains a bare
 * single-colon identifier pair.
 */
export declare function normalizeQuerySpelling(query: string): string;
/**
 * Calculate the recommended number of codegraph_explore calls based on project size.
 * Larger codebases need more exploration calls to cover their surface area,
 * but smaller ones should use fewer to avoid unnecessary overhead.
 */
export declare function getExploreBudget(fileCount: number): number;
/**
 * Adaptive output budget for `codegraph_explore`, scaled to project size.
 *
 * Smaller codebases get a tighter total cap, fewer default files, smaller
 * per-file cap, and tighter clustering â€” so a focused query on a 100-file
 * project doesn't dump a whole file's worth of source into the agent's
 * context. Larger codebases keep the generous defaults because the
 * agent's native discovery cost (grep + find + many Reads) genuinely
 * dwarfs a fat explore call at that scale.
 *
 * Meta-text (relationships map, "additional relevant files" list,
 * completeness signal, budget note) is gated off for tiny projects
 * where one rich call is the whole story and the extra prose is just
 * overhead.
 *
 * Tier 