Class: DispatchRunner
Constructors
Constructor
new DispatchRunner(
token: typeof CONSTRUCT_TOKEN,
sourceCtx: TurnContext | undefined,
turnInputPipeline: DispatchPipelineMiddlewareFn[],
turnOutputPipeline: DispatchPipelineMiddlewareFn[],
hooks:
| DispatchRunnerFunctionalHookRegistrations
| undefined,
observers:
| DispatchRunnerObservabilityHookRegistrations
| undefined): DispatchRunner;Parameters
| Parameter | Type |
|---|---|
token | typeof CONSTRUCT_TOKEN |
sourceCtx | TurnContext | undefined |
turnInputPipeline | DispatchPipelineMiddlewareFn[] |
turnOutputPipeline | DispatchPipelineMiddlewareFn[] |
hooks | | DispatchRunnerFunctionalHookRegistrations | undefined |
observers | | DispatchRunnerObservabilityHookRegistrations | undefined |
Returns
DispatchRunner
Methods
dispatch()
static dispatch(input: RawDispatchRunnerInput): Promise<void>;Dispatches a single LLM execution.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | RawDispatchRunnerInput | The dispatch input. Provide either source (derived path) or raw (standalone). |
Returns
Promise<void>
Remarks
Constructs an @nhtio/adk!DispatchContext (derived from source or from raw), runs the iteration loop, and resolves when middleware/executor signals completion via ctx.ack() or the abort signal fires. Rejects with the nack error when middleware/executor calls ctx.nack(err). Pipeline and executor errors are wrapped, surfaced on the observability error hook, and re-thrown.
Throws
@nhtio/adk!E_INVALID_LLM_DISPATCH_INPUT when the input does not satisfy validation, or when neither source nor raw is provided, or when both are provided.
isDispatchRunner()
static isDispatchRunner(value: unknown): value is DispatchRunner;Returns true if value is a DispatchRunner instance.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to test. |
Returns
value is DispatchRunner
true when value is a DispatchRunner instance.
Remarks
Uses @nhtio/adk!isInstanceOf for cross-realm safety.