refactor(honcho): write all host-scoped settings into hosts block

Setup wizard now writes memoryMode, writeFrequency, recallMode, and
sessionStrategy into hosts.hermes instead of the config root. Client
resolution updated to read sessionStrategy and sessionPeerPrefix from
host block first. Docs updated to show hosts-based config as the default
example so other integrations can coexist cleanly.
This commit is contained in:
Erosika 2026-03-10 17:00:52 -04:00
parent 5489c66cdf
commit c90ba029ce
3 changed files with 42 additions and 28 deletions

View file

@ -201,8 +201,16 @@ class HonchoClientConfig:
or raw.get("recallMode")
or "hybrid"
),
session_strategy=raw.get("sessionStrategy", "per-session"),
session_peer_prefix=raw.get("sessionPeerPrefix", False),
session_strategy=(
host_block.get("sessionStrategy")
or raw.get("sessionStrategy")
or "per-session"
),
session_peer_prefix=(
host_block.get("sessionPeerPrefix")
if "sessionPeerPrefix" in host_block
else raw.get("sessionPeerPrefix", False)
),
sessions=raw.get("sessions", {}),
raw=raw,
)