bamboo_server/app_state/session_events.rs
1//! Session event sender management.
2//!
3//! Re-exports the shared `get_or_create_event_sender` function from the runtime crate.
4//! The `impl AppState` method delegates to the re-exported function.
5
6pub use bamboo_engine::execution::session_events::get_or_create_event_sender;
7
8impl super::AppState {
9 /// Get (or create) a long-lived session event sender for a session id.
10 ///
11 /// This stream is intended for UI consumption and background activity; it should remain
12 /// available even when no agent execution is running.
13 pub async fn get_session_event_sender(
14 &self,
15 session_id: &str,
16 ) -> tokio::sync::broadcast::Sender<bamboo_agent_core::AgentEvent> {
17 get_or_create_event_sender(&self.session_event_senders, session_id).await
18 }
19}