mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-06 05:17:15 +00:00
Add hermes_cli/config_backend.py (config-config design §4.1, D10/D11): a ConfigBackend protocol, the FileBackend (today's behaviour), selection by HERMES_CONFIG_BACKEND only (default file; 'remote' and unknown values fail closed with ConfigBackendUnavailable), and path-level helpers (read_config_doc, read_config_doc_readonly, config_version, config_exists, write_config_key, write_config_document, supports_file_tooling). Migrate every direct reader/stat/exists/bypass writer of a user config.yaml to the helpers (config.py loaders + caches, config_effective, env_loader, gateway, TUI, CLI watchers, cron, tools, profiles, logging, time). File tooling (config edit, backups, xAI migration rewrite, raw dashboard editor) checks supports_file_tooling() first; migrations skip write-back without it. Add scripts/check_config_yaml_readers.py (CI lint next to the writers gate) that rejects a direct read of a config path outside the backend.