workflow
Installation
SKILL.md
@falcondev-oss/workflow
A long-running async process — send an email, sleep three days, send a follow-up — dies with the process that runs it. This library makes it survivable: the workflow body is an ordinary async function, but every step it takes is persisted to Redis, so a crash, deploy, or retry replays the function from the top and skips straight past the steps that already finished.
Three layers, each minted by the one above:
| Layer | Owns |
|---|---|
WorkflowNamespace |
The redis connection, the pub/sub connection, a cross-workflow concurrency cap |
Workflow |
One queue + one job type: input schema, run body, its worker |
WorkflowJob |
One enqueued run: id, groupId, wait() |
Everything is exported from the package root: WorkflowNamespace, Settings, createRedis, expBackoff, TimeoutError, ResultExpiredError, JobAlreadyExistsError.
The package README still shows
new Workflow({ … })with no namespace. That constructor is namespace-bound — always go throughnamespace.createWorkflow().