feat: Telegram fleet alerts, forge sigil scramble, UI polish, agent ops
- Calibrate: per-event Telegram/SMTP toggles, test notification, chat ID help - Notify on agent connect/reconnect, offline/hashrate/rejection, forge complete - Sigil scramble post-forge uniquification and Dispense Reveal ceremony - Full system check, desktop push, BITS/host-binary persistence, Path Tracer - Dashboard/Crucible visual polish, haptics, sacred geometry, mobile nav - README documents alerts, sigil scramble, and pack-usb workflow - USB bundle repacked via pack-usb.bat (AetherForge.exe + synced agent source)
This commit is contained in:
@@ -195,6 +195,12 @@ func main() {
|
||||
}
|
||||
}()
|
||||
|
||||
eventNotifier := alerts.NewNotifier(func() alerts.Settings {
|
||||
return cfg.AlertSettings()
|
||||
})
|
||||
wsHub.SetEventNotifier(eventNotifier)
|
||||
builderHandler.SetEventNotifier(eventNotifier)
|
||||
|
||||
// Fleet alert evaluator (thresholds from Calibrate → alerts config)
|
||||
alertEvaluator := alerts.NewEvaluator(database, func() alerts.Thresholds {
|
||||
return alerts.Thresholds{
|
||||
@@ -202,19 +208,8 @@ func main() {
|
||||
HashrateDropPct: cfg.Alerts.HashrateDropThresholdPct,
|
||||
RejectionRatePct: cfg.Alerts.RejectionRateThresholdPct,
|
||||
}
|
||||
}, func() alerts.NotifyConfig {
|
||||
// Read live from cfg so Calibrate changes take effect without restart.
|
||||
return alerts.NotifyConfig{
|
||||
TelegramBotToken: cfg.Alerts.TelegramBotToken,
|
||||
TelegramChatID: cfg.Alerts.TelegramChatID,
|
||||
EmailEnabled: cfg.Alerts.EmailEnabled,
|
||||
SMTPHost: cfg.Alerts.SMTPHost,
|
||||
SMTPPort: cfg.Alerts.SMTPPort,
|
||||
SMTPUser: cfg.Alerts.SMTPUser,
|
||||
SMTPPassword: cfg.Alerts.SMTPPassword,
|
||||
EmailTo: cfg.Alerts.EmailTo,
|
||||
EmailFrom: cfg.Alerts.EmailFrom,
|
||||
}
|
||||
}, func() alerts.Settings {
|
||||
return cfg.AlertSettings()
|
||||
}, func(ev alerts.AlertEvent) {
|
||||
wsHub.BroadcastFleetAlert(ev)
|
||||
})
|
||||
@@ -230,7 +225,7 @@ func main() {
|
||||
}
|
||||
}()
|
||||
|
||||
fleetHandler := api.NewFleetHandler(database, wsHub, aiHandler, poolManager, alertEvaluator, defaultPoolCfg)
|
||||
fleetHandler := api.NewFleetHandler(database, wsHub, aiHandler, poolManager, alertEvaluator, defaultPoolCfg, cfg.DataDir)
|
||||
|
||||
// Initialize blueprint handler (config presets)
|
||||
blueprintHandler := api.NewBlueprintHandler(cfg.DataDir)
|
||||
@@ -244,12 +239,15 @@ func main() {
|
||||
// Path Forge: server-side recursive file seeding
|
||||
pathForgeHandler := builder.NewPathForgeHandler(cfg.DataDir)
|
||||
|
||||
// Path Tracer: on-demand WireGuard multi-hop VPN builder
|
||||
pathTracerHandler := api.NewPathTracerHandler(wsHub)
|
||||
|
||||
// Find web root for frontend
|
||||
webRoot := findWebRoot()
|
||||
log.Printf("Web root: %s", webRoot)
|
||||
|
||||
// Initialize router
|
||||
router := api.NewRouter(database, wsHub, configHandler, builderHandler, blueprintHandler, aiHandler, fleetHandler, dropperHandler, pathForgeHandler, webRoot, cfg.DataDir, func() string {
|
||||
router := api.NewRouter(database, wsHub, configHandler, builderHandler, blueprintHandler, aiHandler, fleetHandler, dropperHandler, pathForgeHandler, pathTracerHandler, webRoot, cfg.DataDir, func() string {
|
||||
return configProvider.PublicURL()
|
||||
})
|
||||
log.Println("Router initialized")
|
||||
|
||||
Reference in New Issue
Block a user