Event struct flowing through the ToolDispatch pipeline.
Created by DispatchTools when it detects a tool call with a registered
dispatch recipe. Carries all context needed for dispatch orchestration.
Fields
Input — set by DispatchTools before pipeline entry
call— The original%Call{}that triggered dispatchresolve_fn— Function to execute individual tool callsrecipe— Recipe function ornilfor passthrough
Pipeline state — populated by stages
strategy—:passthroughor:recipeplan— Execution plan from recipe evaluationserial_results— Results from serial step executionserial_context— Accumulated context from serial resultscurrent_step— Current parallel step being executedtotal_parallel— Total number of parallel steps expectedstep_result— Result of the current parallel stepparallel_results— Collected parallel step resultserrors— Accumulated errors from any failed steps
Output — read by DispatchTools after pipeline exit
result— Final composed string resultstatus—:okor:errorerror— Error detail whenstatus == :error
Summary
Types
@type t() :: %LlmCore.Agent.ToolDispatch.Event{ call: LlmToolkit.Tool.Call.t() | nil, current_step: map() | nil, error: term() | nil, errors: [map()], parallel_results: [map()], plan: map() | nil, recipe: (map() -> map()) | nil, resolve_fn: (LlmToolkit.Tool.Call.t() -> {:ok, String.t()} | {:error, String.t()}) | nil, result: String.t() | nil, serial_context: map(), serial_results: [map()], status: :ok | :error, step_result: map() | nil, strategy: :passthrough | :recipe, total_parallel: non_neg_integer() }