@mastra/core 1.1.0-alpha.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/CHANGELOG.md +364 -0
  2. package/dist/agent/index.cjs +8 -8
  3. package/dist/agent/index.js +1 -1
  4. package/dist/{chunk-C6YO523J.cjs → chunk-4ACKGMN2.cjs} +5 -5
  5. package/dist/{chunk-C6YO523J.cjs.map → chunk-4ACKGMN2.cjs.map} +1 -1
  6. package/dist/{chunk-NVRAVZZM.js → chunk-4KQEQ4NM.js} +2 -216
  7. package/dist/chunk-4KQEQ4NM.js.map +1 -0
  8. package/dist/{chunk-O7II2PSR.cjs → chunk-4PERRFZD.cjs} +44 -44
  9. package/dist/{chunk-O7II2PSR.cjs.map → chunk-4PERRFZD.cjs.map} +1 -1
  10. package/dist/{chunk-LMNHODU4.cjs → chunk-4QJBNJI4.cjs} +5 -5
  11. package/dist/{chunk-LMNHODU4.cjs.map → chunk-4QJBNJI4.cjs.map} +1 -1
  12. package/dist/{chunk-UJRSZGKO.js → chunk-BG6DCMO2.js} +6 -4
  13. package/dist/chunk-BG6DCMO2.js.map +1 -0
  14. package/dist/{chunk-SFICZTYL.js → chunk-FVVQY6UU.js} +4 -4
  15. package/dist/{chunk-SFICZTYL.js.map → chunk-FVVQY6UU.js.map} +1 -1
  16. package/dist/{chunk-64LMKFD3.js → chunk-FZZI2V2T.js} +3 -3
  17. package/dist/{chunk-64LMKFD3.js.map → chunk-FZZI2V2T.js.map} +1 -1
  18. package/dist/{chunk-BKUNHQZ4.cjs → chunk-HR67B4UM.cjs} +15 -15
  19. package/dist/{chunk-BKUNHQZ4.cjs.map → chunk-HR67B4UM.cjs.map} +1 -1
  20. package/dist/{chunk-TO7IB5JE.cjs → chunk-MGOFRL36.cjs} +7 -5
  21. package/dist/chunk-MGOFRL36.cjs.map +1 -0
  22. package/dist/{chunk-HKD4NSHR.js → chunk-OSIE5L6N.js} +7 -7
  23. package/dist/{chunk-HKD4NSHR.js.map → chunk-OSIE5L6N.js.map} +1 -1
  24. package/dist/{chunk-QT56V3PE.js → chunk-OW7H7G5N.js} +4 -4
  25. package/dist/{chunk-QT56V3PE.js.map → chunk-OW7H7G5N.js.map} +1 -1
  26. package/dist/{chunk-66462UTX.cjs → chunk-RYVRCT7Z.cjs} +2 -216
  27. package/dist/chunk-RYVRCT7Z.cjs.map +1 -0
  28. package/dist/{chunk-IKS5Z56O.cjs → chunk-SLMSUZBA.cjs} +14 -14
  29. package/dist/{chunk-IKS5Z56O.cjs.map → chunk-SLMSUZBA.cjs.map} +1 -1
  30. package/dist/{chunk-RQGER4J4.js → chunk-VAJRNUEF.js} +3 -3
  31. package/dist/{chunk-RQGER4J4.js.map → chunk-VAJRNUEF.js.map} +1 -1
  32. package/dist/{chunk-EZWVMAC6.cjs → chunk-VNGQXHUE.cjs} +7 -7
  33. package/dist/{chunk-EZWVMAC6.cjs.map → chunk-VNGQXHUE.cjs.map} +1 -1
  34. package/dist/{chunk-SJUNV5AS.js → chunk-YQMDMIP6.js} +3 -3
  35. package/dist/{chunk-SJUNV5AS.js.map → chunk-YQMDMIP6.js.map} +1 -1
  36. package/dist/docs/README.md +1 -1
  37. package/dist/docs/SKILL.md +1 -1
  38. package/dist/docs/SOURCE_MAP.json +109 -109
  39. package/dist/docs/agents/01-overview.md +2 -2
  40. package/dist/docs/evals/01-overview.md +5 -5
  41. package/dist/docs/mcp/01-overview.md +2 -2
  42. package/dist/docs/observability/01-overview.md +1 -1
  43. package/dist/docs/observability/03-overview.md +3 -3
  44. package/dist/docs/rag/01-overview.md +1 -1
  45. package/dist/docs/tools-mcp/01-mcp-overview.md +2 -2
  46. package/dist/docs/voice/01-overview.md +1 -1
  47. package/dist/docs/workflows/01-overview.md +5 -5
  48. package/dist/docs/workspace/01-overview.md +2 -2
  49. package/dist/evals/index.cjs +5 -5
  50. package/dist/evals/index.js +2 -2
  51. package/dist/evals/scoreTraces/index.cjs +3 -3
  52. package/dist/evals/scoreTraces/index.js +1 -1
  53. package/dist/index.cjs +2 -2
  54. package/dist/index.js +1 -1
  55. package/dist/llm/index.cjs +9 -9
  56. package/dist/llm/index.js +2 -2
  57. package/dist/llm/model/provider-types.generated.d.ts +1 -0
  58. package/dist/loop/index.cjs +12 -12
  59. package/dist/loop/index.js +1 -1
  60. package/dist/mastra/index.cjs +2 -2
  61. package/dist/mastra/index.js +1 -1
  62. package/dist/memory/index.cjs +11 -11
  63. package/dist/memory/index.js +1 -1
  64. package/dist/processors/index.cjs +40 -40
  65. package/dist/processors/index.js +1 -1
  66. package/dist/provider-registry-B3CGX3OF.js +3 -0
  67. package/dist/{provider-registry-SQTJTKSM.js.map → provider-registry-B3CGX3OF.js.map} +1 -1
  68. package/dist/provider-registry-CHV3DFFA.cjs +40 -0
  69. package/dist/{provider-registry-JZ6QRIVL.cjs.map → provider-registry-CHV3DFFA.cjs.map} +1 -1
  70. package/dist/provider-registry.json +4 -2
  71. package/dist/relevance/index.cjs +3 -3
  72. package/dist/relevance/index.js +1 -1
  73. package/dist/stream/index.cjs +8 -8
  74. package/dist/stream/index.js +1 -1
  75. package/dist/tool-loop-agent/index.cjs +4 -4
  76. package/dist/tool-loop-agent/index.js +1 -1
  77. package/dist/workflows/evented/index.cjs +10 -10
  78. package/dist/workflows/evented/index.js +1 -1
  79. package/dist/workflows/index.cjs +24 -24
  80. package/dist/workflows/index.js +1 -1
  81. package/dist/workspace/index.cjs +32 -32
  82. package/dist/workspace/index.d.ts +1 -1
  83. package/dist/workspace/index.d.ts.map +1 -1
  84. package/dist/workspace/index.js +1 -1
  85. package/dist/workspace/skills/skill-source.d.ts +1 -13
  86. package/dist/workspace/skills/skill-source.d.ts.map +1 -1
  87. package/dist/workspace/skills/types.d.ts +5 -70
  88. package/dist/workspace/skills/types.d.ts.map +1 -1
  89. package/dist/workspace/skills/workspace-skills.d.ts +2 -19
  90. package/dist/workspace/skills/workspace-skills.d.ts.map +1 -1
  91. package/dist/workspace/workspace.d.ts +0 -12
  92. package/dist/workspace/workspace.d.ts.map +1 -1
  93. package/package.json +7 -7
  94. package/src/llm/model/provider-types.generated.d.ts +1 -0
  95. package/dist/chunk-66462UTX.cjs.map +0 -1
  96. package/dist/chunk-NVRAVZZM.js.map +0 -1
  97. package/dist/chunk-TO7IB5JE.cjs.map +0 -1
  98. package/dist/chunk-UJRSZGKO.js.map +0 -1
  99. package/dist/provider-registry-JZ6QRIVL.cjs +0 -40
  100. package/dist/provider-registry-SQTJTKSM.js +0 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,369 @@
1
1
  # @mastra/core
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Restructured stored agents to use a thin metadata record with versioned configuration snapshots. ([#12488](https://github.com/mastra-ai/mastra/pull/12488))
8
+
9
+ The agent record now only stores metadata fields (id, status, activeVersionId, authorId, metadata, timestamps). All configuration fields (name, instructions, model, tools, etc.) live exclusively in version snapshot rows, enabling full version history and rollback.
10
+
11
+ **Key changes:**
12
+ - Stored Agent records are now thin metadata-only (StorageAgentType)
13
+ - All config lives in version snapshots (StorageAgentSnapshotType)
14
+ - New resolved type (StorageResolvedAgentType) merges agent record + active version config
15
+ - Renamed `ownerId` to `authorId` for multi-tenant filtering
16
+ - Changed `memory` field type from `string` to `Record<string, unknown>`
17
+ - Added `status` field ('draft' | 'published') to agent records
18
+ - Flattened CreateAgent/UpdateAgent input types (config fields at top level, no nested snapshot)
19
+ - Version config columns are top-level in the agent_versions table (no single snapshot jsonb column)
20
+ - List endpoints return resolved agents (thin record + active version config)
21
+ - Auto-versioning on update with retention limits and race condition handling
22
+
23
+ - Added dynamic agent management with CRUD operations and version tracking ([#12038](https://github.com/mastra-ai/mastra/pull/12038))
24
+
25
+ **New Features:**
26
+ - Create, edit, and delete agents directly from the Mastra Studio UI
27
+ - Full version history for agents with compare and restore capabilities
28
+ - Visual diff viewer to compare agent configurations across versions
29
+ - Agent creation modal with comprehensive configuration options (model selection, instructions, tools, workflows, sub-agents, memory)
30
+ - AI-powered instruction enhancement
31
+
32
+ **Storage:**
33
+ - New storage interfaces for stored agents and agent versions
34
+ - PostgreSQL, LibSQL, and MongoDB implementations included
35
+ - In-memory storage for development and testing
36
+
37
+ **API:**
38
+ - RESTful endpoints for agent CRUD operations
39
+ - Version management endpoints (create, list, activate, restore, delete, compare)
40
+ - Automatic versioning on agent updates when enabled
41
+
42
+ **Client SDK:**
43
+ - JavaScript client with full support for stored agents and versions
44
+ - Type-safe methods for all CRUD and version operations
45
+
46
+ **Usage Example:**
47
+
48
+ ```typescript
49
+ // Server-side: Configure storage
50
+ import { Mastra } from '@mastra/core';
51
+ import { PgAgentsStorage } from '@mastra/pg';
52
+
53
+ const mastra = new Mastra({
54
+ agents: { agentOne },
55
+ storage: {
56
+ agents: new PgAgentsStorage({
57
+ connectionString: process.env.DATABASE_URL,
58
+ }),
59
+ },
60
+ });
61
+
62
+ // Client-side: Use the SDK
63
+ import { MastraClient } from '@mastra/client-js';
64
+
65
+ const client = new MastraClient({ baseUrl: 'http://localhost:3000' });
66
+
67
+ // Create a stored agent
68
+ const agent = await client.createStoredAgent({
69
+ name: 'Customer Support Agent',
70
+ description: 'Handles customer inquiries',
71
+ model: { provider: 'ANTHROPIC', name: 'claude-sonnet-4-5' },
72
+ instructions: 'You are a helpful customer support agent...',
73
+ tools: ['search', 'email'],
74
+ });
75
+
76
+ // Create a version snapshot
77
+ await client.storedAgent(agent.id).createVersion({
78
+ name: 'v1.0 - Initial release',
79
+ changeMessage: 'First production version',
80
+ });
81
+
82
+ // Compare versions
83
+ const diff = await client.storedAgent(agent.id).compareVersions('version-1', 'version-2');
84
+ ```
85
+
86
+ **Why:**
87
+ This feature enables teams to manage agents dynamically without code changes, making it easier to iterate on agent configurations and maintain a complete audit trail of changes.
88
+
89
+ - Added unified Workspace API for agent filesystem access, code execution, and search capabilities. ([#11986](https://github.com/mastra-ai/mastra/pull/11986))
90
+
91
+ **New Workspace class** combines filesystem, sandbox, and search into a single interface that agents can use for file operations, command execution, and content search.
92
+
93
+ **Key features:**
94
+ - Filesystem operations (read, write, copy, move, delete) through pluggable providers
95
+ - Code and command execution in secure sandboxed environments with optional OS-level isolation
96
+ - Keyword search, semantic search, and hybrid search modes
97
+ - Skills system for discovering and using SKILL.md instruction files
98
+ - Safety controls including read-before-write guards, approval flows, and read-only mode
99
+
100
+ **Usage:**
101
+
102
+ ```typescript
103
+ import { Workspace, LocalFilesystem, LocalSandbox } from '@mastra/core/workspace';
104
+
105
+ const workspace = new Workspace({
106
+ filesystem: new LocalFilesystem({ basePath: './workspace' }),
107
+ sandbox: new LocalSandbox({ workingDirectory: './workspace' }),
108
+ bm25: true,
109
+ });
110
+
111
+ const agent = new Agent({
112
+ workspace,
113
+ // Agent automatically receives workspace tools
114
+ });
115
+ ```
116
+
117
+ - Added `status` field to `listTraces` response. The status field indicates the trace state: `success` (completed without error), `error` (has error), or `running` (still in progress). This makes it easier to filter and display traces by their current state without having to derive it from the `error` and `endedAt` fields. ([#12213](https://github.com/mastra-ai/mastra/pull/12213))
118
+
119
+ - Added `RequestContext.all` to access the entire `RequestContext` object values. ([#12259](https://github.com/mastra-ai/mastra/pull/12259))
120
+
121
+ ```typescript
122
+ const { userId, featureFlags } = requestContext.all;
123
+ ```
124
+
125
+ Added `requestContextSchema` support to tools, agents, workflows, and steps. Define a Zod schema to validate and type requestContext values at runtime.
126
+
127
+ **Tool example:**
128
+
129
+ ```typescript
130
+ import { createTool } from '@mastra/core/tools';
131
+ import { z } from 'zod';
132
+
133
+ const myTool = createTool({
134
+ id: 'my-tool',
135
+ inputSchema: z.object({ query: z.string() }),
136
+ requestContextSchema: z.object({
137
+ userId: z.string(),
138
+ apiKey: z.string(),
139
+ }),
140
+ execute: async (input, context) => {
141
+ // context.requestContext is typed as RequestContext<{ userId: string, apiKey: string }>
142
+ const userId = context.requestContext?.get('userId');
143
+ return { result: 'success' };
144
+ },
145
+ });
146
+ ```
147
+
148
+ **Agent example:**
149
+
150
+ ```typescript
151
+ import { Agent } from '@mastra/core/agent';
152
+ import { z } from 'zod';
153
+
154
+ const agent = new Agent({
155
+ name: 'my-agent',
156
+ model: openai('gpt-4o'),
157
+ requestContextSchema: z.object({
158
+ userId: z.string(),
159
+ featureFlags: z
160
+ .object({
161
+ debugMode: z.boolean().optional(),
162
+ enableSearch: z.boolean().optional(),
163
+ })
164
+ .optional(),
165
+ }),
166
+ instructions: ({ requestContext }) => {
167
+ // Access validated context values with type safety
168
+ const { userId, featureFlags } = requestContext.all;
169
+
170
+ const baseInstructions = `You are a helpful assistant. The current user ID is: ${userId}.`;
171
+
172
+ if (featureFlags?.debugMode) {
173
+ return `${baseInstructions} Debug mode is enabled - provide verbose responses.`;
174
+ }
175
+
176
+ return baseInstructions;
177
+ },
178
+ tools: ({ requestContext }) => {
179
+ const tools: Record<string, any> = {
180
+ weatherInfo,
181
+ };
182
+
183
+ // Conditionally add tools based on validated feature flags
184
+ const { featureFlags } = requestContext.all;
185
+ if (featureFlags?.enableSearch) {
186
+ tools['web_search_preview'] = openai.tools.webSearchPreview();
187
+ }
188
+
189
+ return tools;
190
+ },
191
+ });
192
+ ```
193
+
194
+ **Workflow example:**
195
+
196
+ ```typescript
197
+ import { createWorkflow } from '@mastra/core/workflows';
198
+ import { z } from 'zod';
199
+
200
+ const workflow = createWorkflow({
201
+ id: 'my-workflow',
202
+ inputSchema: z.object({ data: z.string() }),
203
+ requestContextSchema: z.object({
204
+ tenantId: z.string(),
205
+ }),
206
+ });
207
+
208
+ const step = createStep({
209
+ id: 'my-step',
210
+ description: 'My step description',
211
+ inputSchema: z.object({ data: z.string() }),
212
+ outputSchema: z.object({ result: z.string() }),
213
+ requestContextSchema: z.object({
214
+ userId: z.string(),
215
+ }),
216
+ execute: async ({ inputData, requestContext }) => {
217
+ const userId = requestContext?.get('userId');
218
+ return {
219
+ result: 'some result here',
220
+ };
221
+ },
222
+ });
223
+
224
+ workflow.then(step).commit();
225
+ ```
226
+
227
+ When requestContextSchema is defined, validation runs automatically and throws an error if required context values are missing or invalid.
228
+
229
+ ### Patch Changes
230
+
231
+ - dependencies updates: ([#10184](https://github.com/mastra-ai/mastra/pull/10184))
232
+ - Updated dependency [`@isaacs/ttlcache@^2.1.4` ↗︎](https://www.npmjs.com/package/@isaacs/ttlcache/v/2.1.4) (from `^1.4.1`, in `dependencies`)
233
+
234
+ - Update provider registry and model documentation with latest models and providers ([`1cf5d2e`](https://github.com/mastra-ai/mastra/commit/1cf5d2ea1b085be23e34fb506c80c80a4e6d9c2b))
235
+
236
+ - Fixed skill loading error caused by Zod version conflicts between v3 and v4. Replaced Zod schemas with plain TypeScript validation functions in skill metadata validation. ([#12485](https://github.com/mastra-ai/mastra/pull/12485))
237
+
238
+ - Fix model router routing providers that use non-default AI SDK packages (e.g. `@ai-sdk/anthropic`, `@ai-sdk/openai`) to their correct SDK instead of falling back to `openai-compatible`. Add `cerebras`, `togetherai`, and `deepinfra` as native SDK providers. ([#12450](https://github.com/mastra-ai/mastra/pull/12450))
239
+
240
+ - Make suspendedToolRunId nullable to fix the null issue in tool input validation ([#12303](https://github.com/mastra-ai/mastra/pull/12303))
241
+
242
+ - Fixed agent.network() to properly pass requestContext to workflow runs. Workflow execution now includes user metadata (userId, resourceId) for observability and analytics. (Fixes #12330) ([#12379](https://github.com/mastra-ai/mastra/pull/12379))
243
+
244
+ - Fix ModelRouterLanguageModel to propagate supportedUrls from underlying model providers ([#12167](https://github.com/mastra-ai/mastra/pull/12167))
245
+
246
+ Previously, `ModelRouterLanguageModel` (used when specifying models as strings like `"mistral/mistral-large-latest"` or `"openai/gpt-4o"`) had `supportedUrls` hardcoded as an empty object. This caused Mastra to download all file URLs and convert them to bytes/base64, even when the model provider supports URLs natively.
247
+
248
+ This fix:
249
+ - Changes `supportedUrls` to a lazy `PromiseLike` that resolves the underlying model's supported URL patterns
250
+ - Updates `llm-execution-step.ts` to properly await `supportedUrls` when preparing messages
251
+
252
+ **Impact:**
253
+ - Mistral: PDF URLs are now passed directly (fixes #12152)
254
+ - OpenAI: Image URLs (and PDF URLs in response models) are now passed directly
255
+ - Anthropic: Image URLs are now passed directly
256
+ - Google: Files from Google endpoints are now passed directly
257
+
258
+ **Note:** Users who were relying on Mastra to download files from URLs that model providers cannot directly access (internal URLs, auth-protected URLs) may need to adjust their approach by either using base64-encoded content or ensuring URLs are publicly accessible to the model provider.
259
+
260
+ - Extended readOnly memory option to also apply to working memory. When readOnly: true, working memory data is provided as context but the updateWorkingMemory tool is not available. ([#12471](https://github.com/mastra-ai/mastra/pull/12471))
261
+
262
+ **Example:**
263
+
264
+ ```typescript
265
+ // Working memory is loaded but agent cannot update it
266
+ const response = await agent.generate('What do you know about me?', {
267
+ memory: {
268
+ thread: 'conversation-123',
269
+ resource: 'user-alice-456',
270
+ options: { readOnly: true },
271
+ },
272
+ });
273
+ ```
274
+
275
+ - fix(core): skip non-serializable values in RequestContext.toJSON ([#12344](https://github.com/mastra-ai/mastra/pull/12344))
276
+
277
+ - Fixed TypeScript error when calling bail() in workflow steps. bail() now accepts any value, so workflows can exit early with a custom result. Fixes #12424. ([#12429](https://github.com/mastra-ai/mastra/pull/12429))
278
+
279
+ - Fixed type error when using createTool with Agent when exactOptionalPropertyTypes is enabled in TypeScript config. The ProviderDefinedTool structural type now correctly marks inputSchema as optional and allows execute to be undefined, matching the ToolAction interface. Fixes #12281 ([#12325](https://github.com/mastra-ai/mastra/pull/12325))
280
+
281
+ - Fixed tracingOptions.tags not being preserved when merging defaultOptions with call-site options. Tags set in agent's defaultOptions.tracingOptions are now correctly passed to all observability exporters (Langfuse, Langsmith, Braintrust, Datadog, etc.). Fixes #12209. ([#12220](https://github.com/mastra-ai/mastra/pull/12220))
282
+
283
+ - Added activeTools parameter support to model loop stream. The activeTools parameter can now be passed through the ModelLoopStreamArgs to control which tools are available during LLM execution. ([#12082](https://github.com/mastra-ai/mastra/pull/12082))
284
+
285
+ - Fixed agent network crashing with 'Invalid task input' error when routing agent returns malformed JSON for tool/workflow prompts. The error is now fed back to the routing agent, allowing it to retry with valid JSON on the next iteration. ([#12486](https://github.com/mastra-ai/mastra/pull/12486))
286
+
287
+ - Fixed type error when passing MastraVoice implementations (like OpenAIVoice) directly to Agent's voice config. Previously, the voice property only accepted CompositeVoice, requiring users to wrap their voice provider. Now you can pass any MastraVoice implementation directly. ([#12329](https://github.com/mastra-ai/mastra/pull/12329))
288
+
289
+ **Before (required wrapper):**
290
+
291
+ ```typescript
292
+ const agent = new Agent({
293
+ voice: new CompositeVoice({ output: new OpenAIVoice() }),
294
+ });
295
+ ```
296
+
297
+ **After (direct usage):**
298
+
299
+ ```typescript
300
+ const agent = new Agent({
301
+ voice: new OpenAIVoice(),
302
+ });
303
+ ```
304
+
305
+ Fixes #12293
306
+
307
+ - Fixed output processors not being applied to messages saved during network execution. When using agent.network(), configured output processors (like TraceIdInjector for feedback attribution) are now correctly applied to all messages before they are saved to storage. ([#12346](https://github.com/mastra-ai/mastra/pull/12346))
308
+
309
+ - Removed deprecated Google `text-embedding-004` embedding model from the model router. Google shut down this model on January 14, 2026. Use `google/gemini-embedding-001` instead. ([#12433](https://github.com/mastra-ai/mastra/pull/12433))
310
+
311
+ - Fixed tool input validation failing when LLMs send null for optional fields (#12362). Zod's .optional() only accepts undefined, not null, causing validation errors with Gemini and other LLMs. Validation now retries with null values stripped when the initial attempt fails, so .optional() fields accept null while .nullable() fields continue to work correctly. ([#12396](https://github.com/mastra-ai/mastra/pull/12396))
312
+
313
+ - Tracing fixes: ([#12370](https://github.com/mastra-ai/mastra/pull/12370))
314
+ - Spans now inherit entityType/entityId from the closest non-internal parent (#12250)
315
+ - Processor spans correctly track separate input and output data
316
+ - Model chunk spans are now emitted for all streaming chunks
317
+ - Internal framework spans no longer appear in exported traces
318
+
319
+ - Fixed generated provider types so IDs starting with digits no longer break TypeScript builds ([#12418](https://github.com/mastra-ai/mastra/pull/12418))
320
+
321
+ - Fixed network mode not applying user-configured input/output processors (like token limiters) to the routing agent. This caused unbounded context growth during network iterations. ([#12074](https://github.com/mastra-ai/mastra/pull/12074))
322
+
323
+ User-configured processors are now correctly passed to the routing agent, while memory-derived processors (which could interfere with routing logic) are excluded.
324
+
325
+ Fixes #12016
326
+
327
+ - Fixed repeated build failures caused by stale global cache (~/.cache/mastra/) containing invalid TypeScript in provider-types.generated.d.ts. Provider names starting with digits (e.g. 302ai) are now properly quoted, and the global cache sync validates .d.ts files before copying to prevent corrupted files from overwriting correct ones. ([#12425](https://github.com/mastra-ai/mastra/pull/12425))
328
+
329
+ - Update @isaacs/ttlcache to v2 and fix import for v2 compatibility (changed from default to named export) ([#10184](https://github.com/mastra-ai/mastra/pull/10184))
330
+
331
+ - Fixed custom data parts from writer.custom() breaking subsequent messages with Gemini. Messages containing only data-\* parts no longer produce empty content arrays that cause Gemini to fail with 'must include at least one parts field'. ([#12373](https://github.com/mastra-ai/mastra/pull/12373))
332
+
333
+ - Improve autoresume prompt sent to LLM to ensure gemini resumes well. ([#12320](https://github.com/mastra-ai/mastra/pull/12320))
334
+ Gemini sometimes doesn't use the previous messages to create inputData for the tool to resume, the prompt was updated to make sure it gets the inputData from the suspended tool call.
335
+
336
+ - Fixed sub-agents in Agent Networks seeing completion-check feedback from prior iterations, so delegated agents stay focused on their task. Fixes #12224 ([#12338](https://github.com/mastra-ai/mastra/pull/12338))
337
+
338
+ - Fix TypeScript types for custom API route handlers to include `requestContext` in Hono context Variables. Previously, only `mastra` was typed, causing TypeScript errors when accessing `c.get('requestContext')` even though the runtime correctly provided this context. ([#12419](https://github.com/mastra-ai/mastra/pull/12419))
339
+
340
+ - Let callers cancel a running agent network call and handle abort callbacks. ([#12351](https://github.com/mastra-ai/mastra/pull/12351))
341
+
342
+ **Example**
343
+ Before:
344
+
345
+ ```ts
346
+ const stream = await agent.network(task);
347
+ ```
348
+
349
+ After:
350
+
351
+ ```ts
352
+ const controller = new AbortController();
353
+ const stream = await agent.network(task, {
354
+ abortSignal: controller.signal,
355
+ onAbort: ({ primitiveType, primitiveId }) => {
356
+ logger.info(`Aborted ${primitiveType}:${primitiveId}`);
357
+ },
358
+ });
359
+
360
+ controller.abort();
361
+ ```
362
+
363
+ Related issue: `#12282`
364
+
365
+ ## 1.1.0-alpha.2
366
+
3
367
  ## 1.1.0-alpha.1
4
368
 
5
369
  ### Minor Changes
@@ -1,37 +1,37 @@
1
1
  'use strict';
2
2
 
3
- var chunkIKS5Z56O_cjs = require('../chunk-IKS5Z56O.cjs');
3
+ var chunkSLMSUZBA_cjs = require('../chunk-SLMSUZBA.cjs');
4
4
  var chunkIUODLQMU_cjs = require('../chunk-IUODLQMU.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Agent", {
9
9
  enumerable: true,
10
- get: function () { return chunkIKS5Z56O_cjs.Agent; }
10
+ get: function () { return chunkSLMSUZBA_cjs.Agent; }
11
11
  });
12
12
  Object.defineProperty(exports, "TripWire", {
13
13
  enumerable: true,
14
- get: function () { return chunkIKS5Z56O_cjs.TripWire; }
14
+ get: function () { return chunkSLMSUZBA_cjs.TripWire; }
15
15
  });
16
16
  Object.defineProperty(exports, "isSupportedLanguageModel", {
17
17
  enumerable: true,
18
- get: function () { return chunkIKS5Z56O_cjs.isSupportedLanguageModel; }
18
+ get: function () { return chunkSLMSUZBA_cjs.isSupportedLanguageModel; }
19
19
  });
20
20
  Object.defineProperty(exports, "resolveThreadIdFromArgs", {
21
21
  enumerable: true,
22
- get: function () { return chunkIKS5Z56O_cjs.resolveThreadIdFromArgs; }
22
+ get: function () { return chunkSLMSUZBA_cjs.resolveThreadIdFromArgs; }
23
23
  });
24
24
  Object.defineProperty(exports, "supportedLanguageModelSpecifications", {
25
25
  enumerable: true,
26
- get: function () { return chunkIKS5Z56O_cjs.supportedLanguageModelSpecifications; }
26
+ get: function () { return chunkSLMSUZBA_cjs.supportedLanguageModelSpecifications; }
27
27
  });
28
28
  Object.defineProperty(exports, "tryGenerateWithJsonFallback", {
29
29
  enumerable: true,
30
- get: function () { return chunkIKS5Z56O_cjs.tryGenerateWithJsonFallback; }
30
+ get: function () { return chunkSLMSUZBA_cjs.tryGenerateWithJsonFallback; }
31
31
  });
32
32
  Object.defineProperty(exports, "tryStreamWithJsonFallback", {
33
33
  enumerable: true,
34
- get: function () { return chunkIKS5Z56O_cjs.tryStreamWithJsonFallback; }
34
+ get: function () { return chunkSLMSUZBA_cjs.tryStreamWithJsonFallback; }
35
35
  });
36
36
  Object.defineProperty(exports, "MessageList", {
37
37
  enumerable: true,
@@ -1,4 +1,4 @@
1
- export { Agent, TripWire, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-SFICZTYL.js';
1
+ export { Agent, TripWire, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-FVVQY6UU.js';
2
2
  export { MessageList, TypeDetector, aiV5ModelMessageToV2PromptMessage, convertMessages } from '../chunk-HIP5W3LZ.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkIKS5Z56O_cjs = require('./chunk-IKS5Z56O.cjs');
3
+ var chunkSLMSUZBA_cjs = require('./chunk-SLMSUZBA.cjs');
4
4
  var chunkRIPKI7ON_cjs = require('./chunk-RIPKI7ON.cjs');
5
5
  var chunk4U7ZLI36_cjs = require('./chunk-4U7ZLI36.cjs');
6
6
  var pMap = require('p-map');
@@ -291,7 +291,7 @@ async function runEvals(config) {
291
291
  };
292
292
  }
293
293
  function isWorkflow(target) {
294
- return target instanceof chunkIKS5Z56O_cjs.Workflow;
294
+ return target instanceof chunkSLMSUZBA_cjs.Workflow;
295
295
  }
296
296
  function isWorkflowScorerConfig(scorers) {
297
297
  return typeof scorers === "object" && !Array.isArray(scorers) && ("workflow" in scorers || "steps" in scorers);
@@ -382,7 +382,7 @@ async function executeWorkflow(target, item) {
382
382
  }
383
383
  async function executeAgent(agent, item) {
384
384
  const model = await agent.getModel();
385
- if (chunkIKS5Z56O_cjs.isSupportedLanguageModel(model)) {
385
+ if (chunkSLMSUZBA_cjs.isSupportedLanguageModel(model)) {
386
386
  return await agent.generate(item.input, {
387
387
  scorers: {},
388
388
  returnScorerData: true,
@@ -612,5 +612,5 @@ async function saveSingleScore({
612
612
 
613
613
  exports.createOnScorerHook = createOnScorerHook;
614
614
  exports.runEvals = runEvals;
615
- //# sourceMappingURL=chunk-C6YO523J.cjs.map
616
- //# sourceMappingURL=chunk-C6YO523J.cjs.map
615
+ //# sourceMappingURL=chunk-4ACKGMN2.cjs.map
616
+ //# sourceMappingURL=chunk-4ACKGMN2.cjs.map