export type BackendType = "sqlite" | "postgres"; export interface SqliteBackendConfig { backend: "sqlite"; dbPath: string; embeddingDimension?: number; } export interface PostgresBackendConfig { backend: "postgres"; /** Full connection string, e.g. postgresql://user:pass@host:5432/dbname */ connectionString: string; ssl?: boolean; embeddingDimension?: number; /** Max connections in the pool (default 5) */ poolSize?: number; } export type DatabaseBackendConfig = SqliteBackendConfig | PostgresBackendConfig; /** Shape of the config file on disk. */ export interface ConfigFile { backend?: BackendType; postgres?: { url?: string; ssl?: boolean; poolSize?: number; }; embeddingDimension?: number; } export declare function getConfigDir(): string; export declare function getConfigFilePath(): string; export declare function loadConfigFile(): ConfigFile; export declare function saveConfigFile(config: ConfigFile): void; /** * Resolves the active backend configuration. * * Priority: * 1. Environment variables (CSM_BACKEND + CSM_POSTGRES_URL) * 2. Config file (~/.config/code-session-memory/config.json) * 3. Default: SQLite at the standard path */ export declare function resolveBackendConfig(overrides?: { dbPath?: string; embeddingDimension?: number; }): DatabaseBackendConfig; //# sourceMappingURL=config.d.ts.map