Commit Graph

174 Commits

Author SHA1 Message Date
Peter Wielander 50f50f44d7 NestJS framework support (#840) 2026-01-26 13:31:22 -08:00
Vercel Release Bot cd7c03d45d Version Packages (beta) (#819)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-22 14:12:34 -08:00
Vercel Release Bot 3856ce8c20 Version Packages (beta) (#807)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-20 18:37:54 -08:00
Vercel Release Bot 96d17286b1 Version Packages (beta) (#791) 2026-01-16 11:06:05 +01:00
Vercel Release Bot ac7aa33cd2 Version Packages (beta) (#782) 2026-01-15 18:17:40 +01:00
Vercel Release Bot 4bd877b474 Version Packages (beta) (#778) 2026-01-14 13:25:24 +01:00
Nathan Rajlich 7906429541 Add support for serializing this when invoking step functions (#754)
Added support for serializing `this` context when invoking step functions.

### What changed?

- Modified the step function implementation to capture and serialize the `this` context when it's defined and not the global object
- Updated the step invocation queue item interface to include an optional `thisVal` property
- Enhanced the step handler to apply the hydrated `thisVal` when executing step functions

### Why make this change?

This enhancement allows step functions to be invoked with an explicit context object using standard JavaScript methods like `.call()` and `.apply()`. This is particularly useful for step functions that need to access properties from a specific context, enabling more flexible and idiomatic JavaScript patterns within workflows.
2026-01-14 00:07:29 -08:00
Vercel Release Bot 101585cce0 Version Packages (beta) (#758)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-13 14:10:19 -08:00
Nathan Rajlich 61fdb41e1b Add queue-based health check (#743)
* feat: add queue-based health check to bypass Deployment Protection

- Add HealthCheckPayloadSchema and HEALTH_CHECK_STREAM_PREFIX to @workflow/world
- Add healthCheck() method to Queue interface
- Update workflow and step handlers to detect and respond to health check messages
- Implement healthCheck() in world-local, world-vercel, and world-postgres

The queue-based health check sends a message through the queue pipeline,
which bypasses Vercel's Deployment Protection. The handler writes a response
to a stream that the caller reads to confirm health.

This complements the existing HTTP-based ?__health approach which still works
for local development and when bypass headers are available.

* refactor: move healthCheck to core package as utility function

Instead of adding healthCheck to the World interface (which duplicated
the same implementation across all worlds), this is now a utility function
in @workflow/core that takes the World as a parameter.

Usage:
  import { healthCheck } from '@workflow/core';
  const result = await healthCheck(world, 'workflow');

This is cleaner because:
- Single implementation instead of 3 identical ones
- World implementations remain simple
- No changes needed to the World interface

* .

* refactor: move health check types from world to core

Health check types (HealthCheckPayloadSchema, HealthCheckResult, etc.)
are now defined in @workflow/core since that's where they're used.

The HealthCheckPayloadSchema is still part of QueuePayloadSchema in
world (so the queue accepts health check messages), but it's not
exported from the public API.

* .

* Refactor health check implementation based on code review feedback (#746)

* Initial plan

* Address PR review comments: export types, fix race condition, improve error handling

Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>

* Add queue-based health check test and document security considerations

Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>

* Replace 'any' type with proper type guards for health check response

Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>

* Extract health check queue names as constants and improve type guards

Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>

* .

* Fix e2e test

* .

* .

* .

* fix(ai): preserve providerMetadata as providerOptions in multi-turn tool calls (#733)

When tool calls are added to the conversation history, map providerMetadata
to providerOptions following the AI SDK convention. This fixes Gemini thinking
models that require thoughtSignature to be preserved across multi-turn tool calls,
preventing the error 'function call is missing a thought_signature'.

Fixes #727

* Local ui cli flag (#744)

* [web] Increase contrast on attribute items in sidebar (#736)

Signed-off-by: Peter Wielander <mittgfu@gmail.com>

* [world] Remove pause and resume events, actions and states (#751)

* Version Packages (beta) (#735)

* .

* .

* Update turbo inputs to include shared config (#752)

* Update turbo inputs to include shared config

* Apply suggestions from code review

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

---------

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

* feat(web): add self-hosted mode for world configuration (#747)

* feat(web): add self-hosted mode for world configuration

When WORKFLOW_TARGET_WORLD env var is set, the web UI operates in
self-hosted mode where the world configuration is locked to server-side
environment variables and cannot be changed via query params or UI.

- Add getHardcodedConfig server action to detect self-hosted mode
- Modify getWorldFromEnv to use server env vars in hardcoded mode
- Create WorldConfigContext to provide config state app-wide
- Update settings sidebar to show locked state with disabled inputs
- Update connection status to show PostgreSQL backend info
- Mask sensitive values (postgres URL) in hardcoded mode UI

* fix: address PR review feedback

- Remove unused ConfigMode type export
- Fix postgres substring to undefined (tooltip has details)
- Extract buildEnvMapFromProcessEnv helper to reduce duplication
- Remove unused EnvMap import from layout-client
- Import HardcodedConfig from web-shared/server instead of re-defining

* Fix: PostgreSQL URL parameter missing from configParsers, causing loss of postgres URL configuration on page reload in dynamic mode

* fix(cli): clear WORKFLOW_TARGET_WORLD when spawning web server

The CLI sets WORKFLOW_TARGET_WORLD as an env var, which the spawned
Next.js server inherits. This caused the web UI to enter self-hosted
mode even when launched via CLI.

Now we explicitly clear WORKFLOW_TARGET_WORLD from the server's
environment so it starts in dynamic mode where config comes from
query params as intended.

* refactor(web): use server-side env vars for world config

BREAKING CHANGE: The web UI no longer supports configuring the world
backend via URL query parameters. Configuration is now read exclusively
from server-side environment variables.

Changes:
- Remove query param parsing from @workflow/web config.ts
- Add ServerConfig interface with non-sensitive display info
- Update all components to use useServerConfig() hook
- Settings sidebar is now read-only
- CLI passes env vars to spawned web server instead of query params
- Server actions use process.env directly (envMap param reserved for future use)

This simplifies the architecture and improves security by never sending
sensitive data (connection strings, auth tokens) to the client.

* fix(web): fix settings sidebar overflow and shorten data dir path

- Add truncate/overflow handling to settings sidebar config values
- Add shortenPath() helper to abbreviate long file paths:
  - Replaces home directory with ~
  - Shows .../last-two-segments if still too long
- Add title attributes for full path on hover

* Update changeest

---------

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

* Version Packages (beta) (#755)

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

* Update packages/world/src/queue.ts

Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>

* [web] Tidy wake-up and re-enqueue buttons (#737)


---------

Signed-off-by: Peter Wielander <mittgfu@gmail.com>

* [cli] Use dotenv to resolve .env and .env.local files on startup (#765)

* Use temporary workflow-server deployment URL

* feat: add queue-based health check to bypass Deployment Protection

- Add HealthCheckPayloadSchema and HEALTH_CHECK_STREAM_PREFIX to @workflow/world
- Add healthCheck() method to Queue interface
- Update workflow and step handlers to detect and respond to health check messages
- Implement healthCheck() in world-local, world-vercel, and world-postgres

The queue-based health check sends a message through the queue pipeline,
which bypasses Vercel's Deployment Protection. The handler writes a response
to a stream that the caller reads to confirm health.

This complements the existing HTTP-based ?__health approach which still works
for local development and when bypass headers are available.

* refactor: move healthCheck to core package as utility function

Instead of adding healthCheck to the World interface (which duplicated
the same implementation across all worlds), this is now a utility function
in @workflow/core that takes the World as a parameter.

Usage:
  import { healthCheck } from '@workflow/core';
  const result = await healthCheck(world, 'workflow');

This is cleaner because:
- Single implementation instead of 3 identical ones
- World implementations remain simple
- No changes needed to the World interface

* .

* refactor: move health check types from world to core

Health check types (HealthCheckPayloadSchema, HealthCheckResult, etc.)
are now defined in @workflow/core since that's where they're used.

The HealthCheckPayloadSchema is still part of QueuePayloadSchema in
world (so the queue accepts health check messages), but it's not
exported from the public API.

* .

* Refactor health check implementation based on code review feedback (#746)

* Initial plan

* Address PR review comments: export types, fix race condition, improve error handling

Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>

* Add queue-based health check test and document security considerations

Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>

* Replace 'any' type with proper type guards for health check response

Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>

* Extract health check queue names as constants and improve type guards

Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>

* .

* Fix e2e test

* .

* .

* .

* .

* .

* Update packages/world/src/queue.ts

Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>

* Use temporary workflow-server deployment URL

* .

* .

---------

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TooTallNate <71256+TooTallNate@users.noreply.github.com>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Vercel Release Bot <88769842+vercel-release-bot@users.noreply.github.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-12 14:57:10 -08:00
Vercel Release Bot 69da6a2d72 Version Packages (beta) (#755)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-08 18:50:19 -08:00
Vercel Release Bot 073e26a372 Version Packages (beta) (#735) 2026-01-08 19:32:27 +01:00
Vercel Release Bot a0045ac607 Version Packages (beta) (#723) 2026-01-06 18:07:45 -08:00
JJ Kasper 01f59a3b96 Reland sourcemap fix for workflow package (#729) 2026-01-06 10:20:06 -08:00
Vercel Release Bot 6660e578bb Version Packages (beta) (#719) 2026-01-03 10:27:22 +01:00
Vercel Release Bot 6d7e5035a4 Version Packages (beta) (#711) 2025-12-31 10:17:49 -08:00
JJ Kasper 307f4b0e41 Revert "Add lazy workflow and step discovery in Next.js (#640)" (#712) 2025-12-31 09:37:56 -08:00
Vercel Release Bot b49bb4eb54 Version Packages (beta) (#707) 2025-12-30 11:01:55 +01:00
Vercel Release Bot 62cde6dd8d Version Packages (beta) (#696) 2025-12-28 18:07:16 +01:00
Vercel Release Bot e6b1bef5bb Version Packages (beta) (#693) 2025-12-27 12:40:09 -08:00
Vercel Release Bot 96a4d3a2fd Version Packages (beta) (#676)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-24 09:51:14 -08:00
JJ Kasper 8ba8b6be6b Revert extra stdlib re-export (#683) 2025-12-23 12:04:47 -06:00
JJ Kasper ea3afce222 Add lazy workflow and step discovery in Next.js (#640) 2025-12-22 23:16:17 -06:00
Vercel Release Bot 560dda3014 Version Packages (beta) (#660) 2025-12-20 10:58:29 +01:00
Vercel Release Bot bd3385ff6d Version Packages (beta) (#652)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-19 15:41:36 -08:00
Vercel Release Bot b4132d0895 Version Packages (beta) (#635) 2025-12-18 20:07:06 +01:00
Vercel Release Bot fc6a32d6dc Version Packages (beta) (#607) 2025-12-16 21:05:18 +01:00
Daniel Erickson 795c0f38e7 Update README.md (#601) 2025-12-12 23:44:26 -08:00
Vercel Release Bot 5f61987a58 Version Packages (beta) (#605) 2025-12-12 19:16:54 -08:00
Vercel Release Bot 7018f490e6 Version Packages (beta) (#589)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-12 18:11:25 -08:00
Vercel Release Bot 76795b0cd0 Version Packages (beta) (#561) 2025-12-09 09:26:51 -08:00
Vercel Release Bot 6194ded51b Version Packages (beta) (#533) 2025-12-05 15:24:04 -08:00
Vercel Release Bot 60e3a423b7 Version Packages (beta) (#530)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-04 11:30:44 -08:00
Vercel Release Bot 1ea0826fad Version Packages (beta) (#517)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-03 15:50:12 -08:00
Vercel Release Bot 4b79bee16c Version Packages (beta) (#513)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-03 12:07:57 -08:00
Vercel Release Bot 00b12be415 Version Packages (beta) (#499) 2025-12-02 13:01:12 -08:00
Vercel Release Bot 9916f2a4a6 Version Packages (beta) (#447)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-02 10:12:48 -08:00
Adrian 1ac5592452 feat: add astro support (#347) 2025-12-02 09:11:46 -08:00
Vercel Release Bot 87ad24b3b6 Version Packages (beta) (#416) 2025-11-26 19:55:04 -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
Vercel Release Bot 018c5a053e Version Packages (beta) (#410) 2025-11-24 15:22:23 -08:00
Vercel Release Bot e5c0380bbd Version Packages (beta) (#396) 2025-11-24 14:25:39 -08:00
Vercel Release Bot 7a230a9ad1 Version Packages (beta) (#387)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-22 07:32:12 -08:00
Vercel Release Bot 2856d665c0 Version Packages (beta) (#375)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-20 14:24:12 -08:00
Vercel Release Bot 29892a0f93 Version Packages (beta) (#369) 2025-11-19 11:15:09 -08:00
Vercel Release Bot 70fb4ebc9d Version Packages (beta) (#357)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-19 08:51:25 -08:00
Vercel Release Bot f1b734129a Version Packages (beta) (#354) 2025-11-17 14:19:24 -08:00
vercel[bot] 510c55ba1d Update grammar in workflow docs (#334)
Improved grammar in the workflow documentation as requested.

## Files Modified:

### Core Documentation Files:
- `README.md` - Main repository README
- `docs/content/docs/foundations/index.mdx` - Foundations overview
- `docs/content/docs/foundations/workflows-and-steps.mdx` - Core concepts documentation
- `docs/content/docs/foundations/starting-workflows.mdx` - Workflow startup guide
- `docs/content/docs/foundations/control-flow-patterns.mdx` - Control flow documentation
- `docs/content/docs/foundations/errors-and-retries.mdx` - Error handling guide
- `docs/content/docs/foundations/hooks.mdx` - Hooks and webhooks documentation

### Getting Started Guides:
- `docs/content/docs/getting-started/next.mdx` - Next.js integration guide
- `docs/content/docs/getting-started/hono.mdx` - Hono integration guide

### API Reference:
- `docs/content/docs/api-reference/workflow/sleep.mdx` - Sleep function documentation

### Deployment Documentation:
- `docs/content/docs/deploying/index.mdx` - Deployment guide

## Types of Grammar Issues Fixed:

1. **Articles and Determiners**:
   - Added missing articles ("a", "an", "the") where appropriate
   - Fixed article usage consistency

2. **Verb Forms and Tenses**:
   - Corrected "has passed" → "passes" for better flow
   - Fixed "needs" → "need" for proper subject-verb agreement
   - Changed "will go a long way in helping" → "will go a long way toward helping"

3. **Comma Usage**:
   - Added missing commas in compound sentences
   - Fixed comma placement before "and" in complex sentences
   - Added commas after introductory clauses

4. **Word Choice and Clarity**:
   - Changed "really simple" → "simple" for more professional tone  
   - Fixed "setup" → "set up" (verb form vs noun form)
   - Changed "newly made" → "newly created" for better precision
   - Improved "the external system" → "external systems" for consistency
   - Fixed "propagate the error over to" → "propagate the error to"

5. **Sentence Structure**:
   - Combined fragmented sentences for better flow
   - Fixed run-on sentences by adding proper punctuation
   - Improved parallel structure in lists and descriptions

6. **Punctuation and Formatting**:
   - Changed "Learn more:" → "Learn more": for consistency
   - Fixed em-dash usage (- → —) where appropriate
   - Added backticks around code terms like `start()` for consistency

7. **Pronoun and Reference Clarity**:
   - Fixed unclear pronoun references
   - Made subject-verb agreements consistent
   - Improved clarity of "them" and "it" references

## Implementation Approach:

- Systematically reviewed key documentation files
- Applied consistent grammar rules across all files
- Maintained the existing technical tone and style
- Preserved all code examples and technical accuracy
- Focused on readability improvements without changing meaning

The grammar improvements make the documentation more professional and easier to read while maintaining all technical accuracy and existing functionality.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
2025-11-16 11:46:16 -08:00
Vercel Release Bot c78bec37b0 Version Packages (beta) (#308)
Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-16 00:31:36 -08:00
vercel[bot] 6419962496 Fix grammar errors in documentation (#320)
* Fix grammar errors in documentation

Fixed grammar errors in the documentation as requested.

## Changes Made

**Modified Files:**
- `CLAUDE.md` - Fixed 3 grammar errors:
  - "propogate" → "propagate" 
  - "changeset" → "changesets" (added missing plural)
  - "amke chagnesets" → "make changesets"
  - Added missing closing quote for "**BREAKING CHANGE**"

- `docs/content/docs/foundations/index.mdx` - Fixed 2 grammar errors:
  - "real world" → "real-world" (hyphenated compound adjective)
  - "go a long way in using workflows" → "go a long way in helping you use workflows effectively" (improved clarity and grammar)

- `docs/content/docs/foundations/workflows-and-steps.mdx` - Fixed 2 grammar errors:
  - "resume to workflow" → "resume the workflow" 
  - "each time, using" → "each time using" (removed unnecessary comma)
  - "workflows are run in" → "workflows run in" (improved verb form)

- `docs/content/docs/foundations/errors-and-retries.mdx` - Fixed 3 grammar errors:
  - Missing space: "RetryableError`](/docs...)and" → "RetryableError`](/docs...) and"
  - "we've learnt" → "we've learned" (consistent American English)
  - "Rolling back failed steps" → "Rolling Back Failed Steps" (proper title case)

- `packages/workflow/README.md` - Fixed 1 grammar error:
  - "engineers are" → "engineers are:" (added missing colon before list)

## Summary

Total of 11 grammar errors fixed across 5 documentation files. The fixes include:
- Spelling corrections (propogate → propagate, learnt → learned)
- Punctuation improvements (missing spaces, colons, quotes)
- Grammatical improvements (verb forms, compound adjectives)
- Style consistency (American English, title case)

All changes maintain the original meaning and formatting while improving readability and professional presentation of the documentation.

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

* Changeset

---------

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
2025-11-12 17:35:57 -08:00
JJ Kasper b97b6bfaba Lock all dependencies in our packages (#318)
* Lock all dependencies in our packages

* fix type

* add savePrefix config

* add changeset
2025-11-12 14:26:01 -08:00