import type { CodeSymbol } from "../types.js";
export interface ParseRequest {
    filePath: string;
    source: string;
    language: string;
    relPath: string;
    repoName: string;
}
/**
 * Parse a file via the worker pool. Resolves with the extracted symbols,
 * rejects on worker error, crash, or task timeout.
 *
 * On timeout the offending worker is `terminate()`d (since WASM may be hung
 * synchronously and won't yield) and replaced with a fresh worker. Other
 * in-flight tasks on the same worker reject with the same timeout error.
 *
 * In dev/test (no built parse-worker.js) falls back to in-thread parsing.
 */
export declare function runTreeSitterParse(req: ParseRequest): Promise<CodeSymbol[]>;
/**
 * Tear down the pool. Used by tests; not normally called during MCP server
 * lifetime (workers persist for the life of the process).
 */
export declare function shutdownPool(): Promise<void>;
/** Diagnostics for tests + debugging — current active task counts per worker. */
export declare function getPoolStats(): {
    initialized: boolean;
    workers: number;
    active: number[];
};
//# sourceMappingURL=parser-pool.d.ts.map