Skip to main content

mars_agents/sync/
types.rs

1//! Shared types for the sync pipeline.
2
3/// Options controlling sync behavior.
4#[derive(Debug, Clone, Default)]
5pub struct SyncOptions {
6    /// Force overwrite on conflicts (skip merge).
7    pub force: bool,
8    /// Compute plan but don't execute (dry run).
9    pub dry_run: bool,
10    /// Error if lock file would change (CI mode).
11    pub frozen: bool,
12    /// Force synchronous models cache + probe refresh.
13    pub refresh_models: bool,
14    /// Skip automatic models cache refresh.
15    pub no_refresh_models: bool,
16    /// Fetch version metadata so sync can report available upgrades.
17    pub check_upgrades: bool,
18}
19
20#[cfg(test)]
21mod tests {
22    use super::SyncOptions;
23
24    #[test]
25    fn default_no_refresh_models_is_false() {
26        let options = SyncOptions::default();
27        assert!(!options.no_refresh_models);
28        assert!(!options.refresh_models);
29    }
30}