@event-driven-platform/runner
v0.0.5
Published
Centralized execution engine for Commands, idempotency, policies, transactions, and Outbox persistence.
Downloads
541
Readme
@event-driven-platform/runner
The centralized execution engine for the platform's write pipeline.
Installation
pnpm add @event-driven-platform/runnerRunner is normally composed together with the persistence and handler-resolution contracts it depends on. Install the packages your application imports directly.
Role
Operation -> Command -> RunnerRunner executes Commands and owns infrastructure-centric execution behavior: idempotency, execution-log transitions, transaction coordination, handler resolution, guard evaluation, rate limiting, timeout, retry, result persistence, and Outbox persistence.
Operations and handlers must not reproduce or bypass these responsibilities.
Primary API
Runner/RunnerExecution— execution contract and typed execution result.createRunner()/CreateRunnerOptions— supported Runner construction entry point.RunnerDependencies— required and optional integration ports.RunnerRuntime,RunnerOptions,RunnerResultSource— runtime/options/result metadata contracts.
Consumer-provided runtime ports
Runner exposes orchestration-specific ports for GuardEvaluator, RateLimiter, ExecutionTimeout, and RetryDelay. DefaultExecutionTimeout and DefaultRetryDelay are provided when the defaults are suitable.
The exported typed errors allow callers to distinguish execution conflicts, policy rejection, timeout, unavailable policy infrastructure, and rejected state transitions without parsing error messages.
Composition
A consuming application supplies adapters for execution-log persistence, execution transactions, Operation handler resolution, and Outbox persistence, then constructs Runner with createRunner(). Optional guard/rate-limit/runtime implementations are supplied only when those policies are used or overridden.
Execute Commands through Runner.execute(); do not call Operation handlers directly as an alternative execution path.
Related documentation
docs/architecture/README.md— canonical architecture.docs/execution-public-api.md— frozen Execution public boundary and composition model.docs/execution-release-readiness.md— execution guarantees verified for release.
