pub struct SessionRapManager { /* private fields */ }Expand description
Daemon-wide manager of per-session toolsets and their RAP servers. Also
the agent system’s ThreadConfigSource: each thread resolves to its
session’s toolset.
Implementations§
Source§impl SessionRapManager
impl SessionRapManager
pub fn new( conversation_store: PersistentConversationStore, session_store: SessionStoreHandle, user_rap_config: Option<PathBuf>, subscriber_map: SubscriberMap, ) -> Self
Sourcepub async fn shutdown_session(&self, session_id: &ThreadId<str>)
pub async fn shutdown_session(&self, session_id: &ThreadId<str>)
Stop the session’s RAP servers (keeping the cached toolset, so a later tool invocation reboots them transparently). Safe to call at any time.
Sourcepub async fn evict_session(&self, session_id: &ThreadId<str>)
pub async fn evict_session(&self, session_id: &ThreadId<str>)
Stop the session’s servers and drop its cached toolset entirely, so the next use re-reads the RAP config and re-fetches manifests. Used when a session is explicitly shut down.
Sourcepub async fn shutdown_all(&self)
pub async fn shutdown_all(&self)
Stop every managed server (daemon exit).
Sourcepub fn times_shut_down(&self, session_id: &ThreadId<str>) -> usize
pub fn times_shut_down(&self, session_id: &ThreadId<str>) -> usize
How many times shutdown_session has been
invoked for session_id (diagnostics / tests).
Trait Implementations§
Source§impl Clone for SessionRapManager
impl Clone for SessionRapManager
Source§impl ThreadConfigSource<ChannelSender, SimpleHttpClient> for SessionRapManager
impl ThreadConfigSource<ChannelSender, SimpleHttpClient> for SessionRapManager
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 ThreadId<str>,
) -> Pin<Box<dyn Future<Output = Result<ThreadConfig<ChannelSender, SimpleHttpClient>, Box<dyn Error + Send + Sync>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for SessionRapManager
impl !Send for SessionRapManager
impl !Sync for SessionRapManager
impl !UnwindSafe for SessionRapManager
impl Freeze for SessionRapManager
impl Unpin for SessionRapManager
impl UnsafeUnpin for SessionRapManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more