The docs Next.js app is deployed only from main. Remove the app code
(components, layouts, configs, styles) from stable to eliminate
cherry-pick conflicts during backports. Keep docs/content/ which
contains the markdown files that are bundled into npm packages via
prepack scripts for AI agent consumption.
convertToModelMessages is async but was not being awaited, so a Promise
was passed to streamText instead of the resolved ModelMessage array.
This caused Zod validation to fail on every chat request with:
"Invalid prompt: The messages do not match the ModelMessage[] schema."
* swc-playground: add resizable panels, collapsible outputs, vim mode toggle, and clean up deps
- Add resizable split between input editor and output panels using react-resizable-panels
- Add collapsible accordion-style output views (workflow/step/client) with chevron toggles
- Add vim keybindings toggle (persisted to localStorage) using monaco-vim
- Add shadcn Switch and Resizable UI components
- Remove unused individual @radix-ui/react-* packages in favor of unified radix-ui package
- Remove unused bulk shadcn init dependencies (recharts, sonner, vaul, zod, cmdk, etc.)
* Address PR review: fix vim mode race condition, mount timing, and add aria attributes
- Add cancellation flag to async monaco-vim import to prevent stale callbacks
- Add .catch() for import failure handling
- Track editor mount state so vim mode initializes when persisted as enabled
- Add aria-expanded and aria-controls to collapsible output panel toggle buttons
* Add Fluid compute warning callout to Vercel World docs
Follow-up from #1216 review feedback to include the
FluidComputeCallout on the Vercel World page.
* Register FluidComputeCallout in worlds/[id] page
The /worlds/vercel route uses a separate page component from
/docs/... and was missing the FluidComputeCallout in its MDX
component map, causing a 500 error.
* [docs] Split the Worlds page into sections
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
* Wording
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
* Update text
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
* remove benchmark numbers
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
---------
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
* Bring back sitemap
* Bring back sitemap
* Add pre commit hooks for sitemap
* Add pre commit hooks for sitemap
* Fix failing queue test
* Revert queue test failure
* Add unit tests
* Fix benchmark history continuity across metric name rename
The concurrent step benchmarks were renamed in beta.53 (dropping the
"stress test: " prefix), which broke the history API's exact-name lookup
against older gh-pages data. Add legacy alias fallbacks so charts show
continuous history across the rename boundary.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Paginate GitHub API calls and use generic legacy name fallback
Three fixes:
- Paginate gh-pages commits (was fetching 100 of 216, missing most history)
- Paginate tags (workflow@ tags were cut off beyond page 1)
- Paginate main branch commits for commits mode
- Replace hardcoded LEGACY_METRIC_ALIASES with generic "stress test: "
prefix fallback
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Cache benchmark history with unstable_cache and aggressive CDN TTLs
The snapshot map (200+ GitHub API fetches) is now cached via
unstable_cache for 1 hour, shared across all parameter combinations.
Tags are cached separately. Individual fetch calls use force-cache
with long revalidation periods since historical data is immutable.
CDN cache bumped from 5min to 1h with 24h stale-while-revalidate,
matching how infrequently benchmark data changes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* changeset
Signed-off-by: voyager14 <21mh124@queensu.ca>
* refactor OG image generation into shared utility
Signed-off-by: voyager14 <21mh124@queensu.ca>
* fix og image height mismatch
Signed-off-by: voyager14 <21mh124@queensu.ca>
* fix: add missing getPageImage and include OG assets in Vercel output
Signed-off-by: voyager14 <21mh124@queensu.ca>
* exclude og in middleware
Signed-off-by: voyager14 <21mh124@queensu.ca>
* fix(docs): wire up OpenGraph images for docs pages
Complete the OG image integration that was started in PR #858:
- Add openGraph.images metadata to docs page generateMetadata using
the getPageImage helper from source.ts
- Add metadataBase to the root layout so Next.js can resolve OG URLs
- Remove unused generatePageMetadata helper from docs-page.tsx
This ensures docs pages like /docs/how-it-works/event-sourcing have
proper OpenGraph images when shared on social media.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
* fix(docs): use dynamic OG image for homepage
The static opengraph-image.png at the app root wasn't being served
because all routes are under [lang]/. Next.js OG images need to be
in the same route segment as the page they apply to.
- Create dynamic opengraph-image.tsx in [lang]/(home)/ using the
shared createOgImage utility
- Remove the unused static opengraph-image.png from app root
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(docs): use dynamic metadataBase for preview deployments
The metadataBase was hardcoded to useworkflow.dev, which caused
preview deployments to generate OG image URLs pointing to production
instead of the preview URL.
Now uses:
- Production: https://useworkflow.dev
- Preview: https://${VERCEL_URL}
- Local dev: http://localhost:3000
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(docs): address PR review comments for OG images
- Fix semibold font weight from 500 to 600 (semibold is weight 600)
- Extract OG_IMAGE_SIZE constant to lib/og/index.tsx for consistency
- Use shared constant in all opengraph-image.tsx files
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(docs): match OG image styling to production design
- Fix title styling: "Workflow:" in white, rest in grey (#888888)
- Remove description from homepage OG image
- Adjust positioning and font size to match expected design
- Reduce text width to prevent overflow
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(docs): add display flex for Satori multi-child divs
Satori requires explicit display: flex on divs with multiple children.
Added flex flex-wrap to the title div containing the two spans.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(docs): simplify OG image layout with stacked title
Use separate divs for "Workflow:" and title instead of trying to
inline them with flex-wrap, which was causing layout issues in Satori.
- "Workflow:" on first line in white
- Title on second line in grey
- Reduced font size slightly to prevent overflow
- Properly stacked with flex-col layout
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(docs): correct OG image positioning below background Workflow: text
The background.png already contains "Workflow:" text, so we only need
to render the dynamic title positioned below it.
- Remove hardcoded "Workflow:" from JSX (it's in the background image)
- Adjust top positioning to 290px to place title below background text
- Restore textWrap: balance for proper text flow
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(docs): align OG title with background Workflow: text
Position and size title to match background image's Workflow: text,
using non-breaking spaces for horizontal offset so title flows inline.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(docs): restore debug border on OG image container
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(docs): add homepage OG route and fix positioning
- Add /og route for homepage OG image (avoids i18n middleware conflict)
- Remove broken opengraph-image.tsx that conflicted with middleware
- Add explicit openGraph metadata to homepage
- Restore debug border for positioning
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(docs): add OG routes for worlds pages
- Add /og/worlds route for worlds listing page
- Add /og/worlds/[id] route for individual world pages
- Remove broken opengraph-image.tsx that conflicted with i18n middleware
- Add explicit openGraph metadata to worlds pages
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(docs): remove badge from worlds OG images
Badge was causing layout issues with title positioning.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* docs: add descriptions to AI, foundations, how-it-works, deploying, and observability pages
Add terse descriptions for OG image rendering to:
- 8 AI docs
- 9 foundations docs
- 4 how-it-works docs
- 5 deploying docs
- 1 observability doc
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* docs: add descriptions to API reference, errors, and remaining getting-started pages
Add terse descriptions for OG image rendering to:
- 23 API reference docs (workflow, workflow/api, @workflow/ai, workflow/next)
- 9 errors docs
- 5 getting-started docs (Astro, Express, Fastify, NestJS, Vite)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Signed-off-by: voyager14 <21mh124@queensu.ca>
Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: voyager14 <21mh124@queensu.ca>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* fix(docs): use true black backgrounds in dark mode and improve sidebar highlight visibility
- Change dark mode background from gray (oklch 0.145) to true black (oklch 0 0 0)
- Adjust card/popover backgrounds from oklch 0.205 to oklch 0.1 for better contrast
- Update secondary/muted/accent backgrounds from oklch 0.269 to oklch 0.15
- Set sidebar background to true black (oklch 0 0 0)
- Increase sidebar-accent from oklch 0.269 to oklch 0.2 for better visibility of highlighted items
- Set sidebar-accent-foreground to pure white (oklch 1 0 0) for maximum contrast
* chore: add empty changeset for docs styling change
Signed-off-by: Cursor Agent <cursoragent@cursor.com>
---------
Signed-off-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* docs: revamp World documentation pages with new structure and design
- Add dedicated world detail pages at /worlds/[id] with MDX-driven content
- Create WorldDetailHero, WorldDetailToc, WorldTestingPerformance components
- Add benchmark history charts and test summary links
- Rewrite local-world, postgres-world, and vercel-world MDX with cleaner structure
- Use h3 headings for configuration options instead of tables/accordions
- Add WorldDataProvider context for passing world data to MDX components
- Add example field to worlds-manifest for linking to example repos
- Update worlds index page design
* fix: update worlds page meta title and description
* feat(docs): improve globe backdrop responsiveness and positioning
- Globe now scales with container width up to 1200px max
- Increased opacity from 20% to 30% for better visibility
- Positioned globe 30% down to show north pole behind header
- Globe component now auto-sizes based on container width
* fix(docs): add light mode support for globe backdrop
* feat: improve world page metadata and add dynamic OG images
- Update title format to '{Name} World | Workflow DevKit'
- Update worlds index page title to 'Worlds | Workflow DevKit'
- Improve world descriptions in worlds-manifest.json for better SEO
- Add dynamic OG image generation at /worlds/[id]/og
- Add openGraph and twitter metadata to world detail pages
* fix: use opengraph-image.tsx file convention for dynamic OG images
- Replace route-based og/route.tsx with opengraph-image.tsx file convention
- Remove runtime = 'edge' to allow generateStaticParams for static generation
- Simplify page.tsx metadata (Next.js auto-detects opengraph-image.tsx)
* docs: improve worlds page UI and restructure deploying section
- Fix globe visibility in light/dark mode
- Fix tooltip positioning on mobile breakpoints
- Remove redundant Documentation button for community worlds
- Add missing pages to Foundations index (streaming, serialization, idempotency)
- Restructure deploying section with new index and building-a-world guide
- Restore original MDX content for official worlds (local, vercel, postgres)
- Auto-expand sidebar folders when child page is active
* docs: simplify worlds page footer sections
* docs: move last updated section under worlds grid
* fix(docs): fix broken links and skip typecheck for interface definitions
- Fix /docs/deploying/world link to /docs/deploying/building-a-world
- Fix /docs/deploying#what-are-worlds invalid anchor to /docs/deploying
- Add @skip-typecheck markers to interface definition code blocks
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(docs): address PR review feedback
- benchmark-history/route.ts: Add error handling for JSON parsing,
distinguish 404s from actual errors
- Globe.tsx: Fix hydration mismatch by deferring theme-dependent
rendering until component is mounted
- sidebar.tsx: Improve path check robustness for active child detection
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* init
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* not using my prototype fastify plugin
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* renamed workbench dir
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* lockfile update
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* removed
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* symlinked workflows dir
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* added readme
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* symlinked client page
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* scope nitro route to allow renderer fallback
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* allow empty json bodies
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* comments
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* improve error handling and cleanup in /api/trigger
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* consistent server replies
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* expect json res
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* fix json res for e2e test 3,4,5,11
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* fix fastify streaming responses
Stream web streams the same way express or hono do. Read the web reader and write each json chunk to reply.raw. Avoids fastifys async iterator quirks that reordered frames and sent undefined data in the output stream tests
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* fix stream responses for e2e tests
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* clearer comments
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* fix streaming res content type. passes all core e2e tests
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* updated dev deps fastify bench
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* fastify logo (light/dark mode)
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* update url
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* fastify docs
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* Apply suggestions from code review
Co-authored-by: Adrian <me@adriandlam.com>
* Update docs/content/docs/getting-started/fastify.mdx
Co-authored-by: Adrian <me@adriandlam.com>
* Update docs/content/docs/getting-started/fastify.mdx
Co-authored-by: Adrian <me@adriandlam.com>
* Update docs/content/docs/getting-started/fastify.mdx
Co-authored-by: Adrian <me@adriandlam.com>
* Update docs/content/docs/getting-started/fastify.mdx
Co-authored-by: Adrian <me@adriandlam.com>
* Update docs/content/docs/getting-started/fastify.mdx
Co-authored-by: Adrian <me@adriandlam.com>
* Update docs/content/docs/getting-started/fastify.mdx
Co-authored-by: Adrian <me@adriandlam.com>
* Update docs/content/docs/getting-started/fastify.mdx
Co-authored-by: Adrian <me@adriandlam.com>
* Sree Narayanan <sreeaadhi07@gmail.com>
DCO Remediation Commit for Sree Narayanan <sreeaadhi07@gmail.com>
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: c3b6cf9bc4
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 3628b82c1e
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 600117f95a
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 9111151b48
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: aceb6a8ceb
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: b93df58edb
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 628718750e
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 7f523e8013
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* Apply suggestions from code review
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
Co-authored-by: Adrian <me@adriandlam.com>
* nit: standardized package.json
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* mom, my commits are in vercel CI
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* Update docs/content/docs/getting-started/fastify.mdx
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
Co-authored-by: Adrian <me@adriandlam.com>
* Update workbench/fastify/package.json
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
* passing workflow error object to err responses
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* Update workbench/fastify/nitro.config.ts
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
Co-authored-by: Adrian <me@adriandlam.com>
* Update workbench/fastify/src/index.ts
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
Co-authored-by: Adrian <me@adriandlam.com>
* feat: add start pg world plugin
* import createReadStream to serve index.html
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* test: add fastify deploy
* fix: add postgres world dep
* use symlink
* chore(deps): remove unused deps from fastify
* docs: update fastify
* Sree Narayanan <sreeaadhi07@gmail.com>
DCO Remediation Commit for Sree Narayanan <sreeaadhi07@gmail.com>
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 54c3e8a50a663c8e9aacf9c95618f59af1bd2e4c
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 423f722209c64382e86f9f8821253dc4facffe96
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: f76061627fe8d320ce498d44d0a3234abb6432ab
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: a269b8aa8d2fcf0b605cce5a1486cac481cca16e
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: b3cedf7defdb7f97b37862bf2a736d41a6bc5ec8
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 596cf21e79bc82a73b56acb9cab1fc33dbfde975
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 0ea1aa7d95e375d1f04e5501254a9fda815c7694
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: dbc8638b4a952c303e35035204cfdca43b99a059
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* remove fromNodeHandler inside fastify app
* debug print to see stream chunks
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* use readfile and resolve for root route
* moving index.html to /public
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* added back symlinked index.html (to copy during prebuildstep)
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* prebuild and postbuild script to copy and remove index.html
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* Sree Narayanan <sreeaadhi07@gmail.com>
DCO Remediation Commit for Sree Narayanan <sreeaadhi07@gmail.com>
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: b78bf227f4
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: e7a456548e
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 37ee9ddaa6
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 72912dc279
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 4ebda5b505
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: ccb690f367
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 6b80913d38
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: c9fb3ebd80
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* docs: remove preset in fastify docs
* move public/index.html symlink
* Revert "move public/index.html symlink"
This reverts commit 081d29fe16e7817912d69f1b3a3bcd3a38000d5a.
* removed stream output chunk debug log
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* Sree Narayanan <sreeaadhi07@gmail.com>
DCO Remediation Commit for Sree Narayanan <sreeaadhi07@gmail.com>
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: df5dfc9849af3cd9e818cd816feec5586137eae7
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 809bacb88461da5e92aec5d31d936222407593b6
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: b270d02ee69ac072eaa4538a31ed110edf852cc2
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: cb73ae5b1f3f7059f4c432b8226f8eb9b0492724
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 2ee3af65040e969b91a491b2bb285cd2ed447e10
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: cab1381b0e08e3453a3e5a66f55d02a8effff0e3
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 9c7471b2fba60079c71951433d9d0649d8399ba3
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 4583452a27c704ba474080d0c560a1b1b9724058
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
* lockfile
* fix
* Sree Narayanan <sreeaadhi07@gmail.com>
DCO Remediation Commit for Sree Narayanan <sreeaadhi07@gmail.com>
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 40af716dca
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 672e756cc1
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 33b9b3e1f4
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 38ca6e24e9
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: b1ada4ae63
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 472c3394fd
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: fd154df028
I, Sree Narayanan <sreeaadhi07@gmail.com>, hereby add my Signed-off-by to this commit: 7f1bebe93d
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
---------
Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
Co-authored-by: Adrian <me@adriandlam.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Changed `RetryableError` to use milliseconds instead of seconds for numeric `retryAfter` values.
### What changed?
- Modified the `RetryableError` class to interpret numeric `retryAfter` values as milliseconds instead of seconds
- Updated documentation and examples to reflect this change
- Added dependency on `@workflow/utils` package to use the `parseDurationToDate` function
- Updated examples in documentation to show proper usage with:
- Duration strings (e.g., "5m", "30s")
- Millisecond values (e.g., 5000 for 5 seconds)
- Date objects
### How to test?
1. Create a workflow that uses `RetryableError` with different `retryAfter` formats:
```typescript
// With milliseconds
throw new RetryableError("Test retry", { retryAfter: 5000 });
// With duration string
throw new RetryableError("Test retry", { retryAfter: "5m" });
// With Date object
throw new RetryableError("Test retry", { retryAfter: new Date(Date.now() + 10000) });
```
2. Verify that the retry behavior correctly respects the specified durations
### Why make this change?
Using milliseconds as the unit for numeric time values is more consistent with JavaScript conventions (like `setTimeout` and other timing functions). This change makes the API more intuitive for JavaScript developers and aligns with standard practices in the ecosystem.
Signed-off-by: Nathan Rajlich <n@n8.io>
- The original code was rewriting in the wrong phase and with the wrong regex for Claude
- I noticed that LLMs need a way to discover other pages efficiently, so I made a sitemap in markdown and linked it from every MD page at the bottom