(config, env = process.env)
| 379 | } |
| 380 | |
| 381 | function buildAutomationBackendEnv(config, env = process.env) { |
| 382 | // Both backends share the same session API key value. |
| 383 | return { |
| 384 | AUTOMATION_AGENT_SERVER_URL: getAgentServerBaseUrl(config), |
| 385 | AUTOMATION_AGENT_SERVER_API_KEY: config.sessionApiKey, |
| 386 | AUTOMATION_DB_URL: `sqlite+aiosqlite:///${join(config.stateDir, "automations.db")}`, |
| 387 | AUTOMATION_BASE_URL: `http://localhost:${config.ingressPort}`, |
| 388 | AUTOMATION_WORKSPACE_BASE: join(config.stateDir, "workspaces"), |
| 389 | AUTOMATION_LOCAL_API_KEY: config.sessionApiKey, |
| 390 | ...buildAutomationTelemetryEnv(env), |
| 391 | // Quiet the automation service by default; see buildBackendLogEnv. |
| 392 | ...buildBackendLogEnv({ verbose: config.verbose, automation: true, env }), |
| 393 | AUTOMATION_CORS_ORIGINS: buildAutomationCorsOrigins(config), |
| 394 | FILE_STORE: "local", |
| 395 | LOCAL_STORAGE_PATH: join(config.stateDir, "storage"), |
| 396 | OPENHANDS_SUPPRESS_BANNER: "1", |
| 397 | }; |
| 398 | } |
| 399 | |
| 400 | function startAutomationBackend(config) { |
| 401 | logService( |
no test coverage detected