import { readFileSync } from 'fs';
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';
const pkgPath = join(dirname(fileURLToPath(import.meta.url)), '..', 'package.json');
export const CLI_VERSION = (() => {
    try {
        const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
        return pkg.version?.trim() || '0.0.0';
    }
    catch {
        return '0.0.0';
    }
})();
