pub struct DefaultSkillRuntime { /* private fields */ }Expand description
Default skill runtime — LLM prompt injection + tool-calling loop.
Implementations§
Source§impl DefaultSkillRuntime
impl DefaultSkillRuntime
pub fn new(registry: Option<Arc<dyn SkillRegistry>>) -> Self
pub fn with_permissions( self, allowed_network: bool, allowed_paths: Vec<PathBuf>, ) -> Self
Trait Implementations§
Source§impl Debug for DefaultSkillRuntime
impl Debug for DefaultSkillRuntime
Source§impl SkillRuntime for DefaultSkillRuntime
impl SkillRuntime for DefaultSkillRuntime
Source§fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
skill_id: &'life1 str,
input: &'life2 str,
context: &'life3 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<SkillOutput, SkillError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
skill_id: &'life1 str,
input: &'life2 str,
context: &'life3 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<SkillOutput, SkillError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Execute a skill: injects the skill prompt into the LLM context,
runs the tool-calling loop, and returns the final output.
Source§fn execute_tool<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_name: &'life1 str,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, SkillError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_tool<'life0, 'life1, 'async_trait>(
&'life0 self,
tool_name: &'life1 str,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, SkillError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a single named tool directly (bypasses LLM prompt injection).
Source§fn validate_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
skill: &'life1 Skill,
_context: &'life2 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<(), SkillError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn validate_permissions<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
skill: &'life1 Skill,
_context: &'life2 ExecutionContext,
) -> Pin<Box<dyn Future<Output = Result<(), SkillError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Validate that the execution context satisfies all permissions required by the skill.
Source§fn preflight_check<'life0, 'life1, 'async_trait>(
&'life0 self,
skill: &'life1 Skill,
) -> Pin<Box<dyn Future<Output = Result<Vec<PreflightWarning>, SkillError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn preflight_check<'life0, 'life1, 'async_trait>(
&'life0 self,
skill: &'life1 Skill,
) -> Pin<Box<dyn Future<Output = Result<Vec<PreflightWarning>, SkillError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run preflight checks on a skill before it is enabled or executed.
Returns a list of warnings (non-blocking) or errors (blocking).
Auto Trait Implementations§
impl Freeze for DefaultSkillRuntime
impl !RefUnwindSafe for DefaultSkillRuntime
impl Send for DefaultSkillRuntime
impl Sync for DefaultSkillRuntime
impl Unpin for DefaultSkillRuntime
impl UnsafeUnpin for DefaultSkillRuntime
impl !UnwindSafe for DefaultSkillRuntime
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> 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