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_lashlang_abilities(self, abilities: LashlangAbilities) -> Self
pub fn with_lashlang_language_features( self, language_features: LashlangLanguageFeatures, ) -> Self
pub fn with_lashlang_resources(self, resources: ResourceCatalog) -> Self
pub fn isolated_registry(&self) -> Self
pub fn lashlang_abilities(&self) -> LashlangAbilities
pub fn lashlang_language_features(&self) -> LashlangLanguageFeatures
pub fn lashlang_resources(&self) -> ResourceCatalog
pub fn factories(&self) -> &[Arc<dyn PluginFactory>]
pub fn build_session( &self, session_id: impl Into<String>, snapshot: Option<&PluginSessionSnapshot>, ) -> Result<Arc<PluginSession>, PluginError>
Sourcepub fn build_session_with_parent(
&self,
session_id: impl Into<String>,
parent_session_id: Option<String>,
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>, 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>, 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>, 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, sessions: Arc<dyn SessionStateService>, session_lifecycle: Arc<dyn SessionLifecycleService>, session_graph: Arc<dyn SessionGraphService>, processes: Arc<dyn ProcessService>, ) -> Result<ToolResult, 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 !RefUnwindSafe for PluginHost
impl !UnwindSafe for PluginHost
impl Freeze for PluginHost
impl Send for PluginHost
impl Sync for PluginHost
impl Unpin for PluginHost
impl UnsafeUnpin 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