mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
Lets platform plugins own their YAML→env config bridge instead of forcing core gateway/config.py to know every platform's schema. The hook receives the full parsed config.yaml and the platform's own sub-dict, may mutate os.environ (env > YAML precedence preserved via the standard `not os.getenv(...)` guards), and may return a dict to merge into PlatformConfig.extra. It runs during load_gateway_config() after the existing generic shared-key loop and before _apply_env_overrides(), mirroring the env_enablement_fn dispatch pattern (#21306, #21331). Pure addition — no behavior change for existing platforms. Each of the eight platforms with hardcoded YAML→env blocks today (discord, telegram, whatsapp, slack, dingtalk, mattermost, matrix, feishu, ~252 LOC in gateway/config.py) can migrate in independent follow-up PRs; the hardcoded blocks remain functional in the meantime, and their `not os.getenv(...)` guards make them no-ops for any env var the hook already set. Test coverage: 10 new tests in tests/gateway/test_platform_registry.py covering field default, callable acceptance, env mutation, extras merge, both signature args, exception swallowing, missing/non-dict sections, and env > YAML precedence. Refs #3823, #24356. Closes #24836. |
||
|---|---|---|
| .. | ||
| _category_.json | ||
| acp-internals.md | ||
| adding-platform-adapters.md | ||
| adding-providers.md | ||
| adding-tools.md | ||
| agent-loop.md | ||
| architecture.md | ||
| browser-supervisor.md | ||
| context-compression-and-caching.md | ||
| context-engine-plugin.md | ||
| contributing.md | ||
| creating-skills.md | ||
| cron-internals.md | ||
| environments.md | ||
| extending-the-cli.md | ||
| gateway-internals.md | ||
| image-gen-provider-plugin.md | ||
| memory-provider-plugin.md | ||
| model-provider-plugin.md | ||
| plugin-llm-access.md | ||
| prompt-assembly.md | ||
| provider-runtime.md | ||
| session-storage.md | ||
| tools-runtime.md | ||
| trajectory-format.md | ||
| video-gen-provider-plugin.md | ||