/** * Configuration Manager for MAMA Standalone * * Manages YAML configuration file at ~/.mama/config.yaml */ import type { MAMAConfig, MultiAgentConfig } from './types.js'; /** * Initialize config: load from disk, apply env overrides, and cache. * Call once at startup (e.g., in mama start). */ export declare function initConfig(): Promise; /** * Get the cached config synchronously. * Throws if initConfig() hasn't been called, catching initialization order bugs early. */ export declare function getConfig(): MAMAConfig; /** * Override config values at runtime (shallow merge into cache). * Does NOT persist to disk — use saveConfig() for that. */ export declare function overrideConfig(overrides: Partial): MAMAConfig; /** * Reset cached config (for testing). * @param useDefaults - If true, set cache to DEFAULT_CONFIG instead of null. */ export declare function resetConfigCache(useDefaults?: boolean): void; /** * Error thrown when config validation fails. * Contains all validation errors and resolution guidance. */ export declare class ConfigValidationError extends Error { readonly errors: string[]; readonly configPath: string; constructor(errors: string[], configPath: string); } /** * Expand ~ to home directory */ export declare function expandPath(path: string): string; /** * Get the full path to config file */ export declare function getConfigPath(): string; /** * Get the MAMA home directory */ export declare function getMAMAHome(): string; /** * Check if config file exists */ export declare function configExists(): boolean; /** * Load configuration from file * * @returns Configuration object * @throws Error if config file doesn't exist or is invalid */ export declare function loadConfig(): Promise; /** * Save configuration to file * * @param config - Configuration object to save */ export declare function saveConfig(config: MAMAConfig): Promise; /** * Create default configuration file * * @param overwrite - Whether to overwrite existing config * @returns Path to created config file * @throws Error if config exists and overwrite is false */ export declare function createDefaultConfig(overwrite?: boolean): Promise; /** * Validate configuration * * @param config - Configuration to validate * @returns Array of validation errors (empty if valid) */ export declare function validateConfig(config: MAMAConfig): string[]; /** * Get the default multi-agent configuration (disabled by default) */ export declare function getDefaultMultiAgentConfig(): MultiAgentConfig; /** * Provision default persona templates and multi-agent config on first start. * * - Copies builtin persona .md files from templates/personas/ to ~/.mama/personas/ * only if the personas directory does not yet exist. * - Injects a default (disabled) multi_agent section into config.yaml * only if one is not already present. */ export declare function provisionDefaults(): Promise; //# sourceMappingURL=config-manager.d.ts.map