JavaScript-native distributed workflows.
Write workflows as async generator functions that yield steps. First-class primitives for retries, delays, polling, and durable stores.
bun add yieldstarRuntime packages:
- Local execution:
@yieldstar/worker-invoker,@yieldstar/sqlite-runtime - HTTP server:
@yieldstar/http-server,@yieldstar/worker-invoker
Select @yieldstar/sqlite-runtime/bun for bun:sqlite or @yieldstar/sqlite-runtime/node for node:sqlite.
Define a workflow that composes steps:
import{workflow}from"yieldstar";exportconstsimple=workflow(asyncfunction*(step){constn=yield*step.run(()=>1);yield*step.delay(1000);returnyield*step.run(()=>n*2);});Retries are explicit and structured:
import{RetryableError}from"yieldstar";yield*step.run(async()=>{// e.g. flaky fetchthrownewRetryableError("temporary",{maxAttempts: 4,retryInterval: 1000});});- Full usage, runtimes, APIs, and examples: packages/yieldstar/README.md
- Runtime families and connectors: docs/runtimes/index.md
- Store connector specification and qualification: docs/store-connector-spec.md
- Migrating from 0.4: docs/migrations/0.4-to-0.5.md
- Please open an issue to discuss significant changes before submitting a PR.
- See CONTRIBUTING.md for repo layout, dev workflow, testing, and release details.
MIT