* feat(mirrors): add selective snapshot sync to mirror repositories
Allow users to sync missing snapshots from the source repository to a
mirror. A new sync button per mirror opens a dialog showing which
snapshots are missing, with checkboxes to select which ones to copy.
- Add GET /:shortId/mirrors/:mirrorShortId/status endpoint to compare
snapshots between source and mirror repositories
- Add POST /:shortId/mirrors/:mirrorShortId/sync endpoint accepting
selected snapshotIds in the request body
- Extend restic copy command to accept multiple snapshotIds
- Add sync preview dialog with snapshot selection to the frontend
* refactor: stylistic changes
---------
Co-authored-by: Nicolas Meienberger <github@thisprops.com>
* feat(agent): add standalone agent runtime
* fix(agent): add Bun and DOM types to agent tsconfig
* refactor: wrap backup error in a tagged effect error
* feat(controller): add agent manager and session handling
* feat(backups): execute backups through the agent
* fix(agent): harden disconnect and send-failure handling
* fix: rebase conflicts
* test: simplify mocks
* refactor: split agent runtime state
* fix(backup): keep old path when agent is disabled
* fix: pr feedbacks
* feat(runtime): start and ship the local agent
* refactor: gate local agent behind feature flag
* chore: skip agent manager if flag is false
* fix: hot reload agents
* test: fix config tests
* feat(agent): add standalone agent runtime
* fix(backups): bridge local executor to Effect restic API
* fix(agent): add Bun and DOM types to agent tsconfig
* refactor: wrap backup error in a tagged effect error
* fix: pr feedbacks
* chore: migrate to vitest
* test: speed up some suites by sharing sessions and mocking expensive non-tested actions
* test: refactor some tests to verify behavior instead of implementation details
* chore: fix linting issues
Separate include patters and included path cleanly to avoid path with special characters to be expanded. Closes https://github.com/nicotsx/zerobyte/discussions/680
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **New Features**
* Added ability to select specific directories and paths for inclusion in backup schedules, separate from pattern-based rules.
* **Bug Fixes & Improvements**
* Automatically migrates existing backup configurations to work with the new path selection system.
* Enhanced backup restoration to properly handle both selected paths and pattern-based inclusions.
* **Chores**
* Updated database schema to support path selections in backup schedules.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Closes#478 The mode option of fs.writeFile does not reliably apply
permissions on all filesystems. On Synology NAS Docker volumes (btrfs),
the file ends up with 0755 permissions instead of 0600, causing SSH to
refuse the key.