Commit Graph

12 Commits

Author SHA1 Message Date
Nathan Rajlich 5040263bf9 Merge CLAUDE.md into AGENTS.md and symlink CLAUDE.md (#1326)
* Merge CLAUDE.md into AGENTS.md and symlink CLAUDE.md

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nathan Rajlich <n@n8.io>

---------

Signed-off-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-11 12:56:25 -07:00
Pranay Prakash 14863bf622 fix(workflow): improve runtime API stub error message and fix SKILL.md streaming docs (#1077)
* fix(workflow): improve error message for runtime API usage in workflow context and fix SKILL.md streaming docs

The workflow stub error now tells users to move calls to a step function or outside the workflow context. Also corrects the SKILL.md streaming section which incorrectly stated getWritable() only works in steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: add changeset

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(skill): address PR feedback on SKILL.md

- Remove `npx workflow start` from debugging section (args can't easily be passed via CLI)
- Mention --json and --help flags for CLI inspection
- Add reminder to check AI docs for DurableAgent details

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(skill): fix SKILL.md debugging section CLI commands

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* other improvements

* fix(skill): address Copilot PR feedback on streaming examples

- Add missing imports and define all referenced variables
- Wrap writer.releaseLock() in finally blocks for safety
- Remove undefined `data`/`agent`/`messages` references
- Simplify examples to be self-contained and copy-pasteable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore(skill): bump SKILL.md version to 1.1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add skill version bump rule to CLAUDE.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: John Lindquist <johnlindquist@gmail.com>
2026-02-19 15:17:04 -08:00
Pranay Prakash 1b78efa7cb Add documentation for common patterns and architecture notes (#875)
- Document fixed versioning for workflow and @workflow/core
- Add genversion pattern for build-time version injection
- Add turbo caching guidance for generated files
- Document executionContext field flexibility
- Document observability data hydration behavior

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 17:56:56 -08:00
Pranay Prakash 7701b58480 claude settings 2026-01-05 20:35:09 -08:00
Pranay Prakash 5dd15452cd Test and benchmark community worlds against e2e tests (#482)
* Add new github workflow

* Enable pull_request trigger for community worlds workflow

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Add community worlds manifest and generation scripts

- Add community-worlds.json manifest as single source of truth
- Add scripts/generate-community-worlds-workflow.mjs to generate CI workflow
- Add scripts/generate-community-worlds-docs.mjs to generate docs section
- Update aggregate-benchmarks.js to load community worlds dynamically
- Add pnpm generate:community-worlds script
- Update docs/deploying/world/index.mdx with community worlds

The manifest-based approach allows:
- E2E tests to be auto-generated from the manifest
- Benchmark aggregation to include community worlds
- Docs to stay in sync with tested worlds

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix YAML syntax error - quote strings starting with @

The @ symbol has special meaning in YAML, so package names like
@workflow-worlds/turso need to be quoted.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix Redis health-cmd quoting, remove unpublished starter world

- Quote health-cmd when it contains spaces (fixes Docker arg parsing)
- Remove @workflow-worlds/starter as it's not published to npm

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Add benchmarks and summary job for community worlds

- Add build job to share artifacts between benchmark jobs
- Add benchmark jobs for Turso, MongoDB, and Redis worlds
- Update summary job to show both E2E and benchmark status matrix
- Add left border/indent to sidebar child items for visual hierarchy
- Update workflow generator to support benchmark generation

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Reuse build artifacts for E2E tests

E2E jobs now depend on the shared build job and download
artifacts instead of rebuilding packages from scratch.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Add Worlds Ecosystem dashboard to docs

- Create worlds-manifest.json with official and community worlds
- Add aggregate-worlds-data.mjs script for processing E2E and benchmark results
- Create WorldsDashboard, WorldCard, and BenchmarkChart components
- Add /docs/worlds page showing compatibility status and performance
- Include sample data for development

The dashboard shows:
- E2E test progress per world (pass/fail/skip counts)
- Benchmark performance comparison across all worlds
- Filter by official vs community worlds

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix CI to output JSON test results and add Jazz world

- Update workflow generator to output JSON test results from vitest
- Upload E2E results as artifacts for parsing in summary job
- Summary job now shows actual pass/fail/skip counts per world
- Add Jazz world to worlds-manifest.json (requires external credentials)
- Add update-worlds-status.yml workflow to auto-update dashboard data
- Update TypeScript types to support null lastRun and metrics

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Refactor community worlds to use reusable workflows

Instead of a generated workflow file, integrate community world testing
directly into tests.yml and benchmarks.yml using reusable workflows.

- Add reusable workflows for E2E tests: e2e-community-world.yml (no services),
  e2e-community-world-mongodb.yml, e2e-community-world-redis.yml
- Add reusable workflows for benchmarks: benchmark-community-world.yml,
  benchmark-community-world-mongodb.yml, benchmark-community-world-redis.yml
- Update tests.yml to call reusable workflows for Turso, MongoDB, Redis
- Update benchmarks.yml to include community world benchmarks in summary
- Delete generated community-worlds.yml and generator script

This approach:
- Inherits proper Rust/SWC setup from the main workflows
- Keeps all CI in the established patterns
- Makes adding new community worlds straightforward

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix benchmark timing file naming for community worlds

Add WORKFLOW_BENCH_BACKEND env var support to bench.bench.ts so community
world benchmarks generate timing files with the correct backend suffix
(e.g., bench-timings-nextjs-turbopack-turso.json instead of -local.json).

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Add @workflow-worlds/starter to community worlds test matrix

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Unify worlds manifest and add dynamic GitHub API fetching

- Merge community-worlds.json into worlds-manifest.json with type field
- Add server-side data fetching from GitHub API for worlds dashboard
- Remove static worlds-status.json, fetch CI artifacts dynamically
- Update all references to use unified manifest format
- Remove obsolete community-worlds.yml and update-worlds-status.yml workflows

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Skip community worlds for non-nextjs-turbopack in benchmark summary

Community worlds only run against nextjs-turbopack, so hide the
"missing" rows for Express and Nitro frameworks in the benchmark
comparison tables.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix stream benchmark detection to check for actual TTFB data

The previous check `!== null` incorrectly returned true for undefined,
causing all benchmarks to show TTFB columns. Now explicitly checks
for a number type.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Hide Worlds Ecosystem page from sidebar

The page is still accessible via direct link at /docs/worlds but
won't appear in the navigation until it's been further iterated on.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix review comments: trailing newline and division by zero

- Add trailing newline when replacing Community Worlds section in docs
- Fix division by zero in WorldCard benchmark calculation when metrics is empty

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Consolidate community world workflows with service-type parameter

- Create setup-workflow-dev composite action for common setup steps
- Add service-type input to benchmark-community-world.yml and e2e-community-world.yml
- Use conditional job execution (if: inputs.service-type == 'mongodb') to handle different services
- Update benchmarks.yml and tests.yml to pass service-type parameter
- Delete redundant workflow files:
  - benchmark-community-world-mongodb.yml
  - benchmark-community-world-redis.yml
  - e2e-community-world-mongodb.yml
  - e2e-community-world-redis.yml

Reduces workflow files from 11 to 7 and eliminates ~500 lines of duplicated YAML.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Generate community world test matrix from worlds-manifest.json

Replace hardcoded community world jobs with dynamic matrix generation using
scripts/create-community-worlds-matrix.mjs. This allows adding/removing
community worlds by editing the manifest instead of multiple workflow files.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Apply suggestion from @vercel[bot]

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

* Add Samples column and separate local/production benchmarks

- Add Samples column to all benchmark tables showing iteration count
- Separate benchmark results into Local Development and Production sections
- Add explanatory context for each section (localhost vs Vercel deployment)
- Add GitHub action step summaries to e2e community world tests
- Create aggregate-e2e-results.js script for parsing vitest JSON output

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove obsolete generate-community-worlds-docs script

The Worlds Ecosystem page now fetches from worlds-manifest.json at runtime,
making this script unnecessary. The npm script also referenced a non-existent
workflow generator script.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Maximize composite action usage and reorganize benchmark output

- Update setup-workflow-dev composite action with optional Rust, install-dependencies, and install-args inputs
- Update tests.yml to use composite action in unit, e2e-vercel-prod, getTestMatrix, e2e-local-*, and getCommunityWorldsMatrix jobs
- Update benchmarks.yml to use composite action in build, benchmark-local, benchmark-postgres, benchmark-vercel, and getCommunityWorldsMatrix jobs
- Reorganize benchmark output to group by benchmark test with local/production tables within each benchmark
- Remove invalid $schema reference from worlds-manifest.json

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Add beads stealth mode stuff (for personal claude memory - will remove stealth if people want)

* Add E2E test results PR comment summary

- Add pr-comment-start job to create/update PR comment when tests start
- Add artifact uploads to all e2e test jobs (vercel-prod, local-dev, local-prod, local-postgres, windows)
- Update e2e-community-world.yml with consistent artifact naming (e2e-community-*)
- Add summary job to aggregate all e2e results and update PR comment
- Extend aggregate-e2e-results.js with --mode aggregate for multi-job PR summary
- Group results by category (Vercel Production, Local Development, etc.)

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Add step summaries to all e2e test jobs

Add "Generate E2E summary" step to each individual e2e job:
- e2e-vercel-prod
- e2e-local-dev
- e2e-local-prod
- e2e-local-postgres
- e2e-windows

Each job now outputs pass/fail/skip counts to GITHUB_STEP_SUMMARY.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Consolidate community world workflows to single job

Replace 3 mutually exclusive jobs (e2e/e2e-mongodb/e2e-redis) with a single
job that starts services via docker run when needed. This eliminates the
skipped job entries that appear in the GitHub Actions UI.

- Use conditional docker run steps instead of services: block
- Add health check loops to wait for service readiness
- Add cleanup step to stop containers

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix extractWorldId to handle community world artifact naming

Add handling for `e2e-results-community-{world}` pattern so community
world test results are properly extracted (e.g., `e2e-results-community-turso`
now correctly extracts `turso` instead of `community-turso`).

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

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2025-12-02 15:12:44 -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
Pranay Prakash 00b0bb9346 Proper error stack propogating (#280)
* Proper stacktrace propogation in world

Proper stacktrace propogation in world

* Merge Reconciliation

* Standardize the error type in the world spec

* Deduplicate vercel world utils

* fix undefined type issue

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-11-11 15:34:04 -08:00
Copilot 8208b5320b Fix Sourcemap Tracking (#256)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-11-09 12:08:48 -08:00
Nathan Rajlich de04cea3dc Finish renaming "embedded" world to "local" in docs (#269)
Signed-off-by: Nathan Rajlich <n@n8.io>
2025-11-07 23:30:47 -08:00
Pranay Prakash 70be894ad1 Make sleep() a core runtime function (#40)
* Handle the sleep not completing at the end of the event log

* Handle multiple timers being created in the same suspension

* Better `buildWorkflowSuspensionMessage()`

* New sleep unit tests

---------

Co-authored-by: Nathan Rajlich <n@n8.io>
2025-10-30 15:31:25 -07:00
Nathan Rajlich c2292a1606 s/Workflow SDK/Workflow DevKit 2025-10-28 22:50:47 -07:00
Gal Schlezinger 4ca9a3edbd Introducing Workflow DevKit
build durable, resilient, and observable workflows.

Co-authored-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: Adrian <me@adriandlam.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Vercel Release Bot <88769842+vercel-release-bot@users.noreply.github.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
Co-authored-by: Gal Schlezinger <gal@spitfire.co.il>
Co-authored-by: Manuel Muñoz Solera <mamuso@mamuso.net>
Co-authored-by: Garrett <garrett.tolbert@vercel.com>
Co-authored-by: Lars Grammel <lars.grammel@gmail.com>
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
Co-authored-by: Tom Dale <tom@tomdale.net>
Co-authored-by: Vishal Yathish <135551666+visyat@users.noreply.github.com>
Co-authored-by: josh <144584931+dancer@users.noreply.github.com>
2025-10-23 12:07:52 +03:00