huskies: merge 641_story_unified_status_update_delivery_across_chat_web_ui_and_top_level_agent_context
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
use crate::agents::AgentPool;
|
||||
use crate::http::context::{PermissionDecision, PermissionForward};
|
||||
use crate::service::status::StatusBroadcaster;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
@@ -35,6 +36,14 @@ pub struct Services {
|
||||
/// Seconds to wait for a user to respond to a permission prompt before
|
||||
/// auto-denying (fail-closed).
|
||||
pub permission_timeout_secs: u64,
|
||||
/// Project-scoped status broadcaster.
|
||||
///
|
||||
/// Consumers (chat transports, Web UI, agent context) call
|
||||
/// [`StatusBroadcaster::subscribe`] to receive pipeline status events.
|
||||
/// The broadcaster is project-scoped: events published here are delivered
|
||||
/// only to subscribers of this instance, providing natural multi-project
|
||||
/// isolation.
|
||||
pub status: Arc<StatusBroadcaster>,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -52,6 +61,7 @@ impl Services {
|
||||
perm_rx: std::sync::Arc::new(TokioMutex::new(perm_rx)),
|
||||
pending_perm_replies: std::sync::Arc::new(TokioMutex::new(HashMap::new())),
|
||||
permission_timeout_secs: 120,
|
||||
status: std::sync::Arc::new(StatusBroadcaster::new()),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user