Skip to content
1 min read · 265 words

Interface: RawDispatchRunnerInput

Plain input object supplied to DispatchRunner.dispatch.

Remarks

Exactly one of source or raw is required:

  • source — switches to the derived path. The runner snapshots primitives from the provided @nhtio/adk!TurnContext, wires all fetch/refresh/mutation callbacks to delegate to it, forwards emits back to its buses, and bubbles mutations to its Sets at the end of every iteration.

  • raw — switches to the standalone path. The runner constructs an @nhtio/adk!DispatchContext directly from the provided raw input. No parent relationship exists; mutations are not bubbled.

The executor is the user-provided callback that performs the actual LLM API call between the input and output middleware pipelines on every iteration.

Properties

PropertyTypeDescription
executorDispatchExecutorFnUser-provided callback that makes the LLM API call. Invoked between input and output pipelines on every iteration.
hooks?DispatchRunnerFunctionalHookRegistrationsOptional functional hook registrations: message, thought, toolCall.
observers?DispatchRunnerObservabilityHookRegistrationsOptional observability hook registrations: lifecycle events + tool execution + error.
raw?Omit<RawDispatchContext, "hooks">Raw input for a standalone @nhtio/adk!DispatchContext. Mutually exclusive with source.
source?TurnContextSource @nhtio/adk!TurnContext to derive the execution context from. Mutually exclusive with raw.
turnInputPipeline?DispatchPipelineMiddlewareFn[]Input middleware functions, executed in order before the executor on every iteration.
turnOutputPipeline?DispatchPipelineMiddlewareFn[]Output middleware functions, executed in order after the executor on every iteration.