Skip to main content

vfa_tui/models/
role.rs

1use std::collections::HashMap;
2
3use serde::{Deserialize, Serialize};
4
5/// Top-level structure of install-roles.json.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7#[serde(deny_unknown_fields)]
8pub struct RoleCatalog {
9    pub version: String,
10    pub description: String,
11    pub roles: HashMap<String, Role>,
12}
13
14/// A single install role definition.
15#[derive(Debug, Clone, Serialize, Deserialize)]
16#[serde(deny_unknown_fields)]
17pub struct Role {
18    pub label: String,
19    pub description: String,
20    pub agents: Vec<String>,
21    #[serde(default)]
22    pub skills: Vec<String>,
23}