Files
myron c6549ee27e Agent self-healing: auto-migrate old config key names on startup
Instead of crash-looping with KeyError when config has old key names,
load_config() now detects and migrates automatically:
- server_url -> jarvis_url
- api_key -> registration_key
- adds hostname from gethostname() if missing
- adds ssl_verify (false if URL is a bare IP)
- falls back to /opt/jarvis-agent/config.json if /etc path missing

Migrated config is saved in place so the fix is permanent.
Agents self-update within 24h via the existing update_url mechanism.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 01:57:40 +00:00
..