storkit: merge 421_story_timer_command_for_deferred_agent_start

This commit is contained in:
dave
2026-03-28 08:59:36 +00:00
parent 1ec9aaab8a
commit cf5424f9a6
7 changed files with 836 additions and 0 deletions
@@ -1,4 +1,5 @@
use crate::agents::AgentPool;
use crate::chat::timer::TimerStore;
use crate::chat::ChatTransport;
use crate::http::context::{PermissionDecision, PermissionForward};
use matrix_sdk::ruma::{OwnedEventId, OwnedRoomId, OwnedUserId};
@@ -55,6 +56,8 @@ pub struct BotContext {
/// All message I/O goes through this abstraction so the bot logic works
/// with any platform, not just Matrix.
pub transport: Arc<dyn ChatTransport>,
/// Persistent store for pending deferred-start timers.
pub timer_store: Arc<TimerStore>,
}
// ---------------------------------------------------------------------------
@@ -103,6 +106,9 @@ mod tests {
"test-token".to_string(),
"pipeline_notification".to_string(),
)),
timer_store: Arc::new(crate::chat::timer::TimerStore::load(
std::path::PathBuf::from("/tmp/timers.json"),
)),
};
// Clone must work (required by Matrix SDK event handler injection).
let _cloned = ctx.clone();