/** * AST Index Service * * Builds, persists, loads, and queries the codebase symbol index. * Uses sharded persistence to avoid loading the entire index for queries. */ import type { CodebaseIndex, IndexedFile, IndexedSymbol } from './ast.types.js'; /** Directories always excluded from indexing */ export declare const EXCLUDED_DIRS: Set; /** * AST Index Service — singleton that manages the codebase index */ export declare class ASTIndexService { private building; private built; private index; private readonly indexDir; private readonly projectRoot; constructor(projectRoot: string); /** * Check if the index has been built */ isBuilt(): boolean; /** * Check if the index is currently building */ isBuilding(): boolean; /** * Get the current index (may be empty if not built) */ getIndex(): CodebaseIndex; /** * Build the index from scratch */ buildIndex(): Promise; /** * Incremental update: re-index only changed files */ incrementalUpdate(changedFiles?: string[]): Promise; /** * Load a previously persisted index from disk */ loadIndex(): boolean; /** * Clear the index (in-memory and on disk) */ clearIndex(): void; /** * Get index statistics */ getStats(): { fileCount: number; symbolCount: number; updatedAt: string; }; /** * Look up symbols by name */ lookupByName(name: string): IndexedSymbol[]; /** * Look up symbols in a file */ lookupByFile(filePath: string): IndexedSymbol[]; /** * Get a specific symbol by ID */ getSymbol(id: string): IndexedSymbol | undefined; /** * Get a file's index entry */ getFile(filePath: string): IndexedFile | undefined; private createEmptyIndex; /** * Discover all indexable files in the project */ private discoverFiles; private processDirectoryEntry; /** * Fallback directory walker when git is unavailable */ private walkDirectory; /** * Check if a file path should be excluded */ private isExcluded; /** * Index a batch of files */ private indexFiles; /** * Index a single file, updating the index in place */ private indexSingleFile; /** * Remove a file and its symbols from the index */ private addToFileIndex; private addToNameIndex; private removeFileFromIndex; /** * Get files changed since last index */ private getChangedFiles; /** * Persist the index to disk in sharded format */ private persistIndex; } export declare function getASTIndexService(projectRoot?: string): ASTIndexService; export declare function resetASTIndexService(): void; //# sourceMappingURL=ast-index.service.d.ts.map