pub struct SkillExecutor { /* private fields */ }Expand description
High-level executor for running skills
Implementations§
Source§impl SkillExecutor
impl SkillExecutor
Sourcepub async fn load(
engine: Arc<SkillEngine>,
skill_path: impl AsRef<Path>,
skill_name: String,
instance_name: String,
config: InstanceConfig,
) -> Result<Self>
pub async fn load( engine: Arc<SkillEngine>, skill_path: impl AsRef<Path>, skill_name: String, instance_name: String, config: InstanceConfig, ) -> Result<Self>
Load a skill and prepare for execution
Sourcepub fn from_component(
engine: Arc<SkillEngine>,
component: Component,
skill_name: String,
instance_name: String,
config: InstanceConfig,
) -> Result<Self>
pub fn from_component( engine: Arc<SkillEngine>, component: Component, skill_name: String, instance_name: String, config: InstanceConfig, ) -> Result<Self>
Create an executor from an already-loaded component
Sourcepub async fn get_metadata(&self) -> Result<SkillMetadata>
pub async fn get_metadata(&self) -> Result<SkillMetadata>
Get skill metadata
Sourcepub async fn get_tools(&self) -> Result<Vec<ToolDefinition>>
pub async fn get_tools(&self) -> Result<Vec<ToolDefinition>>
Get list of tools provided by this skill
Sourcepub async fn execute_tool(
&self,
tool_name: &str,
args: Vec<(String, String)>,
) -> Result<ExecutionResult>
pub async fn execute_tool( &self, tool_name: &str, args: Vec<(String, String)>, ) -> Result<ExecutionResult>
Execute a tool
Sourcepub async fn validate_config(&self) -> Result<()>
pub async fn validate_config(&self) -> Result<()>
Validate configuration
Sourcepub fn skill_name(&self) -> &str
pub fn skill_name(&self) -> &str
Get skill name
Sourcepub fn instance_name(&self) -> &str
pub fn instance_name(&self) -> &str
Get instance name
Sourcepub fn config(&self) -> &InstanceConfig
pub fn config(&self) -> &InstanceConfig
Get configuration
Auto Trait Implementations§
impl Freeze for SkillExecutor
impl !RefUnwindSafe for SkillExecutor
impl Send for SkillExecutor
impl Sync for SkillExecutor
impl Unpin for SkillExecutor
impl !UnwindSafe for SkillExecutor
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
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more