Files
hermes-agent/tools
Maciej Lisiewski 2c9d231511 fix(terminal): derive declared key holders from the shared config walk
Follow-up to the salvaged commit, rebased over 95f2010b73 (which already
strips HERMES_CUSTOM_*/HERMES_PROVIDER_*_API_KEY as internal secrets):

- drop the HERMES_CUSTOM_ prefix rule; main covers it in a stricter tier
- reuse _config_declared_key_envs + _config_credential_env_refs (the walk
  MCP stdio already trusts) instead of a second section-list reader, so
  every *_key_env/*_token_env pointer and ${VAR} credential ref counts
- fold camelCase aliases (keyEnv/apiKeyEnv/apiKey) the readers accept
- read the raw file via read_raw_config_readonly, cache on its identity;
  an unparsable file falls back to the newest good backup and keeps the
  names already denied (never caches the fallback)
- compute the set once per env in _filter_secret_env/_scrub_credentials

Provider tier, so inherit_credentials children still drive the endpoint.

Fixes #147329
2026-11-14 16:16:32 +01:00
..
…