ai-agent 0.13.4

Idiomatic agent sdk inspired by the claude code source leak
Documentation
// Source: /data/home/swei/claudecode/openclaudecode/src/types/command.ts
#[derive(Debug, Clone, PartialEq)]
pub enum CommandType {
    Slash,
    Local,
    Remote,
    Tool,
}

#[derive(Debug, Clone)]
pub struct CommandDefinition {
    pub name: String,
    pub command_type: CommandType,
    pub description: String,
    pub aliases: Vec<String>,
}

impl CommandDefinition {
    pub fn new(name: &str, command_type: CommandType, description: &str) -> Self {
        Self {
            name: name.to_string(),
            command_type,
            description: description.to_string(),
            aliases: Vec::new(),
        }
    }

    pub fn with_aliases(mut self, aliases: Vec<&str>) -> Self {
        self.aliases = aliases.iter().map(|s| s.to_string()).collect();
        self
    }
}