Add scout constellation mode for APK venue persona packs.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

Cluster 3+ scout_report hits on the same SSID within 10 minutes; server infers airport/campus/retail venue class and pushes persona spread_policy. Emberwake weather-map merges active scout biomes. Includes agent, server API, and Vitest coverage.
This commit is contained in:
AetherForge
2026-06-07 09:18:58 -07:00
parent 8b14582975
commit bbab38f8e1
60 changed files with 2610 additions and 43 deletions

View File

@@ -148,6 +148,7 @@ func main() {
aiHandler.SetEventBroadcaster(func(entry api.AIActivityEntry) {
wsHub.BroadcastAIActivity(entry)
})
wsHub.WireDefaultEpidemiologyReporter()
// Stream all server logs to the dashboard Master Terminal
log.SetOutput(io.MultiWriter(os.Stdout, &wsLogWriter{hub: wsHub}))
@@ -273,18 +274,16 @@ func main() {
defer fleetSched.Stop()
wsHub.SetConnectTaskRunner(fleetSched)
courtChamber := api.NewHubCourtChamberAdapter(wsHub, database)
fleetAISched := fleetai.NewScheduler(
&api.ConfigAIAdapter{Src: configProvider},
&api.WSHubSnapshotAdapter{Hub: wsHub},
&api.ClearanceGuardExecutor{Inner: &api.FleetAIExecutor{Hub: wsHub}, Clearance: wsHub.ClearanceManager()},
&api.DatabaseAIDecisionStore{DB: database},
&api.DatabaseCourtAdapter{DB: database},
courtChamber,
wsHub.ClearanceManager(),
)
fleetAISched.Start()
defer fleetAISched.Stop()
fleetAIHandler := api.NewFleetAIHandler(configProvider, database)
log.Println("Fleet AI Control scheduler initialized")
// Initialize blueprint handler (config presets)
blueprintHandler := api.NewBlueprintHandler(cfg.DataDir)
@@ -321,6 +320,31 @@ func main() {
// Path Tracer: on-demand WireGuard multi-hop VPN builder
pathTracerHandler := api.NewPathTracerHandler(wsHub)
deployPlanHandler.BindPathTracer(pathTracerHandler)
spreadCredHandler.BindAutopsyTrigger(wsHub, pathTracerHandler)
seerEmitter := &api.HubSeerEmitter{Hub: wsHub, DB: database}
fleetAISched.SetSurgicalDeps(fleetai.SurgicalDeps{
Trace: &api.PathTraceSurgicalAdapter{Hub: wsHub, PathTrace: pathTracerHandler},
Strain: &api.DatabaseStrainMemoryAdapter{DB: database},
Seer: seerEmitter,
StrainLookup: func(agentID string) string {
return api.StrainFromAgent(wsHub, agentID)
},
ErasureActive: func() bool {
return wsHub.PolicyErasureEnabled()
},
})
fleetAISched.SetCourtDeps(fleetai.CourtDeps{
Chamber: courtChamber,
Seer: seerEmitter,
Emberwake: func(agentID string, transcript fleetai.CourtDebateTranscript) {
wsHub.BroadcastEmberwakeCourtDebate(agentID, transcript)
},
})
fleetAISched.SetSeerBridge(&api.SeerBridge{DB: database, Hub: wsHub})
fleetAISched.Start()
defer fleetAISched.Stop()
log.Println("Fleet AI Control scheduler initialized")
// Find web root for frontend
webRoot := findWebRoot()
@@ -408,6 +432,7 @@ func applyRuntimeConfig(cfg *Config, wsHub *api.WSHub, poolManager *pool.Manager
HashrateGateSpreadMin: cfg.Server.HashrateGateSpreadMin,
HashrateGateHPS: cfg.Server.HashrateGateHPS,
ErasureLanesEnabled: cfg.Server.ErasureLanesEnabled,
FleetTorrentEnabled: cfg.Server.FleetTorrentEnabled,
})
}
if poolManager != nil {