|
| 1 | +import path from "node:path"; |
| 2 | +import { setTestEnvValue } from "../test-utils/env.js"; |
| 3 | +import { GATEWAY_STARTUP_MUTATED_ENV_KEYS } from "./test-helpers.env.js"; |
| 4 | + |
| 5 | +const MANUAL_GATEWAY_BACKGROUND_ENV_KEYS = [ |
| 6 | + "OPENCLAW_SKIP_BROWSER_CONTROL_SERVER", |
| 7 | + "OPENCLAW_SKIP_GMAIL_WATCHER", |
| 8 | + "OPENCLAW_SKIP_CANVAS_HOST", |
| 9 | + "OPENCLAW_SKIP_CHANNELS", |
| 10 | + "OPENCLAW_SKIP_PROVIDERS", |
| 11 | + "OPENCLAW_SKIP_CRON", |
| 12 | + "OPENCLAW_DISABLE_BUNDLED_PLUGINS", |
| 13 | + "OPENCLAW_BUNDLED_PLUGINS_DIR", |
| 14 | +] as const; |
| 15 | + |
| 16 | +export const MANUAL_GATEWAY_ENV_KEYS = [ |
| 17 | + ...GATEWAY_STARTUP_MUTATED_ENV_KEYS, |
| 18 | + ...MANUAL_GATEWAY_BACKGROUND_ENV_KEYS, |
| 19 | +] as const; |
| 20 | + |
| 21 | +/** Keeps manual RPC suites on the real core Gateway without unrelated startup work. */ |
| 22 | +export function configureManualGatewayBackgroundEnv(tempHome: string): void { |
| 23 | + setTestEnvValue("OPENCLAW_SKIP_BROWSER_CONTROL_SERVER", "1"); |
| 24 | + setTestEnvValue("OPENCLAW_SKIP_GMAIL_WATCHER", "1"); |
| 25 | + setTestEnvValue("OPENCLAW_SKIP_CANVAS_HOST", "1"); |
| 26 | + setTestEnvValue("OPENCLAW_SKIP_CHANNELS", "1"); |
| 27 | + setTestEnvValue("OPENCLAW_SKIP_PROVIDERS", "1"); |
| 28 | + setTestEnvValue("OPENCLAW_SKIP_CRON", "1"); |
| 29 | + setTestEnvValue("OPENCLAW_DISABLE_BUNDLED_PLUGINS", "1"); |
| 30 | + setTestEnvValue("OPENCLAW_BUNDLED_PLUGINS_DIR", path.join(tempHome, "no-plugins")); |
| 31 | +} |
0 commit comments