Files
hermes-agent/tools/bot_mode_dm_coordination.py
alt-glitch 2115d74421 refactor(bots): Bot Mode and Bot Desktop move from tools/ to bots/
tools/ holds model tools. These 19 files register none: they resolve the
Bot Mode roster, deliver message_agent's DMs and run their by-path runner,
hold the cross-connection relay and its receipts, and run the Bot Desktop
screen. They move to a new root package, bots/ (flat plus bots/desktop/,
with the launcher and wallpaper beside the runtime that reads them).
tools/message_agent_tool.py stays; only its imports change.

Function bodies are unchanged and every import stays where it was. Tests
whose subject is a moved file go to tests/bots/, whose conftest imports
the tests/tools/ autouse fixtures they ran under. Loggers follow their
modules; bots joins the tools log component, so `hermes logs --component
tools` shows the same lines, and every hand-written root-package list.

Old names keep working. Each moved top-level module has a MOVES key.
Processes started on v0.21.6 to v0.23.5 that outlive an update import
these modules inside functions and start tools/bot_mode_dm.py by path as
the DM runner, so those names get generated old-path files. Pinned catalog
plugins import tools.bot_desktop and tools.bot_live_delivery; the plugin
guide lists both.
2026-12-01 17:49:22 +05:30

35 lines
1.6 KiB
Python
Generated

try: # Generated by scripts/move/generate_shims.py; do not edit.
"""``tools.bot_mode_dm_coordination`` moved to ``bots.dm_coordination``."""
import importlib
import importlib.util
import runpy
import sys
from pathlib import Path
def _forward():
if __name__ == "__main__" or sys.argv[:1] == ["-m"] or importlib.util.find_spec("hermes_agent") is None:
if __name__ == "__main__" and Path(sys.path[0]).resolve() == Path(__file__).resolve().parent:
del sys.path[0] # run as a path: a folder here named like an installed package would be imported in its place
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
from hermes_agent.compat import install
install()
return None if __name__ == "__main__" else importlib.import_module("bots.dm_coordination")
try:
_module = _forward()
except Exception:
if sys.argv[:1] != ["-m"] and __name__ != "__main__": # an entry launch; a plain import stays light
raise
import hermes_bootstrap # repairs a killed update and relaunches when it restored something
_module = _forward()
if __name__ == "__main__":
runpy.run_module("bots.dm_coordination", run_name="__main__", alter_sys=True)
else:
if getattr(sys.modules.get(__name__), "__dict__", None) is globals():
sys.modules[__name__] = _module
_identity = ('__name__', '__file__', '__spec__', '__loader__', '__package__', '__path__', '__cached__', '__builtins__')
globals().update({k: v for k, v in vars(_module).items() if k not in _identity})
finally:
pass