story-kit: merge 284_story_matrix_bot_status_command_shows_pipeline_and_agent_availability

This commit is contained in:
Dave
2026-03-18 15:18:14 +00:00
parent 8d9cf4b283
commit e8ec84668f
3 changed files with 300 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ pub mod notifications;
pub use config::BotConfig;
use crate::agents::AgentPool;
use crate::http::context::PermissionForward;
use crate::io::watcher::WatcherEvent;
use std::path::Path;
@@ -47,6 +48,7 @@ pub fn spawn_bot(
project_root: &Path,
watcher_tx: broadcast::Sender<WatcherEvent>,
perm_rx: Arc<TokioMutex<mpsc::UnboundedReceiver<PermissionForward>>>,
agents: Arc<AgentPool>,
) {
let config = match BotConfig::load(project_root) {
Some(c) => c,
@@ -65,7 +67,7 @@ pub fn spawn_bot(
let root = project_root.to_path_buf();
let watcher_rx = watcher_tx.subscribe();
tokio::spawn(async move {
if let Err(e) = bot::run_bot(config, root, watcher_rx, perm_rx).await {
if let Err(e) = bot::run_bot(config, root, watcher_rx, perm_rx, agents).await {
crate::slog!("[matrix-bot] Fatal error: {e}");
}
});