Repository navigation
v0.16.0
Added
@coji/durably
-
Durable step attempts: Persist each callback attempt and optional JSON metadata across worker crashes, including unresolved attempts, and expose them through
getStepAttempts(runId)(#193). -
Parallel step joins:
step.all({ branchName: callback })runs named branches concurrently, replays completed branches after recovery, and keeps branch-specific attempt logs and checkpoint output when a sibling fails (#195). -
Durable external waits: Prepare and resolve persistent input addresses, suspend without occupying a worker slot or concurrency key, and resume the same run by checkpoint replay. Includes optional deadlines, input-wait and execution-slot timing, cancellation, idempotent signal receipts, direct wait queries, and waiting-aware active coalescing (#203, #204).
-
HTTP durable waits: Inspect waits and deliver signals through run-authorized HTTP endpoints, with atomic accepted/duplicate receipts, explicit expired-wait responses, and reconnect-safe persisted reads. Includes outbound CI polling and local human-input examples (#205).
-
coalesce: 'queue'option: Added'queue'to thecoalescetrigger option (trigger(),triggerAndWait(),batchTrigger(), and HTTP/trigger). In this release,'queue'is behaviorally equivalent to'skip': both create one trailing pending run behind an active leased run, and reuse an existing pending run with disposition'coalesced'. Further triggers while a trailing run is pending are coalesced without replacing its input (#198). -
coalesce: 'active'option: Reuse the oldest pending run or a same-job leased run with a valid lease for a concurrency key, otherwise create a pending run. Active selection is atomic across SQLite, libSQL, and PostgreSQL runtimes; coalesced events and HTTP responses expose the selected run status (#199).
@coji/durably-react
-
Waiting run tracking: Hooks and HTTP run projections expose
isWaiting, restore waiting runs on mount/reconnect, and preserve the pending/leased definition ofisActive(#203). -
Scoped
useJobtracking: SPA and fullstack hooks acceptscope.labelsandtriggerOptions, exposeisResolving, hydrate pending or leased selections immediately, and reject stale lookup results after triggers or scope changes. SPAfollowLatestnow follows matchingrun:triggerevents while runs are pending, as well as coalesced and leased events (#199).
Changed
@coji/durably
- Breaking: Node.js 22+ required for the published core package. The bundled
better-sqlite3driver moves to v13 (#189). - Kysely compatibility: The peer dependency now supports 0.27, 0.28, and 0.29 (#189).
@coji/durably-react
- The optional
@coji/durablypeer now requires^0.16.0when using the core package;docs/llms.mdis included in the npm package (#208).
Fixed
@coji/durably
- SSE responses now set
Cache-Control: no-cache, no-transformso compression middleware forwards events without leaving fullstack clients showing a completed run as pending (#189).