import type { BetterSqlite3Database, CodegraphConfig, PathAliases } from '../../../types.js';
export declare const BUILTIN_RECEIVERS: Set<string>;
/**
 * Check whether a source file passes the configured include/exclude globs.
 *
 * Patterns are matched against the path relative to the project root,
 * normalized to forward slashes (e.g. `src/foo/bar.ts`). When both lists
 * are set, a file must match at least one include and no exclude.
 */
export declare function passesIncludeExclude(relPath: string, includeRegexes: readonly RegExp[], excludeRegexes: readonly RegExp[]): boolean;
/**
 * Recursively collect all source files under `dir`.
 * When `directories` is a Set, also tracks which directories contain files.
 *
 * `dir` establishes the project root against which `config.include` /
 * `config.exclude` globs are matched.
 */
export declare function collectFiles(dir: string, files: string[], config: Partial<CodegraphConfig>, directories: Set<string>): {
    files: string[];
    directories: Set<string>;
};
export declare function collectFiles(dir: string, files?: string[], config?: Partial<CodegraphConfig>, directories?: null): string[];
/**
 * Load path aliases from tsconfig.json / jsconfig.json.
 */
export declare function loadPathAliases(rootDir: string): PathAliases;
/**
 * Compute MD5 hash of file contents for incremental builds.
 */
export declare function fileHash(content: string): string;
/**
 * Stat a file, returning { mtime, size } or null on error.
 *
 * `mtime` is `Math.floor(stat.mtimeMs)` so it matches the integer column
 * stored in the DB. Floor-once-here keeps every consumer honest: storing or
 * comparing a non-floored `mtimeMs` against the integer DB column would cause
 * spurious fast-skip misses on the next build.
 */
export declare function fileStat(filePath: string): {
    mtime: number;
    size: number;
} | null;
export declare function readFileSafe(filePath: string, retries?: number): string;
/**
 * Purge all graph data for the specified files.
 */
export declare function purgeFilesFromGraph(db: BetterSqlite3Database, files: string[], options?: Record<string, unknown>): void;
/**
 * Batch-insert node rows via multi-value INSERT statements.
 * Each row: [name, kind, file, line, end_line, parent_id, qualified_name, scope, visibility]
 */
export declare function batchInsertNodes(db: BetterSqlite3Database, rows: unknown[][]): void;
/**
 * Batch-insert edge rows via multi-value INSERT statements.
 * Each row: [source_id, target_id, kind, confidence, dynamic, technique]
 */
export declare function batchInsertEdges(db: BetterSqlite3Database, rows: unknown[][]): void;
/**
 * CHA (Class Hierarchy Analysis) post-pass.
 *
 * Expands virtual-dispatch call edges for class hierarchies and interface
 * implementations already present in the DB:
 *
 *  1. Build implementors map: parent/interface → [child/implementing class] from
 *     `extends` and `implements` edges.
 *  2. Collect RTA evidence: class nodes that appear as `calls` targets (new X()).
 *  3. Find all `calls` edges to qualified method nodes (name contains '.').
 *  4. For each such call, expand to concrete overrides via the implementors map,
 *     filtered by RTA when evidence exists.
 *
 * Used by both the native orchestrator post-pass and the WASM build-edges pass.
 */
export declare function runChaPostPass(db: BetterSqlite3Database): number;
//# sourceMappingURL=helpers.d.ts.map