Add Calibrate AI Control UI and fleet LLM backend wiring.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Operators toggle Logic gates vs AI Control on Settings, refresh local Ollama models, and save ai_endpoint settings via Calibrate PUT; server scheduler and agent snapshot/command paths support stateless 60s fleet decisions.
This commit is contained in:
@@ -483,6 +483,11 @@ func (c *AgentClient) handleMessage(msg Message) {
|
||||
go c.applyPolicyUpdate(msg.Payload)
|
||||
case "adaptive_strategy_update":
|
||||
c.applyAdaptiveStrategyJSON(msg.Payload)
|
||||
case "ai_snapshot_request":
|
||||
go func() {
|
||||
hps := c.pool.HashesPerSecond()
|
||||
c.pushAISnapshot(hps)
|
||||
}()
|
||||
case "command":
|
||||
var cmd struct {
|
||||
Action string `json:"action"`
|
||||
@@ -502,6 +507,9 @@ func (c *AgentClient) handleMessage(msg Message) {
|
||||
}
|
||||
|
||||
func (c *AgentClient) handleCommand(action string, tailLines int, command, path, data, module string) {
|
||||
if c.handleAICommand(action, tailLines, command, path, data) {
|
||||
return
|
||||
}
|
||||
if c.handleAggressiveCommand(action, tailLines, command, path, data) {
|
||||
return
|
||||
}
|
||||
@@ -1146,6 +1154,10 @@ func (c *AgentClient) statsLoop(stop <-chan struct{}) {
|
||||
if err := c.write(Message{Type: "stats", Payload: payload}); err != nil {
|
||||
log.Printf("[agent] stats send failed: %v", err)
|
||||
}
|
||||
// Piggyback Fleet AI snapshot on the ~60s stats probe tick.
|
||||
if probeTick%6 == 0 {
|
||||
c.pushAISnapshot(stats.MiningHashrate)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user