feat(core): isolate dev and production environments

- Add IS_DEV_ENVIRONMENT flag to paths.ts for automatic detection
- Dev uses 'Gemini Nexus Dev' app data dir and '.geminiNexus-agent-dev' agent dir
- Dev proxy defaults to port 8046, production stays on 8045
- Move app.setName() before packetLogPath to ensure correct userData path
- Config, DB, logs, and ORPC packets fully isolated between dev and prod
This commit is contained in:
Gemini Nexus Bot committed 2026-05-02 00:28:22 -03:00
1 parent bf5a42c03e
commit 5c44a622a8
4 files changed
+38 -22

No files matched your search

+5 -6
View File
@@ -10,16 +10,15 @@ import os from 'os';
let sentryEnabled = false;
try {
const home = os.homedir();
const isDev = process.env.NODE_ENV === 'development';
const appName = isDev ? 'Gemini Nexus Dev' : 'Gemini Nexus';
let appDataPath = '';
if (process.platform === 'win32') {
appDataPath = path.join(
process.env.APPDATA || path.join(home, 'AppData', 'Roaming'),
'Gemini Nexus',
);
appDataPath = path.join(process.env.APPDATA || path.join(home, 'AppData', 'Roaming'), appName);
} else if (process.platform === 'darwin') {
appDataPath = path.join(home, 'Library', 'Application Support', 'Gemini Nexus');
appDataPath = path.join(home, 'Library', 'Application Support', appName);
} else {
appDataPath = path.join(home, '.config', 'Gemini Nexus');
appDataPath = path.join(home, '.config', appName);
}
const configPath = path.join(appDataPath, 'gui_config.json');