consortium
Version:
Remote control and session sharing CLI for AI coding agents
33 lines (27 loc) • 968 B
JavaScript
import { execFileSync } from 'child_process';
import { fileURLToPath } from 'url';
import { join, dirname } from 'path';
// Ensure Node flags to reduce noisy warnings on stdout (which could interfere with MCP)
const hasNoWarnings = process.execArgv.includes('--no-warnings');
const hasNoDeprecation = process.execArgv.includes('--no-deprecation');
if (!hasNoWarnings || !hasNoDeprecation) {
const projectRoot = dirname(dirname(fileURLToPath(import.meta.url)));
const entrypoint = join(projectRoot, 'dist', 'codex', 'consortiumMcpStdioBridge.mjs');
try {
execFileSync(process.execPath, [
'--no-warnings',
'--no-deprecation',
entrypoint,
...process.argv.slice(2)
], {
stdio: 'inherit',
env: process.env
});
} catch (error) {
process.exit(error.status || 1);
}
} else {
// Already have desired flags; import module directly
import('../dist/codex/consortiumMcpStdioBridge.mjs');
}