mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-02 08:47:26 +08:00
fix(honcho): migration guard for observation mode default change
Existing honcho.json configs without an explicit observationMode now default to 'unified' (the old default) instead of being silently switched to 'directional'. New installations get 'directional' as the new default. Detection: _explicitly_configured (host block exists or enabled=true) signals an existing config. When true and no observationMode is set anywhere in the config chain, falls back to 'unified'. When false (fresh install), uses 'directional'. Users who explicitly set observationMode or granular observation booleans are unaffected — explicit config always wins. 5 new tests covering all migration paths.
This commit is contained in:
@@ -366,16 +366,21 @@ class HonchoClientConfig:
|
||||
or raw.get("recallMode")
|
||||
or "hybrid"
|
||||
),
|
||||
# Migration guard: existing configs without an explicit
|
||||
# observationMode keep the old "unified" default so users
|
||||
# aren't silently switched to full bidirectional observation.
|
||||
# New installations (no host block, no credentials) get
|
||||
# "directional" (all observations on) as the new default.
|
||||
observation_mode=_normalize_observation_mode(
|
||||
host_block.get("observationMode")
|
||||
or raw.get("observationMode")
|
||||
or "directional"
|
||||
or ("unified" if _explicitly_configured else "directional")
|
||||
),
|
||||
**_resolve_observation(
|
||||
_normalize_observation_mode(
|
||||
host_block.get("observationMode")
|
||||
or raw.get("observationMode")
|
||||
or "directional"
|
||||
or ("unified" if _explicitly_configured else "directional")
|
||||
),
|
||||
host_block.get("observation") or raw.get("observation"),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user