/**
 * Config system barrel export.
 *
 * Provides:
 * - ConfigManager class and all schema types
 * - Pure helpers that derive values from an explicit ConfigManager instance
 */
export { ConfigManager } from './manager.js';
export { DEFAULT_CONFIG, CONFIG_SCHEMA } from '@pellux/goodvibes-sdk/platform/config/schema';
export { ConfigError } from '@pellux/goodvibes-sdk/platform/types/errors';
import { readFileSync } from 'fs';
import { ConfigManager } from './manager.js';
import { logger } from '@pellux/goodvibes-sdk/platform/utils/logger';
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils/error-display';
export function getConfigSnapshot(configManager) {
    return configManager.getRaw();
}
export function getConfiguredModelId(configManager) {
    return configManager.get('provider.model');
}
export function getConfiguredProviderId(configManager) {
    return configManager.get('provider.provider');
}
export function getConfiguredEmbeddingProviderId(configManager) {
    return configManager.get('provider.embeddingProvider');
}
export function isAutoApproveEnabled(configManager) {
    return configManager.get('behavior.autoApprove');
}
export function getWorkingDirectory(configManager) {
    return configManager.getWorkingDirectory();
}
export function getConfiguredSystemPrompt(configManager) {
    const file = configManager.get('provider.systemPromptFile');
    if (!file)
        return undefined;
    try {
        return readFileSync(file, 'utf-8');
    }
    catch (err) {
        logger.debug('systemPrompt file read failed (non-fatal)', { file, error: summarizeError(err) });
        return undefined;
    }
}
export { getConfiguredApiKeys, resolveApiKeys } from './api-keys.js';
