@mastra/core 1.14.0-alpha.3 → 1.14.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 (102) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/agent/index.cjs +8 -8
  3. package/dist/agent/index.js +1 -1
  4. package/dist/{chunk-NUIDV2VL.js → chunk-42TT3VF3.js} +3 -3
  5. package/dist/{chunk-NUIDV2VL.js.map → chunk-42TT3VF3.js.map} +1 -1
  6. package/dist/{chunk-EEEPQC2V.cjs → chunk-5INB3RBA.cjs} +7 -7
  7. package/dist/{chunk-EEEPQC2V.cjs.map → chunk-5INB3RBA.cjs.map} +1 -1
  8. package/dist/{chunk-3X5TJK3I.js → chunk-BO4B4IUE.js} +3 -3
  9. package/dist/{chunk-3X5TJK3I.js.map → chunk-BO4B4IUE.js.map} +1 -1
  10. package/dist/{chunk-C3D2EKGM.cjs → chunk-CSDJRUU5.cjs} +3 -3
  11. package/dist/chunk-CSDJRUU5.cjs.map +1 -0
  12. package/dist/{chunk-KIL4FXNV.cjs → chunk-D2F3AOQO.cjs} +75 -75
  13. package/dist/{chunk-KIL4FXNV.cjs.map → chunk-D2F3AOQO.cjs.map} +1 -1
  14. package/dist/{chunk-U3YH4FWP.cjs → chunk-EI2DWLXJ.cjs} +185 -185
  15. package/dist/{chunk-U3YH4FWP.cjs.map → chunk-EI2DWLXJ.cjs.map} +1 -1
  16. package/dist/{chunk-TSMQOXL6.cjs → chunk-EQ7RFQAH.cjs} +48 -48
  17. package/dist/{chunk-TSMQOXL6.cjs.map → chunk-EQ7RFQAH.cjs.map} +1 -1
  18. package/dist/{chunk-UGD4IU3X.js → chunk-FBA74DL3.js} +3 -3
  19. package/dist/{chunk-UGD4IU3X.js.map → chunk-FBA74DL3.js.map} +1 -1
  20. package/dist/{chunk-SLEXQRTX.js → chunk-FL2ZHQ5X.js} +3 -3
  21. package/dist/chunk-FL2ZHQ5X.js.map +1 -0
  22. package/dist/{chunk-Q6MFBJ66.cjs → chunk-FS4I22PV.cjs} +9 -9
  23. package/dist/{chunk-Q6MFBJ66.cjs.map → chunk-FS4I22PV.cjs.map} +1 -1
  24. package/dist/{chunk-XB4RTECX.cjs → chunk-FSGRQN2S.cjs} +12 -12
  25. package/dist/{chunk-XB4RTECX.cjs.map → chunk-FSGRQN2S.cjs.map} +1 -1
  26. package/dist/{chunk-62KO5UTR.js → chunk-HRRDSSQ6.js} +4 -4
  27. package/dist/{chunk-62KO5UTR.js.map → chunk-HRRDSSQ6.js.map} +1 -1
  28. package/dist/{chunk-PDUI6NSB.js → chunk-I3T64TQT.js} +3 -3
  29. package/dist/{chunk-PDUI6NSB.js.map → chunk-I3T64TQT.js.map} +1 -1
  30. package/dist/{chunk-EBQALGNN.js → chunk-ICEYRAGL.js} +4 -4
  31. package/dist/{chunk-EBQALGNN.js.map → chunk-ICEYRAGL.js.map} +1 -1
  32. package/dist/{chunk-ZEV6ZTTJ.js → chunk-KJWK6VLB.js} +6 -6
  33. package/dist/{chunk-ZEV6ZTTJ.js.map → chunk-KJWK6VLB.js.map} +1 -1
  34. package/dist/{chunk-XPG4Y2LE.js → chunk-KWTXKBSU.js} +8 -8
  35. package/dist/{chunk-XPG4Y2LE.js.map → chunk-KWTXKBSU.js.map} +1 -1
  36. package/dist/{chunk-RKYLFJS2.js → chunk-MXKJEOAC.js} +4 -4
  37. package/dist/{chunk-RKYLFJS2.js.map → chunk-MXKJEOAC.js.map} +1 -1
  38. package/dist/{chunk-4334N37E.cjs → chunk-P7FGMAQE.cjs} +5 -5
  39. package/dist/{chunk-4334N37E.cjs.map → chunk-P7FGMAQE.cjs.map} +1 -1
  40. package/dist/{chunk-K4TJAFNZ.cjs → chunk-PEPNSYRB.cjs} +15 -15
  41. package/dist/{chunk-K4TJAFNZ.cjs.map → chunk-PEPNSYRB.cjs.map} +1 -1
  42. package/dist/{chunk-WY4RQDAN.js → chunk-S45RT6BL.js} +4 -4
  43. package/dist/{chunk-WY4RQDAN.js.map → chunk-S45RT6BL.js.map} +1 -1
  44. package/dist/{chunk-MCYRJIZP.cjs → chunk-XYDSWAZO.cjs} +6 -6
  45. package/dist/{chunk-MCYRJIZP.cjs.map → chunk-XYDSWAZO.cjs.map} +1 -1
  46. package/dist/{chunk-VVWXPSQE.cjs → chunk-ZLM2DHS7.cjs} +5 -5
  47. package/dist/{chunk-VVWXPSQE.cjs.map → chunk-ZLM2DHS7.cjs.map} +1 -1
  48. package/dist/datasets/index.cjs +11 -11
  49. package/dist/datasets/index.js +1 -1
  50. package/dist/docs/SKILL.md +1 -1
  51. package/dist/docs/assets/SOURCE_MAP.json +119 -119
  52. package/dist/evals/index.cjs +5 -5
  53. package/dist/evals/index.js +2 -2
  54. package/dist/evals/scoreTraces/index.cjs +3 -3
  55. package/dist/evals/scoreTraces/index.js +1 -1
  56. package/dist/harness/index.cjs +7 -7
  57. package/dist/harness/index.js +5 -5
  58. package/dist/index.cjs +2 -2
  59. package/dist/index.js +1 -1
  60. package/dist/llm/index.cjs +16 -16
  61. package/dist/llm/index.js +5 -5
  62. package/dist/loop/index.cjs +14 -14
  63. package/dist/loop/index.js +1 -1
  64. package/dist/mastra/index.cjs +2 -2
  65. package/dist/mastra/index.js +1 -1
  66. package/dist/memory/index.cjs +14 -14
  67. package/dist/memory/index.js +1 -1
  68. package/dist/models-dev-BNMQK7PL.cjs +12 -0
  69. package/dist/{models-dev-ZDDICXZ3.cjs.map → models-dev-BNMQK7PL.cjs.map} +1 -1
  70. package/dist/models-dev-H2QAY2CM.js +3 -0
  71. package/dist/{models-dev-YCVPUGGP.js.map → models-dev-H2QAY2CM.js.map} +1 -1
  72. package/dist/netlify-3U3NAGJ3.cjs +12 -0
  73. package/dist/{netlify-QHUTWBTR.cjs.map → netlify-3U3NAGJ3.cjs.map} +1 -1
  74. package/dist/netlify-NLIEE7PE.js +3 -0
  75. package/dist/{netlify-6YMLOPZS.js.map → netlify-NLIEE7PE.js.map} +1 -1
  76. package/dist/processor-provider/index.cjs +10 -10
  77. package/dist/processor-provider/index.js +1 -1
  78. package/dist/processors/index.cjs +42 -42
  79. package/dist/processors/index.js +1 -1
  80. package/dist/provider-registry-5OHGZ3GP.js +3 -0
  81. package/dist/{provider-registry-DZYIED4J.js.map → provider-registry-5OHGZ3GP.js.map} +1 -1
  82. package/dist/provider-registry-MKHIXI4D.cjs +40 -0
  83. package/dist/{provider-registry-NSDAYLQL.cjs.map → provider-registry-MKHIXI4D.cjs.map} +1 -1
  84. package/dist/relevance/index.cjs +3 -3
  85. package/dist/relevance/index.js +1 -1
  86. package/dist/stream/index.cjs +8 -8
  87. package/dist/stream/index.js +1 -1
  88. package/dist/tool-loop-agent/index.cjs +4 -4
  89. package/dist/tool-loop-agent/index.js +1 -1
  90. package/dist/workflows/evented/index.cjs +10 -10
  91. package/dist/workflows/evented/index.js +1 -1
  92. package/dist/workflows/index.cjs +24 -24
  93. package/dist/workflows/index.js +1 -1
  94. package/package.json +10 -10
  95. package/dist/chunk-C3D2EKGM.cjs.map +0 -1
  96. package/dist/chunk-SLEXQRTX.js.map +0 -1
  97. package/dist/models-dev-YCVPUGGP.js +0 -3
  98. package/dist/models-dev-ZDDICXZ3.cjs +0 -12
  99. package/dist/netlify-6YMLOPZS.js +0 -3
  100. package/dist/netlify-QHUTWBTR.cjs +0 -12
  101. package/dist/provider-registry-DZYIED4J.js +0 -3
  102. package/dist/provider-registry-NSDAYLQL.cjs +0 -40
package/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # @mastra/core
2
2
 
3
+ ## 1.14.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Update provider registry and model documentation with latest models and providers ([`51970b3`](https://github.com/mastra-ai/mastra/commit/51970b3828494d59a8dd4df143b194d37d31e3f5))
8
+
9
+ - Added dated message boundary delimiters when activating buffered observations for improved cache stability. ([#14367](https://github.com/mastra-ai/mastra/pull/14367))
10
+
11
+ - Fixed provider-executed tool calls being saved out of order or without results in memory replay. (Fixes #13762) ([#13860](https://github.com/mastra-ai/mastra/pull/13860))
12
+
13
+ - Fix `generateEmptyFromSchema` to accept both string and pre-parsed object JSON schema inputs, recursively initialize nested object properties, and respect default values. Updated `WorkingMemoryTemplate` type to a discriminated union supporting `Record<string, unknown>` content for JSON format templates. Removed duplicate private schema generator in the working-memory processor in favor of the shared utility. ([#14310](https://github.com/mastra-ai/mastra/pull/14310))
14
+
15
+ - Fixed provider-executed tool calls (e.g. Anthropic `web_search`) being dropped or incorrectly persisted when deferred by the provider. Tool call parts are now persisted in stream order, and deferred tool results are correctly merged back into the originating message. ([#14282](https://github.com/mastra-ai/mastra/pull/14282))
16
+
17
+ - Fixed `replaceString` utility to properly escape `$` characters in replacement strings. Previously, patterns like `$&` in the replacement text would be interpreted as regex backreferences instead of literal text. ([#14434](https://github.com/mastra-ai/mastra/pull/14434))
18
+
19
+ - Fixed tool invocation updates to preserve `providerExecuted` and `providerMetadata` from the original tool call when updating to result state. ([#14431](https://github.com/mastra-ai/mastra/pull/14431))
20
+
21
+ - `@mastra/core`: patch ([#14327](https://github.com/mastra-ai/mastra/pull/14327))
22
+
23
+ Added `spanId` alongside `traceId` across user-facing execution results that return tracing identifiers (including agent stream/generate and workflow run results) so integrations can query observability vendors by run root span ID
24
+
25
+ - Add AI Gateway tool support in the agentic loop. ([#14016](https://github.com/mastra-ai/mastra/pull/14016))
26
+
27
+ Gateway tools (e.g., `gateway.tools.perplexitySearch()`) are provider-executed but, unlike native provider tools (e.g., `openai.tools.webSearch()`), the LLM provider does not store their results server-side. The agentic loop now correctly infers `providerExecuted` for these tools, merges streamed provider results with their corresponding tool calls, and skips local execution when a provider result is already present.
28
+
29
+ Fixes #13190
30
+
31
+ - Fixed schema-based working memory typing so `workingMemory.schema` accepts supported schemas such as Zod and JSON Schema. ([#14363](https://github.com/mastra-ai/mastra/pull/14363))
32
+
33
+ - Fixed workspace search being wiped when skills refresh. Previously, calling `skills.refresh()` or triggering a skills re-discovery via `maybeRefresh()` would clear the entire BM25 search index, including auto-indexed workspace content. Now only skill entries are removed from the index during refresh, preserving workspace search results. ([#14287](https://github.com/mastra-ai/mastra/pull/14287))
34
+
35
+ - Added client/server body schemas for feedback and scores that omit the timestamp field, allowing it to be set server-side ([#14270](https://github.com/mastra-ai/mastra/pull/14270))
36
+
37
+ - Fixed processor state not persisting between processOutputStream and processOutputResult when processors are wrapped in workflows. State set during stream processing is now correctly accessible in processOutputResult. ([#14279](https://github.com/mastra-ai/mastra/pull/14279))
38
+
39
+ - Fixed type inference for requestContext schemas when using Zod v3 and v4. Agent and tool configurations now correctly infer RequestContext types from Zod schemas and other StandardSchema-compatible schemas. ([#14363](https://github.com/mastra-ai/mastra/pull/14363))
40
+
41
+ - Updated dependencies [[`4a7ce05`](https://github.com/mastra-ai/mastra/commit/4a7ce05125b8d3d260f68f1fc4a6c6866d22ba24)]:
42
+ - @mastra/schema-compat@1.2.5
43
+
3
44
  ## 1.14.0-alpha.3
4
45
 
5
46
  ### Patch Changes
@@ -1,37 +1,37 @@
1
1
  'use strict';
2
2
 
3
- var chunkXB4RTECX_cjs = require('../chunk-XB4RTECX.cjs');
3
+ var chunkFSGRQN2S_cjs = require('../chunk-FSGRQN2S.cjs');
4
4
  var chunkNN4C4AVA_cjs = require('../chunk-NN4C4AVA.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Agent", {
9
9
  enumerable: true,
10
- get: function () { return chunkXB4RTECX_cjs.Agent; }
10
+ get: function () { return chunkFSGRQN2S_cjs.Agent; }
11
11
  });
12
12
  Object.defineProperty(exports, "TripWire", {
13
13
  enumerable: true,
14
- get: function () { return chunkXB4RTECX_cjs.TripWire; }
14
+ get: function () { return chunkFSGRQN2S_cjs.TripWire; }
15
15
  });
16
16
  Object.defineProperty(exports, "isSupportedLanguageModel", {
17
17
  enumerable: true,
18
- get: function () { return chunkXB4RTECX_cjs.isSupportedLanguageModel; }
18
+ get: function () { return chunkFSGRQN2S_cjs.isSupportedLanguageModel; }
19
19
  });
20
20
  Object.defineProperty(exports, "resolveThreadIdFromArgs", {
21
21
  enumerable: true,
22
- get: function () { return chunkXB4RTECX_cjs.resolveThreadIdFromArgs; }
22
+ get: function () { return chunkFSGRQN2S_cjs.resolveThreadIdFromArgs; }
23
23
  });
24
24
  Object.defineProperty(exports, "supportedLanguageModelSpecifications", {
25
25
  enumerable: true,
26
- get: function () { return chunkXB4RTECX_cjs.supportedLanguageModelSpecifications; }
26
+ get: function () { return chunkFSGRQN2S_cjs.supportedLanguageModelSpecifications; }
27
27
  });
28
28
  Object.defineProperty(exports, "tryGenerateWithJsonFallback", {
29
29
  enumerable: true,
30
- get: function () { return chunkXB4RTECX_cjs.tryGenerateWithJsonFallback; }
30
+ get: function () { return chunkFSGRQN2S_cjs.tryGenerateWithJsonFallback; }
31
31
  });
32
32
  Object.defineProperty(exports, "tryStreamWithJsonFallback", {
33
33
  enumerable: true,
34
- get: function () { return chunkXB4RTECX_cjs.tryStreamWithJsonFallback; }
34
+ get: function () { return chunkFSGRQN2S_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-RKYLFJS2.js';
1
+ export { Agent, TripWire, isSupportedLanguageModel, resolveThreadIdFromArgs, supportedLanguageModelSpecifications, tryGenerateWithJsonFallback, tryStreamWithJsonFallback } from '../chunk-MXKJEOAC.js';
2
2
  export { MessageList, TypeDetector, aiV5ModelMessageToV2PromptMessage, convertMessages } from '../chunk-ULOKD3QT.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { validateStepInput, createDeprecationProxy, validateStepSuspendData, getStepResult, runCountDeprecationMessage, TripWire, createTimeTravelExecutionParams, validateStepResumeData, Workflow, isSupportedLanguageModel, ProcessorState, ProcessorStepOutputSchema, ProcessorStepSchema, Run, WorkflowRunOutput, ExecutionEngine, cleanStepResult, hydrateSerializedStepErrors, Agent, ProcessorRunner, forwardAgentStreamChunk } from './chunk-RKYLFJS2.js';
1
+ import { validateStepInput, createDeprecationProxy, validateStepSuspendData, getStepResult, runCountDeprecationMessage, TripWire, createTimeTravelExecutionParams, validateStepResumeData, Workflow, isSupportedLanguageModel, ProcessorState, ProcessorStepOutputSchema, ProcessorStepSchema, Run, WorkflowRunOutput, ExecutionEngine, cleanStepResult, hydrateSerializedStepErrors, Agent, ProcessorRunner, forwardAgentStreamChunk } from './chunk-MXKJEOAC.js';
2
2
  import { STREAM_FORMAT_SYMBOL, PUBSUB_SYMBOL } from './chunk-2QXNHEDL.js';
3
3
  import { createPendingMarker } from './chunk-A4GHYWQL.js';
4
4
  import { MessageList } from './chunk-ULOKD3QT.js';
@@ -4616,5 +4616,5 @@ var EventedExecutionEngine = class extends ExecutionEngine {
4616
4616
  };
4617
4617
 
4618
4618
  export { EventedExecutionEngine, EventedRun, EventedWorkflow, StepExecutor, WorkflowEventProcessor, cloneStep, cloneWorkflow, createStep, createWorkflow };
4619
- //# sourceMappingURL=chunk-NUIDV2VL.js.map
4620
- //# sourceMappingURL=chunk-NUIDV2VL.js.map
4619
+ //# sourceMappingURL=chunk-42TT3VF3.js.map
4620
+ //# sourceMappingURL=chunk-42TT3VF3.js.map