ai-agent 0.13.4

Idiomatic agent sdk inspired by the claude code source leak
Documentation
// Source: /data/home/swei/claudecode/openclaudecode/src/commands/hooks/hooks.tsx
use std::collections::HashMap;

pub struct HookContext {
    pub name: String,
    pub params: HashMap<String, String>,
}

impl HookContext {
    pub fn new(name: &str) -> Self {
        Self {
            name: name.to_string(),
            params: HashMap::new(),
        }
    }

    pub fn with_param(mut self, key: &str, value: &str) -> Self {
        self.params.insert(key.to_string(), value.to_string());
        self
    }

    pub fn get_param(&self, key: &str) -> Option<&String> {
        self.params.get(key)
    }
}