hermes-agent/tools/environments
alt-glitch 1f1f297528 feat(environments): unified file sync with change tracking and deletion
Replace per-backend ad-hoc file sync with a shared FileSyncManager
that handles mtime-based change detection, remote deletion of
locally-removed files, and transactional state updates.

- New FileSyncManager class (tools/environments/file_sync.py)
  with callbacks for upload/delete, rate limiting, and rollback
- Shared iter_sync_files() eliminates 3 duplicate implementations
- SSH: replace unconditional rsync with scp + mtime skip
- Modal/Daytona: replace inline _synced_files dict with manager
- All 3 backends now sync credentials + skills + cache uniformly
- Remote deletion: files removed locally are cleaned from remote
- HERMES_FORCE_FILE_SYNC=1 env var for debugging
- Base class _before_execute() simplified to empty hook
- 12 unit tests covering mtime skip, deletion, rollback, rate limiting
2026-04-10 03:01:46 -07:00
..
__init__.py feat(environments): add Daytona cloud sandbox backend 2026-03-05 10:02:21 -08:00
base.py feat(environments): unified file sync with change tracking and deletion 2026-04-10 03:01:46 -07:00
daytona.py feat(environments): unified file sync with change tracking and deletion 2026-04-10 03:01:46 -07:00
docker.py feat(environments): unified spawn-per-call execution layer 2026-04-08 17:23:15 -07:00
file_sync.py feat(environments): unified file sync with change tracking and deletion 2026-04-10 03:01:46 -07:00
local.py fix(termux): honor temp dirs for local temp artifacts 2026-04-09 16:24:53 -07:00
managed_modal.py feat(environments): unified spawn-per-call execution layer 2026-04-08 17:23:15 -07:00
modal.py feat(environments): unified file sync with change tracking and deletion 2026-04-10 03:01:46 -07:00
modal_utils.py feat(environments): unified spawn-per-call execution layer 2026-04-08 17:23:15 -07:00
singularity.py feat(environments): unified spawn-per-call execution layer 2026-04-08 17:23:15 -07:00
ssh.py feat(environments): unified file sync with change tracking and deletion 2026-04-10 03:01:46 -07:00