/** * Forge Configuration Manager * * Handles loading, saving, and merging Forge configuration files. * Configuration locations: * - Project: .fractary/config.json * - Global: ~/.fractary/config.json */ import { type ForgeConfig, type RegistryConfig } from './types.js'; /** * Configuration load result */ export interface ConfigLoadResult { /** Loaded and merged configuration */ config: ForgeConfig; /** Path to project config (if exists) */ projectConfigPath: string | null; /** Path to global config (if exists) */ globalConfigPath: string | null; /** Whether project config was loaded */ hasProjectConfig: boolean; /** Whether global config was loaded */ hasGlobalConfig: boolean; } /** * Get project-level config path * Looks for .fractary/config.json in current or ancestor directories */ export declare function getProjectConfigPath(cwd?: string): string; /** * Get global config path */ export declare function getGlobalConfigPath(): string; export declare class ConfigManager { /** * Load project config if it exists */ loadProjectConfig(cwd?: string): Promise; /** * Load global config if it exists */ loadGlobalConfig(): Promise; /** * Load and merge configurations * Priority: project config > global config > defaults */ loadConfig(cwd?: string): Promise; /** * Save project config */ saveProjectConfig(config: ForgeConfig, cwd?: string): Promise; /** * Save global config */ saveGlobalConfig(config: ForgeConfig): Promise; /** * Add registry to configuration */ addRegistry(registry: RegistryConfig, scope?: 'global' | 'local', cwd?: string): Promise; /** * Remove registry from configuration */ removeRegistry(registryName: string, scope?: 'global' | 'local', cwd?: string): Promise; /** * Update registry configuration */ updateRegistry(registryName: string, updates: Partial, scope?: 'global' | 'local', cwd?: string): Promise; /** * Get registry by name from current configuration */ getRegistry(registryName: string, cwd?: string): Promise; /** * Initialize default configuration * Creates global config with Fractary registry if no config exists */ initializeDefaults(): Promise; } /** * Default config manager instance */ export declare const configManager: ConfigManager; //# sourceMappingURL=config-manager.d.ts.map