pub struct SkillDocument {Show 17 fields
pub id: String,
pub name: String,
pub description: String,
pub version: Option<String>,
pub license: Option<String>,
pub compatibility: Option<String>,
pub tags: Vec<String>,
pub allowed_tools: Vec<String>,
pub references: Vec<String>,
pub trigger: bool,
pub hint: Option<String>,
pub metadata: HashMap<String, Value>,
pub body: String,
pub path: PathBuf,
pub hash: String,
pub last_modified: Option<i64>,
pub triggers: Vec<String>,
}skills only.Expand description
A fully indexed skill document with a content-based unique ID.
Fields§
§id: StringA unique ID derived from the name and content hash.
name: StringThe canonical name of the skill.
description: StringDescription used for agent discovery.
version: Option<String>Semantic version.
license: Option<String>License tag.
compatibility: Option<String>Environment constraints.
List of discovery tags.
allowed_tools: Vec<String>Tools allowed for this skill.
references: Vec<String>External resources required by the skill.
trigger: boolIf true, requires explicit @name invocation.
hint: Option<String>Input guidance for users.
metadata: HashMap<String, Value>Custom extension metadata.
body: StringThe instructional Markdown body.
path: PathBufFile system path where the skill was loaded from.
hash: StringSHA256 hash of the content.
last_modified: Option<i64>Optional Unix timestamp of last file modification.
triggers: Vec<String>File glob patterns for activation triggers.
Implementations§
Source§impl SkillDocument
impl SkillDocument
Sourcepub fn engineer_instruction(
&self,
max_chars: usize,
active_tools: &[Arc<dyn Tool>],
) -> String
pub fn engineer_instruction( &self, max_chars: usize, active_tools: &[Arc<dyn Tool>], ) -> String
Engineers a full system instruction from the skill body, with truncation and optionally including tool capability hints.
Sourcepub fn engineer_prompt_block(&self, max_chars: usize) -> String
pub fn engineer_prompt_block(&self, max_chars: usize) -> String
Engineers a lightweight prompt block for Tier 1 injection.
Trait Implementations§
Source§impl Clone for SkillDocument
impl Clone for SkillDocument
Source§fn clone(&self) -> SkillDocument
fn clone(&self) -> SkillDocument
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SkillDocument
impl Debug for SkillDocument
Source§impl From<&SkillDocument> for SkillSummary
impl From<&SkillDocument> for SkillSummary
Source§fn from(value: &SkillDocument) -> SkillSummary
fn from(value: &SkillDocument) -> SkillSummary
Source§impl Serialize for SkillDocument
impl Serialize for SkillDocument
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for SkillDocument
impl RefUnwindSafe for SkillDocument
impl Send for SkillDocument
impl Sync for SkillDocument
impl Unpin for SkillDocument
impl UnsafeUnpin for SkillDocument
impl UnwindSafe for SkillDocument
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request