Commit Graph

436 Commits

Author SHA1 Message Date
Vercel Release Bot 073e26a372 Version Packages (beta) (#735) workflow@4.0.1-beta.43 2026-01-08 19:32:27 +01:00
Peter Wielander dd3db13d54 [world] Remove pause and resume events, actions and states (#751) 2026-01-08 19:29:17 +01:00
Peter Wielander 0d79ff084c [web] Increase contrast on attribute items in sidebar (#736)
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
2026-01-08 11:01:24 +01:00
Peter Wielander e7de61f8b8 Local ui cli flag (#744) 2026-01-08 11:01:03 +01:00
Pranay Prakash 4b43186eec fix(ai): preserve providerMetadata as providerOptions in multi-turn tool calls (#733)
When tool calls are added to the conversation history, map providerMetadata
to providerOptions following the AI SDK convention. This fixes Gemini thinking
models that require thoughtSignature to be preserved across multi-turn tool calls,
preventing the error 'function call is missing a thought_signature'.

Fixes #727
2026-01-08 10:56:42 +01:00
Nathan Rajlich dc44dab49d Biome config tweaks and fixes applied (#741) 2026-01-07 12:52:52 -08:00
Nathan Rajlich 5e8c6209d0 Add installation instructions for "beads" to AGENTS.md (#742) 2026-01-07 12:47:00 -08:00
Peter Wielander 05ecfbcc11 [cli] Ensure npm pre-release versioning works for post-GA release pre-releases (#722)
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
2026-01-07 13:13:09 +01:00
Pranay Prakash 7268d2f2c3 Fix hasStepSourceMaps to return false for Vercel production builds (#732)
Step sourcemaps don't work in Vercel production deployments.
Previously the function returned true for most frameworks on all
Vercel deployments. Now it correctly returns false for production
builds while preserving the existing behavior for preview builds.
2026-01-06 22:19:20 -08:00
Vercel Release Bot a0045ac607 Version Packages (beta) (#723) workflow@4.0.1-beta.42 2026-01-06 18:07:45 -08:00
Nathan Rajlich 505063cbb9 Special-case "server-only" and "client-only" packages as external (#731) 2026-01-06 18:00:14 -08:00
JJ Kasper 01f59a3b96 Reland sourcemap fix for workflow package (#729) 2026-01-06 10:20:06 -08:00
Hayden Bleasel de3183719c Bump Streamdown (#728)
* Bump Streamdown

* Create clear-drinks-fly.md

* Apply suggestion from @vercel[bot]

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

---------

Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2026-01-06 10:03:33 -08:00
Pranay Prakash 7701b58480 claude settings 2026-01-05 20:35:09 -08:00
Pranay Prakash 797b68748b setup beads 2026-01-05 20:15:56 -08:00
Pranay Prakash 4d6f797274 Fix step stack trace propogation and refactor e2e error tests (#720)
* Refactor e2e tests for errors

* Improve step error tests to check workflow return value

Step error workflows now catch the error and return message/stack,
making assertions cleaner. Tests verify both:
- Workflow return value (caught error message)
- CLI step result (original stack with function names)

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

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

* Add assertion for stack trace in caught step error

With the fix in step.ts that propagates original stack traces,
we can now verify that caught step errors include function names
directly in the workflow return value (not just via CLI).

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

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

* logging

* Fix: When a step handler is re-invoked after max retries are exhausted, the step_failed event doesn't include a stack trace, breaking stack trace propagation for this edge case.

This commit fixes the issue reported at packages/core/src/runtime/step-handler.ts:127-146

## Stack trace loss in step_failed event when max retries are exceeded

**What fails:** Step handler does not include stack property in step_failed event when step is re-invoked after max retries exhausted, causing FatalError in workflow to lose original stack trace

**How to reproduce:**
1. Create a step that always fails with an error that includes a stack trace
2. Exhaust all retry attempts (e.g., maxRetries = 3, so 4 total attempts)
3. The step handler is re-invoked (attempt > maxRetries + 1)
4. This triggers the edge case at lines 127-146 in step-handler.ts
5. A step_failed event is created with fatal: true but without stack property
6. When step.ts processes this event (lines 103-104), the stack remains unset since event.eventData.stack is undefined

**Result:** FatalError created in workflow has default stack (from step.ts) instead of original error stack from step execution

**Expected:** Stack trace should be propagated consistently across all error paths. All other step_failed events with fatal: true include stack property (lines 311-313 and 351-353), but edge case was missing it.

**Root cause:** When step handler is re-invoked after max retries exhausted (attempt > maxRetries + 1), the code creates a step_failed event without including step.error?.stack, which contains the previous error information from the last failed attempt. Other code paths capture this correctly.

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

* add withData

* Enable source maps for step bundles and validate in e2e tests

- Move sourcemap generation from intermediate workflow bundle to steps bundle
- Enhance step error tests to validate function names and source files in stack traces
- Remove isLocalDeployment() checks since source maps now work in dev mode

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

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

* Add changeset for step bundle source maps

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

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

* Add changeset for core package e2e test improvements

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

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

* Enable source maps in CI e2e tests

Add NODE_OPTIONS="--enable-source-maps" to all e2e test jobs to ensure
stack traces show original source file paths.

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

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

* Fix step error source map checks for local prod builds

Add hasStepSourceMaps() helper that correctly identifies when source maps
are expected to work:
- Vercel prod: works (production builds have proper source maps)
- Local dev: works (DEV_TEST_CONFIG is set, uses step bundle with inline source maps)
- Local prod: doesn't work (nitro/bundler output doesn't preserve source maps)

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

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

* Add hasWorkflowSourceMaps() utility for vite-based framework exception

- Add isViteBasedFramework() helper to detect vite, sveltekit, astro apps
- Add hasWorkflowSourceMaps() to check if workflow errors have source maps
  (known issue: vite-based frameworks in local deployments don't preserve them)
- Refactor e2e.test.ts to use the new utility instead of inline check

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

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

* prevent sourcemap checks in nextjs and sveltekit (known offenders)

* improve source maps matrix check

* fix matrix again

* ugh more matrix ignoring

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
2026-01-05 14:12:24 -08:00
Peter Wielander 8bc4e5fe3c Refresh run table on stale re-focus (#717) 2026-01-03 20:56:20 +01:00
Peter Wielander 0da8e54374 [web] Allow selecting and cancelling multiple runs from table view (#716) 2026-01-03 20:56:11 +01:00
Vercel Release Bot 6660e578bb Version Packages (beta) (#719) workflow@4.0.1-beta.41 2026-01-03 10:27:22 +01:00
Pranay Prakash fdc1aa203c Revert "Refactor e2e tests for errors"
This reverts commit 1bab22cd2a.
2026-01-02 19:48:03 -08:00
Pranay Prakash 1bab22cd2a Refactor e2e tests for errors 2026-01-02 19:35:05 -08:00
Malte Ubl 75630fe1d8 Type check all the docs and READMEs (#715)
* Type check all the docs and READMEs

* mdx

DCO Remediation Commit for Malte Ubl <malte.ubl@gmail.com>

I, Malte Ubl <malte.ubl@gmail.com>, hereby add my Signed-off-by to this commit: f61880c883

Signed-off-by: Malte Ubl <malte.ubl@gmail.com>

* mdx2

DCO Remediation Commit for Malte Ubl <malte.ubl@gmail.com>

I, Malte Ubl <malte.ubl@gmail.com>, hereby add my Signed-off-by to this commit: 98dd484f9c38191e17a086965db02df813ec334c

Signed-off-by: Malte Ubl <malte.ubl@gmail.com>

* remove temp AI scripts and fix one docs issue

* Fix code review issue

* add empty changeset

---------

Signed-off-by: Malte Ubl <malte.ubl@gmail.com>
Co-authored-by: Pranay Prakash <pranay.gp@gmail.com>
2026-01-02 13:28:14 -08:00
Nathan Rajlich a531a74009 Revert exporting DurableAgent from the root "@workflow/ai" package (#714) 2026-01-02 12:08:20 -08:00
Nathan Rajlich d552374b13 Resolve @workflow/swc-plugin relative to the "builders" package (#713) 2026-01-02 10:03:55 -08:00
Peter Wielander 1a305bf918 [cli] Print notice on CLI startup when detecting an outdated version (#701) 2026-01-02 17:45:20 +01:00
Vercel Release Bot 6d7e5035a4 Version Packages (beta) (#711) workflow@4.0.1-beta.40 2025-12-31 10:17:49 -08:00
JJ Kasper 307f4b0e41 Revert "Add lazy workflow and step discovery in Next.js (#640)" (#712) 2025-12-31 09:37:56 -08:00
Nathan Rajlich 7ff68d1753 Pass tsconfig to esbuild for support of "paths" aliases (#705) 2025-12-31 01:00:24 -08:00
Nathan Rajlich 9b1640d76e Do not include initial attempt in step function maxRetries count (#703)
Closes #592.
2025-12-31 00:59:50 -08:00
Vercel Release Bot b49bb4eb54 Version Packages (beta) (#707) workflow@4.0.1-beta.39 2025-12-30 11:01:55 +01:00
JJ Kasper 851c0203fe Validate cached workflows/steps and reduce build debounce (#700) 2025-12-30 10:36:35 +01:00
Nathan Rajlich 2dbe49495d Fix race condition in streamer when multiple writes share a promise runId (#704)
ULID generation now happens synchronously before awaiting the runId, ensuring chunks maintain their call order.
2025-12-30 10:35:18 +01:00
Peter Wielander b21d0b35cc [docs] Add PR template for PRs not created through the quick PR feature (#702)
* [docs] Add PR template for OSS contributions

Signed-off-by: Peter Wielander <mittgfu@gmail.com>

* Add line

Signed-off-by: Peter Wielander <mittgfu@gmail.com>

* Empty

Signed-off-by: Peter Wielander <mittgfu@gmail.com>

---------

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
2025-12-29 13:04:37 -06:00
Adrian 4cf671f083 docs: add getWorld (#559)
* docs: add getWorld

* update
2025-12-29 12:48:21 -06:00
Vercel Release Bot 62cde6dd8d Version Packages (beta) (#696) workflow@4.0.1-beta.38 2025-12-28 18:07:16 +01:00
Chris Tate 25bfa52d02 Fix: Handle object-style finishReason for AI SDK v5/v6 compatibility (#695)
---------

Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: Peter Wielander <mittgfu@gmail.com>
2025-12-28 18:00:25 +01:00
Peter Wielander 80955e7212 [cli] [web] Allow opening web UI without config validation, show better UI when runs can't be found (#684) 2025-12-28 17:55:24 +01:00
Peter Wielander f989613d70 [web] Add error boundaries around UI in run detail view (#694)
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
2025-12-28 14:08:11 +01:00
Vercel Release Bot e6b1bef5bb Version Packages (beta) (#693) workflow@4.0.1-beta.37 2025-12-27 12:40:09 -08:00
Karthik Kalyanaraman e3f0390469 Workflows graph extractor (#455)
---------

Signed-off-by: Karthik Kalyanaraman <karthik@scale3labs.com>
2025-12-27 16:52:19 +01:00
Chris Tate b97b87b4fe Add AI SDK v6 support (#692) 2025-12-27 16:24:54 +01:00
Vercel Release Bot 96a4d3a2fd Version Packages (beta) (#676)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
workflow@4.0.1-beta.36
2025-12-24 09:51:14 -08:00
Chris Tate 26d9769335 ai sdk parity for DurableAgent (#668)
### Key Changes

**Generation Settings**
- Support for `temperature`, `maxOutputTokens`, `topP`, `topK`, `presencePenalty`, `frequencyPenalty`, `stopSequences`, `seed` at constructor and per-stream level

**Step Control**
- Added `maxSteps` to limit LLM calls (default: unlimited for backwards compatibility)
- Added `toolChoice` (`auto`, `none`, `required`, or specific tool)
- Added `activeTools` to filter available tools per-stream call

**Callbacks**
- `onChunk` - called for each stream chunk
- `onStepFinish` - called after each step completes  
- `onFinish` - called when all steps complete
- `onError` - called on errors
- `onAbort` - called when aborted via `AbortSignal`

**Structured Output**
- Added `experimental_output` with `Output.object({ schema })` for parsing structured responses

**Context & Telemetry**
- Added `experimental_context` to pass data to tool executions
- Added `experimental_telemetry` for observability

**Stream Result**
- `stream()` now returns `{ messages, steps, experimental_output }` instead of just `{ messages }`

**Other**
- `prepareStep` can now override generation settings, toolChoice, and context
- Added `experimental_repairToolCall` for handling malformed tool calls
- Enabled file, source, and tool input streaming chunks
- Exported all new types from `@workflow/ai`
2025-12-24 09:37:02 -08:00
Peter Wielander d9f6a49397 [world-local] Create dataDir on start and add versioning forward-compat (#681) 2025-12-23 20:43:03 +01:00
Peter Wielander 0cf0ac3211 [util] Extract helper function to find local world dataDir across CLI/UI (#682) 2025-12-23 20:42:42 +01:00
JJ Kasper 8ba8b6be6b Revert extra stdlib re-export (#683) 2025-12-23 12:04:47 -06:00
Peter Wielander 25b02b0bfd [runtime] Add CORS headers and request handling to health check check response (#624) 2025-12-23 14:17:17 +01:00
Peter Wielander c059cf6fcd [cli] Only do interactive pagination when using the -i flag (#669) 2025-12-23 14:05:06 +01:00
Peter Wielander 4bc98ff4a1 [web-shared] Move error boundary from web to web-shared and use for sidebar detail view (#674) 2025-12-23 14:02:36 +01:00
JJ Kasper ea3afce222 Add lazy workflow and step discovery in Next.js (#640) 2025-12-22 23:16:17 -06:00