vulcan_luaskills/runtime/help.rs
1use serde::{Deserialize, Serialize};
2
3/// One structured help node descriptor returned to host-side system tool wrappers.
4/// 返回给宿主侧 system tool 包装层的单个结构化帮助节点描述。
5#[derive(Debug, Clone, Serialize, Deserialize)]
6pub struct RuntimeHelpNodeDescriptor {
7 /// Stable node name. The main node always uses `main`.
8 /// 稳定节点名称,主节点固定使用 `main`。
9 pub flow_name: String,
10 /// Human-readable short description of the current help node.
11 /// 当前帮助节点的人类可读简要说明。
12 pub description: String,
13 /// Canonical runtime entries related to the current help node.
14 /// 与当前帮助节点关联的 canonical 运行时入口列表。
15 pub related_entries: Vec<String>,
16 /// Whether the current node is the main help node of one skill.
17 /// 当前节点是否为某个 skill 的主帮助节点。
18 pub is_main: bool,
19}
20
21/// Structured help tree summary of one skill returned by the runtime core.
22/// 由运行时核心返回的单个 skill 结构化帮助树摘要。
23#[derive(Debug, Clone, Serialize, Deserialize)]
24pub struct RuntimeSkillHelpDescriptor {
25 /// Stable skill identifier of the current help tree.
26 /// 当前帮助树所属的稳定 skill 标识符。
27 pub skill_id: String,
28 /// Human-readable internal skill name.
29 /// 人类可读的内部 skill 名称。
30 pub skill_name: String,
31 /// Semantic package version declared by the current skill.
32 /// 当前技能声明的语义化包版本。
33 pub skill_version: String,
34 /// Named skill root that currently owns the effective help tree.
35 /// 当前生效帮助树所属的命名技能根。
36 pub root_name: String,
37 /// Physical skill directory that currently owns the effective help tree.
38 /// 当前生效帮助树所属的物理技能目录。
39 pub skill_dir: String,
40 /// Main help node summary.
41 /// 主帮助节点摘要。
42 pub main: RuntimeHelpNodeDescriptor,
43 /// Topic/workflow help node summaries declared under the current skill.
44 /// 当前 skill 声明的 topic/workflow 子帮助节点摘要。
45 pub flows: Vec<RuntimeHelpNodeDescriptor>,
46}
47
48/// Structured help detail payload returned by the runtime core for one node.
49/// 运行时核心为单个帮助节点返回的结构化详情载荷。
50#[derive(Debug, Clone, Serialize, Deserialize)]
51pub struct RuntimeHelpDetail {
52 /// Stable skill identifier that owns the current help node.
53 /// 拥有当前帮助节点的稳定 skill 标识符。
54 pub skill_id: String,
55 /// Human-readable internal skill name.
56 /// 人类可读的内部 skill 名称。
57 pub skill_name: String,
58 /// Semantic package version declared by the current skill.
59 /// 当前技能声明的语义化包版本。
60 pub skill_version: String,
61 /// Named skill root that currently owns the resolved help node.
62 /// 当前解析出的帮助节点所属的命名技能根。
63 pub root_name: String,
64 /// Physical skill directory that currently owns the resolved help node.
65 /// 当前解析出的帮助节点所属的物理技能目录。
66 pub skill_dir: String,
67 /// Stable flow name. The main node always uses `main`.
68 /// 稳定流程名称,主节点固定使用 `main`。
69 pub flow_name: String,
70 /// Human-readable short description of the current help node.
71 /// 当前帮助节点的人类可读简要说明。
72 pub description: String,
73 /// Canonical runtime entries related to the current help node.
74 /// 与当前帮助节点关联的 canonical 运行时入口列表。
75 pub related_entries: Vec<String>,
76 /// Whether the current node is the main help node of one skill.
77 /// 当前节点是否为某个 skill 的主帮助节点。
78 pub is_main: bool,
79 /// Structured content type label of the rendered payload.
80 /// 渲染后载荷的结构化内容类型标签。
81 pub content_type: String,
82 /// Final rendered help content returned by the runtime core.
83 /// 运行时核心返回的最终帮助内容。
84 pub content: String,
85}