Expand description
Sync engine for pulling agent sessions from remote sources.
This module provides the core sync functionality using rsync over SSH for efficient delta transfers, with progress reporting and error recovery.
§Safety
IMPORTANT: The sync engine uses rsync WITHOUT the --delete flag
to ensure safe additive syncs. This prevents accidental data loss if
a remote is misconfigured or temporarily empty.
§Example
ⓘ
use coding_agent_search::sources::sync::SyncEngine;
use coding_agent_search::sources::config::SourcesConfig;
let config = SourcesConfig::load()?;
let engine = SyncEngine::new(&data_dir);
for source in config.remote_sources() {
let report = engine.sync_source(source)?;
println!("Synced {}: {} files", source.name, report.total_files());
}Structs§
- Path
Sync Result - Result of syncing a single path.
- Source
Sync Decision - Evidence-backed scheduling decision for one source.
- Source
Sync Info - Sync information for a single source.
- Sync
Engine - Sync engine for pulling sessions from remote sources.
- Sync
Report - Report from syncing an entire source.
- Sync
Status - Persistent sync status for all sources.
Enums§
- Source
Health Kind - Health class used by the adaptive source scheduler.
- Source
Sync Action - Scheduler action for a remote source.
- Sync
Error - Errors that can occur during sync operations.
- Sync
Method - Method used for syncing files from remote.
- Sync
Result - Result of a sync operation for a source.
Functions§
- path_
to_ safe_ dirname - Convert a remote path to a safe directory name.