huskies: merge 626_refactor_introduce_services_bundle_and_migrate_appcontext_matrix_transport

This commit is contained in:
dave
2026-04-25 15:04:37 +00:00
parent aeff0b55be
commit 4b089c1ed8
21 changed files with 403 additions and 339 deletions
+15 -2
View File
@@ -382,6 +382,7 @@ pub fn spawn_gateway_bot(
port: u16,
) -> Option<tokio::task::AbortHandle> {
use crate::agents::AgentPool;
use crate::services::Services;
use tokio::sync::{broadcast, mpsc};
let (watcher_tx, _) = broadcast::channel(16);
@@ -394,11 +395,23 @@ pub fn spawn_gateway_bot(
let agents = std::sync::Arc::new(AgentPool::new(port, watcher_tx.clone()));
let services = std::sync::Arc::new(Services {
project_root: config_dir.to_path_buf(),
agents,
bot_name: "Assistant".to_string(),
bot_user_id: String::new(),
ambient_rooms: std::sync::Arc::new(std::sync::Mutex::new(std::collections::HashSet::new())),
perm_rx,
pending_perm_replies: std::sync::Arc::new(tokio::sync::Mutex::new(
std::collections::HashMap::new(),
)),
permission_timeout_secs: 120,
});
crate::chat::transport::matrix::spawn_bot(
config_dir,
watcher_tx,
perm_rx,
agents,
services,
shutdown_rx,
Some(active_project),
gateway_projects,