/** * File Processing Service * Handles file processing, incremental updates, atomic operations, and concurrency control */ import { CodeChunk } from '../types/core.js'; export interface FileProcessingOptions { maxAgeHours?: number; supportedLanguages?: string[]; enableContentFiltering?: boolean; enableDependencyAnalysis?: boolean; } export interface FileUpdateResult { success: boolean; filesProcessed: number; chunksCreated: number; chunksDeleted: number; processingTimeMs: number; message: string; } export interface IncrementalUpdateResult extends FileUpdateResult { namespace: string; } export interface LockResult { acquired: boolean; message: string; } export interface FileMetadata { filePath: string; lastModified: Date; size: number; contentHash: string; chunkIds: string[]; } export interface ChunkOperations { getChunkIdsForFile(namespace: string, filePath: string): Promise; deleteChunksByIds(namespace: string, chunkIds: string[]): Promise; uploadChunks(namespace: string, chunks: CodeChunk[]): Promise; } export declare class FileProcessingService { private chunkOperations; private logger; private fileUtils; private indexingOrchestrator; private lockService; private activeOperations; private fileMetadataCache; constructor(chunkOperations: ChunkOperations, loggerName?: string); /** * Process incremental updates for a codebase */ processIncrementalUpdate(codebasePath: string, namespace: string, options?: FileProcessingOptions): Promise; /** * Internal incremental update implementation */ private performIncrementalUpdate; /** * Atomically update a single file with rollback capability */ private updateFileAtomically; /** * Process a single file to extract code chunks */ private processSingleFile; /** * Find files modified since a specific time with optional hash verification */ findChangedFiles(codebasePath: string, since: Date, options?: FileProcessingOptions): Promise; /** * Check if file was modified since a specific date (time-based with hash verification) */ private isFileModifiedSince; /** * Hash-based change detection methods (kept for compatibility) */ private isFileModified; private calculateContentHash; private getFileMetadata; private setFileMetadata; private getFileMetadataPath; private loadFileMetadata; private saveFileMetadata; updateFileMetadata(codebasePath: string, filePath: string, chunkIds: string[]): Promise; updateFileMetadataAndSave(codebasePath: string, filePath: string, chunkIds: string[]): Promise; /** * Timestamp management for incremental updates */ private getLastIndexedTimestampPath; getLastIndexedTime(codebasePath: string): Promise; saveLastIndexedTime(codebasePath: string, timestamp: Date): Promise; /** * Check if there are any active operations */ hasActiveOperations(): boolean; /** * Get list of active operation keys */ getActiveOperations(): string[]; /** * Get service status */ getStatus(): { activeOperations: number; operationKeys: string[]; }; } //# sourceMappingURL=FileProcessingService.d.ts.map