Add scout constellation mode for APK venue persona packs.
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
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:
@@ -1,6 +1,7 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"log"
|
||||
"strings"
|
||||
@@ -36,6 +37,8 @@ func (d *Database) scanAgent(row interface {
|
||||
var notes, tagsRaw string
|
||||
var usbSpread int
|
||||
var gpuMinerActive int
|
||||
var graftStrain, graftTier sql.NullString
|
||||
var graftApproved sql.NullString
|
||||
err := row.Scan(
|
||||
&a.ID, &a.Name, &a.Wallet, &a.IP, &a.Version, &a.Status,
|
||||
&a.CPUCores, &a.MemoryGB, &a.LastSeen, &a.CreatedAt,
|
||||
@@ -46,6 +49,7 @@ func (d *Database) scanAgent(row interface {
|
||||
&a.BuildID, &a.WorkerName, &usbSpread, &a.Campaign,
|
||||
&a.GPUHashrate15m, &a.GPUModel, &gpuMinerActive,
|
||||
&a.ParentAgentID, &a.SpreadGeneration, &a.SpreadStrain,
|
||||
&graftStrain, &graftTier, &graftApproved,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -57,6 +61,7 @@ func (d *Database) scanAgent(row interface {
|
||||
active := true
|
||||
a.GPUMinerActive = &active
|
||||
}
|
||||
a.GraftSourceStrain, a.GraftTier, a.GraftApprovedAt = scanGraftFields(graftStrain, graftTier, graftApproved)
|
||||
return a, nil
|
||||
}
|
||||
|
||||
@@ -64,7 +69,8 @@ const agentSelectCols = `id, name, wallet, ip, version, status, cpu_cores, memor
|
||||
hashrate_15s, hashrate_1m, hashrate_15m, shares_total, shares_good, shares_bad,
|
||||
cpu_usage_pct, memory_usage_pct, uptime_seconds, notes, tags, platform, arch, os_version, hostname, mac_address,
|
||||
build_id, worker_name, usb_spread, campaign, gpu_hashrate_15m, gpu_model, gpu_miner_active,
|
||||
parent_agent_id, spread_generation, spread_strain`
|
||||
parent_agent_id, spread_generation, spread_strain,
|
||||
graft_source_strain, graft_tier, graft_approved_at`
|
||||
|
||||
func (d *Database) UpdateAgentMeta(id, notes string, tags []string) error {
|
||||
_, err := d.Exec(`UPDATE agents SET notes = ?, tags = ? WHERE id = ?`, notes, encodeTags(tags), id)
|
||||
|
||||
Reference in New Issue
Block a user