use serde::{Deserialize, Serialize};
use std::sync::Arc;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SkillManifest {
pub name: Arc<str>,
pub version: Arc<str>,
pub description: Arc<str>,
pub author: Option<Arc<str>>,
pub license: Option<Arc<str>>,
pub entry: Arc<str>,
pub runtime: Arc<str>,
pub timeout: Option<u32>,
pub inputs: Option<Vec<InputSpec>>,
pub outputs: Option<Vec<OutputSpec>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct InputSpec {
pub name: Arc<str>,
pub description: Arc<str>,
pub required: bool,
pub input_type: Arc<str>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct OutputSpec {
pub name: Arc<str>,
pub description: Arc<str>,
pub output_type: Arc<str>,
}
impl SkillManifest {
pub fn new(name: Arc<str>, version: Arc<str>, description: Arc<str>, entry: Arc<str>) -> Self {
Self {
name,
version,
description,
author: None,
license: None,
entry,
runtime: Arc::from("shell"),
timeout: Some(30),
inputs: None,
outputs: None,
}
}
}