tools/ holds model tools. These six files register none: they snapshot and restore a working directory for the agent loop, /rollback, /undo's changed-files line and `hermes checkpoints`. They move next to the agent loop that takes the checkpoints: tools/checkpoint_manager.py -> agent/checkpoints/manager.py tools/checkpoint_maintenance.py -> agent/checkpoints/maintenance.py tools/checkpoint_pruning.py -> agent/checkpoints/pruning.py tools/checkpoint_refs.py -> agent/checkpoints/refs.py tools/checkpoint_undo_hint.py -> agent/checkpoints/undo_hint.py tools/checkpoint_manager_profile_rename.py -> agent/checkpoints/manager_profile_rename.py agent/checkpoints/__init__.py is a docstring only. Nine test files move to tests/agent/checkpoints/. Every importer changes its import line in place, inside the same function. Nothing stays at the old paths: none of the six names is on the plugin API list, the shipped-release list or the old-updater list. Behaviour is unchanged. The four loggers keep their tools.checkpoint_* names, so the lines stay under `hermes logs --component tools`. The folder is not a root checkpoints/ package because the checkpoint store is HERMES_HOME/checkpoints, which is the same directory as such a package on an install whose checkout root is HERMES_HOME. agent.* is already packaged, so pyproject.toml and the lists of root packages do not change. The import and docs rewrites were made by scripts/move/rewrite_imports.py and rewrite_docs.py.
10 lines
680 B
Python
10 lines
680 B
Python
"""Snapshots of the working directory that ``/rollback``, ``/undo`` and ``hermes checkpoints`` use.
|
|
|
|
- ``manager``: ``CheckpointManager``; takes, lists, diffs and restores snapshots in the shared store.
|
|
- ``maintenance``: store retention, orphan pruning, status and cleanup.
|
|
- ``pruning``: the store lock and checked history rewrites shared by snapshot limits and store maintenance.
|
|
- ``refs``: reads a ``/rollback`` argument as a list number or a checkpoint hash.
|
|
- ``undo_hint``: ``/undo``'s line naming the files the undone turns changed, and the rollback rewind rule.
|
|
- ``manager_profile_rename``: rekeys a profile's checkpoint projects after the profile directory moves.
|
|
"""
|