2026-04-20 20:37:32 +08:00
|
|
|
let gatewayManager: any = null
|
|
|
|
|
|
|
|
|
|
export function getGatewayManagerInstance(): any {
|
|
|
|
|
return gatewayManager
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function initGatewayManager(): Promise<void> {
|
|
|
|
|
const { GatewayManager } = await import('./hermes/gateway-manager')
|
|
|
|
|
const { getActiveProfileName } = await import('./hermes/hermes-profile')
|
|
|
|
|
const activeProfile = getActiveProfileName()
|
|
|
|
|
gatewayManager = new GatewayManager(activeProfile)
|
|
|
|
|
|
|
|
|
|
await gatewayManager.detectAllOnStartup()
|
|
|
|
|
await gatewayManager.startAll()
|
2026-04-21 12:35:48 +08:00
|
|
|
console.log("startall")
|
2026-04-20 20:37:32 +08:00
|
|
|
}
|