- useQuickJSVm defaults to the QuickJS engine when neither the run's
stamped executionContext.workflowVm nor WORKFLOW_VM specifies one;
WORKFLOW_VM=node is the explicit node:vm opt-in.
- CI matrix inverted to match: quickjs legs leave WORKFLOW_VM unset so
the default-selection path is exercised end to end; node legs opt in
explicitly (labels/artifacts unchanged via MATRIX_VM).
- Entrypoint tests that assert node replay-loop internals against mock
worlds pin WORKFLOW_VM=node (the quickjs path would instantiate a WASM
VM per call).
- Docs + changeset updated. Runs keep the engine stamped at start().
* Add stable Next.js eager and lazy test coverage
* Address PR review feedback
* Fix eager Next step route builds
* Fix eager Next manifest refreshes
* Fix eager Next e2e stack assertions
* Externalize native step bundle bindings
* Lazy load Vercel world runtime
* Fix Next dev step sourcemap assertions
* Consolidate eager build changesets
* Fix Vercel world tracing in Next deployments
* Externalize Vercel world in Next builds
* Fix webpack tracing for Vercel world deps
* Fix eager workflow route bundling
* Rely on Next server externals
## Summary
Refactors the E2E tests to call `start()` from `workflow/api` directly instead of going through the `/api/trigger` HTTP endpoint in each workbench app. This removes a layer of indirection — the tests now use the same API that users would use to start workflows programmatically.
### Before
```ts
const run = await triggerWorkflow('addTenWorkflow', [123]);
const returnValue = await getWorkflowReturnValue(run.runId);
```
- `triggerWorkflow()` sent an HTTP POST to `/api/trigger` on the workbench app
- The workbench app looked up the workflow function, called `start()`, and returned the run ID
- `getWorkflowReturnValue()` polled `GET /api/trigger?runId=...` until the workflow completed
### After
```ts
const run = await start(await e2e('addTenWorkflow'), [123]);
const returnValue = await run.returnValue;
```
- `e2e()` / `getWorkflowMetadata()` fetches the manifest from `/.well-known/workflow/v1/manifest.json` to look up the correct `workflowId`
- `start()` is called directly from the test process via the configured World
- `run.returnValue` polls for completion via the World (no HTTP polling endpoint needed)
### Changes
**`packages/core/e2e/e2e.test.ts`**
- Removed `triggerWorkflow()` and `getWorkflowReturnValue()` helpers
- Added `fetchManifest()` to fetch and cache the workflow manifest from the deployment
- Added `getWorkflowMetadata(file, fn)` to look up `{ workflowId }` from the manifest
- Added `e2e(fn)` shorthand for the common case of `workflows/99_e2e.ts`
- All tests call `start()` and `run.returnValue` directly
- Error tests use `.catch()` to inspect `WorkflowRunFailedError`
- Output stream tests use `run.getReadable()` directly (skipped on local world where cross-process streaming isn't supported)
- `beforeAll` configures the local World with the correct data directory and base URL
- Pages Router tests use `startWorkflowViaHttp()` to specifically validate the HTTP trigger path
**Workbench apps (hono, express, fastify, nest)**
- Removed `/api/trigger` route handlers
- Kept `/api/hook`, `/api/test-direct-step-call`, `/api/test-health-check` endpoints
- Re-added `_workflows.js` side-effect import for hono/express/fastify to maintain Nitro's HMR dependency graph
**Deleted trigger-only route files** from: nextjs-turbopack, nextjs-webpack, vite, sveltekit, astro, nuxt, nitro-v2, nitro-v3, example
**`.github/workflows/tests.yml`**
- Added `WORKFLOW_PUBLIC_MANIFEST: '1'` to all E2E test jobs
### Dependencies
Stacked on #963 which adds `WORKFLOW_PUBLIC_MANIFEST` support to all framework builders.
* init
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* not using my prototype fastify plugin
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* renamed workbench dir
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* lockfile update
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* removed
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* symlinked workflows dir
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* added readme
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* symlinked client page
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* scope nitro route to allow renderer fallback
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* allow empty json bodies
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* comments
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* improve error handling and cleanup in /api/trigger
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* consistent server replies
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* expect json res
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* fix json res for e2e test 3,4,5,11
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* fix fastify streaming responses
Stream web streams the same way express or hono do. Read the web reader and write each json chunk to reply.raw. Avoids fastifys async iterator quirks that reordered frames and sent undefined data in the output stream tests
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* fix stream responses for e2e tests
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* clearer comments
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* fix streaming res content type. passes all core e2e tests
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* updated dev deps fastify bench
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* fastify logo (light/dark mode)
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* update url
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* fastify docs
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* Apply suggestions from code review
Co-authored-by: Adrian <me@adriandlam.com>
* Update docs/content/docs/getting-started/fastify.mdx
Co-authored-by: Adrian <me@adriandlam.com>
* Update docs/content/docs/getting-started/fastify.mdx
Co-authored-by: Adrian <me@adriandlam.com>
* Update docs/content/docs/getting-started/fastify.mdx
Co-authored-by: Adrian <me@adriandlam.com>
* Update docs/content/docs/getting-started/fastify.mdx
Co-authored-by: Adrian <me@adriandlam.com>
* Update docs/content/docs/getting-started/fastify.mdx
Co-authored-by: Adrian <me@adriandlam.com>
* Update docs/content/docs/getting-started/fastify.mdx
Co-authored-by: Adrian <me@adriandlam.com>
* Update docs/content/docs/getting-started/fastify.mdx
Co-authored-by: Adrian <me@adriandlam.com>
* Sree Narayanan <sreeaadhi07@gmail.com>
DCO Remediation Commit for Sree Narayanan <sreeaadhi07@gmail.com>
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: c3b6cf9bc4
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 3628b82c1e
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 600117f95a
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 9111151b48
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: aceb6a8ceb
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: b93df58edb
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 628718750e
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 7f523e8013
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* Apply suggestions from code review
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
Co-authored-by: Adrian <me@adriandlam.com>
* nit: standardized package.json
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* mom, my commits are in vercel CI
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* Update docs/content/docs/getting-started/fastify.mdx
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
Co-authored-by: Adrian <me@adriandlam.com>
* Update workbench/fastify/package.json
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
* passing workflow error object to err responses
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* Update workbench/fastify/nitro.config.ts
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
Co-authored-by: Adrian <me@adriandlam.com>
* Update workbench/fastify/src/index.ts
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
Co-authored-by: Adrian <me@adriandlam.com>
* feat: add start pg world plugin
* import createReadStream to serve index.html
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* test: add fastify deploy
* fix: add postgres world dep
* use symlink
* chore(deps): remove unused deps from fastify
* docs: update fastify
* Sree Narayanan <sreeaadhi07@gmail.com>
DCO Remediation Commit for Sree Narayanan <sreeaadhi07@gmail.com>
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 54c3e8a50a663c8e9aacf9c95618f59af1bd2e4c
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 423f722209c64382e86f9f8821253dc4facffe96
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: f76061627fe8d320ce498d44d0a3234abb6432ab
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: a269b8aa8d2fcf0b605cce5a1486cac481cca16e
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: b3cedf7defdb7f97b37862bf2a736d41a6bc5ec8
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 596cf21e79bc82a73b56acb9cab1fc33dbfde975
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 0ea1aa7d95e375d1f04e5501254a9fda815c7694
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: dbc8638b4a952c303e35035204cfdca43b99a059
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* remove fromNodeHandler inside fastify app
* debug print to see stream chunks
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* use readfile and resolve for root route
* moving index.html to /public
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* added back symlinked index.html (to copy during prebuildstep)
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* prebuild and postbuild script to copy and remove index.html
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* Sree Narayanan <sreeaadhi07@gmail.com>
DCO Remediation Commit for Sree Narayanan <sreeaadhi07@gmail.com>
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: b78bf227f4
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: e7a456548e
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 37ee9ddaa6
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 72912dc279
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 4ebda5b505
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: ccb690f367
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 6b80913d38
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: c9fb3ebd80
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* docs: remove preset in fastify docs
* move public/index.html symlink
* Revert "move public/index.html symlink"
This reverts commit 081d29fe16e7817912d69f1b3a3bcd3a38000d5a.
* removed stream output chunk debug log
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* Sree Narayanan <sreeaadhi07@gmail.com>
DCO Remediation Commit for Sree Narayanan <sreeaadhi07@gmail.com>
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: df5dfc9849af3cd9e818cd816feec5586137eae7
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 809bacb88461da5e92aec5d31d936222407593b6
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: b270d02ee69ac072eaa4538a31ed110edf852cc2
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: cb73ae5b1f3f7059f4c432b8226f8eb9b0492724
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 2ee3af65040e969b91a491b2bb285cd2ed447e10
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: cab1381b0e08e3453a3e5a66f55d02a8effff0e3
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 9c7471b2fba60079c71951433d9d0649d8399ba3
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 4583452a27c704ba474080d0c560a1b1b9724058
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* lockfile
* fix
* Sree Narayanan <sreeaadhi07@gmail.com>
DCO Remediation Commit for Sree Narayanan <sreeaadhi07@gmail.com>
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 40af716dca
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 672e756cc1
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 33b9b3e1f4
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 38ca6e24e9
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: b1ada4ae63
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 472c3394fd
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: fd154df028
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 7f1bebe93d
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
---------
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
Co-authored-by: Adrian <me@adriandlam.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
* Normalize Workbenches
Normalize trigger scripts across workbenches
fix: include hono in local build test
test: include src dir for test
test: add workflow dir config in test to fix sveltekit dev tests
add temp 7_full in example wokrflow
format
fix(sveltekit): detecting workflow folders and customizable dir
Remove 7_full and 1_simple error
replace API symlink in webpack workbench
Fix sveltekit and vite tests
Fix sveltekit symlinks
Test fixes
Fix sveltekit workflows path
Dont symlink routes in vite
Include e2e tests for hono and vite
fix error tests post normalization
wip - attempted fixes
* Add claude demo command
* fix: normalize workbench tests (#292)
* Proper stacktrace propogation in world
Proper stacktrace propogation in world
* Standardize the error type in the world spec
* Normalize Workbenches
Normalize trigger scripts across workbenches
fix: include hono in local build test
test: include src dir for test
test: add workflow dir config in test to fix sveltekit dev tests
add temp 7_full in example wokrflow
format
fix(sveltekit): detecting workflow folders and customizable dir
Remove 7_full and 1_simple error
replace API symlink in webpack workbench
Fix sveltekit and vite tests
Fix sveltekit symlinks
Test fixes
Fix sveltekit workflows path
Dont symlink routes in vite
Include e2e tests for hono and vite
* fix error tests post normalization
* fix(sveltekit): reading file on hmr delete
* changeset
* fix(vite): add resolve symlink script
* fix(vite): missing building on hmr
* test local builder in vite
* test: increase timeout on hookWorkflow
* test: ignore vite based apps in crossFileWorkflow
* test: fix nitro based apps status codes
* fix: intercept default vite spa handler on 404 workflow routes
* fix: vite hook route returning 422
* test: use 422 for hookWorkflow expected
* test: fix hono returning 404
* chore: add comment to middleware to clarify
* make api route for duplicate case
* revert
* revert: nitro builder
* add back nitro unhandled rejection logic
* test: add hono
* changeset
* fix: unused method
* fix: remove duplicate import
* remove
* chore: add comments to clarify
* test remove vite symlink script
---------
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
* refactor: add top level resolve symlinks script
* fix: cleanup builder directories (#319)
* fix: add sveltekit server routes to builder
* fix: remove root workflow dir check
* fix missing root level workflow route
* Fix: The constructor now hardcodes `dirs: ['src/routes', 'src/lib']` which silently ignores any user\-provided `dirs` option passed to the plugin\, breaking the documented API and removing support for custom workflow directories\.
* Fix: The test expectations don\'t match the new implementation of `getWorkflowDirs()`\. The mock provides `scanDirs` which the new code no longer uses\, and the new implementation adds scanning of `routesDir` and `apiDir` instead\.
* fix(nitro): use src dir
---------
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
* refactor(nitro): use suppressUndefinedRejections
* revert: sveltekit builder
---------
Co-authored-by: Adrian <me@adriandlam.com>
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
* feat: add getPort method for detecting pid port
* lockfile
* update tests and fix getPort usage
* changeset
* docs: update sveltekit getting started
* fix: use pid-port
* fix: not using config port env
* fix: remove unused getPort from world core
* remove unused stuff
* fix: world local config returning port 3000 as fallback
* changeset
* fix: rebase conflicts
* fix: util test missing http import
* changeset
* fix: wrong import for getPort in core runtime
* fix: getPort in @workflow/utils being imported into workflow runtime
* test: simplify sveltekit test
* fix missing import in test
* fix: async await stuff with getPort
* refactor: move getPort to @workflow/utils/get-port
* test: simplfiy getPort tests
* test: fix sveltekit ports