Improve fleet control, Crucible ops, and multi-machine identity.

Use hostname-first agent names so the same forged binary on many machines stays distinct at scale. Add WebSocket RTT latency on the roster and Crucible, fleet delete and uninstall flows, live alert config reload, and non-blocking pool setup. Fix Crucible phantom agents after delete, posture scan targeting, and USB portability (config data_dir, LAUNCH sync).
This commit is contained in:
AetherForge
2026-06-02 19:19:50 -07:00
parent 5222f4ad39
commit 01d76b3730
32 changed files with 737 additions and 229 deletions

View File

@@ -302,7 +302,10 @@ func (c *AgentClient) handleMessage(msg Message) {
if msg, _ := jobPayloadErrorMessage(msg.Payload); msg != "" {
log.Printf("[agent] job error from server: %s", msg)
}
c.write(Message{Type: "get_job", Payload: json.RawMessage("{}")})
// Back off 3 seconds before retrying — pool may still be connecting.
time.AfterFunc(3*time.Second, func() {
c.write(Message{Type: "get_job", Payload: json.RawMessage("{}")})
})
return
}
var j job.Job
@@ -312,7 +315,9 @@ func (c *AgentClient) handleMessage(msg Message) {
}
if j.Blob == "" {
log.Printf("[agent] empty job blob — requesting job again")
c.write(Message{Type: "get_job", Payload: json.RawMessage("{}")})
time.AfterFunc(3*time.Second, func() {
c.write(Message{Type: "get_job", Payload: json.RawMessage("{}")})
})
return
}
log.Printf("[agent] new job %s height=%d", j.ID, j.Height)