/**
 * Configuration Validators
 *
 * Contains the ConfigValidator (legacy JSON schema), ZodConfigValidator (Zod-based),
 * startup validation functions, and config command handlers.
 */
import { ZodSchema } from 'zod';
import type { JSONSchema, ValidationError, ValidationResult, Settings, UserSettings, HooksConfig, MCPConfig, YoloConfig, EnvVars } from './schema.js';
/**
 * Configuration Validator
 */
export declare class ConfigValidator {
    private schemas;
    constructor(customSchemas?: Record<string, JSONSchema>);
    /**
     * Validate a configuration object against a schema
     */
    validate(config: unknown, schemaName: string): ValidationResult;
    /**
     * Validate a configuration file
     */
    validateFile(filePath: string): Promise<ValidationResult>;
    /**
     * Validate all config files in a directory
     */
    validateDirectory(dirPath: string): Promise<Map<string, ValidationResult>>;
    /**
     * Get schema with defaults applied
     */
    getDefaults(schemaName: string): unknown;
    /**
     * Validate a value against a schema
     */
    private validateValue;
    /**
     * Get the JSON type of a value
     */
    private getType;
    /**
     * Extract default values from schema
     */
    private extractDefaults;
    /**
     * Format validation result for display
     */
    formatResult(result: ValidationResult, fileName: string): string;
    /**
     * Get available schemas
     */
    getSchemas(): string[];
    /**
     * Get schema for a file
     */
    getSchema(name: string): JSONSchema | undefined;
}
export declare function getConfigValidator(): ConfigValidator;
/**
 * Validate configuration on startup
 */
export declare function validateStartupConfig(codebuddyDir: string): Promise<boolean>;
/**
 * Zod-based configuration validator with enhanced features
 */
export declare class ZodConfigValidator {
    private zodSchemas;
    constructor(customSchemas?: Record<string, ZodSchema>);
    /**
     * Validate configuration with Zod schema
     * Returns validated data with defaults applied
     */
    validate<T = unknown>(config: unknown, schemaName: string): ValidationResult & {
        data?: T;
    };
    /**
     * Safe parse - returns data or null without throwing
     */
    safeParse<T = unknown>(config: unknown, schemaName: string): {
        success: true;
        data: T;
    } | {
        success: false;
        errors: ValidationError[];
    };
    /**
     * Validate and merge with defaults
     * Applies defaults for missing optional fields
     */
    validateWithDefaults<T = unknown>(config: unknown, schemaName: string): T | null;
    /**
     * Validate a configuration file with Zod
     */
    validateFile<T = unknown>(filePath: string): Promise<ValidationResult & {
        data?: T;
    }>;
    /**
     * Validate all config files in a directory
     */
    validateDirectory(dirPath: string): Promise<Map<string, ValidationResult>>;
    /**
     * Validate environment variables
     */
    validateEnvVars(): ValidationResult & {
        data?: EnvVars;
    };
    /**
     * Get default values for a schema
     */
    getDefaults<T = unknown>(schemaName: string): T | undefined;
    /**
     * Generate schema documentation
     */
    generateDocs(schemaName: string): string;
    /**
     * Get default value from a field schema
     */
    private getFieldDefault;
    /**
     * Migrate old configuration formats to current format
     */
    migrateConfig(config: unknown, schemaName: string): Promise<unknown>;
    /**
     * Format validation result for display
     */
    formatResult(result: ValidationResult, fileName: string): string;
    /**
     * Get list of available schemas
     */
    getSchemas(): string[];
    /**
     * Get Zod schema by name
     */
    getSchema(name: string): ZodSchema | undefined;
}
export declare function getZodConfigValidator(): ZodConfigValidator;
/**
 * Result of comprehensive startup validation
 */
export interface StartupValidationResult {
    valid: boolean;
    configResults: Map<string, ValidationResult>;
    envResult: ValidationResult;
    warnings: string[];
    errors: string[];
    validatedConfigs: {
        settings?: Settings;
        userSettings?: UserSettings;
        hooks?: HooksConfig;
        mcp?: MCPConfig;
        yolo?: YoloConfig;
        env?: EnvVars;
    };
}
/**
 * Comprehensive startup validation with Zod
 * Validates all configuration files and environment variables
 */
export declare function validateStartupConfigWithZod(projectDir: string, userDir?: string): Promise<StartupValidationResult>;
/**
 * Quick validation check - returns boolean
 */
export declare function isConfigValid(projectDir: string): Promise<boolean>;
/**
 * Load and validate settings with defaults
 */
export declare function loadValidatedSettings(filePath: string): Promise<Settings>;
/**
 * Load and validate user settings with defaults
 */
export declare function loadValidatedUserSettings(filePath: string): Promise<UserSettings>;
/**
 * Handle /config validate command
 */
export declare function handleConfigValidateCommand(projectDir?: string): Promise<string>;
