fix(compat): the holographic 0.29.x catalog pin opens its store again

#151855 folded hermes_state_wal into sqlite_support and removed the module. The
catalog-pinned holographic memory plugin (0.29.2, plugin-catalog/holographic.yaml)
does `from hermes_state_wal import apply_wal_with_fallback` when it opens
memory_store.db, so on v0.23 every turn logs "holographic: cannot open
memory_store.db (No module named 'hermes_state_wal')" and recall is dead. A
catalog repin does not change an installed plugin's source, and
`hermes plugins update` reinstalls the same pin.

- hermes_agent/compat/moves.py: hermes_state_wal -> sqlite_support. Every name
  the old module published is in sqlite_support, unchanged, and
  apply_wal_with_fallback is already a published plugin API there.
- plugin_validate_private_imports: a moved module is judged public under its
  current spelling as well, so the alias does not make `plugins validate` list
  the old import as private while the same call through sqlite_support passes.
- Plugin guide: the kept-imports table names it, with the same v0.27.0 window.

Fixes #157818. Part of #157077.
This commit is contained in:
Teknium
2026-11-19 07:18:40 -08:00
parent dfa38d1f8d
commit c95fb6947f
4 changed files with 13 additions and 6 deletions

View File

@@ -12,4 +12,6 @@ MOVES: dict[str, str] = {
"tools.plugin_guard": "hermes_cli.plugins_install_scan",
# Folded into session_rules.turns by the storage interface (#149567); the OpenViking and hermes-council pins import it.
"agent.message_content": "session_rules.turns",
# Folded into sqlite_support by the storage interface (#151855); the holographic 0.29.x pin imports it.
"hermes_state_wal": "sqlite_support",
}

View File

@@ -100,9 +100,11 @@ def _private_target(module: str, name: str, core: frozenset, local: set[str]) ->
target = f"{module}.{name}" if name else module
own = _is_own_module_path(module, local) or bool(name) and _is_own_module_path(target, local)
hermes = module.split(".")[0] in core and module not in local and not own
public_api, old = _public_api(), original_module(module)
public = original_module(target) in public_api or f"{old}:{name}" in public_api \
or (old in public_api and not name.startswith("_")) # ``from gateway.platforms import base`` too
# A name is public under its old or its current spelling: a MOVES key may fold a module into a published one.
public_api = _public_api()
public = bool({original_module(target), current_module(target)} & public_api) or any(
f"{mod}:{name}" in public_api or (mod in public_api and not name.startswith("_")) # ``from gateway.platforms import base``
for mod in {original_module(module), current_module(module)})
return target if hermes and not public else ""

View File

@@ -10,12 +10,14 @@ from hermes_agent.compat.finder import Finder
from hermes_agent.compat.moves import MOVES
# (module, names) a catalog plugin imports at module top level, so without them it never registers:
# OpenViking 2.1.2 (plugin-catalog/openviking.yaml), hermes-council and Honcho 1.2.0 (plugin-catalog/honcho.yaml).
# OpenViking 2.1.2 (plugin-catalog/openviking.yaml), hermes-council, Honcho 1.2.0 (plugin-catalog/honcho.yaml)
# and holographic 0.29.x (plugin-catalog/holographic.yaml).
# Every MOVES key is checked as well.
_PLUGIN_IMPORTS = {
"agent.message_content": ("flatten_message_text", "_text_from_part"),
"agent.skill_commands": ("extract_user_instruction_from_skill_message",),
"hermes_state_common": ("TITLE_SOURCE_DERIVED", "TITLE_SOURCE_LLM"),
"hermes_state_wal": ("apply_wal_with_fallback",),
}

View File

@@ -379,15 +379,16 @@ with open_persistence_reader(profile_scope().profile_dir) as store:
#### Turn helpers kept for pinned catalog plugins
The same refactor moved a few turn helpers into `session_rules.turns`. The catalog's pinned OpenViking (2.1.2) and Honcho (1.2.0) memory plugins import them from their old place at load time, and a catalog repin does not change an installed plugin's source, so these exact names stay importable as an exception to the rule above:
The same refactor moved a few turn helpers into `session_rules.turns` and folded `hermes_state_wal` into `sqlite_support`. The catalog's pinned OpenViking (2.1.2), Honcho (1.2.0) and holographic (0.29.x) memory plugins import them from their old place at load time, and a catalog repin does not change an installed plugin's source, so these exact names stay importable as an exception to the rule above:
| Old import | Defined now in |
|---|---|
| `agent.message_content.flatten_message_text`, `_text_from_part` | `session_rules.turns` |
| `agent.skill_commands.extract_user_instruction_from_skill_message` | `session_rules.turns` |
| `hermes_state_common.TITLE_SOURCE_DERIVED`, `TITLE_SOURCE_LLM` | the values stored in `sessions.title_source` |
| `hermes_state_wal` (the whole module, e.g. `apply_wal_with_fallback`) | `sqlite_support` |
They follow the `hermes_state` window: supported through v0.26 and removed no earlier than v0.27.0. No other moved name is carried. A plugin should import from `session_rules.turns` now.
They follow the `hermes_state` window: supported through v0.26 and removed no earlier than v0.27.0. No other moved name is carried. A plugin should import from `session_rules.turns` and `sqlite_support` now.
## What you're building