Changelog
Summary
- Total packages with changes: 16
- Packages with major changes: 0
- Packages with minor changes: 1
- Packages with patch changes: 10
@mastra/ai-sdk@1.0.0-beta.8
Patch Changes
-
Support new Workflow tripwire run status. Tripwires that are thrown from within a workflow will now bubble up and return a graceful state with information about tripwires. (#10947)
When a workflow contains an agent step that triggers a tripwire, the workflow returns with
status: 'tripwire'and includes tripwire details:const run = await workflow.createRun(); const result = await run.start({ inputData: { message: 'Hello' } }); if (result.status === 'tripwire') { console.log('Workflow terminated by tripwire:', result.tripwire?.reason); console.log('Processor ID:', result.tripwire?.processorId); console.log('Retry requested:', result.tripwire?.retry); }
Adds new UI state for tripwire in agent chat and workflow UI.
This is distinct from
status: 'failed'which indicates an unexpected error. A tripwire status means a processor intentionally stopped execution (e.g., for content moderation).
Dependency Updates
- @mastra/core@1.0.0-beta.11
@mastra/chroma@1.0.0-beta.3
Patch Changes
- Adding Chroma's advanced Search API (hybrid serch) (#11046)
Dependency Updates
- @mastra/core@1.0.0-beta.11
@mastra/client-js@1.0.0-beta.11
Patch Changes
-
Support new Workflow tripwire run status. Tripwires that are thrown from within a workflow will now bubble up and return a graceful state with information about tripwires. (#10947)
When a workflow contains an agent step that triggers a tripwire, the workflow returns with
status: 'tripwire'and includes tripwire details:const run = await workflow.createRun(); const result = await run.start({ inputData: { message: 'Hello' } }); if (result.status === 'tripwire') { console.log('Workflow terminated by tripwire:', result.tripwire?.reason); console.log('Processor ID:', result.tripwire?.processorId); console.log('Retry requested:', result.tripwire?.retry); }
Adds new UI state for tripwire in agent chat and workflow UI.
This is distinct from
status: 'failed'which indicates an unexpected error. A tripwire status means a processor intentionally stopped execution (e.g., for content moderation).
Dependency Updates
- @mastra/core@1.0.0-beta.11
@mastra/core@1.0.0-beta.11
Minor Changes
- Respect structured outputs for v2 models so tool schemas aren’t stripped (#11038)
Patch Changes
-
Fix type safety for message ordering - restrict
orderByto only accept'createdAt'field (#11069)Messages don't have an
updatedAtfield, but the previous type allowed ordering by it, which would return empty results. This change adds compile-time type safety by makingStorageOrderBygeneric and restrictingStorageListMessagesInput.orderByto only accept'createdAt'. The API validation schemas have also been updated to reject invalid orderBy values at runtime. -
Loosen tools types in processInputStep / prepareStep. (#11071)
-
Added the ability to provide a base path for Mastra Studio. (#10441)
import { Mastra } from '@mastra/core'; export const mastra = new Mastra({ server: { studioBase: '/my-mastra-studio', }, });
This will make Mastra Studio available at
http://localhost:4111/my-mastra-studio. -
Expand
processInputStepprocessor method and integrateprepareStepas a processor (#10774)New Features:
prepareStepcallback now runs through the standardprocessInputSteppipeline- Processors can now modify per-step:
model,tools,toolChoice,activeTools,messages,systemMessages,providerOptions,modelSettings, andstructuredOutput - Processor chaining: each processor receives accumulated state from previous processors
- System messages are isolated per-step (reset at start of each step)
Breaking Change:
prepareStepmessages format changed from AI SDK v5 model messages toMastraDBMessageformat- Migration: Use
messageList.get.all.aiV5.model()if you need the old format
-
Multiple Processor improvements including: (#10947)
- Workflows can now return tripwires, they bubble up from agents that return tripwires in a step
- You can write processors as workflows using the existing Workflow primitive, every processor flow is now a workflow.
- tripwires that you throw can now return additional information including ability to retry the step
- New processor method
processOutputStepadded which runs after every step.
What's new:
1. Retry mechanism with LLM feedback - Processors can now request retries with feedback that gets sent back to the LLM:
processOutputStep: async ({ text, abort, retryCount }) => { if (isLowQuality(text)) { abort('Response quality too low', { retry: true, metadata: { score: 0.6 } }); } return []; };
Configure with
maxProcessorRetries(default: 3). Rejected steps are preserved inresult.steps[n].tripwire. Retries are only available inprocessOutputStepandprocessInputStep. It will replay the step with additional context added.2. Workflow orchestration for processors - Processors can now be composed using workflow primitives:
import { createStep, createWorkflow } from '@mastra/core/workflows'; import { ProcessorStepSchema, } from '@mastra/core/processors'; const moderationWorkflow = createWorkflow({ id: 'moderation', inputSchema: ProcessorStepSchema, outputSchema: ProcessorStepSchema }) .then(createStep(new lengthValidator({...}))) .parallel([createStep(new piiDetector({...}), createStep(new toxicityChecker({...}))]) .commit(); const agent = new Agent({ inputProcessors: [moderationWorkflow] });
Every processor array that gets passed to an agent gets added as a workflow
3. Extended tripwire API -
abort()now accepts options for retry control and typed metadata:abort('reason', { retry: true, metadata: { score: 0.8, category: 'quality' } });
4. New
processOutputStepmethod - Per-step output processing with access to step number, finish reason, tool calls, and retry count.5. Workflow tripwire status - Workflows now have a
'tripwire'status distinct from'failed', properly bubbling up processor rejections.
@mastra/dane@1.0.0-beta.11
Dependency Updates
- @mastra/core@1.0.0-beta.11
@mastra/deployer@1.0.0-beta.11
Patch Changes
- Internal changes to enable a custom base path for Mastra Studio (#10441)
Dependency Updates
- @mastra/server@1.0.0-beta.11
- @mastra/core@1.0.0-beta.11
@mastra/deployer-cloud@1.0.0-beta.11
Dependency Updates
- @mastra/core@1.0.0-beta.11
- @mastra/deployer@1.0.0-beta.11
@mastra/express@0.0.2-beta.6
Dependency Updates
- @mastra/server@1.0.0-beta.11
- @mastra/core@1.0.0-beta.11
@mastra/hono@0.0.2-beta.6
Dependency Updates
- @mastra/server@1.0.0-beta.11
- @mastra/core@1.0.0-beta.11
@mastra/inngest@1.0.0-beta.6
Patch Changes
-
Support new Workflow tripwire run status. Tripwires that are thrown from within a workflow will now bubble up and return a graceful state with information about tripwires. (#10947)
When a workflow contains an agent step that triggers a tripwire, the workflow returns with
status: 'tripwire'and includes tripwire details:const run = await workflow.createRun(); const result = await run.start({ inputData: { message: 'Hello' } }); if (result.status === 'tripwire') { console.log('Workflow terminated by tripwire:', result.tripwire?.reason); console.log('Processor ID:', result.tripwire?.processorId); console.log('Retry requested:', result.tripwire?.retry); }
Adds new UI state for tripwire in agent chat and workflow UI.
This is distinct from
status: 'failed'which indicates an unexpected error. A tripwire status means a processor intentionally stopped execution (e.g., for content moderation).
Dependency Updates
- @mastra/core@1.0.0-beta.11
@mastra/longmemeval@1.0.0-beta.11
Dependency Updates
- @mastra/core@1.0.0-beta.11
@mastra/mcp-docs-server@1.0.0-beta.11
Dependency Updates
- @mastra/core@1.0.0-beta.11
@mastra/playground-ui@7.0.0-beta.11
Patch Changes
-
Support new Workflow tripwire run status. Tripwires that are thrown from within a workflow will now bubble up and return a graceful state with information about tripwires. (#10947)
When a workflow contains an agent step that triggers a tripwire, the workflow returns with
status: 'tripwire'and includes tripwire details:const run = await workflow.createRun(); const result = await run.start({ inputData: { message: 'Hello' } }); if (result.status === 'tripwire') { console.log('Workflow terminated by tripwire:', result.tripwire?.reason); console.log('Processor ID:', result.tripwire?.processorId); console.log('Retry requested:', result.tripwire?.retry); }
Adds new UI state for tripwire in agent chat and workflow UI.
This is distinct from
status: 'failed'which indicates an unexpected error. A tripwire status means a processor intentionally stopped execution (e.g., for content moderation).
Dependency Updates
- @mastra/core@1.0.0-beta.11
- @mastra/client-js@1.0.0-beta.11
- @mastra/ai-sdk@1.0.0-beta.8
- @mastra/react@0.1.0-beta.11
@mastra/react-hooks@0.1.0-beta.11
Patch Changes
-
Support new Workflow tripwire run status. Tripwires that are thrown from within a workflow will now bubble up and return a graceful state with information about tripwires. (#10947)
When a workflow contains an agent step that triggers a tripwire, the workflow returns with
status: 'tripwire'and includes tripwire details:const run = await workflow.createRun(); const result = await run.start({ inputData: { message: 'Hello' } }); if (result.status === 'tripwire') { console.log('Workflow terminated by tripwire:', result.tripwire?.reason); console.log('Processor ID:', result.tripwire?.processorId); console.log('Retry requested:', result.tripwire?.retry); }
Adds new UI state for tripwire in agent chat and workflow UI.
This is distinct from
status: 'failed'which indicates an unexpected error. A tripwire status means a processor intentionally stopped execution (e.g., for content moderation).
Dependency Updates
- @mastra/client-js@1.0.0-beta.11
@mastra/server@1.0.0-beta.11
Patch Changes
-
Fix type safety for message ordering - restrict
orderByto only accept'createdAt'field (#11069)Messages don't have an
updatedAtfield, but the previous type allowed ordering by it, which would return empty results. This change adds compile-time type safety by makingStorageOrderBygeneric and restrictingStorageListMessagesInput.orderByto only accept'createdAt'. The API validation schemas have also been updated to reject invalid orderBy values at runtime. -
Support new Workflow tripwire run status. Tripwires that are thrown from within a workflow will now bubble up and return a graceful state with information about tripwires. (#10947)
When a workflow contains an agent step that triggers a tripwire, the workflow returns with
status: 'tripwire'and includes tripwire details:const run = await workflow.createRun(); const result = await run.start({ inputData: { message: 'Hello' } }); if (result.status === 'tripwire') { console.log('Workflow terminated by tripwire:', result.tripwire?.reason); console.log('Processor ID:', result.tripwire?.processorId); console.log('Retry requested:', result.tripwire?.retry); }
Adds new UI state for tripwire in agent chat and workflow UI.
This is distinct from
status: 'failed'which indicates an unexpected error. A tripwire status means a processor intentionally stopped execution (e.g., for content moderation).
Dependency Updates
- @mastra/core@1.0.0-beta.11
mastra@1.0.0-beta.9
Patch Changes
-
Allow to run mastra studio from anywhere in the file system, and not necessarily inside a mastra project (#11067)
-
Make sure to verify that a mastra instance is running on server.port OR 4111 by default (#11066)
-
Internal changes to enable a custom base path for Mastra Studio (#10441)
Dependency Updates
- @mastra/core@1.0.0-beta.11
- @mastra/deployer@1.0.0-beta.11