huskies: merge 558_story_matrix_bot_can_run_on_the_gateway_to_manage_multiple_projects_from_one_chat

This commit is contained in:
dave
2026-04-14 09:57:11 +00:00
parent 28777b0c77
commit d824dc4b73
6 changed files with 239 additions and 4 deletions
+5 -1
View File
@@ -37,7 +37,7 @@ use crate::io::watcher::WatcherEvent;
use crate::rebuild::ShutdownReason;
use std::path::Path;
use std::sync::Arc;
use tokio::sync::{Mutex as TokioMutex, broadcast, mpsc, watch};
use tokio::sync::{Mutex as TokioMutex, RwLock, broadcast, mpsc, watch};
/// Attempt to start the Matrix bot.
///
@@ -64,6 +64,8 @@ pub fn spawn_bot(
perm_rx: Arc<TokioMutex<mpsc::UnboundedReceiver<PermissionForward>>>,
agents: Arc<AgentPool>,
shutdown_rx: watch::Receiver<Option<ShutdownReason>>,
gateway_active_project: Option<Arc<RwLock<String>>>,
gateway_projects: Vec<String>,
) {
let config = match BotConfig::load(project_root) {
Some(c) => c,
@@ -100,6 +102,8 @@ pub fn spawn_bot(
perm_rx,
agents,
shutdown_rx,
gateway_active_project,
gateway_projects,
)
.await
{