huskies: merge 1039

This commit is contained in:
dave
2026-05-14 16:26:49 +00:00
parent 9e06fff8a8
commit 311883f45d
12 changed files with 1005 additions and 5 deletions
+14 -1
View File
@@ -283,6 +283,16 @@ async fn main() -> Result<(), std::io::Error> {
let timer_store_for_tick = Arc::clone(&timer_store);
let timer_store_for_bot = Arc::clone(&timer_store);
// Generic scheduled-timer store for the `schedule_timer` MCP tool.
let scheduled_timer_store =
std::sync::Arc::new(crate::service::timer::ScheduledTimerStore::load(
startup_root
.as_ref()
.map(|r| r.join(".huskies").join("scheduled_timers.json"))
.unwrap_or_else(|| std::path::PathBuf::from("/tmp/huskies-scheduled-timers.json")),
));
let scheduled_timer_store_for_tick = Arc::clone(&scheduled_timer_store);
let ctx = AppContext {
state: app_state,
store,
@@ -295,6 +305,7 @@ async fn main() -> Result<(), std::io::Error> {
bot_shutdown: bot_ctxs.shutdown_notifier.clone(),
matrix_shutdown_tx: Some(Arc::clone(&bot_ctxs.matrix_shutdown_tx)),
timer_store,
scheduled_timer_store,
};
// Per-project event buffer for the gateway's `/api/events` poller.
@@ -305,7 +316,7 @@ async fn main() -> Result<(), std::io::Error> {
startup::tick_loop::spawn_gateway_relay(&startup_root, Arc::clone(&services.status));
let app = build_routes(
ctx,
ctx.clone(),
bot_ctxs.whatsapp_ctx.clone(),
bot_ctxs.slack_ctx.clone(),
port,
@@ -316,7 +327,9 @@ async fn main() -> Result<(), std::io::Error> {
startup::tick_loop::spawn_tick_loop(
Arc::clone(&startup_agents),
timer_store_for_tick,
scheduled_timer_store_for_tick,
startup_root.clone(),
ctx,
);
// Optional Matrix bot.