@mastra/core 1.12.0-alpha.1 → 1.12.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.
- package/CHANGELOG.md +76 -0
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-AYY53K5U.js → chunk-2L36MODM.js} +8 -8
- package/dist/{chunk-AYY53K5U.js.map → chunk-2L36MODM.js.map} +1 -1
- package/dist/{chunk-4SC7MK5N.cjs → chunk-2UHXUHSR.cjs} +3 -3
- package/dist/chunk-2UHXUHSR.cjs.map +1 -0
- package/dist/{chunk-WAYW4XXU.js → chunk-3DOH3KHI.js} +3 -3
- package/dist/{chunk-WAYW4XXU.js.map → chunk-3DOH3KHI.js.map} +1 -1
- package/dist/{chunk-4POZDJED.cjs → chunk-3XXUO7YO.cjs} +5 -5
- package/dist/{chunk-4POZDJED.cjs.map → chunk-3XXUO7YO.cjs.map} +1 -1
- package/dist/{chunk-MTCRY2PC.js → chunk-4QKVDADY.js} +4 -4
- package/dist/{chunk-MTCRY2PC.js.map → chunk-4QKVDADY.js.map} +1 -1
- package/dist/{chunk-QJQ6RYV5.js → chunk-6A7SLHXA.js} +6 -6
- package/dist/{chunk-QJQ6RYV5.js.map → chunk-6A7SLHXA.js.map} +1 -1
- package/dist/{chunk-CMFIKADF.js → chunk-A32XIAUN.js} +4 -4
- package/dist/{chunk-CMFIKADF.js.map → chunk-A32XIAUN.js.map} +1 -1
- package/dist/{chunk-JH5GHHUZ.cjs → chunk-D4J2VJUO.cjs} +185 -185
- package/dist/{chunk-JH5GHHUZ.cjs.map → chunk-D4J2VJUO.cjs.map} +1 -1
- package/dist/{chunk-O4E6U7NN.js → chunk-HWDSIVFC.js} +3 -3
- package/dist/{chunk-O4E6U7NN.js.map → chunk-HWDSIVFC.js.map} +1 -1
- package/dist/{chunk-CWJV5GRS.cjs → chunk-JSO5KLBR.cjs} +47 -47
- package/dist/{chunk-CWJV5GRS.cjs.map → chunk-JSO5KLBR.cjs.map} +1 -1
- package/dist/{chunk-RX3XSMQ6.cjs → chunk-LB6UVXR3.cjs} +15 -15
- package/dist/{chunk-RX3XSMQ6.cjs.map → chunk-LB6UVXR3.cjs.map} +1 -1
- package/dist/{chunk-UJI6HHMX.js → chunk-MLK5KLXR.js} +3 -3
- package/dist/{chunk-UJI6HHMX.js.map → chunk-MLK5KLXR.js.map} +1 -1
- package/dist/{chunk-7ATYYTGM.cjs → chunk-NUADNBOA.cjs} +23 -23
- package/dist/{chunk-7ATYYTGM.cjs.map → chunk-NUADNBOA.cjs.map} +1 -1
- package/dist/{chunk-NGAN3VOO.cjs → chunk-ODT3MVVH.cjs} +11 -11
- package/dist/{chunk-NGAN3VOO.cjs.map → chunk-ODT3MVVH.cjs.map} +1 -1
- package/dist/{chunk-WEEADKXC.cjs → chunk-OXIZZSG6.cjs} +5 -5
- package/dist/{chunk-WEEADKXC.cjs.map → chunk-OXIZZSG6.cjs.map} +1 -1
- package/dist/{chunk-GUI2LTDU.js → chunk-P4DK273M.js} +3 -3
- package/dist/chunk-P4DK273M.js.map +1 -0
- package/dist/{chunk-U7YDNYVZ.cjs → chunk-PAG4CVFB.cjs} +7 -7
- package/dist/{chunk-U7YDNYVZ.cjs.map → chunk-PAG4CVFB.cjs.map} +1 -1
- package/dist/{chunk-KHPGA3VF.js → chunk-RYCDAHX5.js} +3 -3
- package/dist/{chunk-KHPGA3VF.js.map → chunk-RYCDAHX5.js.map} +1 -1
- package/dist/{chunk-KTBWIBZP.cjs → chunk-SA7V4OM5.cjs} +6 -6
- package/dist/{chunk-KTBWIBZP.cjs.map → chunk-SA7V4OM5.cjs.map} +1 -1
- package/dist/{chunk-SAVFOVUX.js → chunk-UI5N5FHK.js} +3 -3
- package/dist/{chunk-SAVFOVUX.js.map → chunk-UI5N5FHK.js.map} +1 -1
- package/dist/{chunk-OPBM63LG.js → chunk-VNKHE54C.js} +4 -4
- package/dist/{chunk-OPBM63LG.js.map → chunk-VNKHE54C.js.map} +1 -1
- package/dist/{chunk-FPY4EOYB.cjs → chunk-X2S5HXXQ.cjs} +9 -9
- package/dist/{chunk-FPY4EOYB.cjs.map → chunk-X2S5HXXQ.cjs.map} +1 -1
- package/dist/datasets/index.cjs +11 -11
- package/dist/datasets/index.js +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +119 -119
- package/dist/evals/index.cjs +5 -5
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +3 -3
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/harness/index.cjs +7 -7
- package/dist/harness/index.js +5 -5
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +16 -16
- package/dist/llm/index.js +5 -5
- package/dist/loop/index.cjs +14 -14
- package/dist/loop/index.js +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +14 -14
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-AVEJFPY5.js +3 -0
- package/dist/{models-dev-UQRBYQIJ.js.map → models-dev-AVEJFPY5.js.map} +1 -1
- package/dist/models-dev-RSFHTZ4H.cjs +12 -0
- package/dist/{models-dev-UYDSOBAY.cjs.map → models-dev-RSFHTZ4H.cjs.map} +1 -1
- package/dist/netlify-BIIVV552.js +3 -0
- package/dist/{netlify-2URRIQAZ.js.map → netlify-BIIVV552.js.map} +1 -1
- package/dist/netlify-JJWGNYD7.cjs +12 -0
- package/dist/{netlify-2JRRF52G.cjs.map → netlify-JJWGNYD7.cjs.map} +1 -1
- package/dist/processor-provider/index.cjs +10 -10
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +42 -42
- package/dist/processors/index.js +1 -1
- package/dist/provider-registry-TSYPQTXD.cjs +40 -0
- package/dist/{provider-registry-UEOWH3UX.cjs.map → provider-registry-TSYPQTXD.cjs.map} +1 -1
- package/dist/provider-registry-WSY2YL3E.js +3 -0
- package/dist/{provider-registry-Z7VQHDYA.js.map → provider-registry-WSY2YL3E.js.map} +1 -1
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/stream/index.cjs +8 -8
- package/dist/stream/index.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +24 -24
- package/dist/workflows/index.js +1 -1
- package/package.json +10 -10
- package/dist/chunk-4SC7MK5N.cjs.map +0 -1
- package/dist/chunk-GUI2LTDU.js.map +0 -1
- package/dist/models-dev-UQRBYQIJ.js +0 -3
- package/dist/models-dev-UYDSOBAY.cjs +0 -12
- package/dist/netlify-2JRRF52G.cjs +0 -12
- package/dist/netlify-2URRIQAZ.js +0 -3
- package/dist/provider-registry-UEOWH3UX.cjs +0 -40
- package/dist/provider-registry-Z7VQHDYA.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,81 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
+
## 1.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- MCP tool calls now use `MCP_TOOL_CALL` span type instead of `TOOL_CALL` in traces. `CoreToolBuilder` detects `mcpMetadata` on tools and creates spans with MCP server name, version, and tool description attributes. ([#13274](https://github.com/mastra-ai/mastra/pull/13274))
|
|
8
|
+
|
|
9
|
+
- **Absolute paths now resolve to real filesystem locations instead of being treated as workspace-relative.** ([#13804](https://github.com/mastra-ai/mastra/pull/13804))
|
|
10
|
+
|
|
11
|
+
Previously, `LocalFilesystem` in contained mode treated absolute paths like `/file.txt` as shorthand for `basePath/file.txt` (a "virtual-root" convention). This could silently resolve paths to unexpected locations — for example, `/home/user/.config/file.txt` would resolve to `basePath/home/user/.config/file.txt` instead of the real path.
|
|
12
|
+
|
|
13
|
+
Now:
|
|
14
|
+
- **Absolute paths** (starting with `/`) are real filesystem paths, subject to containment checks
|
|
15
|
+
- **Relative paths** (e.g., `file.txt`, `src/index.ts`) resolve against `basePath`
|
|
16
|
+
- **Tilde paths** (e.g., `~/Documents`) expand to the home directory
|
|
17
|
+
|
|
18
|
+
### Migration
|
|
19
|
+
|
|
20
|
+
If your code passes paths like `/file.txt` to workspace filesystem methods expecting them to resolve relative to `basePath`, change them to relative paths:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
// Before
|
|
24
|
+
await filesystem.readFile('/src/index.ts');
|
|
25
|
+
|
|
26
|
+
// After
|
|
27
|
+
await filesystem.readFile('src/index.ts');
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Also fixed:
|
|
31
|
+
- `allowedPaths` resolving against the working directory instead of `basePath`, causing unexpected permission errors when `basePath` differed from `cwd`
|
|
32
|
+
- Permission errors when accessing paths under `allowedPaths` directories that don't exist yet (e.g., during skills discovery)
|
|
33
|
+
|
|
34
|
+
- Changed `ProcessHandle.pid` type from `number` to `string` to support sandbox providers that use non-numeric process identifiers (e.g., session IDs). ([#13591](https://github.com/mastra-ai/mastra/pull/13591))
|
|
35
|
+
|
|
36
|
+
**Before:**
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
const handle = await sandbox.processes.spawn('node server.js');
|
|
40
|
+
handle.pid; // number
|
|
41
|
+
await sandbox.processes.get(42);
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**After:**
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
const handle = await sandbox.processes.spawn('node server.js');
|
|
48
|
+
handle.pid; // string (e.g., '1234' for local, 'session-abc' for Daytona)
|
|
49
|
+
await sandbox.processes.get('1234');
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- Added a `mastra/<version>` User-Agent header to all provider API requests (OpenAI, Anthropic, Google, Mistral, Groq, xAI, DeepSeek, and others) across models.dev, Netlify, and Azure gateways for better traffic attribution. ([#13087](https://github.com/mastra-ai/mastra/pull/13087))
|
|
55
|
+
|
|
56
|
+
- Update provider registry and model documentation with latest models and providers ([`9cede11`](https://github.com/mastra-ai/mastra/commit/9cede110abac9d93072e0521bb3c8bcafb9fdadf))
|
|
57
|
+
|
|
58
|
+
- Fixed processor-triggered aborts not appearing in traces. Processor spans now include abort details (reason, retry flag, metadata) and agent-level spans capture the same information when an abort short-circuits the agent run. This makes guardrail and processor aborts fully visible in tracing dashboards. ([#14038](https://github.com/mastra-ai/mastra/pull/14038))
|
|
59
|
+
|
|
60
|
+
- Fix agent loop not continuing when `onIterationComplete` returns `continue: true` ([#14170](https://github.com/mastra-ai/mastra/pull/14170))
|
|
61
|
+
|
|
62
|
+
- Fixed exponential token growth during multi-step agent workflows by implementing `processInputStep` on `TokenLimiterProcessor` and removing the redundant `processInput` method. Token-based message pruning now runs at every step of the agentic loop (including tool call continuations), keeping the in-memory message list within budget before each LLM call. Also refactored Tiktoken encoder to use the shared global singleton from `getTiktoken()` instead of creating a new instance per processor. ([#13929](https://github.com/mastra-ai/mastra/pull/13929))
|
|
63
|
+
|
|
64
|
+
- Sub-agents with `defaultOptions.memory` configurations were having their memory settings overridden when called as tools from a parent agent. The parent unconditionally passed its own `memory` option (with newly generated thread/resource IDs), which replaced the sub-agent's intended memory configuration due to shallow object merging. ([#11561](https://github.com/mastra-ai/mastra/pull/11561))
|
|
65
|
+
|
|
66
|
+
This fix checks if the sub-agent has its own `defaultOptions.memory` before applying parent-derived memory settings. Sub-agents without their own memory config continue to receive parent-derived IDs as a fallback.
|
|
67
|
+
|
|
68
|
+
No code changes required for consumers - sub-agents with explicit `defaultOptions.memory` will now work correctly when used via the `agents: {}` option.
|
|
69
|
+
|
|
70
|
+
- Fixed listConfiguredInputProcessors() and listConfiguredOutputProcessors() returning a combined workflow instead of individual processors. Previously, these methods wrapped all configured processors into a single committed workflow, making it impossible to inspect or look up processors by ID. Now they return the raw flat array of configured processors as intended. ([#14158](https://github.com/mastra-ai/mastra/pull/14158))
|
|
71
|
+
|
|
72
|
+
- `fetchWithRetry` now backs off in sequence 2s → 4s → 8s and then caps at 10s. ([#14159](https://github.com/mastra-ai/mastra/pull/14159))
|
|
73
|
+
|
|
74
|
+
- Preserve trace continuity across workflow suspend/resume for workflows run by the default engine, so resumed workflows appear as children of the original span in tracing tools. ([#12276](https://github.com/mastra-ai/mastra/pull/12276))
|
|
75
|
+
|
|
76
|
+
- Updated dependencies [[`709362d`](https://github.com/mastra-ai/mastra/commit/709362d67b80d8832729bbf9e449cad27640a5d2), [`787f3ac`](https://github.com/mastra-ai/mastra/commit/787f3ac08b3bb77413645a7ab5c447fa851708fd)]:
|
|
77
|
+
- @mastra/schema-compat@1.2.1
|
|
78
|
+
|
|
3
79
|
## 1.12.0-alpha.1
|
|
4
80
|
|
|
5
81
|
### Minor Changes
|
package/dist/agent/index.cjs
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkODT3MVVH_cjs = require('../chunk-ODT3MVVH.cjs');
|
|
4
4
|
var chunkEC7VTYRY_cjs = require('../chunk-EC7VTYRY.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "Agent", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkODT3MVVH_cjs.Agent; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "TripWire", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkODT3MVVH_cjs.TripWire; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "isSupportedLanguageModel", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkODT3MVVH_cjs.isSupportedLanguageModel; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "resolveThreadIdFromArgs", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkODT3MVVH_cjs.resolveThreadIdFromArgs; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "supportedLanguageModelSpecifications", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkODT3MVVH_cjs.supportedLanguageModelSpecifications; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "tryGenerateWithJsonFallback", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkODT3MVVH_cjs.tryGenerateWithJsonFallback; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "tryStreamWithJsonFallback", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkODT3MVVH_cjs.tryStreamWithJsonFallback; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "MessageList", {
|
|
37
37
|
enumerable: true,
|
package/dist/agent/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Agent, TripWire, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-
|
|
1
|
+
export { Agent, TripWire, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-HWDSIVFC.js';
|
|
2
2
|
export { MessageList, TypeDetector, aiV5ModelMessageToV2PromptMessage, convertMessages } from '../chunk-SQSIGHYW.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { WorkflowEventProcessor } from './chunk-
|
|
2
|
-
import { isToolLoopAgentLike, toolLoopAgentToMastraAgent } from './chunk-
|
|
3
|
-
import { DatasetsManager } from './chunk-
|
|
4
|
-
import { createOnScorerHook } from './chunk-
|
|
5
|
-
import { augmentWithInit } from './chunk-
|
|
1
|
+
import { WorkflowEventProcessor } from './chunk-3DOH3KHI.js';
|
|
2
|
+
import { isToolLoopAgentLike, toolLoopAgentToMastraAgent } from './chunk-A32XIAUN.js';
|
|
3
|
+
import { DatasetsManager } from './chunk-VNKHE54C.js';
|
|
4
|
+
import { createOnScorerHook } from './chunk-RYCDAHX5.js';
|
|
5
|
+
import { augmentWithInit } from './chunk-HWDSIVFC.js';
|
|
6
6
|
import { registerHook } from './chunk-L54GIUCB.js';
|
|
7
7
|
import { noopLogger } from './chunk-PSCMWPLC.js';
|
|
8
8
|
import { InMemoryServerCache } from './chunk-GMSAGYTB.js';
|
|
@@ -2554,7 +2554,7 @@ var Mastra = class {
|
|
|
2554
2554
|
if (process.env.MASTRA_DEV !== "true" && process.env.MASTRA_DEV !== "1") {
|
|
2555
2555
|
return;
|
|
2556
2556
|
}
|
|
2557
|
-
import('./provider-registry-
|
|
2557
|
+
import('./provider-registry-WSY2YL3E.js').then(async ({ GatewayRegistry }) => {
|
|
2558
2558
|
const registry = GatewayRegistry.getInstance();
|
|
2559
2559
|
const customGateways = Object.values(this.#gateways || {});
|
|
2560
2560
|
registry.registerCustomGateways(customGateways);
|
|
@@ -2608,5 +2608,5 @@ var Mastra = class {
|
|
|
2608
2608
|
};
|
|
2609
2609
|
|
|
2610
2610
|
export { Mastra };
|
|
2611
|
-
//# sourceMappingURL=chunk-
|
|
2612
|
-
//# sourceMappingURL=chunk-
|
|
2611
|
+
//# sourceMappingURL=chunk-2L36MODM.js.map
|
|
2612
|
+
//# sourceMappingURL=chunk-2L36MODM.js.map
|