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 local modifications and unmanaged collisions.
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    /// Skip package `requires-mars` compatibility checks.
19    pub ignore_requires_mars: bool,
20    /// Skip package `requires-meridian` compatibility checks.
21    pub ignore_requires_meridian: bool,
22}
23
24#[cfg(test)]
25mod tests {
26    use super::SyncOptions;
27
28    #[test]
29    fn default_no_refresh_models_is_false() {
30        let options = SyncOptions::default();
31        assert!(!options.no_refresh_models);
32        assert!(!options.refresh_models);
33    }
34}