What problem does it solve?
This Skill helps you design durable, restart-safe workflows in TypeScript so side effects run reliably, results persist across replays, and long-running steps can wait for external signals.
Core Features & Use Cases
- Durable workflow execution: Define workflows with typed payloads and deterministic idempotency so repeated executions resume instead of duplicating work.
- Atomic side effects via activities: Model external calls as activities whose results are persisted, making replay safe and predictable.
- Saga-style compensation: Add rollback logic using
Workflow.withCompensation to implement compensation for distributed failures.
- External event & timers: Use
DurableDeferred to wait for durable signals and DurableClock for restart-safe sleep.
- Cluster-friendly execution: Integrate with
ClusterWorkflowEngine.layer for distributed durability.
Quick Start
Ask the assistant to implement a durable order-processing workflow that validates input, reserves inventory with compensation, waits for a payment confirmation signal, sleeps before shipping, and then executes shipping as an activity using Effect’s unstable workflow APIs.