refactor(restructure): rewrite all imports for hermes_agent package

Rewrite all import statements, patch() targets, sys.modules keys,
importlib.import_module() strings, and subprocess -m references to use
hermes_agent.* paths.

Strip sys.path.insert hacks from production code (rely on editable install).
Update COMPONENT_PREFIXES for logger filtering.
Fix 3 hardcoded getLogger() calls to use __name__.
Update transport and tool registry discovery paths.
Update plugin module path strings.
Add legacy process-name patterns for gateway PID detection.
Add main() to skills_sync for console_script entry point.
Fix _get_bundled_dir() path traversal after move.

Part of #14182, #14183
This commit is contained in:
alt-glitch 2026-04-23 08:35:34 +05:30
parent 65ca3ba93b
commit 4b16341975
898 changed files with 12494 additions and 12019 deletions

View file

@ -42,7 +42,7 @@ def _cap_retaindb_sleeps(monkeypatch):
own ``time.sleep`` stays real since it uses a different reference.
"""
try:
from plugins.memory import retaindb as _retaindb
from hermes_agent.plugins.memory import retaindb as _retaindb
except ImportError:
return
@ -60,9 +60,7 @@ def _cap_retaindb_sleeps(monkeypatch):
import sys
_repo_root = str(Path(__file__).resolve().parents[2])
if _repo_root not in sys.path:
sys.path.insert(0, _repo_root)
from plugins.memory.retaindb import (
from hermes_agent.plugins.memory.retaindb import (
_Client,
_WriteQueue,
_build_overlay,
@ -735,7 +733,7 @@ class TestOnMemoryWrite:
class TestRegister:
def test_register_calls_register_memory_provider(self):
from plugins.memory.retaindb import register
from hermes_agent.plugins.memory.retaindb import register
ctx = MagicMock()
register(ctx)
ctx.register_memory_provider.assert_called_once()