fix(deps): update dependency @mastra/core to v1#48
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
from
January 22, 2026 07:20
7b23759 to
4ca1f39
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
3 times, most recently
from
February 4, 2026 22:04
c64fbb8 to
c33d6c8
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
4 times, most recently
from
February 17, 2026 18:41
6ad1902 to
ef06b25
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
4 times, most recently
from
February 26, 2026 00:51
181489a to
7f2bbe9
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
4 times, most recently
from
March 6, 2026 01:33
9583e0f to
bf7edb0
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
4 times, most recently
from
March 18, 2026 05:22
ee1ce1f to
877ff2d
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
3 times, most recently
from
March 26, 2026 17:21
0eeb3ee to
aad6296
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
5 times, most recently
from
April 4, 2026 01:33
be8d060 to
3342730
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
2 times, most recently
from
April 8, 2026 08:36
7283845 to
351503f
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
2 times, most recently
from
May 5, 2026 05:27
90f71f3 to
a7d4d63
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
6 times, most recently
from
May 18, 2026 12:11
60ada13 to
95f67b1
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
3 times, most recently
from
May 27, 2026 17:16
946963a to
1ba24e1
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
6 times, most recently
from
June 4, 2026 16:29
aac0766 to
eb03fc4
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
5 times, most recently
from
June 19, 2026 10:35
5e11def to
85450c8
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
2 times, most recently
from
June 26, 2026 20:35
de611bf to
604431b
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
4 times, most recently
from
July 8, 2026 01:27
14dbfe8 to
2c35c4d
Compare
renovate
Bot
force-pushed
the
renovate/mastra-core-1.x
branch
from
July 12, 2026 19:08
2c35c4d to
e2688bb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.12.1→^1.0.0Release Notes
mastra-ai/mastra (@mastra/core)
v1.52.1Compare Source
Patch Changes
55adddf)v1.52.0Compare Source
Minor Changes
mastra buildnow deploys in one step for push-style deployers. Deployers can opt in with the newdeployOnBuildflag on the deployer contract, and the build runs theirdeploy()right after bundling.SandboxDeployerfrom@mastra/deployer-sandboxopts in, so configuring it meansmastra buildbundles your project, deploys it into the sandbox, and prints the live URL. Existing platform deployers are unchanged. (#19577)mastra build # bundles AND deploys — prints the live URLThe 'workers' option on the Mastra class now merges with the default workers instead of replacing them. Passing custom workers (e.g. a polling worker for an integration) no longer silently drops the built-in orchestration and background-task workers — a custom worker only replaces a default when it shares its name, and 'workers: false' still disables all workers. (#19766)
Added optional provider-driven authorization for system (non-user) actors, enabling per-agent least privilege after tenant scope has been validated. (#19338)
System actors (
actor: { actorKind: 'system' }oractor: true) skip the user-centric FGA path. Previously the only boundary for them was tenant scope — there was no way to constrain which agent could do what, and no deny path. FGA providers can now opt in to enforce least privilege for those actors.What's new
IFGAProvidergains an optionalrequireActor(actor, params)method that throwsFGADeniedErrorto deny.ActorSignalgains optionalagentId,permissions, andscopeso a provider can identify and constrain the acting agent.permissionsreuses theMastraFGAPermissionInputvocabulary — the actor analog of a user's resolved permissions. It is a self-asserted claim: a provider enforcing real least privilege should resolve authoritative grants from a trusted source keyed byagentIdrather than trusting it directly.requireActor, the existing trusted-actor bypass is preserved exactly — this change is fully backward compatible.Before — system actors had tenant scoping but no provider-defined per-agent authorization:
After — a provider enforces least privilege on the acting agent:
Added an optional
networkingcapability andwriteFiles()method to theWorkspaceSandboxinterface. Sandbox providers that expose public port URLs can now implementnetworking.getPortUrl(port), which enables preview URLs and sandbox deploys (see the new@mastra/deployer-sandboxpackage). Use the newsupportsNetworking()type guard to detect the capability at runtime. (#19577)Added
onTitleGeneratedcallback to memory options. WhengenerateTitleis enabled, passonTitleGeneratedin thememoryproperty ofagent.generate()oragent.stream()to be notified when the thread title has been generated and persisted to storage. This is a per-request callback, so each request handler can use its own callback with direct access to its response stream — no storage adapter wrapping needed. (#18998)Example:
Update the experimental AgentController message surface to use the canonical
MastraDBMessageshape. (#18783)The AgentController now emits, persists, and returns DB-native messages where message parts live under
content.parts, terminal status lives undercontent.metadata, and completed tool invocations retain their explicit error state. Signals such as system reminders and notifications now arrive as separate messages withrole: 'signal'instead of being flattened into assistant message content.This affects the experimental AgentController event and session APIs, including
message_start,message_update,message_end,currentMessage,listMessages,listActiveMessages,firstUserMessage, andfirstUserMessages.Added a FactoryStorage contract that owns application storage domains, initializes them with the shared backend, and reports per-domain readiness and initialization errors. (#19681)
Added request-scoped model overrides to agent execution and approvals, and fixed Studio model selection so each tab can use a different model without changing the agent's configured default. (#19749)
Added access to the workspace resolved for an AgentController session. (#19547)
Use the session-owned workspace when an operation must remain isolated to that session:
Mastra Code workspace resolvers can now accept an isolated read-only skill extension:
This lets SDK consumers compose additional read-only skill roots into selected workspaces without changing the default workspace skill set.
Added an optional
clone()method to theWorkspaceSandboxcontract, along with the newSandboxCloneOptionstype.clone()constructs an unstarted sibling sandbox that inherits the template's configuration (credentials, image, resources) with per-instance overrides — without performing any I/O. This lets one configured sandbox act as a template for a fleet of sandbox clones (for example, one per project). (#19616)LocalSandboximplementsclone()out of the box.Added an optional
threadIdparameter to AgentController session creation so hosts can create or resume a session bound to an exact thread ID. (#19758)Added multi-turn support to
runEvals. Data items can now include aninputs: string[]array — each entry is sent sequentially to the agent on the same thread, and scorers see the accumulated output from all turns. (#18395)What changed
RunEvalsDataItemaccepts an optionalinputsarray for multi-turn conversationsagent.generate()with the samethreadId, preserving conversation historyrunEvalsinjects both a sharedthreadIdand aresourceId(Mastra memory scopes messages by resource + thread, so both are needed for recall); the resource defaults to the generated thread and a caller-providedtargetOptions.memory.resourceis preserved.threadis now optional intargetOptions.memorysincerunEvalsowns it.inputsarrays with aMastraErrorAlso added a
turnsAPI for per-turn assertions. Instead of a single holistic score over the accumulated conversation (which can hide a broken follow-up turn), each turn colocates itsinputwithgates/scorersthat evaluate only that turn's input and output. Per-turn outcomes are reported inresult.turnResultsand folded into the overallverdict. When the agent has storage configured, per-turn scorer/gate results are persisted like top-level scores.turnsis Agent-only and mutually exclusive withinput/inputs.Example — holistic multi-turn (
inputs)Example — per-turn assertions (
turns)Patch Changes
dependencies updates: (#19611)
@ai-sdk/provider-utils-v7@​npm:@​ai-sdk/provider-utils@5.0.9↗︎ (fromnpm:@​ai-sdk/provider-utils@5.0.7, independencies)dependencies updates: (#19776)
chat@^4.34.0↗︎ (from^4.29.0, independencies)dependencies updates: (#19813)
@ai-sdk/provider-utils-v5@​npm:@​ai-sdk/provider-utils@3.0.30↗︎ (fromnpm:@​ai-sdk/provider-utils@3.0.28, independencies)@ai-sdk/provider-utils-v6@​npm:@​ai-sdk/provider-utils@4.0.40↗︎ (fromnpm:@​ai-sdk/provider-utils@4.0.38, independencies)@ai-sdk/provider-utils-v7@​npm:@​ai-sdk/provider-utils@5.0.11↗︎ (fromnpm:@​ai-sdk/provider-utils@5.0.9, independencies)Added a public ensureReady() method to FactoryStorageDomain so consumers can initialize a storage domain without going through a global registry. (#19866)
Added a
durablefield toAgentConfigso an agent can opt into durable execution without a separatecreateDurableAgentcall. Settingdurable: true(ordurable: { cache, pubsub, maxSteps, cleanupTimeoutMs }) auto-wraps the agent withcreateDurableAgentwhen it is attached to aMastrainstance; the factory function remains available for advanced use. (#19371)Fixed
new Agent({ durable: true })to actually use the durable execution path when used standalone (without being registered on aMastrainstance). (#19632)Previously,
durable: trueonly took effect when the agent was attached to aMastra. Constructing an agent withdurable: trueand callingagent.stream(...)directly silently ran through the non-durable path.Now
stream,generate,resumeStream,resumeGenerate,approveToolCall,declineToolCall,streamUntilIdle,resume,recover,listActiveRuns,recoverActiveRuns,observe, andprepareall run through the durable execution path on a standalonenew Agent({ durable: true }).Update provider registry and model documentation with latest models and providers (
8a0d145)Fixed model router requests through OpenRouter failing with a 400 "thinking blocks cannot be modified" error when an Anthropic model (e.g. openrouter/anthropic/claude-sonnet-4-6) used extended thinking together with parallel tool calls. The bundled OpenRouter provider was updated from 1.5.4 to 2.10.0, which no longer duplicates reasoning details on each tool call when sending conversation history back to the API. Fixes #19436 (#19493)
Fixed bounded process output stalling other requests while high-volume commands continue streaming. (#19600)
Fixed goal judge results rendering more than once during live goal runs. (#19613)
Ensured that canceled workflow results correctly format and deduplicate their payloads before returning. (#19225)
Fixed fine-grained authorization (FGA) checks for
DurableAgentexecution and tool approvals. (#19338)Durable agents now enforce
agents:executeDurableAgentoverridesstream()andgenerate()to run a workflow instead of the base agent path. Those methods now resolve default and per-call options once, then authorize the same effective actor, request context, and memory resource used for execution.Behavior change: with an FGA provider configured, durable runs that were previously allowed through are now checked and can be denied.
Durable resumes reauthorize each call
Durable approval and decline methods now forward the trusted request context and selected tool-call ID into resume authorization and workflow resume. The actor is resolved for each call and forwarded to both agent authorization and tool execution. An explicit resume actor replaces the initial actor, while a newly resolved default actor can still apply. If neither exists, the resume uses normal user authorization and fails closed when no user is available.
Added optional auth provider capability interfaces and type guards to
@mastra/core/server:IOrganizationsProvider(personal organization bootstrap and admin checks),IAuthInit(host-driven initialization with database, public URL, and allowed origins), andIAuthHttpHandler(mounting a provider's own HTTP auth endpoints). Server hosts can use theisOrganizationsProvider,isAuthHttpHandler, andhasAuthInitguards to detect what an auth provider supports and wire routes accordingly. (#19765)Fixed Babel 8 compatibility for build-time transforms. (#19393)
Fixed caller-supplied tool providers so selected connectionless tools can initialize and manage user connections. (#19872)
Updated the unsupported-adapter error for resource-scoped message listing to include convex in the list of storage adapters that support Observational Memory. (#19474)
Added native structured-output support lookup through the model provider registry. (#19440)
Cap the LLM-provided delegation
maxStepsat the sub-agent's owndefaultOptions.maxSteps. Previously a supervisor's model could silently raise a sub-agent's step budget past its configured default via the delegation tool's optionalmaxStepsargument. The supervisor's model can still reduce the budget, andonDelegationStart'smodifiedMaxSteps(developer code) still overrides the cap. A warning is logged when a value is capped. (#19529)Fixed
requestContexttyping inside a tool'sexecutecallback. It is now non-optional, matching runtime behavior: Mastra always provides aRequestContext(creating an empty one when the caller passed none), and whenrequestContextSchemais defined the context is validated beforeexecuteruns — on failure the tool returns a validation error andexecuteis never called. No more null-checks, throws, or tool factories needed to satisfy the compiler. (#19680)Callers of
tool.execute(...)are unaffected — passing a context remains optional there. Fixes #19480Fixed DurableAgent throwing ToolNotFoundError when a ToolSearchProcessor meta-tool (search_tools / load_tool) was called. The durable tool-call step now resolves processor-injected per-step tools, matching the regular Agent. (#19578)
Improve stored
runEvalsper-turn scores (follow-up to multi-turnturns). Each persisted per-turn scorer/gate result is now labeled with its turn index (metadata.turnIndex), carries the conversation's sharedthreadId, and links to that turn's own trace span instead of the item-level span. This lets the scores UI group and label per-turn scores by conversation and turn, and resolve each score to the correct trace. (#19491)Fixed unbounded memory growth during long goal runs. A goal run chains many agent turns inside one stream, and the stream previously kept every chunk, step, tool result, and text delta of the entire run in memory (and in suspend snapshots). Goal evaluations now carry the goal gate's explicit
shouldContinuedecision, and the stream clears its run-lifetime buffers at each continuing evaluation — the judged turn's messages are already persisted by then. Terminal evaluations (completion, waiting for user, judge failure, budget exhaustion) do not truncate, so the final turn is preserved. (#19663)Behavior change for goal runs: run-end results now cover the final iteration of the run (everything after the last continuing evaluation) instead of every turn. Streamed chunks, token usage totals, and persisted messages are unaffected — only the aggregates resolved at the end of the run change. Agents without a
goalconfig are unaffected.Fixed native Agent goals continuing to invoke the judge after an unretried API error. (#19662)
Fixed
onIterationCompletecallbacks receiving emptytoolResultsafter successful tool execution. Tool results now include the matching call ID, tool name, and output from the completed iteration. Fixes #19453. (#19454)Fixed generated files from AI SDK v7 models (e.g. gpt-image-1 image output) being corrupted in stream output and saved message history. The tagged V4 file data is now converted to the flat shape Mastra's stream pipeline and message storage expect. This covers both
fileandreasoning-fileresponse parts. (#19430)Also fixed handling of URL-backed generated files: the URL is no longer mislabeled as base64 in file chunks, UI message streams now emit the URL directly instead of a broken data URI, and reading
.uint8Arrayon a URL-backed generated file now throws a descriptive error instead of returning garbage.Replaced GitHub-specific Mastra Code session state with Factory project and linked-repository identities. This lets SDK consumers represent sessions independently of a source-control provider and select a repository explicitly when sandbox execution is required. (#19849)
Updated Mastra Code onboarding to be Factory-first: create a Factory by name, then link repositories from your connected source-control installations in a separate step. A Factory is valid with zero linked repositories, and the Board, Metrics, and Audit pages stay available for any server-backed Factory. Factory pages keep project-scoped data separate from repository-scoped intake and provide a repository selector when a Factory has multiple linked repositories. Creating a Factory from a local folder remains available as a secondary option.
Before
After
Fixed goal judges changing the parent agent's observational-memory model state. (#19710)
Fixed durable agent runs continuing after a tool call was denied by authorization. The run now fails immediately instead of letting the model retry the denied tool. (#19886)
Fixed answering an ask_user question failing with a misleading "could not find a suspended run" error when the suspended run died before its state was saved (for example when persisting the suspended snapshot failed). The unresumable question is now retracted, a late answer is ignored, and the original error is surfaced instead. (#19444)
Fixed prebuilt agent signals so callers can supply per-run request context. (#19702)
Fixed Code Mode executions failing when programs return large results or error messages. (#19878)
Aligned A2AAgent streams with the regular Agent stream contract. A2A streams now emit a leading start chunk on fresh runs (skipped when resuming, matching Agent behavior) and the finish chunk now carries the Agent-shaped payload (stepResult.reason, output.usage) so downstream consumers can treat sub-agent streams uniformly. The previous flat finishReason and usage fields are still included for backward compatibility but are deprecated. (#19517)
Updated the bundled provider SDKs used by the model router for Cerebras, DeepInfra, DeepSeek, Perplexity, Together AI, and OpenAI-compatible endpoints (including custom provider URLs and the Netlify gateway) to their AI SDK v6-compatible versions. This aligns them with the other providers in the model router (OpenAI, Anthropic, Google, Groq, Mistral, xAI, OpenRouter) which already use v6-compatible SDKs, and picks up upstream provider fixes. No changes to the public API: model strings like cerebras/llama-3.3-70b or deepseek/deepseek-chat keep working as before. Unused v5-track provider SDK bundles (Groq, Mistral, xAI, and the migrated providers above) were removed from the bundle. (#19495)
Updated embedding model routing to use the AI SDK v6 provider SDKs (OpenAI, Google, and OpenAI-compatible) while preserving the existing embedding interface. Existing embedding model configurations continue to work without code changes. (#19500)
Fixed workflow cancellation for tool-wrapped steps. Cooperative tools can now stop early when
run.cancel()is called. Fixes #19599. (#19602)Added a working directory override when deriving local sandboxes so callers can isolate each derived checkout. (#19907)
Add
jsonPromptInjection: 'auto'to select native structured output when model capability data confirms support and inline JSON prompt injection otherwise. Scorer judges use this automatic path by default while preserving explicitjsonPromptInjectionoverrides and fallback retries for unexpected provider failures. (#19442)Added
checkpointNameto sandbox derive options so providers can attach durable checkpoint identities to derived sandboxes. (#19907)Fixed dataset item writes to reject circular payloads with a clear validation error before storage, instead of failing with database-specific serialization errors. Silently lossy JSON values (nested
undefined, functions, symbols, bigints, and non-finite numbers) and non-plain objects (Date,Map,Set, class instances, and customtoJSON()objects) are now also rejected with the offending path, so identicalexternalIdretries can no longer conflict with the persisted payload. Added a publicsafeStringifyutility for serializing values that may contain circular references. (#19603)Remove leftover branches that selected the evented workflow engine inside the regular
Agentloop. The agentic-execution workflow now always uses the in-process workflow engine, andAgentno longer maintains an ephemeralMastra(with its own pubsub andstartWorkers()lifecycle) just to host the evented path. This removes a class of subtle behavior differences between the two engines fromAgent.stream()/Agent.generate()and simplifies the suspend/resume scope lifecycle. (#18666)No public API changes. The evented workflow infrastructure itself is unchanged and continues to be used by background tasks, notifications, the score-traces workflow, and other subsystems that explicitly opt into it.
Fixed
requestContexttyping in the dynamicskillsagent option. When an agent definesrequestContextSchema, theskillscallback now receives a typedRequestContext(with key autocomplete and typo checking), matchinginstructions,tools,memory, and the other dynamic options. Previously it was alwaysRequestContext<unknown>. (#19554)Fixes #19553
Fixed thread cloning to preserve configured memory state, including observational memory progress. (#19917)
Fix the
createDurableAgentJSDoc examples to constructRedisServerCachewith a connected Redis client ({ client }) instead of a{ url }config the class does not accept. (#19569)Added stable metrics and logs capability reporting for observability storage. The system packages response now includes
observabilityStorageCapabilitieswithmetricsandlogsflags, enabling capability-based detection that is resilient to bundler-generated constructor name changes. (#19305)Studio now uses the capability response instead of relying on constructor names, with a fallback for older servers.
Fixed background tasks never executing when Mastra is used as a library without a Mastra server. Previously, background-eligible tool calls (including background subagent delegations) were dispatched but stayed in the
runningstate forever because the task workers only started with a Mastra server (mastra devor a deployed server). Now the workers start automatically on the first background task dispatch or resume, so background tasks complete in apps that embed Mastra directly (for example Express or Next.js servers). Fixes #19339. (#19476)Fixed durable goal objectives so active execution time is preserved across runs and excludes tool approval waits. (#19837)
Fixed a crash on Cloudflare Workers where calling generate() on an Agent not registered to a Mastra instance threw
TypeError: this.#intervalHandle.unref is not a function. The scheduler now only calls unref() on its polling interval when the runtime provides it (Node.js); on runtimes where setInterval returns a number (workerd) the call is skipped. Fixes #19462. (#19471)Fixed composite storage initialization so transient failures can retry without restarting the process. (#19697)
Moved the server config routes and provider credential helpers into @mastra/factory as a reusable ConfigRoutes class. Route handlers now receive their auth checks through an injected RouteAuth seam and storage domains through constructor options, so hosts other than the Mastra Code web app can mount the same routes. (#19866)
Fixed workspace LSP support for TypeScript 7 projects. Code inspection (diagnostics, hover) now works in workspaces using TypeScript 7, including hoisted monorepo and pnpm installations. No configuration changes are needed — existing
lsp: truesetups keep working, and TypeScript 6 and earlier behavior is unchanged. (#19618)Fixes #19601
Fixed agents with channels failing on Cloudflare Workers with
No such module "chat". (#19570)Agents with Slack, Discord, or Telegram channels now deploy to Cloudflare Workers and other serverless targets without extra configuration — channels initialize correctly and webhooks work out of the box. The
bundler.dynamicPackages: ['chat']workaround is no longer needed for Node deploys. Projects that don't use channels still load the Chat SDK lazily.Fixes #19254
v1.51.0Compare Source
Minor Changes
Added session scoping to
AgentControllerso independent sessions can run in parallel over the same resource (for example one session per git worktree). (#19357)Previously
createSession()was get-or-create byresourceIdalone, so two callers sharing a resource always resolved to the same session — with one run loop, one thread binding, and shared mode/model/state. Passing the newscopeoption creates an independent session per scope:Calls with the same
resourceIdandscopestill resume the same session (get-or-create), and unscoped sessions behave exactly as before.Added support for custom processors on
createScorerjudges. You can now passinputProcessors,outputProcessors,errorProcessors, andmaxProcessorRetriesin a scorer'sjudgeconfig (or per-step judge config) to apply processors to the internal judge agent — for example wiring upStreamErrorRetryProcessorto retry transient LLM errors while scoring. (#19195)Added support for resolving
foreachconcurrency at execution time.concurrencycan now be a function that receives the foreach input and the workflow's init data and returns a number, in addition to a static number: (#19329)Durable agents use this to honor
toolCallConcurrency: parallel tool calls now run concurrently (default 10) instead of always sequentially, while runs that require tool approval or use tools that can suspend still execute tool calls one at a time.Added an option to retry unknown stream errors while allowing known authorization failures to surface immediately, and enabled resilient retries for coding agents. (#19290)
Added:
runEvals()now supports gate-only runs.scorersis optional when at least one gate is provided. (#19348)Added
maxRetryAfterMstoStreamErrorRetryProcessor, with a default of 30 seconds, so providerRetry-Afterwaits can't exceed a configured limit. Aborting during the wait now stops the processor retry before another model request. (#19383)Improved structured-output recovery so transport and provider failures don't trigger JSON prompt injection. Scorer judges that use Mastra's current generation API can use existing error processors for a coordinated retry budget. Legacy model adapters keep their separate
generateLegacy()retry settings.Before
After
Workflow run event topics are now cleaned up automatically. The evented workflow engine deletes each run's
workflow.events.v2.<runId>pub/sub topic shortly after the run reaches a terminal state (success, failure, or cancellation), so persistent transports like Redis Streams no longer accumulate streams from finished workflow runs (#19123). (#19418)clearTopicis now part of thePubSubbase class with a default no-op implementation. Custom transports that retain messages per topic should override it to delete that state:Callers no longer need to probe for the method before calling it —
CachingPubSuband the durable-agent runtime now forwardclearTopicunconditionally.Added anonymous feature usage telemetry for server startup surface counts and a
trackFeatureUsage()API. (#19159)Added atomic caller-defined dataset IDs for idempotent dataset creation across built-in storage adapters. Supplying
idtomastra.datasets.create()now creates the dataset once and resolves compatible retries to the persisted record; incompatible immutable identity fields throwDATASET_ID_CONFLICT. (#19370)Added PROVIDER_TOOL_CALL observability spans for provider-executed tools (e.g. Anthropic code execution, server-side web search). Provider tool input and output are now visible in traces and Studio, with spans anchored to the AGENT_RUN parent. (#19261)
Added the ability to explicitly disable a storage domain on
MastraCompositeStoreby setting it tofalsein thedomainsconfig. A disabled domain no longer falls back to theeditorordefaultstore, so writes for that domain are dropped instead of silently landing in the fallback database. (#19059)prune()also accepts a per-callretentionoption that replaces the configured retention policies for that call only — for example to skip a domain (keep chat history) or prune more aggressively without reconstructing the store:Added the authoritative session scope to agent controller request context for scoped session integrations. (#19446)
Added caller-defined dataset item identities for safe retries across all dataset storage adapters. (#19384)
Dataset items can now include an
externalIdwhen callingaddItemoraddItems:Retrying with the same identity and payload returns the existing item. Reusing an identity with different content returns a typed conflict, including during concurrent writes. Updates and deletes preserve the identity, Spanner retries transactions without changing the outcome, and MySQL batch writes now preserve every supported dataset item field.
Added optional
logandprogressfunctions to the MCP tool execution context type so tools running in an MCP server can send log and progress notifications to the calling client. (#19193)Added
mastra.removeTool(key)to remove a dynamically registered tool from the Mastra instance, the counterpart tomastra.addTool():Added file-system routing for a Mastra logger and per-agent scorers. (#19262)
Define a logger in
src/mastra/logger.ts(default export) and it is auto-registered as the Mastra logger, just likestorage.tsandobservability.ts. A code-registered logger still wins.Register scorers per agent by adding an
agents/<name>/scorers/folder. Each module's default export (aMastraScorer, or a{ scorer, sampling }entry) is wired into that agent, keyed by filename.config.scorerswins on collision.Patch Changes
dependencies updates: (#16699)
@ai-sdk/provider-utils-v5@​npm:@​ai-sdk/provider-utils@3.0.28↗︎ (fromnpm:@​ai-sdk/provider-utils@3.0.25, independencies)@ai-sdk/provider-utils-v6@​npm:@​ai-sdk/provider-utils@4.0.35↗︎ (fromnpm:@​ai-sdk/provider-utils@4.0.27, independencies)@ai-sdk/provider-utils-v7@​npm:@​ai-sdk/provider-utils@5.0.5↗︎ (fromnpm:@​ai-sdk/provider-utils@5.0.0, independencies)@ai-sdk/provider-v6@​npm:@​ai-sdk/provider@3.0.13↗︎ (fromnpm:@​ai-sdk/provider@3.0.10, independencies)@ai-sdk/provider-v7@​npm:@​ai-sdk/provider@4.0.2↗︎ (fromnpm:@​ai-sdk/provider@4.0.0, independencies)dependencies updates: (#19328)
@a2a-js/sdk@~0.3.14↗︎ (from~0.3.13, independencies)dependencies updates: (#19385)
@ai-sdk/provider-utils-v6@​npm:@​ai-sdk/provider-utils@4.0.38↗︎ (fromnpm:@​ai-sdk/provider-utils@4.0.35, independencies)@ai-sdk/provider-utils-v7@​npm:@​ai-sdk/provider-utils@5.0.7↗︎ (fromnpm:@​ai-sdk/provider-utils@5.0.5, independencies)@ai-sdk/provider-v6@​npm:@​ai-sdk/provider@3.0.14↗︎ (fromnpm:@​ai-sdk/provider@3.0.13, independencies)@ai-sdk/provider-v7@​npm:@​ai-sdk/provider@4.0.3↗︎ (fromnpm:@​ai-sdk/provider@4.0.2, independencies)Update provider registry and model documentation with latest models and providers (
fe1bda0)Fixed background-task cancellation so cancelled tasks no longer look completed to the agent, terminal workflow events still surface a valid result when cancellation happens before one is produced, and completed, failed, cancelled, and suspended background tasks each get clearer continuation instructions. (#19255)
Added an optional
scopefield toResolveToolsOptsso tool providers can see a connection's identity bucketing (per-author,shared, orcaller-supplied) when resolving tools. Providers can use this to let the backend auto-resolve an account within a caller's bucket instead of pinning a specific one. The field is optional and defaults to previous behavior when absent. (#19144)Also added an optional
defaultScopetoBaseToolProviderOptions(surfaced on theToolProviderinterface asdefaultScope). This lets an app author set a tool provider's connection scope at config time — for exampledefaultScope: 'caller-supplied'for multi-tenant OAuth — so every connection authorized against the provider is bucketed correctly without any per-connection UI control. Defaults to'per-author'when absent.Fixed —
CachingPubSub.clearTopicnow forwards to the wrapped transport. Because the durable-agent runtime wraps every pubsub inCachingPubSub, clearing a topic previously dropped only the in-memory cache and never told a persistent backend (e.g. Redis Streams) to delete its stream — so finished runs' streams leaked. It now also callsclearTopicon the inner transport when the inner implements it. (#19138)Fixed
MemorygenerateTitlenever firing for durable agents created withcreateEventedAgent(including Inngest). Thread titles now generate and persist on the durable path whengenerateTitleis configured, including when Observational Memory is enabled. Existing thread titles are preserved. (#19315)Fix durable agents orphaning per-step output processor spans. In
createDurableLLMExecutionStep, therunProcessOutputStep(...)call omittedtracingContext(unlike the siblingrunProcessInputStep/runProcessLLMRequestcalls), sooutput step processorprocessor_runspans were created without a parent and appeared as their own root traces — one per LLM step — instead of nesting underMODEL_STEP→AGENT_RUN. PassingtracingContext: modelSpanTracker?.getTracingContext() ?? tracingContextrestores parity with the non-durable path. Fixes #19312. (#19313)Fix
ToolNotFoundErrorfor workspace/skill tools (skill,skill_read,skill_search,mastra_workspace_*) when a durable agent's steps execute on a cross-process engine (e.g. the@mastra/inngestconnect()worker). (#19331)The durable tool-call step resolved tools only from the per-process
globalRunRegistryplus Mastra-instance-level tools, while the sibling LLM-execution step already rebuilds the full toolset from the agent viaresolveRuntimeDependencies/getToolsForExecution. On a worker process the registry is empty, so the model could callskill(the LLM step saw it) but the tool-call step rejected it withToolNotFoundError. The tool-call step now falls back to rebuilding the toolset from the agent (rebuildRunToolsFromMastra) when the registry misses, resolving workspace/skill tools symmetrically cross-process.resolveRuntimeDependenciesalso now rebuildsinputProcessors/outputProcessors(and writes the rebuilt tools + processors back intoglobalRunRegistry) when the registry entry is a cross-process placeholder, so theSkillsProcessorandWorkspaceInstructionsProcessorrun cross-process too — restoring the available-skills list and workspace instructions in the system prompt on the worker.Placeholder registry entries are detected via a new explicit
RunRegistryEntry.isPlaceholderflag (set by@mastra/inngestwhen seeding resume-segment entries) or the absence of a live model instance — never by an emptytoolsmap, which is a legitimate state for agents configureConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.