migrating-workflow-v4-to-v5
Installation
SKILL.md
Migrating Workflow SDK 4.x to 5.0
Workflow SDK 5.0 keeps the programming model from 4.x. "use workflow" / "use step", start(), getRun(), hooks, webhooks, streams, sleep(), retries, and the event log are unchanged, so most application code compiles as-is.
The breaking changes are concentrated in three places:
- Runtime entrypoints (
workflow/api,workflow/runtime) — two exports removed. - The
Worldinterface — only relevant if the app implements a custom World or callsgetWorld()directly. - Build integrations —
@workflow/nestsubpaths, and private compiler subpaths that were never public.
Do not rewrite workflow or step bodies. If you find yourself restructuring business logic, you have gone outside this migration.
Intake
Before editing, establish: