WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@abhiaiyer91
Copy link
Contributor

@abhiaiyer91 abhiaiyer91 commented Dec 7, 2025

Summary

  • Fix JSON parsing errors when LLMs output unescaped newlines in structured output strings

Problem

Some LLMs (particularly when not using native JSON mode) output actual newline characters inside JSON string values instead of properly escaped \n sequences. This breaks JSON parsing and causes structured output to fail with errors like "invalid JSON".

Example of problematic LLM output:

{"field": "line 1
line 2"}

Instead of valid JSON:

{"field": "line 1\nline 2"}

Solution

Add preprocessing in BaseFormatHandler.preprocessText() to escape unescaped control characters (\n, \r, \t) within JSON string values before parsing.

The fix:

  • Tracks whether we're inside a JSON string (after an unescaped quote)
  • Replaces literal control characters with their escape sequences only inside strings
  • Preserves already-escaped sequences like \\n
  • Is harmless when JSON is already valid

Testing

  • Added 13 unit tests for escapeUnescapedControlCharsInJsonStrings() helper
  • Added 3 integration tests for streaming with malformed JSON input
  • All 36 tests pass

Notes

We were unable to fully reproduce the issue with current Mistral/OpenAI models, but the fix is defensive and the unit tests validate it works correctly when malformed JSON is encountered.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed JSON parsing errors when language models output unescaped newline characters and other control characters inside JSON string values, improving compatibility and robustness across different LLM providers.

✏️ Tip: You can customize this high-level summary in your review settings.

Some LLMs output actual newline characters inside JSON string values
instead of properly escaped \n sequences, which breaks JSON parsing.

This adds preprocessing to escape unescaped control characters within
JSON string values before parsing, making structured output more robust
across different LLM providers.

- Add escapeUnescapedControlCharsInJsonStrings() helper function
- Integrate into preprocessText() in BaseFormatHandler
- Add unit tests for the helper and integration tests for streaming
@changeset-bot
Copy link

changeset-bot bot commented Dec 7, 2025

🦋 Changeset detected

Latest commit: 428bc30

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
@mastra/core Patch
@mastra/mcp-docs-server Patch
@mastra/client-js Patch
@mastra/react Patch
@mastra/dane Patch
@mastra/longmemeval Patch
@mastra/playground-ui Patch
@mastra/server Patch
@mastra/deployer Patch
@mastra/deployer-cloud Patch
@mastra/express Patch
@mastra/hono Patch
mastra Patch
@mastra/deployer-cloudflare Patch
@mastra/deployer-netlify Patch
@mastra/deployer-vercel Patch
create-mastra Patch

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

@vercel
Copy link

vercel bot commented Dec 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
assistant-ui Ready Ready Preview Comment Dec 7, 2025 6:40pm
mastra-docs Ready Ready Preview Comment Dec 7, 2025 6:40pm
mastra-docs-1.x Building Building Preview Comment Dec 7, 2025 6:40pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 7, 2025

Walkthrough

A new utility function escapeUnescapedControlCharsInJsonStrings is added to handle JSON parsing robustness by escaping unescaped control characters (newlines, carriage returns, tabs) within JSON string values before parsing. The implementation is integrated into the preprocessing pipeline with comprehensive test coverage, and a changelog entry documents the fix.

Changes

Cohort / File(s) Summary
Changelog Entry
.changeset/fix-json-newlines.md
Documents patch release for @mastra/core with a fix for JSON parsing errors when LLMs output unescaped newline characters inside JSON string values.
JSON String Escaping Implementation
packages/core/src/stream/base/output-format-handlers.ts
Implements new exported utility escapeUnescapedControlCharsInJsonStrings(text: string) to escape unescaped control characters within JSON string literals. Integrates the function into the base preprocessing flow before JSON parsing to improve robustness for streaming LLM output.
JSON String Escaping Tests
packages/core/src/stream/base/output-format-handlers.test.ts
Adds comprehensive test suite for escapeUnescapedControlCharsInJsonStrings, validating proper escaping of unescaped control characters while preserving outside-string content, already-escaped sequences, and handling streaming/incomplete JSON scenarios including nested objects, arrays, and code-block wrappers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • The escaping logic correctness for all control character patterns and edge cases (nested quotes, already-escaped sequences, streaming incomplete JSON)
  • The integration point in the preprocessText method to verify proper placement in the preprocessing pipeline and absence of side effects on existing functionality
  • Validation that the test scenarios cover the primary use cases (streaming delimited JSON, code-block wrapped content)

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: fixing JSON parsing by handling unescaped newlines in structured output from LLMs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch planned-rabbit-95d3fe

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c6fd6fe and 428bc30.

📒 Files selected for processing (3)
  • .changeset/fix-json-newlines.md (1 hunks)
  • packages/core/src/stream/base/output-format-handlers.test.ts (2 hunks)
  • packages/core/src/stream/base/output-format-handlers.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
.changeset/*.md

⚙️ 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/fix-json-newlines.md
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Run pnpm typecheck to validate TypeScript types across all packages

Files:

  • packages/core/src/stream/base/output-format-handlers.ts
  • packages/core/src/stream/base/output-format-handlers.test.ts
**/*.{ts,tsx,js,jsx,json,md}

📄 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/stream/base/output-format-handlers.ts
  • packages/core/src/stream/base/output-format-handlers.test.ts
packages/**/*.{ts,tsx}

📄 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/stream/base/output-format-handlers.ts
  • packages/core/src/stream/base/output-format-handlers.test.ts
**/*.{test,spec}.{ts,tsx}

📄 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:

  • packages/core/src/stream/base/output-format-handlers.test.ts
🧠 Learnings (4)
📚 Learning: 2025-11-24T16:42:04.244Z
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:

  • packages/core/src/stream/base/output-format-handlers.test.ts
📚 Learning: 2025-11-24T16:42:04.244Z
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:

  • packages/core/src/stream/base/output-format-handlers.test.ts
📚 Learning: 2025-11-24T16:42:04.244Z
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:

  • packages/core/src/stream/base/output-format-handlers.test.ts
📚 Learning: 2025-11-24T16:42:04.244Z
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 in `docs/src/content/en/guides/migrations/upgrade-to-v1/` without hallucinating or inventing changes

Applied to files:

  • packages/core/src/stream/base/output-format-handlers.test.ts
🧬 Code graph analysis (2)
packages/core/src/stream/base/output-format-handlers.ts (1)
packages/core/src/stream/base/output.ts (1)
  • text (766-768)
packages/core/src/stream/base/output-format-handlers.test.ts (1)
packages/core/src/stream/base/output-format-handlers.ts (2)
  • escapeUnescapedControlCharsInJsonStrings (28-76)
  • createObjectStreamTransformer (572-682)
⏰ 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). (8)
  • GitHub Check: test
  • GitHub Check: test
  • GitHub Check: Lint
  • GitHub Check: test (hono)
  • GitHub Check: Prebuild
  • GitHub Check: test (express)
  • GitHub Check: test
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (5)
.changeset/fix-json-newlines.md (1)

1-9: Changeset description is clear and user-focused.

Message cleanly explains the user-visible impact on structured JSON output and is correctly scoped to @mastra/core. No changes needed.

packages/core/src/stream/base/output-format-handlers.test.ts (2)

10-93: Utility tests thoroughly exercise JSON control-char escaping.

The new unit tests around escapeUnescapedControlCharsInJsonStrings cover the major behaviors (inside vs. outside strings, already-escaped sequences, escaped quotes, nested JSON, CRLF, incomplete/streaming JSON, trailing backslash) and align well with the intended semantics of the helper.

Please ensure pnpm typecheck, pnpm prettier:format, and pnpm format have been run so this file passes the repo’s TypeScript and formatting checks as per the coding guidelines.


856-1068: Streaming tests accurately capture real-world unescaped-newline scenarios.

These integration-style tests around createObjectStreamTransformer (single invalid JSON blob, multi-chunk streaming, and transcript-style fields) convincingly reproduce the reported issue and verify that the new preprocessing yields a parsed object-result without emitting error chunks, while preserving newline structure in the field values.

packages/core/src/stream/base/output-format-handlers.ts (2)

16-76: Control-char escaping helper is robust and JSON-aware.

Implementation cleanly tracks JSON string boundaries via unescaped quotes, preserves existing escape sequences, and only rewrites literal \n, \r, and \t inside strings. This matches the documented behavior and the new tests, and should be safe for both complete and partial JSON fragments.


247-249: preprocessText integration correctly centralizes JSON newline fixing.

Hooking escapeUnescapedControlCharsInJsonStrings into BaseFormatHandler.preprocessText ensures all format handlers benefit from the fix, both during incremental parsePartialJson calls and final validation, while still running after message/code-block unwrapping. The updated doc comment accurately reflects this broader responsibility.

Also applies to: 278-281


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@abhiaiyer91 abhiaiyer91 merged commit 653e65a into main Dec 8, 2025
47 of 49 checks passed
@abhiaiyer91 abhiaiyer91 deleted the planned-rabbit-95d3fe branch December 8, 2025 16:57
abhiaiyer91 pushed a commit that referenced this pull request Dec 9, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @mastra/[email protected]

### Minor Changes

- Add stored agents support
([#10953](#10953))

Agents can now be stored in the database and loaded at runtime. This
lets you persist agent configurations and dynamically create executable
Agent instances from storage.

    ```typescript
    import { Mastra } from '@mastra/core';
    import { LibSQLStore } from '@mastra/libsql';

    const mastra = new Mastra({
      storage: new LibSQLStore({ url: ':memory:' }),
      tools: { myTool },
      scorers: { myScorer },
    });

    // Create agent in storage via API or directly
    await mastra.getStorage().createAgent({
      agent: {
        id: 'my-agent',
        name: 'My Agent',
        instructions: 'You are helpful',
        model: { provider: 'openai', name: 'gpt-4' },
        tools: { myTool: {} },
scorers: { myScorer: { sampling: { type: 'ratio', rate: 0.5 } } },
      },
    });

    // Load and use the agent
    const agent = await mastra.getStoredAgentById('my-agent');
    const response = await agent.generate({ messages: 'Hello!' });

    // List all stored agents with pagination
    const { agents, total, hasMore } = await mastra.listStoredAgents({
      page: 0,
      perPage: 10,
    });
    ```

Also adds a memory registry to Mastra so stored agents can reference
memory instances by key.

### Patch Changes

- Add agentId and agentName attributes to MODEL_GENERATION spans. This
allows users to correlate gen_ai.usage metrics with specific agents when
analyzing LLM operation spans. The attributes are exported as
gen_ai.agent.id and gen_ai.agent.name in the OtelExporter.
([#10984](#10984))

- Fix JSON parsing errors when LLMs output unescaped newlines in
structured output strings
([#10965](#10965))

Some LLMs (particularly when not using native JSON mode) output actual
newline characters inside JSON string values instead of properly escaped
`\n` sequences. This breaks JSON parsing and causes structured output to
fail.

This change adds preprocessing to escape unescaped control characters
(`\n`, `\r`, `\t`) within JSON string values before parsing, making
structured output more robust across different LLM providers.

- Fix toolCallId propagation in agent network tool execution. The
toolCallId property was undefined at runtime despite being required by
TypeScript type definitions in AgentToolExecutionContext. Now properly
passes the toolCallId through to the tool's context during network tool
execution. ([#10951](#10951))

- Exports `convertFullStreamChunkToMastra` from the stream module for AI
SDK stream chunk transformations.
([#10911](#10911))

## @mastra/[email protected]

### Minor Changes

- Add stored agents support
([#10953](#10953))

Agents can now be stored in the database and loaded at runtime. This
lets you persist agent configurations and dynamically create executable
Agent instances from storage.

    ```typescript
    import { Mastra } from '@mastra/core';
    import { LibSQLStore } from '@mastra/libsql';

    const mastra = new Mastra({
      storage: new LibSQLStore({ url: ':memory:' }),
      tools: { myTool },
      scorers: { myScorer },
    });

    // Create agent in storage via API or directly
    await mastra.getStorage().createAgent({
      agent: {
        id: 'my-agent',
        name: 'My Agent',
        instructions: 'You are helpful',
        model: { provider: 'openai', name: 'gpt-4' },
        tools: { myTool: {} },
scorers: { myScorer: { sampling: { type: 'ratio', rate: 0.5 } } },
      },
    });

    // Load and use the agent
    const agent = await mastra.getStoredAgentById('my-agent');
    const response = await agent.generate({ messages: 'Hello!' });

    // List all stored agents with pagination
    const { agents, total, hasMore } = await mastra.listStoredAgents({
      page: 0,
      perPage: 10,
    });
    ```

Also adds a memory registry to Mastra so stored agents can reference
memory instances by key.

### Patch Changes

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]

## @mastra/[email protected]

### Minor Changes

- Add stored agents support
([#10953](#10953))

Agents can now be stored in the database and loaded at runtime. This
lets you persist agent configurations and dynamically create executable
Agent instances from storage.

    ```typescript
    import { Mastra } from '@mastra/core';
    import { LibSQLStore } from '@mastra/libsql';

    const mastra = new Mastra({
      storage: new LibSQLStore({ url: ':memory:' }),
      tools: { myTool },
      scorers: { myScorer },
    });

    // Create agent in storage via API or directly
    await mastra.getStorage().createAgent({
      agent: {
        id: 'my-agent',
        name: 'My Agent',
        instructions: 'You are helpful',
        model: { provider: 'openai', name: 'gpt-4' },
        tools: { myTool: {} },
scorers: { myScorer: { sampling: { type: 'ratio', rate: 0.5 } } },
      },
    });

    // Load and use the agent
    const agent = await mastra.getStoredAgentById('my-agent');
    const response = await agent.generate({ messages: 'Hello!' });

    // List all stored agents with pagination
    const { agents, total, hasMore } = await mastra.listStoredAgents({
      page: 0,
      perPage: 10,
    });
    ```

Also adds a memory registry to Mastra so stored agents can reference
memory instances by key.

### Patch Changes

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]

## @mastra/[email protected]

### Minor Changes

- Add stored agents support
([#10953](#10953))

Agents can now be stored in the database and loaded at runtime. This
lets you persist agent configurations and dynamically create executable
Agent instances from storage.

    ```typescript
    import { Mastra } from '@mastra/core';
    import { LibSQLStore } from '@mastra/libsql';

    const mastra = new Mastra({
      storage: new LibSQLStore({ url: ':memory:' }),
      tools: { myTool },
      scorers: { myScorer },
    });

    // Create agent in storage via API or directly
    await mastra.getStorage().createAgent({
      agent: {
        id: 'my-agent',
        name: 'My Agent',
        instructions: 'You are helpful',
        model: { provider: 'openai', name: 'gpt-4' },
        tools: { myTool: {} },
scorers: { myScorer: { sampling: { type: 'ratio', rate: 0.5 } } },
      },
    });

    // Load and use the agent
    const agent = await mastra.getStoredAgentById('my-agent');
    const response = await agent.generate({ messages: 'Hello!' });

    // List all stored agents with pagination
    const { agents, total, hasMore } = await mastra.listStoredAgents({
      page: 0,
      perPage: 10,
    });
    ```

Also adds a memory registry to Mastra so stored agents can reference
memory instances by key.

### Patch Changes

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Return NetworkDataPart on each agent-execution-event and
workflow-execution-event in network streams
([#10982](#10982))

- Fixed tool-call-suspended chunks being dropped in workflow-step-output
when using AI SDK. Previously, when an agent inside a workflow step
called a tool that got suspended, the tool-call-suspended chunk was not
received on the frontend even though tool-input-available chunks were
correctly received.
([#10987](#10987))

The issue occurred because tool-call-suspended was not included in the
isMastraTextStreamChunk list, causing it to be filtered out in
transformWorkflow. Now tool-call-suspended, tool-call-approval, object,
and tripwire chunks are properly included in the text stream chunk list
and will be transformed and passed through correctly.

    Fixes #10978

- Adds `withMastra()` for wrapping AI SDK models with Mastra processors
and memory. ([#10911](#10911))

    ```typescript
    import { openai } from '@ai-sdk/openai';
    import { generateText } from 'ai';
    import { withMastra } from '@mastra/ai-sdk';

    const model = withMastra(openai('gpt-4o'), {
      inputProcessors: [myGuardProcessor],
      outputProcessors: [myLoggingProcessor],
      memory: {
        storage,
        threadId: 'thread-123',
        resourceId: 'user-123',
        lastMessages: 10,
      },
    });

    const { text } = await generateText({ model, prompt: 'Hello!' });
    ```

Works with `generateText`, `streamText`, `generateObject`, and
`streamObject`.

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Fix `saveMessageToMemory` return type to match API response. The
method now correctly returns `{ messages: (MastraMessageV1 |
MastraDBMessage)[] }` instead of `(MastraMessageV1 | MastraDBMessage)[]`
to align with the server endpoint response schema.
([#10996](#10996))

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Updated dependencies
\[[`5a1ede1`](5a1ede1)]:
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`7761c77`](7761c77),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`fdf5a82`](fdf5a82),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]
    -   @mastra/[email protected]
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Add agentId and agentName attributes to MODEL_GENERATION spans. This
allows users to correlate gen_ai.usage metrics with specific agents when
analyzing LLM operation spans. The attributes are exported as
gen_ai.agent.id and gen_ai.agent.name in the OtelExporter.
([#10984](#10984))

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]

## [email protected]

### Patch Changes

- Add `mastra studio` CLI command to serve the built playground as a
static server ([#10283](#10283))

- Fix default value showing on workflow form after user submits
([#10983](#10983))

- Move to @posthog/react which is the actual way to use posthog in
React. It also fixes
([#10967](#10967))

- Move useScorers down to trace page to trigger it once for all trace
spans ([#10985](#10985))

- Update Observability Trace Spans list UI, so a user can
expand/collapse span children/descendants and can filter the list by
span type or name
([#10378](#10378))

- Fix workflow trigger form overflow
([#10986](#10986))

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`7761c77`](7761c77),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Fixed a bug where `[native code]` was incorrectly added to the output
([#10971](#10971))

## [email protected]

### Patch Changes

- Fix default value showing on workflow form after user submits
([#10983](#10983))

- Move useScorers down to trace page to trigger it once for all trace
spans ([#10985](#10985))

- Update Observability Trace Spans list UI, so a user can
expand/collapse span children/descendants and can filter the list by
span type or name
([#10378](#10378))

- Fix workflow trigger form overflow
([#10986](#10986))

## @mastra/[email protected]

### Patch Changes

- Fixed Docker build failure with Bun due to invalid `file://` URLs
([#10960](#10960))

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Add "Not connected" error detection to MCP auto-reconnection
([#10994](#10994))

Enhanced the MCPClient auto-reconnection feature to also detect and
handle "Not connected" protocol errors. When the MCP SDK's transport
layer throws this error (typically when the connection is in a
disconnected state), the client will now automatically reconnect and
retry the operation.

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`fdf5a82`](fdf5a82),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Fix default value showing on workflow form after user submits
([#10983](#10983))

- Move useScorers down to trace page to trigger it once for all trace
spans ([#10985](#10985))

- Update Observability Trace Spans list UI, so a user can
expand/collapse span children/descendants and can filter the list by
span type or name
([#10378](#10378))

- Add UI to match with the mastra studio command
([#10283](#10283))

- Fix workflow trigger form overflow
([#10986](#10986))

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`a54793a`](a54793a),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`5a1ede1`](5a1ede1),
[`92a2ab4`](92a2ab4),
[`0bed332`](0bed332),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]
    -   @mastra/[email protected]
    -   @mastra/[email protected]
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Add HonoApp interface to eliminate `as any` cast when passing Hono app
to MastraServer. Users can now pass typed Hono apps directly without
casting. ([#10846](#10846))

    Fix example type issues in server-adapters

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]
    -   @mastra/[email protected]

## @mastra/[email protected]

### Patch Changes

- Add HonoApp interface to eliminate `as any` cast when passing Hono app
to MastraServer. Users can now pass typed Hono apps directly without
casting. ([#10846](#10846))

    Fix example type issues in server-adapters

- Updated dependencies
\[[`72df8ae`](72df8ae),
[`9198899`](9198899),
[`653e65a`](653e65a),
[`c6fd6fe`](c6fd6fe),
[`0bed332`](0bed332)]:
    -   @mastra/[email protected]
    -   @mastra/[email protected]

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants