#[non_exhaustive]pub struct SkillReference {
pub name: String,
pub meta: Option<Map<String, Value>>,
}unstable_protocol_v2 only.Expand description
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
A reference to a skill that the user invokes with a prompt.
The Client sends it in session/prompt to invoke a skill entry from the
session’s command list. The Agent MUST treat each reference as the user
explicitly invoking that skill for this prompt, and applies the skill to
the prompt as a whole. The reference carries no input.
An Agent that advertises the session.prompt.skill capability accepts one
skill reference per prompt, as the first content block. An Agent that also
advertises session.prompt.skill.inline accepts any number of them, at any
position. Clients MUST NOT send a skill reference that the Agent’s
capability does not allow.
The type discriminator value is skill.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe name of a skill entry in the session’s current command list.
Required and non-null. The Agent MUST reject the prompt with -32602
when it cannot resolve the name to a skill the user can invoke.
meta: Option<Map<String, Value>>The _meta property is reserved by ACP to allow Clients and Agents to attach additional
metadata to their interactions. Omitted and null are equivalent and mean no metadata.
Implementations MUST NOT assign meaning to keys they do not recognize.
See protocol docs: Extensibility
Implementations§
Source§impl SkillReference
impl SkillReference
Sourcepub fn new(name: impl Into<String>) -> SkillReference
Available on crate feature unstable_agent_skills only.
pub fn new(name: impl Into<String>) -> SkillReference
unstable_agent_skills only.Builds SkillReference with the name of the skill to invoke. Optional metadata starts unset.
Sourcepub fn meta(self, meta: impl IntoOption<Map<String, Value>>) -> SkillReference
Available on crate feature unstable_agent_skills only.
pub fn meta(self, meta: impl IntoOption<Map<String, Value>>) -> SkillReference
unstable_agent_skills only.The _meta property is reserved by ACP to allow Clients and Agents to attach additional metadata to their interactions. Implementations MUST NOT assign meaning to keys they do not recognize.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for SkillReference
impl Clone for SkillReference
Source§fn clone(&self) -> SkillReference
fn clone(&self) -> SkillReference
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SkillReference
impl Debug for SkillReference
Source§impl<'de> Deserialize<'de> for SkillReference
impl<'de> Deserialize<'de> for SkillReference
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SkillReference, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SkillReference, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for SkillReference
Source§impl JsonSchema for SkillReference
impl JsonSchema for SkillReference
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for SkillReference
impl PartialEq for SkillReference
Source§impl Serialize for SkillReference
impl Serialize for SkillReference
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,
impl StructuralPartialEq for SkillReference
Auto Trait Implementations§
impl Forget for SkillReference
impl Freeze for SkillReference
impl Move for SkillReference
impl RefUnwindSafe for SkillReference
impl Send for SkillReference
impl Sync for SkillReference
impl Unpin for SkillReference
impl UnsafeUnpin for SkillReference
impl UnwindSafe for SkillReference
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.