Lines 1-27javascript
2import crypto from 'node:crypto';
3import fs from 'node:fs';
4import os from 'node:os';
5import path from 'node:path';
6import process from 'node:process';
7import { createInterface } from 'node:readline/promises';
8import { spawnSync } from 'node:child_process';
9import { fileURLToPath } from 'node:url';
HighSandbox Evasion Gated Capability
Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.
dist/main.jsView on unpkg · L7 MediumInstall Persistence
Source writes installer persistence such as shell profile or service configuration.
dist/main.jsView on unpkg · L7 10import { APP_HOME, buildCodexApiProviderOverrides, DEFAULT_CODEX_TELEGRAM_HOME, DEFAULT_ENV_PATH, DEFAULT_LOG_PATH, DEFAULT_STATUS_PATH, getLoadedEnvPath, loadConfig, loadEnv, } from './config.js';
11import { createAuthRefreshNotificationAggregator, } from './auth/notifications.js';
12import { installBundledCodexSkills } from './codex_skills.js';
13import { acquireProcessLock, LockHeldError } from './lock.js';
14import { readRuntimeStatus, writeRuntimeStatus } from './runtime.js';
15import { buildFoxclawLaunchdPlistText, extractNodePathFromLaunchdPlist, } from './launchd.js';
16import { buildFoxclawSystemdUnitText, buildSystemdRestartHelperArgs, cgroupContainsSystemdUnit, refreshFoxclawExecStartDropIns, removeFoxclawExecStartDropIns, } from './systemd.js';
17import { clearPendingClusterUpdateBroadcast, createSelfUpdateRuntime, inferPnpmHomeFromEntryPoint, performSelfUpdate, readPendingClusterUpdateBroadcast, readSelfUpdateStatus, writeSelfUpdateStatus, } from './update.js';
18import { TELEGRAM_VOICE_MAX_BYTES, TELEGRAM_VOICE_SUPPORTED_EXTENSIONS, telegramVoiceContentType, } from './voice/files.js';
19import { inferTelegramBotId, resolveTelegramVoiceTarget } from './voice/target.js';
20import { shouldShowRuntimeLastUpdate } from './update_status.js';
21const rawCommand = process.argv[2];
22const command = rawCommand || 'serve';
24const packageRoot = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
25const entryPoint = fileURLToPath(import.meta.url);
26const PROXY_ENV_KEYS = [