npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@workflow/core

v5.1.0

Published

Core runtime and engine for Workflow SDK

Readme

@workflow/core

Core runtime package for Workflow SDK.

Steps wait for released stream writers to drain before recording completion, then release idle transport resources when the World supports it. Reacquiring the same writable remains supported. Aborting a public writable drains its accepted prefix and disposes the underlying writer transport without closing the shared server stream. Source failures in flushable readable pipes propagate to the user-facing reader rather than leaving it waiting for more data. Streams that finish draining after the inline wait budget expires do not force an extra queued continuation unless other background operations remain pending.

Hook registration acknowledgements and token conflicts participate in replay delivery ordering alongside step results, hook payloads, and sleep completions. Concurrent branches awaiting hook.getConflict() preserve their step correlation IDs when replaying an extended event history.

Failed-run logs include underlying error causes and codes to help diagnose failures such as socket, DNS, and TLS errors. Unreadable causes are marked without preventing the run from being recorded as failed.

Queued step messages carry immutable run identity in runContext, so step execution skips the initial runs.get and fetches the run row only when continuing into workflow replay. Messages from older producers without runContext retain the initial fetch.

When a World advertises capabilities.invoke, resumeHook() sends serialized hook inputs through world.invoke() and waits for the executor's decision. The World calls the existing handler with invoke: true, requestId, and the hook input. Core validates the input, waits for its event write, and returns a decision. Core shares a run's activity state between workflow execution and these input calls.

The event write completes before the response is stored. On Worlds with hookResumeDedup, a stable request identity makes retries reuse the same hook event, including after hook disposal or run completion. Core can process inputs while inline steps wait. Workflow code observes committed inputs at replay boundaries, reusing a retained Node virtual machine when available.

Errors returned by the executor propagate through world.invoke() to the caller of resumeHook().

Register onRunCompleted and onRunFailed handlers with registerLifecycleHooks from workflow/api for best-effort reporting of terminal transitions written by your app. Handlers receive the workflow name without a backend read, a lazy Run instance, and, for failures, an error hydrated from the persisted payload. Callbacks are not retried; the event log remains the system of record. Hook-property getters and reporting failures are isolated from terminal writes. The callback's waitUntil scope also drains background operations for streams hydrated from the persisted failure, including when a handler throws.