Add OAuth provider runtime and providers UI

This commit is contained in:
lpf
2026-03-11 15:47:49 +08:00
parent d9872c3da7
commit 1c0e463d07
52 changed files with 9772 additions and 901 deletions

View File

@@ -75,15 +75,7 @@ func gatewayCmd() {
cfg.WorkspacePath(),
cfg.Sentinel.IntervalSec,
cfg.Sentinel.AutoHeal,
func(message string) {
if cfg.Sentinel.NotifyChannel != "" && cfg.Sentinel.NotifyChatID != "" {
msgBus.PublishOutbound(bus.OutboundMessage{
Channel: cfg.Sentinel.NotifyChannel,
ChatID: cfg.Sentinel.NotifyChatID,
Content: "[Sentinel] " + message,
})
}
},
buildSentinelAlertHandler(cfg, msgBus),
)
ctx, cancel := context.WithCancel(context.Background())
@@ -421,15 +413,7 @@ func gatewayCmd() {
newCfg.WorkspacePath(),
newCfg.Sentinel.IntervalSec,
newCfg.Sentinel.AutoHeal,
func(message string) {
if newCfg.Sentinel.NotifyChannel != "" && newCfg.Sentinel.NotifyChatID != "" {
msgBus.PublishOutbound(bus.OutboundMessage{
Channel: newCfg.Sentinel.NotifyChannel,
ChatID: newCfg.Sentinel.NotifyChatID,
Content: "[Sentinel] " + message,
})
}
},
buildSentinelAlertHandler(newCfg, msgBus),
)
if newCfg.Sentinel.Enabled {
sentinelService.SetManager(channelManager)
@@ -470,15 +454,7 @@ func gatewayCmd() {
newCfg.WorkspacePath(),
newCfg.Sentinel.IntervalSec,
newCfg.Sentinel.AutoHeal,
func(message string) {
if newCfg.Sentinel.NotifyChannel != "" && newCfg.Sentinel.NotifyChatID != "" {
msgBus.PublishOutbound(bus.OutboundMessage{
Channel: newCfg.Sentinel.NotifyChannel,
ChatID: newCfg.Sentinel.NotifyChatID,
Content: "[Sentinel] " + message,
})
}
},
buildSentinelAlertHandler(newCfg, msgBus),
)
if newCfg.Sentinel.Enabled {
sentinelService.Start()