Skip to content
2 min read · 335 words

@nhtio/adk/dispatch_runner

The LLM execution runner and its dispatch, hook, event, and helper types.

Classes

ClassDescription
DispatchRunnerRuns a single dispatch iteration of an agentic turn: it drives the executor through the input/output middleware pipelines, emitting functional and observability hook events along the way. Construction is gated — obtain one via the static DispatchRunner.dispatch entry point rather than new.

Interfaces

InterfaceDescription
DispatchEndEventPayload fired when a dispatch ends — successfully, by error, or by abort.
DispatchExecutorHelpersPer-dispatch helpers passed to DispatchExecutorFn alongside the active @nhtio/adk!DispatchContext.
DispatchExecutorLogChannelFive-level log channel exposed on DispatchExecutorHelpers.
DispatchExecutorLogEntryPer-call structured payload for DispatchExecutorLogChannel.
DispatchStartEventPayload fired when a dispatch begins.
GenerationStatsProvider-agnostic generation accounting for a single completed generation, emitted via DispatchExecutorHelpers.reportGenerationStats.
GenerationStatsEventPayload fired on the observability generationStats hook for every record emitted via DispatchExecutorHelpers.reportGenerationStats.
IterationEndEventPayload fired at the end of each iteration within a dispatch.
IterationStartEventPayload fired at the start of each iteration within a dispatch.
LogEventPayload fired on the observability log hook for every structured event emitted via DispatchExecutorHelpers.log.
RawDispatchRunnerInputPlain input object supplied to DispatchRunner.dispatch.

Type Aliases

Type AliasDescription
DispatchExecutorFnThe user-supplied callback that performs the actual LLM API call within a dispatch.
DispatchExecutorLogLevelSeverity of a structured log event emitted by an executor via DispatchExecutorHelpers.log.
DispatchPipelineMiddlewareFnMiddleware function signature for the input and output pipelines in @nhtio/adk!DispatchRunner.
DispatchRunnerFunctionalHookRegistrationsOptional functional hook registrations supplied to @nhtio/adk!DispatchRunner.dispatch.
DispatchRunnerFunctionalHooksFunctional hook events on @nhtio/adk!DispatchRunner.
DispatchRunnerObservabilityHookRegistrationsOptional observability hook registrations supplied to @nhtio/adk!DispatchRunner.dispatch.
DispatchRunnerObservabilityHooksObservability hook events on @nhtio/adk!DispatchRunner.