Commit Graph

1811 Commits

Author SHA1 Message Date
Alex Holovach 34f3f86f31 fix(utils): detect linux ports via /proc (#471)
* fix(utils): detect linux ports via /proc

Signed-off-by: Alex Holovach <alex.holovach@kubiks.ai>

* extract parsePort helper

Signed-off-by: Alex Holovach <alex.holovach@kubiks.ai>

* add changeset

Signed-off-by: Alex Holovach <alex.holovach@kubiks.ai>

---------

Signed-off-by: Alex Holovach <alex.holovach@kubiks.ai>
2025-11-30 14:07:31 -08:00
Peter Wielander 9ea3fa9fd5 [web] Remove peer dependency on world-postgres that can't be resolved during build (#466) 2025-11-30 10:14:33 -08:00
Gal Schlezinger ef8e0e52ab world-postgres: poll faster in pg-boss (#463)
---------

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
2025-11-30 09:45:40 -08:00
Alex Holovach 109fe593fc [web] add PostgreSQL backend support (#459)
---------

Signed-off-by: Alex Holovach <alex.holovach@kubiks.ai>
2025-11-30 08:42:35 -08:00
Pranay Prakash a8f48c5a08 add benchmarking (#460) 2025-11-29 21:21:49 -08:00
Pranay Prakash 3aee6d7efb Port Peter's Workbench UI to nextjs-turbopack (#458)
* Port Peter's Workspace UI

* Add symlinks for webpack workbench to share UI with turbopack

- Add symlinks for components, hooks, lib directories
- Add symlinks for app/workflows and app/api/workflows
- Install UI dependencies in webpack workbench package.json
- Both webpack and turbopack workbenches now share the same UI code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Use allWorkflows from @/_workflows instead of custom examples.ts

- Update workflow definitions to include workflowFile field
- Change start route to use allWorkflows like trigger route
- Remove unused examples.ts file
- This allows accessing workflows from any workflow file, not just 99_e2e

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Dynamically generate workflow definitions from allWorkflows

- Remove manual workflow definitions, now auto-generated from _workflows.ts
- Add workflowFile path display in UI (tooltip and fallback description)
- Sort workflows by file name first, then by workflow name
- Fix duplicate key issue by using workflowFile:name as key
- Make description optional since it's inferred from file path

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add default arguments map for workflows that require parameters

- Create DEFAULT_ARGS_MAP to provide sensible defaults for workflows with parameters
- Includes defaults for: addTenWorkflow, hookWorkflow, webhookWorkflow, hookCleanupTestWorkflow, closureVariableWorkflow
- Workflows without entries in the map get empty args array

This allows all workflows to be started from the UI without needing manual argument input for now.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix terminal log colors for better visibility on black background

- Change info logs from text-primary (black in light mode) to text-cyan-400
- Change error logs from text-destructive to text-red-400
- Update stream logs to text-blue-400
- Update result logs to text-green-400
- Change prefix color from text-gray-500 to text-gray-400

All colors now work properly with the terminal's black background regardless of light/dark mode.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove toTitleCase transformation, use raw workflow names

- Display workflow names exactly as they are in code (e.g., "addTenWorkflow")
- Remove the toTitleCase helper function
- Simpler and more direct mapping from code to UI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Use monospace font for workflow names

- Apply font-mono to workflow displayName in both card and tooltip
- Makes workflow names more readable and consistent with code style

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Filter out step functions using workflowId property

- Check for 'workflowId' property added by compiler to identify workflow functions
- More reliable than checking function name endings
- Only functions with "use workflow" directive have workflowId property
- Prevents step functions from appearing in the UI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add symlinks for remaining workflow files and dependencies

- Add symlinks for 2_control_flow.ts, 4_ai.ts, 5_hooks.ts to both workbenches
- Install openai and mixpart dependencies needed by these workflows
- Update DEFAULT_ARGS_MAP with arguments for new workflows:
  - ai: sample weather prompt
  - agent: sample weather prompt for Muscat
  - handleUserSignup: example email address
- All 9 workflow files now available in both workbenches

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Group workflows by file with section headers in UI

- Group workflows by workflowFile and render each group separately
- Add section headers showing the file path for each group
- Use monospace font for file path headers
- Increase spacing between sections (space-y-4)
- Improves visual organization when browsing workflows

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Show default arguments instead of file path in workflow cards

- Display default arguments in the card description line (if present)
- Remove redundant file path since it's now shown in section headers
- Use monospace font for argument display
- Workflows without arguments show no description line

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Display default arguments with multi-line formatting

- Use JSON.stringify with indentation (null, 2) for better readability
- Change from <p> to <pre> with whitespace-pre-wrap
- Arguments now display across multiple lines when needed
- Easier to read complex arguments like webhook tokens

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add workflow runtime duration display with millisecond precision

- Add formatDuration helper to calculate and format runtime
- Show duration in ms, seconds, or minutes based on length
- Formats: "123ms", "5.234s", "2m 15.678s"
- Display duration in monospace font below end time
- Only shown when invocation has completed (endTime exists)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update default arguments to match e2e test values

- Use arguments from packages/core/e2e/e2e.test.ts for accuracy
- addTenWorkflow: 123 (instead of 5) to match test expectations
- closureVariableWorkflow: 7 (instead of 42) to match test expectations
- Use Math.random().toString(36) for hook/webhook tokens (matches test pattern)
- Add comment referencing e2e test source

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-28 21:43:27 -08:00
Nathan Rajlich 0f1645b8a2 Ignore rejections in waitedUntil promise (#452) 2025-11-28 08:51:22 -08:00
Nathan Rajlich 172e0151ba Add AI provider step wrapper functions (#428) 2025-11-26 23:51:12 -08:00
Nathan Rajlich 5b918611fc Apply workflow function transformation in "step" mode (#420) 2025-11-26 23:35:53 -08:00
Nathan Rajlich 0cacb99fcc Support nested "use step" declarations in non-workflow functions (#418) 2025-11-26 23:20:04 -08:00
Vercel Release Bot 87ad24b3b6 Version Packages (beta) (#416) @workflow/world-postgres@4.1.0-beta.15 @workflow/world-testing@4.0.1-beta.23 workflow@4.0.1-beta.22 @workflow/nitro@4.0.1-beta.22 @workflow/next@4.0.1-beta.22 @workflow/cli@4.0.1-beta.22 @workflow/ai@4.0.1-beta.22 @workflow/web-shared@4.0.1-beta.20 @workflow/core@4.0.1-beta.19 @workflow/world-vercel@4.0.1-beta.13 @workflow/world-local@4.0.1-beta.13 @workflow/nuxt@4.0.1-beta.11 @workflow/swc-plugin@4.0.1-beta.8 @workflow/world@4.0.1-beta.7 @workflow/core@4.0.1-beta.1 @workflow/sveltekit@4.0.0-beta.16 @workflow/rollup@4.0.0-beta.2 2025-11-26 19:55:04 -08:00
Peter Wielander 17904fc7b4 [ai] Pass messages to step functions in DurableAgent and add prepareStep callback (#446) 2025-11-26 19:45:34 -08:00
Adrian 6dd17500da refactor: move rollup plugin to own package (#382)
* refactor: move rollup plugin to own package

* refactor(sveltekit): update sveltekit to use rollup package

* Update packages/rollup/src/index.ts

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* chore(deps): missing nitro dep

* chore(deps): remove unused deps from @workflow/rollup

* changeset

* chore: project LICENSE symlinks

* refactor: move @swc/core version to pnpm workspace

* chore: cleanup and add readme

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2025-11-26 16:02:13 -08:00
Boris Besemer 40057db00b [world-local] bounded concurrency for queue (#401) 2025-11-26 13:38:22 -08:00
Adrian c6e22d0e43 docs: fix postgres world setup docs (#429) 2025-11-26 10:33:34 -08:00
Adrian cc37184967 fix: ai links in docs agent (#440) 2025-11-26 10:31:02 -08:00
Adrian b042ba70ee fix: externalize bun from step bundle (#425)
* fix: externlize bun from step bundle

* changeset

* fix: add bun to node module esbuild plugin

* feat: add bun to node module esbuild plugin match

* feat: add hint for using bun inside workflow in ts lsp

* fix: add support for bun:* modules
2025-11-26 09:28:59 -08:00
Nathan Rajlich 0ecd2da992 [docs] Add button link to X account (#435) 2025-11-26 08:41:35 -08:00
Nathan Rajlich 07800c29ee Support closure variables for serialized step functions (#366) 2025-11-25 00:29:15 -08:00
Nathan Rajlich 8b470f0c1d Apply SWC transformation on step functions returned from factory function (#360)
Added support for transforming step functions that are returned from factory functions.

### What changed?

Enhanced the SWC plugin to detect and transform step functions that are defined within object literals returned by factory functions. The transformation now properly identifies arrow functions with object literal bodies and processes their step functions accordingly.

Added test fixtures to verify the functionality:
- Created test cases for a factory function that returns an object with a step method
- Added corresponding output files for client, step, and workflow modes

### How to test?

1. Create a factory function that returns an object with methods marked as steps:
```javascript
const myFactory = () => ({
  myStep: async () => {
    'use step';
    await fs.mkdir('test');
  },
});
```

2. Verify that the step function is properly transformed and registered when used in a workflow.

### Why make this change?

This enhancement supports a common pattern where developers create factory functions that return objects containing step methods. Without this change, step functions defined in this pattern weren't being properly transformed, which limited the flexibility of the workflow system.
2025-11-25 00:25:44 -08:00
Nathan Rajlich fb9fd0f893 Add support for closure scope vars in step functions (#358)
### What changed?

- Enhanced the SWC plugin to detect and collect closure variables from nested step functions
- Modified the workflow runtime to pass closure variables to step functions during execution
- Updated the serialization/deserialization logic to handle the new closure variable format
- Added a mechanism to access closure variables within step functions
- Added tests to verify closure variable functionality in nested step functions
- Closure variables are stored on the step function execution's `AsyncLocalStorage`​ context

### Example

```typescript
export async function myWorkflow(baseValue: number) {
  'use workflow';
  const multiplier = 3;
  const prefix = 'Result: ';

  const calculate = async () => {
    'use step';
    const result = baseValue * multiplier;
    return `${prefix}${result}`;
  };

  return await calculate();
}
```

### Why make this change?

Previously, nested step functions couldn't access variables from their parent workflow scope, limiting their usefulness and requiring workarounds like passing all needed values as parameters. This change enables a more natural programming model where step functions can access variables from their enclosing scope, making workflow code more intuitive and reducing the need for explicit parameter passing.
2025-11-25 00:21:05 -08:00
Adrian 71d1757d0f fix: preview package tarballs (#411) 2025-11-24 16:50:04 -08:00
Hayden Bleasel 4f09e128a8 Remove unused dependencies (#405) 2025-11-24 15:23:32 -08:00
Vercel Release Bot 018c5a053e Version Packages (beta) (#410) @workflow/world-testing@4.0.1-beta.22 workflow@4.0.1-beta.21 @workflow/nitro@4.0.1-beta.21 @workflow/next@4.0.1-beta.21 @workflow/cli@4.0.1-beta.21 @workflow/ai@4.0.1-beta.21 @workflow/web-shared@4.0.1-beta.19 @workflow/core@4.0.1-beta.18 @workflow/builders@4.0.1-beta.17 @workflow/nuxt@4.0.1-beta.10 2025-11-24 15:22:23 -08:00
Julian Benegas aba5264174 [ai] Add onStepFinish callback to DurableAgent#stream() (#404) 2025-11-24 15:10:49 -08:00
Peter Wielander 6889dacd08 [world-vercel] log warning when detecting zod v3 during enqueue action (#409) 2025-11-24 15:08:15 -08:00
Vercel Release Bot e5c0380bbd Version Packages (beta) (#396) @workflow/world-postgres@4.1.0-beta.14 @workflow/world-testing@4.0.1-beta.21 workflow@4.0.1-beta.20 @workflow/nitro@4.0.1-beta.20 @workflow/next@4.0.1-beta.20 @workflow/cli@4.0.1-beta.20 @workflow/web-shared@4.0.1-beta.18 @workflow/core@4.0.1-beta.17 @workflow/builders@4.0.1-beta.16 @workflow/world-local@4.0.1-beta.12 @workflow/world-vercel@4.0.1-beta.11 @workflow/nuxt@4.0.1-beta.9 @workflow/errors@4.0.1-beta.6 @workflow/utils@4.0.1-beta.4 @workflow/sveltekit@4.0.0-beta.14 2025-11-24 14:25:39 -08:00
Nathan Rajlich aa5ff3ccd9 Disable Turborepo cache for CI related tasks (#329)
* Disable Turborepo cache for CI related tasks

Disable cache for all tasks except "build"

* Checkout swc-plugin test fixture files with Unix newlines for Windows (#331)
2025-11-24 13:35:43 -08:00
Peter Wielander 2c438c3bd0 [world-vercel] Fix queue call compatibility for zod v3 (#403) 2025-11-24 12:29:40 -08:00
Adrian edb69c3c0d fix: port detection, postgres nitro apps and nitro app testing (#363)
* add debug logs

* add polling for port test

* nuxt may be hmring on ignored files/folders

* Revert "nuxt may be hmring on ignored files/folders"

This reverts commit c57c3f0dd9e1b757825c777e12b63e050ca44227.

* Update packages/utils/src/get-port.ts

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* Update packages/world-local/src/config.ts

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* Update packages/utils/src/get-port.ts

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* revert getPort

* test new pid to port cmd

* extend sleep time on tests

* fix

* fix race condition in tests

* add logs

* add fallback from pid-port

* remove pid-port fallback

* revert config ts

* test: add getPort test

* update tests for concurrent calls

* temp

* trigger rebuild

* feat: add windows get port support

* fix port sorting

* fix parsing logic and filtering

* fformat

* update ports logi

* revert

* windows port hack

* refactor: optional chaining on windows

* test: change ordering of config tests

* remove wrong test

* simplify windows getPort impl

* use execFileSync instead of execFile

* use execa

* disable test cache

* Update packages/utils/src/get-port.ts

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* update

* debug

* windows cmd

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* lockfile

* fix: windows port detection

* simplify stuff

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* test: revert gh copilot

* fix

* increase sleep

* revert logs

* revert turbo

* revert

* revert

* changeset

* Update packages/utils/src/get-port.ts

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* format

* init postgres world for express and hono

* add posgres world to nitro config

* add postgres world start to sveltekit

* add postgres world plugin to nitro apps

* Update workbench/sveltekit/src/hooks.server.ts

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* Update workbench/vite/vite.config.ts

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* fix nuxt plugin

* revert vercel compiled hook on nitro

* .

* revert

* update

* CI WILL BE GREEN

* remove log in nitro

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-24 09:30:41 -08:00
Gal Schlezinger 10ce313d56 postgres: fix tests (#394)
* postgres: use non-deprecated drizzle signatures

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* postgres: store metadata in the hook

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* core: do not rely on module cache for world config. instead, use a global and a symbol.

this makes sure that streamers can use in-memory event emitters and that it won't be compiled away into the different flow.js and step.js files.

this was figured out when i was adding a hooks tests to world-testing.

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* add postgres world to all workbench packages

we try to run them with the postgres world but it's not installed

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* Replace jsonb with cbor because zero byte does not work in jsonb :(

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* fix error handling: attempts start at 0 now, and not 1 like when we released. so initial attempt in postgres should reflect that.

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* drain stuff

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* fallback metadata to metadataJson

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* Make code more readable

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

* apply Vade fix

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>

---------

Signed-off-by: Gal Schlezinger <gal@spitfire.co.il>
2025-11-23 11:05:20 -08:00
Nathan Rajlich 00e334506c [ai] Make DurableAgent#stream() return a messages array (#362)
* Make `DurableAgent#stream()` return a `messages` array

* Docs updates

* Docs updates

* fix

---------

Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
2025-11-23 11:02:53 -08:00
Vercel Release Bot 7a230a9ad1 Version Packages (beta) (#387)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@workflow/world-postgres@4.1.0-beta.13 @workflow/world-testing@4.0.1-beta.20 workflow@4.0.1-beta.19 @workflow/nitro@4.0.1-beta.19 @workflow/next@4.0.1-beta.19 @workflow/cli@4.0.1-beta.19 @workflow/ai@4.0.1-beta.19 @workflow/web-shared@4.0.1-beta.17 @workflow/core@4.0.1-beta.16 @workflow/builders@4.0.1-beta.15 @workflow/world-local@4.0.1-beta.11 @workflow/nuxt@4.0.1-beta.8 workflow@4.0.1-beta.1 @workflow/nitro@4.0.1-beta.1 @workflow/next@4.0.1-beta.1 @workflow/cli@4.0.1-beta.1 @workflow/ai@4.0.1-beta.1 @workflow/sveltekit@4.0.0-beta.13
2025-11-22 07:32:12 -08:00
Pranay Prakash ce50baf96a bring world local back to 4.x 2025-11-22 10:29:36 -05:00
Copilot 34366293a0 Fix streamer bugs and document concurrency limitations in world-local (#391)
* Initial plan

* Fix bugs in world-local: empty chunk handling, type safety, and documentation

Co-authored-by: pranaygp <1797812+pranaygp@users.noreply.github.com>

* Add changeset for world-local bug fixes

Co-authored-by: pranaygp <1797812+pranaygp@users.noreply.github.com>

* Attempt to fix local straming

* fix the actual queue copy problem

* update changeset

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pranaygp <1797812+pranaygp@users.noreply.github.com>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
2025-11-22 07:26:46 -08:00
Peter Wielander 99611405d4 Fix hydration of events with dates and of step functions (#380) 2025-11-21 13:58:02 -05:00
Adrian 73b6c68daf remove suppressUndefinedRejections from base builder (#384) 2025-11-21 06:42:28 -08:00
Sree Narayanan adfa01224a [docs] Minor corrections to local world and express setup docs (#385)
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
2025-11-20 23:57:52 -08:00
Vercel Release Bot 2856d665c0 Version Packages (beta) (#375)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@workflow/world-testing@4.0.1-beta.19 workflow@4.0.1-beta.18 @workflow/nitro@4.0.1-beta.18 @workflow/next@4.0.1-beta.18 @workflow/cli@4.0.1-beta.18 @workflow/builders@4.0.1-beta.14 @workflow/swc-plugin@4.0.1-beta.7 @workflow/nuxt@4.0.1-beta.7 @workflow/world-testing@4.0.1-beta.1 @workflow/sveltekit@4.0.0-beta.12
2025-11-20 14:24:12 -08:00
Copilot 154670ae01 Handle FatalError in DurableAgent tool execution (#376)
* Initial plan

* Fix DurableAgent to handle FatalError in tool calls

Convert FatalError exceptions in tool execution to tool-result errors that get
propagated back to the LLM, mimicking AI SDK behavior. Non-fatal errors are
re-thrown to allow workflow retry mechanisms to handle them.

- Updated executeTool to catch FatalError and convert to error-text tool result
- Added comprehensive tests for error handling scenarios
- All tests passing

Co-authored-by: pranaygp <1797812+pranaygp@users.noreply.github.com>

* Address code review feedback and add changeset

Remove unnecessary type assertion and add changeset for the DurableAgent fix

Co-authored-by: pranaygp <1797812+pranaygp@users.noreply.github.com>

* Update packages/ai/src/agent/durable-agent.ts

* Apply suggestion from @pranaygp

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pranaygp <1797812+pranaygp@users.noreply.github.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
2025-11-20 14:17:48 -08:00
Nathan Rajlich 43a3f797d3 [ai] Fix "start" and "finish" chunk events in DurableAgent (#378)
* [ai] Remove "start" and "finish" chunk events

* Wire through sendStart and sendFinish properly

* changeset

---------

Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
2025-11-20 14:16:21 -08:00
Nathan Rajlich e5c5236363 Fix default export workflow function transformation in workflow mode (#373)
Fixed a bug where default export workflow functions with names (e.g., `export default async function testWorkflow()`) would fail at runtime with `ReferenceError: $$default is not defined`. The SWC plugin now correctly keeps the default export as-is and simply adds the workflowId assignment after it, since the function name is available as a binding in the module scope.

Also adds support for anonymous and arrow function default exports, which previously were not being transformed at all.

Fixes #367.
2025-11-20 12:26:12 -08:00
Nathan Rajlich 1e636e170d [ai] Make writable property be required in DurableAgent#stream() (#365) 2025-11-20 00:19:35 -08:00
Adrian 4b4f93b662 docs: fix framework cards (#372)
* docs: fix framework cards

* docs: fix tanstack start logo light mode

* remove h1 on vite
2025-11-19 17:16:54 -08:00
Adrian 00066be07b feat: add express support (#138)
* refactor: migrate to latest nitro v3

Signed-off-by:  Pooya Parsa <pooya@pi0.io>

* update workaround

* fix(nitro): nitro builder using deprecated srcDir

* fix: testing matrix dirs

* fix(hono): externalize nitro workflow output dir

* chore: format

* fix(nitro): externalize .nitro/workflow folder

* docs(hono): update getting started

* update docs and workbench

* improve plugin patch

* docs: preserve code style

* update `getWorkflowDirs`

* test: fix hono dev config

* fix: wrong api file path in hono dev config

* fix(nitro): check all dirs for builder

* chore: add comments

* add express workbench testing app

* docs: add express wip page

* add workflows symlink for express workbench

* add hook and trigger routes for express workbench

* update server entrypoint to use hook and trigger router

* remove h3 and add express types

* docs: add express getting started guide

* test: wire up express workbench

* Update workbench/express/routes/hook.routes.ts

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* Update workbench/express/routes/trigger.routes.ts

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* build: missing deps in workbench express

* build: remove express as dev dep

* lockfile

* build: remove test command from express workbench

* fix: url query parsing

* chore: add README

* remove app hook and trigger routers

* .

* fix: json body not getting parsed in workbench express

* fix: writing streams in workbench

* fix: wrong stream piping express workbench

* update

* fix: json parsing body workbench express

* update

* fix: add js file extension for relative import on workflow express workbench

* test

* refactor: route naming conventions for nitro

* refactore: convert to catch all api on express

* Update workbench/express/package.json

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* refactor: api file convention

* testing presets

* refactor: use simple `index.ts`

* update

* switch entry format to node

* add generate workflow script to express

* fix: express nitro config

* docs(express): update express getting started

* test: add express

* fix(express): workbench api routes

* fix(express): add workflowsDir to testing matrix

* format

* update gitignore

* fix

* .

* trigger ci

* update workflows dir

* fix: streaming in express

* fix: not json parsing body express

* fix: missing dev test in express

* fix: test matrix for express

* docs(express): update getting started and add rollup dep

* .

* docs: add express card to home page and getting started

* Update docs/content/docs/getting-started/express.mdx

Co-authored-by: Pooya Parsa <pooya@pi0.io>

* docs: fix express

* remove h1 on express

---------

Signed-off-by: Pooya Parsa <pooya@pi0.io>
Co-authored-by: Pooya Parsa <pooya@pi0.io>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2025-11-19 17:12:53 -08:00
Hayden Bleasel 250edc1d52 Update vite.mdx (#371) 2025-11-19 16:25:21 -08:00
Hayden Bleasel c0991b4ff7 Update docs (#349)
* Initial migration

* Remove ExperimentalPackageCallout

* Remove Callout imports

* Add missing dep

* Update postgres-world.mdx

* Add missing deps, remove unused files

* Restore homepage css

* Update logo, fix homepage

* Update run-anywhere.tsx

* Remove duplicate h1 tags

* Fix package install commands

* Update global.css

* Update code-block.tsx

* Fix framework descriptions

* Remove unused files

* Fix steps

* Update sidebar.tsx

* Remove excess horizontal rules

* Remove unused components

* Cleanup home code-block component

* Update route.ts

* Add missing feed dep

* Rename middleware to proxy

* Update next config

* Update route.tsx

* Move generateDefinition call into tsx

* Update page.tsx

* Update sidebar.tsx

* Update layout.tsx

* Remove unused files

* Fix nav

* Update route.ts

* Remove deprecated lint:links

* Load fonts locally

* Update layout.tsx

* Update route.ts

* Update Geistdocs

* Update hero.tsx

* Update search.tsx

* Update search.tsx

* docs: update url structure in chat tools example

* chore: replace gpt-5 reasoning with gpt-5.1

* docs: update instructions for llm to be more workflow-centric

* Revert "docs: update instructions for llm to be more workflow-centric"

This reverts commit 3852820988.

* Update pnpm-lock.yaml

* Update home-layout.tsx

* Update layout.tsx

* Update pnpm-workspace.yaml

---------

Co-authored-by: Adrian Lam <me@adriandlam.com>
2025-11-19 16:17:21 -08:00
Adrian 6a063a3e5f docs: add vite getting started (#285)
* refactor: migrate to latest nitro v3

Signed-off-by:  Pooya Parsa <pooya@pi0.io>

* update workaround

* fix(nitro): nitro builder using deprecated srcDir

* fix: add back nitro config

* fix: testing matrix dirs

* fix(hono): externalize nitro workflow output dir

* chore: format

* fix(nitro): externalize .nitro/workflow folder

* docs(hono): update getting started

* update docs and workbench

* improve plugin patch

* test: fix hono dev config

* fix: wrong api file path in hono dev config

* fix(nitro): check all dirs for builder

* chore: add comments

* refactor: migrate to latest nitro v3

Signed-off-by:  Pooya Parsa <pooya@pi0.io>

* docs: update home page frameworks

* update getting started stuff and add vite page

* docs: update vite getting started page

* Update docs/app/(home)/components/frameworks.tsx

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* Update docs/content/docs/getting-started/index.mdx

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* Apply suggestion from @adriandlam

* Update docs/app/(home)/components/frameworks.tsx

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* lockfile

* lockfile

* docs: update vite getting started guide

* format

* format

* format

* reset packages/nitro/src/index.ts

* docs: fix vite getting started

* docs: fix vite getting started api route

* revert

---------

Signed-off-by: Pooya Parsa <pooya@pi0.io>
Co-authored-by: Pooya Parsa <pooya@pi0.io>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2025-11-19 15:18:50 -08:00
Vercel Release Bot 29892a0f93 Version Packages (beta) (#369) @workflow/world-local@5.0.0-beta.10 @workflow/world-postgres@4.1.0-beta.12 @workflow/world-testing@4.0.1-beta.18 workflow@4.0.1-beta.17 @workflow/nitro@4.0.1-beta.17 @workflow/next@4.0.1-beta.17 @workflow/cli@4.0.1-beta.17 @workflow/ai@4.0.1-beta.17 @workflow/web-shared@4.0.1-beta.16 @workflow/core@4.0.1-beta.15 @workflow/builders@4.0.1-beta.13 @workflow/world-vercel@4.0.1-beta.10 @workflow/nuxt@4.0.1-beta.6 @workflow/sveltekit@4.0.0-beta.11 2025-11-19 11:15:09 -08:00
Nathan Rajlich 3d99d6d38d Update @vercel/oidc and @vercel/queue to fix expired OIDC token edge case (#368) 2025-11-19 11:13:15 -08:00