pub async fn execute_with_controls<F, Fut>(
config: &SandboxConfig,
breaker: &Arc<CircuitBreaker>,
tool_fn: F,
) -> SandboxResult<ToolExecutionResult>Expand description
Execute a tool with timeout, retry, and circuit-breaker controls.
tool_fn is an async closure that performs the actual tool work and returns
Ok(serde_json::Value) on success or Err(String) on failure.
The circuit breaker is checked before each attempt and updated after.