huskies: merge 1038

This commit is contained in:
dave
2026-05-14 17:06:50 +00:00
parent 4553df5b21
commit 1f9f34ab58
13 changed files with 940 additions and 2 deletions
+10
View File
@@ -2,6 +2,7 @@
use crate::agents::ReconciliationEvent;
use crate::io::watcher::WatcherEvent;
use crate::rebuild::{BotShutdownNotifier, ShutdownReason};
use crate::service::event_triggers::store::EventTriggerStore;
use crate::service::timer::{ScheduledTimerStore, TimerStore};
use crate::services::Services;
use crate::state::SessionState;
@@ -77,6 +78,11 @@ pub struct AppContext {
/// Generic scheduled-timer store for `schedule_timer` / `list_timers` /
/// `cancel_timer` MCP tools. Persists to `.huskies/scheduled_timers.json`.
pub scheduled_timer_store: Arc<ScheduledTimerStore>,
/// Persistent store for event-based pipeline triggers.
///
/// Shared with the background subscriber so that triggers registered via
/// MCP are immediately visible to the subscriber without a disk round-trip.
pub event_trigger_store: Arc<EventTriggerStore>,
}
#[cfg(test)]
@@ -93,6 +99,9 @@ impl AppContext {
let timer_store = Arc::new(TimerStore::load(
project_root.join(".huskies").join("timers.json"),
));
let event_trigger_store = Arc::new(EventTriggerStore::load(
project_root.join(".huskies").join("event_triggers.json"),
));
let scheduled_timer_store = Arc::new(ScheduledTimerStore::load(
project_root.join(".huskies").join("scheduled_timers.json"),
));
@@ -123,6 +132,7 @@ impl AppContext {
matrix_shutdown_tx: None,
timer_store,
scheduled_timer_store,
event_trigger_store,
}
}
}