import { access } from 'node:fs/promises';
import { join } from 'node:path';
import { CODEX_PROJECT_MAPPINGS, CODEX_USER_MAPPINGS } from './paths.js';
async function detectCodex(scopeRoot) {
    try {
        await access(join(scopeRoot, '.codex'));
        return true;
    }
    catch {
        return false;
    }
}
export const codexAdapter = {
    name: 'codex',
    displayName: 'Codex CLI',
    defaultStrategy: 'auto',
    projectMappings: CODEX_PROJECT_MAPPINGS,
    userMappings: CODEX_USER_MAPPINGS,
    detect: detectCodex,
};
