import type { StructuralPrepass, Symbol, Import, FileFilter, ClassFilter, MethodFilter, InterfaceFilter, IndexResult, MethodFactSheet } from '../interface.js';
export interface CodeGraphBackendOptions {
    /** Path to the codegraph binary. Auto-detected if omitted. */
    codegraphPath?: string;
    /** Path to the sqlite3 binary. Auto-detected if omitted. */
    sqlite3Path?: string;
    /** Skip running `codegraph init` + `codegraph index` if .codegraph/ already exists. */
    reuseExistingIndex?: boolean;
}
export declare class CodeGraphBackend implements StructuralPrepass {
    private sourceDir;
    private dbPath;
    private codegraphPath;
    private sqlite3Path;
    private reuseExistingIndex;
    capabilities: {
        callGraph: boolean;
        crossFileResolution: boolean;
        componentClustering: boolean;
        fullTextSearch: boolean;
        fileWatching: boolean;
        routeExtraction: boolean;
        implementsExtraction: boolean;
        validationSchemaExtraction: boolean;
        processExtraction: boolean;
    };
    constructor(options?: CodeGraphBackendOptions);
    /**
     * Check if CodeGraph + sqlite3 are available. Use this from the adapter
     * selector to decide whether to fall back to grep-only.
     */
    static isAvailable(): boolean;
    init(sourceDir: string): Promise<void>;
    index(): Promise<IndexResult>;
    listFiles(filter?: FileFilter): Promise<string[]>;
    listClasses(filter?: ClassFilter): Promise<Symbol[]>;
    listMethods(filter?: MethodFilter): Promise<Symbol[]>;
    listInterfaces(filter?: InterfaceFilter): Promise<Symbol[]>;
    listImports(file: string): Promise<Import[]>;
    fileSourceText(file: string): Promise<string>;
    callers(symbol: string): Promise<Symbol[]>;
    callees(symbol: string): Promise<Symbol[]>;
    /**
     * Per-method fact sheet via SQL (for the call graph) + regex over the body
     * (for everything else: emits, dbWrites, externalCalls, throws, async, branches).
     *
     * The SQL piece is what justifies the CodeGraph backend over grep-only here —
     * tree-sitter resolved cross-file calls deterministically, while a regex over
     * a single method body would only see same-file references.
     */
    getMethodDetails(qualifiedName: string): Promise<MethodFactSheet | null>;
    /** Run a SQL query; expect 0 or 1 row. Throws if more. */
    private queryOne;
    /** Run a SQL query; return all rows as objects (parsed from JSON). */
    private queryAll;
    private rowToSymbol;
    private escape;
    private detectBinary;
}
//# sourceMappingURL=codegraph.d.ts.map