claude-rust-types 1.2.0

Shared domain types for messages, providers, tools, and permissions
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use claude_rust_errors::AppResult;
use serde_json::Value;

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum PermissionLevel {
    ReadOnly,
    Dangerous,
}

#[async_trait::async_trait]
pub trait Tool: Send + Sync {
    fn name(&self) -> &str;
    fn description(&self) -> &str;
    fn input_schema(&self) -> Value;
    fn permission_level(&self) -> PermissionLevel;
    async fn execute(&self, input: Value) -> AppResult<String>;
}