feat: add agent zones

This commit is contained in:
lussierj committed 2026-08-26 15:48:59 +00:00
1 parent d8cd7ad058
commit 82309db79a
29 files changed
+2242 -255

No files matched your search

+8
View File
@@ -78,6 +78,14 @@ function Send-AgentCheckin {
local_time = (Get-Date).ToString("o")
}
if (-not [string]::IsNullOrWhiteSpace([string]$config.site_id)) {
$body["site_id"] = [string]$config.site_id
}
if (-not [string]::IsNullOrWhiteSpace([string]$config.agent_zone_id)) {
$body["agent_zone_id"] = [string]$config.agent_zone_id
}
return Invoke-AgentApi -Method "POST" -Path "/api/agent/checkin" -Body $body
}
+5 -2
View File
@@ -15,8 +15,11 @@ probe output are intentionally excluded.
## Local Files
Create `agent-config.json` from `config.example.json` on the Agent host. Never
commit that file. `site_id` is the durable MinerOps site UUID; `site_name` is
retained only for transitional display compatibility.
commit that file. `site_id` is the durable MinerOps site UUID. `agent_zone_id` is the optional
durable network-reachability Zone UUID; older configurations may omit it only
when the Hub can preserve an established assignment or resolve exactly one
enabled Zone at the Site. `site_name` is retained only for transitional display
compatibility.
The Agent writes runtime state to `agent-state.json` and logs under `logs/`.
Installation and upgrades preserve all three paths.
+1
View File
@@ -2,6 +2,7 @@
"hub_url": "https://minerops.example.invalid",
"agent_id": "replace-with-agent-id",
"site_id": "00000000-0000-0000-0000-000000000000",
"agent_zone_id": "00000000-0000-0000-0000-000000000000",
"site_name": "Example Site",
"agent_secret": "replace-with-agent-secret",
"poll_interval_seconds": 120,