OpenViking now ships from Volcengine's own repo through the plugin catalog (plugin-catalog/openviking.yaml, pinned in #131267). Delete the in-tree copy and its tests; memory_provider_migration already lists openviking in _LEFT_CORE, so homes configured for it get the catalog plugin installed on hermes update / first agent start. The catalog pin starts openviking-server with the full Hermes environment (the bundled copy filtered it). The docs now say so and point at volcengine/OpenViking#5553; start openviking-server yourself to avoid it.
39 lines
1.4 KiB
Python
39 lines
1.4 KiB
Python
"""Plugin data paths follow the active profile's HERMES_HOME, including the ContextVar override.
|
|
|
|
Several plugins carried a ``~/.hermes`` fallback (guarding an ImportError of ``hermes_constants``
|
|
that cannot happen for a bundled plugin) or resolved the home at import time. Both are wrong on
|
|
Windows and under multiplex profile overrides. Every resolver below must land inside the override.
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
import pytest
|
|
|
|
from hermes_constants import reset_hermes_home_override, set_hermes_home_override
|
|
|
|
|
|
def _a2a_conversation(home):
|
|
from plugins.platforms.a2a import protocol
|
|
return protocol._conv_path("peer-x")
|
|
|
|
|
|
def _photon_auth(home):
|
|
from plugins.platforms.photon import auth
|
|
return auth._auth_json_path()
|
|
|
|
|
|
_RESOLVERS = {"a2a": _a2a_conversation, "photon": _photon_auth}
|
|
|
|
|
|
@pytest.mark.parametrize("name", sorted(_RESOLVERS))
|
|
def test_plugin_path_follows_profile_override(name, tmp_path, monkeypatch):
|
|
monkeypatch.setenv("HERMES_HOME", str(tmp_path / "default"))
|
|
monkeypatch.setenv("HOME", str(tmp_path / "user-home"))
|
|
profile = tmp_path / "profiles" / "b"
|
|
profile.mkdir(parents=True)
|
|
token = set_hermes_home_override(profile)
|
|
try:
|
|
resolved = str(_RESOLVERS[name](profile))
|
|
finally:
|
|
reset_hermes_home_override(token)
|
|
assert resolved.startswith(str(profile)), f"{name} resolved {resolved!r} outside the active profile"
|