-
Notifications
You must be signed in to change notification settings - Fork 1.5k
remove wflow vnext methods #11499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove wflow vnext methods #11499
Conversation
🦋 Changeset detectedLatest commit: 9e33e6a The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded@taofeeq-deru has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 11 minutes and 59 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughRemoves experimental VNext streaming methods ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚨 Redirect Validation FailedThe redirect validation found issues in Action Required: Review and fix the redirect configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
client-sdks/client-js/src/resources/run.ts (1)
367-369: Update stale error message referencing "vNext".The error message still references "vNext workflow" but this method has been renamed from
resumeStreamVNexttoresumeStream. The message should be updated for consistency.🔎 Proposed fix
if (!response.ok) { - throw new Error(`Failed to stream vNext workflow: ${response.statusText}`); + throw new Error(`Failed to resume workflow stream: ${response.statusText}`); }
🧹 Nitpick comments (1)
.changeset/all-years-jog.md (1)
11-17: Improve changeset completeness with examples for all removed methods.The description mentions removing three methods (
streamVNext,resumeStreamVNext,observeStreamVNext) but the code example only demonstrates thestreamVNext→streammigration. Per coding guidelines, code examples should show the public API usage for breaking/feature changes.Consider adding examples for the other two methods:
Remove `streamVNext`, `resumeStreamVNext`, and `observeStreamVNext` methods, call `stream`, `resumeStream` and `observeStream` directly +**Streaming:** ```diff + const run = await workflow.createRun({ runId: '123' }); - const stream = await run.streamVNext({ inputData: { ... } }); + const stream = await run.stream({ inputData: { ... } });+Observing:
+diff +- const stream = await run.observeStreamVNext(); ++ const stream = await run.observeStream(); +
+
+Resuming:
+diff +- const stream = await run.resumeStreamVNext({ step: 'stepId', resumeData: { ... } }); ++ const stream = await run.resumeStream({ step: 'stepId', resumeData: { ... } }); +</blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used**: Path: .coderabbit.yaml **Review profile**: CHILL **Plan**: Pro <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 05b8bee9e50e6c2a4a2bf210eca25ee212ca24fa and 2f0b3f9b8a5c073300b68bb856ee353a7870bd21. </details> <details> <summary>📒 Files selected for processing (15)</summary> * `.changeset/all-years-jog.md` * `client-sdks/client-js/src/resources/agent-builder.test.ts` * `client-sdks/client-js/src/resources/agent-builder.ts` * `client-sdks/client-js/src/resources/run.ts` * `docs/src/content/en/guides/migrations/upgrade-to-v1/client.mdx` * `packages/core/src/loop/network/index.ts` * `packages/core/src/workflows/workflow.test.ts` * `packages/core/src/workflows/workflow.ts` * `packages/playground-ui/src/domains/workflows/hooks/use-workflows-actions.ts` * `packages/server/src/server/handlers/agent-builder.ts` * `packages/server/src/server/handlers/workflows.ts` * `packages/server/src/server/server-adapter/routes/agent-builder.ts` * `packages/server/src/server/server-adapter/routes/workflows.ts` * `workflows/inngest/src/index.test.ts` * `workflows/inngest/src/run.ts` </details> <details> <summary>💤 Files with no reviewable changes (6)</summary> * client-sdks/client-js/src/resources/agent-builder.test.ts * packages/server/src/server/handlers/workflows.ts * workflows/inngest/src/run.ts * packages/server/src/server/server-adapter/routes/workflows.ts * packages/server/src/server/server-adapter/routes/agent-builder.ts * packages/server/src/server/handlers/agent-builder.ts </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>📓 Path-based instructions (8)</summary> <details> <summary>**/*.{ts,tsx}</summary> **📄 CodeRabbit inference engine (CLAUDE.md)** > Run `pnpm typecheck` to validate TypeScript types across all packages Files: - `packages/core/src/loop/network/index.ts` - `client-sdks/client-js/src/resources/agent-builder.ts` - `packages/playground-ui/src/domains/workflows/hooks/use-workflows-actions.ts` - `workflows/inngest/src/index.test.ts` - `packages/core/src/workflows/workflow.test.ts` - `packages/core/src/workflows/workflow.ts` - `client-sdks/client-js/src/resources/run.ts` </details> <details> <summary>**/*.{ts,tsx,js,jsx,json,md}</summary> **📄 CodeRabbit inference engine (CLAUDE.md)** > Run `pnpm prettier:format` to format code and `pnpm format` to run linting with auto-fix across all packages Files: - `packages/core/src/loop/network/index.ts` - `client-sdks/client-js/src/resources/agent-builder.ts` - `packages/playground-ui/src/domains/workflows/hooks/use-workflows-actions.ts` - `workflows/inngest/src/index.test.ts` - `packages/core/src/workflows/workflow.test.ts` - `packages/core/src/workflows/workflow.ts` - `client-sdks/client-js/src/resources/run.ts` </details> <details> <summary>packages/**/*.{ts,tsx}</summary> **📄 CodeRabbit inference engine (CLAUDE.md)** > `packages/**/*.{ts,tsx}`: All packages must use TypeScript with strict type checking enabled > Use telemetry decorators for observability across components Files: - `packages/core/src/loop/network/index.ts` - `packages/playground-ui/src/domains/workflows/hooks/use-workflows-actions.ts` - `packages/core/src/workflows/workflow.test.ts` - `packages/core/src/workflows/workflow.ts` </details> <details> <summary>**/*.{md,mdx}</summary> **📄 CodeRabbit inference engine (.cursor/rules/writing-documentation.mdc)** > `**/*.{md,mdx}`: When writing developer documentation, do not use adjectives like 'powerful' or 'built-in' as these read like marketing copy and developers don't like that > When writing developer documentation, do not use 'complete', 'out-of-the-box', 'hands-on', or overly enthusiastic exhortations like 'Check out', 'Learn more', 'Explore'. Do not use words like 'essential' or 'offers' > When writing developer documentation, do not use 'your needs', 'production-ready', 'makes it easy', or 'choose the right...solution' as these are marketing jargon that developers dislike > When writing developer documentation, avoid phrasing like 'without changing your code' or 'automatically handles' that obscures implementation details > In developer documentation, avoid phrasing that glides between benefits without diving into details. Focus on technical specifics and implementation details rather than high-level benefits. For example, avoid sentences like: 'This makes it easy to build AI applications that maintain meaningful conversations and remember important details, whether you're building a simple chatbot or a sophisticated AI assistant' > All H1 headings (# Heading) must use title case format, capitalizing the first letter of each major word. Examples: 'Getting Started', 'Human In-the-Loop Workflow', 'Agent as a Step' Files: - `docs/src/content/en/guides/migrations/upgrade-to-v1/client.mdx` </details> <details> <summary>**/*{docs,documentation}/**/*.{md,mdx}</summary> **📄 CodeRabbit inference engine (.windsurfrules)** > `**/*{docs,documentation}/**/*.{md,mdx}`: When writing developer documentation, do not use adjectives like 'powerful' or 'built-in' as they read like marketing copy > When writing developer documentation, do not use words like 'complete', 'out-of-the-box', 'hands-on', or overly enthusiastic exhortations such as 'Check out', 'Learn more', 'Explore', 'essential', or 'offers' > When writing developer documentation, avoid marketing jargon such as 'your needs', 'production-ready', 'makes it easy', or 'choose the right...solution' > When writing developer documentation, do not use phrases like 'without changing your code' or 'automatically handles' as they glide over implementation details > In developer documentation, avoid phrasing that glides between benefits without diving into details; instead, focus on technical nuts and bolts with specific implementation details rather than abstract benefits Files: - `docs/src/content/en/guides/migrations/upgrade-to-v1/client.mdx` </details> <details> <summary>packages/playground-ui/src/**/*.{ts,tsx}</summary> **📄 CodeRabbit inference engine (packages/playground-ui/CLAUDE.md)** > `packages/playground-ui/src/**/*.{ts,tsx}`: Use Tailwind CSS (v3.x) for all styling in packages/playground-ui components > Use design tokens from src/ds/tokens/index.ts instead of arbitrary Tailwind values (e.g., do not use bg-[#1A1A1A]) > Use PascalCase for component names (e.g., EntryList) > Use kebab-case for component filenames (e.g., entry-list.tsx) > Use named exports only; avoid default exports in components > Use TanStack Query for all data fetching hooks in packages/playground-ui > Use useMastraClient SDK for API calls instead of direct fetch() calls > Export explicit prop types separately from components (e.g., export type ComponentProps = {...}) > Prefer derived values over useState + useEffect; calculate values directly when possible > Keep type definitions alongside components within the same file > Minimize useEffect usage in components; only use it when necessary > > `packages/playground-ui/src/**/*.{ts,tsx}`: Use Tailwind CSS v3.x for all styling in `packages/playground-ui` > Use design tokens from `src/ds/tokens/index.ts` for Tailwind styling in `packages/playground-ui`; forbidden to use arbitrary values (e.g., `bg-[#1A1A1A]`) unless explicitly requested > Use PascalCase for component names in `packages/playground-ui` > Use kebab-case for component file names in `packages/playground-ui` > Use named exports only; avoid default exports in `packages/playground-ui` > Use TanStack Query for all data-fetching hooks in `packages/playground-ui`; forbidden to use direct `fetch()` calls > Use `useMastraClient` SDK for API calls in data-fetching hooks in `packages/playground-ui` > Export explicit prop types separately from components in `packages/playground-ui`; keep type definitions alongside components > Prefer derived values over `useState` + `useEffect` in `packages/playground-ui`; minimize `useEffect` usage and calculate values directly when possible > Use TanStack Query for all server state management in `packages/playground-ui` Files: - `packages/playground-ui/src/domains/workflows/hooks/use-workflows-actions.ts` </details> <details> <summary>.changeset/*.md</summary> **⚙️ CodeRabbit configuration file** > `.changeset/*.md`: Changeset files are really important for keeping track of changes in the project. They'll be used to generate release notes and inform users about updates. > > Review the changeset file according to these guidelines: > - The target audience are developers > - Write short, direct sentences that anyone can understand. Avoid commit messages, technical jargon, and acronyms. Use action-oriented verbs (Added, Fixed, Improved, Deprecated, Removed) > - Avoid generic phrases like "Update code", "Miscellaneous improvements", or "Bug fixes" > - Highlight outcomes! What does change for the end user? Do not focus on internal implementation details > - Add context like links to issues or PRs when relevant > - If the change is a breaking change or is adding a new feature, ensure that a code example is provided. This code example should show the public API usage (the before and after). Do not show code examples of internal implementation details. > - Keep the formatting easy-to-read and scannable. If necessary, use bullet points or multiple paragraphs (Use **bold** text as the heading for these sections, do not use markdown headings). > - For larger, more substantial changes, also answer the "Why" behind the changes > - Each changeset file contains a YAML frontmatter at the top. It will be one or more package names followed by a colon and the type of change (patch, minor, major). Do not modify this frontmatter. Check that the description inside the changeset file only applies to the packages listed in the frontmatter. Do not allow descriptions that mention changes to packages not listed in the frontmatter. In these cases, the user must create a separate changeset file for those packages. > Files: - `.changeset/all-years-jog.md` </details> <details> <summary>**/*.{test,spec}.{ts,tsx}</summary> **📄 CodeRabbit inference engine (CLAUDE.md)** > `**/*.{test,spec}.{ts,tsx}`: Use Vitest for testing framework in test files > Co-locate test files with source code using naming patterns like *.test.ts or *.spec.ts Files: - `workflows/inngest/src/index.test.ts` - `packages/core/src/workflows/workflow.test.ts` </details> </details><details> <summary>🧠 Learnings (12)</summary> <details> <summary>📚 Learning: 2025-10-29T09:37:59.778Z</summary>Learnt from: TheIsrael1
Repo: mastra-ai/mastra PR: 9247
File: packages/core/src/loop/network/index.ts:357-393
Timestamp: 2025-10-29T09:37:59.778Z
Learning: In the agent network routing completion stream (packages/core/src/loop/network/index.ts), whencompletionStream.erroris true, the first stream should not have written any text (currentTextIdx should be 0), so the fallback reset of currentText and currentTextIdx does not cause duplication.**Applied to files:** - `packages/core/src/loop/network/index.ts` </details> <details> <summary>📚 Learning: 2025-12-18T21:52:52.667Z</summary>Learnt from: taofeeq-deru
Repo: mastra-ai/mastra PR: 11276
File: packages/core/src/workflows/evented/evented-workflow.test.ts:940-1055
Timestamp: 2025-12-18T21:52:52.667Z
Learning: In packages/core Workflows tests, Run.stream returns a synchronous object (with fullStream and result), so awaiting run.stream() is not required in tests.**Applied to files:** - `packages/core/src/loop/network/index.ts` - `docs/src/content/en/guides/migrations/upgrade-to-v1/client.mdx` - `packages/playground-ui/src/domains/workflows/hooks/use-workflows-actions.ts` - `.changeset/all-years-jog.md` - `workflows/inngest/src/index.test.ts` - `packages/core/src/workflows/workflow.test.ts` - `packages/core/src/workflows/workflow.ts` - `client-sdks/client-js/src/resources/run.ts` </details> <details> <summary>📚 Learning: 2025-11-24T16:41:10.784Z</summary>Learnt from: CR
Repo: mastra-ai/mastra PR: 0
File: packages/playground-ui/.cursor/rules/frontend.mdc:0-0
Timestamp: 2025-11-24T16:41:10.784Z
Learning: Applies to packages/playground-ui/src/**/*.{ts,tsx} : Prefer derived values overuseState+useEffectinpackages/playground-ui; minimizeuseEffectusage and calculate values directly when possible**Applied to files:** - `packages/playground-ui/src/domains/workflows/hooks/use-workflows-actions.ts` </details> <details> <summary>📚 Learning: 2025-11-24T16:41:10.784Z</summary>Learnt from: CR
Repo: mastra-ai/mastra PR: 0
File: packages/playground-ui/.cursor/rules/frontend.mdc:0-0
Timestamp: 2025-11-24T16:41:10.784Z
Learning: Applies to packages/playground-ui/src/**/*.{ts,tsx} : UseuseMastraClientSDK for API calls in data-fetching hooks inpackages/playground-ui**Applied to files:** - `packages/playground-ui/src/domains/workflows/hooks/use-workflows-actions.ts` </details> <details> <summary>📚 Learning: 2025-11-24T16:42:04.244Z</summary>Learnt from: CR
Repo: mastra-ai/mastra PR: 0
File: packages/codemod/AGENTS.md:0-0
Timestamp: 2025-11-24T16:42:04.244Z
Learning: Applies to packages/codemod/src/codemods/v1/**/*.ts : Usecontext.hasChanges = trueflag andcontext.messages.push()to track and report what transformations were made in the codemod**Applied to files:** - `packages/playground-ui/src/domains/workflows/hooks/use-workflows-actions.ts` </details> <details> <summary>📚 Learning: 2025-11-24T16:40:41.785Z</summary>Learnt from: CR
Repo: mastra-ai/mastra PR: 0
File: packages/playground-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T16:40:41.785Z
Learning: Applies to packages/playground-ui/src/**/*.{ts,tsx} : Use useMastraClient SDK for API calls instead of direct fetch() calls**Applied to files:** - `packages/playground-ui/src/domains/workflows/hooks/use-workflows-actions.ts` - `.changeset/all-years-jog.md` </details> <details> <summary>📚 Learning: 2025-11-24T16:42:04.244Z</summary>Learnt from: CR
Repo: mastra-ai/mastra PR: 0
File: packages/codemod/AGENTS.md:0-0
Timestamp: 2025-11-24T16:42:04.244Z
Learning: Applies to packages/codemod/src/codemods/v1/**/*.ts : Prefer using shared utility functions (trackClassInstances(),renameMethod(),renameMethods(),transformMethodCalls(),renameImportAndUsages(),transformConstructorProperties(),transformObjectProperties()) instead of writing custom AST transformation logic**Applied to files:** - `packages/playground-ui/src/domains/workflows/hooks/use-workflows-actions.ts` - `packages/core/src/workflows/workflow.test.ts` </details> <details> <summary>📚 Learning: 2025-11-24T16:42:04.244Z</summary>Learnt from: CR
Repo: mastra-ai/mastra PR: 0
File: packages/codemod/AGENTS.md:0-0
Timestamp: 2025-11-24T16:42:04.244Z
Learning: Applies to packages/codemod/src/test/fixtures/**/*.ts : In output fixtures, ensure all NEGATIVE test cases remain EXACTLY IDENTICAL to their input fixture counterparts to verify the codemod only transforms intended patterns**Applied to files:** - `workflows/inngest/src/index.test.ts` - `packages/core/src/workflows/workflow.test.ts` </details> <details> <summary>📚 Learning: 2025-11-24T16:42:04.244Z</summary>Learnt from: CR
Repo: mastra-ai/mastra PR: 0
File: packages/codemod/AGENTS.md:0-0
Timestamp: 2025-11-24T16:42:04.244Z
Learning: Applies to packages/codemod/src/test/fixtures/**/*.ts : Create test fixtures by copying examples DIRECTLY from migration guides indocs/src/content/en/guides/migrations/upgrade-to-v1/without hallucinating or inventing changes**Applied to files:** - `workflows/inngest/src/index.test.ts` - `packages/core/src/workflows/workflow.test.ts` </details> <details> <summary>📚 Learning: 2025-11-24T16:42:04.244Z</summary>Learnt from: CR
Repo: mastra-ai/mastra PR: 0
File: packages/codemod/AGENTS.md:0-0
Timestamp: 2025-11-24T16:42:04.244Z
Learning: Applies to packages/codemod/src/test/**/*.test.ts : Include test cases for multiple occurrences of the transformation pattern, aliased imports, type imports, and mixed imports to verify the codemod works consistently**Applied to files:** - `workflows/inngest/src/index.test.ts` - `packages/core/src/workflows/workflow.test.ts` </details> <details> <summary>📚 Learning: 2025-11-24T16:42:04.244Z</summary>Learnt from: CR
Repo: mastra-ai/mastra PR: 0
File: packages/codemod/AGENTS.md:0-0
Timestamp: 2025-11-24T16:42:04.244Z
Learning: Applies to packages/codemod/src/test/**/*.test.ts : Do NOT useUPDATE_SNAPSHOTto force tests to pass; instead fix the codemod implementation when tests fail**Applied to files:** - `workflows/inngest/src/index.test.ts` - `packages/core/src/workflows/workflow.test.ts` </details> <details> <summary>📚 Learning: 2025-11-24T16:42:04.244Z</summary>Learnt from: CR
Repo: mastra-ai/mastra PR: 0
File: packages/codemod/AGENTS.md:0-0
Timestamp: 2025-11-24T16:42:04.244Z
Learning: Applies to packages/codemod/src/test/fixtures/**/*.ts : In input fixtures, include both POSITIVE test cases (patterns that should transform) and NEGATIVE test cases (unrelated code with similar names/patterns that should NOT transform)**Applied to files:** - `workflows/inngest/src/index.test.ts` - `packages/core/src/workflows/workflow.test.ts` </details> </details><details> <summary>🧬 Code graph analysis (3)</summary> <details> <summary>packages/core/src/loop/network/index.ts (1)</summary><blockquote> <details> <summary>client-sdks/client-js/src/resources/run.ts (1)</summary> * `stream` (242-283) </details> </blockquote></details> <details> <summary>workflows/inngest/src/index.test.ts (1)</summary><blockquote> <details> <summary>packages/core/src/evals/base.ts (1)</summary> * `run` (373-420) </details> </blockquote></details> <details> <summary>packages/core/src/workflows/workflow.ts (2)</summary><blockquote> <details> <summary>packages/core/src/stream/types.ts (1)</summary> * `WorkflowStreamEvent` (565-648) </details> <details> <summary>packages/core/src/workflows/types.ts (1)</summary> * `WorkflowStreamEvent` (18-18) </details> </blockquote></details> </details> </details> <details> <summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)</summary> * GitHub Check: Prebuild * GitHub Check: Analyze (javascript-typescript) </details> <details> <summary>🔇 Additional comments (15)</summary><blockquote> <details> <summary>packages/playground-ui/src/domains/workflows/hooks/use-workflows-actions.ts (3)</summary><blockquote> `197-203`: **LGTM! Migration from `streamVNext` to `stream` with new `closeOnSuspend` parameter.** The method call correctly migrates to the new API surface and adds `closeOnSuspend: true`, which is appropriate for the playground UI to properly handle workflow suspension. --- `280-280`: **LGTM! Migration from `observeStreamVNext` to `observeStream`.** The observe stream migration is straightforward with no additional parameters needed. --- `361-367`: **LGTM! Migration from `resumeStreamVNext` to `resumeStream`.** The resume stream migration correctly passes all required parameters including `step`, `resumeData`, `requestContext`, `tracingOptions`, and `perStep`. </blockquote></details> <details> <summary>client-sdks/client-js/src/resources/run.ts (2)</summary><blockquote> `249-249`: **LGTM! New `closeOnSuspend` parameter added to stream method.** The optional `closeOnSuspend` parameter allows clients to control whether the stream should close when the workflow suspends. This is correctly typed as optional and properly passed through to the request body. --- `337-342`: **LGTM! Method renamed from `resumeStreamVNext` to `resumeStream`.** The JSDoc and method signature have been properly updated to reflect the new non-VNext naming convention. </blockquote></details> <details> <summary>packages/core/src/loop/network/index.ts (2)</summary><blockquote> `776-779`: **LGTM! Migration from `streamVNext` to `stream` in workflow step.** The method call correctly migrates to the new API surface. Based on learnings, `Run.stream` returns a synchronous object (with `fullStream` and `result`), so no `await` is needed here. --- `1280-1292`: **LGTM! Migration from `streamVNext` to `stream` in network loop.** The migration correctly uses `run.stream()` and accesses `.fullStream` synchronously, which is consistent with the API design where `Run.stream` returns a synchronous object. </blockquote></details> <details> <summary>.changeset/all-years-jog.md (1)</summary><blockquote> `7-8`: **The changeset correctly lists all affected packages.** The changeset file includes all seven packages mentioned in the PR: `@mastra/playground-ui`, `@mastra/client-js`, `@mastra/inngest`, `@mastra/server`, `@mastra/core`, `mastra`, and `create-mastra`. No changes needed to the package list. > Likely an incorrect or invalid review comment. </blockquote></details> <details> <summary>workflows/inngest/src/index.test.ts (2)</summary><blockquote> `12624-12632`: **Streaming suspend/resume test now correctly uses sync `run.stream` / `run.resumeStream`** Switching from `await run.streamVNext(...)` / `await run.resumeStreamVNext(...)` to the sync `run.stream(...)` / `run.resumeStream(...)` API and dropping the `await` is consistent with other tests in this file and with the contract that `Run.stream` returns a `{ fullStream, result }` wrapper rather than a Promise. The control flow (consume the initial `fullStream`, then start a new `resumeStream` and consume its `fullStream` before awaiting `.result`) still looks sound. Please just confirm that the new `stream`/`resumeStream` implementations preserve the behavior that `fullStream` completes when the workflow reaches a suspended state (or that any new `closeOnSuspend` default keeps this test from hanging in the initial `for await` loop). Based on learnings, this usage aligns with how `Run.stream` is expected to behave. --- `13754-13762`: **Structured-output agent test uses `run.stream` wrapper consistently** Here you’ve updated the agent structured-output test to use the sync `run.stream({ ... })` API and iterate `fullStream` before awaiting `streamOutput.result`, matching the other vNext streaming tests and the expected `{ fullStream, result }` contract. No issues from a test-logic standpoint; just ensure `pnpm typecheck` and the workflow test suite pass with the updated `stream` signature. </blockquote></details> <details> <summary>docs/src/content/en/guides/migrations/upgrade-to-v1/client.mdx (1)</summary><blockquote> `175-186`: **LGTM! Clear migration guidance.** The documentation clearly explains the removal of experimental VNext methods and provides a straightforward migration path. The example is consistent with other migration examples in the document and avoids marketing language per the coding guidelines. </blockquote></details> <details> <summary>client-sdks/client-js/src/resources/agent-builder.ts (1)</summary><blockquote> `321-321`: **LGTM! Comment accurately reflects the endpoint.** The simplified comment correctly documents the endpoint without referencing the removed VNext methods. The implementation remains consistent with the other streaming methods in the class. </blockquote></details> <details> <summary>packages/core/src/workflows/workflow.test.ts (1)</summary><blockquote> `1467-1467`: **API consolidation to standard streaming methods is complete and correct.** All `streamVNext` calls have been properly consolidated to `stream`, and all `resumeStreamVNext` calls have been consolidated to `resumeStream` across the 15 test locations. Parameter shapes are preserved correctly, including proper usage of `closeOnSuspend: false` where needed. The test logic remains functionally equivalent and aligns with the consolidated API surface. </blockquote></details> <details> <summary>packages/core/src/workflows/workflow.ts (2)</summary><blockquote> `2633-2646`: **LGTM! Clean implementation of observeStream.** The method correctly handles both scenarios: returning the fullStream when streamOutput exists, or an empty stream that closes immediately when there's no active stream output. --- `2663-2684`: **The `isVNext` flag is an internal implementation detail for stream closure behavior, not a vNext removal artifact.** The `closeOnSuspend` parameter implementation is correct. However, the concern about the `isVNext` flag is based on a misunderstanding of its purpose. This flag is not a remnant of vNext method removal; it's an internal signal that controls stream closure behavior: - When `isVNext: true` (set by the `stream()` method): The stream remains open after execution, allowing the ReadableStream consumer to manage closure through the standard stream API - When `isVNext: false` (legacy callers): Auto-close behavior applies based on execution status The vNext method deprecation (`streamVNext` → `stream`, `resumeStreamVNext` → `resumeStream`) is handled separately through codemods and the `format: 'legacy' | 'vnext'` parameter, which controls output format compatibility. That said, the flag name `isVNext` is confusing given its actual purpose. Consider renaming it to reflect stream closure semantics (e.g., `skipAutoClose`, `manualCloseMode`, or `isStreamingAPI`) for clarity. </blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
## Description
<!-- Provide a brief description of the changes in this PR -->
Remove `streamVNext`, `resumeStreamVNext`, and `observeStreamVNext`
methods, call `stream`, `resumeStream` and `observeStream` directly
```diff
+ const run = await workflow.createRun({ runId: '123' });
- const stream = await run.streamVNext({ inputData: { ... } });
+ const stream = await run.stream({ inputData: { ... } });
```
## Related Issue(s)
<!-- Link to the issue(s) this PR addresses, using hashtag notation:
mastra-ai#123 -->
## Type of Change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test update
## Checklist
- [ ] I have made corresponding changes to the documentation (if
applicable)
- [ ] I have added tests that prove my fix is effective or that my
feature works
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Release Notes
* **Breaking Changes**
* Removed deprecated VNext streaming methods (`streamVNext()`,
`resumeStreamVNext()`, `observeStreamVNext()`); migrate to standard
equivalents (`stream()`, `resumeStream()`, `observeStream()`).
* **New Features**
* Added `closeOnSuspend` parameter to the streaming API.
* **Documentation**
* Added migration guide for updating to standard streaming methods.
<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
Description
Remove
streamVNext,resumeStreamVNext, andobserveStreamVNextmethods, callstream,resumeStreamandobserveStreamdirectlyRelated Issue(s)
Type of Change
Checklist
Summary by CodeRabbit
Release Notes
Breaking Changes
streamVNext(),resumeStreamVNext(),observeStreamVNext()); migrate to standard equivalents (stream(),resumeStream(),observeStream()).New Features
closeOnSuspendparameter to the streaming API.Documentation
✏️ Tip: You can customize this high-level summary in your review settings.