Skip to main content

HematiteTool

Trait HematiteTool 

Source
pub trait HematiteTool {
    // Required methods
    fn name(&self) -> &'static str;
    fn description(&self) -> &'static str;
    fn risk_level(&self, args: &Value) -> RiskLevel;
    fn estimate_token_cost(&self, args: &Value) -> usize;
    fn security_audit(&self, args: &Value) -> Result<(), String>;
    fn dry_run(&self, args: Value) -> Result<String, String>;
    fn run(&self, args: Value) -> Result<String, String>;
}

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn description(&self) -> &'static str

Source

fn risk_level(&self, args: &Value) -> RiskLevel

Source

fn estimate_token_cost(&self, args: &Value) -> usize

Estimates the context window impact before execution

Source

fn security_audit(&self, args: &Value) -> Result<(), String>

Mandatory security intercept prior to any execution

Source

fn dry_run(&self, args: Value) -> Result<String, String>

Executes the tool in a dry-run mode

Source

fn run(&self, args: Value) -> Result<String, String>

Executes the tool for real, potentially hitting permission guards

Implementors§