use std::path::PathBuf;
use serde::Serialize;
use crate::core::discover::Skill;
use crate::core::link::LinkOutcome;
use crate::core::source::Source;
#[derive(Debug, Clone, Default)]
pub struct AddRequest {
pub source: String,
pub reference: Option<String>,
pub force: bool,
}
impl AddRequest {
pub fn new(source: impl Into<String>) -> Self {
AddRequest {
source: source.into(),
..Default::default()
}
}
}
#[derive(Debug, Clone, Default)]
pub struct SelectionRequest {
pub skills: Vec<String>,
pub all: bool,
}
#[derive(Debug, Clone, Default)]
pub struct AgentRequest {
pub agents: Vec<String>,
pub unlink: bool,
}
#[derive(Debug)]
pub struct AddOutcome {
pub source: Source,
pub skill: Skill,
pub canonical_path: PathBuf,
pub skipped: bool,
}
#[derive(Debug)]
pub struct AgentLinkResult {
pub agent: String,
pub display: String,
pub outcome: LinkOutcome,
}
#[derive(Debug)]
pub struct AgentStatus {
pub name: String,
pub display: String,
pub linked: bool,
pub canonical: bool,
pub internal_skills: Vec<String>,
pub internal_others: Vec<String>,
}
#[derive(Debug)]
pub struct AgentOutcome {
pub results: Vec<AgentLinkResult>,
}
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ListedSkill {
pub name: String,
pub display_name: String,
pub description: String,
pub path: std::path::PathBuf,
pub enabled: bool,
pub installed_at: Option<u64>,
}
#[derive(Debug)]
pub struct SelectionOutcome {
pub available: Vec<String>,
pub requested: Vec<String>,
pub applied: Vec<String>,
pub already: Vec<String>,
pub missing: Vec<String>,
}