feat: phase 2 — sauvegarde git (am sync) + transfert machine (am migrate) (closes #66 #68)

This commit is contained in:
2026-08-18 12:09:43 -04:00
parent 1b3fe09074
commit e82979e6a3
18 changed files with 966 additions and 10 deletions
+18
View File
@@ -130,6 +130,12 @@ pub struct Settings {
/// CPU/memory thresholds for 'am monitor' alerts (issue #50).
#[serde(default)]
pub monitor_thresholds: Option<MonitorThresholds>,
/// Git repository where 'am sync' pushes the state (issue #66).
#[serde(default)]
pub sync_repo: Option<String>,
/// Push automatically when the REPL exits (issue #66, opt-in).
#[serde(default)]
pub sync_on_exit: Option<bool>,
}
/// Token price model: USD per million tokens (issue #49).
@@ -732,6 +738,18 @@ pub fn merge(base: &mut Config, overlay: Config) {
if o.sessions_retention_days.is_some() {
s.sessions_retention_days = o.sessions_retention_days;
}
if o.cost_models.is_some() {
s.cost_models = o.cost_models;
}
if o.monitor_thresholds.is_some() {
s.monitor_thresholds = o.monitor_thresholds;
}
if o.sync_repo.is_some() {
s.sync_repo = o.sync_repo;
}
if o.sync_on_exit.is_some() {
s.sync_on_exit = o.sync_on_exit;
}
for (k, v) in o.hooks {
s.hooks.insert(k, v);
}