[vibe-coding-platform] Implement Workflow DevKit#1302
[vibe-coding-platform] Implement Workflow DevKit#1302VaguelySerious wants to merge 15 commits intomainfrom
Conversation
| export enum Models { | ||
| AmazonNovaPro = 'amazon/nova-pro', | ||
| AnthropicClaude4Sonnet = 'anthropic/claude-4-sonnet', | ||
| AnthropicClaude45Haiku = 'anthropic/claude-haiku-4.5', |
There was a problem hiding this comment.
Added Haiku while I was at it
| @@ -1,4 +1,4 @@ | |||
| Use this tool to create a new Vercel Sandbox — an ephemeral, isolated Linux container that serves as your development environment for the current session. This sandbox provides a secure workspace where you can upload files, install dependencies, run commands, start development servers, and preview web apps. Each sandbox is uniquely identified and must be referenced for all subsequent operations (e.g., file generation, command execution, or URL access). | |||
| export default `Use this tool to create a new Vercel Sandbox — an ephemeral, isolated Linux container that serves as your development environment for the current session. This sandbox provides a secure workspace where you can upload files, install dependencies, run commands, start development servers, and preview web apps. Each sandbox is uniquely identified and must be referenced for all subsequent operations (e.g., file generation, command execution, or URL access). | |||
There was a problem hiding this comment.
Markdown files aren't supported by workflow compiler plugin, so we had to rename all of the prompts to typescript files
There was a problem hiding this comment.
🔧 Build Fix:
The repository was missing a .nvmrc file to specify the Node.js version for the build environment. While package.json correctly specifies node: "22.x" in engines, Vercel needs an explicit .nvmrc file to enforce this constraint during the CI build process, otherwise it defaults to the deprecated Node.js 18.x.
View Details
📝 Patch Details
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 00000000..8fdd954d
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+22
\ No newline at end of file
Analysis
Node.js version mismatch causes Vercel build failure
What fails: Vercel build fails with deprecation error because the project requires Node.js 22.x but Vercel defaults to Node.js 18.x
How to reproduce:
# CI environment attempts to run:
pnpm dlx turbo-ignoreResult (before fix):
Node.js Version "18.x" is discontinued and must be upgraded. Please set Node.js Version to 22.x in your Project Settings to use Node.js 22.
Fix: Added .nvmrc file at repository root specifying Node.js version 22, which Vercel respects during builds. The package.json already contained the correct engines requirement, but Vercel needs the .nvmrc file to enforce this constraint during the build process.
There was a problem hiding this comment.
🔧 Build Fix:
Node.js version requirement specified as 22.x which does not meet Vercel's current requirement of 24.x for active LTS support. The project also lacked a .nvmrc file to explicitly communicate the required Node.js version to Vercel during deployment.
View Details
📝 Patch Details
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 00000000..cabf43b5
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+24
\ No newline at end of file
diff --git a/package.json b/package.json
index 14a94f3d..457ab6b5 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,7 @@
"license": "MIT",
"private": true,
"engines": {
- "node": "22.x",
+ "node": "24.x",
"pnpm": "9.13.0"
},
"scripts": {
Analysis
Node.js version 18.x is discontinued on Vercel
What fails: Vercel build initialization fails because Node.js version 18.x (configured in Vercel Project Settings) has been deprecated and removed from Vercel's runtime options.
How to reproduce:
Attempt to deploy this repository to Vercel using a Project Settings configuration that specifies Node.js 18.x. The build will fail at initialization before any build commands execute.
Result:
[ERROR] Error: Node.js Version "18.x" is discontinued and must be upgraded.
Please set Node.js Version to 24.x in your Project Settings to use Node.js 24.
Fix applied:
Created .nvmrc file specifying Node.js 24 and updated package.json engines field to 24.x. This ensures Vercel uses the required active LTS version and allows the build to proceed.
There was a problem hiding this comment.
🔧 Build Fix:
The exports field only specifies the compiled output path (./dist/constants.js) without providing a TypeScript type resolution path. When TypeScript attempts to resolve the @repo/constants module before it's built, it cannot find type declarations. Add a types condition to the exports to enable TypeScript to resolve types from the source files.
View Details
📝 Patch Details
diff --git a/starter/turborepo-with-hono/packages/constants/package.json b/starter/turborepo-with-hono/packages/constants/package.json
index 5e12fb9f..9e86a5dd 100644
--- a/starter/turborepo-with-hono/packages/constants/package.json
+++ b/starter/turborepo-with-hono/packages/constants/package.json
@@ -1,7 +1,10 @@
{
"name": "@repo/constants",
"exports": {
- ".": "./dist/constants.js"
+ ".": {
+ "types": "./src/constants.ts",
+ "default": "./dist/constants.js"
+ }
},
"scripts": {
"build": "tsc"
Analysis
Missing TypeScript type export causes module resolution failure
What fails: TypeScript compiler fails when resolving @repo/constants workspace dependency during build
How to reproduce:
cd starter/turborepo-with-hono
rm -rf packages/constants/dist
cd apps/api
npx tsc --noEmitResult (before fix):
src/index.ts(2,26): error TS2307: Cannot find module '@repo/constants' or its corresponding type declarations.
Root cause: The @repo/constants package.json exports only point to the compiled ./dist/constants.js file, but there are no type export paths defined. When TypeScript tries to resolve the module before the package is built (no dist folder exists), it cannot find type declarations because the exports configuration doesn't include a types condition pointing to the source TypeScript files.
Solution: Add a types export condition that points to the source TypeScript file, allowing TypeScript to resolve types directly from the source during build/type-checking, even before the package is compiled. This allows the build dependency graph to properly handle type resolution in the correct order.
…ment_workflow_devkit
…e-tidy-for-workflows
TBD, superseeds #1287