Files
ServerKit/backend
Juan DenisandClaude Opus 4.7 244eef80c6 Push system_info from agent and persist server IP
The Server.ip_address column was never written: register_polling
captured the source IP into the in-memory ConnectedAgent but didn't
copy it to the Server row, so the Overview tab showed "IP Address:
N/A" for every connected agent forever. Persist it on agent
registration; existing rows backfill on the next reconnect.

The agent never actually pushed a system_info message either —
it only answered system:info synchronously on demand, so update_
system_info was never called from the request/response path. CPU,
memory, disk, kernel version, and docker version stayed N/A on the
Server row no matter how long the agent had been online.

- New sendSystemInfo() in agent.go builds a typed SystemInfoMessage
  and pushes via the transport. Wired into connectionWatcher
  alongside sendCapabilities so the data flows on connect and on
  the periodic resend cadence (5s for the first minute, 60s
  thereafter).
- poll.Send() gains a typed branch for SystemInfoMessage that
  marshals to a map and stashes for the next /poll body, mirroring
  the CapabilitiesMessage path.
- agent_registry.register_polling now writes ip_address to the
  Server row when present.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 05:36:16 -04:00
..