rsclaw 0.0.1-alpha.1

rsclaw: High-performance AI agent (BETA). Optimized for M4 Max and 2GB VPS. 100% compatible with openclaw
Documentation
use serde::{Deserialize, Serialize};
use std::sync::Arc;

/// OpenClaw skill manifest structure.
#[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>>,
}

/// Input specification for a skill.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct InputSpec {
    pub name: Arc<str>,
    pub description: Arc<str>,
    pub required: bool,
    pub input_type: Arc<str>,
}

/// Output specification for a skill.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct OutputSpec {
    pub name: Arc<str>,
    pub description: Arc<str>,
    pub output_type: Arc<str>,
}

impl SkillManifest {
    /// Create a new skill manifest with required fields.
    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,
        }
    }
}