Skip to main content

vulcan_luaskills/runtime/
entry.rs

1use serde::{Deserialize, Serialize};
2
3/// One parameter descriptor exposed by a LuaSkills runtime entry.
4/// LuaSkills 运行时入口对外暴露的单个参数描述。
5#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
6pub struct RuntimeEntryParameterDescriptor {
7    /// Stable local parameter name.
8    /// 稳定的局部参数名称。
9    pub name: String,
10    /// Runtime parameter type string.
11    /// 运行时参数类型字符串。
12    pub param_type: String,
13    /// Human-readable parameter description.
14    /// 人类可读的参数说明。
15    pub description: String,
16    /// Whether the parameter is required.
17    /// 当前参数是否必填。
18    pub required: bool,
19}
20
21/// Generic runtime entry descriptor that stays independent from MCP tool/resource concepts.
22/// 独立于 MCP tool/resource 概念的通用运行时入口描述对象。
23#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
24pub struct RuntimeEntryDescriptor {
25    /// Canonical runtime entry identifier in `skill_id-entry_name[-N]` format.
26    /// 采用 `skill_id-entry_name[-N]` 形式的 canonical 运行时入口标识。
27    pub canonical_name: String,
28    /// Stable skill namespace that owns the entry.
29    /// 拥有该入口的稳定 skill 命名空间。
30    pub skill_id: String,
31    /// Stable local entry name declared by the skill.
32    /// 由 skill 声明的稳定局部入口名称。
33    pub local_name: String,
34    /// Named skill root that currently owns the effective skill instance.
35    /// 当前生效技能实例所属的命名技能根。
36    pub root_name: String,
37    /// Physical skill directory of the current effective skill instance.
38    /// 当前生效技能实例对应的物理技能目录。
39    pub skill_dir: String,
40    /// Human-readable entry description.
41    /// 人类可读的入口描述。
42    pub description: String,
43    /// Parameter descriptors of the current entry.
44    /// 当前入口的参数描述列表。
45    pub parameters: Vec<RuntimeEntryParameterDescriptor>,
46}