Commit Graph

951 Commits

Author SHA1 Message Date
workflow-devkit-release-bot[bot] dd139dfe76 Version Packages (#1789) workflow@4.2.4 2026-04-16 17:10:05 -07:00
Peter Wielander 7be05b9253 Revert #1766 (Use stream control frame for transparent reconnection) (#1788) 2026-04-16 17:05:11 -07:00
Peter Wielander 47aa68534f [docs] Restore minimal Next.js placeholder on stable (#1786) 2026-04-16 16:45:24 -07:00
workflow-devkit-release-bot[bot] 2a7ead058a Version Packages (#1726)
Co-authored-by: workflow-devkit-release-bot[bot] <workflow-devkit-release-bot[bot]@users.noreply.github.com>
workflow@4.2.3
2026-04-16 22:41:58 +00:00
Peter Wielander 2ece7ba25f [core] [world] Fix community world E2E tests broken by specVersion bump (#1658)
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
2026-04-16 22:15:34 +00:00
Nathan Rajlich 7aab36b329 fix false-positive unconsumed event in hook loop replay (#1778)
Signed-off-by: Nathan Rajlich <n@n8.io>
2026-04-16 22:08:14 +00:00
Nathan Rajlich 543216060b Remove docs app from stable branch, keep docs/content/ for npm releases (#1771)
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.
2026-04-16 13:13:09 -07:00
Peter Wielander 3737caab09 [backport] [world-vercel] Use stream control frame for transparent reconnection (#1766) 2026-04-16 12:33:51 -07:00
Peter Wielander 41dd333216 [ci] Run e2e tests on stable
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
2026-04-16 12:32:09 -07:00
workflow-devkit-release-bot[bot] c556da32d7 Backport: Disable minification for web (#1768) (#1776) 2026-04-16 11:21:51 -07:00
Tom Dale 6f48e9e778 fix(packaging): embed source content in sourcemaps (#1769)
Enable TypeScript inlineSources in the shared package tsconfig so published @workflow packages ship self-contained JavaScript sourcemaps. This fixes Vite and Vitest warnings in downstream repos when sourcemaps point at ../src/*.ts paths that are not published.
2026-04-16 07:21:17 +00:00
workflow-devkit-release-bot[bot] fdac33cda6 Move swc-playground-wasm into workbench/swc-playground (#1704) (#1772)
* move swc-playground-wasm into workbench/swc-playground

Move the Rust/WASM source from packages/swc-playground-wasm into
workbench/swc-playground/wasm/ so it is no longer built as part of
the packages/* turbo filter in CI. The WASM build now runs as part
of the playground's own prebuild/dev scripts, avoiding Rust toolchain
failures in unrelated CI jobs.

* fix: ensure default rustup toolchain in wasm build

The Vercel build environment has rustup installed but no default
toolchain configured. Add a check for this and install stable
if needed. Also check for VERCEL env var in addition to CI.

* fix: ensure cargo bin dir is in PATH on Vercel

After cargo install wasm-pack, the binary lives in $CARGO_HOME/bin
which may not be in PATH on the Vercel build environment. Always
add the cargo bin directory to PATH after ensuring the toolchain.

Co-authored-by: Nathan Rajlich <n@n8.io>
2026-04-16 00:02:25 -07:00
Peter Wielander 5bc419179e [world-local] Backport: enable cross-process streaming via filesystem polling (#1765) 2026-04-15 21:36:28 -07:00
Peter Wielander fb3c118850 [core] Re-try runtime replays that exceed deadline up to three times (#1740) (#1758) 2026-04-15 16:25:49 -07:00
Nathan Rajlich c47caa26f3 Fix web/web-shared version drift by marking them as fixed in changesets (#1729)
@workflow/web-shared is a devDependency of @workflow/web because it is
bundled into web's build output. This means changesets does not bump
web's version when only web-shared has changes, causing version drift.

Adding both packages to a fixed group ensures they always receive the
same version bump. See https://github.com/changesets/changesets/issues/944
2026-04-14 18:50:35 +00:00
Seena Z 3aad64dbe9 [ai] Avoid crashing on malformed streamed tool-call input (#1707) 2026-04-14 11:13:32 -07:00
workflow-devkit-release-bot[bot] b833e7f3f5 Version Packages (#1724)
Co-authored-by: workflow-devkit-release-bot[bot] <workflow-devkit-release-bot[bot]@users.noreply.github.com>
2026-04-14 10:53:04 -07:00
Karthik Kalyan 1c70bfa0f2 [web-shared] Enable in-line decryption for data inspector in detail panel (#1722)
* decryption flow for detail panel data inspector

* decryption flow for detail panel data inspector

* update spinner
2026-04-14 16:17:09 +00:00
workflow-devkit-release-bot[bot] 7b045f0945 Version Packages (#1720)
Co-authored-by: workflow-devkit-release-bot[bot] <workflow-devkit-release-bot[bot]@users.noreply.github.com>
workflow@4.2.2
2026-04-13 19:19:08 -07:00
Karthik Kalyan f1cc68f76a [web][web-shared][core] Make encrypted markers clickable and detect encryption before span selection (#1716)
* Make encrypted markers clickable to trigger decryption and detect encryption at run level before span selection

* Make encrypted markers clickable to trigger decryption and detect encryption at run level before span selection

* Make encrypted markers clickable to trigger decryption and detect encryption at run level before span selection

* Make encrypted markers clickable to trigger decryption and detect encryption at run level before span selection

* Make encrypted markers clickable to trigger decryption and detect encryption at run level before span selection
2026-04-14 01:27:16 +00:00
workflow-devkit-release-bot[bot] aed6ad262a Version Packages (#1657)
Co-authored-by: workflow-devkit-release-bot[bot] <workflow-devkit-release-bot[bot]@users.noreply.github.com>
workflow@4.2.1
2026-04-10 18:51:41 -07:00
Karthik Kalyan d210a5986f [web-shared]: fix event payload loading (e.g. step_created) (#1685)
* Fix event loading issue for step_created event

* Update tired-spiders-rhyme.md

Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>

* add isSystem to attribute panel

* remove isSystem

* remove hardcoding event data ref fields

* fix stale closure

---------

Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>
2026-04-10 21:52:18 +00:00
Nathan Rajlich f5fb9b7a8f fix(core): remove redundant hc_ prefix from health check correlationId (#1678)
The correlationId was generated as hc_${generateId()}, but
generateHealthCheckRunId() already adds wrun_hc_, producing
wrun_hc_hc_... Similarly, getHealthCheckStreamName() adds
__health_check__, making the hc_ prefix in correlationId redundant.
2026-04-10 07:52:13 +00:00
Gregor Martynus 7faedb7967 fix(ai): preserve provider tool identity across step boundaries (#1663)
* fix(ai): preserve provider tool identity across step boundaries

Port of vercel/ai#14229. Provider tools (e.g. anthropic.tools.webSearch)
were converted to plain function tools in toolsToModelTools, stripping
type, id, and args fields. This caused providers like Anthropic Gateway
to not recognize them as provider-executed tools.

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

* DCO Remediation Commit for Gregor Martynus <39992+gr2m@users.noreply.github.com>

I, Gregor Martynus <39992+gr2m@users.noreply.github.com>, hereby add my Signed-off-by to this commit: b1930b307d

Signed-off-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>

---------

Signed-off-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 16:25:04 +00:00
Nathan Rajlich f8badf51a7 Remove redundant npm dist-tag management step from release workflow (#1651)
Changesets already handles dist-tags correctly:
- On main: pre-release mode publishes with the 'beta' tag
- On stable: GA publishes default to the 'latest' tag
2026-04-08 20:22:30 +00:00
Nathan Rajlich 4416146a81 fix: workflow/next ESM compatibility for .mjs config files (#1653)
Use named export instead of `export =` in the CJS shim so that
Node.js cjs-module-lexer can detect withWorkflow as a named export,
enabling `import { withWorkflow } from 'workflow/next'` in ESM.
2026-04-08 11:25:21 -07:00
workflow-devkit-release-bot[bot] 4e435e0332 Version Packages (#1621) workflow@4.2.0 2026-04-07 16:53:33 -07:00
Nathan Rajlich 1ef83dcc08 [builders] Fix Node.js builtin imports being relativized in step bundles (#1644) 2026-04-07 13:36:54 -07:00
Peter Wielander 8890b33b9b [release] Changeset for stable release 2026-04-07 13:07:09 -07:00
Peter Wielander 24a041fa14 Remove remaining changeset files for clean GA release (#1638) workflow@4.2.0-beta.77 2026-04-07 12:01:07 -07:00
Peter Wielander 71599cfbe6 Remove old changeset files to fix release timeout (#1636) 2026-04-07 11:50:17 -07:00
Peter Wielander 10413755a2 Clear consumed changesets from pre.json to fix release timeout (#1623) 2026-04-07 11:27:07 -07:00
Peter Wielander f0d6a85ddd [cli] [core] Probe deployment specVersion before CLI start (#1629) 2026-04-07 11:18:42 -07:00
Peter Wielander e8527e02ec [core] Propagate stream cancellation to avoid leaking listeners (#1618) 2026-04-07 11:18:42 -07:00
Peter Wielander 06c265c416 [ai] Fixes DurableAgent telemetry missing AI SDK-compatible span attributes (#1608) 2026-04-07 11:18:42 -07:00
John Lindquist 5b6d0779c0 docs: March docs audit and alignment (#1466)
* docs: clarify Next monorepo setup

Prevent confusion when Next.js apps live below the repository root and workflow code imports sibling workspace packages.

This documents the output tracing root requirement at the point where users configure withWorkflow, so monorepo setups follow the same working patterns as the shipped Next.js integration instead of failing due to unresolved workspace imports.

Ploop-Iter: 1

* ploop: iteration 2 checkpoint

Automated checkpoint commit.

Ploop-Iter: 2

* ploop: iteration 3 checkpoint

Automated checkpoint commit.

Ploop-Iter: 3

* docs: audit recent documentation coverage

Capture recent workflow documentation updates so the public docs and package guidance stay aligned with the implementation and current docs-typecheck behavior.

Ploop-Iter: 1

* docs: align docs-typecheck docs

Document the current docs verification contract so contributors do not assume JavaScript examples are type-checked when only TypeScript snippets are enforced today.

Add regression coverage around the README language and framework integration guidance to keep those docs aligned with the implemented Next.js and docs-typecheck behavior as future changes land.

Ploop-Iter: 2

* docs: add start() troubleshooting guidance

Document the most common causes of the invalid workflow function error so users can resolve start() failures from the API docs and Next.js setup flow without having to infer build-time requirements from runtime behavior.

Keep the new troubleshooting page aligned with the shipped runtime message and add regression coverage so future wording or cross-link changes do not silently break that guidance.

Ploop-Iter: 3

* docs: align NestJS setup docs

Document both supported NestJS module formats and add a regression check so the getting-started guide stays aligned with the package README as the integration evolves.

Ploop-Iter: 1

* docs: tighten NestJS CommonJS guidance

Keep the NestJS getting-started guide consistent across the ESM and CommonJS paths so readers do not mix module settings or import styles mid-setup.

Strengthen the docs regression coverage around the later guide sections so future edits are more likely to preserve the supported CommonJS path documented in the package README.

Ploop-Iter: 2

* docs: align docs with recent workflow guidance

Document the recently added troubleshooting and observability patterns so the public docs stay aligned with the behavior users now encounter in practice.

This keeps the NestJS guide, workflow API reference, and docs regression coverage in sync with the runtime-facing guidance from recent changes.

Ploop-Iter: 3

* docs: audit docs coverage

Why: keep the docs aligned with recent API and runtime behavior changes so examples and reference pages don’t drift from the supported surface.

Ploop-Iter: 1

* test: add docs audit guards

Add regression coverage for doc surfaces that are easy to drift from implementation so docs audits catch mismatches early and keep published guidance aligned with the supported API surface.

Ploop-Iter: 2

* docs: add docs audit guards

Keep new observability and server-testing guidance anchored to machine-readable interfaces so follow-up implementation changes do not silently drift away from the documented agent and automation patterns.

Ploop-Iter: 3

* docs: align observability troubleshooting guidance

Keep the docs consistent so users get the same guidance when debugging hook token collisions and correlating workflow events with platform logs.

This prevents the event-sourcing reference from drifting away from the observability and error docs, and adds guard tests to catch regressions.

Ploop-Iter: 1

* Remove the unreferenced image file img-a-clean-minimal-technical-architecture-d-2026-02-27T14-07-52-1.png from the repo root, workbench/fastify/public/index.html (a Nitro example mistakenly placed in the fastify workbench by a ploop checkpoint), all .claude/worktrees/* submodule references, and all 15 string-presence audit guard tests in packages/docs-typecheck/src/__tests__/ (they only assert keyword presence, not semantic correctness). None of these belong in the docs audit PR.

* Address all PR #1466 review feedback from VaguelySerious, pranaygp, and ijjk:

1. Remove the "Machine-Readable Surfaces" section from docs/content/docs/observability/index.mdx (reviewers say it's unnecessary and already in world docs)
2. Remove all @skip-typecheck annotations from durable-agent.mdx (8) and server-based.mdx (1) — types exist in built packages/ai/dist after pnpm build
3. In durable-agent.mdx, change "machine-readable tool activity" to "tool call details" in the stream() return description
4. In durable-agent.mdx "Aborting Long-Running Streams" section, add a warning callout that abortSignal is not yet supported (blocked by #1301), recommend timeout instead
5. In event-sourcing.mdx, update requestId description: "On Vercel, requestId is the platform request ID when available. Other worlds are not expected to provide a requestId."
6. In get-world.mdx, change "user-friendly names from the machine-readable workflowName field" to "human-readable names from the workflowName field"
7. In start-invalid-workflow-function.mdx, add "// Does NOT work" comment above the bad example line
8. In with-workflow.mdx: reframe outputFileTracingRoot as a workaround (Next.js auto-detects by default per ijjk); change options description from "control local development behavior" to "configure the Next.js integration"; scope the callout to "workflows.local options only affect local development"
9. Drop the withWorkflow() options callout from docs/content/docs/getting-started/next.mdx
10. Remove the Next.js-specific outputFileTracingRoot callout from framework-integrations.mdx
11. Add a Troubleshooting section with the start() invalid-workflow-function error to all 9 non-Next getting-started guides (astro, express, fastify, hono, nestjs, nitro, nuxt, sveltekit, vite), each with framework-appropriate config check in point 2

* docs: absorb unique accuracy fixes from PR #1200

Cherry-picked 6 still-needed fixes from #1200 that aren't covered by
this audit PR or #1516:
- Fix npx workflow description (observability)
- Remove fetch from restricted modules list (errors)
- Fix package name @workflow-worlds/postgres → @workflow/world-postgres (deploying)
- Fix stream wording (foundations/starting-workflows)
- Fix import path simple → simple-streaming (foundations/streaming)
- Add close(), getEncryptionKeyForRun(), writeToStreamMulti() to World interface,
  update create() and streamer signatures (deploying/building-a-world)

* docs: address review feedback on March docs audit

- durable-agent.mdx: "structured tool activity" → "tool call information"
  per VaguelySerious's suggestion
- next.mdx: drop monorepo callout from getting-started per pranaygp
  (too much context too early; info is in withWorkflow API ref)

* docs: fix 2 typecheck failures in encryption and nestjs guides

- encryption.mdx: add skip-typecheck for interface signature block
  (getEncryptionKeyForRun overloads are not runnable code)
- nestjs.mdx: add skip-typecheck for WorkflowModule.forRoot config
  snippet (fragment inside callout, full import shown above)

Verified: pnpm vitest run passes 300/300 in docs-typecheck.
2026-04-07 11:18:42 -07:00
John Lindquist 35a288485b fix(next): remove unused dataDir option from withWorkflow() (#1619)
The `dataDir` option was accepted in the type definition but never
read — `WORKFLOW_LOCAL_DATA_DIR` was unconditionally set to
`.next/workflow-data`. Remove the dead option to avoid confusion.
2026-04-07 11:18:42 -07:00
Peter Wielander c81bbc9564 [core] [world] Gate CBOR queue transport on specVersion (#1627) 2026-04-07 11:18:42 -07:00
Matan Kushner b193447fe1 [builders] Resolve path aliases when externalizing non-step imports (#1613) 2026-04-07 11:18:42 -07:00
Peter Wielander b2914ab143 [world-vercel] Paginate writeToStreamMulti (#1626) 2026-04-07 11:18:42 -07:00
Peter Wielander deef87a40f chore: trigger release workflow
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
2026-04-06 14:22:17 -07:00
Pranay Prakash 125c38708e [changeset] Exit pre-release mode (to release 4.2 stable) (#1508) 2026-04-06 13:52:46 -07:00
Peter Wielander d631152a65 Support dual-branch releases (stable + main) (#1620)
- Add `stable` to release workflow trigger branches
- Make npm dist-tag conditional: `stable` gets `latest`, `main` keeps `beta` (from changeset publish)
- Make GitHub release flags branch-aware: stable = latest + non-prerelease, main = prerelease + not latest
- Change changeset baseBranch to `stable` for this branch
2026-04-06 13:51:53 -07:00
Peter Wielander 7e70d1823a [core] Add configurable stream flush interval per world (#1533) 2026-04-06 12:38:01 -07:00
Peter Wielander c8dce52606 [core] [world] Lazy run creation on start (#1537) 2026-04-06 12:25:23 -07:00
Nathan Rajlich 9d195308c2 fix(ci): use Node 24 for releases and remove npm self-update (#1614) 2026-04-06 09:43:03 -07:00
Nathan Rajlich 2680a427f0 fix: add Request and Response revivers to web and CLI hydration (#1414) 2026-04-06 06:30:36 +00:00
Nathan Rajlich ba916e1566 Add DOMException to VM context and first-class serialization support (#1512)
- Pass DOMException through to the workflow VM context alongside other
  Web APIs (Headers, URL, TextEncoder, etc.)
- Add DOMException reducer/reviver to the serialization pipeline,
  preserving message, name, derived code, and cause when present
- Add DOMException to the Serializable type union
- 8 new tests: round-trip for AbortError, NotFoundError, default name,
  cause preservation, cause absence, serialization key, cross-VM
  boundaries, and VM context availability
2026-04-06 06:10:30 +00:00
workflow-devkit-release-bot[bot] 29fe9ded57 Version Packages (beta) (#1600) 2026-04-03 17:05:54 -07:00
Peter Wielander ab872cc9fb [core] Make registeredSteps a global singleton to protect against module duplication (#1606) 2026-04-03 21:53:58 +00:00