pub struct SkillManager { /* private fields */ }Expand description
Shared skill catalog and optional delegated workers. All published views share one registry generation; a retained metadata snapshot never authorizes a later read.
Implementations§
Source§impl SkillManager
impl SkillManager
Sourcepub fn new(skills_dir: PathBuf) -> Self
pub fn new(skills_dir: PathBuf) -> Self
Create an empty manager with one trusted discovery root.
Sourcepub fn new_with_dirs(
default_skills_dir: PathBuf,
additional_skills_dirs: Vec<PathBuf>,
) -> Self
pub fn new_with_dirs( default_skills_dir: PathBuf, additional_skills_dirs: Vec<PathBuf>, ) -> Self
Configure roots in priority order. The default root is also the suggested creation root. Relative roots are anchored to the process working directory at construction time.
Sourcepub fn default_skills_dir(&self) -> &Path
pub fn default_skills_dir(&self) -> &Path
Directory suggested to skill creation workflows.
Sourcepub fn skills_dirs(&self) -> &[PathBuf]
pub fn skills_dirs(&self) -> &[PathBuf]
Configured roots in priority order.
Sourcepub fn with_description(self, description: String) -> Self
pub fn with_description(self, description: String) -> Self
Override the tool’s introductory description; the bounded catalog is still appended.
Sourcepub fn with_default_skill_tools(self, tools: Vec<String>) -> Self
pub fn with_default_skill_tools(self, tools: Vec<String>) -> Self
Default tools for delegated skills that omit allowed-tools. An explicitly empty list
grants none. Granting tools_select also permits subsequent discovery under runner rules.
Sourcepub fn with_limits(self, limits: SkillLimits) -> Self
pub fn with_limits(self, limits: SkillLimits) -> Self
Configure resource limits. Hard ceilings are depth 32, 20,000 directories, 100,000 entries, 4,096 skills, 128 MiB combined content, 64 KiB catalog and 512 KiB responses. Counts and total content have a minimum of one; catalog/response minima are 128/1,024 bytes.
Sourcepub fn tools(self: &Arc<Self>) -> Result<ToolSet<BaseCtx>, BoxError>
pub fn tools(self: &Arc<Self>) -> Result<ToolSet<BaseCtx>, BoxError>
Register all three static local tools over this manager’s shared state.
Sourcepub fn invalidate(&self)
pub fn invalidate(&self)
Invalidate membership after a filesystem or host configuration change. No I/O is done here.
Sourcepub fn set_skill_filter(&self, filter: Option<SkillFilter>)
pub fn set_skill_filter(&self, filter: Option<SkillFilter>)
Replace the host admission policy and immediately remove rejected identities. Newly admitted files are discovered on the next async access or explicit reload.
Sourcepub fn catalog(&self) -> Arc<SkillCatalogSnapshot> ⓘ
pub fn catalog(&self) -> Arc<SkillCatalogSnapshot> ⓘ
Last published immutable metadata and diagnostics, without filesystem I/O.
Sourcepub async fn load(&self) -> Result<(), BoxError>
pub async fn load(&self) -> Result<(), BoxError>
Compatibility reload API. Inspect Self::catalog for per-file failures and truncation.
Sourcepub async fn reload(&self) -> Result<SkillLoadReport, BoxError>
pub async fn reload(&self) -> Result<SkillLoadReport, BoxError>
Rescan and publish all roots atomically. Missing roots become empty; invalid or unreadable files are omitted with diagnostics. No stale entries survive a successful publication.
Sourcepub fn get_skill(&self, lowercase_name: &str) -> Option<Skill>
pub fn get_skill(&self, lowercase_name: &str) -> Option<Skill>
Retrieve the winning skill by its normalized callable name, without I/O.
Trait Implementations§
Source§impl SubAgentSet for SkillManager
impl SubAgentSet for SkillManager
Source§fn into_any(self: Arc<Self>) -> Arc<dyn Any + Send + Sync> ⓘ
fn into_any(self: Arc<Self>) -> Arc<dyn Any + Send + Sync> ⓘ
Any for downcasting.Source§fn contains_lowercase(&self, name: &str) -> bool
fn contains_lowercase(&self, name: &str) -> bool
Source§fn get_lowercase(&self, name: &str) -> Option<SubAgent>
fn get_lowercase(&self, name: &str) -> Option<SubAgent>
Source§fn definitions(&self, names: Option<&[String]>) -> Vec<FunctionDefinition>
fn definitions(&self, names: Option<&[String]>) -> Vec<FunctionDefinition>
Source§impl Tool<BaseCtx> for SkillManager
impl Tool<BaseCtx> for SkillManager
Source§type Output = SkillContentOutput
type Output = SkillContentOutput
Source§fn description(&self) -> String
fn description(&self) -> String
Source§fn definition(&self) -> FunctionDefinition
fn definition(&self) -> FunctionDefinition
Source§fn group(&self) -> Option<ToolGroupInfo>
fn group(&self) -> Option<ToolGroupInfo>
Source§async fn call(
&self,
ctx: BaseCtx,
args: Self::Args,
_resources: Vec<Resource>,
) -> Result<ToolOutput<Self::Output>, BoxError>
async fn call( &self, ctx: BaseCtx, args: Self::Args, _resources: Vec<Resource>, ) -> Result<ToolOutput<Self::Output>, BoxError>
Source§fn select_resources(&self, resources: &mut Vec<Resource>) -> Vec<Resource>
fn select_resources(&self, resources: &mut Vec<Resource>) -> Vec<Resource>
Auto Trait Implementations§
impl !Freeze for SkillManager
impl !RefUnwindSafe for SkillManager
impl !UnwindSafe for SkillManager
impl Send for SkillManager
impl Sync for SkillManager
impl Unpin for SkillManager
impl UnsafeUnpin for SkillManager
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
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> ⓘ
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> ⓘ
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