dispatch method

  1. @visibleForTesting
Future<AgentToolResult> dispatch(
  1. String name,
  2. Map<String, Object?> input
)

Runs the call name with input and answers the full result.

A refusal is an answer, not an exception: the model is told the code and message and may react. Once a call has failed, the run it belongs to will be rolled back, so every later call is refused with E_TRANSACTION_FAILED rather than performed — performing it would write into a unit that is about to be discarded. That refusal is recorded like any other.

The seam a test drives a run through when it asserts on the result's value; call answers the model only.

Implementation

@visibleForTesting
Future<AgentToolResult> dispatch(String name, Map<String, Object?> input) =>
    _dispatch(name, input, AgentAuditEntryPoint.agent);