pub fn save_settings(settings: &Settings) -> Result<(), String>Expand description
Persist the honored settings back to ~/.rpi/agent/settings.json.
Unknown pi fields (which Settings doesn’t model) are preserved: the
current file is read as raw JSON, the known fields are overlaid, and the
merged object is written — so a copied pi settings.json survives edits
without losing pi-only keys. Missing file ⇒ a fresh object. Best-effort
errors are returned as strings for the caller to surface.