Creates a task runner bound to the shared runtime state.
The central runtime registry used to resolve tasks, resources, and lifecycle state.
The event manager associated with the current runtime.
The runtime logger instance available to task execution.
The execution-context store used to propagate nested task frames and abort signals.
Protected ReadonlyeventThe event manager associated with the current runtime.
Protected ReadonlyloggerThe runtime logger instance available to task execution.
Protected ReadonlyrunnerProtected ReadonlystoreThe central runtime registry used to resolve tasks, resources, and lifecycle state.
ProtectedcreateComposes the executable middleware pipeline for a task definition.
The composed runner function for the task.
Registers a global interceptor around task execution.
Interceptors wrap the composed task middleware chain from the outside and
may optionally be limited to matching task definitions via options.when.
This must be called before store.lock(), while the runtime is still
building its middleware graph.
The interceptor to apply around matching task runs.
Optionaloptions: TaskRunnerInterceptOptionsOptional filtering rules for when the interceptor should execute.
Executes a registered task through the runtime pipeline.
This applies lifecycle admission checks, resolves the effective abort signal, enforces task health policies, runs middleware, and records the execution frame for nested task tracing.
The task result, or undefined if the task resolves without a
value.
Coordinates task execution for the runtime.
The task runner owns task admission checks, middleware composition, execution-context tracking, abort-signal propagation, and health-policy enforcement. It also adapts to the runtime lifecycle: before
store.lock(), tasks are recomposed on every call because resources may still register interceptors duringinit(). After the store is locked, the interceptor graph becomes stable, so composed runners are cached per task id for fast repeated execution.