/** * Configuration management for Dossier CLI * Handles reading and writing user preferences to ~/.dossier/config.json * and multi-registry configuration. */ /** * A single registry entry in the user or project configuration. * URLs must use HTTPS to protect credentials in transit — the CLI * rejects non-HTTPS URLs when adding registries via `dossier config --add-registry`. */ export interface RegistryEntry { url: string; default?: boolean; readonly?: boolean; } export interface DossierConfig { defaultLlm: string; theme: string; auditLog: boolean; registries?: Record; defaultRegistry?: string; [key: string]: unknown; } /** * A registry after resolution from all config sources (user, project, env). * Each resolved registry is isolated: credentials are stored per-registry * in ~/.dossier/credentials.json, and project-level configs cannot override * user-configured registry URLs to prevent credential exfiltration. */ export interface ResolvedRegistry { name: string; url: string; readonly?: boolean; } declare const DEFAULT_REGISTRY_URL = "https://dossier-registry.vercel.app"; declare const CONFIG_DIR: string; declare const CONFIG_FILE: string; declare const DEFAULT_CONFIG: DossierConfig; /** * Ensure config directory exists */ declare function ensureConfigDir(): void; /** * Load configuration from file */ declare function loadConfig(): DossierConfig; /** * Save configuration to file */ declare function saveConfig(config: DossierConfig): boolean; /** * Get a specific config value */ declare function getConfig(key: string): unknown; /** * Set a specific config value */ declare function setConfig(key: string, value: unknown): boolean; /** * Load project-level .dossierrc.json by walking up from cwd. */ declare function loadProjectConfig(): DossierConfig | null; declare function resolveRegistries(): ResolvedRegistry[]; /** * Resolve which single registry to use for write operations. * Priority: --registry flag > defaultRegistry (project > user) > first registry */ declare function resolveWriteRegistry(registryFlag?: string): ResolvedRegistry; /** * Resolve a single registry by name (for auth commands). */ declare function resolveRegistryByName(name: string): ResolvedRegistry; export { ensureConfigDir, loadConfig, saveConfig, getConfig, setConfig, loadProjectConfig, resolveRegistries, resolveWriteRegistry, resolveRegistryByName, CONFIG_DIR, CONFIG_FILE, DEFAULT_CONFIG, DEFAULT_REGISTRY_URL, }; //# sourceMappingURL=config.d.ts.map