Repository navigation
Releases: Sodastech/rungs
Release list
Rungs 0.1.0
npm install @rungsjs/core@0.1.0 @rungsjs/store-memory@0.1.0 @rungsjs/store-postgres@0.1.0Documentation: https://sodastech.github.io/rungs/ · Edge case catalog: https://sodastech.github.io/rungs/edge-cases/
@rungsjs/core
Minor Changes
-
964127b: Initial release.
An approval workflow engine for TypeScript: pure, deterministic and without runtime dependencies.
- Flows.
defineFlowwith static validation and fail-closed defaults. Sequential steps,
parallel steps (any,all,{ quorum }), conditional steps with a JSON condition language,
and versioned flows per tenant with a global fallback. - Approvers. Users, roles and named resolvers supplied by the application. The requester and
inactive users are removed, duplicates are merged, and earlier approvals carry over without
closing a step on their own (four eyes). A step with nobody left to approve is refused at
submit, or blocked mid-flow for an admin toreassign,retryoroverride. - Delegation. Out-of-office rules with chains, cycle detection and a depth limit, plus
delegate,reassignand handing a task back. Delegation never gives anyone two votes in a
step, and the approver a task acts for can still decide it directly. - Time. Deadlines, reminders,
remind,auto-approve,auto-rejectandescalate
timeouts, resubmit deadlines and business-day calendars, driven bytick. - Lifecycle.
returnto the requester or an earlier step,resubmitwith a return policy,
withdrawandoverride. - Service.
createRungswith optimistic concurrency (expectedVersion), tenant-scoped
idempotency keys, an append-only audit trail, domain events delivered from an outbox, and
queries:get,history,inbox,requests,blocked,previewand delegation rules. - Entry points.
@rungsjs/corefor applications,@rungsjs/core/storefor store adapter
authors and@rungsjs/core/enginefor the puredecidefunction. - Typed errors extending
RungsError, each with a stablecode.
Every behavior is described in the edge case catalog (EC-01 to EC-62), and every Core case has a
test named after it: https://sodastech.github.io/rungs/edge-cases/ - Flows.
@rungsjs/store-memory
Minor Changes
-
964127b: Initial release.
memoryStore(), an in-memory store for tests and prototypes. Transactions run one at a time on a
copy of the data, which replaces the data on success and is dropped when the command throws.
snapshot()returns everything the store holds, for assertions and debugging. It passes the same
store contract and service suites as the PostgreSQL store.
@rungsjs/store-postgres
Minor Changes
-
964127b: Initial release.
postgresStore(), a store for PostgreSQL 15 or newer with no runtime dependencies.- Bring your own driver:
fromPg(node-postgres),fromPostgresJs(postgres.js) and
fromPglite(PGlite). migrate()creates or upgrades the tables and is safe to run from several processes;
migrationSql()returns the same migrations as SQL for your own migration tool. Schema and
table prefix are configurable.- Request state in JSONB with indexed columns for due requests, the inbox, request lists, blocked
steps and the outbox. Row locks, compare-and-set on the request version, andSKIP LOCKED
leases so several workers can runtickand event delivery. - An append-only audit table.
- Data retention:
purgeRequest,purgeRequests(with an explicittenantIdor
allTenants: true),purgeIdempotencyandpurgeDispatchedEvents.
- Bring your own driver:
Every package is published from this repository's release workflow with npm provenance.