New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@workflow/core

Package Overview
Dependencies
Maintainers
2
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@workflow/core

Core runtime and engine for Workflow SDK

Source
npmnpm
Version
5.0.0-beta.55
Version published
Weekly downloads
1.5M
76.69%
Maintainers
2
Weekly downloads
 
Created
Source

@workflow/core

Core runtime package for Workflow SDK.

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.

FAQs

Package last updated on 21 Sep 2026

Related posts