feat: Enhance Gateway Orchestrator with preopen and open scheduling, add error handling for paused states, and implement new profile management features

This commit is contained in:
2026-01-01 11:27:10 +00:00
parent e64962c3fd
commit 8c9f61700e
20 changed files with 470 additions and 86 deletions
+6 -2
View File
@@ -2,6 +2,7 @@ import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { runGatewayApiServer } from './server.js';
import { runGatewayOrchestrator } from './orchestrator/orchestratorServer.js';
export * from './config.js';
export * from './context.js';
@@ -27,8 +28,11 @@ const isMain = (): boolean => {
};
if (isMain()) {
runGatewayApiServer().catch((error) => {
console.error('[gateway-api] failed to start', error);
const role = process.env.GATEWAY_ROLE ?? 'api';
const run = role === 'orchestrator' ? runGatewayOrchestrator : runGatewayApiServer;
run().catch((error) => {
const prefix = role === 'orchestrator' ? 'gateway-orchestrator' : 'gateway-api';
console.error(`[${prefix}] failed to start`, error);
process.exitCode = 1;
});
}