pub struct A2CSkillRef {
pub name: String,
pub source: String,
pub uri: Option<String>,
pub path: String,
pub description: String,
pub license: Option<String>,
pub compatibility: Option<String>,
pub allowed_tools: Option<Vec<String>>,
pub version: Option<String>,
pub skill_metadata: Option<Value>,
}Expand description
SKILL 引用对象 / Skill reference object —— client:get_skills 返回列表元素。
必选 4 字段 / required 4:name / source / path / description(生产方 Computer MUST 发齐;
消费方 Agent MUST NOT 假定任一可选字段存在)。其余 6 个为可选(#[serde(skip_serializing_if)])。
关键约束 / Key invariants:
name是协议主键(合成全局唯一裸名),Agent MUST 当不透明可比较字符串(勿解析结构)。source承载完整溯源(如mcp:tfrobot-tools/marketplace:acme-skills/user),不进name。path必选:Computer 本地绝对目录(staging 落盘是所有 source 统一第一步),面向 Agent SDK,LLM 不可见。- 无
mcp_server字段——Agent 侧协议表面与 source 无关;来源追溯由source与(仅 MCP)uri承担。
Fields§
§name: String主键:合成全局唯一裸名 / primary key: synthesized globally-unique bare name(必选 / required)。
source: String来源元数据:完整 provenance / provenance(必选 / required;不进 name)。
uri: Option<String>仅 MCP 来源:skill://host/skill-name;Agent 非权威 / MCP-only, Agent non-authoritative(可选)。
path: String物化输出:Computer 本地绝对目录路径 / materialization output: local absolute dir(必选 / required)。
description: StringSKILL.md frontmatter 派生描述(跨三源强制)/ description from frontmatter(必选 / required)。
license: Option<String>许可证 / license(可选)。
compatibility: Option<String>兼容性声明 / compatibility(可选)。
allowed_tools: Option<Vec<String>>frontmatter allowed-tools 规范化为列表 / normalized allowed-tools list(可选)。
version: Option<String>版本(非 frontmatter 派生)/ version (not frontmatter-derived)(可选)。
skill_metadata: Option<Value>frontmatter.metadata 透传;A2C 不解释 / frontmatter.metadata passthrough(可选)。
Trait Implementations§
Source§impl Clone for A2CSkillRef
impl Clone for A2CSkillRef
Source§fn clone(&self) -> A2CSkillRef
fn clone(&self) -> A2CSkillRef
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 A2CSkillRef
impl Debug for A2CSkillRef
Source§impl<'de> Deserialize<'de> for A2CSkillRef
impl<'de> Deserialize<'de> for A2CSkillRef
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<A2CSkillRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<A2CSkillRef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for A2CSkillRef
Source§impl PartialEq for A2CSkillRef
impl PartialEq for A2CSkillRef
Source§fn eq(&self, other: &A2CSkillRef) -> bool
fn eq(&self, other: &A2CSkillRef) -> bool
self and other values to be equal, and is used by ==.