pub enum ToolVerdict {
Allowed {
tool: String,
budget_remaining: u64,
elapsed_us: u64,
payout_micros: u64,
},
Blocked {
tool: String,
stage: &'static str,
reason: String,
response: Value,
elapsed_us: u64,
},
}Expand description
Verdict for one intercepted tool call.
Variants§
Allowed
Forward to the downstream tool server.
Fields
§
payout_micros: u64Round-33 F1: payout amount (USD micros) that
ActionBudget::try_tool_call debited on this call. Threaded
out so a lost execution.claim() race in the harness can
call ActionBudget::refund_tool_call with the exact same
amount, closing the round-32 F3 concurrent-MCP budget
double-spend.
Blocked
Block; respond to the agent with response.
Fields
Implementations§
Source§impl ToolVerdict
impl ToolVerdict
Sourcepub fn is_allowed(&self) -> bool
pub fn is_allowed(&self) -> bool
True when the call may proceed.
Sourcepub fn elapsed_us(&self) -> u64
pub fn elapsed_us(&self) -> u64
Decision latency in microseconds.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolVerdict
impl RefUnwindSafe for ToolVerdict
impl Send for ToolVerdict
impl Sync for ToolVerdict
impl Unpin for ToolVerdict
impl UnsafeUnpin for ToolVerdict
impl UnwindSafe for ToolVerdict
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more