/**
 * Thin MCP client wrapper for code-review-graph.
 *
 * Connects via Stdio transport to the configured cr-graph binary.
 * Binary discovery order:
 *   1. NEXUS_CRG_BIN env var
 *   2. ~/.nexus-prime/cr-graph.json  { "bin": "/path/to/binary", "args": [...] }
 *   3. legacy <repo>/.mcp.json code-review-graph entry
 *   4. uvx code-review-graph serve default, scoped to the repo
 *
 * Failure mode: when the binary is not found or the process fails to start,
 * the client returns `available = false` and all methods return empty results.
 * The orchestrator falls back to the n-gram index. No regression.
 */
interface CrGraphConfig {
    bin: string;
    args?: string[];
    cwd?: string;
}
interface SemanticSearchOptions {
    timeoutMs?: number;
    waitForColdInit?: boolean;
}
export declare function discoverCrGraphConfig(repoRoot?: string): CrGraphConfig | null;
export declare class CodeReviewGraphClient {
    private client;
    private transport;
    private _available;
    private _initialized;
    private initPromise;
    private repoRoot;
    private closing;
    constructor(repoRoot: string);
    get available(): boolean;
    init(): Promise<void>;
    private initialize;
    /**
     * Search for file nodes relevant to a task description.
     * Returns absolute file paths, clamped to `limit`.
     * Returns empty array when unavailable or on error.
     */
    semanticSearchNodes(query: string, limit?: number, options?: SemanticSearchOptions): Promise<string[]>;
    /**
     * Returns true when results are sufficient to use as primary source.
     */
    static isSufficient(results: string[]): boolean;
    semanticSearchNodesFast(query: string, limit?: number): Promise<string[]>;
    private searchLocalGraphDb;
    close(): Promise<void>;
}
/**
 * Non-blocking cr-graph freshness check + build trigger.
 *
 * Called via `setImmediate` from `nexus_session_bootstrap` so the handler
 * returns immediately and the graph builds in the background.
 * - Checks a stamp file in ~/.nexus-prime to avoid rebuilding more than once
 *   per 24 hours per repo root.
 * - Emits `graph.cr.build.start` / `graph.cr.build.complete` / `graph.cr.build.failed`
 *   on the event bus so the dashboard can render a progress pill.
 * - All failures are silently swallowed — cr-graph is optional and the
 *   orchestrator falls back to the n-gram index if unavailable.
 */
export declare function ensureCrGraphBuilt(repoRoot: string): Promise<void>;
export {};
