import { existsSync, mkdirSync } from 'fs';
import { join } from 'path';
import { getAgentDir as getDefaultAgentDir } from '../../config.js';
export function getDefaultSessionDir(cwd) {
    const safePath = `--${cwd.replace(/^[/\\]/, '').replace(/[/\\:]/g, '-')}--`;
    const sessionDir = join(getDefaultAgentDir(), 'sessions', safePath);
    if (!existsSync(sessionDir)) {
        mkdirSync(sessionDir, { recursive: true });
    }
    return sessionDir;
}
//# sourceMappingURL=session-paths.js.map