Lines 1-33javascript
3 * VANEXA AGENT - Sovereign Digital Brain
4 * V8 Bytecode Launcher with Runtime Version Guard
6import path from 'path';
8import { fileURLToPath } from 'url';
10import bytenode from 'bytenode';
11import { createRequire } from 'module';
12import { UI } from '../src/utils/cli_ui.js';
14const require = createRequire(import.meta.url);
15const __filename = fileURLToPath(import.meta.url);
MediumDynamic Require
Package source references dynamic require/import behavior.
bin/vanexa-agent.jsView on unpkg · L13 16const __dirname = path.dirname(__filename);
18// ── V8 Version Guard ──
19// V8 bytecode is NOT portable across V8 engine versions.
20// The .jsc file MUST be loaded by the same V8 major version that compiled it.
21const REQUIRED_NODE_MAJOR = 24;
22const userNodeMajor = parseInt(process.versions.node.split('.')[0], 10);
24if (userNodeMajor < REQUIRED_NODE_MAJOR) {
25 UI.printFatalBox('FATAL: Node.js Version Mismatch', [
26 `Your Node.js: v${process.versions.node} (V8 ${process.versions.v8})`,
27 `Required: v${REQUIRED_NODE_MAJOR}.x LTS or higher`,
29 `Vanexa Agent uses V8 bytecode compiled for Node.js v24 LTS.`,
30 `The bytecode is incompatible with older Node.js versions.`,
32 `➤ Fix: Install Node.js v24 LTS from https://nodejs.org`,