Skip to content

Conversation

@snomiao
Copy link
Member

@snomiao snomiao commented Oct 26, 2025

Summary

  • Adds Vercel Workflow package (v4.0.1-beta.3) for durable, stateful operations
  • Includes example API route demonstrating workflow and step directives
  • Updates project documentation with workflow setup and usage guidelines

Changes

  • ✨ Install workflow package with CLI tools (workflow / wf)
  • 📝 Add WORKFLOW.md with comprehensive documentation
  • 🔧 Update CLAUDE.md with workflow commands and architecture notes
  • 💡 Add pages/api/workflow-example.ts showing practical implementation

Features

  • Workflow Directive: 'use workflow' for durable functions that can pause/resume
  • Step Directive: 'use step' for stateless functions with automatic retries
  • Sleep Support: Pause workflows without consuming resources
  • Built-in Observability: Monitor workflows through Vercel dashboard

Example Usage

See WORKFLOW.md for detailed documentation and pages/api/workflow-example.ts for a working example.

Test Plan

  • Package installed successfully with bun
  • Example API route created with proper TypeScript types
  • Documentation updated
  • Manual testing of workflow endpoint
  • Deployment to Vercel for production workflow testing

References

🤖 Generated with Claude Code

@vercel
Copy link

vercel bot commented Oct 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
registry-web Ready Ready Preview Comment Nov 4, 2025 11:15pm

snomiao and others added 2 commits October 29, 2025 10:21
- Install workflow package (v4.0.1-beta.3)
- Add example API route demonstrating workflow and step directives
- Update CLAUDE.md with workflow commands and guidelines
- Add comprehensive WORKFLOW.md documentation
- Include usage examples and best practices

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

Co-Authored-By: Claude <[email protected]>
Remove the sleep function usage from the workflow example as it's causing
build failures. The example still demonstrates the 'use workflow' and 'use step'
directives effectively with the remaining code.

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

Co-Authored-By: Claude <[email protected]>
snomiao and others added 2 commits November 4, 2025 23:00
Restore the sleep() function call to demonstrate Vercel Workflow's
ability to pause without consuming resources. This is an important
feature of the workflow system.

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

Co-Authored-By: Claude <[email protected]>
Move the Vercel Workflow example from pages/api to app/api to use
the modern App Router pattern. Update documentation to reflect
the new location.

Changes:
- Create app/api/workflow-example/route.ts using App Router pattern
- Remove pages/api/workflow-example.ts to avoid route conflicts
- Update CLAUDE.md to reference App Router implementation
- Update WORKFLOW.md to reference App Router implementation

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

Co-Authored-By: Claude <[email protected]>
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedworkflow@​4.0.1-beta.3681008495100

View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants