/** * File-based Index Storage Adapter * * Implements the IndexStorage port using the filesystem. * Index data is stored as JSON files in the .raggrep directory. */ import type { IndexStorage } from '../../domain/ports'; import type { FileSystem } from '../../domain/ports'; import type { Config, FileIndex, ModuleManifest, GlobalManifest, FileSummary, SymbolicIndexMeta, Tier1Manifest } from '../../domain/entities'; /** * Filesystem-based index storage. * * Structure: * .raggrep/ * ├── config.json * ├── manifest.json (global) * └── index/ * └── / * ├── manifest.json (module) * ├── symbolic/ * │ ├── _meta.json (BM25 statistics) * │ └── .json (per-file summaries) * └── .json (file indexes with embeddings) */ export declare class FileIndexStorage implements IndexStorage { private fs; private rootDir; private indexDir; constructor(fs: FileSystem, rootDir: string, indexDir?: string); private getIndexPath; private getConfigPath; private getGlobalManifestPath; private getModuleIndexPath; private getModuleManifestPath; private getSymbolicPath; private getSymbolicMetaPath; private getSymbolicFilePath; private getFileIndexPath; /** @deprecated Use getSymbolicMetaPath instead */ private getTier1Path; loadConfig(): Promise; saveConfig(config: Config): Promise; loadGlobalManifest(): Promise; saveGlobalManifest(manifest: GlobalManifest): Promise; loadModuleManifest(moduleId: string): Promise; saveModuleManifest(moduleId: string, manifest: ModuleManifest): Promise; loadSymbolicMeta(moduleId: string): Promise; saveSymbolicMeta(moduleId: string, meta: SymbolicIndexMeta): Promise; loadFileSummary(moduleId: string, filepath: string): Promise; saveFileSummary(moduleId: string, filepath: string, summary: FileSummary): Promise; deleteFileSummary(moduleId: string, filepath: string): Promise; /** * List all file summaries by reading the module manifest. * Returns filepaths relative to the project root. */ listFileSummaries(moduleId: string): Promise; /** @deprecated Use loadSymbolicMeta and loadFileSummary instead */ loadTier1Index(moduleId: string): Promise; /** @deprecated Use saveSymbolicMeta and saveFileSummary instead */ saveTier1Index(moduleId: string, manifest: Tier1Manifest): Promise; loadFileIndex(moduleId: string, filepath: string): Promise; saveFileIndex(moduleId: string, filepath: string, index: FileIndex): Promise; deleteFileIndex(moduleId: string, filepath: string): Promise; listIndexedFiles(moduleId: string): Promise; indexExists(): Promise; deleteIndex(): Promise; getRootDir(): string; }