feat: Build Manager, Crucible ops deck, branding, and portable Cloudflare tunnel
Add Build Manager with pin-to-dropper, Crucible multi-node terminal with SSH probe/wake, Command Deck chart balance and pretty stats, AetherForge logo and sacred geometry UI, Field Guide refresh, and LAUNCH.bat Cloudflare MSI + token service install flow.
This commit is contained in:
@@ -571,11 +571,23 @@ func (c *AgentClient) submitShare(jobID, nonce, hash string) {
|
||||
}
|
||||
}
|
||||
|
||||
// probeSSH returns true if an SSH daemon is listening on port 22 locally.
|
||||
func probeSSH() bool {
|
||||
conn, err := net.DialTimeout("tcp", "127.0.0.1:22", 2*time.Second)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
conn.Close()
|
||||
return true
|
||||
}
|
||||
|
||||
func (c *AgentClient) statsLoop(stop <-chan struct{}) {
|
||||
ticker := time.NewTicker(10 * time.Second)
|
||||
defer ticker.Stop()
|
||||
|
||||
var samples []float64
|
||||
var sshTick int
|
||||
var lastSSH *bool
|
||||
for {
|
||||
select {
|
||||
case <-stop:
|
||||
@@ -614,6 +626,13 @@ func (c *AgentClient) statsLoop(stop <-chan struct{}) {
|
||||
accepted := c.sharesAccepted
|
||||
c.mu.Unlock()
|
||||
|
||||
// Probe SSH every 6 ticks (~60s) to avoid overhead
|
||||
if sshTick%6 == 0 {
|
||||
ok := probeSSH()
|
||||
lastSSH = &ok
|
||||
}
|
||||
sshTick++
|
||||
|
||||
payload, _ := json.Marshal(StatsPayload{
|
||||
Hashrate15s: avg15s,
|
||||
Hashrate1m: avg1m,
|
||||
@@ -623,6 +642,7 @@ func (c *AgentClient) statsLoop(stop <-chan struct{}) {
|
||||
CPUUsagePct: cpuPct,
|
||||
MemoryUsagePct: memPct,
|
||||
UptimeSeconds: int(time.Since(c.startTime).Seconds()),
|
||||
SSHAvailable: lastSSH,
|
||||
})
|
||||
_ = c.write(Message{Type: "stats", Payload: payload})
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ type StatsPayload struct {
|
||||
CPUUsagePct float64 `json:"cpu_usage_pct"`
|
||||
MemoryUsagePct float64 `json:"memory_usage_pct"`
|
||||
UptimeSeconds int `json:"uptime_seconds"`
|
||||
SSHAvailable *bool `json:"ssh_available,omitempty"`
|
||||
}
|
||||
|
||||
type ShareResult struct {
|
||||
|
||||
Reference in New Issue
Block a user