/** * Configuration Loader * * Infrastructure adapter for loading and saving RAGgrep configuration. * Handles file I/O operations for configuration management. */ import type { Config, ModuleConfig } from "../../domain/entities"; import type { EmbeddingConfig } from "../../domain/ports"; import { EMBEDDING_MODELS } from "../embeddings/modelCatalog"; export { EMBEDDING_MODELS }; /** Default configuration instance */ export declare const DEFAULT_CONFIG: Config; /** Directory name for index data under the project (or CLI cwd) root */ export declare const RAGGREP_INDEX_DIR = ".raggrep"; /** * Get the index storage directory path. * * Index data is stored under `{rootDir}/.raggrep/`, where `rootDir` is the * directory being indexed (for the CLI this is the current working directory). * * @param rootDir - Absolute or resolved path to the project root * @returns Absolute path to the index storage directory */ export declare function getRaggrepDir(rootDir: string, _config?: Config): string; /** * Get the index storage path and also return useful metadata. * Helpful for debugging and user feedback. */ export declare function getIndexLocation(rootDir: string): { indexDir: string; projectRoot: string; projectHash: string; }; /** * Get the index data directory for a specific module */ export declare function getModuleIndexPath(rootDir: string, moduleId: string, config?: Config): string; /** * Get the manifest path for a specific module */ export declare function getModuleManifestPath(rootDir: string, moduleId: string, config?: Config): string; /** * Get the global manifest path */ export declare function getGlobalManifestPath(rootDir: string, config?: Config): string; /** * Get the config file path (inside `.raggrep` under the project root). */ export declare function getConfigPath(rootDir: string, config?: Config): string; /** * Load config from file or return default */ export declare function loadConfig(rootDir: string): Promise; /** * Save config to file */ export declare function saveConfig(rootDir: string, config: Config): Promise; /** * Get module config by ID */ export declare function getModuleConfig(config: Config, moduleId: string): ModuleConfig | undefined; /** * Extract embedding config from module options */ export declare function getEmbeddingConfigFromModule(moduleConfig: ModuleConfig): EmbeddingConfig;