Skip to main content

HarnessDriver

Trait HarnessDriver 

Source
pub trait HarnessDriver: Send + Sync {
    // Required methods
    fn filter_tools(
        &self,
        tools: Vec<ToolDefinition>,
        allowed_tool_names: Option<&[String]>,
    ) -> Vec<ToolDefinition>;
    fn record_tool_call(
        &self,
        state: &mut AgentRunState,
        policy: HarnessPolicy,
        invocation: &ToolInvocation,
    ) -> ToolLoopDecision;
    fn record_tool_result(
        &self,
        state: &mut AgentRunState,
        policy: HarnessPolicy,
        invocation: &ToolInvocation,
        result: &ToolResult,
    ) -> ToolLoopDecision;
    fn compact_tool_observation(
        &self,
        invocation: &ToolInvocation,
        result: &ToolResult,
        policy: HarnessPolicy,
    ) -> String;
}

Required Methods§

Source

fn filter_tools( &self, tools: Vec<ToolDefinition>, allowed_tool_names: Option<&[String]>, ) -> Vec<ToolDefinition>

Source

fn record_tool_call( &self, state: &mut AgentRunState, policy: HarnessPolicy, invocation: &ToolInvocation, ) -> ToolLoopDecision

Source

fn record_tool_result( &self, state: &mut AgentRunState, policy: HarnessPolicy, invocation: &ToolInvocation, result: &ToolResult, ) -> ToolLoopDecision

Source

fn compact_tool_observation( &self, invocation: &ToolInvocation, result: &ToolResult, policy: HarnessPolicy, ) -> String

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§