Skip to content

v0.4.0 — extensible tasks: resolve, call, wrap

Choose a tag to compare

@db-lyon db-lyon released this 13 Apr 21:25

Extensible Tasks

New APIs

  • BaseTask.resolve(taskName, options?) — resolve another task by name from the registry, returns an unexecuted task instance
  • BaseTask.call(taskName, options?) — resolve and execute another task in a single call; shares the caller's context
  • TaskRegistry.wrap(name, factory) — wrap a registered task with a decorator class; the factory receives the original constructor and returns a new one (typically a subclass). Multiple wraps compose — each layer sees the previously wrapped version as its parent.

FlowRunner

The runner now injects the registry into the task context automatically. Custom tasks can resolve and call other tasks without any additional wiring.

TaskContext

TaskContext now includes an optional registry field, typed as TaskRegistry.

Full Changelog: v0.3.0...v0.4.0