pub struct PluginHost { /* private fields */ }Implementations§
Source§impl PluginHost
impl PluginHost
pub fn empty() -> Self
pub fn new(factories: Vec<Arc<dyn PluginFactory>>) -> Self
pub fn with_background_tasks(self) -> Self
pub fn with_background_tasks_available(self, available: bool) -> Self
pub fn isolated_registry(&self) -> Self
pub fn factories(&self) -> &[Arc<dyn PluginFactory>]
pub fn supports_standard_context_approach( &self, standard_context_approach: &StandardContextApproach, ) -> bool
pub fn build_standard_session( &self, session_id: impl Into<String>, snapshot: Option<&PluginSessionSnapshot>, ) -> Result<Arc<PluginSession>, PluginError>
pub fn build_session( &self, session_id: impl Into<String>, execution_mode: ExecutionMode, standard_context_approach: Option<StandardContextApproach>, snapshot: Option<&PluginSessionSnapshot>, ) -> Result<Arc<PluginSession>, PluginError>
Sourcepub fn build_session_with_parent(
&self,
session_id: impl Into<String>,
parent_session_id: Option<String>,
execution_mode: ExecutionMode,
standard_context_approach: Option<StandardContextApproach>,
snapshot: Option<&PluginSessionSnapshot>,
authority: SessionAuthorityContext,
) -> Result<Arc<PluginSession>, PluginError>
pub fn build_session_with_parent( &self, session_id: impl Into<String>, parent_session_id: Option<String>, execution_mode: ExecutionMode, standard_context_approach: Option<StandardContextApproach>, snapshot: Option<&PluginSessionSnapshot>, authority: SessionAuthorityContext, ) -> Result<Arc<PluginSession>, PluginError>
Variant of [build_session] that records the caller as the
parent of the new session. Plugin factories read
PluginSessionContext::is_root_session to gate root-only
behavior; anything that goes through the plain build_session
is treated as a root session by default.
pub fn build_session_with_parent_and_surface( &self, session_id: impl Into<String>, parent_session_id: Option<String>, execution_mode: ExecutionMode, standard_context_approach: Option<StandardContextApproach>, snapshot: Option<&PluginSessionSnapshot>, tool_surface_overlay: ToolSurfaceContribution, tool_snapshot: Option<ToolState>, authority: SessionAuthorityContext, ) -> Result<Arc<PluginSession>, PluginError>
pub fn build_session_with_surface( &self, session_id: impl Into<String>, execution_mode: ExecutionMode, standard_context_approach: Option<StandardContextApproach>, snapshot: Option<&PluginSessionSnapshot>, tool_surface_overlay: ToolSurfaceContribution, tool_snapshot: Option<ToolState>, ) -> Result<Arc<PluginSession>, PluginError>
pub async fn invoke_plugin_action_sessionless( &self, name: &str, args: Value, ) -> Result<ToolResult, PluginError>
pub fn unregister_session(&self, session_id: &str) -> Result<(), PluginError>
pub fn session( &self, session_id: &str, ) -> Result<Arc<PluginSession>, PluginActionInvokeError>
pub async fn invoke_plugin_action_for_session( &self, session_id: &str, name: &str, args: Value, host: Arc<dyn RuntimeSessionHost>, ) -> Result<ToolResult, PluginActionInvokeError>
pub fn monitor_specs_for_session( &self, session_id: &str, ) -> Result<Vec<PluginOwned<MonitorSpec>>, PluginActionInvokeError>
Trait Implementations§
Source§impl Clone for PluginHost
impl Clone for PluginHost
Source§fn clone(&self) -> PluginHost
fn clone(&self) -> PluginHost
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PluginHost
impl !RefUnwindSafe for PluginHost
impl Send for PluginHost
impl Sync for PluginHost
impl Unpin for PluginHost
impl UnsafeUnpin for PluginHost
impl !UnwindSafe for PluginHost
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