Files
hermes-agent/tools
Teknium b428887b98 refactor(tools): compact checkpoint_manager — shared git/prune/locate helpers, no behavior change
- _git_out (stdout-or-empty) replaces 8 ok/out unpack sites; _rewrite_ref_to unifies
  _prune and _drop_oldest_commit; _rglob_stats backs _dir_size_bytes/_newest_mtime;
  _locate folds validate-hash/validate-path/store-ready pre-checks for
  safe_restore_plan/diff/restore; _sweep unifies the pre-v2 and v2 orphan/stale loops;
  _step_failed folds the debug-log-and-return-False ladder in _take.
- Removed: CheckpointManager._parse_shortstat (inlined, single caller),
  _ProjectRefs.store_ready (-> _store_has_head), _dir_has_any_entry (inlined scandir).
- Docstrings compacted by hand; all invariants/WHYs kept. Result dicts, log messages,
  git argv, file layout unchanged. 1564 -> 1165 lines.
2026-09-02 22:36:15 -07:00
..