/**
 * Unified Config Loader — orchestrator
 *
 * Loads and saves the unified YAML configuration.
 * Provides fallback to legacy JSON format for backward compatibility.
 *
 * Phase 1-6 refactor (issue #1164):
 *   Phase 1 → src/config/loader/io-locks.ts
 *   Phase 2 → src/config/loader/normalizers.ts
 *   Phase 3 → src/config/loader/yaml-serializer.ts
 *   Phase 4 → src/config/loader/defaults-merger.ts
 *   Phase 5 → src/config/loader/config-getters.ts
 *
 * This file re-exports the full public API so all existing import sites
 * continue to work without modification.
 */
import type { UnifiedConfig } from './unified-config-types';
export { CONFIG_YAML, CONFIG_JSON, CONFIG_LOCK, LOCK_STALE_MS, GO_DURATION_SEGMENT, GO_DURATION_PATTERN, getConfigYamlPath, getConfigJsonPath, acquireLock, releaseLock, hasUnifiedConfig, hasLegacyConfig, sleepSync, withConfigWriteLock, } from './loader/io-locks';
export { normalizeBrowserDevtoolsPort, normalizeBrowserPolicy, normalizeBrowserEvalMode, canonicalizeBrowserConfig, normalizeSessionAffinityTtl, hasPositiveDuration, validateCompositeVariants, normalizeContinuityInheritanceMap, normalizeContinuityConfig, normalizeOfficialChannelsConfig, } from './loader/normalizers';
export { generateYamlHeader, generateYamlWithComments } from './loader/yaml-serializer';
export { mergeWithDefaults } from './loader/defaults-merger';
export type { GeminiWebSearchInfo } from './loader/config-getters';
export { getWebSearchConfig, getGlobalEnvConfig, getContinuityInheritanceMap, getCliproxySafetyConfig, getThinkingConfig, getOfficialChannelsConfig, isDashboardAuthEnabled, getDashboardAuthConfig, getBrowserConfig, getImageAnalysisConfig, getLoggingConfig, getCursorConfig, } from './loader/config-getters';
/**
 * Determine which config format is active.
 * Returns 'yaml' if unified config exists or is enabled,
 * 'json' if only legacy config exists,
 * 'none' if no config exists.
 */
export declare function getConfigFormat(): 'yaml' | 'json' | 'none';
/**
 * Load unified config from YAML file.
 * Returns null if file doesn't exist.
 * Auto-upgrades config if version is outdated (regenerates comments).
 */
export declare function loadUnifiedConfig(): UnifiedConfig | null;
/**
 * Load config, preferring YAML if available, falling back to creating empty config.
 * Merges with defaults to ensure all sections exist.
 */
export declare function loadOrCreateUnifiedConfig(): UnifiedConfig;
/**
 * Save unified config to YAML file.
 * Uses atomic write (temp file + rename) to prevent corruption.
 * Uses lockfile to prevent concurrent writes.
 */
export declare function saveUnifiedConfig(config: UnifiedConfig): void;
/**
 * Atomically mutate unified config with lock held across read-modify-write.
 * Prevents stale writes from overwriting concurrent updates.
 */
export declare function mutateUnifiedConfig(mutator: (config: UnifiedConfig) => void): UnifiedConfig;
/**
 * Update unified config with partial data.
 * Loads existing config, merges changes, and saves.
 */
export declare function updateUnifiedConfig(updates: Partial<UnifiedConfig>): UnifiedConfig;
/**
 * Check if unified config mode is active.
 * Returns true if config.yaml exists OR CCS_UNIFIED_CONFIG=1.
 */
export declare function isUnifiedMode(): boolean;
/**
 * Get default profile name from config.
 */
export declare function getDefaultProfile(): string | undefined;
/**
 * Set default profile name in config.
 */
export declare function setDefaultProfile(name: string): void;
//# sourceMappingURL=unified-config-loader.d.ts.map