import { join, resolve } from 'node:path';
export function normalizeConversationEngineConfig(config) {
    const workspaceRoot = resolve(config.workspaceRoot);
    const stateRoot = resolve(config.stateRoot);
    const sessionStoragePath = resolve(config.sessionStoragePath ?? join(stateRoot, 'chat-sessions.catalog.json'));
    const memoryDir = resolve(config.memoryDir ?? join(stateRoot, 'memory'));
    const traceDir = resolve(join(stateRoot, 'traces'));
    const credentialStorePath = config.credentialStorePath ? resolve(config.credentialStorePath) : undefined;
    return {
        workspaceRoot,
        stateRoot,
        model: config.model,
        reasoningEffort: config.reasoningEffort,
        apiKey: config.apiKey,
        preferApiKey: config.preferApiKey,
        credentialStorePath,
        systemContext: config.systemContext,
        memoryMaintenanceMode: config.memoryMaintenanceMode ?? 'background',
        traceSummarizerRegistry: config.traceSummarizerRegistry,
        approvalPolicies: config.approvalPolicies,
        sessionStoragePath,
        memoryDir,
        traceDir,
        workspaceId: config.workspaceId,
        apiKeyPresent: config.apiKeyPresent ?? Boolean(config.apiKey),
    };
}
//# sourceMappingURL=config.js.map