pub struct ChatbotManager<T: PlatformAdapter> { /* private fields */ }Expand description
Core orchestrator for multi-session Bot operations.
Implementations§
Source§impl<T: PlatformAdapter> ChatbotManager<T>
impl<T: PlatformAdapter> ChatbotManager<T>
Sourcepub fn new(
platform: Arc<T>,
config: RobitConfig,
working_dir: PathBuf,
llm_client: Arc<LlmClient>,
tool_registry: Arc<ToolRegistry>,
skill_registry: Arc<SkillRegistry>,
) -> Result<Self, ManagerError>
pub fn new( platform: Arc<T>, config: RobitConfig, working_dir: PathBuf, llm_client: Arc<LlmClient>, tool_registry: Arc<ToolRegistry>, skill_registry: Arc<SkillRegistry>, ) -> Result<Self, ManagerError>
Create a new ChatbotManager.
Opens (or creates) the session database and initializes the shared
Confirmer and platform sender bridge. platform must already be
connected (the platform crate owns connection lifecycle).
Sourcepub async fn run(&self, shutdown: Arc<Notify>) -> Result<(), AgentError>
pub async fn run(&self, shutdown: Arc<Notify>) -> Result<(), AgentError>
Main event loop. Connects to the platform, then processes events forever.
Returns when the platform disconnects, an error occurs, or shutdown
is notified (Ctrl+C in the main binary).
Sourcepub async fn active_session_count(&self) -> usize
pub async fn active_session_count(&self) -> usize
Number of currently active Agent sessions (for diagnostics / tests).
Auto Trait Implementations§
impl<T> !Freeze for ChatbotManager<T>
impl<T> !RefUnwindSafe for ChatbotManager<T>
impl<T> !UnwindSafe for ChatbotManager<T>
impl<T> Send for ChatbotManager<T>
impl<T> Sync for ChatbotManager<T>
impl<T> Unpin for ChatbotManager<T>
impl<T> UnsafeUnpin for ChatbotManager<T>
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