/**
 * CLI version helper.
 *
 * Pre-C4 this module also contained `checkForUpdate` + `notifyUpdateAvailable`
 * which printed an "update available" banner pointing at `studiograph update`.
 * Both the banner and the `update` command were removed in cli-owner-audit
 * Phase C4 once we standardized on `npx -y studiograph@<exact-version>` as
 * the canonical invocation — there's no global install to upgrade.
 *
 * Only `getCurrentVersion` survives: `serve` reads it on boot for the
 * WebSocket hub's version-stamp, and `redeploy` has its own copy in
 * src/cli/railway-pin.ts. Keep this file small enough that it's obviously
 * a leftover-by-design rather than a place to grow new logic.
 */
import { readFileSync } from 'fs';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
/** Current CLI version, read from the bundled package.json. */
export function getCurrentVersion() {
    const __filename = fileURLToPath(import.meta.url);
    const __dirname = dirname(__filename);
    const pkgPath = join(__dirname, '../../package.json');
    const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
    return pkg.version;
}
//# sourceMappingURL=version-checker.js.map