github-actions[bot] a158f81620 fix(core): allow Next.js route groups and dynamic segments in workflow names (#4070) (#4141)
A workflow name is derived from the module path it is defined in, so Next.js
App Router conventions end up in the name verbatim. `SAFE_WORKFLOW_NAME_PATTERN`
permitted alphanumerics, `_`, `-`, `.`, `/` and `@`, but not parentheses or
square brackets. Any workflow inside a route group (`app/(dashboard)/...`) or a
dynamic segment (`app/[teamId]/...`, `app/[...slug]/...`) threw

    Invalid workflow name "workflow//./app/(group)/workflows/": must only
    contain alphanumeric characters, ...

before it could be enqueued, and the generated name cannot be overridden.

The pattern exists to keep unsafe characters out of the queue name it is
interpolated into. These four are inert there: `ValidQueueName` accepts any
suffix after its prefix, and the only other consumers of the name are OpenTelemetry
span names. It is never placed in a URL or a SQL identifier.

Fixes #3991

Signed-off-by: Matias Torsello <23641125+torsello@users.noreply.github.com>
Signed-off-by: Matias Torsello <matiastorsello@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matias Torsello <23641125+torsello@users.noreply.github.com>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
2026-09-12 15:39:34 -07:00
2025-10-23 12:07:52 +03:00
2025-10-23 12:07:52 +03:00
2025-10-23 12:07:52 +03:00
2026-02-05 16:19:16 -08:00
2026-02-11 15:00:52 -08:00
2025-10-23 12:07:52 +03:00
2025-10-23 12:07:52 +03:00
2025-11-29 21:21:49 -08:00

Workflow SDK logo

Workflow SDK

Vercel logo NPM version License Join the community on GitHub

Getting Started

The Workflow SDK lets you easily add durability, reliability, and observability to async JavaScript. Build apps and AI agents that can suspend, resume, and maintain state with ease.

Visit https://useworkflow.dev to view the full documentation.

Community

The Workflow SDK community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects with other people.

Contributing

Contributions to Workflow SDK are welcome and highly appreciated. Please use GitHub issues and discussions to collaborate with the team and wider community.

Author list

Workflow SDK was built by engineers at Vercel and the Open Source Community.

The initial core contributing engineers are:

The Workflow SDK logo was designed by Cecilio Ruiz @ceciliorz


Security

If you believe you have found a security vulnerability in Workflow SDK, we encourage you to responsibly disclose this and not open a public issue.

To participate in our Open Source Software Bug Bounty program, please email responsible.disclosure@vercel.com. We will add you to the program and provide further instructions for submitting your report.

S
Description
workflow: Creates durable, resumable workflows using Vercel's Workflow SDK. Use when building workflows that need to survive restarts, pause for external events, retry…; workflow-init: Install and configure Vercel Workflow SDK before it exists in node_modules. Use when the user asks to "install workflow", "set up workflow", "add durable…
Readme 140 MiB
Languages
TypeScript 88.8%
JavaScript 5.9%
Rust 4%
CSS 0.5%
Python 0.4%
Other 0.3%