pub struct SkillToolScope { /* private fields */ }Expand description
Tracks the active skill’s tool scope during an inference loop.
Created once per inference_loop invocation. Updated after each
tool dispatch round.
Implementations§
Source§impl SkillToolScope
impl SkillToolScope
Sourcepub fn update_from_tool_calls(
&mut self,
tool_calls: &[(String, Value)],
registry: &SkillRegistry,
)
pub fn update_from_tool_calls( &mut self, tool_calls: &[(String, Value)], registry: &SkillRegistry, )
Check tool calls for ActivateSkill and update the scope accordingly.
Call this after each tool dispatch round with the names and args of all tool calls from that round.
Sourcepub fn filter_tool_defs(
&self,
tool_defs: &[ToolDefinition],
) -> Vec<ToolDefinition>
pub fn filter_tool_defs( &self, tool_defs: &[ToolDefinition], ) -> Vec<ToolDefinition>
Filter tool definitions to only include in-scope tools.
Returns the full set (cloned) if no scope is active. Otherwise returns
only tools whose names match allowed_tools or are meta-tools.
Sourcepub fn check_tool_call(&self, tool_name: &str) -> Option<String>
pub fn check_tool_call(&self, tool_name: &str) -> Option<String>
Check if a tool call is allowed under the current scope.
Returns None if allowed, or Some(error_message) if blocked.
Trait Implementations§
Source§impl Debug for SkillToolScope
impl Debug for SkillToolScope
Source§impl Default for SkillToolScope
impl Default for SkillToolScope
Source§fn default() -> SkillToolScope
fn default() -> SkillToolScope
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SkillToolScope
impl RefUnwindSafe for SkillToolScope
impl Send for SkillToolScope
impl Sync for SkillToolScope
impl Unpin for SkillToolScope
impl UnsafeUnpin for SkillToolScope
impl UnwindSafe for SkillToolScope
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