The named groups of tools and the functions that resolve them move from the repository root into tools/, beside the registry they read. The file moves whole and unchanged; its importers, test patch targets and the docs follow. Old name. The root toolsets.py is a generated file: releases v0.22.7 to v0.23.0 import `toolsets` in a fresh process after an update (hermes_cli/update_cmd_validation.py), and pinned catalog plugins import it. hermes_agent/compat/moves.py gets the key, the plugin guide lists it, and pyproject's update-startup-files names tools/toolsets.py beside toolsets.py.
35 lines
1.6 KiB
Python
Generated
35 lines
1.6 KiB
Python
Generated
try: # Generated by scripts/move/generate_shims.py; do not edit.
|
|
"""``toolsets`` moved to ``tools.toolsets``."""
|
|
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[0]))
|
|
from hermes_agent.compat import install
|
|
|
|
install()
|
|
return None if __name__ == "__main__" else importlib.import_module("tools.toolsets")
|
|
|
|
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("tools.toolsets", 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
|