Commit Graph

114 Commits

Author SHA1 Message Date
github-actions[bot] fe333088b7 Version Packages (beta) (#2491)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-17 17:20:44 -07:00
github-actions[bot] f193d6e8ef Version Packages (beta) (#2451)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-17 17:06:19 -07:00
Pranay Prakash 5f0b845211 RFC: compress serialized payload refs — zstd (gzip fallback), specVersion 5 (#2394)
* feat(core,world): gzip-compress serialized payloads behind specVersion 5

Add a composable 'gzip' format prefix layer to the serialization
pipeline (compress before encrypt: encr(gzip(devl))), cutting stored
payload bytes by ~70-87% on real-world-style workloads. Compression is
gated on run specVersion 5 (new SPEC_VERSION_SUPPORTS_COMPRESSION) and
on target-deployment capabilities for cross-deployment writes; payloads
under 1KB or that don't compress meaningfully are stored unchanged.
Reads dispatch on the format prefix so both compressed and uncompressed
data are always readable. WORKFLOW_DISABLE_COMPRESSION=1 disables
writes.

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

* test(core): add CPU/perf compression benchmark + shared workloads

Split the compression benchmark into reproducible size and CPU scripts
sharing deterministic workloads (lib/workloads.mjs). The CPU benchmark
measures serialize/deserialize overhead per payload, total CPU across
thousands of events, and compares gzip levels/brotli/deflate. Documents
how to run the size, CPU, and end-to-end (bench.bench.ts) benchmarks
against local and Vercel in scripts/README.md.

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

* feat(world-vercel): advertise specVersion 5 to enable compression on Vercel

Now that workflow-server declares spec-5 support (vercel/workflow-server#520),
bump the Vercel world's advertised specVersion from 4 to 5 so new Vercel runs
are stamped spec 5 and become eligible for gzip payload compression. Payloads
stay opaque to the server (compression is client-side); spec 5 is a superset of
spec 4, so initial run attributes still work.

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

* feat(core): emit OTel span attributes for compression impact

Track gzip payload compression on both the serialize (write) and
deserialize (read) paths via span attributes:
workflow.serialization.{operation,compressed,uncompressed_bytes,
stored_bytes,compression_ratio}. Sizes are measured at the compression
boundary (pre-encryption), so they reflect compression's effect rather
than the at-rest size.

The compression codec stays pure — compress/decompress optionally
populate a CompressionStats sink, threaded through CodecOptions to the
mode serializers and read by the dehydrate/hydrate wrappers, which set
attributes on the active span. Telemetry failures are swallowed so they
can never break the serialize/deserialize data path.

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

* feat(core,web-shared): prefer zstd compression codec (gzip fallback)

Switch the payload compression codec to zstd, which benchmarks 3–7×
faster than gzip at an equal-or-better ratio on representative workloads
(compression runs at every step boundary, so the write CPU is a per-step
tax). zstd uses node:zlib (>= 22.15); gzip via the portable
CompressionStream remains the fallback when zstd is unavailable, and
WORKFLOW_COMPRESSION_CODEC=gzip forces it. Reads dispatch on the format
prefix, so 'zstd' and 'gzip' payloads are both always decodable.

zstd is Node-only (Web CompressionStream has no zstd), so the browser
o11y read path registers a WASM-backed decoder (@tootallnate/zstd-wasm)
via a new registerZstdDecoder hook; node:zlib handles Node-side reads
(runtime replay, CLI, server o11y). A new workflow.serialization.codec
span attribute reports which codec applied. gzip and zstd read support
co-ship, so the existing specVersion-5 capability gate is unchanged.

Verified end-to-end: spec-5 runs store zstd-prefixed payloads on disk
and replay/complete correctly; the WASM decoder round-trips node:zlib
zstd output. Benchmarks updated to compare zstd vs gzip.

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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-16 23:27:47 +00:00
github-actions[bot] df402c416b Version Packages (beta) (#2428)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-15 13:46:00 -07:00
github-actions[bot] 5711c1e9d6 Version Packages (beta) (#2390) 2026-06-15 14:44:31 +02:00
Mitul Shah 56dcf5f2e1 feat(web-shared): RelativeTimeCard with shared ContextCard provider (#2328)
* feat(web-shared): RelativeTimeCard with shared ContextCard provider

Add a ContextCard provider/trigger and rebuild the timestamp tooltip as a
RelativeTimeCard, giving animated, collision-aware morphing hover cards.
Mount the shared provider in EventListView and AttributePanel.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Match vercel/front timestamp format for run/activity fields

Render absolute Created/Started/Completed (and sibling) timestamps using
date-fns in vercel/front's request/activity format (e.g.
"JUN 10 10:16:02.69 GMT-4") via the shared formatLocalMillisecondTime helper.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(web-shared): register dark-theme/light-theme Tailwind variants

The context-card arrow tip stroke uses `dark-theme:[--context-card-tip-stroke:#252525]`,
but Tailwind v4 has no built-in `dark-theme` variant, so the utility was silently
dropped and the stroke fell back to its light `#DBDBDB` value — rendering as a white
caret in dark mode. Register the `dark-theme`/`light-theme` custom variants in
styles.css (mirroring vercel/front's geistcn tailwind.css, extended to match the
`.dark`/`[data-theme="dark"]` selectors this package and next-themes use).

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(web-shared): match context card shadow to vercel/front

The --ds-shadow-tooltip token was guessed when added standalone, producing
an oversized/heavy drop shadow. Reproduce front's exact resolved value for
both light and dark themes (including the background-border layer).

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(web-shared): bridge context card hover gap to stop flicker

The card is positioned `sideOffset` away from the trigger, leaving a
transparent un-hoverable gap that caused the hover card to flicker
(open → close → open) when moving the cursor onto it. Add a transparent
hover bridge inside the floating wrapper that extends the hover surface
by `sideOffset` to meet the trigger edge, keeping the visual spacing
while making the hover surface continuous.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Revert "fix(web-shared): bridge context card hover gap to stop flicker"

This reverts commit 2b961b1610.

* docs: simplify changeset description

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: remove vercel/front references from comments

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(web-shared): only clear active context card when the active trigger unmounts

The unmount cleanup had an inverted guard: an unmounting inactive trigger
would clear the shared active card, hiding another trigger's card (and an
unmounting active trigger left a stale card). Guard on === id instead.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: remove theme-variant comment

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 23:07:03 +00:00
github-actions[bot] 58ddc62d02 Version Packages (beta) (#2364)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-12 11:13:07 -07:00
Mitul Shah d81b929fa9 Animate in-progress segments in the timeline (#2383)
* Animate in-progress segments in the timeline

Add an animated diagonal "barber-pole" stripe overlay to in-progress
(running/received) segments in the new trace viewer timeline, so it's
obvious at a glance which work is still live.

The animation lives in a colocated CSS module (timeline.module.css),
imported by the component — web-shared is in consumers' transpilePackages,
so the keyframes ship with the component rather than relying on the global
styles.css (which Geist-using hosts don't import).

Also fixes a latent status bug this surfaced: the run-segment builders
collapsed every non-failed run to "running", so completed runs rendered as
"running" (and, with the new animation, kept animating). They now map to a
new terminal `completed` status (blue, static) via a fail-closed
runSegmentStatus helper — only genuinely in-progress runs animate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Create chatty-walls-appear.md

Signed-off-by: Mitul Shah <mitulxshah@gmail.com>

---------

Signed-off-by: Mitul Shah <mitulxshah@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 18:06:40 +00:00
github-actions[bot] 05e46fa3f6 Version Packages (beta) (#2326)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-11 08:22:01 -07:00
github-actions[bot] 73e64bba03 Version Packages (beta) (#2254)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-09 11:03:11 -07:00
github-actions[bot] ff66ee9f2b Version Packages (beta) (#2216)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-04 13:06:39 -07:00
github-actions[bot] 275316fac4 Version Packages (beta) (#2183)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-01 20:49:30 -07:00
github-actions[bot] 3d615fb78d Version Packages (beta) (#2162)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-29 15:01:15 -07:00
github-actions[bot] 7e7d7e61d2 Version Packages (beta) (#2147) 2026-05-29 19:59:27 +02:00
github-actions[bot] 2f19552035 Version Packages (beta) (#2140)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-28 11:19:23 -07:00
github-actions[bot] 8f9656deab Version Packages (beta) (#2026)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-22 09:34:43 +02:00
github-actions[bot] 245d999031 Version Packages (beta) (#1997)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-19 14:30:31 -07:00
github-actions[bot] b885f1f2d1 Version Packages (beta) (#1888)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-11 13:21:13 -07:00
Nathan Rajlich c80b747af8 fix(web-shared): hydrate FatalError/RetryableError and Error subclasses in o11y (#1942)
* fix(web-shared): hydrate FatalError/RetryableError and Error subclasses in o11y

The web o11y reviver set was missing entries for the recently-added
serialization types (FatalError, RetryableError, the built-in Error
subclasses, AggregateError, DOMException), causing devalue.unflatten to
throw "Unknown type X" and the UI to surface "Failed to load resource
details" whenever a step or run failed with one of these error types.

Adds the missing revivers to getWebRevivers() and a regression test that
round-trips real values through the runtime's dehydrateStepError back
through the web reviver set.

* fix(web-shared): address review feedback on error revivers

- Pass `cause` through ErrorOptions to the subclass constructor instead of
  assigning afterwards, matching `getCommonRevivers` in core. This gives
  the resulting `cause` property the same engine-set, non-enumerable
  semantics as a freshly thrown Error in the consumer realm.
- Guard `RetryableError.retryAfter` against missing/undefined values from
  older runtime payloads — without it, `new Date(undefined)` produces an
  Invalid Date rather than the property being absent. Add a defensive
  test that drives the reviver directly with a payload missing the field.
2026-05-05 23:01:50 +00:00
github-actions[bot] eb8562ddda Version Packages (beta) (#1884)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-30 14:25:43 -07:00
github-actions[bot] 8f9ca384ec Version Packages (beta) (#1868) 2026-04-30 13:34:08 -07:00
Mitul Shah 03dfab35e7 Updated Workflow Trace viewer (#1454) 2026-04-30 13:46:54 -04:00
workflow-devkit-release-bot[bot] 5714c2335a Version Packages (beta) (#1711) 2026-04-16 15:34:32 -07:00
workflow-devkit-release-bot[bot] 223e9cacb1 Version Packages (beta) (#1655)
Co-authored-by: workflow-devkit-release-bot[bot] <workflow-devkit-release-bot[bot]@users.noreply.github.com>
2026-04-10 18:52:30 -07:00
workflow-devkit-release-bot[bot] a261b2128b Version Packages (beta) (#1635) 2026-04-07 17:37:59 -07:00
Nathan Rajlich 44a18048a5 Reset package versions to 4.0.0 so changesets produces 5.0.0-beta.0 (#1648)
The previous pre-release versions (4.x.y-beta.N) caused two issues:
- semver.inc('4.0.0-beta.N', 'major') returns 4.0.0, not 5.0.0
- Pre-release numbers carried over (beta.61 -> beta.62 instead of beta.0)

Setting all versions to 4.0.0 (non-pre-release) ensures a clean major
bump to 5.0.0-beta.0. Also removes @workflow/swc-playground-wasm from
the changeset and pre.json since it is a private package.
2026-04-07 14:45:40 -07:00
workflow-devkit-release-bot[bot] 61831cf91e Version Packages (beta) (#1615) 2026-04-07 11:17:00 -07:00
workflow-devkit-release-bot[bot] 29fe9ded57 Version Packages (beta) (#1600) 2026-04-03 17:05:54 -07:00
workflow-devkit-release-bot[bot] 45fd831b1d Version Packages (beta) (#1593) 2026-04-02 21:25:14 +00:00
workflow-devkit-release-bot[bot] 8462c5df89 Version Packages (beta) (#1563) 2026-04-01 16:08:49 -07:00
workflow-devkit-release-bot[bot] 91ba457764 Version Packages (beta) (#1550) 2026-03-30 13:42:22 -07:00
workflow-devkit-release-bot[bot] e11eebf1e5 Version Packages (beta) (#1514) 2026-03-27 11:17:22 -07:00
workflow-devkit-release-bot[bot] a375a3fd85 Version Packages (beta) (#1440)
Co-authored-by: workflow-devkit-release-bot[bot] <workflow-devkit-release-bot[bot]@users.noreply.github.com>
2026-03-24 17:19:33 +00:00
Peter Wielander 01bbe66d5a [world] Add stream pagination and metadata endpoints (#1470) 2026-03-23 17:39:39 -07:00
Pranay Prakash 2ef33d2828 feat: export semantic error types and add API reference docs (#1447)
* feat: export semantic error types and add API reference documentation

Add missing error exports (HookNotFoundError, EntityConflictError,
RunExpiredError, TooEarlyError, ThrottleError, RunNotSupportedError,
WorkflowWorldError) to workflow/internal/errors. Create new error
classes for world-level semantics. Tighten TSDoc comments on all
error classes. Add API reference docs for all error types.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: use @setup declarations, workflow/errors import, and errors/ doc section

- Replace @skip-typecheck with proper `declare` + `// @setup` lines
  so code samples are typechecked but setup lines hidden from readers
- Add `workflow/errors` export to package.json (public API, replaces
  `workflow/internal/errors` in docs)
- Add `workflow/errors` path mapping in docs-typecheck type-checker
- Add HookConflictError to re-export list
- Move all error docs under api-reference/workflow/errors/ subdirectory
- Update all internal cross-references and links

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: move error docs to top-level workflow-errors section

- Move semantic error docs to api-reference/workflow-errors/ (matching
  the workflow/errors import path, like workflow-api for workflow/api)
- Keep FatalError and RetryableError in api-reference/workflow/ since
  they're imported from workflow, not workflow/errors
- Fix all cross-reference links

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: update HTTP debug logger JSDoc to clarify scope

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: make TooEarlyError.retryAfter a number (seconds) matching WorkflowWorldError

TooEarlyError.retryAfter is now seconds (number) instead of a Date,
consistent with ThrottleError and WorkflowWorldError. The conversion
from seconds to Date is done at the consumer site (step-handler) rather
than at construction time.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address review feedback on docs accuracy

- WorkflowWorldError docs: add status, code, url, retryAfter properties
  to TSDoc; clarify that .is() only matches direct instances (not
  subclasses); use instanceof in catch-all example
- TooEarlyError/ThrottleError docs: mark retryAfter as optional (?)
  to match actual type definitions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 00:01:36 +00:00
workflow-devkit-release-bot[bot] 5d196982a2 Version Packages (beta) (#1377)
Co-authored-by: workflow-devkit-release-bot[bot] <workflow-devkit-release-bot[bot]@users.noreply.github.com>
2026-03-18 10:21:57 -07:00
Karthik Kalyan 0e2eb5c775 [web-shared] Fix trace viewer run span segments for v1 events (#1404)
* fix trace viewer for v1 events

* add changeset

* add a test

* add a test for web-shared

* add lock file

* update logic to look for run_created event first
2026-03-16 20:20:05 +00:00
Vercel Release Bot 471cb5d9c6 Version Packages (beta) (#1352)
Co-authored-by: workflow-devkit-release-bot[bot] <workflow-devkit-release-bot[bot]@users.noreply.github.com>
2026-03-12 19:40:59 -07:00
Vercel Release Bot 9c3213926f Version Packages (beta) (#1325)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-11 17:57:07 -07:00
Vercel Release Bot 5f4395de7b Version Packages (beta) (#1306) 2026-03-10 19:25:18 -07:00
Vercel Release Bot 0063180d65 Version Packages (beta) (#1291)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-07 20:33:25 +00:00
Vercel Release Bot 58afeb25c2 Version Packages (beta) (#1284)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-06 13:46:57 -08:00
Vercel Release Bot 596d105323 Version Packages (beta) (#1279) 2026-03-06 00:20:52 +00:00
Vercel Release Bot 597afa5174 Version Packages (beta) (#1250)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-05 13:01:55 -08:00
Vercel Release Bot 09343c1b13 Version Packages (beta) (#1238) 2026-03-03 12:47:33 -08:00
Vercel Release Bot a602fcbf6b Version Packages (beta) (#1215) 2026-02-27 14:20:42 -08:00
Pranay Prakash e55c63678b Update dependencies (#1217)
Bump zod 4.1→4.3, esbuild 0.25→0.27, turbo 2.5→2.8, biome 2.2→2.4,
vitest 3.2→4.0, @vercel/functions 3.1→3.4, @vercel/oidc 3.0→3.2,
@vercel/queue 0.0→0.1, @oclif/core 4.0→4.8, AWS SDK 3.609→3.972.
Fix duplicate workspace name for nitro/nitro-v3 (turbo 2.8 strictness).
Fix vitest 4 constructor mock in world-vercel queue tests.
drizzle-orm 0.44→0.45, drizzle-kit 0.31.6→0.31.9, dotenv 16→17,
postgres 3.4.7→3.4.8, hono 4.9→4.12, @hono/node-server 1.19.5→1.19.9,
enhanced-resolve 5.18→5.19, tinyglobby 0.2.14→0.2.15,
@oclif/plugin-help 6.2.31→6.2.37, semver 7.7.3→7.7.4,
watchpack 2.4→2.5, @nuxt/kit 4.2→4.3, @nuxt/schema 4.2→4.3,
exsolve 1.0.7→1.0.8, shiki 3.13→4.0, streamdown 1.6→2.3,
lucide-react 0.469→0.575, tailwind-merge 2.5→3.5,
react-virtuoso 4.12→4.18, @xyflow/react 12.9→12.10,
@react-router/* 7.13.0→7.13.1, @testcontainers/postgresql 11.7→11.12,
lint-staged 16.1→16.2, @changesets/cli 2.29.5→2.29.8

Co-authored-by: Peter Wielander <mittgfu@gmail.com>
2026-02-27 18:49:49 +00:00
Vercel Release Bot 6930e3c763 Version Packages (beta) (#1154)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-26 17:38:07 -08:00
Vercel Release Bot be3c555ad8 Version Packages (beta) (#1153) 2026-02-20 16:22:14 -08:00
Vercel Release Bot 339c44fe1a Version Packages (beta) (#1131) 2026-02-20 15:17:31 -08:00