Skip to main content

dispatch_tool_invocations_with_trace

Function dispatch_tool_invocations_with_trace 

Source
pub async fn dispatch_tool_invocations_with_trace(
    tools: &ToolRegistry,
    invocations: &[ToolInvocation],
    hooks: &[&dyn ToolDispatchHook],
    trace: &DispatchTrace,
) -> Result<Vec<ToolInvocationResult>, KernelError>
Expand description

Dispatch normalized tool invocations and record a DispatchTrace.

Behaves identically to dispatch_tool_invocations_with_hooks, but appends a DispatchTraceEvent for every hook decision, hook error, reservation cleanup, hook-after invocation, and final per-invocation outcome. Use this when a host needs a deterministic, replayable record of policy decisions without depending on a concrete tracing backend.