/** * IndexingOrchestrator - Core business logic for codebase indexing * * Orchestrates the complete indexing process: * - File discovery and filtering * - Symbol extraction with AST parsing * - Chunk generation with dependency context * - Embedding generation and storage */ import { CodeChunk, IndexingRequest } from '../../types/core.js'; export interface IndexingResult { success: boolean; metadata: { codebasePath: string; namespace: string; totalFiles: number; totalChunks: number; totalSymbols: number; indexingTime: number; indexingMethod: 'full' | 'incremental'; features: { astExtraction: boolean; contentFiltering: boolean; dependencyAnalysis: boolean; incrementalUpdate: boolean; }; }; chunks: CodeChunk[]; errors: Array<{ file: string; error: string; }>; } export interface IndexingServices { jinaApiService?: any; turbopufferService?: any; namespaceManagerService?: any; metadataCallback?: (codebasePath: string, indexedData: any) => Promise; } export declare class IndexingOrchestrator { private fileUtils; private languageDetector; private contentFilter; private symbolExtractor; private chunkExtractor; private logger; private services?; constructor(services?: IndexingServices); /** * Main indexing orchestration method */ indexCodebase(request: IndexingRequest): Promise; /** * Process a single file into semantic chunks using Tree-sitter AST parsing * Uses TreeSitterChunkExtractor for meaningful code unit extraction */ processFile(filePath: string, request: IndexingRequest): Promise; private applyContentFiltering; /** * Upload chunks to vector store with embedding generation */ private uploadChunksToVectorStore; /** * Create sensible fallback chunks when semantic parsing fails * Unlike the broken single-line approach, this creates larger, meaningful chunks */ private createFallbackChunks; /** * Expand symbol to include complete logical unit (function body, class body, etc.) * This provides simple but effective boundary expansion for symbols */ private expandSymbolToLogicalUnit; /** * Find block end using brace matching */ private findBlockEnd; /** * Find statement end (for variables, simple functions, etc.) */ private findStatementEnd; private generateChunkId; /** * Get indexing status for codebases */ getIndexingStatus(indexedCodebases: Map, codebasePath?: string): Promise<{ indexedCodebases: any[]; currentCodebase?: any; incrementalStats?: any; indexed: boolean; fileCount: number; }>; } //# sourceMappingURL=IndexingOrchestrator.d.ts.map